iclient-openlayers-es6.min.js 991 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699
  1. /*!
  2. *
  3. * iclient-openlayers.(https://iclient.supermap.io)
  4. * Copyright© 2000 - 2021 SuperMap Software Co.Ltd
  5. * license: Apache-2.0
  6. * version: v10.1.1
  7. *
  8. */(()=>{var e={693:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){o.prototype.append=function(e,t){e=a(e),t=n(t);var s=this.map[e];s||(s=[],this.map[e]=s),s.push(t)},o.prototype.delete=function(e){delete this.map[a(e)]},o.prototype.get=function(e){var t=this.map[a(e)];return t?t[0]:null},o.prototype.getAll=function(e){return this.map[a(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},o.prototype.set=function(e,t){this.map[a(e)]=[n(t)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(s){this.map[s].forEach(function(r){e.call(t,r,s,this)},this)},this)};var s={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},c.call(d.prototype),c.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var i=[301,302,303,307,308];m.redirect=function(e,t){if(-1===i.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.Headers=o,t.Request=d,t.Response=m,t.fetch=function(e,t){return new Promise(function(r,i){var a;a=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t);var n=new XMLHttpRequest;var l=!1;function h(){if(4===n.readyState){var e=1223===n.status?204:n.status;if(e<100||e>599){if(l)return;return l=!0,void i(new TypeError("Network request failed"))}var t={status:e,statusText:n.statusText,headers:function(e){var t=new o;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var s=e.trim().split(":"),r=s.shift().trim(),i=s.join(":").trim();t.append(r,i)}),t}(n),url:"responseURL"in n?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):void 0},s="response"in n?n.response:n.responseText;l||(l=!0,r(new m(s,t)))}}n.onreadystatechange=h,n.onload=h,n.onerror=function(){l||(l=!0,i(new TypeError("Network request failed")))},n.open(a.method,a.url,!0);try{"include"===a.credentials&&("withCredentials"in n?n.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"))}catch(e){console&&console.warn&&console.warn("set withCredentials error:"+e)}"responseType"in n&&s.blob&&(n.responseType="blob"),a.headers.forEach(function(e,t){n.setRequestHeader(t,e)}),n.send(void 0===a._bodyInit?null:a._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,s){e.onload=function(){t(e.result)},e.onerror=function(){s(e.error)}})}function u(e){var t=new FileReader;return t.readAsArrayBuffer(e),h(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(s.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(s.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!s.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},s.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(u)},this.text=function(){var e,t,s,r,i,a,n,o=l(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,s=new FileReader,r=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",i=/charset\=[0-9a-zA-Z\-\_]*;?/,a=e.type.match(i)||r.match(i),n=[e],a&&n.push(a[0].replace(/^charset\=/,"").replace(/;$/,"")),s.readAsText.apply(s,n),h(s);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(e,t){var s,i,a=(t=t||{}).body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,a||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=(s=t.method||this.method||"GET",i=s.toUpperCase(),r.indexOf(i)>-1?i:s),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a,t)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var s=e.split("="),r=s.shift().replace(/\+/g," "),i=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function m(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},144:function(e,t){var s,r,i;r=[t,e],void 0===(i="function"==typeof(s=function(e,t){"use strict";var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=e,n=t.timeout||s.timeout,o=t.jsonpCallback||s.jsonpCallback,l=void 0;return new Promise(function(s,h){var u=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=o+"_"+u;window[u]=function(e){s({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),i(c),r(u)},a+=-1===a.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+o+"="+u),t.charset&&d.setAttribute("charset",t.charset),d.id=c,document.getElementsByTagName("head")[0].appendChild(d),l=setTimeout(function(){h(new Error("JSONP request to "+e+" timed out")),r(u),i(c),window[u]=function(){r(u)}},n),d.onerror=function(){h(new Error("JSONP request to "+e+" failed")),r(u),i(c),l&&clearTimeout(l)}})}})?s.apply(t,r):s)||(e.exports=i)},794:(e,t,s)=>{e=s.nmd(e);var r=200,i="Expected a function",a="__lodash_hash_undefined__",n=1,o=2,l=1/0,h=9007199254740991,u="[object Arguments]",c="[object Array]",d="[object Boolean]",p="[object Date]",m="[object Error]",f="[object Function]",y="[object GeneratorFunction]",g="[object Map]",v="[object Number]",S="[object Object]",b="[object RegExp]",x="[object Set]",C="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",w="[object DataView]",E=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M=/^\w*$/,A=/^\./,P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,O=/\\(\\)?/g,L=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,N={};N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N[u]=N[c]=N[T]=N[d]=N[w]=N[p]=N[m]=N[f]=N[g]=N[v]=N[S]=N[b]=N[x]=N[C]=N["[object WeakMap]"]=!1;var R="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,F="object"==typeof self&&self&&self.Object===Object&&self,D=R||F||Function("return this")(),k=t&&!t.nodeType&&t,G=k&&e&&!e.nodeType&&e,B=G&&G.exports===k&&R.process,U=function(){try{return B&&B.binding("util")}catch(e){}}(),j=U&&U.isTypedArray;function V(e,t){for(var s=-1,r=e?e.length:0;++s<r;)if(t(e[s],s,e))return!0;return!1}function H(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function J(e){var t=-1,s=Array(e.size);return e.forEach(function(e,r){s[++t]=[r,e]}),s}function z(e){var t=-1,s=Array(e.size);return e.forEach(function(e){s[++t]=e}),s}var q=Array.prototype,W=Function.prototype,Y=Object.prototype,X=D["__core-js_shared__"],Q=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),K=W.toString,Z=Y.hasOwnProperty,$=Y.toString,ee=RegExp("^"+K.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=D.Symbol,se=D.Uint8Array,re=Y.propertyIsEnumerable,ie=q.splice,ae=function(e,t){return function(s){return e(t(s))}}(Object.keys,Object),ne=De(D,"DataView"),oe=De(D,"Map"),le=De(D,"Promise"),he=De(D,"Set"),ue=De(D,"WeakMap"),ce=De(Object,"create"),de=ze(ne),pe=ze(oe),me=ze(le),fe=ze(he),ye=ze(ue),ge=te?te.prototype:void 0,ve=ge?ge.valueOf:void 0,Se=ge?ge.toString:void 0;function be(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,s=e?e.length:0;for(this.__data__=new Ce;++t<s;)this.add(e[t])}function Te(e){this.__data__=new xe(e)}function we(e,t){var s=Qe(e)||Xe(e)?function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r}(e.length,String):[],r=s.length,i=!!r;for(var a in e)!t&&!Z.call(e,a)||i&&("length"==a||Ge(a,r))||s.push(a);return s}function Ee(e,t){for(var s=e.length;s--;)if(Ye(e[s][0],t))return s;return-1}function Me(e,t){for(var s=0,r=(t=Be(t,e)?[t]:Ne(t)).length;null!=e&&s<r;)e=e[Je(t[s++])];return s&&s==r?e:void 0}function Ae(e,t){return null!=e&&t in Object(e)}function Pe(e,t,s,r,i){return e===t||(null==e||null==t||!et(e)&&!tt(t)?e!=e&&t!=t:function(e,t,s,r,i,a){var l=Qe(e),h=Qe(t),f=c,y=c;l||(f=(f=ke(e))==u?S:f);h||(y=(y=ke(t))==u?S:y);var E=f==S&&!H(e),M=y==S&&!H(t),A=f==y;if(A&&!E)return a||(a=new Te),l||rt(e)?Re(e,t,s,r,i,a):function(e,t,s,r,i,a,l){switch(s){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!r(new se(e),new se(t)));case d:case p:case v:return Ye(+e,+t);case m:return e.name==t.name&&e.message==t.message;case b:case C:return e==t+"";case g:var h=J;case x:var u=a&o;if(h||(h=z),e.size!=t.size&&!u)return!1;var c=l.get(e);if(c)return c==t;a|=n,l.set(e,t);var f=Re(h(e),h(t),r,i,a,l);return l.delete(e),f;case _:if(ve)return ve.call(e)==ve.call(t)}return!1}(e,t,f,s,r,i,a);if(!(i&o)){var P=E&&Z.call(e,"__wrapped__"),O=M&&Z.call(t,"__wrapped__");if(P||O){var L=P?e.value():e,I=O?t.value():t;return a||(a=new Te),s(L,I,r,i,a)}}if(!A)return!1;return a||(a=new Te),function(e,t,s,r,i,a){var n=i&o,l=it(e),h=l.length,u=it(t).length;if(h!=u&&!n)return!1;for(var c=h;c--;){var d=l[c];if(!(n?d in t:Z.call(t,d)))return!1}var p=a.get(e);if(p&&a.get(t))return p==t;var m=!0;a.set(e,t),a.set(t,e);for(var f=n;++c<h;){d=l[c];var y=e[d],g=t[d];if(r)var v=n?r(g,y,d,t,e,a):r(y,g,d,e,t,a);if(!(void 0===v?y===g||s(y,g,r,i,a):v)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var S=e.constructor,b=t.constructor;S!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof S&&S instanceof S&&"function"==typeof b&&b instanceof b)&&(m=!1)}return a.delete(e),a.delete(t),m}(e,t,s,r,i,a)}(e,t,Pe,s,r,i))}function Oe(e){return!(!et(e)||Q&&Q in e)&&(Ze(e)||H(e)?ee:L).test(ze(e))}function Le(e){return"function"==typeof e?e:null==e?at:"object"==typeof e?Qe(e)?function(e,t){if(Be(e)&&Ue(t))return je(Je(e),t);return function(s){var r=function(e,t,s){var r=null==e?void 0:Me(e,t);return void 0===r?s:r}(s,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,s){var r,i=-1,a=(t=Be(t,e)?[t]:Ne(t)).length;for(;++i<a;){var n=Je(t[i]);if(!(r=null!=e&&s(e,n)))break;e=e[n]}if(r)return r;return!!(a=e?e.length:0)&&$e(a)&&Ge(n,a)&&(Qe(e)||Xe(e))}(e,t,Ae)}(s,e):Pe(t,r,void 0,n|o)}}(e[0],e[1]):function(e){var t=function(e){var t=it(e),s=t.length;for(;s--;){var r=t[s],i=e[r];t[s]=[r,i,Ue(i)]}return t}(e);if(1==t.length&&t[0][2])return je(t[0][0],t[0][1]);return function(s){return s===e||function(e,t,s,r){var i=s.length,a=i,l=!r;if(null==e)return!a;for(e=Object(e);i--;){var h=s[i];if(l&&h[2]?h[1]!==e[h[0]]:!(h[0]in e))return!1}for(;++i<a;){var u=(h=s[i])[0],c=e[u],d=h[1];if(l&&h[2]){if(void 0===c&&!(u in e))return!1}else{var p=new Te;if(r)var m=r(c,d,u,e,t,p);if(!(void 0===m?Pe(d,c,r,n|o,p):m))return!1}}return!0}(s,e,t)}}(e):Be(t=e)?(s=Je(t),function(e){return null==e?void 0:e[s]}):function(e){return function(t){return Me(t,e)}}(t);var t,s}function Ie(e){if(s=(t=e)&&t.constructor,r="function"==typeof s&&s.prototype||Y,t!==r)return ae(e);var t,s,r,i=[];for(var a in Object(e))Z.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Ne(e){return Qe(e)?e:He(e)}function Re(e,t,s,r,i,a){var l=i&o,h=e.length,u=t.length;if(h!=u&&!(l&&u>h))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var d=-1,p=!0,m=i&n?new _e:void 0;for(a.set(e,t),a.set(t,e);++d<h;){var f=e[d],y=t[d];if(r)var g=l?r(y,f,d,t,e,a):r(f,y,d,e,t,a);if(void 0!==g){if(g)continue;p=!1;break}if(m){if(!V(t,function(e,t){if(!m.has(t)&&(f===e||s(f,e,r,i,a)))return m.add(t)})){p=!1;break}}else if(f!==y&&!s(f,y,r,i,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function Fe(e,t){var s,r,i=e.__data__;return("string"==(r=typeof(s=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==s:null===s)?i["string"==typeof t?"string":"hash"]:i.map}function De(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return Oe(s)?s:void 0}be.prototype.clear=function(){this.__data__=ce?ce(null):{}},be.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},be.prototype.get=function(e){var t=this.__data__;if(ce){var s=t[e];return s===a?void 0:s}return Z.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return ce?void 0!==t[e]:Z.call(t,e)},be.prototype.set=function(e,t){return this.__data__[e]=ce&&void 0===t?a:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,s=Ee(t,e);return!(s<0||(s==t.length-1?t.pop():ie.call(t,s,1),0))},xe.prototype.get=function(e){var t=this.__data__,s=Ee(t,e);return s<0?void 0:t[s][1]},xe.prototype.has=function(e){return Ee(this.__data__,e)>-1},xe.prototype.set=function(e,t){var s=this.__data__,r=Ee(s,e);return r<0?s.push([e,t]):s[r][1]=t,this},Ce.prototype.clear=function(){this.__data__={hash:new be,map:new(oe||xe),string:new be}},Ce.prototype.delete=function(e){return Fe(this,e).delete(e)},Ce.prototype.get=function(e){return Fe(this,e).get(e)},Ce.prototype.has=function(e){return Fe(this,e).has(e)},Ce.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},_e.prototype.add=_e.prototype.push=function(e){return this.__data__.set(e,a),this},_e.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new xe},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var s=this.__data__;if(s instanceof xe){var i=s.__data__;if(!oe||i.length<r-1)return i.push([e,t]),this;s=this.__data__=new Ce(i)}return s.set(e,t),this};var ke=function(e){return $.call(e)};function Ge(e,t){return!!(t=null==t?h:t)&&("number"==typeof e||I.test(e))&&e>-1&&e%1==0&&e<t}function Be(e,t){if(Qe(e))return!1;var s=typeof e;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=e&&!st(e))||(M.test(e)||!E.test(e)||null!=t&&e in Object(t))}function Ue(e){return e==e&&!et(e)}function je(e,t){return function(s){return null!=s&&(s[e]===t&&(void 0!==t||e in Object(s)))}}function Ve(e,t){return 1==t.length?e:Me(e,function(e,t,s){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(s=s>i?i:s)<0&&(s+=i),i=t>s?0:s-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}(t,0,-1))}(ne&&ke(new ne(new ArrayBuffer(1)))!=w||oe&&ke(new oe)!=g||le&&"[object Promise]"!=ke(le.resolve())||he&&ke(new he)!=x||ue&&"[object WeakMap]"!=ke(new ue))&&(ke=function(e){var t=$.call(e),s=t==S?e.constructor:void 0,r=s?ze(s):void 0;if(r)switch(r){case de:return w;case pe:return g;case me:return"[object Promise]";case fe:return x;case ye:return"[object WeakMap]"}return t});var He=We(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(st(e))return Se?Se.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}(t);var s=[];return A.test(e)&&s.push(""),e.replace(P,function(e,t,r,i){s.push(r?i.replace(O,"$1"):t||e)}),s});function Je(e){if("string"==typeof e||st(e))return e;var t=e+"";return"0"==t&&1/e==-l?"-0":t}function ze(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qe(e){var t=e?e.length:0;return t?e[t-1]:void 0}function We(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var s=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=s.cache;if(a.has(i))return a.get(i);var n=e.apply(this,r);return s.cache=a.set(i,n),n};return s.cache=new(We.Cache||Ce),s}function Ye(e,t){return e===t||e!=e&&t!=t}function Xe(e){return function(e){return tt(e)&&Ke(e)}(e)&&Z.call(e,"callee")&&(!re.call(e,"callee")||$.call(e)==u)}We.Cache=Ce;var Qe=Array.isArray;function Ke(e){return null!=e&&$e(e.length)&&!Ze(e)}function Ze(e){var t=et(e)?$.call(e):"";return t==f||t==y}function $e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function et(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function tt(e){return!!e&&"object"==typeof e}function st(e){return"symbol"==typeof e||tt(e)&&$.call(e)==_}var rt=j?function(e){return function(t){return e(t)}}(j):function(e){return tt(e)&&$e(e.length)&&!!N[$.call(e)]};function it(e){return Ke(e)?we(e):Ie(e)}function at(e){return e}e.exports=function(e,t){var s=[];if(!e||!e.length)return s;var r=-1,i=[],a=e.length;for(t=Le(t);++r<a;){var n=e[r];t(n,r,e)&&(s.push(n),i.push(r))}return function(e,t){for(var s=e?t.length:0,r=s-1;s--;){var i=t[s];if(s==r||i!==a){var a=i;if(Ge(i))ie.call(e,i,1);else if(Be(i,e))delete e[Je(i)];else{var n=Ne(i),o=Ve(e,n);null!=o&&delete o[Je(qe(n))]}}}}(e,i),s}},52:(e,t,s)=>{var r=9007199254740991,i="[object Arguments]",a="[object Function]",n="[object GeneratorFunction]",o="[object Map]",l="[object Set]",h=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=c||d||Function("return this")();function m(e,t){return function(e,t){for(var s=-1,r=e?e.length:0,i=Array(r);++s<r;)i[s]=t(e[s],s,e);return i}(t,function(t){return[t,e[t]]})}var f=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],v=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),S=f.toString,b=y.hasOwnProperty,x=y.toString,C=RegExp("^"+S.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_=y.propertyIsEnumerable,T=function(e,t){return function(s){return e(t(s))}}(Object.keys,Object),w=G(p,"DataView"),E=G(p,"Map"),M=G(p,"Promise"),A=G(p,"Set"),P=G(p,"WeakMap"),O=j(w),L=j(E),I=j(M),N=j(A),R=j(P);function F(e,t){var s=V(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&H(e)}(e)&&b.call(e,"callee")&&(!_.call(e,"callee")||x.call(e)==i)}(e)?function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r}(e.length,String):[],r=s.length,a=!!r;for(var n in e)!t&&!b.call(e,n)||a&&("length"==n||U(n,r))||s.push(n);return s}function D(e){return!(!z(e)||v&&v in e)&&(J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:h).test(j(e))}function k(e){if(s=(t=e)&&t.constructor,r="function"==typeof s&&s.prototype||y,t!==r)return T(e);var t,s,r,i=[];for(var a in Object(e))b.call(e,a)&&"constructor"!=a&&i.push(a);return i}function G(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return D(s)?s:void 0}var B=function(e){return x.call(e)};function U(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||u.test(e))&&e>-1&&e%1==0&&e<t}function j(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(w&&"[object DataView]"!=B(new w(new ArrayBuffer(1)))||E&&B(new E)!=o||M&&"[object Promise]"!=B(M.resolve())||A&&B(new A)!=l||P&&"[object WeakMap]"!=B(new P))&&(B=function(e){var t=x.call(e),s="[object Object]"==t?e.constructor:void 0,r=s?j(s):void 0;if(r)switch(r){case O:return"[object DataView]";case L:return o;case I:return"[object Promise]";case N:return l;case R:return"[object WeakMap]"}return t});var V=Array.isArray;function H(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!J(e)}function J(e){var t=z(e)?x.call(e):"";return t==a||t==n}function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var q=function(e){return function(t){var s,r,i,a=B(t);return a==o?(s=t,r=-1,i=Array(s.size),s.forEach(function(e,t){i[++r]=[t,e]}),i):a==l?function(e){var t=-1,s=Array(e.size);return e.forEach(function(e){s[++t]=[e,e]}),s}(t):m(t,e(t))}}(function(e){return H(e)?F(e):k(e)});e.exports=q},107:function(e,t,s){!function(){"use strict";function e(e){var t=this.constructor;return this.then(function(s){return t.resolve(e()).then(function(){return s})},function(s){return t.resolve(e()).then(function(){return t.reject(s)})})}var t=setTimeout;function r(e){return Boolean(e&&void 0!==e.length)}function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function n(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn(function(){var s=1===e._state?t.onFulfilled:t.onRejected;if(null!==s){var r;try{r=s(e._value)}catch(e){return void l(t.promise,e)}o(t.promise,r)}else(1===e._state?o:l)(t.promise,e._value)})):e._deferreds.push(t)}function o(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var s=t.then;if(t instanceof a)return e._state=3,e._value=t,void h(e);if("function"==typeof s)return void u((r=s,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,h(e)}catch(t){l(e,t)}var r,i}function l(e,t){e._state=2,e._value=t,h(e)}function h(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,s=e._deferreds.length;t<s;t++)n(e,e._deferreds[t]);e._deferreds=null}function u(e,t){var s=!1;try{e(function(e){s||(s=!0,o(t,e))},function(e){s||(s=!0,l(t,e))})}catch(e){if(s)return;s=!0,l(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var s=new this.constructor(i);return n(this,new function(e,t,s){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=s}(e,t,s)),s},a.prototype.finally=e,a.all=function(e){return new a(function(t,s){if(!r(e))return s(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var a=i.length;function n(e,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var o=r.then;if("function"==typeof o)return void o.call(r,function(t){n(e,t)},s)}i[e]=r,0==--a&&t(i)}catch(e){s(e)}}for(var o=0;o<i.length;o++)n(o,i[o])})},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(e){return new a(function(t,s){s(e)})},a.race=function(e){return new a(function(t,s){if(!r(e))return s(new TypeError("Promise.race accepts an array"));for(var i=0,n=e.length;i<n;i++)a.resolve(e[i]).then(t,s)})},a._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){t(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var c=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==s.g)return s.g;throw new Error("unable to locate global object")}();"Promise"in c?c.Promise.prototype.finally||(c.Promise.prototype.finally=e):c.Promise=a}()}},t={};function s(r){if(t[r])return t[r].exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.n=(e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}),s.d=((e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}),s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),s.nmd=(e=>(e.paths=[],e.children||(e.children=[]),e)),(()=>{"use strict";const e=ol.Observable;var t=s.n(e);
  9. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  10. * This program are made available under the terms of the Apache License, Version 2.0
  11. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12. class r extends(t()){constructor(e,t){super(e,t),this.options=t||{},this.url=e,this.dispatchEvent({type:"initialized",value:this})}}
  13. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  14. * This program are made available under the terms of the Apache License, Version 2.0
  15. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  16. var i=window.SuperMap=window.SuperMap||{};i.Components=window.SuperMap.Components||{};
  17. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  18. * This program are made available under the terms of the Apache License, Version 2.0
  19. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  20. var a=i.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},n=i.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},o=i.GeometryType={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"},l=i.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},h=(i.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},i.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"}),u=(i.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},i.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"}),c=i.Unit={METER:"METER",KILOMETER:"KILOMETER",MILE:"MILE",YARD:"YARD",DEGREE:"DEGREE",MILLIMETER:"MILLIMETER",CENTIMETER:"CENTIMETER",INCH:"INCH",DECIMETER:"DECIMETER",FOOT:"FOOT",SECOND:"SECOND",MINUTE:"MINUTE",RADIAN:"RADIAN"},d=i.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},p=(i.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},i.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"}),m=i.ThemeGraphType={AREA:"AREA",BAR:"BAR",BAR3D:"BAR3D",LINE:"LINE",PIE:"PIE",PIE3D:"PIE3D",POINT:"POINT",RING:"RING",ROSE:"ROSE",ROSE3D:"ROSE3D",STACK_BAR:"STACK_BAR",STACK_BAR3D:"STACK_BAR3D",STEP:"STEP"},f=i.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},y=i.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},g=i.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},v=(i.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},i.ColorGradientType={BLACK_WHITE:"BLACKWHITE",BLUE_BLACK:"BLUEBLACK",BLUE_RED:"BLUERED",BLUE_WHITE:"BLUEWHITE",CYAN_BLACK:"CYANBLACK",CYAN_BLUE:"CYANBLUE",CYAN_GREEN:"CYANGREEN",CYAN_WHITE:"CYANWHITE",GREEN_BLACK:"GREENBLACK",GREEN_BLUE:"GREENBLUE",GREEN_ORANGE_VIOLET:"GREENORANGEVIOLET",GREEN_RED:"GREENRED",GREEN_WHITE:"GREENWHITE",PINK_BLACK:"PINKBLACK",PINK_BLUE:"PINKBLUE",PINK_RED:"PINKRED",PINK_WHITE:"PINKWHITE",RAIN_BOW:"RAINBOW",RED_BLACK:"REDBLACK",RED_WHITE:"REDWHITE",SPECTRUM:"SPECTRUM",TERRAIN:"TERRAIN",YELLOW_BLACK:"YELLOWBLACK",YELLOW_BLUE:"YELLOWBLUE",YELLOW_GREEN:"YELLOWGREEN",YELLOW_RED:"YELLOWRED",YELLOW_WHITE:"YELLOWWHITE"}),S=i.TextAlignment={TOPLEFT:"TOPLEFT",TOPCENTER:"TOPCENTER",TOPRIGHT:"TOPRIGHT",BASELINELEFT:"BASELINELEFT",BASELINECENTER:"BASELINECENTER",BASELINERIGHT:"BASELINERIGHT",BOTTOMLEFT:"BOTTOMLEFT",BOTTOMCENTER:"BOTTOMCENTER",BOTTOMRIGHT:"BOTTOMRIGHT",MIDDLELEFT:"MIDDLELEFT",MIDDLECENTER:"MIDDLECENTER",MIDDLERIGHT:"MIDDLERIGHT"},b=(i.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},i.AlongLineDirection={NORMAL:"ALONG_LINE_NORMAL",LB_TO_RT:"LEFT_BOTTOM_TO_RIGHT_TOP",LT_TO_RB:"LEFT_TOP_TO_RIGHT_BOTTOM",RB_TO_LT:"RIGHT_BOTTOM_TO_LEFT_TOP",RT_TO_LB:"RIGHT_TOP_TO_LEFT_BOTTOM"}),x=i.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},C=i.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},_=(i.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},i.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},i.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},i.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},i.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"}),T=i.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},w=i.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},E=i.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},M=i.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},A=i.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},P=i.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},O=i.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},L=i.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},I=(i.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},i.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},i.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},i.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},i.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},i.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},i.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},i.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},i.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"}),N=i.Exponent={EXP1:"EXP1",EXP2:"EXP2"},R=i.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},F=(i.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},i.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"}),D=i.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},k=i.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},G=i.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},B=i.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},U=i.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},j=i.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},V=i.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},H=(i.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},i.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"});i.ResourceType={MAP:"MAP",SERVICE:"SERVICE",SCENE:"SCENE",DATA:"DATA",INSIGHTS_WORKSPACE:"INSIGHTS_WORKSPACE",MAP_DASHBOARD:"MAP_DASHBOARD"},i.OrderBy={UPDATETIME:"UPDATETIME",HEATLEVEL:"HEATLEVEL",RELEVANCE:"RELEVANCE"},i.OrderType={ASC:"ASC",DESC:"DESC"},i.SearchType={PUBLIC:"PUBLIC",MY_RES:"MY_RES",MYGROUP_RES:"MYGROUP_RES",MYDEPARTMENT_RES:"MYDEPARTMENT_RES",SHARETOME_RES:"SHARETOME_RES"},i.AggregationTypes={TAG:"TAG",TYPE:"TYPE"},i.PermissionType={SEARCH:"SEARCH",READ:"READ",READWRITE:"READWRITE",DELETE:"DELETE",DOWNLOAD:"DOWNLOAD"},i.EntityType={DEPARTMENT:"DEPARTMENT",GROUP:"GROUP",IPORTALGROUP:"IPORTALGROUP",ROLE:"ROLE",USER:"USER"},i.DataItemType={WORKSPACE:"WORKSPACE",UDB:"UDB",SHP:"SHP",EXCEL:"EXCEL",CSV:"CSV",GEOJSON:"GEOJSON",SMTILES:"SMTILES",SVTILES:"SVTILES",MBTILES:"MBTILES",TPK:"TPK",UGCV5:"UGCV5",UGCV5_MVT:"UGCV5_MVT",JSON:"JSON"},i.WebExportFormatType={PNG:"PNG",PDF:"PDF"},i.WebScaleOrientationType={HORIZONTALLABELSBELOW:"HORIZONTALLABELSBELOW",HORIZONTALLABELSABOVE:"HORIZONTALLABELSABOVE",VERTICALLABELSLEFT:"VERTICALLABELSLEFT",VERTICALLABELSRIGHT:"VERTICALLABELSRIGHT"},i.WebScaleType={LINE:"LINE",BAR:"BAR",BAR_SUB:"BAR_SUB"},i.WebScaleUnit={METER:"METER",FOOT:"FOOT",DEGREES:"DEGREES"};
  21. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  22. * This program are made available under the terms of the Apache License, Version 2.0
  23. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  24. class J{constructor(e,t){this.w=e?parseFloat(e):0,this.h=e?parseFloat(t):0,this.CLASS_NAME="SuperMap.Size"}toString(){return"w="+this.w+",h="+this.h}clone(){return new J(this.w,this.h)}equals(e){var t=!1;return null!=e&&(t=this.w===e.w&&this.h===e.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(e.w)&&isNaN(e.h)),t}destroy(){this.w=null,this.h=null}}i.Size=J;
  25. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  26. * This program are made available under the terms of the Apache License, Version 2.0
  27. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  28. class z{constructor(e,t,s){this.x=e?parseFloat(e):0,this.y=t?parseFloat(t):0,this.mode=s,this.CLASS_NAME="SuperMap.Pixel",i.Pixel.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}}toString(){return"x="+this.x+",y="+this.y}clone(){return new z(this.x,this.y,this.mode)}equals(e){var t=!1;return null!=e&&(t=this.x==e.x&&this.y==e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}add(e,t){if(null==e||null==t)throw new TypeError("Pixel.add cannot receive null values");return new z(this.x+e,this.y+t)}offset(e){var t=this.clone();return e&&(t=this.add(e.x,e.y)),t}destroy(){this.x=null,this.y=null,this.mode=null}}i.Pixel=z,
  29. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  30. * This program are made available under the terms of the Apache License, Version 2.0
  31. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  32. i.inherit=function(e,t){var s,r,a,n=function(){};for(n.prototype=t.prototype,e.prototype=new n,s=2,r=arguments.length;s<r;s++)"function"==typeof(a=arguments[s])&&(a=a.prototype),i.Util.extend(e.prototype,a)},i.mixin=function(...e){class t{constructor(t){for(var s=0;s<e.length;s++)i(this,new e[s](t))}}for(var s=0;s<e.length;s++){var r=e[s];i(t,r),i(t.prototype,r.prototype),i(t.prototype,new r)}return t;function i(e,t){var s=Object.getOwnPropertyNames(t);Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(t)));for(var r=0;r<s.length;r++){var i=s[r];if("constructor"!==i&&"prototype"!==i&&"name"!==i&&"length"!==i){let s=Object.getOwnPropertyDescriptor(t,i);window.ActiveXObject?Object.defineProperty(e,i,s||{}):Object.defineProperty(e,i,s)}}}};var q=i.String={startsWith:function(e,t){return 0==e.indexOf(t)},contains:function(e,t){return-1!=e.indexOf(t)},trim:function(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(e){for(var t=e.split("-"),s=t[0],r=1,i=t.length;r<i;r++){var a=t[r];s+=a.charAt(0).toUpperCase()+a.substring(1)}return s},format:function(e,t,s){t||(t=window);return e.replace(i.String.tokenRegEx,function(e,r){for(var i,a=r.split(/\.+/),n=0;n<a.length;n++)0==n&&(i=t),i=i[a[n]];return"function"==typeof i&&(i=s?i.apply(null,s):i()),void 0===i?"undefined":i})},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(e){return i.String.numberRegEx.test(e)},numericIf:function(e){return i.String.isNumeric(e)?parseFloat(e):e}},W=i.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(e,t){var s=0;return t>0&&(s=parseFloat(e.toPrecision(t))),s},format:function(e,t,s,r){t=void 0!==t?t:0,s=void 0!==s?s:i.Number.thousandsSeparator,r=void 0!==r?r:i.Number.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var a=e.toString().split(".");1===a.length&&null==t&&(t=0);var n,o=a[0];if(s)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(o);)o=o.replace(l,"$1"+s+"$2");if(0==t)n=o;else{var h=a.length>1?a[1]:"0";null!=t&&(h+=new Array(t-h.length+1).join("0")),n=o+r+h}return n}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return W.limitSigDigs(this,e)});var Y=i.Function={bind:function(e,t){var s=Array.prototype.slice.apply(arguments,[2]);return function(){var r=s.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,r)}},bindAsEventListener:function(e,t){return function(s){return e.call(t,s||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},X=(i.Array={filter:function(e,t,s){var r=[];if(Array.prototype.filter)r=e.filter(t,s);else{var i=e.length;if("function"!=typeof t)throw new TypeError;for(var a=0;a<i;a++)if(a in e){var n=e[a];t.call(s,n,a,e)&&r.push(n)}}return r}},i.Util=i.Util||{});i.Util.extend=function(e,t){if(e=e||{},t){for(var s in t){var r=t[s];void 0!==r&&(e[s]=r)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},i.Util.copy=function(e,t){var s;if(e=e||{},t)for(var r in e)void 0!==(s=t[r])&&(e[r]=s)},i.Util.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var s in e[t])e[t][s].destroy&&e[t][s].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},i.Util.getElement=function(){for(var e=[],t=0,s=arguments.length;t<s;t++){var r=arguments[t];if("string"==typeof r&&(r=document.getElementById(r)),1===arguments.length)return r;e.push(r)}return e},i.Util.isElement=function(e){return!(!e||1!==e.nodeType)},i.Util.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i.Util.removeItem=function(e,t){for(var s=e.length-1;s>=0;s--)e[s]===t&&e.splice(s,1);return e},i.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s<r;s++)if(e[s]===t)return s;return-1},i.Util.modifyDOMElement=function(e,t,s,r,i,a,n,o){t&&(e.id=t),s&&(e.style.left=s.x+"px",e.style.top=s.y+"px"),r&&(e.style.width=r.w+"px",e.style.height=r.h+"px"),i&&(e.style.position=i),a&&(e.style.border=a),n&&(e.style.overflow=n),parseFloat(o)>=0&&parseFloat(o)<1?(e.style.filter="alpha(opacity="+100*o+")",e.style.opacity=o):1===parseFloat(o)&&(e.style.filter="",e.style.opacity="")},i.Util.applyDefaults=function(e,t){e=e||{};var s="function"==typeof window.Event&&t instanceof window.Event;for(var r in t)(void 0===e[r]||!s&&t.hasOwnProperty&&t.hasOwnProperty(r)&&!e.hasOwnProperty(r))&&(e[r]=t[r]);return!s&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},i.Util.getParameterString=function(e){var t=[];for(var s in e){var r,i=e[s];if(null!=i&&"function"!=typeof i)r=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},i.Util.urlAppend=function(e,t){var s=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var r=(e+" ").split(/[?&]/);s+=" "===r.pop()?t:r.length?"&"+t:"?"+t}return s},i.Util.urlPathAppend=function(e,t){let s=e;if(!t)return s;0===t.indexOf("/")&&(t=t.substring(1));const r=e.split("?");return r[0].indexOf("/",r[0].length-1)<0&&(r[0]+="/"),s=`${r[0]}${t}${r.length>1?`?${r[1]}`:""}`},i.Util.DEFAULT_PRECISION=14,i.Util.toFloat=function(e,t){return null==t&&(t=i.Util.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},i.Util.rad=function(e){return e*Math.PI/180},i.Util.getParameters=function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(i.String.contains(e,"?")){var s=e.indexOf("?")+1,r=i.String.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(s,r)}for(var a={},n=t.split(/[&;]/),o=0,l=n.length;o<l;++o){var h=n[o].split("=");if(h[0]){var u=h[0];try{u=decodeURIComponent(u)}catch(e){u=unescape(u)}var c=(h[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch(e){c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),a[u]=c}}return a},i.Util.lastSeqID=0,i.Util.createUniqueID=function(e){return null==e&&(e="id_"),i.Util.lastSeqID+=1,e+i.Util.lastSeqID},i.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36},i.INCHES_PER_UNIT.in=i.INCHES_PER_UNIT.inches,i.INCHES_PER_UNIT.degrees=i.INCHES_PER_UNIT.dd,i.INCHES_PER_UNIT.nmi=1852*i.INCHES_PER_UNIT.m,i.METERS_PER_INCH=.0254000508001016,i.Util.extend(i.INCHES_PER_UNIT,{Inch:i.INCHES_PER_UNIT.inches,Meter:1/i.METERS_PER_INCH,Foot:.3048006096012192/i.METERS_PER_INCH,IFoot:.3048/i.METERS_PER_INCH,ClarkeFoot:.3047972651151/i.METERS_PER_INCH,SearsFoot:.30479947153867626/i.METERS_PER_INCH,GoldCoastFoot:.3047997101815088/i.METERS_PER_INCH,IInch:.0254/i.METERS_PER_INCH,MicroInch:254e-7/i.METERS_PER_INCH,Mil:2.54e-8/i.METERS_PER_INCH,Centimeter:.01/i.METERS_PER_INCH,Kilometer:1e3/i.METERS_PER_INCH,Yard:.9144018288036576/i.METERS_PER_INCH,SearsYard:.914398414616029/i.METERS_PER_INCH,IndianYard:.9143985307444408/i.METERS_PER_INCH,IndianYd37:.91439523/i.METERS_PER_INCH,IndianYd62:.9143988/i.METERS_PER_INCH,IndianYd75:.9143985/i.METERS_PER_INCH,IndianFoot:.30479951/i.METERS_PER_INCH,IndianFt37:.30479841/i.METERS_PER_INCH,IndianFt62:.3047996/i.METERS_PER_INCH,IndianFt75:.3047995/i.METERS_PER_INCH,Mile:1609.3472186944373/i.METERS_PER_INCH,IYard:.9144/i.METERS_PER_INCH,IMile:1609.344/i.METERS_PER_INCH,NautM:1852/i.METERS_PER_INCH,"Lat-66":110943.31648893273/i.METERS_PER_INCH,"Lat-83":110946.25736872235/i.METERS_PER_INCH,Decimeter:.1/i.METERS_PER_INCH,Millimeter:.001/i.METERS_PER_INCH,Dekameter:10/i.METERS_PER_INCH,Decameter:10/i.METERS_PER_INCH,Hectometer:100/i.METERS_PER_INCH,GermanMeter:1.0000135965/i.METERS_PER_INCH,CaGrid:.999738/i.METERS_PER_INCH,ClarkeChain:20.1166194976/i.METERS_PER_INCH,GunterChain:20.11684023368047/i.METERS_PER_INCH,BenoitChain:20.116782494375872/i.METERS_PER_INCH,SearsChain:20.11676512155/i.METERS_PER_INCH,ClarkeLink:.201166194976/i.METERS_PER_INCH,GunterLink:.2011684023368047/i.METERS_PER_INCH,BenoitLink:.20116782494375873/i.METERS_PER_INCH,SearsLink:.2011676512155/i.METERS_PER_INCH,Rod:5.02921005842012/i.METERS_PER_INCH,IntnlChain:20.1168/i.METERS_PER_INCH,IntnlLink:.201168/i.METERS_PER_INCH,Perch:5.02921005842012/i.METERS_PER_INCH,Pole:5.02921005842012/i.METERS_PER_INCH,Furlong:201.1684023368046/i.METERS_PER_INCH,Rood:3.778266898/i.METERS_PER_INCH,CapeFoot:.3047972615/i.METERS_PER_INCH,Brealey:375/i.METERS_PER_INCH,ModAmFt:.304812252984506/i.METERS_PER_INCH,Fathom:1.8288/i.METERS_PER_INCH,"NautM-UK":1853.184/i.METERS_PER_INCH,"50kilometers":5e4/i.METERS_PER_INCH,"150kilometers":15e4/i.METERS_PER_INCH}),i.Util.extend(i.INCHES_PER_UNIT,{mm:i.INCHES_PER_UNIT.Meter/1e3,cm:i.INCHES_PER_UNIT.Meter/100,dm:100*i.INCHES_PER_UNIT.Meter,km:1e3*i.INCHES_PER_UNIT.Meter,kmi:i.INCHES_PER_UNIT.nmi,fath:i.INCHES_PER_UNIT.Fathom,ch:i.INCHES_PER_UNIT.IntnlChain,link:i.INCHES_PER_UNIT.IntnlLink,"us-in":i.INCHES_PER_UNIT.inches,"us-ft":i.INCHES_PER_UNIT.Foot,"us-yd":i.INCHES_PER_UNIT.Yard,"us-ch":i.INCHES_PER_UNIT.GunterChain,"us-mi":i.INCHES_PER_UNIT.Mile,"ind-yd":i.INCHES_PER_UNIT.IndianYd37,"ind-ft":i.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/i.METERS_PER_INCH}),i.DOTS_PER_INCH=96,i.Util.normalizeScale=function(e){return e>1?1/e:e},i.Util.getResolutionFromScale=function(e,t){var s;e&&(null==t&&(t="degrees"),s=1/(i.Util.normalizeScale(e)*i.INCHES_PER_UNIT[t]*i.DOTS_PER_INCH));return s},i.Util.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*i.INCHES_PER_UNIT[t]*i.DOTS_PER_INCH},i.IS_GECKO=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("webkit")&&-1!==e.indexOf("gecko")}(),i.Browser=function(){var e,t="",s="",r="pc",i=navigator.userAgent.toLowerCase();return i.indexOf("msie")>-1||i.indexOf("trident")>-1&&i.indexOf("rv")>-1?(t="msie",e=i.match(/msie ([\d.]+)/)||i.match(/rv:([\d.]+)/)):i.indexOf("chrome")>-1?(t="chrome",e=i.match(/chrome\/([\d.]+)/)):i.indexOf("firefox")>-1?(t="firefox",e=i.match(/firefox\/([\d.]+)/)):i.indexOf("opera")>-1?(t="opera",e=i.match(/version\/([\d.]+)/)):i.indexOf("safari")>-1&&(t="safari",e=i.match(/version\/([\d.]+)/)),s=e?e[1]:"",i.indexOf("ipad")>-1||i.indexOf("ipod")>-1||i.indexOf("iphone")>-1?r="apple":i.indexOf("android")>-1&&(s=(e=i.match(/version\/([\d.]+)/))?e[1]:"",r="android"),{name:t,version:s,device:r}}(),i.Util.getBrowser=function(){return i.Browser},i.Util.isSupportCanvas=function(){var e=!0,t=i.Util.getBrowser();return document.createElement("canvas").getContext?("firefox"===t.name&&parseFloat(t.version)<5&&(e=!1),"safari"===t.name&&parseFloat(t.version)<4&&(e=!1),"opera"===t.name&&parseFloat(t.version)<10&&(e=!1),"msie"===t.name&&parseFloat(t.version)<9&&(e=!1)):e=!1,e}(),i.Util.supportCanvas=function(){return i.Util.isSupportCanvas},i.INCHES_PER_UNIT.degree=i.INCHES_PER_UNIT.dd,i.INCHES_PER_UNIT.meter=i.INCHES_PER_UNIT.m,i.INCHES_PER_UNIT.foot=i.INCHES_PER_UNIT.ft,i.INCHES_PER_UNIT.inch=i.INCHES_PER_UNIT.inches,i.INCHES_PER_UNIT.mile=i.INCHES_PER_UNIT.mi,i.INCHES_PER_UNIT.kilometer=i.INCHES_PER_UNIT.km,i.INCHES_PER_UNIT.yard=i.INCHES_PER_UNIT.yd,i.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),s=document.location.toString(),r=s.indexOf("//");if(-1===t)return!0;var i,a=i=e.substring(0,t),n=s.substring(r+2);r=n.indexOf("/");var o=n.indexOf(":"),l=n.substring(0,r),h=document.location.protocol;if(-1!==o||(l+=":"+("http:"===h.toLowerCase()?80:443)),h.toLowerCase()!==a.toLowerCase())return!1;var u=(a=e.substring(t+2)).indexOf(":");t=a.indexOf("/");var c,d=a.substring(0,t);return-1!==u?c=a.substring(0,u):(c=a.substring(0,t),d+=":"+("http:"===i.toLowerCase()?80:443)),c===document.domain&&d===l},i.Util.calculateDpi=function(e,t,s,r,i){if(e&&t&&s){var a,n=e.getWidth(),o=e.getHeight(),l=t.w,h=t.h;if(i=i||6378137,"degree"===(r=r||"degrees").toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()){let e=n/l,t=o/h;a=254/(e>t?e:t)/s/(2*Math.PI*i/360)/1e4}else{a=254/(n/l)/s/1e4}return a}},i.Util.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","&lt;")).replace(">","&gt;")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var s=[],r=0,a=t.length;r<a;r++)s.push(i.Util.toJSON(t[r]));return"["+s.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let s=0,r=t.length;s<r;s++)e.push(i.Util.toJSON(t[s]));return"["+e.join(",")+"]"}let e=[];for(let s in t)"function"!=typeof t[s]&&"CLASS_NAME"!==s&&"parent"!==s&&e.push("'"+s+"':"+i.Util.toJSON(t[s]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},i.Util.getResolutionFromScaleDpi=function(e,t,s,r){return r=r||6378137,s=s||"",e>0&&t>0?(e=i.Util.normalizeScale(e),"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4):-1},i.Util.getScaleFromResolutionDpi=function(e,t,s,r){return r=r||6378137,s=s||"",e>0&&t>0?"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4:-1},i.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},i.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var s in t){var r=t[s];void 0!==r&&"CLASS_NAME"!==s&&"function"!=typeof r&&(e[s]=r)}return e},i.Util.copyAttributesWithClip=function(e,t,s){if(e=e||{},t)for(var r in t){var i=!1;if(s&&s.length)for(var a=0,n=s.length;a<n;a++)if(r===s[a]){i=!0;break}if(!0!==i){var o=t[r];void 0!==o&&"CLASS_NAME"!==r&&"function"!=typeof o&&(e[r]=o)}}return e},i.Util.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array){return e.slice(0)}if(e instanceof Object){let s={};for(var t in e)e.hasOwnProperty(t)&&(s[t]=i.Util.cloneObject(e[t]));return s}throw new Error("Unable to copy obj! Its type isn't supported.")},i.Util.lineIntersection=function(e,t,s,r){var a,n,o=null,l=(r.x-s.x)*(e.y-s.y)-(r.y-s.y)*(e.x-s.x),h=(t.x-e.x)*(e.y-s.y)-(t.y-e.y)*(e.x-s.x),u=(r.y-s.y)*(t.x-e.x)-(r.x-s.x)*(t.y-e.y);if(0!=u)n=h/u,o=(a=l/u)>=0&&n<=1&&a<=1&&n>=0?new i.Geometry.Point(e.x+a*(t.x-e.x),e.y+a*(t.y-e.y)):"No Intersection";else if(0==l&&0==h){var c=Math.max(e.y,t.y),d=Math.min(e.y,t.y),p=Math.max(e.x,t.x),m=Math.min(e.x,t.x);o=(s.y>=d&&s.y<=c||r.y>=d&&r.y<=c)&&s.x>=m&&s.x<=p||r.x>=m&&r.x<=p?"Coincident":"Parallel"}else o="Parallel";return o},i.Util.getTextBounds=function(e,t,s){document.body.appendChild(s),s.style.width="auto",s.style.height="auto",e.fontSize&&(s.style.fontSize=e.fontSize),e.fontFamily&&(s.style.fontFamily=e.fontFamily),e.fontWeight&&(s.style.fontWeight=e.fontWeight),s.style.position="relative",s.style.visibility="hidden",s.style.display="inline-block",s.innerHTML=t;var r=s.clientWidth,i=s.clientHeight;return document.body.removeChild(s),{textWidth:r,textHeight:i}};
  33. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  34. * This program are made available under the terms of the Apache License, Version 2.0
  35. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  36. class Q{constructor(e,t){X.isArray(e)&&(t=e[1],e=e[0]),this.lon=e?X.toFloat(e):0,this.lat=t?X.toFloat(t):0,this.CLASS_NAME="SuperMap.LonLat"}toString(){return"lon="+this.lon+",lat="+this.lat}toShortString(){return this.lon+","+this.lat}clone(){return new Q(this.lon,this.lat)}add(e,t){if(null==e||null==t)throw new TypeError("LonLat.add cannot receive null values");return new Q(this.lon+X.toFloat(e),this.lat+X.toFloat(t))}equals(e){var t=!1;return null!=e&&(t=this.lon===e.lon&&this.lat===e.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(e.lon)&&isNaN(e.lat)),t}wrapDateLine(e){var t=this.clone();if(e){for(;t.lon<e.left;)t.lon+=e.getWidth();for(;t.lon>e.right;)t.lon-=e.getWidth()}return t}destroy(){this.lon=null,this.lat=null}static fromString(e){var t=e.split(",");return new Q(t[0],t[1])}static fromArray(e){var t=X.isArray(e),s=t&&e[0],r=t&&e[1];return new Q(s,r)}}
  37. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  38. * This program are made available under the terms of the Apache License, Version 2.0
  39. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  40. class K{constructor(e,t,s,r){X.isArray(e)&&(r=e[3],s=e[2],t=e[1],e=e[0]),this.left=null!=e?X.toFloat(e):this.left,this.bottom=null!=t?X.toFloat(t):this.bottom,this.right=null!=s?X.toFloat(s):this.right,this.top=null!=r?X.toFloat(r):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new K(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var s=Math.pow(10,e),r=Math.round(this.left*s)/s,i=Math.round(this.bottom*s)/s,a=Math.round(this.right*s)/s,n=Math.round(this.top*s)/s;return!0===t?i+","+r+","+n+","+a:r+","+i+","+a+","+n}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new J(this.getWidth(),this.getHeight())}getCenterPixel(){return new z((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new Q((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var s,r;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(s=t.lon,r=t.lat):(s=t.x,r=t.y);var i=(this.left-s)*e+s,a=(this.bottom-r)*e+r,n=(this.right-s)*e+s,o=(this.top-r)*e+r;return new K(i,a,n,o)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new K(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new K(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new K(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var s=this.contains(e.lon,e.lat,t.inclusive),r=t.worldBounds;if(r&&!s){var i=r.getWidth(),a=(r.left+r.right)/2,n=Math.round((e.lon-a)/i);s=this.containsLonLat({lon:e.lon-n*i,lat:e.lat},{inclusive:t.inclusive})}return s}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,s){if(null==s&&(s=!0),null==e||null==t)return!1;return s?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var s=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else s=this;null==t.inclusive&&(t.inclusive=!0);var r=!1,i=s.left===e.right||s.right===e.left||s.top===e.bottom||s.bottom===e.top;if(t.inclusive||!i){var a=e.bottom>=s.bottom&&e.bottom<=s.top||s.bottom>=e.bottom&&s.bottom<=e.top,n=e.top>=s.bottom&&e.top<=s.top||s.top>e.bottom&&s.top<e.top,o=e.left>=s.left&&e.left<=s.right||s.left>=e.left&&s.left<=e.right,l=e.right>=s.left&&e.right<=s.right||s.right>=e.left&&s.right<=e.right;r=(a||n)&&(o||l)}if(t.worldBounds&&!r){var h=t.worldBounds,u=h.getWidth(),c=!h.containsBounds(s),d=!h.containsBounds(e);c&&!d?(e=e.add(-u,0),r=s.intersectsBounds(e,{inclusive:t.inclusive})):d&&!c&&(s=s.add(-u,0),r=e.intersectsBounds(s,{inclusive:t.inclusive}))}return r}containsBounds(e,t,s){null==t&&(t=!1),null==s&&(s=!0);var r=this.contains(e.left,e.bottom,s),i=this.contains(e.right,e.bottom,s),a=this.contains(e.left,e.top,s),n=this.contains(e.right,e.top,s);return t?r||i||a||n:r&&i&&a&&n}determineQuadrant(e){var t="",s=this.getCenterLonLat();return t+=e.lat<s.lat?"b":"t",t+=e.lon<s.lon?"l":"r"}wrapDateLine(e,t){var s=(t=t||{}).leftTolerance||0,r=t.rightTolerance||0,i=this.clone();if(e){for(var a=e.getWidth();i.left<e.left&&i.right-r<=e.left;)i=i.add(a,0);for(;i.left+s>=e.right&&i.right>e.right;)i=i.add(-a,0);var n=i.left+s;n<e.right&&n>e.left&&i.right-r>e.right&&(i=i.add(-a,0))}return i}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var s=e.split(",");return K.fromArray(s,t)}static fromArray(e,t){return!0===t?new K(e[1],e[0],e[3],e[2]):new K(e[0],e[1],e[2],e[3])}static fromSize(e){return new K(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}i.Bounds=K;
  41. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  42. * This program are made available under the terms of the Apache License, Version 2.0
  43. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  44. class Z{constructor(){this.CLASS_NAME="SuperMap.Geometry",this.id=X.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new Z}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}i.Geometry=Z;
  45. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  46. * This program are made available under the terms of the Apache License, Version 2.0
  47. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  48. class $ extends Z{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new $,t=0,s=this.components.length;t<s;t++)e.addComponent(this.components[t].clone());return X.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,s=this.components.length;t<s;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new K,t=this.components;if(t)for(var s=0,r=t.length;s<r;s++)e.extend(t[s].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){X.isArray(e)||(e=[e]);for(var t=0,s=e.length;t<s;t++)this.addComponent(e[t])}addComponent(e,t){var s=!1;if(e&&(null==this.componentTypes||X.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var r=this.components.slice(0,t),i=this.components.slice(t,this.components.length);r.push(e),this.components=r.concat(i)}else this.components.push(e);e.parent=this,this.clearBounds(),s=!0}return s}removeComponents(e){var t=!1;X.isArray(e)||(e=[e]);for(var s=e.length-1;s>=0;--s)t=this.removeComponent(e[s])||t;return t}removeComponent(e){return X.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,s=this.components.length;t<s;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(X.isArray(e.components)&&e.components.length===this.components.length){for(var s=0,r=this.components.length;s<r;++s)if(!this.components[s].equals(e.components[s])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],s=0,r=this.components.length;s<r;++s)Array.prototype.push.apply(t,this.components[s].getVertices(e));return t}}i.Geometry.Collection=$;
  49. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  50. * This program are made available under the terms of the Apache License, Version 2.0
  51. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  52. class ee extends ${constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}i.Geometry.MultiPoint=ee;
  53. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  54. * This program are made available under the terms of the Apache License, Version 2.0
  55. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  56. class te extends ee{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}i.Geometry.Curve=te;
  57. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  58. * This program are made available under the terms of the Apache License, Version 2.0
  59. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  60. class se extends Z{constructor(e,t,s,r){super(e,t,s,r),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=r||0==r?parseFloat(r):null,this.type=s||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new se(this.x,this.y)),X.applyDefaults(e,this),e}calculateBounds(){this.bounds=new K(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(e){return[this]}}i.Geometry.Point=se;
  61. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  62. * This program are made available under the terms of the Apache License, Version 2.0
  63. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  64. class re extends te{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&super.removeComponent.apply(this,arguments),t}getSortedSegments(){for(var e,t,s=this.components.length-1,r=new Array(s),i=0;i<s;++i)e=this.components[i],t=this.components[i+1],e.x<t.x?r[i]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:r[i]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return r.sort(function(e,t){return e.x1-t.x1})}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}static calculateCircle(e){if(e.length<3)return e;var t={},s=e[0],r=e[1],i=e[2],a=0,n=0,o=!0,l=0,h=0,u=0,c=[],d=(i.y-s.y)/(i.x-s.x),p=i.y-d*i.x;if(i.x!=s.x&&i.y!=s.y&&r.y==d*r.x+p||i.x==s.x&&r.x==s.x||i.y==s.y&&r.y==s.y||i.x==s.x&&i.y==s.y||i.x==r.x&&i.y==r.y||s.x==r.x&&s.y==r.y)c.push(s),c.push(r),c.push(i);else{var m=(r.x*r.x+r.y*r.y-(s.x*s.x+s.y*s.y))*(2*(i.y-s.y))-(i.x*i.x+i.y*i.y-(s.x*s.x+s.y*s.y))*(2*(r.y-s.y)),f=2*(r.x-s.x)*(i.x*i.x+i.y*i.y-(s.x*s.x+s.y*s.y))-2*(i.x-s.x)*(r.x*r.x+r.y*r.y-(s.x*s.x+s.y*s.y)),y=4*((r.x-s.x)*(i.y-s.y)-(i.x-s.x)*(r.y-s.y));t.x=m/y,t.y=f/y;var g=(2*(a=Math.sqrt((s.x-t.x)*(s.x-t.x)+(s.y-t.y)*(s.y-t.y)))*a-((s.x-i.x)*(s.x-i.x)+(s.y-i.y)*(s.y-i.y)))/(2*a*a);g=(g=g>=1?1:g)<=-1?-1:g,u=180*Math.acos(g)/Math.PI,n=(u=i.x==s.x?t.x>s.x&&r.x>s.x||t.x<s.x&&r.x<s.x?360-u:u:t.y>d*t.x+p&&r.y>d*r.x+p||t.y<d*t.x+p&&r.y<d*r.x+p?360-u:u)/72,i.y!=s.y?i.x==s.x?i.y>s.y?r.x<s.x&&(o=!1):r.x>s.x&&(o=!1):i.x<s.x?r.y<d*r.x+p&&(o=!1):r.y>d*r.x+p&&(o=!1):i.x>s.x?r.y>s.y&&(o=!1):r.y<s.y&&(o=!1);var v=(s.y-t.y)/(s.x-t.x),S=v>=0?180*Math.atan(v)/Math.PI:Math.abs(180*Math.atan(v)/Math.PI)+90,b=Math.abs(t.y);s.y==b&&b==i.y&&s.x<i.x&&(S+=180);var x=s.y-t.y;c.push(s);for(var C=1;C<72;C++){l=n*C,h=S,o?x>=0?v>=0?h+=l:h=180-(h-90)+l:h=v>0?h-180+l:90-h+l:x>=0?v>=0?h-=l:h=180-(h-90)-l:h=v>=0?h-180-l:90-h-l,h=h*Math.PI/180;var _=t.x+a*Math.cos(h),T=t.y+a*Math.sin(h);c.push(new se(_,T))}c.push(i)}return c}static createLineEPS(e){var t=[],s=e.length;if(s<2)return e;for(var r=0;r<s;){if("LTypeArc"==e[r].type){var i=re.createLineArc(t,r,s,e);t=i[0],r=i[1]}else t.push(e[r]),r++}return t}static createLineArc(e,t,s,r){if(0==t){let i=re.addPointEPS(r,t,s,"LTypeArc");Array.prototype.push.apply(e,i[0]),t=i[1]+1}else if(t==s-1){var i=[r[t-1],r[t]],a=re.calculateCircle(i);Array.prototype.push.apply(e,a),t++}else{let i=re.addPointEPS(r,t,s,"LTypeArc");e.pop(),Array.prototype.push.apply(e,i[0]),t=i[1]+1}return[e,t]}static addPointEPS(e,t,s,r){var i,a=[],n=t+1;return 0==t?Array.prototype.push.apply(a,[e[t],e[t+1]]):t==s-1?Array.prototype.push.apply(a,[e[t-1],e[t]]):Array.prototype.push.apply(a,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==r?i=re.calculatePointsFBZN(a):"LTypeArc"==r&&(i=re.calculateCircle(a)),[i,n]}}i.Geometry.LineString=re;
  65. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  66. * This program are made available under the terms of the Apache License, Version 2.0
  67. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  68. class ie extends Z{constructor(e,t,s){super(e,t,s),this.x=parseFloat(e),this.y=parseFloat(t),this.text=s.toString(),this.bsInfo={h:null,w:null},this.element=document.createElement("span"),this.CLASS_NAME="SuperMap.Geometry.GeoText",this.geometryType="GeoText"}destroy(){super.destroy(),this.x=null,this.y=null,this.text=null}getCentroid(){return new se(this.x,this.y)}clone(e){return null==e&&(e=new ie(this.x,this.y,this.text)),X.applyDefaults(e,this),e}calculateBounds(){this.bounds=new K(this.x,this.y,this.x,this.y)}getLabelPxBoundsByLabel(e,t,s,r){var i,a,n,o,l=X.cloneObject(e),h=(r.label||this.text).split("\n").length;if(t=parseFloat(t),s=parseFloat(s),h>1&&(s=parseFloat(s)*h),r.labelAlign&&"cm"!==r.labelAlign)switch(r.labelAlign){case"lt":l.x+=t/2,l.y+=s/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=s/2;break;case"ct":l.y+=s/2;break;case"cb":l.y-=s/2;break;case"rt":l.x-=t/2,l.y+=s/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=s/2}return this.bsInfo.h=s,this.bsInfo.w=t,i=l.x-parseFloat(t)/2,a=l.y+parseFloat(s)/2,o=l.x+parseFloat(t)/2,n=l.y-parseFloat(s)/2,new K(i,a,o,n)}getLabelPxBoundsByText(e,t){var s,r,i,a,n=this.getLabelPxSize(t),o=X.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":o.x+=n.w/2,o.y+=n.h/2;break;case"lm":o.x+=n.w/2;break;case"lb":o.x+=n.w/2,o.y-=n.h/2;break;case"ct":o.y+=n.h/2;break;case"cb":o.y-=n.h/2;break;case"rt":o.x-=n.w/2,o.y+=n.h/2;break;case"rm":o.x-=n.w/2;break;case"rb":o.x-=n.w/2,o.y-=n.h/2}return this.bsInfo.h=n.h,this.bsInfo.w=n.w,s=o.x-n.w/2,r=o.y+n.h/2,a=t.fontStyle&&"italic"===t.fontStyle?o.x+n.w/2+parseInt(parseFloat(t.fontSize)/2):o.x+n.w/2,i=o.y-n.h/2,new K(s,r,a,i)}getLabelPxSize(e){var t,s,r,i,a=parseFloat(e.strokeWidth);t=e.label||this.text,s=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var n=t.split("\n"),o=n.length;i=o>1?s*o+o+a+.2*s:s+a+.2*s+1,r=0,this.labelWTmp&&r<this.labelWTmp&&(r=this.labelWTmp);for(var l=0;l<o;l++){var h=this.getTextCount(n[l]),u=this.labelWTmp=X.getTextBounds(e,n[l],this.element).textWidth+1*h.textC+a;r<u&&(r=u)}var c=new Object;return c.h=i,c.w=r,c}getTextCount(e){for(var t={},s=0,r=0,i=0;i<e.length;i++)e.charCodeAt(i)>255?s++:r++;return t.cnC=s,t.enC=r,t.textC=e.length,t}}i.Geometry.GeoText=ie;
  69. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  70. * This program are made available under the terms of the Apache License, Version 2.0
  71. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  72. class ae extends re{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var s=!1,r=this.components.pop();null==t&&e.equals(r)||(s=super.addComponent.apply(this,arguments));var i=this.components[0];return super.addComponent.apply(this,[i]),s}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),super.removeComponent.apply(this,arguments);var s=this.components[0];super.addComponent.apply(this,[s])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,s=0,r=this.components.length;s<r-1;s++){var i=this.components[s],a=this.components[s+1];t+=(i.x+a.x)*(a.y-i.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}i.Geometry.LinearRing=ae;
  73. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  74. * This program are made available under the terms of the Apache License, Version 2.0
  75. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  76. class ne extends ${constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}i.Geometry.MultiLineString=ne;
  77. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  78. * This program are made available under the terms of the Apache License, Version 2.0
  79. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  80. class oe extends ${constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}i.Geometry.MultiPolygon=oe;
  81. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  82. * This program are made available under the terms of the Apache License, Version 2.0
  83. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  84. class le extends ${constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,s=this.components.length;t<s;t++)e-=Math.abs(this.components[t].getArea())}return e}}i.Geometry.Polygon=le;
  85. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  86. * This program are made available under the terms of the Apache License, Version 2.0
  87. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  88. class he extends Z{constructor(e,t,s,r){super(e,t,s,r),this.x=e,this.y=t,this.width=s,this.height=r,this.CLASS_NAME="SuperMap.Geometry.Rectangle",this.geometryType="Rectangle"}calculateBounds(){this.bounds=new K(this.x,this.y,this.x+this.width,this.y+this.height)}getArea(){return this.width*this.height}}i.Geometry.Rectangle=he;
  89. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  90. * This program are made available under the terms of the Apache License, Version 2.0
  91. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  92. class ue{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.Credential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}ue.CREDENTIAL=null,i.Credential=ue;
  93. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  94. * This program are made available under the terms of the Apache License, Version 2.0
  95. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  96. i.Date={toISOString:function(){if("toISOString"in Date.prototype)return function(e){return e.toISOString()};{function e(e,t){for(var s=e+"";s.length<t;)s="0"+s;return s}return function(t){return isNaN(t.getTime())?"Invalid Date":t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1,2)+"-"+e(t.getUTCDate(),2)+"T"+e(t.getUTCHours(),2)+":"+e(t.getUTCMinutes(),2)+":"+e(t.getUTCSeconds(),2)+"."+e(t.getUTCMilliseconds(),3)+"Z"}}}(),parse:function(e){var t,s=e.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/);if(s&&(s[1]||s[7])){var r=parseInt(s[1],10)||0,i=parseInt(s[2],10)-1||0,a=parseInt(s[3],10)||1;t=new Date(Date.UTC(r,i,a));var n=s[7];if(n){var o=parseInt(s[4],10),l=parseInt(s[5],10),h=parseFloat(s[6]),u=0|h,c=Math.round(1e3*(h-u));if(t.setUTCHours(o,l,u,c),"Z"!==n){var d=-1e3*(60*parseInt(n,10)*60+60*(parseInt(s[8],10)||0));t=new Date(t.getTime()+d)}}}else t=new Date("invalid");return t}};var ce=i.Event={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var s=i.Event.element(e);s.parentNode&&(!s.tagName||s.tagName.toUpperCase()!=t.toUpperCase());)s=s.parentNode;return s},observe:function(e,t,s,r){var i=X.getElement(e);if(r=r||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!i._eventCacheID){var a="eventCacheID_";i.id&&(a=i.id+"_"+a),i._eventCacheID=X.createUniqueID(a)}var n=i._eventCacheID;this.observers[n]||(this.observers[n]=[]),this.observers[n].push({element:i,name:t,observer:s,useCapture:r}),i.addEventListener?"mousewheel"===t?i.addEventListener(t,s,{useCapture:r,passive:!1}):i.addEventListener(t,s,r):i.attachEvent&&i.attachEvent("on"+t,s)},stopObservingElement:function(e){var t=X.getElement(e)._eventCacheID;this._removeElementObservers(i.Event.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var s=e[t],r=new Array(s.element,s.name,s.observer,s.useCapture);i.Event.stopObserving.apply(this,r)}},stopObserving:function(e,t,s,r){r=r||!1;var a=X.getElement(e),n=a._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.detachEvent)&&(t="keydown");var o=!1,l=i.Event.observers[n];if(l)for(var h=0;!o&&h<l.length;){var u=l[h];if(u.name===t&&u.observer===s&&u.useCapture===r){l.splice(h,1),0==l.length&&delete i.Event.observers[n],o=!0;break}h++}return o&&(a.removeEventListener?a.removeEventListener(t,s,r):a&&a.detachEvent&&a.detachEvent("on"+t,s)),o},unloadCache:function(){if(i.Event&&i.Event.observers){for(var e in i.Event.observers){var t=i.Event.observers[e];i.Event._removeElementObservers.apply(this,[t])}i.Event.observers=!1}},CLASS_NAME:"SuperMap.Event"};i.Event=ce,i.Event.observe(window,"unload",i.Event.unloadCache,!1);
  97. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  98. * This program are made available under the terms of the Apache License, Version 2.0
  99. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  100. class de{constructor(e,t,s,r,i){if(this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=r,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,X.extend(this,i),null!=s)for(var a=0,n=s.length;a<n;a++)this.addEventType(s[a]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(ce.stopObservingElement(this.element),this.element.hasScrollEvent&&ce.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?ce.stopObservingElement(this.element):(this.eventHandler=Y.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=Y.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,s=this.BROWSER_EVENTS.length;t<s;t++){var r=this.BROWSER_EVENTS[t];this.addEventType(r),ce.observe(e,r,this.eventHandler)}ce.observe(e,"dragstart",ce.stop)}on(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.register(t,e.scope,e[t])}register(e,t,s,r){if(e in de&&!this.extensions[e]&&(this.extensions[e]=new de[e](this)),null!=s&&-1!==X.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var i=this.listeners[e];i||(i=[],this.listeners[e]=i,this.extensionCount[e]=0);var a={obj:t,func:s};r?(i.splice(this.extensionCount[e],0,a),"object"==typeof r&&r.extension&&this.extensionCount[e]++):i.push(a)}}registerPriority(e,t,s){this.register(e,t,s,!0)}un(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.unregister(t,e.scope,e[t])}unregister(e,t,s){null==t&&(t=this.object);var r=this.listeners[e];if(null!=r)for(var i=0,a=r.length;i<a;i++)if(r[i].obj===t&&r[i].func===s){r.splice(i,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var s=this.listeners[e];if(s&&0!=s.length){var r;null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var i=0,a=(s=s.slice()).length;i<a;i++){var n=s[i];if(void 0!=(r=n.func.apply(n.obj,[t]))&&!1===r)break}return this.fallThrough||ce.stop(t,!0),r}}handleBrowserEvent(e){var t=e.type,s=this.listeners[t];if(s&&0!=s.length){var r=e.touches;if(r&&r[0]){for(var i,a=0,n=0,o=r.length,l=0;l<o;++l)a+=(i=r[l]).clientX,n+=i.clientY;e.clientX=a/o,e.clientY=n/o}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(ce.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=X.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=X.pagePosition(this.element)),new z(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}}i.Events=de,i.Events.prototype.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"];
  101. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  102. * This program are made available under the terms of the Apache License, Version 2.0
  103. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  104. class pe{constructor(e,t,s){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=X.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=null!=s?s:{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}i.Feature=pe;
  105. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  106. * This program are made available under the terms of the Apache License, Version 2.0
  107. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  108. class me extends pe{constructor(e,t,s){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=X.extend(this.attributes,t)),this.bounds=null,this.state=null,this.style=s||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",i.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"},me.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,super.destroy()}clone(){return new me(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===i.State.UPDATE)switch(this.state){case i.State.UNKNOWN:case i.State.DELETE:this.state=e;break;case i.State.UPDATE:case i.State.INSERT:}else if(e===i.State.INSERT)switch(this.state){case i.State.UNKNOWN:break;default:this.state=e}else if(e===i.State.DELETE)switch(this.state){case i.State.INSERT:case i.State.DELETE:break;case i.State.UNKNOWN:case i.State.UPDATE:this.state=e}else e===i.State.UNKNOWN&&(this.state=e)}}i.Feature.Vector=me;
  109. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  110. * This program are made available under the terms of the Apache License, Version 2.0
  111. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  112. class fe{constructor(e){this.data=null,this.keepData=!1,X.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}i.Format=i.Format||fe;
  113. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  114. * This program are made available under the terms of the Apache License, Version 2.0
  115. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  116. class ye extends fe{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t,s,r,i=["{"];this.level+=1;var a=!1;for(t in e)e.hasOwnProperty(t)&&(s=this.write.apply(this,[t,this.pretty]),r=this.write.apply(this,[e[t],this.pretty]),null!=s&&null!=r&&(a&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),s,":",this.writeSpace(),r),a=!0));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"}"),i.join("")},array:function(e){var t,s=["["];this.level+=1;for(var r=0,i=e.length;r<i;++r)null!=(t=this.write.apply(this,[e[r],this.pretty]))&&(r>0&&s.push(","),s.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,s.push(this.writeNewline(),this.writeIndent(),"]"),s.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,s){var r=t[s];return r||(r=s.charCodeAt(),"\\u00"+Math.floor(r/16).toString(16)+(r%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var s;if(this.nativeJSON)try{s=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=s),s}write(e,t){this.pretty=!!t;var s=null,r=typeof e;if(this.serialize[r])try{s=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[r].apply(this,[e])}catch(e){}return s}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}i.Format.JSON=ye;
  117. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  118. * This program are made available under the terms of the Apache License, Version 2.0
  119. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  120. class ge{constructor(e,t,s){this.red=e||0==e?e:255,this.green=t||0,this.blue=s||0,this.CLASS_NAME="SuperMap.ServerColor"}destroy(){this.red=null,this.green=null,this.blue=null}static fromJson(e){if(e){var t=new ge,s=255;null!==e.red&&(s=Number(e.red)),t.red=s;var r=0;null!==e.green&&(r=Number(e.green)),t.green=r;var i=0;return null!==e.blue&&(i=Number(e.blue)),t.blue=i,t}}}i.ServerColor=ge;
  121. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  122. * This program are made available under the terms of the Apache License, Version 2.0
  123. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  124. class ve{constructor(e){this.fillBackColor=new ge(255,255,255),this.fillBackOpaque=!1,this.fillForeColor=new ge(255,0,0),this.fillGradientMode=null,this.fillGradientAngle=0,this.fillGradientOffsetRatioX=0,this.fillGradientOffsetRatioY=0,this.fillOpaqueRate=100,this.fillSymbolID=0,this.lineColor=new ge(0,0,0),this.lineSymbolID=0,this.lineWidth=1,this.markerAngle=0,this.markerSize=1,this.markerSymbolID=-1,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ServerStyle"}destroy(){var e=this;e.fillBackColor&&(e.fillBackColor.destroy(),e.fillBackColor=null),e.fillBackOpaque=null,e.fillForeColor&&(e.fillForeColor.destroy(),e.fillForeColor=null),e.fillGradientMode=null,e.fillGradientAngle=null,e.fillGradientOffsetRatioX=null,e.fillGradientOffsetRatioY=null,e.fillOpaqueRate=null,e.fillSymbolID=null,e.lineColor&&(e.lineColor.destroy(),e.lineColor=null),e.lineSymbolID=null,e.lineWidth=null,e.markerAngle=null,e.markerSize=null,e.markerSymbolID=null}toServerJSONObject(){var e={};return e=X.copyAttributes(e,this)}static fromJson(e){if(e)return new ve({fillBackColor:ge.fromJson(e.fillBackColor),fillBackOpaque:e.fillBackOpaque,fillForeColor:ge.fromJson(e.fillForeColor),fillGradientMode:e.fillGradientMode,fillGradientAngle:e.fillGradientAngle,fillGradientOffsetRatioX:e.fillGradientOffsetRatioX,fillGradientOffsetRatioY:e.fillGradientOffsetRatioY,fillOpaqueRate:e.fillOpaqueRate,fillSymbolID:e.fillSymbolID,lineColor:ge.fromJson(e.lineColor),lineSymbolID:e.lineSymbolID,lineWidth:e.lineWidth,markerAngle:e.markerAngle,markerSize:e.markerSize,markerSymbolID:e.markerSymbolID})}}i.ServerStyle=ve;
  125. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  126. * This program are made available under the terms of the Apache License, Version 2.0
  127. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  128. class Se extends se{constructor(e){super(e),this.measure=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var s=this.x===e.x&&this.y===e.y&&this.measure===e.measure,r=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),i=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=s||r&&i}return t}toJson(){var e="{";return null!=this.measure&&void 0!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){this.measure=null,this.x=null,this.y=null}static fromJson(e){if(e)return new Se({x:e.x,y:e.y,measure:e.measure})}}i.PointWithMeasure=Se;
  129. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  130. * This program are made available under the terms of the Apache License, Version 2.0
  131. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  132. class be extends ${constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],t&&X.extend(this,t),this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}toJson(){var e="{";if(null!=this.id&&void 0!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&void 0!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&void 0!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&void 0!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&void 0!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&void 0!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&void 0!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&void 0!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var s=0,r=this.components.length;s<r;s++)for(var i=0,a=this.components[s].components.length;i<a;i++)e+=this.components[s].components[i].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],s=e.points||[],r=t.length,i=[];if(!(r>0))return null;for(var a=0,n=0,o=[];a<r;a++){for(var l=0;l<t[a];l++)o.push(Se.fromJson(s[n+l]));n+=t[a],o[0].equals(o[t[a]-1])?i.push(new ae(o)):i.push(new re(o)),o=[]}return new be(i,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}i.Route=be;
  133. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  134. * This program are made available under the terms of the Apache License, Version 2.0
  135. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  136. class xe{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case o.POINT:return e.toGeoPoint();case o.LINE:return e.toGeoLine();case o.LINEM:return e.toGeoLinem();case o.REGION:return e.toGeoRegion();case o.POINTEPS:return e.toGeoPoint();case o.LINEEPS:return e.toGeoLineEPS();case o.REGIONEPS:return e.toGeoRegionEPS();case o.GEOCOMPOUND:return e.transformGeoCompound()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],s=e.length;if(s>0){if(1===s)return new se(t[0].x,t[0].y);var r=[];for(let e=0;e<s;e++)r.push(new se(t[e].x,t[e].y));return new ee(r)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],s=e.length;if(s>0){if(1===s){let s=[];for(let r=0;r<e[0];r++)s.push(new se(t[r].x,t[r].y));return s[0].equals(s[e[0]-1])?new ae(s):new re(s)}{let r=[];for(let i=0;i<s;i++){let s=[];for(let r=0;r<e[i];r++)s.push(new se(t[r].x,t[r].y));r.push(new re(s)),t.splice(0,e[i])}return new ne(r)}}return null}toGeoLineEPS(){var e,t,s,r,i,a=this.parts||[],n=this.points||[],o=a.length;if(o>0){if(1===o){for(e=0,s=[];e<a[0];e++)s.push(new se(n[e].x,n[e].y,n[e].type));return s[0].equals(s[a[0]-1])?(i=re.createLineEPS(s),new ae(i)):(i=re.createLineEPS(s),new re(i))}for(e=0,r=[];e<o;e++){for(t=0,s=[];t<a[e];t++)s.push(new se(n[t].x,n[t].y));i=re.createLineEPS(s),r.push(new re(i)),n.splice(0,a[e])}return new ne(r)}return null}toGeoLinem(){return be.fromJson(this)}toGeoRegion(){var e=this.parts||[],t=this.partTopo||[],s=this.points||[],r=e.length;if(r<=0)return null;var i=[],a=[];if(1==r){for(let e=0;e<s.length;e++)a.push(new se(s[e].x,s[e].y));return i.push(new le([new ae(a)])),new oe(i)}var n=[],o=[],l=[],h=[],u=[];for(let i=0,n=0;i<r;i++){for(let t=0;t<e[i];t++)a.push(new se(s[n+t].x,s[n+t].y));n+=e[i];var c=new le([new ae(a)]);a=[],l.push(c),0===t.length&&h.push(c.getBounds()),u.push(1),o.push(c.getArea())}if(xe.bubbleSort(o,l,t,h),0===t.length){var d=[];for(let e=1;e<l.length;e++)for(let t=e-1;t>=0;t--)if(d[e]=-1,h[t].containsBounds(h[e])){u[e]=-1*u[t],u[e]<0&&(d[e]=t);break}for(let e=0;e<l.length;e++)u[e]>0?i.push(l[e]):(i[d[e]].components=i[d[e]].components.concat(l[e].components),i.push(""))}else{i=new Array;for(let e=0;e<l.length;e++)if(t[e]&&-1==t[e]?n=n.concat(l[e].components):(n.length>0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(n),n=[]),i.push(l[e])),e==r-1){var p=i.length;if(p)i[p-1].components=i[p-1].components.concat(n);else for(let e=0,t=n.length;e<t;e++)i.push(new le(n))}}return new oe(i)}toGeoRegionEPS(){var e=this.parts||[],t=this.partTopo||[],s=this.points||[],r=e.length;if(r<=0)return null;var i,a=[],n=[];if(1==r){for(var o=0;o<s.length;o++)n.push(new se(s[o].x,s[o].y));return i=re.createLineEPS(n),a.push(new le([new ae(i)])),new oe(a)}var l=[],h=[],u=[],c=[],d=[];for(let a=0,o=0;a<r;a++){for(let t=0;t<e[a];t++)n.push(new se(s[o+t].x,s[o+t].y));o+=e[a],i=re.createLineEPS(n);var p=new le([new ae(i)]);n=[],u.push(p),0===t.length&&c.push(p.getBounds()),d.push(1),h.push(p.getArea())}if(xe.bubbleSort(h,u,t,c),0===t.length){var m=[];for(let e=1;e<u.length;e++)for(let t=e-1;t>=0;t--)if(m[e]=-1,c[t].containsBounds(c[e])){d[e]=-1*d[t],d[e]<0&&(m[e]=t);break}for(let e=0;e<u.length;e++)d[e]>0?a.push(u[e]):(a[m[e]].components=a[m[e]].components.concat(u[e].components),a.push(""))}else{a=new Array;for(let e=0;e<u.length;e++)if(t[e]&&-1==t[e]?l=l.concat(u[e].components):(l.length>0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(l),l=[]),a.push(u[e])),e==r-1){var f=a.length;if(f)a[f-1].components=a[f-1].components.concat(l);else for(let e=0,t=l.length;e<t;e++)a.push(new le(l))}}return new oe(a)}transformGeoCompound(){const e=this.geoParts||[],t=e.length;if(t<=0)return null;const s=[];for(let r=0;r<t;r++){const t=e[r];s.push(new xe(t).toGeometry())}return new $(s)}static fromJson(e){if(e)return new xe({id:e.id,style:ve.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}static fromGeometry(e){if(e){var t=0,s=[],r=[],i=null,a=e.components,n=e.CLASS_NAME,l={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=n&&"SuperMap.Geometry.LineString"!=n&&(e instanceof ee||e instanceof ne)){let e=a.length;for(let t=0;t<e;t++){let e=a[t].getVertices().length;s.push(e);for(let s=0;s<e;s++)r.push(new se(a[t].getVertices()[s].x,a[t].getVertices()[s].y))}i="SuperMap.Geometry.MultiPoint"==n?o.POINT:o.LINE}else if(e instanceof oe){let e=a.length;for(let t=0;t<e;t++){let e=a[t].components,i=e.length;for(let t=0;t<i;t++){let i=e[t].getVertices().length+1;s.push(i);for(let s=0;s<i-1;s++)r.push(new se(e[t].getVertices()[s].x,e[t].getVertices()[s].y));r.push(new se(e[t].getVertices()[0].x,e[t].getVertices()[0].y))}}i=o.REGION}else if(e instanceof le){let e=a.length;for(let t=0;t<e;t++){let e=a[t].getVertices().length+1;s.push(e);for(let s=0;s<e-1;s++)r.push(new se(a[t].getVertices()[s].x,a[t].getVertices()[s].y));r.push(new se(a[t].getVertices()[0].x,a[t].getVertices()[0].y))}i=o.REGION}else{let t=e.getVertices().length;for(let s=0;s<t;s++)r.push(new se(e.getVertices()[s].x,e.getVertices()[s].y));e instanceof ae&&(r.push(new se(e.getVertices()[0].x,e.getVertices()[0].y)),t++),s.push(t),i=e instanceof se?o.POINT:o.LINE}return new xe({id:t,style:null,parts:s,points:r,type:i,prjCoordSys:l})}}static IsClockWise(e){var t=e.length;if(t<3)return 0;var s=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var r=1;r<t;r++)s+=e[r].y*(e[r-1].x-e[r+1].x);return.5*s}static bubbleSort(e,t,s,r){for(var i=0;i<e.length;i++)for(var a=0;a<e.length;a++)if(e[i]>e[a]){var n=e[a];e[a]=e[i],e[i]=n;var o=t[a];if(t[a]=t[i],t[i]=o,s&&s.length>0){var l=s[a];s[a]=s[i],s[i]=l}if(r&&r.length>0){var h=r[a];r[a]=r[i],r[i]=h}}}}i.ServerGeometry=xe;
  137. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  138. * This program are made available under the terms of the Apache License, Version 2.0
  139. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  140. class Ce extends ye{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new se(e[0],e[1])},multipoint:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.point.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new ee(t)},linestring:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.point.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new re(t)},multilinestring:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new ne(t)},polygon:function(e){for(var t,s,r=[],i=0,a=e.length;i<a;++i){try{s=this.parseCoords.linestring.apply(this,[e[i]])}catch(e){throw e}t=new ae(s.components),r.push(t)}return new le(r)},multipolygon:function(e){for(var t=[],s=null,r=0,i=e.length;r<i;++r){try{s=this.parseCoords.polygon.apply(this,[e[r]])}catch(e){throw e}t.push(s)}return new oe(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new le([new ae([new se(e[0][0],e[0][1]),new se(e[1][0],e[0][1]),new se(e[1][0],e[1][1]),new se(e[0][0],e[1][1]),new se(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),s={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(s.properties.texts=e.geometry.texts,s.properties.textStyle=e.geometry.textStyle),e.fid&&(s.id=e.fid),e.ID&&(s.id=e.ID),s},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,s=e.hasOwnProperty("geometryType")?e:new xe(e).toGeometry()||e,r=s.geometryType||s.type;return"LinearRing"===r&&(r="LineString"),"LINEM"===r&&(r="MultiLineString"),t=this.extract[r.toLowerCase()].apply(this,[s]),"Collection"===(r="TEXT"===r?"Point":r)?{type:"GeometryCollection",geometries:t}:{type:r,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var s in e)"x"===s||"y"===s||null===e[s]||isNaN(e[s])||t.push(e[s]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t},linestring:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t},multilinestring:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.linestring.apply(this,[e.components[s]]));return t},polygon:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.linestring.apply(this,[e.components[s]]));return t},multipolygon:function(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.polygon.apply(this,[e.components[s]]));return t},collection:function(e){for(var t=e.components.length,s=new Array(t),r=0;r<t;++r)s[r]=this.extract.geometry.apply(this,[e.components[r]]);return s}}}read(e,t,s){t=t||"FeatureCollection";var r=null,i=null;if(i="string"==typeof e?super.read(e,s):e){if("string"!=typeof i.type);else if(this.isValidType(i,t))switch(t){case"Geometry":try{r=this.parseGeometry(i)}catch(e){}break;case"Feature":try{(r=this.parseFeature(i)).type="Feature"}catch(e){}break;case"FeatureCollection":switch(r=[],i.type){case"Feature":try{r.push(this.parseFeature(i))}catch(e){r=null}break;case"FeatureCollection":for(var a=0,n=i.features.length;a<n;++a)try{r.push(this.parseFeature(i.features[a]))}catch(e){r=null}break;default:try{var o=this.parseGeometry(i);r.push(new me(o))}catch(e){r=null}}}}else;return r}write(e,t){return super.write(this.toGeoJSON(e),t)}fromGeoJSON(e,t,s){let r=this.read(e,t,s);return X.isArray(r)?r.map(e=>this._toiSevrerFeature(e)):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(X.isArray(e)){t.type="FeatureCollection";var s=e.length;t.features=new Array(s);for(var r=0;r<s;++r){var i=e[r];if(a(i)){let e={};e.geometry=i,t.features[r]=this.extract.feature.apply(this,[e])}else t.features[r]=this.extract.feature.apply(this,[i])}}else if(a(e)){let s={};s.geometry=e,t=this.extract.feature.apply(this,[s])}else t=this.extract.feature.apply(this,[e]);function a(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")||e.hasOwnProperty("geoParts")}return t}isValidType(e,t){var s=!1;switch(t){case"Geometry":-1==X.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(s=!0);break;case"FeatureCollection":s=!0;break;default:e.type==t&&(s=!0)}return s}parseFeature(e){var t,s,r,i;r=e.properties?e.properties:{},i=e.geometry&&e.geometry.bbox||e.bbox;try{s=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new me(s,r),i&&(t.bounds=K.fromArray(i)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!X.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var s=e.geometries.length,r=new Array(s),i=0;i<s;++i)r[i]=this.parseGeometry.apply(this,[e.geometries[i]]);t=new $(r)}else{if(!X.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),s={};if(t.match(/epsg:/i)){var r=parseInt(t.substring(t.indexOf(":")+1));s=4326==r?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+r}}}return s}_toiSevrerFeature(e){const t=e.attributes,s=[],r=[];for(var i in t)s.push(i),r.push(t[i]);const a={fieldNames:s,fieldValues:r,geometry:xe.fromGeometry(e.geometry)};return a.geometry.id=e.fid,a}createAttributes(e){if(!e)return null;var t={};!function(e,t){if(!e.hasOwnProperty("fieldNames")||!e.hasOwnProperty("fieldValues"))return;var s=e.fieldNames,r=e.fieldValues;for(var i in s)t[s[i]]=r[i]}(e,t);var s=["fieldNames","fieldValues","geometry","stringID","ID"];for(var r in e)s.indexOf(r)>-1||(t[r]=e[r]);return t}}i.Format.GeoJSON=Ce;i.Format.WKT=
  141. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  142. * This program are made available under the terms of the Apache License, Version 2.0
  143. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  144. class extends fe{constructor(e){super(e),this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},this.CLASS_NAME="SuperMap.Format.WKT",this.extract={point:function(e){return e.x+" "+e.y},multipoint(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.point.apply(this,[e.components[s]])+")");return t.join(",")},linestring(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extract.point.apply(this,[e.components[s]]));return t.join(",")},multilinestring(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.linestring.apply(this,[e.components[s]])+")");return t.join(",")},polygon(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.linestring.apply(this,[e.components[s]])+")");return t.join(",")},multipolygon(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push("("+this.extract.polygon.apply(this,[e.components[s]])+")");return t.join(",")},collection(e){for(var t=[],s=0,r=e.components.length;s<r;++s)t.push(this.extractGeometry.apply(this,[e.components[s]]));return t.join(",")}},this.parse={point:function(e){var t=q.trim(e).split(this.regExes.spaces);return new me(new se(t[0],t[1]))},multipoint:function(e){for(var t,s=q.trim(e).split(","),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.point.apply(this,[t]).geometry);return new me(new ee(r))},linestring:function(e){for(var t=q.trim(e).split(","),s=[],r=0,i=t.length;r<i;++r)s.push(this.parse.point.apply(this,[t[r]]).geometry);return new me(new re(s))},multilinestring:function(e){for(var t,s=q.trim(e).split(this.regExes.parenComma),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.linestring.apply(this,[t]).geometry);return new me(new ne(r))},polygon:function(e){for(var t,s,r,i=q.trim(e).split(this.regExes.parenComma),a=[],n=0,o=i.length;n<o;++n)t=i[n].replace(this.regExes.trimParens,"$1"),s=this.parse.linestring.apply(this,[t]).geometry,r=new ae(s.components),a.push(r);return new me(new le(a))},multipolygon:function(e){for(var t,s=q.trim(e).split(this.regExes.doubleParenComma),r=[],i=0,a=s.length;i<a;++i)t=s[i].replace(this.regExes.trimParens,"$1"),r.push(this.parse.polygon.apply(this,[t]).geometry);return new me(new oe(r))},geometrycollection:function(e){e=e.replace(/,\s*([A-Za-z])/g,"|$1");for(var t=q.trim(e).split("|"),s=[],r=0,i=t.length;r<i;++r)s.push(this.read(t[r]));return s}}}read(e){var t,s,r;e=e.replace(/[\n\r]/g," ");var i=this.regExes.typeStr.exec(e);return i&&(s=i[1].toLowerCase(),r=i[2],this.parse[s]&&(t=this.parse[s].apply(this,[r]))),t}write(e){var t,s,r;e.constructor===Array?(t=e,r=!0):(t=[e],r=!1);var i=[];r&&i.push("GEOMETRYCOLLECTION(");for(var a=0,n=t.length;a<n;++a)r&&a>0&&i.push(","),s=t[a].geometry,i.push(this.extractGeometry(s));return r&&i.push(")"),i.join("")}extractGeometry(e){var t=e.CLASS_NAME.split(".")[2].toLowerCase();return this.extract[t]?("collection"===t?"GEOMETRYCOLLECTION":t.toUpperCase())+"("+this.extract[t].apply(this,[e])+")":null}};
  145. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  146. * This program are made available under the terms of the Apache License, Version 2.0
  147. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  148. class _e{constructor(e){var t=this;e=e||{},this.speed=e.speed&&e.speed>=0?e.speed:1,this.frequency=e.speed&&e.frequency>=0?e.frequency:1e3,this.startTime=e.startTime&&null!=e.startTime?e.startTime:0,this.endTime=e.endTime&&null!=e.endTime&&e.endTime>=t.startTime?e.endTime:+new Date,this.repeat=void 0===e.repeat||e.repeat,this.reverse=void 0!==e.reverse&&e.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],t.events=new de(this,null,this.EVENT_TYPES),t.speed=Number(t.speed),t.frequency=Number(t.frequency),t.startTime=Number(t.startTime),t.endTime=Number(t.endTime),t.startTime=Date.parse(new Date(t.startTime)),t.endTime=Date.parse(new Date(t.endTime)),t.currentTime=t.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}updateOptions(e){var t=this;(e=e||{}).speed&&e.speed>=0&&(t.speed=e.speed,t.speed=Number(t.speed)),e.speed&&e.frequency>=0&&(t.frequency=e.frequency,t.frequency=Number(t.frequency)),e.startTime&&null!=e.startTime&&(t.startTime=e.startTime,t.startTime=Date.parse(new Date(t.startTime))),e.endTime&&null!=e.endTime&&e.endTime>=t.startTime&&(t.endTime=e.endTime,t.endTime=Date.parse(new Date(t.endTime))),null!=e.repeat&&(t.repeat=e.repeat),null!=e.reverse&&(t.reverse=e.reverse)}start(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}pause(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}stop(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}toggle(){this.running?this.pause():this.start()}setSpeed(e){return e>=0&&(this.speed=e,!0)}getSpeed(){return this.speed}setFrequency(e){return e>=0&&(this.frequency=e,!0)}getFrequency(){return this.frequency}setStartTime(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime<t.startTime&&(t.currentTime=t.startTime,t.tick()),!0)}getStartTime(){return this.startTime}setEndTime(e){var t=this;return t.endTime=Date.parse(new Date(t.endTime)),!(e<t.startTime)&&(t.endTime=e,t.currentTime>=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}getEndTime(){return this.endTime}setCurrentTime(e){var t=this;return t.currentTime=Date.parse(new Date(t.currentTime)),e>=t.startTime&&e<=t.endTime&&(t.currentTime=e,t.startTime=t.currentTime,t.tick(),!0)}getCurrentTime(){return this.currentTime}setRepeat(e){this.repeat=e}getRepeat(){return this.repeat}setReverse(e){this.reverse=e}getReverse(){return this.reverse}getRunning(){return this.running}destroy(){var e=this;e.speed=null,e.frequency=null,e.startTime=null,e.endTime=null,e.currentTime=null,e.repeat=null,e.running=!1,e.reverse=null}tick(){}}i.TimeControlBase=_e;i.TimeFlowControl=
  149. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  150. * This program are made available under the terms of the Apache License, Version 2.0
  151. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  152. class extends _e{constructor(e,t){super(t);var s=this;s.callback=e,Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),s=this,r=function(){},i=function(){return s.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),s.update=s.update.bind(s),s.oldTime=s.currentTime,s.CLASS_NAME="SuperMap.TimeFlowControl"}updateOptions(e){e=e||{},super.updateOptions(e)}start(){var e=this;e.running||(e.running=!0,e.reverse?e.currentTime===e.startTime&&(e.oldTime=e.endTime,e.currentTime=e.oldTime):e.oldTime===e.endTime&&(e.currentTime=e.startTime,e.oldTime=e.currentTime),e.tick())}stop(){super.stop();var e=this;e.oldTime=e.currentTime,e.running&&(e.running=!1),e.intervalId&&window.clearTimeout(e.intervalId)}destroy(){super.destroy(),this.oldTime=null,this.callback=null}tick(){var e=this;e.intervalId&&window.clearInterval(e.intervalId),e.intervalId=null,e.update(),e.intervalId=window.setInterval(e.update,e.frequency)}update(){var e=this;if(e.running)if(e.callback&&e.callback(e.currentTime),e.reverse){if(e.currentTime===e.startTime){if(!e.repeat)return e.running=!1,null;e.oldTime=e.endTime,e.currentTime=e.oldTime}else e.currentTime=e.oldTime,e.oldTime-=e.speed;e.oldTime<=e.startTime&&(e.oldTime=e.startTime)}else{if(e.currentTime===e.endTime){if(!e.repeat)return e.running=!1,e.stop(),null;e.stop(),e.currentTime=e.startTime,e.oldTime=e.currentTime,e.start()}else e.oldTime=e.currentTime,e.currentTime+=e.speed;e.currentTime>=e.endTime&&(e.currentTime=e.endTime)}}};
  153. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  154. * This program are made available under the terms of the Apache License, Version 2.0
  155. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  156. s(107),s(693);var Te=s(144),we=s.n(Te);
  157. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  158. * This program are made available under the terms of the Apache License, Version 2.0
  159. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  160. let Ee=window.fetch;i.setCORS=function(e){i.CORS=e};var Me=i.isCORS=function(){return void 0!=i.CORS?i.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},Ae=(i.setRequestTimeout=function(e){return i.RequestTimeout=e},i.getRequestTimeout=function(){return i.RequestTimeout||45e3}),Pe=i.FetchRequest={commit:function(e,t,s,r){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,s,r);case"POST":return this.post(t,s,r);case"PUT":return this.put(t,s,r);case"DELETE":return this.delete(t,s,r);default:return this.get(t,s,r)}},supportDirectRequest:function(e,t){return!!X.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Me()||t.proxy)},get:function(e,t,s){s=s||{};if(e=X.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){var r={url:e=e.replace(".json",".jsonp"),data:t};return i.Util.RequestJSONPPromise.GET(r)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,s):this._fetch(e,t,s,"GET")},delete:function(e,t,s){s=s||{};if(e=X.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=DELETE",data:t};return i.Util.RequestJSONPPromise.DELETE(r)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")-1),t,s):this._fetch(e,t,s,"DELETE")},post:function(e,t,s){if(s=s||{},!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=POST",data:t};return i.Util.RequestJSONPPromise.POST(r)}return this._fetch(this._processUrl(e,s),t,s,"POST")},put:function(e,t,s){if(s=s||{},e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=PUT",data:t};return i.Util.RequestJSONPPromise.PUT(r)}return this._fetch(e,t,s,"PUT")},urlIsLong:function(e){for(var t=0,s=null,r=0,i=e.length;r<i;r++)(s=e.charCodeAt(r))<127?t++:128<=s&&s<=2047?t+=2:2048<=s&&s<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,s,r){return t+=(t.indexOf("?")>-1?"&":"?")+"_method="+e,"string"!=typeof s&&(s=JSON.stringify(s)),this.post(t,s,r)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var s=e.split("?");2===s.length&&(e=s[0]+".json?"+s[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,s,r){return(s=s||{}).headers=s.headers||{},s.headers["Content-Type"]||(s.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),s.timeout?this._timeout(s.timeout,Ee(e,{method:r,headers:s.headers,body:"PUT"===r||"POST"===r?t:void 0,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ae()}).then(function(e){return e})):Ee(e,{method:r,body:"PUT"===r||"POST"===r?t:void 0,headers:s.headers,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ae()}).then(function(e){return e})},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},we()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(s,r){setTimeout(function(){r(new Error("timeout"))},e),t.then(s,r)})},_getParameterString:function(e){var t=[];for(var s in e){var r,i=e[s];if(null!=i&&"function"!=typeof i)r=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};i.Util.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=i.Util.toJSON(e[t]));var s=encodeURIComponent(e[t]);this.queryValues.push(s)}},issue:function(e){for(var t=this,s=t.getUid(),r=e.url,i=[],a=new Promise(function(e){t.supermap_callbacks[s]=function(r){delete t.supermap_callbacks[s],e(r)}}),n=r,o=0,l=t.queryKeys?t.queryKeys.length:0,h=0;h<l;h++)if(n.length+t.queryKeys[h].length+2>=t.limitLength){if(0==o)return!1;i.push(n),n=r,o=0,h--}else if(n.length+t.queryKeys[h].length+2+t.queryValues[h].length>t.limitLength)for(var u=t.queryValues[h];u.length>0;){var c=t.limitLength-n.length-t.queryKeys[h].length-2;n.indexOf("?")>-1?n+="&":n+="?";var d=u.substring(0,c);"%"===d.substring(c-1,c)?(c-=1,d=u.substring(0,c)):"%"===d.substring(c-2,c-1)&&(c-=2,d=u.substring(0,c)),n+=t.queryKeys[h]+"="+d,u=u.substring(c),d.length>0&&(i.push(n),n=r,o=0)}else o++,n.indexOf("?")>-1?n+="&":n+="?",n+=t.queryKeys[h]+"="+t.queryValues[h];return i.push(n),t.send(i,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+s+"]",e&&e.proxy),a},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,s){var r=e.length;if(r>0)for(var i=(new Date).getTime(),a=0;a<r;a++){var n=e[a];n.indexOf("?")>-1?n+="&":n+="?",n+="sectionCount="+r,n+="&sectionIndex="+a,n+="&jsonpUserID="+i,s&&(n=decodeURIComponent(n),n=s+encodeURIComponent(n)),we()(n,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings(e.params),this.issue(e)},POST:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},PUT:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},DELETE:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)}};
  161. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  162. * This program are made available under the terms of the Apache License, Version 2.0
  163. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  164. class Oe{static generateToken(e,t){var s=this.servers[e];if(s)return Pe.post(s.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},X.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++){var s=e[t];this.servers[s.server]=s}}static registerToken(e,t){if(this.tokens=this.tokens||{},e&&t){var s=this._getTokenStorageKey(e);this.tokens[s]=t}}static registerKey(e,t){if(this.keys=this.keys||{},e&&!(e.length<1)&&t){e=X.isArray(e)?e:[e];for(var s=0;s<e.length;s++){var r=this._getUrlRestString(e[0])||e[0];this.keys[r]=t}}}static getServerInfo(e){return this.servers=this.servers||{},this.servers[e]}static getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}static getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}static loginiServer(e,t,s,r){e=X.urlPathAppend(e,"services/security/login");var i={username:t&&t.toString(),password:s&&s.toString(),rememberme:r};i=JSON.stringify(i);return Pe.post(e,i,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(e){return e.json()})}static logoutiServer(e){e=X.urlPathAppend(e,"services/security/logout");return Pe.get(e,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withoutFormatSuffix:!0}).then(function(){return!0}).catch(function(){return!1})}static loginOnline(e,t){var s=Oe.SSO+"/login?service="+e;this._open(s,t)}static loginiPortal(e,t,s){e=X.urlPathAppend(e,"web/login");var r={username:t&&t.toString(),password:s&&s.toString()};r=JSON.stringify(r);return Pe.post(e,r,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0}).then(function(e){return e.json()})}static logoutiPortal(e){e=X.urlPathAppend(e,"services/security/logout");return Pe.get(e,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0,withoutFormatSuffix:!0}).then(function(){return!0}).catch(function(){return!1})}static loginManager(e,t,s){if(X.isInTheSameDomain(e)){var r=X.urlPathAppend(e,"icloud/security/tokens"),i=t||{},a={username:i.userName&&i.userName.toString(),password:i.password&&i.password.toString()};a=JSON.stringify(a);var n=this;return Pe.post(r,a,{headers:{Accept:"*/*","Content-Type":"application/json"}}).then(function(e){e.text().then(function(e){return n.imanagerToken=e,e})})}var o=!s||s.isNewTab;this._open(e,o)}static destroyAllCredentials(){this.keys=null,this.tokens=null,this.servers=null}static destroyToken(e){if(e){var t=this._getTokenStorageKey(e);this.tokens=this.tokens||{},this.tokens[t]&&delete this.tokens[t]}}static destroyKey(e){if(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;this.keys[t]&&delete this.keys[t]}}static _open(e,t){t=null==t||t;var s=window.screen.availWidth/2-this.INNER_WINDOW_WIDTH/2,r=window.screen.availHeight/2-this.INNER_WINDOW_HEIGHT/2,i="height="+this.INNER_WINDOW_HEIGHT+", width="+this.INNER_WINDOW_WIDTH+",top="+r+", left="+s+",toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no";t?window.open(e,"login"):window.open(e,"login",i)}static _getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}static _getUrlRestString(e){if(!e)return e;var t=e.match(/(http|https):\/\/(.*\/rest)/i);return t?t[0]:e}}Oe.INNER_WINDOW_WIDTH=600,Oe.INNER_WINDOW_HEIGHT=600,Oe.SSO="https://sso.supermap.com",Oe.ONLINE="https://www.supermapol.com",i.SecurityManager=Oe;
  165. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  166. * This program are made available under the terms of the Apache License, Version 2.0
  167. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  168. class Le{constructor(e,t){if(e){var s=e.substr(e.length-1,1);this.serviceUrl="/"===s?e.substr(0,e.length-2):e}this.options=t||{},this.CLASS_NAME="SuperMap.iManagerServiceBase"}request(e,t,s,r){(r=r||{headers:{Accept:"*/*","Content-Type":"application/json"}}).hasOwnProperty("withCredentials")||(r.withCredentials=!0),r.crossOrigin=this.options.crossOrigin,r.headers=this.options.headers;var i=Oe.imanagerToken;return i&&(r.headers||(r.headers=[]),r.headers["X-Auth-Token"]=i),s&&(s=JSON.stringify(s)),Pe.commit(e,t,s,r).then(function(e){return e.json()})}}i.iManagerServiceBase=Le;
  169. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  170. * This program are made available under the terms of the Apache License, Version 2.0
  171. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  172. class Ie{constructor(e){e=e||{},this.nodeSpec="SMALL",this.nodeCount=1,this.nodeName="",this.password="",this.description="",this.physicalMachineName="",this.ips=[],this.userName="",X.extend(this,e)}}i.iManagerCreateNodeParam=Ie;i.iManager=
  173. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  174. * This program are made available under the terms of the Apache License, Version 2.0
  175. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  176. class extends Le{constructor(e){super(e)}load(){return this.request("GET",this.serviceUrl+"/web/api/service.json")}createIServer(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/server.json",new Ie(e))}createIPortal(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/portal.json",new Ie(e))}iServerList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/server.json")}iPortalList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/portal.json")}startNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/started.json",e)}stopNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/stopped.json",e)}};
  177. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  178. * This program are made available under the terms of the Apache License, Version 2.0
  179. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  180. class Ne{constructor(e,t){t=t||{},this.serviceUrl=e,this.serverType=n.iPortal,this.CLASS_NAME="SuperMap.iPortalServiceBase",this.withCredentials=t.withCredentials||!1,this.crossOrigin=t.crossOrigin,this.headers=t.headers}request(e,t,s,r={headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials}){return t=this.createCredentialUrl(t),Pe.commit(e,t,s,r).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,s=this.getCredential();if(s){var r=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===r?t+=s.getUrlParameters():t.indexOf("?")>-1&&"?"!==r?t+="&"+s.getUrlParameters():t+="?"+s.getUrlParameters()}return t}getCredential(){var e,t=Oe.getToken(this.serviceUrl);return(e=t?new ue(t,"token"):null)||(e=(t=this.getKey())?new ue(t,"key"):null),e}getKey(){}}i.iPortalServiceBase=Ne;
  181. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  182. * This program are made available under the terms of the Apache License, Version 2.0
  183. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  184. class Re{constructor(e){e=e||{},this.resourceType="",this.pageSize=12,this.currentPage=1,this.orderBy="UPDATETIME",this.orderType="DESC",this.searchType="PUBLIC",this.tags=[],this.dirIds=[],this.resourceSubTypes=[],this.aggregationTypes=[],this.text="",this.groupIds=[],this.departmentIds=[],X.extend(this,e)}}i.iPortalQueryParam=Re;
  185. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  186. * This program are made available under the terms of the Apache License, Version 2.0
  187. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  188. class Fe{constructor(e){e=e||{},this.content=[],this.total=0,this.currentPage=1,this.pageSize=12,this.aggregations=null,X.extend(this,e)}}i.iPortalQueryResult=Fe;
  189. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  190. * This program are made available under the terms of the Apache License, Version 2.0
  191. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  192. class De extends Ne{constructor(e,t){super(e),t=t||{},this.authorizeSetting=[],this.bounds="",this.bounds4326="",this.checkStatus="",this.createTime=0,this.description=null,this.dirId=null,this.epsgCode=0,this.heatLevel=0,this.id=0,this.name="",this.personalDirId=null,this.resourceId=0,this.resourceSubType=null,this.resourceType=null,this.serviceRootUrlId=null,this.tags=null,this.thumbnail=null,this.updateTime=0,this.userName="",this.sourceJSON={},X.extend(this,t),this.resourceUrl=e+"/web/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId,this.withCredentials&&(this.resourceUrl=e+"/web/mycontent/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId)}load(){var e=this;return e.request("GET",e.resourceUrl+".json").then(function(t){if(t.error)return t;e.sourceJSON=t})}update(){var e=this.resourceType.replace("_","").toLowerCase();"data"===e&&(this.resourceUrl=this.resourceUrl+"/attributes.json");var t=JSON.stringify(this.sourceJSON);if("service"===e){var s={authorizeSetting:this.sourceJSON.authorizeSetting,metadata:this.sourceJSON.metadata,tags:this.sourceJSON.tags,thumbnail:this.sourceJSON.thumbnail,tokenRefreshUrl:this.sourceJSON.tokenRefreshUrl};t=JSON.stringify(s)}return this.request("PUT",this.resourceUrl,t,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}i.iPortalResource=De;
  193. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  194. * This program are made available under the terms of the Apache License, Version 2.0
  195. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  196. class ke{constructor(e){e=e||{},this.ids=[],this.entities=[],this.resourceType="",X.extend(this,e)}}i.iPortalShareParam=ke;i.iPortal=
  197. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  198. * This program are made available under the terms of the Apache License, Version 2.0
  199. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  200. class extends Ne{constructor(e,t){super(e,t),this.iportalUrl=e,t=t||{},this.withCredentials=t.withCredentials||!1}load(){return Pe.get(this.iportalUrl+"/web")}queryResources(e){if(!(e instanceof Re))return new Promise(function(e){e("queryParams is not instanceof iPortalQueryParam !")});var t=this,s=this.iportalUrl+"/gateway/catalog/resource/search.json";return e.t=(new Date).getTime(),this.request("GET",s,e).then(function(e){var s=[];e.content.forEach(function(e){s.push(new De(t.iportalUrl,e))});let r=new Fe;return r.content=s,r.total=e.total,r.currentPage=e.currentPage,r.pageSize=e.pageSize,r.aggregations=e.aggregations,r})}updateResourcesShareSetting(e){if(!(e instanceof ke))return new Promise(function(e){e("shareParams is not instanceof iPortalShareParam !")});var t=e.resourceType.replace("_","").toLowerCase()+"s";"datas"===t&&(t="mycontent/"+t);var s={ids:e.ids,entities:e.entities},r=this.iportalUrl+"/web/"+t+"/sharesetting.json";return this.request("PUT",r,JSON.stringify(s)).then(function(e){return e})}};i.iPortalShareEntity=
  201. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  202. * This program are made available under the terms of the Apache License, Version 2.0
  203. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  204. class{constructor(e){e=e||{},this.permissionType="",this.entityType="",this.entityName="GUEST",this.entityId=null,X.extend(this,e)}};
  205. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  206. * This program are made available under the terms of the Apache License, Version 2.0
  207. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  208. class Ge{constructor(e){e=e||{},this.rootUrl="",this.tags=[],this.entities=[],X.extend(this,e)}}i.iPortalAddResourceParam=Ge;
  209. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  210. * This program are made available under the terms of the Apache License, Version 2.0
  211. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  212. class Be{constructor(e){e=e||{},this.type="",this.tags=[],this.entities=[],this.metadata={},this.addedMapNames=[],this.addedSceneNames=[],X.extend(this,e)}}i.iPortalRegisterServiceParam=Be;
  213. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  214. * This program are made available under the terms of the Apache License, Version 2.0
  215. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  216. class Ue{constructor(e){e=e||{},this.fileName="",this.type="",this.tags=[],this.dataMetaInfo={},X.extend(this,e)}}i.iPortalAddDataParam=Ue;
  217. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  218. * This program are made available under the terms of the Apache License, Version 2.0
  219. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  220. class je{constructor(e){e=e||{},this.xField="",this.yField="",this.fileEncoding="UTF-8",this.xIndex=1,this.yIndex=1,this.fieldTypes=[],this.separator="",this.firstRowIsHead=!0,this.url="",this.dataStoreInfo={},X.extend(this,e)}}i.iPortalDataMetaInfoParam=je;
  221. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  222. * This program are made available under the terms of the Apache License, Version 2.0
  223. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  224. class Ve{constructor(e){e=e||{},this.type="",this.url="",this.connectionInfo={},X.extend(this,e)}}i.iPortalDataStoreInfoParam=Ve;
  225. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  226. * This program are made available under the terms of the Apache License, Version 2.0
  227. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  228. class He{constructor(e){e=e||{},this.dataBase="",this.server="",X.extend(this,e)}}i.iPortalDataConnectionInfoParam=He;i.iPortalUser=
  229. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  230. * This program are made available under the terms of the Apache License, Version 2.0
  231. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  232. class extends Ne{constructor(e){super(e),this.iportalUrl=e}deleteResources(e){var t=e.resourceType.replace("_","").toLowerCase(),s=this.iportalUrl+"/web/"+t+"s.json?ids="+encodeURI(JSON.stringify(e.ids));return"data"===t?(s=this.iportalUrl+"/web/mycontent/datas/delete.json",this.request("POST",s,JSON.stringify(e.ids))):this.request("DELETE",s)}addMap(e){if(!(e instanceof Ge))return this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/maps/batchaddmaps.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}addScene(e){if(!(e instanceof Ge))return this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/scenes/batchaddscenes.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}registerService(e){if(!(e instanceof Be))return this.getErrMsgPromise("registerParams is not instanceof IPortalRegisterServiceParam !");let t={type:e.type,tags:e.tags,authorizeSetting:e.entities,metadata:e.metadata,addedMapNames:e.addedMapNames,addedSceneNames:e.addedSceneNames},s=this.iportalUrl+"/web/services.json";return this.request("POST",s,JSON.stringify(t)).then(e=>e)}getErrMsgPromise(e){return new Promise(t=>{t(e)})}uploadDataRequest(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/upload.json";return this.request("POST",s,t)}addData(e,t){if(!(e instanceof Ue))return this.getErrMsgPromise("params is not instanceof iPortalAddDataParam !");var s,r=this.iportalUrl+"/web/mycontent/datas.json",i={fileName:e.fileName,tags:e.tags,type:e.type},a=e.type.toLowerCase();if("excel"===a||"csv"===a){if(!(e.dataMetaInfo instanceof je))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");s={xField:e.dataMetaInfo.xField,yField:e.dataMetaInfo.yField},"csv"===a&&(s.fileEncoding=e.dataMetaInfo.fileEncoding),i.coordType="WGS84",i.dataMetaInfo=s}else if("hdfs"===a||"hbase"===a){if(!(e.dataMetaInfo instanceof je))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");if(!(e.dataMetaInfo.dataStoreInfo instanceof Ve))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo is not instanceof iPortalDataStoreInfoParam !");var n={type:e.dataMetaInfo.dataStoreInfo.type};switch(a){case"hdfs":n.url=e.dataMetaInfo.dataStoreInfo.url,s={url:e.dataMetaInfo.url,dataStoreInfo:n};break;case"hbase":if(!(e.dataMetaInfo.dataStoreInfo.connectionInfo instanceof He))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo.connectionInfo is not instanceof iPortalDataConnectionInfoParam !");n.connectionInfo={dataBase:e.dataMetaInfo.dataStoreInfo.connectionInfo.dataBase,server:e.dataMetaInfo.dataStoreInfo.connectionInfo.server,engineType:"HBASE"},n.datastoreType="SPATIAL",s={dataStoreInfo:n}}i.dataMetaInfo=s}return this.request("POST",r,JSON.stringify(i)).then(e=>"hdfs"===a||"hbase"===a?e:e.childID?this.uploadDataRequest(e.childID,t):e.customResult)}publishOrUnpublish(e,t){if(!e.dataId||!e.serviceType)return this.getErrMsgPromise("option.dataID and option.serviceType are Required!");var s=e.dataId,r=e.dataServiceId,i=e.serviceType,a=this.iportalUrl+"/web/mycontent/datas/"+s+"/publishstatus.json?serviceType="+i;return r&&(a+="&dataServiceId="+r),this.request("PUT",a,JSON.stringify(t)).then(e=>t?(r||(r=e.customResult),r):e)}getDataPublishedStatus(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/publishstatus.json?dataServiceId="+t+"&forPublish=true";return this.request("GET",s)}unPublishDataService(e){return this.publishOrUnpublish(e,!1)}publishDataService(e){return this.publishOrUnpublish(e,!0)}};
  233. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  234. * This program are made available under the terms of the Apache License, Version 2.0
  235. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  236. class Je{constructor(e,t){let s=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.serverType=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,X.isArray(e)?(s.urls=e,s.length=e.length,s.totalTimes=s.length,1===s.length?s.url=e[0]:(s.index=parseInt(Math.random()*s.length),s.url=e[s.index])):(s.totalTimes=1,s.url=e),X.isArray(e)&&!s.isServiceSupportPolling()&&(s.url=e[0],s.totalTimes=1),s.serverType=s.serverType||n.ISERVER,t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,X.extend(this,t),s.isInTheSameDomain=X.isInTheSameDomain(s.url),s.events=new de(s,null,s.EVENT_TYPES,!0),s.eventListeners instanceof Object&&s.events.on(s.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){let e=this;X.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){let t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=void 0!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=void 0!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain;let s=this.getCredential(e.url);s&&(e.url=X.urlAppend(e.url,s.getUrlParameters())),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getCredential(e){let t,s,r=e;switch(this.serverType){case n.IPORTAL:(t=(s=Oe.getToken(r))?new ue(s,"token"):null)||(t=(s=Oe.getKey(r))?new ue(s,"key"):null);break;case n.ONLINE:t=(s=Oe.getKey(r))?new ue(s,"key"):null;break;default:t=(s=Oe.getToken(r))?new ue(s,"token"):null}return t}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){let t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){let e=this,t=e.options.url,s=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(s,s.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=X.isInTheSameDomain(t),e._commit(e.options)}calculatePollingTimes(){let e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=X.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=X.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=X.urlAppend(e.url,X.getParameterString(e.params||{}))),e.params=e.data),Pe.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then(function(e){return e.text?e.text():e.json?e.json():e}).then(function(t){var s=t;("string"==typeof t&&(s=(new ye).read(t)),(!s||s.error||s.code>=300&&304!==s.code)&&(s=s&&s.error?{error:s.error}:{error:s}),s.error)?(e.scope?Y.bind(e.failure,e.scope):e.failure)(s):(s.succeed=void 0==s.succeed||s.succeed,(e.scope?Y.bind(e.success,e.scope):e.success)(s))}).catch(function(t){(e.scope?Y.bind(e.failure,e.scope):e.failure)(t)})}}i.CommonServiceBase=Je;
  237. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  238. * This program are made available under the terms of the Apache License, Version 2.0
  239. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  240. class ze{constructor(e){e.filters&&"string"==typeof e.filters&&(e.filters=e.filters.split(",")),this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,X.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}i.GeoCodingParameter=ze;
  241. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  242. * This program are made available under the terms of the Apache License, Version 2.0
  243. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  244. class qe{constructor(e){e.filters&&(e.filters=e.filters.split(",")),this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null,X.extend(this,e)}destroy(){this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null}}i.GeoDecodingParameter=qe;
  245. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  246. * This program are made available under the terms of the Apache License, Version 2.0
  247. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  248. class We extends Je{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof ze&&this.processAsync(e,t)}decode(e,t){t instanceof qe&&this.processAsync(e,t)}processAsync(e,t){this.request({method:"GET",url:e,params:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){e.succeed&&delete e.succeed,super.serviceProcessCompleted(e)}serviceProcessFailed(e){super.serviceProcessFailed(e)}}i.AddressMatchService=We;
  249. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  250. * This program are made available under the terms of the Apache License, Version 2.0
  251. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  252. class Ye{constructor(e){this.name=null,this.queryType=null,this.CLASS_NAME="SuperMap.AggQueryBuilderParameter",X.extend(this,e)}destroy(){this.name=null,this.queryType=null}}i.AggQueryBuilderParameter=Ye;
  253. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  254. * This program are made available under the terms of the Apache License, Version 2.0
  255. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  256. class Xe{constructor(e){this.aggName=null,this.aggType=null,this.aggFieldName=null,this.subAgg=null,this.CLASS_NAME="SuperMap.AggregationParameter",X.extend(this,e)}destroy(){var e=this;e.aggName=null,e.aggFieldName=null,e.aggType=null,e.subAgg&&(e.subAgg=null)}}i.AggregationParameter=Xe;
  257. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  258. * This program are made available under the terms of the Apache License, Version 2.0
  259. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  260. class Qe{constructor(e){this.dataset=null,this.targetDatasourceName=null,this.totalGridName=null,this.diffuseDatasetGridName=null,this.durationDatasetGridName=null,this.directDatasetGridName=null,this.latitude=null,this.timeMode="MULTIDAYS",this.dayStart=null,this.dayEnd=null,this.hourStart=null,this.hourEnd=null,this.transmittance=null,this.hourInterval=null,this.dayInterval=null,this.deleteExistResultDataset=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.AreaSolarRadiationParameters"}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){var s={};for(var r in e){if("dataset"!==r)"latitude"===r||"timeMode"===r||"dayStart"===r||("dayEnd"===r||"hourStart"===r||"hourEnd"===r)||("transmittance"===r||"hourInterval"===r||"dayInterval"===r)?s[r]=e[r]:t[r]=e[r]}t.parameter=s}}i.AreaSolarRadiationParameters=Qe;
  261. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  262. * This program are made available under the terms of the Apache License, Version 2.0
  263. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  264. class Ke extends Je{constructor(e,t){super(e,t),this.format=a.GEOJSON,this.CLASS_NAME="SuperMap.SpatialAnalystBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,s=this;if((e=X.transformResult(e))&&s.format===a.GEOJSON&&"function"==typeof s.toGeoJSONResult)if(X.isArray(e)){for(var r=0;r<e.length;r++)e[r]=s.toGeoJSONResult(e[r]);t=e}else t=s.toGeoJSONResult(e);t||(t=e),s.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){if(!e)return null;e.result&&e.result.resultGeometry&&(e=e.result);var t=new Ce;if(e.recordsets)for(var s=0,r=e.recordsets,i=r.length;s<i;s++)r[s].features&&(r[s].features=t.toGeoJSON(r[s].features));else e.recordset&&e.recordset.features&&(e.recordset.features=t.toGeoJSON(e.recordset.features));return e.resultGeometry&&(e.resultGeometry=t.toGeoJSON(e.resultGeometry)),e.regions&&(e.regions=t.toGeoJSON(e.regions)),e}}i.SpatialAnalystBase=Ke;
  265. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  266. * This program are made available under the terms of the Apache License, Version 2.0
  267. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  268. class Ze extends Ke{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.AreaSolarRadiationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Qe){var t=this,s={};e instanceof Qe&&(t.url=X.urlPathAppend(t.url,`datasets/${e.dataset}/solarradiation`)),t.url=X.urlAppend(t.url,"returnContent=true"),Qe.toObject(e,s);var r=X.toJSON(s);t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}i.AreaSolarRadiationService=Ze;
  269. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  270. * This program are made available under the terms of the Apache License, Version 2.0
  271. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  272. class $e{constructor(e){this.exp=null,this.value=100,X.extend(this,e),this.CLASS_NAME="SuperMap.BufferDistance"}destroy(){this.exp=null,this.value=null}}i.BufferDistance=$e;
  273. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  274. * This program are made available under the terms of the Apache License, Version 2.0
  275. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  276. class et{constructor(e){this.endType=_.FLAT,this.leftDistance=new $e,this.rightDistance=new $e,this.semicircleLineSegment=4,this.radiusUnit=d.METER,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.BufferSetting"}destroy(){let e=this;e.endType=null,e.leftDistance&&(e.leftDistance.destroy(),e.leftDistance=null),e.rightDistance&&(e.rightDistance.destroy(),e.rightDistance=null),e.semicircleLineSegment=null,e.radiusUnit=null}}i.BufferSetting=et;
  277. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  278. * This program are made available under the terms of the Apache License, Version 2.0
  279. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  280. class tt{constructor(e){this.bufferSetting=new et,X.extend(this,e),this.CLASS_NAME="SuperMap.BufferAnalystParameters"}destroy(){this.bufferSetting&&(this.bufferSetting.destroy(),this.bufferSetting=null)}}i.BufferAnalystParameters=tt;
  281. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  282. * This program are made available under the terms of the Apache License, Version 2.0
  283. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  284. class st{constructor(e){this.expectCount=1e3,this.dataset=null,this.dataReturnMode=A.RECORDSET_ONLY,this.deleteExistResultDataset=!0,X.extend(this,e),this.CLASS_NAME="SuperMap.DataReturnOption"}destroy(){this.expectCount=null,this.dataset=null,this.dataReturnMode=null,this.deleteExistResultDataset=null}}i.DataReturnOption=st;
  285. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  286. * This program are made available under the terms of the Apache License, Version 2.0
  287. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  288. class rt{constructor(e){this.foreignTableName=null,this.joinFilter=null,this.joinType=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.JoinItem"}destroy(){this.foreignTableName=null,this.joinFilter=null,this.joinType=null}toServerJSONObject(){var e={};return e=X.copyAttributes(e,this)}}i.JoinItem=rt;
  289. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  290. * This program are made available under the terms of the Apache License, Version 2.0
  291. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  292. class it{constructor(e){this.alias=null,this.connect=null,this.dataBase=null,this.driver=null,this.engineType=null,this.exclusive=null,this.OpenLinkTable=null,this.password=null,this.readOnly=null,this.server=null,this.user=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.DatasourceConnectionInfo"}destroy(){var e=this;e.alias=null,e.connect=null,e.dataBase=null,e.driver=null,e.engineType=null,e.exclusive=null,e.OpenLinkTable=null,e.password=null,e.readOnly=null,e.server=null,e.user=null}}i.DatasourceConnectionInfo=it;i.LinkItem=
  293. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  294. * This program are made available under the terms of the Apache License, Version 2.0
  295. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  296. class{constructor(e){this.datasourceConnectionInfo=null,this.foreignKeys=null,this.foreignTable=null,this.linkFields=null,this.linkFilter=null,this.name=null,this.primaryKeys=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.LinkItem"}destroy(){var e=this;e.datasourceConnectionInfo instanceof it&&(e.datasourceConnectionInfo.destroy(),e.datasourceConnectionInfo=null),e.foreignKeys=null,e.foreignTable=null,e.linkFields=null,e.linkFilter=null,e.name=null,e.primaryKeys=null}};
  297. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  298. * This program are made available under the terms of the Apache License, Version 2.0
  299. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  300. class at{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,s=e.joinItems,r=s.length;t<r;t++)s[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,s=e.linkItems,r=s.length;t<r;t++)s[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}i.FilterParameter=at;
  301. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  302. * This program are made available under the terms of the Apache License, Version 2.0
  303. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  304. class nt extends tt{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new at,this.resultSetting=new st,this.isAttributeRetained=!0,this.isUnion=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.DatasetBufferAnalystParameters"}destroy(){super.destroy();var e=this;e.dataset=null,e.filterQueryParameter&&(e.filterQueryParameter.destroy(),e.filterQueryParameter=null),e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.isAttributeRetained=null,e.isUnion=null}static toObject(e,t){for(var s in e)if("bufferSetting"===s)e.bufferSetting.radiusUnit=e.bufferSetting.radiusUnit.toUpperCase(),t.bufferAnalystParameter=e.bufferSetting;else if("resultSetting"===s)t.dataReturnOption=e.resultSetting;else{if("dataset"===s)continue;t[s]=e[s]}}}i.DatasetBufferAnalystParameters=nt;
  305. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  306. * This program are made available under the terms of the Apache License, Version 2.0
  307. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  308. class ot extends tt{constructor(e){super(e),this.sourceGeometry=null,this.sourceGeometrySRID=null,e&&X.extend(this,e),this.CLASS_NAME=" SuperMap.GeometryBufferAnalystParameters"}destroy(){super.destroy();this.sourceGeometry&&(this.sourceGeometry.destroy(),this.sourceGeometry=null)}static toObject(e,t){for(var s in e)if("bufferSetting"===s){var r={};for(var i in e.bufferSetting)r[i]=e.bufferSetting[i];t.analystParameter=r}else"sourceGeometry"===s?t.sourceGeometry=xe.fromGeometry(e.sourceGeometry):t[s]=e[s]}}i.GeometryBufferAnalystParameters=ot;
  309. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  310. * This program are made available under the terms of the Apache License, Version 2.0
  311. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  312. class lt extends Ke{constructor(e,t){super(e,t),this.mode=null,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.BufferAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof nt?(s.mode="datasets",s.url=X.urlPathAppend(s.url,"datasets/"+e.dataset+"/buffer"),nt.toObject(e,t)):e instanceof ot&&(s.mode="geometry",s.url=X.urlPathAppend(s.url,"geometry/buffer"),ot.toObject(e,t));var r=X.toJSON(t);s.url=X.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}i.BufferAnalystService=lt;
  313. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  314. * This program are made available under the terms of the Apache License, Version 2.0
  315. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  316. class ht{constructor(e){this.type=w.UDB,this.datasetName="analystResult",this.datasourceInfo=null,this.outputPath="",X.extend(this,e),this.CLASS_NAME="SuperMap.OutputSetting"}destroy(){var e=this;e.type=null,e.datasetName=null,e.outputPath=null,e.datasourceInfo instanceof it&&(e.datasourceInfo.destroy(),e.datasourceInfo=null)}}i.OutputSetting=ht;
  317. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  318. * This program are made available under the terms of the Apache License, Version 2.0
  319. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  320. class ut{constructor(e){this.items=null,this.numericPrecision=1,this.rangeMode=g.EQUALINTERVAL,this.rangeCount="",this.colorGradientType=v.YELLOW_RED,X.extend(this,e),this.CLASS_NAME="SuperMap.MappingParameters"}destroy(){var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.numericPrecision=null,e.rangeMode=null,e.rangeCount=null,e.colorGradientType=null}}i.MappingParameters=ut;
  321. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  322. * This program are made available under the terms of the Apache License, Version 2.0
  323. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  324. class ct{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=k.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;X.extend(this,e),this.CLASS_NAME="SuperMap.BuffersAnalystJobsParameter"}destroy(){this.datasetName=null,this.bounds=null,this.distance=null,this.distanceField=null,this.distanceUnit=null,this.dissolveField=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"bounds"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}i.BuffersAnalystJobsParameter=ct;
  325. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  326. * This program are made available under the terms of the Apache License, Version 2.0
  327. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  328. class dt extends Je{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.ProcessingServiceBase"}destroy(){super.destroy()}getJobs(e){var t=this;Pe.get(t._processUrl(e),null,{proxy:t.proxy}).then(function(e){return e.json()}).then(function(e){t.events.triggerEvent("processCompleted",{result:e})}).catch(function(e){t.eventListeners.processFailed({error:e})})}addJob(e,t,s,r){var i=this,a=null;t&&t instanceof s&&(a=new Object,s.toObject(t,a));let n=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},i.headers||{});var o={proxy:i.proxy,headers:n,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,isInTheSameDomain:i.isInTheSameDomain};Pe.post(i._processUrl(e),JSON.stringify(a),o).then(function(e){return e.json()}).then(function(e){e.succeed?i.serviceProcessCompleted(e,r):i.serviceProcessFailed(e)}).catch(function(e){i.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=X.transformResult(e),t=t||1e3;var s=this;if(e)var r=setInterval(function(){Pe.get(s._processUrl(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){s.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(r),s.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(r),s.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(r),s.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}_processUrl(e){return Oe.getToken(e)&&(e=X.urlAppend(e,"token="+Oe.getToken(e))),e}}i.ProcessingServiceBase=dt;
  329. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  330. * This program are made available under the terms of the Apache License, Version 2.0
  331. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  332. class pt extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,ct,t)}}i.BuffersAnalystJobsService=pt;
  333. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  334. * This program are made available under the terms of the Apache License, Version 2.0
  335. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  336. class mt{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.BurstPipelineAnalystParameters"}destroy(){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=null}}i.BurstPipelineAnalystParameters=mt;
  337. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  338. * This program are made available under the terms of the Apache License, Version 2.0
  339. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  340. class ft extends Je{constructor(e,t){super(e,t),this.format=a.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t;(e=X.transformResult(e))&&this.format===a.GEOJSON&&"function"==typeof this.toGeoJSONResult&&(t=this.toGeoJSONResult(e)),t||(t=e),this.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}i.NetworkAnalystServiceBase=ft;
  341. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  342. * This program are made available under the terms of the Apache License, Version 2.0
  343. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  344. class yt extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof mt))return null;var t,s=this;if(s.url=X.urlPathAppend(s.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}i.BurstPipelineAnalystService=yt;
  345. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  346. * This program are made available under the terms of the Apache License, Version 2.0
  347. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  348. class gt extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ChartFeatureInfoSpecsService"}destroy(){super.destroy(),X.reset(this)}processAsync(){var e=this;e.isTempLayers||X.urlPathAppend(e.url,"chartFeatureInfoSpecs"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}i.ChartFeatureInfoSpecsService=gt;
  349. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  350. * This program are made available under the terms of the Apache License, Version 2.0
  351. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  352. class vt{constructor(e){this.isQueryPoint=null,this.isQueryLine=null,this.isQueryRegion=null,this.attributeFilter=null,this.chartFeatureInfoSpecCode=null,X.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryFilterParameter"}destroy(){var e=this;e.isQueryPoint=null,e.isQueryLine=null,e.isQueryRegion=null,e.attributeFilter=null,e.chartFeatureInfoSpecCode=null}toJson(){var e="";return e+='"isQueryPoint":'+this.isQueryPoint+",",e+='"isQueryLine":'+this.isQueryLine+",",e+='"isQueryRegion":'+this.isQueryRegion+",",this.attributeFilter&&(e+='"attributeFilter": "'+this.attributeFilter+'",'),e="{"+(e+='"chartFeatureInfoSpecCode":'+this.chartFeatureInfoSpecCode)+"}"}}i.ChartQueryFilterParameter=vt;
  353. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  354. * This program are made available under the terms of the Apache License, Version 2.0
  355. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  356. class St{constructor(e){this.queryMode=null,this.bounds=null,this.chartLayerNames=null,this.chartQueryFilterParameters=null,this.returnContent=!0,this.startRecord=0,this.expectCount=null,X.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryParameters"}destroy(){var e=this;e.queryMode=null,e.bounds=null,e.chartLayerNames=null,e.chartQueryFilterParameters=null,e.returnContent=!0,e.startRecord=0,e.expectCount=null}getVariablesJson(){var e="";if(e+='"queryMode":"'+this.queryMode+'",',this.chartLayerNames&&this.chartLayerNames.length){for(var t=[],s=this.chartLayerNames.length,r=0;r<s;r++)t.push('"'+this.chartLayerNames[r]+'"');e+='"chartLayerNames":'+("["+t.join(",")+"]")+","}if("ChartBoundsQuery"===this.queryMode&&this.bounds&&(e+='"bounds":{"leftBottom":{"x":'+this.bounds.left+',"y":'+this.bounds.bottom+'},"rightTop":{"x":'+this.bounds.right+',"y":'+this.bounds.top+"}},"),this.chartQueryFilterParameters&&this.chartQueryFilterParameters.length){for(var i=[],a=this.chartQueryFilterParameters.length,n=0;n<a;n++){var o=this.chartQueryFilterParameters[n];o instanceof vt&&i.push(o.toJson())}var l="["+i.join(",")+"]";l='"chartQueryParams":'+l+",",l+='"startRecord":'+this.startRecord+",",e+='"chartQueryParameters":'+(l="{"+(l+='"expectCount":'+this.expectCount)+"}")}return e="{"+e+"}"}}i.ChartQueryParameters=St;
  357. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  358. * This program are made available under the terms of the Apache License, Version 2.0
  359. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  360. class bt{constructor(e){e&&(this.customParams=null,this.prjCoordSys=null,this.expectCount=1e5,this.networkType=o.LINE,this.queryOption=l.ATTRIBUTEANDGEOMETRY,this.queryParams=null,this.startRecord=0,this.holdTime=10,this.returnCustomResult=!1,this.returnFeatureWithFieldCaption=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.QueryParameters")}destroy(){var e=this;if(e.customParams=null,e.expectCount=null,e.networkType=null,e.queryOption=null,e.queryParams){for(var t=0,s=e.queryParams,r=s.length;t<r;t++)s[t].destroy();e.queryParams=null}e.startRecord=null,e.holdTime=null,e.returnCustomResult=null,e.prjCoordSys=null}}i.QueryParameters=bt;
  361. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  362. * This program are made available under the terms of the Apache License, Version 2.0
  363. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  364. class xt extends Je{constructor(e,t){super(e,t),t=t||{},this.returnContent=null,this.format=a.GEOJSON,X.extend(this,t);t.format&&(this.format=t.format.toUpperCase()),this.url&&(this.url=X.urlPathAppend(this.url,"queryResults"),this.CLASS_NAME="SuperMap.ChartQueryService")}destroy(){Je.prototype.destroy.apply(this,arguments),this.returnContent=null,this.format=null}processAsync(e){if(e instanceof St){var t,s=this;s.returnContent=e.returnContent,t=e.getVariablesJson(),s.returnContent&&(s.url=X.urlAppend(s.url,"returnContent=true")),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){if((e=X.transformResult(e))&&e.recordsets&&this.format===a.GEOJSON)for(var t=0,s=e.recordsets,r=s.length;t<r;t++)if(s[t].features){var i=new Ce;s[t].features=i.toGeoJSON(s[t].features)}this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new bt({queryMode:e.queryMode,bounds:e.bounds,chartLayerNames:e.chartLayerNames,chartQueryFilterParameters:e.chartQueryFilterParameters,returnContent:e.returnContent})}}i.ChartQueryService=xt;i.ClipParameter=
  365. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  366. * This program are made available under the terms of the Apache License, Version 2.0
  367. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  368. class{constructor(e){this.clipDatasetName=null,this.clipDatasourceName=null,this.clipRegion=null,this.isClipInRegion=!0,this.isExactClip=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ClipParameter"}destroy(){var e=this;e.clipDatasetName=null,e.clipDatasourceName=null,e.clipRegion=null,e.isClipInRegion=null,e.isExactClip=null}toJSON(){return X.toJSON({isClipInRegion:this.isClipInRegion,clipDatasetName:this.clipDatasetName,clipDatasourceName:this.clipDatasourceName,isExactClip:this.isExactClip,clipRegion:xe.fromGeometry(this.clipRegion)})}};
  369. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  370. * This program are made available under the terms of the Apache License, Version 2.0
  371. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  372. class Ct{constructor(e){e=e||{},this.elevation=null,this.color=null,X.extend(this,e);var t=this.color;t&&(this.color=new ge(t.red,t.green,t.blue)),this.CLASS_NAME="SuperMap.ColorDictionary"}destroy(){X.reset(this)}toServerJSONObject(){var e={};return e=X.copyAttributes(e,this)}}i.ColorDictionary=Ct;
  373. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  374. * This program are made available under the terms of the Apache License, Version 2.0
  375. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  376. class _t{constructor(e){e&&(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}i.TransportationAnalystResultSetting=_t;
  377. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  378. * This program are made available under the terms of the Apache License, Version 2.0
  379. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  380. class Tt{constructor(e){e&&(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new _t,X.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}i.TransportationAnalystParameter=Tt;
  381. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  382. * This program are made available under the terms of the Apache License, Version 2.0
  383. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  384. class wt{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new Tt,X.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}i.ComputeWeightMatrixParameters=wt;
  385. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  386. * This program are made available under the terms of the Apache License, Version 2.0
  387. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  388. class Et extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof wt){var t,s=this;s.url=X.urlPathAppend(s.url,"weightmatrix"),t={parameter:X.toJSON(e.parameter),nodes:s.getJson(e.isAnalyzeById,e.nodes)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}}i.ComputeWeightMatrixService=Et;
  389. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  390. * This program are made available under the terms of the Apache License, Version 2.0
  391. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  392. class Mt extends Je{constructor(e,t){(t=t||{}).EVENT_TYPES=["broadcastSocketConnected","broadcastSocketError","broadcastFailed","broadcastSucceeded","subscribeSocketConnected","subscribeSocketError","messageSucceeded","setFilterParamSucceeded"],super(e,t),this.geometry=null,this.prjCoordSys=null,this.excludeField=null,X.extend(this,t),this.CLASS_NAME="SuperMap.DataFlowService"}initBroadcast(){var e=this;return this.broadcastWebSocket=this._connect(X.urlPathAppend(e.url,"broadcast")),this.broadcastWebSocket.onopen=function(t){e.broadcastWebSocket.isOpen=!0,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onclose=function(t){e.broadcastWebSocket.isOpen=!1,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onerror=function(t){t.eventType="broadcastSocketError",e.events.triggerEvent("broadcastSocketError",t)},this}broadcast(e){this.broadcastWebSocket&&this.broadcastWebSocket.isOpen?(this.broadcastWebSocket.send(JSON.stringify(e)),this.events.triggerEvent("broadcastSucceeded")):this.events.triggerEvent("broadcastFailed")}initSubscribe(){var e=this;return this.subscribeWebSocket=this._connect(X.urlPathAppend(e.url,"subscribe")),this.subscribeWebSocket.onopen=function(t){e.subscribeWebSocket.send(e._getFilterParams()),t.eventType="subscribeSocketConnected",e.events.triggerEvent("subscribeSocketConnected",t)},this.subscribeWebSocket.onerror=function(t){t.eventType="subscribeSocketError",e.events.triggerEvent("subscribeSocketError",t)},this.subscribeWebSocket.onmessage=function(t){e._onMessage(t)},this}setExcludeField(e){return this.excludeField=e,this.subscribeWebSocket.send(this._getFilterParams()),this}setGeometry(e){return this.geometry=e,this.subscribeWebSocket.send(this._getFilterParams()),this}unSubscribe(){this.subscribeWebSocket&&(this.subscribeWebSocket.close(),this.subscribeWebSocket=null)}unBroadcast(){this.broadcastWebSocket&&(this.broadcastWebSocket.close(),this.broadcastWebSocket=null)}destroy(){Je.prototype.destroy.apply(this,arguments);this.geometry=null,this.prjCoordSys=null,this.excludeField=null,this.unBroadcast(),this.unSubscribe()}_getFilterParams(){var e={filterParam:{prjCoordSys:this.prjCoordSys,excludeField:this.excludeField,geometry:this.geometry}};return X.toJSON(e)}_onMessage(e){if(e.data&&e.data.indexOf("filterParam")>=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var s=JSON.parse(e.data);e.featureResult=s,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}_connect(e){return e=this._appendCredentials(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}_appendCredentials(e){var t=Oe.getToken(e);return t&&(e=X.urlAppend(e,"token="+t)),e}}i.DataFlowService=Mt;
  393. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  394. * This program are made available under the terms of the Apache License, Version 2.0
  395. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  396. class At{constructor(e){e=e||{},this.bounds=null,this.dataSourceName=null,this.description=null,this.encodeType=null,this.isReadOnly=null,this.name=null,this.prjCoordSys=null,this.tableName=null,this.type=null,X.extend(this,e);var t=this.bounds;t&&(this.bounds=new K(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y)),this.CLASS_NAME="SuperMap.DatasetInfo"}destroy(){X.reset(this)}toServerJSONObject(){var e={};return(e=X.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}i.DatasetInfo=At;
  397. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  398. * This program are made available under the terms of the Apache License, Version 2.0
  399. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  400. class Pt{constructor(e){this.operation=T.UNION,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.OverlayAnalystParameters"}destroy(){this.operation=null}}i.OverlayAnalystParameters=Pt;
  401. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  402. * This program are made available under the terms of the Apache License, Version 2.0
  403. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  404. class Ot extends Pt{constructor(e){super(e),this.operateDataset=null,this.operateDatasetFields=[],this.operateDatasetFilter=new at,this.operateRegions=[],this.sourceDataset=null,this.sourceDatasetFields=[],this.sourceDatasetFilter=new at,this.tolerance=0,this.resultSetting=new st,X.extend(this,e),this.CLASS_NAME="SuperMap.DatasetOverlayAnalystParameters"}destroy(){super.destroy();var e=this;if(e.operateDataset=null,e.operateDatasetFields=null,e.operateDatasetFilter&&(e.operateDatasetFilter.destroy(),e.operateDatasetFilter=null),e.operateRegions){for(var t=0,s=e.operateRegions,r=s.length;t<r;t++)s[t].destroy();e.operateRegions=null}e.sourceDataset=null,e.sourceDatasetFields=null,e.sourceDatasetFilter&&(e.sourceDatasetFilter.destroy(),e.sourceDatasetFilter=null),e.tolerance=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null)}static toObject(e,t){for(var s in e)if("sourceDataset"!==s)if("operateRegions"===s){t.operateRegions=[];var r=e.operateRegions;for(var i in r)r.hasOwnProperty(i)&&(t.operateRegions[i]=xe.fromGeometry(r[i]))}else"resultSetting"===s?t.dataReturnOption=e.resultSetting:t[s]=e[s]}}i.DatasetOverlayAnalystParameters=Ot;
  405. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  406. * This program are made available under the terms of the Apache License, Version 2.0
  407. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  408. class Lt{constructor(e){this.clipRegion=null,this.datumValue=0,this.expectedZValues=null,this.interval=0,this.resampleTolerance=0,this.smoothMethod=E.BSPLINE,this.smoothness=0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.SurfaceAnalystParametersSetting"}destroy(){var e=this;e.clipRegion&&(e.clipRegion.destroy(),e.clipRegion=null),e.datumValue=null,e.expectedZValues=null,e.interval=null,e.resampleTolerance=null,e.smoothMethod=null,e.smoothness=null}toJSON(){let e="'datumValue':"+X.toJSON(this.datumValue);if(e+=",'interval':"+X.toJSON(this.interval),e+=",'resampleTolerance':"+X.toJSON(this.resampleTolerance),e+=",'smoothMethod':"+X.toJSON(this.smoothMethod),e+=",'smoothness':"+X.toJSON(this.smoothness),null!=this.expectedZValues&&(e+=",'expectedZValues':"+X.toJSON(this.expectedZValues)),null!=this.clipRegion){var t=this.clipRegion;this.clipRegion instanceof Z&&this.clipRegion.components&&(t=xe.fromGeometry(this.clipRegion)),e+=",'clipRegion':"+X.toJSON(t)}return"{"+e+"}"}}i.SurfaceAnalystParametersSetting=Lt;
  409. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  410. * This program are made available under the terms of the Apache License, Version 2.0
  411. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  412. class It{constructor(e){this.resolution=0,this.extractParameter=new Lt,this.resultSetting=new st,this.surfaceAnalystMethod=M.ISOLINE,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.SurfaceAnalystParameters"}destroy(){var e=this;e.resolution=null,e.extractParameter&&(e.extractParameter.destroy(),e.extractParameter=null),e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.surfaceAnalystMethod=null}}i.SurfaceAnalystParameters=It;
  413. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  414. * This program are made available under the terms of the Apache License, Version 2.0
  415. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  416. class Nt extends It{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new at,this.zValueFieldName=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.DatasetSurfaceAnalystParameters"}destroy(){super.destroy();var e=this;e.dataset=null,e.filterQueryParameter&&(e.filterQueryParameter.destroy(),e.filterQueryParameter=null),e.zValueFieldName=null}static toObject(e,t){for(var s in e)if("filterQueryParameter"===s&&(t.filterQueryParameter=e.filterQueryParameter),"extractParameter"===s)e.extractParameter.clipRegion instanceof Z&&e.extractParameter.clipRegion.components&&(e.extractParameter.clipRegion=xe.fromGeometry(e.extractParameter.clipRegion)),t.extractParameter=e.extractParameter;else{if("dataset"===s)continue;if("surfaceAnalystMethod"===s)continue;t[s]=e[s]}}}i.DatasetSurfaceAnalystParameters=Nt;
  417. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  418. * This program are made available under the terms of the Apache License, Version 2.0
  419. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  420. class Rt{constructor(e){e&&(this.clipRegion=null,this.createResultDataset=!1,this.resultDatasetName=null,this.resultDatasourceName=null,this.returnResultRegion=!0,X.extend(this,e),this.CLASS_NAME="SuperMap.ThiessenAnalystParameters")}destroy(){var e=this;e.clipRegion&&(e.clipRegion.destroy(),e.clipRegion=null),e.createResultDataset=null,e.resultDatasetName=null,e.resultDatasourceName=null,e.returnResultRegion=null}}i.ThiessenAnalystParameters=Rt;
  421. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  422. * This program are made available under the terms of the Apache License, Version 2.0
  423. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  424. class Ft extends Rt{constructor(e){super(e),this.filterQueryParameter=null,this.dataset=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.DatasetThiessenAnalystParameters"}destroy(){super.destroy();this.filterQueryParameter&&(this.filterQueryParameter.destroy(),this.filterQueryParameter=null)}static toObject(e,t){for(var s in e)"clipRegion"===s?t.clipRegion=xe.fromGeometry(e.clipRegion):t[s]=e[s]}}i.DatasetThiessenAnalystParameters=Ft;
  425. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  426. * This program are made available under the terms of the Apache License, Version 2.0
  427. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  428. class Dt{constructor(e){this.dataset=null,this.bounds=null,this.fieldName=null,this.resultGridDatasetResolution=null,this.searchRadius=null,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.DensityKernelAnalystParameters"}destroy(){var e=this;e.dataset=null,e.bounds=null,e.fieldName=null,e.resultGridDatasetResolution=null,e.searchRadius=null,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var s in e)"dataset"!==s&&(t[s]=e[s])}}i.DensityKernelAnalystParameters=Dt;
  429. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  430. * This program are made available under the terms of the Apache License, Version 2.0
  431. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  432. class kt extends Ke{constructor(e,t){super(e,t),this.mode=null,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.DensityAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t=this,s=new Object;e instanceof Dt&&(t.url=X.urlPathAppend(t.url,"datasets/"+e.dataset+"/densityanalyst/kernel"),t.mode="kernel"),Dt.toObject(e,s);var r=X.toJSON(s);t.url=X.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}i.DensityAnalystService=kt;
  433. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  434. * This program are made available under the terms of the Apache License, Version 2.0
  435. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  436. class Gt{constructor(e){this.dataSourceName=null,this.dataSetName=null,this.features=null,this.editType=P.ADD,this.IDs=null,this.returnContent=!1,this.isUseBatch=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.EditFeaturesParameters"}destroy(){var e=this;e.dataSourceName=null,e.dataSetName=null,e.features=null,e.editType=null,e.IDs=null,e.returnContent=null}static toJsonParameters(e){var t,s,r;if(e.editType===P.DELETE){if(null===e.IDs)return;r={ids:e.IDs}}else if(r=[],e.features){s=e.features.length;for(var i=0;i<s;i++)(t=e.features[i]).geometry=xe.fromGeometry(t.geometry),r.push(t)}return X.toJSON(r)}}i.EditFeaturesParameters=Gt;
  437. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  438. * This program are made available under the terms of the Apache License, Version 2.0
  439. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  440. class Bt extends Je{constructor(e,t){super(e,t),this.returnContent=!1,this.isUseBatch=!1,t&&X.extend(this,t),this.url=X.urlPathAppend(this.url,"features"),this.CLASS_NAME="SuperMap.EditFeaturesService"}destroy(){super.destroy();this.returnContent=null,this.isUseBatch=null,this.fromIndex=null,this.toIndex=null}processAsync(e){if(e instanceof Gt){var t=this,s="POST",r="",i=e.editType,a=null;t.returnContent=e.returnContent,t.isUseBatch=e.isUseBatch,a=Gt.toJsonParameters(e),i===P.DELETE?(r=X.toJSON(e.IDs),t.url=X.urlAppend(t.url,"ids="+r),s="DELETE",a=r):i===P.UPDATE?s="PUT":(t.isUseBatch&&(t.url=X.urlAppend(t.url,`isUseBatch=${t.isUseBatch}`),t.returnContent=!1),t.returnContent&&(t.url=X.urlAppend(t.url,"returnContent=true"),s="POST")),t.request({method:s,data:a,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}i.EditFeaturesService=Bt;
  441. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  442. * This program are made available under the terms of the Apache License, Version 2.0
  443. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  444. class Ut{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=null}}i.FacilityAnalyst3DParameters=Ut;
  445. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  446. * This program are made available under the terms of the Apache License, Version 2.0
  447. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  448. class jt extends Ut{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DParameters"}destroy(){super.destroy()}}i.FacilityAnalystSinks3DParameters=jt;
  449. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  450. * This program are made available under the terms of the Apache License, Version 2.0
  451. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  452. class Vt extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DService"}destroy(){Je.prototype.destroy.apply(this,arguments)}processAsync(e){if(e instanceof jt){var t,s=this;s.url=X.urlPathAppend(s.url,"sinks"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}i.FacilityAnalystSinks3DService=Vt;
  453. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  454. * This program are made available under the terms of the Apache License, Version 2.0
  455. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  456. class Ht extends Ut{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DParameters"}destroy(){super.destroy()}}i.FacilityAnalystSources3DParameters=Ht;
  457. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  458. * This program are made available under the terms of the Apache License, Version 2.0
  459. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  460. class Jt extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ht){var t,s=this;s.url=X.urlPathAppend(s.url,"sources"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}i.FacilityAnalystSources3DService=Jt;
  461. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  462. * This program are made available under the terms of the Apache License, Version 2.0
  463. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  464. class zt{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,X.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}i.FacilityAnalystStreamParameters=zt;
  465. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  466. * This program are made available under the terms of the Apache License, Version 2.0
  467. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  468. class qt extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof zt){var t,s=this;if(0===e.queryType)s.url=X.urlPathAppend(s.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;s.url=X.urlPathAppend(s.url,"downstreamcirticalfaclilities")}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID||null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed}))}}}i.FacilityAnalystStreamService=qt;
  469. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  470. * This program are made available under the terms of the Apache License, Version 2.0
  471. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  472. class Wt extends Ut{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}i.FacilityAnalystTracedown3DParameters=Wt;
  473. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  474. * This program are made available under the terms of the Apache License, Version 2.0
  475. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  476. class Yt extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Wt){var t,s=this;s.url=X.urlPathAppend(s.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}i.FacilityAnalystTracedown3DService=Yt;
  477. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  478. * This program are made available under the terms of the Apache License, Version 2.0
  479. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  480. class Xt extends Ut{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}i.FacilityAnalystTraceup3DParameters=Xt;
  481. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  482. * This program are made available under the terms of the Apache License, Version 2.0
  483. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  484. class Qt extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Xt){var t,s=this;s.url=X.urlPathAppend(s.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}i.FacilityAnalystTraceup3DService=Qt;
  485. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  486. * This program are made available under the terms of the Apache License, Version 2.0
  487. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  488. class Kt extends Ut{constructor(e){super(e),e=e||{},this.sourceNodeIDs=null,X.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DParameters"}destroy(){super.destroy(),this.sourceNodeIDs=null}}i.FacilityAnalystUpstream3DParameters=Kt;
  489. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  490. * This program are made available under the terms of the Apache License, Version 2.0
  491. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  492. class Zt extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Kt){var t,s=this;s.url=X.urlPathAppend(s.url,"upstreamcirticalfaclilities"),t={sourceNodeIDs:e.sourceNodeIDs,edgeID:e.edgeID,nodeID:e.nodeID,isUncertainDirectionValid:e.isUncertainDirectionValid},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}i.FacilityAnalystUpstream3DService=Zt;i.FilterAggParameter=
  493. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  494. * This program are made available under the terms of the Apache License, Version 2.0
  495. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  496. class extends Xe{constructor(e){super(e),this.filterParam=null,this.aggType=j.FILTER,this.CLASS_NAME="SuperMap.FilterAggParameter",X.extend(this,e)}destroy(){super.destroy(),this.filterParam&&(this.filterParam=null)}};
  497. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  498. * This program are made available under the terms of the Apache License, Version 2.0
  499. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  500. class $t{constructor(e){this.datasource=null,this.dataset=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.FieldParameters"}destroy(){this.datasource=null,this.dataset=null}}i.FieldParameters=$t;i.FieldStatisticsParameters=
  501. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  502. * This program are made available under the terms of the Apache License, Version 2.0
  503. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  504. class extends $t{constructor(e){super(e),this.fieldName=null,this.statisticMode=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.FieldStatisticsParameters"}destroy(){this.fieldName=null,this.statisticMode=null}};
  505. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  506. * This program are made available under the terms of the Apache License, Version 2.0
  507. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  508. class es extends Je{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.FieldStatisticService"}destroy(){super.destroy();this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null}processAsync(){var e=this,t="datasources/"+e.datasource+"/datasets/"+e.dataset+"/fields/"+e.field+"/"+e.statisticMode;e.url=X.urlPathAppend(e.url,t),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}i.FieldStatisticService=es;
  509. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  510. * This program are made available under the terms of the Apache License, Version 2.0
  511. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  512. class ts{constructor(e){this.event=null,this.expectFacilityCount=1,this.facilities=null,this.fromEvent=!1,this.isAnalyzeById=!1,this.maxWeight=0,this.parameter=new Tt,X.extend(this,e),this.CLASS_NAME="SuperMap.FindClosestFacilitiesParameters"}destroy(){var e=this;e.event=null,e.expectFacilityCount=null,e.facilities=null,e.fromEvent=null,e.isAnalyzeById=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}i.FindClosestFacilitiesParameters=ts;
  513. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  514. * This program are made available under the terms of the Apache License, Version 2.0
  515. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  516. class ss extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ts){var t,s=this;s.url=X.urlPathAppend(s.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:X.toJSON(e.parameter),event:X.toJSON(e.event),facilities:s.getJson(e.isAnalyzeById,e.facilities)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new Ce;return e.facilityPathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}i.FindClosestFacilitiesService=ss;
  517. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  518. * This program are made available under the terms of the Apache License, Version 2.0
  519. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  520. class rs{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,X.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,s=e.supplyCenters,r=s.length;t<r;t++)s[t].destroy();e.supplyCenters=null}}}i.FindLocationParameters=rs;
  521. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  522. * This program are made available under the terms of the Apache License, Version 2.0
  523. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  524. class is extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof rs){var t,s=this;s.url=X.urlPathAppend(s.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:X.toJSON(e.mapParameter),supplyCenters:s.getCentersJson(e.supplyCenters)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getCentersJson(e){for(var t="[",s=e?e.length:0,r=0;r<s;r++)r>0&&(t+=","),t+=X.toJSON(e[r]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new Ce;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}i.FindLocationService=is;
  525. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  526. * This program are made available under the terms of the Apache License, Version 2.0
  527. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  528. class as{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new Tt,X.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}i.FindMTSPPathsParameters=as;
  529. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  530. * This program are made available under the terms of the Apache License, Version 2.0
  531. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  532. class ns extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof as){var t,s=this,r=s.getJson(e.isAnalyzeById,e.centers),i=s.getJson(e.isAnalyzeById,e.nodes);s.url=X.urlPathAppend(s.url,"mtsppath"),t={centers:r,nodes:i,parameter:X.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new Ce;return e.pathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}i.FindMTSPPathsService=ns;
  533. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  534. * This program are made available under the terms of the Apache License, Version 2.0
  535. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  536. class os{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new Tt,X.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}i.FindPathParameters=os;
  537. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  538. * This program are made available under the terms of the Apache License, Version 2.0
  539. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  540. class ls extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof os){var t,s=this;s.url=X.urlPathAppend(s.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:X.toJSON(e.parameter),nodes:s.getJson(e.isAnalyzeById,e.nodes)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new Ce;return e.pathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}i.FindPathService=ls;
  541. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  542. * This program are made available under the terms of the Apache License, Version 2.0
  543. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  544. class hs{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new Tt,X.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}i.FindServiceAreasParameters=hs;
  545. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  546. * This program are made available under the terms of the Apache License, Version 2.0
  547. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  548. class us extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){super.destroy()}processAsync(e){if(e instanceof hs){var t,s=this;s.url=X.urlPathAppend(s.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:X.toJSON(e.parameter),centers:s.getJson(e.isAnalyzeById,e.centers),weights:s.getJson(!0,e.weights)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<r;e++)e>0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new Ce;return e.serviceAreaList.map(function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e}),e}}i.FindServiceAreasService=us;
  549. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  550. * This program are made available under the terms of the Apache License, Version 2.0
  551. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  552. class cs{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new Tt,X.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}i.FindTSPPathsParameters=cs;
  553. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  554. * This program are made available under the terms of the Apache License, Version 2.0
  555. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  556. class ds extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof cs){var t,s=this;s.url=X.urlPathAppend(s.url,"tsppath"),t={parameter:i.Util.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:s.getNodesJson(e)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getNodesJson(e){var t,s,r,i,a="";if(!1===e.isAnalyzeById){for(t="[",s=0,r=(i=e.nodes).length;s<r;s++)s>0&&(t+=","),t+='{"x":'+i[s].x+',"y":'+i[s].y+"}";a+=t+="]"}else if(!0===e.isAnalyzeById){let t="[",s=e.nodes,r=s.length;for(let e=0;e<r;e++)e>0&&(t+=","),t+=s[e];a+=t+="]"}return a}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new Ce;return e.tspPathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}i.FindTSPPathsService=ds;
  557. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  558. * This program are made available under the terms of the Apache License, Version 2.0
  559. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  560. class ps{constructor(e){this.routeTable=null,this.routeIDField=null,this.attributeFilter=null,this.eventTable=null,this.eventRouteIDField=null,this.measureField=null,this.measureStartField=null,this.measureEndField=null,this.measureOffsetField=null,this.errorInfoField=null,this.retainedFields=null,this.dataReturnOption=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.GenerateSpatialDataParameters"}destroy(){var e=this;e.routeTable&&(e.routeTable=null),e.routeIDField=null,e.attributeFilter=null,e.eventTable=null,e.eventRouteIDField=null,e.measureField=null,e.measureStartField=null,e.measureEndField=null,e.measureOffsetField=null,e.errorInfoField=null,e.dataReturnOption&&(e.dataReturnOption.destroy(),e.dataReturnOption=null)}}i.GenerateSpatialDataParameters=ps;
  561. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  562. * This program are made available under the terms of the Apache License, Version 2.0
  563. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  564. class ms extends Ke{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GenerateSpatialDataService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ps){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata";return this.url=X.urlPathAppend(this.url,t),this.url=X.urlAppend(this.url,"returnContent=true"),X.toJSON(e)}}i.GenerateSpatialDataService=ms;i.GeoBoundingBoxQueryBuilderParameter=
  565. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  566. * This program are made available under the terms of the Apache License, Version 2.0
  567. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  568. class extends Ye{constructor(e){super(e),this.bounds=null,this.queryType=V.GEO_BOUNDING_BOX,this.CLASS_NAME="SuperMap.GeoBoundingBoxQueryBuilderParameter",X.extend(this,e)}destroy(){super.destroy(),this.bounds=null,this.queryType=null}};i.GeoHashGridAggParameter=
  569. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  570. * This program are made available under the terms of the Apache License, Version 2.0
  571. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  572. class extends Xe{constructor(e){super(e),this.precision=5,this.aggType=j.GEOHASH_GRID,X.extend(this,e),this.CLASS_NAME="SuperMap.GeoHashGridAggParameter"}destroy(){super.destroy(),this.aggType=null}static toJsonParameters(e){var t={aggName:e.aggName,aggFieldName:e.aggFieldName,aggType:e.aggType,precision:e.precision};return e.subAgg&&(t.subAgg=e.subAgg),X.toJson(t)}};
  573. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  574. * This program are made available under the terms of the Apache License, Version 2.0
  575. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  576. class fs extends Pt{constructor(e){super(e),e&&e.operateGeometry&&(this.operateGeometry=e.operateGeometry),e&&e.sourceGeometry&&(this.sourceGeometry=e.sourceGeometry),e&&e.operateGeometries&&(this.operateGeometries=e.operateGeometries),e&&e.sourceGeometries&&(this.sourceGeometries=e.sourceGeometries),e&&X.extend(this,e),this.CLASS_NAME="SuperMap.GeometryOverlayAnalystParameters"}destroy(){super.destroy();var e=this;e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.sourceGeometries&&(e.sourceGeometries.destroy(),e.sourceGeometries=null),e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.operateGeometries&&(e.operateGeometries.destroy(),e.operateGeometries=null)}static toObject(e,t){for(var s in e)if("sourceGeometry"===s)t.sourceGeometry=xe.fromGeometry(e.sourceGeometry);else if("sourceGeometries"===s){for(var r=[],i=0;i<e.sourceGeometries.length;i++)r.push(xe.fromGeometry(e.sourceGeometries[i]));t.sourceGeometries=r}else if("operateGeometry"===s)t.operateGeometry=xe.fromGeometry(e.operateGeometry);else if("operateGeometries"===s){for(var a=[],n=0;n<e.operateGeometries.length;n++)a.push(xe.fromGeometry(e.operateGeometries[n]));t.operateGeometries=a}else t[s]=e[s]}}i.GeometryOverlayAnalystParameters=fs;
  577. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  578. * This program are made available under the terms of the Apache License, Version 2.0
  579. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  580. class ys extends It{constructor(e){super(e),this.points=null,this.zValues=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.GeometrySurfaceAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=0,t=this.points,s=t.length;e<s;e++)t[e].destroy();this.points=null}this.zValues=null}}i.GeometrySurfaceAnalystParameters=ys;
  581. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  582. * This program are made available under the terms of the Apache License, Version 2.0
  583. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  584. class gs extends Rt{constructor(e){super(e),this.points=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.GeometryThiessenAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=this.points.length-1;e>=0;e--)this.points[e].destroy();this.points=null}}static toObject(e,t){for(var s in e)"clipRegion"===s?t.clipRegion=xe.fromGeometry(e.clipRegion):t[s]=e[s]}}i.GeometryThiessenAnalystParameters=gs;class vs extends Je{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.GeoprocessingService",this.headers={},this.crossOrigin=!0}getTools(){this._get(`${this.url}/list`)}getTool(e){this._get(`${this.url}/${e}`)}execute(e,t,s){const r={parameter:t=t||null,environment:s=s||null};this._get(`${this.url}/${e}/execute`,r)}submitJob(e,t,s){const r={parameter:t=t||null,environments:s=s||null};this.request({url:`${this.url}/${e}/jobs`,headers:{"Content-type":"application/json"},method:"POST",data:JSON.stringify(r),scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}waitForJobCompletion(e,t,s){const r=this,i=setInterval(function(){r._get(`${r.url}/${t}/jobs/${e}`,null,function(e){const t=e.state.runState;switch(s.statusCallback&&s.statusCallback(t),t){case"FINISHED":clearInterval(i),r.events.triggerEvent("processCompleted",{result:e});break;case"FAILED":case"CANCELED":clearInterval(i),r.events.triggerEvent("processFailed",{result:e})}})},s.interval)}getJobInfo(e,t){this._get(`${this.url}/${e}/jobs/${t}`)}cancelJob(e,t){this._get(`${this.url}/${e}/jobs/${t}/cancel`)}getJobs(e){let t=`${this.url}/jobs`;e&&(t=`${this.url}/${e}/jobs`),this._get(t)}getResults(e,t,s){let r=`${this.url}/${e}/jobs/${t}/results`;s&&(r=`${r}/${s}`),this._get(r)}_get(e,t,s,r){this.request({url:e,method:"GET",params:t,headers:{"Content-type":"application/json"},scope:this,success:s||this.serviceProcessCompleted,failure:r||this.serviceProcessFailed})}}i.GeoprocessingService=vs;
  585. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  586. * This program are made available under the terms of the Apache License, Version 2.0
  587. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  588. class Ss{constructor(e){this.dataset=null,this.sourceFilter=null,this.referenceFilter=null,this.spatialRelationType=null,this.isBorderInside=null,this.returnFeature=null,this.returnGeoRelatedOnly=null,this.startRecord=0,this.expectCount=500,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.GeoRelationAnalystParameters"}destroy(){var e=this;e.sourceFilter&&e.sourceFilter.destroy(),e.sourceFilter=null,e.referenceFilter&&e.referenceFilter.destroy(),e.referenceFilter=null,e.dataset=null,e.spatialRelationType=null,e.isBorderInside=null,e.returnFeature=null,e.returnGeoRelatedOnly=null,e.startRecord=null,e.expectCount=null}}i.GeoRelationAnalystParameters=Ss;
  589. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  590. * This program are made available under the terms of the Apache License, Version 2.0
  591. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  592. class bs extends Ke{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GeoRelationAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ss){var t=this;t.url=X.urlPathAppend(t.url,"datasets/"+e.dataset+"/georelation");var s=i.Util.toJSON(e);t.url=X.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}i.GeoRelationAnalystService=bs;
  593. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  594. * This program are made available under the terms of the Apache License, Version 2.0
  595. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  596. class xs{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.aggregations=null,X.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}i.GetFeaturesParametersBase=xs;
  597. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  598. * This program are made available under the terms of the Apache License, Version 2.0
  599. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  600. class Cs extends xs{constructor(e){super(e),this.getFeatureMode=Cs.getFeatureMode.BOUNDS,this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=h.CONTAIN,X.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,s,r;return s={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},r={datasetNames:e.datasetNames,getFeatureMode:Cs.getFeatureMode.BOUNDS,bounds:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new at).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode=Cs.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),X.toJSON(r)}}Cs.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"},i.GetFeaturesByBoundsParameters=Cs;
  601. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  602. * This program are made available under the terms of the Apache License, Version 2.0
  603. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  604. class _s extends Je{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.maxFeatures=null,this.format=a.GEOJSON,X.extend(this,t),this.url=X.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null}processAsync(e){if(e){var t,s=this,r=!0;s.returnContent=e.returnContent,s.fromIndex=e.fromIndex,s.toIndex=e.toIndex,s.maxFeatures=e.maxFeatures,s.returnContent&&(s.url=X.urlAppend(s.url,"returnContent="+s.returnContent),r=!1),null!=s.fromIndex&&null!=s.toIndex&&!isNaN(s.fromIndex)&&!isNaN(s.toIndex)&&s.fromIndex>=0&&s.toIndex>=0&&!r&&(s.url=X.urlAppend(s.url,`fromIndex=${s.fromIndex}&toIndex=${s.toIndex}`)),e.returnCountOnly&&(s.url=X.urlAppend(s.url,"&returnCountOnly="+e.returnContent)),t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){if(e=X.transformResult(e),this.format===a.GEOJSON&&e.features){var t=new Ce;e.features=t.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}i.GetFeaturesServiceBase=_s;
  605. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  606. * This program are made available under the terms of the Apache License, Version 2.0
  607. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  608. class Ts extends _s{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return Cs.toJsonParameters(e)}}i.GetFeaturesByBoundsService=Ts;
  609. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  610. * This program are made available under the terms of the Apache License, Version 2.0
  611. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  612. class ws extends xs{constructor(e){super(e),this.bufferDistance=null,this.attributeFilter=null,this.geometry=null,this.fields=null,X.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBufferParameters"}destroy(){super.destroy();var e=this;if(e.bufferDistance=null,e.attributeFilter=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}static toJsonParameters(e){var t,s,r;return r=xe.fromGeometry(e.geometry),s={datasetNames:e.datasetNames,getFeatureMode:"BUFFER",bufferDistance:e.bufferDistance,geometry:r},e.fields&&((t=new at).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode="BUFFER_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),X.toJSON(s)}}i.GetFeaturesByBufferParameters=ws;
  613. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  614. * This program are made available under the terms of the Apache License, Version 2.0
  615. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  616. class Es extends _s{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBufferService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof ws)return i.GetFeaturesByBufferParameters.toJsonParameters(e)}}i.GetFeaturesByBufferService=Es;
  617. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  618. * This program are made available under the terms of the Apache License, Version 2.0
  619. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  620. class Ms extends xs{constructor(e){super(e),this.getFeatureMode="SPATIAL",this.geometry=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=h.CONTAIN,X.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryParameters"}destroy(){super.destroy();var e=this;if(e.geometry&&(e.geometry.destroy(),e.geometry=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,s,r;return s=xe.fromGeometry(e.geometry),r={datasetNames:e.datasetNames,getFeatureMode:"SPATIAL",geometry:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new at).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode="SPATIAL_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),X.toJSON(r)}}i.GetFeaturesByGeometryParameters=Ms;
  621. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  622. * This program are made available under the terms of the Apache License, Version 2.0
  623. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  624. class As extends _s{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){return Ms.toJsonParameters(e)}}i.GetFeaturesByGeometryService=As;
  625. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  626. * This program are made available under the terms of the Apache License, Version 2.0
  627. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  628. class Ps extends xs{constructor(e){super(e),this.getFeatureMode="ID",this.IDs=null,this.fields=null,X.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByIDsParameters"}destroy(){super.destroy();var e=this;if(e.IDs=null,e.getFeatureMode=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}}static toJsonParameters(e){var t,s;return t={datasetNames:e.datasetNames,getFeatureMode:"ID",ids:e.IDs},e.fields&&((s=new at).name=e.datasetNames,s.fields=e.fields,t.queryParameter=s),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),X.toJSON(t)}}i.GetFeaturesByIDsParameters=Ps;
  629. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  630. * This program are made available under the terms of the Apache License, Version 2.0
  631. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  632. class Os extends _s{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByIDsService"}destroy(){super.destroy()}getJsonParameters(e){return Ps.toJsonParameters(e)}}i.GetFeaturesByIDsService=Os;
  633. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  634. * This program are made available under the terms of the Apache License, Version 2.0
  635. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  636. class Ls extends xs{constructor(e){super(e),this.getFeatureMode="SQL",this.queryParameter=null,X.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesBySQLParameters"}destroy(){super.destroy();this.getFeatureMode=null,this.queryParameter&&(this.queryParameter.destroy(),this.queryParameter=null)}static toJsonParameters(e){var t={datasetNames:e.datasetNames,getFeatureMode:"SQL",queryParameter:e.queryParameter};return e.maxFeatures&&!isNaN(e.maxFeatures)&&(t.maxFeatures=e.maxFeatures),e.aggregations&&(t.aggregations=e.aggregations),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),X.toJSON(t)}}i.GetFeaturesBySQLParameters=Ls;
  637. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  638. * This program are made available under the terms of the Apache License, Version 2.0
  639. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  640. class Is extends _s{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesBySQLService"}destroy(){super.destroy()}getJsonParameters(e){return Ls.toJsonParameters(e)}}i.GetFeaturesBySQLService=Is;
  641. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  642. * This program are made available under the terms of the Apache License, Version 2.0
  643. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  644. class Ns extends Je{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.GetFieldsService"}destroy(){super.destroy();this.datasource=null,this.dataset=null}processAsync(){var e=this;e.url=X.urlPathAppend(e.url,`datasources/${e.datasource}/datasets/${e.dataset}/fields`),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}i.GetFieldsService=Ns;
  645. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  646. * This program are made available under the terms of the Apache License, Version 2.0
  647. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  648. class Rs{constructor(e){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null,X.extend(this,e),this.CLASS_NAME="SuperMap.GetGridCellInfosParameters"}destroy(){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null}}i.GetGridCellInfosParameters=Rs;
  649. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  650. * This program are made available under the terms of the Apache License, Version 2.0
  651. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  652. class Fs extends Je{constructor(e,t){super(e,t),this.datasetName=null,this.dataSourceName=null,this.datasetType=null,this.X=null,this.Y=null,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.GetGridCellInfosService"}destroy(){super.destroy();var e=this;e.X=null,e.Y=null,e.datasetName=null,e.dataSourceName=null,e.datasetType=null}processAsync(e){if(e instanceof Rs){X.extend(this,e);var t=this;t.url=X.urlPathAppend(t.url,`datasources/${t.dataSourceName}/datasets/${t.datasetName}`),t.queryRequest(t.getDatasetInfoCompleted,t.getDatasetInfoFailed)}}queryRequest(e,t){this.request({method:"GET",data:null,scope:this,success:e,failure:t})}getDatasetInfoCompleted(e){e=X.transformResult(e),this.datasetType=e.datasetInfo.type,this.queryGridInfos()}queryGridInfos(){var e=this;e.url=X.urlPathAppend(e.url,"GRID"==e.datasetType?"gridValue":"imageValue"),null!=e.X&&null!=e.Y&&(e.url=X.urlAppend(e.url,`x=${e.X}&y=${e.Y}`)),e.queryRequest(e.serviceProcessCompleted,e.serviceProcessFailed)}getDatasetInfoFailed(e){this.serviceProcessFailed(e)}}i.GetGridCellInfosService=Fs;i.ThemeMemoryData=
  653. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  654. * This program are made available under the terms of the Apache License, Version 2.0
  655. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  656. class{constructor(e,t){this.srcData=e,this.targetData=t,this.CLASS_NAME="SuperMap.ThemeMemoryData"}destroy(){this.srcData=null,this.targetData=null}toJSON(){if(this.srcData&&this.targetData){for(var e="",t=Math.min(this.srcData.length,this.targetData.length),s=0;s<t;s++)e+="'"+this.srcData[s]+"':'"+this.targetData[s]+"',";return s>0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}};
  657. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  658. * This program are made available under the terms of the Apache License, Version 2.0
  659. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  660. class Ds{constructor(e,t){if(!e)return this;this.memoryData=null,this.type=e,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.Theme"}destroy(){this.memoryData&&(this.memoryData.destroy(),this.memoryData=null),this.type=null}toServerJSONObject(){}}i.Theme=Ds;
  661. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  662. * This program are made available under the terms of the Apache License, Version 2.0
  663. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  664. class ks{constructor(e){this.align=S.BASELINECENTER,this.backColor=new ge(255,255,255),this.foreColor=new ge(0,0,0),this.backOpaque=!1,this.sizeFixed=!0,this.fontHeight=6,this.fontWidth=0,this.fontWeight=400,this.fontName="Times New Roman",this.bold=!1,this.italic=!1,this.italicAngle=0,this.shadow=!1,this.strikeout=!1,this.outline=!1,this.opaqueRate=0,this.underline=!1,this.rotation=0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ServerTextStyle"}destroy(){var e=this;e.align=null,e.backColor&&(e.backColor.destroy(),e.backColor=null),e.foreColor&&(e.foreColor.destroy(),e.foreColor=null),e.backOpaque=null,e.sizeFixed=null,e.fontHeight=null,e.fontWidth=null,e.fontWeight=null,e.fontName=null,e.bold=null,e.italic=null,e.italicAngle=null,e.shadow=null,e.strikeout=null,e.outline=null,e.opaqueRate=null,e.underline=null,e.rotation=null}static fromObj(e){var t=new ks(e);return X.copy(t,e),t.backColor=ge.fromJson(e.backColor),t.foreColor=ge.fromJson(e.foreColor),t}}i.ServerTextStyle=ks;
  665. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  666. * This program are made available under the terms of the Apache License, Version 2.0
  667. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  668. class Gs{constructor(e){this.caption=null,this.end=0,this.start=0,this.visible=!0,this.style=new ks,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new Gs;return X.copy(t,e),t}}}i.ThemeLabelItem=Gs;
  669. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  670. * This program are made available under the terms of the Apache License, Version 2.0
  671. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  672. class Bs{constructor(e){this.caption=null,this.style=new ve,this.unique=null,this.visible=!0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=X.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){var t=new Bs;return X.copy(t,e),t.style=ve.fromJson(e.style),t}}i.ThemeUniqueItem=Bs;
  673. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  674. * This program are made available under the terms of the Apache License, Version 2.0
  675. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  676. class Us{constructor(e){this.flowEnabled=!1,this.leaderLineDisplayed=!1,this.leaderLineStyle=new ve,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeFlow"}destroy(){var e=this;e.flowEnabled=null,e.leaderLineDisplayed=null,e.leaderLineStyle&&(e.leaderLineStyle.destroy(),e.leaderLineStyle=null)}static fromObj(e){if(e){var t=new Us;return X.copy(t,e),t.leaderLineStyle=ve.fromJson(e.leaderLineStyle),t}}}i.ThemeFlow=Us;
  677. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  678. * This program are made available under the terms of the Apache License, Version 2.0
  679. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  680. class js{constructor(e){this.offsetFixed=!1,this.offsetX="0.0",this.offsetY="0.0",e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeOffset"}destroy(){this.offsetFixed=null,this.offsetX=null,this.offsetY=null}static fromObj(e){if(e){var t=new js;return X.copy(t,e),t}}}i.ThemeOffset=js;
  681. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  682. * This program are made available under the terms of the Apache License, Version 2.0
  683. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  684. class Vs{constructor(e){this.defaultStyle=null,this.separator=null,this.separatorEnabled=!1,this.splitIndexes=null,this.styles=new ks,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.LabelMixedTextStyle"}destroy(){var e=this;if(e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null),e.separator=null,e.separatorEnabled=null,e.splitIndexes&&(e.splitIndexes=null),e.styles){for(var t=0,s=e.styles,r=s.length;t<r;t++)s[t].destroy();e.styles=null}}static fromObj(e){if(e){var t=new Vs,s=e.styles;if(X.copy(t,e),t.defaultStyle=new ks(e.defaultStyle),s){t.styles=[];for(var r=0,i=s.length;r<i;r++)t.styles.push(new ks(s[r]))}return t}}}i.LabelMixedTextStyle=Vs;
  685. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  686. * This program are made available under the terms of the Apache License, Version 2.0
  687. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  688. class Hs{constructor(e){this.maxTextHeight=0,this.maxTextWidth=0,this.minTextHeight=0,this.minTextWidth=0,this.uniformStyle=new ks,this.uniformMixedStyle=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelText"}destroy(){var e=this;e.maxTextHeight=null,e.maxTextWidth=null,e.minTextHeight=null,e.minTextWidth=null,e.uniformStyle&&(e.uniformStyle.destroy(),e.uniformStyle=null),e.uniformMixedStyle&&(e.uniformMixedStyle.destroy(),e.uniformMixedStyle=null)}static fromObj(e){if(e){var t=new Hs;return X.copy(t,e),t.uniformStyle=ks.fromObj(e.uniformStyle),t.uniformMixedStyle=Vs.fromObj(e.uniformMixedStyle),t}}}i.ThemeLabelText=Hs;
  689. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  690. * This program are made available under the terms of the Apache License, Version 2.0
  691. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  692. class Js{constructor(e){this.isAlongLine=!0,this.alongLineDirection=b.LB_TO_RT,this.angleFixed=!1,this.repeatedLabelAvoided=!1,this.repeatIntervalFixed=!1,this.labelRepeatInterval=0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelAlongLine"}destroy(){var e=this;e.isAlongLine=null,e.alongLineDirection=null,e.angleFixed=null,e.repeatedLabelAvoided=null,e.repeatIntervalFixed=null,e.labelRepeatInterval=null}static fromObj(e){if(e){var t=new Js;return X.copy(t,e),t}}}i.ThemeLabelAlongLine=Js;
  693. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  694. * This program are made available under the terms of the Apache License, Version 2.0
  695. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  696. class zs{constructor(e){this.labelBackShape=x.NONE,this.backStyle=new ve,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelBackground"}destroy(){this.labelBackShape=null,this.backStyle&&(this.backStyle.destroy(),this.backStyle=null)}static fromObj(e){if(e){var t=new zs;return t.labelBackShape=e.labelBackShape,t.backStyle=ve.fromJson(e.backStyle),t}}}i.ThemeLabelBackground=zs;
  697. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  698. * This program are made available under the terms of the Apache License, Version 2.0
  699. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  700. class qs extends Ds{constructor(e){super("LABEL",e),this.alongLine=new Js,this.background=new zs,this.flow=new Us,this.items=null,this.uniqueItems=null,this.labelExpression=null,this.labelOverLengthMode=C.NONE,this.matrixCells=null,this.maxLabelLength=256,this.numericPrecision=0,this.offset=new js,this.overlapAvoided=!0,this.rangeExpression=null,this.uniqueExpression=null,this.smallGeometryLabeled=!1,this.text=new Hs,this.textSpace=0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabel"}destroy(){super.destroy();var e=this;if(e.alongLine=null,e.background&&(e.background.destroy(),e.background=null),e.flow=null,e.items){for(var t=0,s=e.items,r=s.length;t<r;t++)s[t].destroy();e.items=null}if(e.uniqueItems){for(var i=0,a=e.uniqueItems,n=a.length;i<n;i++)a[i].destory();e.uniqueItems=null}e.labelExpression=null,e.labelOverLengthMode=null,e.matrixCells=null,e.maxLabelLength=null,e.numericPrecision=null,e.overlapAvoided=null,e.rangeExpression=null,e.uniqueExpression=null,e.offset&&(e.offset.destroy(),e.offset=null),e.overlapAvoided=null,e.smallGeometryLabeled=null,e.text&&(e.text.destroy(),e.text=null),e.textSpace=null}toJSON(){return X.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,e.memoryData=this.memoryData,this.alongLine&&(e.alongLine=this.alongLine.isAlongLine,e.alongLineDirection=this.alongLine.alongLineDirection,e.angleFixed=this.alongLine.angleFixed,e.isLabelRepeated=this.alongLine.isLabelRepeated,e.labelRepeatInterval=this.alongLine.labelRepeatInterval,e.repeatedLabelAvoided=this.alongLine.repeatedLabelAvoided,e.repeatIntervalFixed=this.alongLine.repeatIntervalFixed),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.text&&(e.maxTextHeight=this.text.maxTextHeight,e.maxTextWidth=this.text.maxTextWidth,e.minTextHeight=this.text.minTextHeight,e.minTextWidth=this.text.minTextWidth,e.uniformStyle=this.text.uniformStyle,e.uniformMixedStyle=this.text.uniformMixedStyle),this.background&&(e.labelBackShape=this.background.labelBackShape,e.backStyle=this.background.backStyle),e.labelOverLengthMode=this.labelOverLengthMode,e.maxLabelLength=this.maxLabelLength,e.smallGeometryLabeled=this.smallGeometryLabeled,e.rangeExpression=this.rangeExpression,e.uniqueExpression=this.uniqueExpression,e.numericPrecision=this.numericPrecision,e.items=this.items,e.uniqueItems=this.uniqueItems,e.labelExpression=this.labelExpression,e.overlapAvoided=this.overlapAvoided,e.matrixCells=this.matrixCells,e.textSpace=this.textSpace,e}static fromObj(e){if(e){var t=new qs,s=e.items,r=e.uniqueItems,i=e.matrixCells;if(e.matrixCells=null,X.copy(t,e),t.alongLine=Js.fromObj(e),t.background=zs.fromObj(e),t.flow=new Us({flowEnabled:e.flowEnabled,leaderLineDisplayed:e.leaderLineDisplayed,leaderLineStyle:e.leaderLineStyle}),s){t.items=[];for(var a=0,n=s.length;a<n;a++)t.items.push(Gs.fromObj(s[a]))}if(r){t.uniqueItems=[];for(let e=0,s=r.length;e<s;e++)t.uniqueItems.push(Bs.fromObj(r[e]))}if(i){t.matrixCells=[];for(let e=0,t=i.length;e<t;e++);}return t.offset=js.fromObj(e),t.text=Hs.fromObj(e),t}}}i.ThemeLabel=qs;
  701. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  702. * This program are made available under the terms of the Apache License, Version 2.0
  703. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  704. class Ws extends Ds{constructor(e){super("UNIQUE",e),this.defaultStyle=new ve,this.items=null,this.uniqueExpression=null,this.colorGradientType=v.YELLOW_RED,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUnique"}destroy(){super.destroy();var e=this;if(e.uniqueExpression=null,e.colorGradientType=null,e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null)}toServerJSONObject(){var e={};if((e=X.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,r=0;r<s;r++)t.push(e.items[r].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new Ws,s=e.items,r=s?s.length:0;X.extend(t,e),t.items=[],t.defaultStyle=ve.fromJson(e.defaultStyle);for(var i=0;i<r;i++)t.items.push(Bs.fromObj(s[i]));return t}}i.ThemeUnique=Ws;
  705. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  706. * This program are made available under the terms of the Apache License, Version 2.0
  707. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  708. class Ys{constructor(e){this.axesColor=new ge(0,0,0),this.axesDisplayed=!1,this.axesGridDisplayed=!1,this.axesTextDisplayed=!1,this.axesTextStyle=new ks,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphAxes"}destroy(){var e=this;e.axesColor&&(e.axesColor.destroy(),e.axesColor=null),e.axesDisplayed=null,e.axesGridDisplayed=null,e.axesTextDisplayed=null,e.axesTextStyle&&(e.axesTextStyle.destroy(),e.axesTextStyle=null)}static fromObj(e){if(e){var t=new Ys;return X.copy(t,e),t.axesColor=ge.fromJson(e.axesColor),t.axesTextStyle=ks.fromObj(e.axesTextStyle),t}}}i.ThemeGraphAxes=Ys;
  709. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  710. * This program are made available under the terms of the Apache License, Version 2.0
  711. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  712. class Xs{constructor(e){this.maxGraphSize=0,this.minGraphSize=0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphSize"}destroy(){this.maxGraphSize=null,this.minGraphSize=null}static fromObj(e){var t=new Xs;return X.copy(t,e),t}}i.ThemeGraphSize=Xs;
  713. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  714. * This program are made available under the terms of the Apache License, Version 2.0
  715. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  716. class Qs{constructor(e){this.graphTextDisplayed=!1,this.graphTextFormat=p.CAPTION,this.graphTextStyle=new ks,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphText"}destroy(){var e=this;e.graphTextDisplayed=null,e.graphTextFormat=null,e.graphTextStyle&&(e.graphTextStyle.destroy(),e.graphTextStyle=null)}static fromObj(e){var t=new Qs;return X.copy(t,e),t.graphTextStyle=ks.fromObj(e.graphTextStyle),t}}i.ThemeGraphText=Qs;
  717. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  718. * This program are made available under the terms of the Apache License, Version 2.0
  719. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  720. class Ks{constructor(e){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=new ve,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphItem"}destroy(){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=null}static fromObj(e){if(e){var t=new Ks;return X.copy(t,e),t.uniformStyle=ve.fromJson(e.uniformStyle),t}}}i.ThemeGraphItem=Ks;
  721. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  722. * This program are made available under the terms of the Apache License, Version 2.0
  723. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  724. class Zs extends Ds{constructor(e){super("GRAPH",e),this.barWidth=0,this.flow=new Us,this.graduatedMode=y.CONSTANT,this.graphAxes=new Ys,this.graphSize=new Xs,this.graphSizeFixed=!1,this.graphText=new Qs,this.graphType=m.AREA,this.graphAxesTextDisplayMode=f.NONE,this.items=null,this.memoryKeys=null,this.negativeDisplayed=!1,this.offset=new js,this.overlapAvoided=!0,this.roseAngle=0,this.startAngle=0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraph"}destroy(){super.destroy();var e=this;if(e.barWidth=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=null,e.graphAxes&&(e.graphAxes.destroy(),e.graphAxes=null),e.graphSize&&(e.graphSize.destroy(),e.graphSize=null),e.graphSizeFixed=null,e.graphText&&(e.graphText.destroy(),e.graphText=null),e.graphType=null,e.items){for(var t=0,s=e.items,r=s.length;t<r;t++)s[t].destroy();e.items=null}e.memoryKeys=null,e.negativeDisplayed=null,e.offset&&(e.offset.destroy(),e.offset=null),e.overlapAvoided=null,e.roseAngle=null,e.startAngle=null,e.graphAxesTextDisplayMode=null}toJSON(){return X.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,this.graphText&&(e.graphTextDisplayed=this.graphText.graphTextDisplayed,e.graphTextFormat=this.graphText.graphTextFormat,e.graphTextStyle=this.graphText.graphTextStyle),this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.graphAxes&&(e.axesColor=this.graphAxes.axesColor,e.axesDisplayed=this.graphAxes.axesDisplayed,e.axesGridDisplayed=this.graphAxes.axesGridDisplayed,e.axesTextDisplayed=this.graphAxes.axesTextDisplayed,e.axesTextStyle=this.graphAxes.axesTextStyle),this.graphSize&&(e.maxGraphSize=this.graphSize.maxGraphSize,e.minGraphSize=this.graphSize.minGraphSize),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),e.barWidth=this.barWidth,e.graduatedMode=this.graduatedMode,e.graphSizeFixed=this.graphSizeFixed,e.graphType=this.graphType,e.graphAxesTextDisplayMode=this.graphAxesTextDisplayMode,e.items=this.items,e.memoryKeys=this.memoryKeys,e.negativeDisplayed=this.negativeDisplayed,e.overlapAvoided=this.overlapAvoided,e.roseAngle=this.roseAngle,e.startAngle=this.startAngle,e}static fromObj(e){var t=new Zs,s=e.items,r=s?s.length:0;X.copy(t,e),t.items=[],t.flow=Us.fromObj(e),t.graphAxes=Ys.fromObj(e),t.graphSize=Xs.fromObj(e),t.graphText=Qs.fromObj(e),t.offset=js.fromObj(e);for(var i=0;i<r;i++)t.items.push(Ks.fromObj(s[i]));return t}}i.ThemeGraph=Zs;
  725. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  726. * This program are made available under the terms of the Apache License, Version 2.0
  727. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  728. class $s extends Ds{constructor(e){super("DOTDENSITY",e),this.dotExpression=null,this.style=new ve,this.value=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeDotDensity"}destroy(){var e=this;e.dotExpression=null,e.value=null,e.style&&(e.style.destroy(),e.style=null)}toServerJSONObject(){var e={};return(e=X.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new $s;return X.copy(t,e),t.style=ve.fromJson(e.style),t}}}i.ThemeDotDensity=$s;
  729. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  730. * This program are made available under the terms of the Apache License, Version 2.0
  731. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  732. class er{constructor(e){this.negativeDisplayed=!1,this.negativeStyle=new ve,this.positiveStyle=new ve,this.zeroDisplayed=!1,this.zeroStyle=new ve,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbolStyle"}destroy(){var e=this;e.negativeDisplayed=null,e.negativeStyle=null,e.positiveStyle=null,e.zeroDisplayed=null,e.zeroStyle=null}static fromObj(e){if(e){var t=new er;return X.copy(t,e),t.negativeStyle=ve.fromJson(e.negativeStyle),t.positiveStyle=ve.fromJson(e.positiveStyle),t.zeroStyle=ve.fromJson(e.zeroStyle),t}}}i.ThemeGraduatedSymbolStyle=er;
  733. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  734. * This program are made available under the terms of the Apache License, Version 2.0
  735. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  736. class tr extends Ds{constructor(e){super("GRADUATEDSYMBOL",e),this.baseValue=0,this.expression=null,this.flow=new Us,this.graduatedMode=i.GraduatedMode.CONSTAN,this.offset=new js,this.style=new er,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbol"}destroy(){super.destroy();var e=this;e.expression=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=y.CONSTANT,e.offset&&(e.offset.destroy(),e.offset=null),e.style&&(e.style.destroy(),e.style=null)}toJSON(){return X.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,e.memoryData=this.memoryData,e.baseValue=this.baseValue,e.expression=this.expression,e.graduatedMode=this.graduatedMode,this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),this.style&&(e.negativeStyle=this.style.negativeStyle,e.negativeDisplayed=this.style.negativeDisplayed,e.positiveStyle=this.style.positiveStyle,e.zeroDisplayed=this.style.zeroDisplayed,e.zeroStyle=this.style.zeroStyle),e}static fromObj(e){if(e){var t=new i.ThemeGraduatedSymbol;return X.copy(t,e),t.flow=Us.fromObj(e),t.offset=js.fromObj(e),t.style=er.fromObj(e),t}}}i.ThemeGraduatedSymbol=tr;
  737. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  738. * This program are made available under the terms of the Apache License, Version 2.0
  739. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  740. class sr{constructor(e){this.caption=null,this.end=0,this.start=0,this.style=new ve,this.visible=!0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=X.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new sr;return X.copy(t,e),t.style=ve.fromJson(e.style),t}}}i.ThemeRangeItem=sr;
  741. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  742. * This program are made available under the terms of the Apache License, Version 2.0
  743. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  744. class rr extends Ds{constructor(e){super("RANGE",e),this.precision="1.0E-12",this.items=null,this.rangeExpression=null,this.rangeMode=g.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=v.YELLOW_RED,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.rangeExpression=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new rr;X.copy(t,e);var s=e.items,r=s?s.length:0;t.items=[];for(var i=0;i<r;i++)t.items.push(sr.fromObj(s[i]));return t}}}i.ThemeRange=rr;
  745. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  746. * This program are made available under the terms of the Apache License, Version 2.0
  747. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  748. class ir{constructor(e){e=e||{},this.bounds=null,this.caption=null,this.description=null,this.name=null,this.queryable=null,this.subLayers=null,this.type=null,this.visible=null,X.extend(this,e),this.CLASS_NAME="SuperMap.UGCLayer"}destroy(){X.reset(this)}fromJson(e){e=e||{},X.extend(this,e);var t=this.bounds;t&&(this.bounds=new K(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y))}toServerJSONObject(){var e={};return(e=X.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}i.UGCLayer=ir;i.OverlapDisplayedOptions=
  749. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  750. * This program are made available under the terms of the Apache License, Version 2.0
  751. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  752. class{constructor(e){e=e||{},this.allowPointOverlap=!0,this.allowPointWithTextDisplay=!0,this.allowTextOverlap=!1,this.allowTextAndPointOverlap=!0,this.allowThemeGraduatedSymbolOverlap=!1,this.allowThemeGraphOverlap=!1,this.horizontalOverlappedSpaceSize=0,this.verticalOverlappedSpaceSize=0,X.extend(this,e),this.ugcLayer=new ir(e),this.CLASS_NAME="SuperMap.OverlapDisplayedOptions"}destroy(){X.reset(this)}fromJson(e){this.ugcLayer.fromJson.apply(this,[e])}toServerJSONObject(){return this.ugcLayer.toServerJSONObject.apply(this,arguments)}toString(){var e=this.ugcLayer.toServerJSONObject.apply(this,arguments),t="{";for(var s in e)e.hasOwnProperty(s)&&(t+="'"+s+"':"+e[s]+",");return t=t.substr(0,t.length-1),t+="}"}};
  753. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  754. * This program are made available under the terms of the Apache License, Version 2.0
  755. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  756. class ar extends ir{constructor(e){super(e=e||{}),this.completeLineSymbolDisplayed=null,this.maxScale=null,this.minScale=null,this.minVisibleGeometrySize=null,this.opaqueRate=null,this.symbolScalable=null,this.symbolScale=null,this.overlapDisplayed=null,this.overlapDisplayedOptions=null,this.CLASS_NAME="SuperMap.UGCMapLayer"}destroy(){super.destroy(),X.reset(this)}fromJson(e){super.fromJson(e)}toServerJSONObject(){return super.toServerJSONObject()}}i.UGCMapLayer=ar;
  757. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  758. * This program are made available under the terms of the Apache License, Version 2.0
  759. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  760. class nr extends ar{constructor(e){super(e=e||{}),this.datasetInfo=null,this.displayFilter=null,this.joinItems=null,this.representationField=null,this.ugcLayerType=null,this.CLASS_NAME="SuperMap.UGCSubLayer"}fromJson(e){if(super.fromJson(e),this.datasetInfo&&(this.datasetInfo=new At(this.datasetInfo)),this.joinItems&&this.joinItems.length){for(var t=[],s=0;s<this.joinItems.length;s++)t[s]=new rt(this.joinItems[s]);this.joinItems=t}}destroy(){super.destroy(),X.reset(this)}toServerJSONObject(){var e=super.toServerJSONObject();if(e.joinItems){for(var t=[],s=0;s<e.joinItems.length;s++)e.joinItems[s].toServerJSONObject&&(t[s]=e.joinItems[s].toServerJSONObject());e.joinItems=t}return e.datasetInfo&&e.datasetInfo.toServerJSONObject&&(e.datasetInfo=e.datasetInfo.toServerJSONObject()),e}}i.UGCSubLayer=nr;
  761. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  762. * This program are made available under the terms of the Apache License, Version 2.0
  763. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  764. class or extends nr{constructor(e){super(e=e||{}),this.theme=null,this.themeElementPosition=null,this.CLASS_NAME="SuperMap.ServerTheme"}destroy(){super.destroy(),X.reset(this)}fromJson(e){super.fromJson(e);var t=this.theme;switch(t&&t.type){case"LABEL":this.theme=qs.fromObj(t);break;case"UNIQUE":this.theme=Ws.fromObj(t);break;case"GRAPH":this.theme=Zs.fromObj(t);break;case"DOTDENSITY":this.theme=$s.fromObj(t);break;case"GRADUATEDSYMBOL":this.theme=tr.fromObj(t);break;case"RANGE":this.theme=rr.fromObj(t)}this.themeElementPosition&&(this.themeElementPosition=new Q(this.themeElementPosition.x,this.themeElementPosition.y))}toServerJSONObject(){var e=super.toServerJSONObject();return e.themeElementPosition&&e.themeElementPosition.toServerJSONObject&&(e.themeElementPosition=e.themeElementPosition.toServerJSONObject()),e.theme&&e.theme.toServerJSONObject&&(e.theme=e.theme.toServerJSONObject()),e}}i.ServerTheme=or;
  765. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  766. * This program are made available under the terms of the Apache License, Version 2.0
  767. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  768. class lr extends nr{constructor(e){super(e=e||{}),this.colorDictionarys=null,this.brightness=null,this.colorGradientType=null,this.colors=null,this.contrast=null,this.dashStyle=null,this.gridType=null,this.horizontalSpacing=null,this.sizeFixed=null,this.solidStyle=null,this.specialColor=null,this.specialValue=null,this.specialValueTransparent=null,this.verticalSpacing=null,this.CLASS_NAME="SuperMap.Grid"}destroy(){super.destroy(),X.reset(this)}fromJson(e){if(super.fromJson(e),this.specialColor&&(this.specialColor=new ge(this.specialColor.red,this.specialColor.green,this.specialColor.blue)),this.colors){var t,s=[];for(var r in this.colors)t=this.colors[r],s.push(new ge(t.red,t.green,t.blue));this.colors=s}if(this.dashStyle&&(this.dashStyle=new ve(this.dashStyle)),this.solidStyle&&(this.solidStyle=new ve(this.solidStyle)),this.colorDictionary){var i,a=[];for(var n in this.colorDictionary)i=this.colorDictionary[n],a.push(new Ct({elevation:n,color:i}));this.colorDictionarys=a}delete this.colorDictionary}toServerJSONObject(){var e=super.toServerJSONObject();return e.dashStyle&&e.dashStyle.toServerJSONObject&&(e.dashStyle=e.dashStyle.toServerJSONObject()),e.solidStyle&&e.solidStyle.toServerJSONObject&&(e.solidStyle=e.solidStyle.toServerJSONObject()),e}}i.Grid=lr;
  769. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  770. * This program are made available under the terms of the Apache License, Version 2.0
  771. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  772. class hr extends nr{constructor(e){super(e=e||{}),this.brightness=null,this.colorSpaceType=null,this.contrast=null,this.displayBandIndexes=null,this.transparent=null,this.transparentColor=null,this.transparentColorTolerance=null,this.CLASS_NAME="SuperMap.Image"}destroy(){super.destroy(),X.reset(this)}fromJson(e){super.fromJson(e),this.transparentColor&&(this.transparentColor=new ge(this.transparentColor.red,this.transparentColor.green,this.transparentColor.blue))}toServerJSONObject(){return super.toServerJSONObject()}}i.Image=hr;
  773. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  774. * This program are made available under the terms of the Apache License, Version 2.0
  775. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  776. class ur extends nr{constructor(e){super(e=e||{}),this.style=null,this.CLASS_NAME="SuperMap.Vector"}destroy(){super.destroy(),X.reset(this)}fromJson(e){super.fromJson(e);var t=this.style;t&&(this.style=new ve(t))}toServerJSONObject(){var e=i.toServerJSONObject();return e.style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}}i.Vector=ur;
  777. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  778. * This program are made available under the terms of the Apache License, Version 2.0
  779. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  780. class cr extends Je{constructor(e,t){super(e,t),this.isTempLayers=!1,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.GetLayersInfoService"}destroy(){super.destroy(),X.reset(this)}processAsync(){var e=this;e.isTempLayers||(e.url=X.urlPathAppend(e.url,"layers")),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}serviceProcessCompleted(e){var t,s;s=(t=!!(e=X.transformResult(e))&&e.length>0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(s,t),this.events.triggerEvent("processCompleted",{result:e[0]})}handleLayers(e,t){var s;if(e)for(var r=0;r<e;r++){if(t[r].subLayers&&t[r].subLayers.layers&&t[r].subLayers.layers.length>0)this.handleLayers(t[r].subLayers.layers.length,t[r].subLayers.layers);else switch(t[r].ugcLayerType){case"THEME":(s=new or).fromJson(t[r]),t[r]=s;break;case"GRID":(s=new lr).fromJson(t[r]),t[r]=s;break;case"IMAGE":(s=new hr).fromJson(t[r]),t[r]=s;break;case"VECTOR":(s=new ur).fromJson(t[r]),t[r]=s}}}}i.GetLayersInfoService=cr;
  781. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  782. * This program are made available under the terms of the Apache License, Version 2.0
  783. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  784. class dr{constructor(e){e&&(this.bounds=null,this.searchRadius=0,this.zValueFieldName=null,this.zValueScale=1,this.resolution=null,this.filterQueryParameter=null,this.outputDatasetName=null,this.outputDatasourceName=null,this.pixelFormat=null,this.dataset=null,this.inputPoints=null,this.InterpolationAnalystType="dataset",this.clipParam=null,X.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationAnalystParameters")}destroy(){var e=this;e.bounds=null,e.searchRadius=null,e.zValueFieldName=null,e.zValueScale=null,e.resolution=null,e.filterQueryParameter=null,e.outputDatasetName=null,e.pixelFormat=null}static toObject(e,t){for(var s in e)if("inputPoints"===s&&"geometry"===e.InterpolationAnalystType){for(var r=[],i=0;i<e.inputPoints.length;i++){var a=e.inputPoints[i],n={x:a.x,y:a.y,z:a.tag};r.push(n)}t[s]=r}else t[s]=e[s]}}i.InterpolationAnalystParameters=dr;
  785. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  786. * This program are made available under the terms of the Apache License, Version 2.0
  787. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  788. class pr extends dr{constructor(e){super(e),this.smooth=.1,this.tension=40,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationRBFAnalystParameters"}destroy(){super.destroy();var e=this;e.smooth=null,e.tension=null,e.searchMode=null,e.expectedCount=null,e.maxPointCountForInterpolation=null,e.maxPointCountInNode=null}static toObject(e,t){for(var s in e)t[s]=e[s]}}i.InterpolationRBFAnalystParameters=pr;
  789. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  790. * This program are made available under the terms of the Apache License, Version 2.0
  791. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  792. class mr extends dr{constructor(e){super(e),e&&X.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationDensityAnalystParameters"}destroy(){super.destroy()}}i.InterpolationDensityAnalystParameters=mr;
  793. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  794. * This program are made available under the terms of the Apache License, Version 2.0
  795. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  796. class fr extends dr{constructor(e){super(e),this.power=2,this.searchMode=null,this.expectedCount=12,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationIDWAnalystParameters"}destroy(){super.destroy();this.power=null,this.searchMode=null,this.expectedCount=null}}i.InterpolationIDWAnalystParameters=fr;
  797. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  798. * This program are made available under the terms of the Apache License, Version 2.0
  799. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  800. class yr extends dr{constructor(e){super(e),this.type=null,this.mean=null,this.angle=0,this.nugget=0,this.range=0,this.sill=0,this.variogramMode=I.SPHERICAL,this.exponent=N.EXP1,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationKrigingAnalystParameters"}destroy(){super.destroy();var e=this;e.type=null,e.mean=null,e.angle=null,e.nugget=null,e.range=null,e.sill=null,e.variogramMode=null,e.exponent=null,e.searchMode=null,e.expectedCount=null,e.maxPointCountForInterpolation=null,e.maxPointCountInNode=null}}i.InterpolationKrigingAnalystParameters=yr;
  801. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  802. * This program are made available under the terms of the Apache License, Version 2.0
  803. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  804. class gr extends Ke{constructor(e,t){super(e,t),this.mode=null,t&&X.extend(this,t)}destroy(){super.destroy(),this.mode=null,this.CLASS_NAME="SuperMap.InterpolationAnalystService"}processAsync(e){var t={},s=this;e instanceof mr?(s.mode="Density","geometry"===e.InterpolationAnalystType?s.url=X.urlPathAppend(s.url,"geometry/interpolation/density"):s.url=X.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/density")):e instanceof fr?(s.mode="IDW","geometry"===e.InterpolationAnalystType?s.url=X.urlPathAppend(s.url,"geometry/interpolation/idw"):s.url=X.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/idw")):e instanceof pr?(s.mode="RBF","geometry"===e.InterpolationAnalystType?s.url=X.urlPathAppend(s.url,"geometry/interpolation/rbf"):s.url=X.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/rbf")):e instanceof yr&&(s.mode="Kriging","geometry"===e.InterpolationAnalystType?s.url=X.urlPathAppend(s.url,"geometry/interpolation/kriging"):s.url=X.urlPathAppend(s.url,"datasets/"+e.dataset+"/interpolation/kriging")),dr.toObject(e,t);var r=X.toJSON(t);s.url=X.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}i.InterpolationAnalystService=gr;
  805. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  806. * This program are made available under the terms of the Apache License, Version 2.0
  807. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  808. class vr{constructor(e){e&&(this.datasetName="",this.query="",this.resolution=80,this.method=0,this.meshType=0,this.fields="",this.radius=300,this.meshSizeUnit=k.METER,this.radiusUnit=k.METER,this.areaUnit=D.SQUAREMILE,this.output=null,this.mappingParameters=null,X.extend(this,e),this.CLASS_NAME="SuperMap.KernelDensityJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.method=null,this.radius=null,this.meshType=null,this.fields=null,this.meshSizeUnit=null,this.radiusUnit=null,this.areaUnit=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}i.KernelDensityJobParameter=vr;
  809. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  810. * This program are made available under the terms of the Apache License, Version 2.0
  811. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  812. class Sr extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/density"),this.CLASS_NAME="SuperMap.KernelDensityJobsService"}destroy(){super.destroy()}getKernelDensityJobs(){super.getJobs(this.url)}getKernelDensityJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addKernelDensityJob(e,t){super.addJob(this.url,e,vr,t)}}i.KernelDensityJobsService=Sr;
  813. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  814. * This program are made available under the terms of the Apache License, Version 2.0
  815. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  816. class br{constructor(){this.CLASS_NAME="LabelMatrixCell"}}i.LabelMatrixCell=br;i.LabelImageCell=
  817. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  818. * This program are made available under the terms of the Apache License, Version 2.0
  819. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  820. class extends br{constructor(e){super(e),this.height=0,this.pathField=null,this.rotation=0,this.width=0,this.sizeFixed=!1,this.type="IMAGE",e&&X.extend(this,e),this.CLASS_NAME="SuperMap.LabelImageCell"}destroy(){var e=this;e.height=null,e.pathField=null,e.rotation=null,e.width=null,e.sizeFixed=null}};i.LabelSymbolCell=
  821. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  822. * This program are made available under the terms of the Apache License, Version 2.0
  823. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  824. class extends br{constructor(e){super(e),this.style=new ve,this.symbolIDField=null,this.type="SYMBOL",e&&X.extend(this,e),this.CLASS_NAME="SuperMap.LabelSymbolCell"}destroy(){this.style&&(this.style.destroy(),this.style=null),this.symbolIDField=null}};i.LabelThemeCell=
  825. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  826. * This program are made available under the terms of the Apache License, Version 2.0
  827. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  828. class extends br{constructor(e){super(e),this.themeLabel=new qs,this.type="THEME",e&&X.extend(this,e),this.CLASS_NAME=" SuperMap.LabelThemeCell"}destroy(){this.themeLabel&&(this.themeLabel.destroy(),this.themeLabel=null)}};i.LayerStatus=
  829. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  830. * This program are made available under the terms of the Apache License, Version 2.0
  831. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  832. class{constructor(e){this.layerName=null,this.isVisible=null,this.displayFilter=null,this.fieldValuesDisplayFilter=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.LayerStatus"}destroy(){this.layerName=null,this.isVisible=null,this.displayFilter=null}toJSON(){var e="{";e+='"type":"UGC",';var t=[];return this.layerName&&(t.push('"name":"'+this.layerName+'"'),t.push('"visible":'+this.isVisible)),this.displayFilter&&t.push('"displayFilter":"'+this.displayFilter+'"'),(this.minScale||0==this.minScale)&&t.push('"minScale":'+this.minScale),(this.maxScale||0==this.maxScale)&&t.push('"maxScale":'+this.maxScale),this.fieldValuesDisplayFilter&&t.push('"fieldValuesDisplayFilter":'+X.toJSON(this.fieldValuesDisplayFilter)),e+=t,e+="}"}};
  833. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  834. * This program are made available under the terms of the Apache License, Version 2.0
  835. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  836. class xr extends Je{constructor(e,t){super(e,t),this.projection=null,this.CLASS_NAME="SuperMap.MapService",t&&X.extend(this,t);var s=this;if(s.projection){var r=s.projection.split(":");r instanceof Array&&(2===r.length&&(s.url=X.urlAppend(s.url,`prjCoordSys=${encodeURIComponent(`{"epsgCode":"${r[1]}"}`)}`)),1===r.length&&(s.url=X.urlAppend(s.url,`prjCoordSys=${encodeURIComponent(`{"epsgCode":"${r[0]}"}`)}`)))}}destroy(){super.destroy();var e=this;e.events&&(e.events.un(e.eventListeners),e.events.listeners=null,e.events.destroy(),e.events=null,e.eventListeners=null)}processAsync(){this.request({method:"GET",scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){var t=(e=X.transformResult(e)).code>=200&&e.code<300||0==e.code||304===e.code,s=e.code&&t;!e.code||s?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}i.MapService=xr;
  837. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  838. * This program are made available under the terms of the Apache License, Version 2.0
  839. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  840. class Cr{constructor(e){e&&(this.dataset=null,this.extractRegion=null,this.expression=null,this.isZip=!1,this.ignoreNoValue=!1,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.MathExpressionAnalysisParameters")}destroy(){var e=this;e.dataset=null,e.bounds=null,e.expression=null,e.isZip=!0,e.ignoreNoValue=!0,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var s in e)if("dataset"!==s&&(t[s]=e[s]),"extractRegion"===s&&e[s]){for(var r=e[s].components[0].components,i={},a=[],n=r.length,o=0;o<n-1;o++){var l={};l.x=r[o].x,l.y=r[o].y,a.push(l)}i.points=a,i.type="REGION",t[s]=i}}}i.MathExpressionAnalysisParameters=Cr;
  841. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  842. * This program are made available under the terms of the Apache License, Version 2.0
  843. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  844. class _r extends Ke{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.MathExpressionAnalysisService"}destroy(){super.destroy()}processAsync(e){var t=this,s={};e instanceof Cr&&(t.url=X.urlPathAppend(t.url,"datasets/"+e.dataset+"/mathanalyst")),Cr.toObject(e,s);var r=X.toJSON(s);t.url=X.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}i.MathExpressionAnalysisService=_r;
  845. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  846. * This program are made available under the terms of the Apache License, Version 2.0
  847. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  848. class Tr{constructor(e,t){e&&(this.geometry=e,this.unit=c.METER,this.prjCoordSys=null,this.distanceMode=null,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.MeasureParameters")}destroy(){this.geometry=null,this.unit=null,this.prjCoordSys=null}}i.MeasureParameters=Tr;
  849. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  850. * This program are made available under the terms of the Apache License, Version 2.0
  851. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  852. class wr extends Je{constructor(e,t){super(e,t),this.measureMode=u.DISTANCE,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.MeasureService"}destroy(){super.destroy();this.measureMode=null}processAsync(e){if(e instanceof Tr){var t,s,r=this,i=e.geometry;if(i){r.url=X.urlPathAppend(r.url,r.measureMode===u.AREA?"area":"distance");var a,n,o,l=xe.fromGeometry(i);if(l)t=l.parts[0],s=l.points.splice(0,t),e.prjCoordSys?("object"==typeof e.prjCoordSys?a='{"epsgCode"'+(n=e.prjCoordSys.projCode).substring(n.indexOf(":"),n.length)+"}":"string"==typeof e.prjCoordSys&&(a='{"epsgCode"'+e.prjCoordSys.substring(e.prjCoordSys.indexOf(":"),e.prjCoordSys.length)+"}"),o={point2Ds:X.toJSON(s),unit:e.unit,prjCoordSys:a}):o={point2Ds:X.toJSON(s),unit:e.unit},r.request({method:"GET",params:o,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}}i.MeasureService=wr;
  853. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  854. * This program are made available under the terms of the Apache License, Version 2.0
  855. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  856. class Er extends Ke{constructor(e,t){super(e,t),this.mode=null,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.OverlayAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof Ot?(s.mode="datasets",s.url=X.urlPathAppend(s.url,"datasets/"+e.sourceDataset+"/overlay"),Ot.toObject(e,t)):e instanceof fs&&(s.mode="geometry",e.operateGeometries&&e.sourceGeometries?(s.url=X.urlPathAppend(s.url,"geometry/overlay/batch"),s.url=X.urlAppend(s.url,"ignoreAnalystParam=true")):s.url=X.urlPathAppend(s.url,"geometry/overlay"),fs.toObject(e,t)),s.url=X.urlAppend(s.url,"returnContent=true");var r=X.toJSON(t);s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}i.OverlayAnalystService=Er;
  857. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  858. * This program are made available under the terms of the Apache License, Version 2.0
  859. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  860. class Mr{constructor(e){e&&(this.datasetName="",this.datasetOverlay="",this.mode="",this.srcFields="",this.overlayFields="",this.output=null,this.mappingParameters=null,X.extend(this,e),this.CLASS_NAME="SuperMap.OverlayGeoJobParameter")}destroy(){this.datasetName=null,this.datasetOverlay=null,this.mode=null,this.srcFields=null,this.overlayFields=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!=s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}i.OverlayGeoJobParameter=Mr;
  861. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  862. * This program are made available under the terms of the Apache License, Version 2.0
  863. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  864. class Ar extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/overlay"),this.CLASS_NAME="SuperMap.OverlayGeoJobsService"}destroy(){super.destroy()}getOverlayGeoJobs(){super.getJobs(this.url)}getOverlayGeoJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addOverlayGeoJob(e,t){super.addJob(this.url,e,Mr,t)}}i.OverlayGeoJobsService=Ar;
  865. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  866. * This program are made available under the terms of the Apache License, Version 2.0
  867. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  868. class Pr extends bt{constructor(e){e&&(super(e),this.returnContent=!0,this.bounds=null,X.extend(this,e),this.CLASS_NAME="SuperMap.QueryByBoundsParameters")}destroy(){super.destroy();this.returnContent=null,this.bounds&&(this.bounds=null)}}i.QueryByBoundsParameters=Pr;
  869. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  870. * This program are made available under the terms of the Apache License, Version 2.0
  871. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  872. class Or extends Je{constructor(e,t){super(e,t),this.returnContent=!1,this.format=a.GEOJSON,this.returnFeatureWithFieldCaption=!1,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.QueryService",this.url&&(t&&t.format&&(this.format=t.format.toUpperCase()),this.url=X.urlPathAppend(this.url,"queryResults"))}destroy(){super.destroy();this.returnContent=null,this.format=null}processAsync(e){if(e instanceof bt){var t,s=this,r=null;s.returnContent=e.returnContent,t=s.getJsonParameters(e),s.returnContent?s.url=X.urlAppend(s.url,"returnContent="+s.returnContent):(r=e.returnCustomResult)&&(s.url=X.urlAppend(s.url,"returnCustomResult="+r)),s.returnFeatureWithFieldCaption=e.returnFeatureWithFieldCaption,s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){e=X.transformResult(e);var t=new Ce;if(e&&e.recordsets)for(var s=0,r=e.recordsets,i=r.length;s<i;s++)r[s].features&&(!0===this.returnFeatureWithFieldCaption&&r[s].features.map(e=>(e.fieldNames=r[s].fieldCaptions,e)),this.format===a.GEOJSON&&(r[s].features=t.toGeoJSON(r[s].features)));this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new bt({customParams:e.customParams,expectCount:e.expectCount,networkType:e.networkType,queryOption:e.queryOption,queryParams:e.queryParams,startRecord:e.startRecord,prjCoordSys:e.prjCoordSys,holdTime:e.holdTime})}}i.QueryService=Or;
  873. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  874. * This program are made available under the terms of the Apache License, Version 2.0
  875. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  876. class Lr extends Or{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){if(!(e instanceof Pr))return null;var t,s="",r=e.bounds;return t=this.getQueryParameters(e),s+="'queryMode':'BoundsQuery','queryParameters':",s+=X.toJSON(t),s="{"+(s+=",'bounds': {'rightTop':{'y':"+r.top+",'x':"+r.right+"},'leftBottom':{'y':"+r.bottom+",'x':"+r.left+"}}")+"}"}}i.QueryByBoundsService=Lr;
  877. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  878. * This program are made available under the terms of the Apache License, Version 2.0
  879. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  880. class Ir extends bt{constructor(e){e&&(super(e),this.distance=0,this.geometry=null,this.isNearest=null,this.returnContent=!0,X.extend(this,e),this.CLASS_NAME="SuperMap.QueryByDistanceParameters")}destroy(){super.destroy();var e=this;e.returnContent=null,e.distance=null,e.isNearest=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}}i.QueryByDistanceParameters=Ir;
  881. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  882. * This program are made available under the terms of the Apache License, Version 2.0
  883. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  884. class Nr extends Or{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByDistanceService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Ir){var t="",s=this.getQueryParameters(e),r=xe.fromGeometry(e.geometry);return t+=e.isNearest?"'queryMode':'FindNearest','queryParameters':":"'queryMode':'DistanceQuery','queryParameters':",t+=X.toJSON(s),t="{"+(t+=",'geometry':"+X.toJSON(r)+",'distance':"+e.distance)+"}"}}}i.QueryByDistanceService=Nr;
  885. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  886. * This program are made available under the terms of the Apache License, Version 2.0
  887. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  888. class Rr extends bt{constructor(e){e&&(super(e),this.returnContent=!0,this.geometry=null,this.spatialQueryMode=h.INTERSECT,X.extend(this,e),this.CLASS_NAME="SuperMap.QueryByGeometryParameters")}destroy(){super.destroy();this.returnContent=null,this.geometry=null,this.spatialQueryMode=null}}i.QueryByGeometryParameters=Rr;
  889. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  890. * This program are made available under the terms of the Apache License, Version 2.0
  891. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  892. class Fr extends Or{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Rr){var t,s="",r=e.geometry,i=xe.fromGeometry(r);return t=this.getQueryParameters(e),s+="'queryMode':'SpatialQuery','queryParameters':",s="{"+(s+=X.toJSON(t)+",'geometry':"+X.toJSON(i)+",'spatialQueryMode':"+X.toJSON(e.spatialQueryMode))+"}"}}}i.QueryByGeometryService=Fr;
  893. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  894. * This program are made available under the terms of the Apache License, Version 2.0
  895. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  896. class Dr extends bt{constructor(e){e&&(super(e),this.returnContent=!0,X.extend(this,e),this.CLASS_NAME="SuperMap.QueryBySQLParameters")}destroy(){super.destroy();this.returnContent=null}}i.QueryBySQLParameters=Dr;
  897. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  898. * This program are made available under the terms of the Apache License, Version 2.0
  899. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  900. class kr extends Or{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryBySQLService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Dr){var t,s="";return t=this.getQueryParameters(e),s+="'queryMode':'SqlQuery','queryParameters':",s="{"+(s+=X.toJSON(t))+"}"}}}i.QueryBySQLService=kr;
  901. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  902. * This program are made available under the terms of the Apache License, Version 2.0
  903. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  904. class Gr{constructor(e){if(!e)return this;this.sourceRoute=null,this.point=null,this.tolerance=null,this.isIgnoreGap=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.RouteCalculateMeasureParameters"}destroy(){var e=this;e.sourceRoute=null,e.point=null,e.tolerance&&(e.tolerance=null),e.isIgnoreGap&&(e.isIgnoreGap=!1)}}i.RouteCalculateMeasureParameters=Gr;
  905. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  906. * This program are made available under the terms of the Apache License, Version 2.0
  907. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  908. class Br extends Ke{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteCalculateMeasureService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Gr){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){return this.url=X.urlPathAppend(this.url,"geometry/calculatemeasure"),this.url=X.urlAppend(this.url,"returnContent=true"),X.toJSON(e)}}i.RouteCalculateMeasureService=Br;
  909. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  910. * This program are made available under the terms of the Apache License, Version 2.0
  911. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  912. class Ur{constructor(e){if(!e)return this;this.sourceRoute=null,this.dataset=null,this.routeIDField=null,this.routeID=null,this.type=null,this.measure=null,this.offset=0,this.isIgnoreGap=!1,this.startMeasure=null,this.endMeasure=null;var t=e.sourceRoute,s={};if(t&&t instanceof Z&&t.components){s.type=t.type,s.parts=t.parts;for(var r=[],i=0,a=t.components.length;i<a;i++)r=r.concat(t.components[i].components);s.points=r,e.sourceRoute=s}X.extend(this,e),this.CLASS_NAME="SuperMap.RouteLocatorParameters"}destroy(){var e=this;e.sourceRoute=null,e.type=null,e.measure=null,e.offset=0,e.isIgnoreGap=!1,e.startMeasure=null,e.endMeasure=null,e.dataset=null,e.routeID=null,e.routeIDField=null}}i.RouteLocatorParameters=Ur;
  913. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  914. * This program are made available under the terms of the Apache License, Version 2.0
  915. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  916. class jr extends Ke{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteLocatorService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ur){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="geometry/routelocator";return e.dataset&&(t="datasets/"+e.dataset+"/linearreferencing/routelocator",e.sourceRoute=null),this.url=X.urlPathAppend(this.url,t),this.url=X.urlAppend(this.url,"returnContent=true"),X.toJSON(e)}}i.RouteLocatorService=jr;
  917. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  918. * This program are made available under the terms of the Apache License, Version 2.0
  919. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  920. class Vr{constructor(e){this.fieldNames=null,this.fieldValues=null,this.geometry=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ServerFeature"}destroy(){var e=this;e.fieldNames=null,e.fieldValues=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}toFeature(){var e,t,s,r,i={},a=this;for(var n in e=a.fieldNames,t=a.fieldValues,e)i[e[n]]=t[n];return a.geometry&&(s=a.geometry.toGeometry()),r=new me(s,i),a.geometry&&a.geometry.id&&(r.fid=a.geometry.id),r}static fromJson(e){var t=null;if(e)return(t=e.geometry)&&(t=xe.fromJson(t)),new Vr({fieldNames:e.fieldNames,fieldValues:e.fieldValues,geometry:t})}}i.ServerFeature=Vr;i.SetLayerInfoParameters=
  921. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  922. * This program are made available under the terms of the Apache License, Version 2.0
  923. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  924. class{constructor(e){e=e||{},this.resourceID=null,this.tempLayerName=null,this.layerInfo=null,X.extend(this,e),this.CLASS_NAME="SuperMap.SetLayerInfoParameters"}destroy(){this.resourceID=null,this.tempLayerName=null,this.layerInfo=null}};
  925. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  926. * This program are made available under the terms of the Apache License, Version 2.0
  927. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  928. class Hr extends Je{constructor(e,t){super(e,t),t&&X.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerInfoService"}destroy(){super.destroy(),X.reset(this)}processAsync(e){if(e){var t=X.toJSON(e);this.request({method:"PUT",data:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}}}i.SetLayerInfoService=Hr;i.SetLayersInfoParameters=
  929. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  930. * This program are made available under the terms of the Apache License, Version 2.0
  931. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  932. class{constructor(e){e=e||{},this.isTempLayers=null,this.resourceID=null,this.layersInfo=null,X.extend(this,e),this.CLASS_NAME="SuperMap.SetLayersInfoParameters"}destroy(){this.isTempLayers=null,this.resourceID=null,this.layersInfo=null}};
  933. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  934. * This program are made available under the terms of the Apache License, Version 2.0
  935. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  936. class Jr extends Je{constructor(e,t){super(e,t),this.resourceID=null,this.isTempLayers=!1,t&&i.Util.extend(this,t),this.CLASS_NAME="SuperMap.SetLayersInfoService"}destroy(){super.destroy(),X.reset(this)}processAsync(e){if(e){var t,s=[],r=this,i="";r.isTempLayers?(r.url=X.urlPathAppend(r.url,"tempLayersSet/"+r.resourceID),i="PUT"):(r.url=X.urlPathAppend(r.url,"tempLayersSet"),i="POST"),e.subLayers||(e.subLayers={layers:[]}),e.subLayers.layers||(e.subLayers.layers=[]);var a=e.subLayers.layers,n=a.length;for(let e in a){if("GRID"===a[e].ugcLayerType){var o={},l=a[e].colorDictionarys;for(var h in l){o[l[h].elevation]=l[h].color}}a[e].colorDictionary=o,delete a[e].colorDictionarys}for(let e=0;e<n;e++)a[e].toJsonObject?s.push(a[e].toJsonObject()):s.push(a[e]);(t=X.extend(t,e)).subLayers={layers:s},t.object=null;var u=X.toJSON([t]);r.request({method:i,data:u,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}}i.SetLayersInfoService=Jr;
  937. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  938. * This program are made available under the terms of the Apache License, Version 2.0
  939. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  940. class zr{constructor(e){this.layerStatusList=[],this.holdTime=15,this.resourceID=null,e&&X.extend(this,e)}destroy(){this.layerStatusList=null,this.holdTime=null,this.resourceID=null}toJSON(){var e="{";e+='"layers":[';for(var t=[],s=0,r=this.layerStatusList.length;s<r;s++)t.push(this.layerStatusList[s].toJSON());return e+=t,e+="]",e+="}"}}i.SetLayerStatusParameters=zr;
  941. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  942. * This program are made available under the terms of the Apache License, Version 2.0
  943. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  944. class qr extends Je{constructor(e,t){super(e,t),this.lastparams=null,this.mapUrl=e,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerStatusService"}destroy(){super.destroy(),X.reset(this)}processAsync(e){if(e instanceof zr){var t=this;if(t.url=t.mapUrl,null==e.resourceID)t.url=X.urlPathAppend(t.url,"tempLayersSet"),t.lastparams=e,t.request({method:"POST",scope:t,success:t.createTempLayerComplete,failure:t.serviceProcessFailed});else{t.url=X.urlPathAppend(t.url,"tempLayersSet/"+e.resourceID),t.url=X.urlAppend(t.url,"elementRemain=true&reference="+e.resourceID+"&holdTime="+e.holdTime.toString());var s="[{";s+='"type":"UGC",',null!=e.layerStatusList&&e.layerStatusList.length>0&&(s+='"subLayers":'+e.toJSON()),s+=',"visible":true,',s+='"name":"'+this.getMapName(this.mapUrl)+'"',s+="}]",t.request({method:"PUT",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}createTempLayerComplete(e){(e=X.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}getMapName(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var s=t.lastIndexOf("/");return t.substring(s+1,t.length)}serviceProcessCompleted(e){null!=(e=X.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}i.SetLayerStatusService=qr;
  945. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  946. * This program are made available under the terms of the Apache License, Version 2.0
  947. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  948. class Wr{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=h.CONTAIN,this.output=null,this.mappingParameters=null,X.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}i.SingleObjectQueryJobsParameter=Wr;
  949. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  950. * This program are made available under the terms of the Apache License, Version 2.0
  951. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  952. class Yr extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,Wr,t)}}i.SingleObjectQueryJobsService=Yr;
  953. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  954. * This program are made available under the terms of the Apache License, Version 2.0
  955. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  956. class Xr{constructor(e){e=e||{},this.keyWord=null,this.returnPosition=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.StopQueryParameters"}destroy(){X.reset(this)}}i.StopQueryParameters=Xr;
  957. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  958. * This program are made available under the terms of the Apache License, Version 2.0
  959. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  960. class Qr extends Je{constructor(e,t){super(e,t),t=t||{},X.extend(this,t),this.CLASS_NAME="SuperMap.StopQueryService"}destroy(){super.destroy(),X.reset(this)}processAsync(e){if(e instanceof Xr){var t=this;t.url=X.urlPathAppend(t.url,"stops/keyword/"+e.keyWord),t.request({method:"GET",params:{returnPosition:e.returnPosition},scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}i.StopQueryService=Qr;
  961. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  962. * This program are made available under the terms of the Apache License, Version 2.0
  963. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  964. class Kr{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,X.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}i.SummaryAttributesJobsParameter=Kr;
  965. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  966. * This program are made available under the terms of the Apache License, Version 2.0
  967. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  968. class Zr extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,Kr,t)}}i.SummaryAttributesJobsService=Zr;
  969. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  970. * This program are made available under the terms of the Apache License, Version 2.0
  971. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  972. class $r{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=G.AVERAGE,this.fields="",this.type=B.SUMMARYMESH,this.output=null,this.mappingParameters=null,X.extend(this,e),this.CLASS_NAME="SuperMap.SummaryMeshJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.statisticModes=null,this.meshType=null,this.fields=null,this.regionDataset=null,this.type=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s?"output"!==s?("SUMMARYMESH"===e.type&&"regionDataset"!==s||"SUMMARYREGION"===e.type&&!r(["meshType","resolution","query"],s))&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s]);function r(e,t){for(var s=e.length;s--;)if(e[s]===t)return!0;return!1}}}i.SummaryMeshJobParameter=$r;
  973. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  974. * This program are made available under the terms of the Apache License, Version 2.0
  975. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  976. class ei extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,$r,t)}}i.SummaryMeshJobsService=ei;
  977. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  978. * This program are made available under the terms of the Apache License, Version 2.0
  979. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  980. class ti{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.sumShape=!0,this.query="",this.standardSummaryFields=!1,this.standardFields="",this.standardStatisticModes="",this.weightedSummaryFields=!1,this.weightedFields="",this.weightedStatisticModes="",this.meshType=0,this.resolution=100,this.meshSizeUnit=k.METER,this.type=B.SUMMARYMESH,this.output=null,this.mappingParameters=null,X.extend(this,e),this.CLASS_NAME="SuperMap.SummaryRegionJobParameter")}destroy(){this.datasetName=null,this.sumShape=null,this.regionDataset=null,this.query=null,this.standardSummaryFields=null,this.standardFields=null,this.standardStatisticModes=null,this.weightedSummaryFields=null,this.weightedFields=null,this.weightedStatisticModes=null,this.meshType=null,this.resolution=null,this.meshSizeUnit=null,this.type=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s&&"type"!==s?"output"!==s?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==s)&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s])}}i.SummaryRegionJobParameter=ti;
  981. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  982. * This program are made available under the terms of the Apache License, Version 2.0
  983. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  984. class si extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,ti,t)}}i.SummaryRegionJobsService=si;
  985. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  986. * This program are made available under the terms of the Apache License, Version 2.0
  987. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  988. class ri{constructor(e){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.SupplyCenter"}destroy(){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null}static fromJson(e){if(e)return new ri({maxWeight:e.maxWeight,nodeID:e.nodeID,resourceValue:e.resourceValue,type:e.type})}}i.SupplyCenter=ri;
  989. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  990. * This program are made available under the terms of the Apache License, Version 2.0
  991. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  992. class ii extends Ke{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.SurfaceAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof It){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="",s={},r=this;if(e instanceof Nt)r.url=X.urlPathAppend(r.url,"datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()),Nt.toObject(e,s),t=X.toJSON(s);else{if(!(e instanceof ys))return;r.url=X.urlPathAppend(r.url,"geometry/"+e.surfaceAnalystMethod.toLowerCase()),t=X.toJSON(e)}return r.url=X.urlAppend(r.url,"returnContent=true"),t}}i.SurfaceAnalystService=ii;
  993. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  994. * This program are made available under the terms of the Apache License, Version 2.0
  995. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  996. class ai{constructor(e){e&&(this.dataset=null,this.zFactor=1,this.averageCurvatureName=null,this.profileCurvatureName="",this.planCurvatureName="",this.deleteExistResultDataset=!1,X.extend(this,e),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationParameters")}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){for(var s in e)"dataset"!==s&&(t[s]=e[s])}}i.TerrainCurvatureCalculationParameters=ai;
  997. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  998. * This program are made available under the terms of the Apache License, Version 2.0
  999. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1000. class ni extends Ke{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationService"}destroy(){super.destroy()}processAsync(e){var t=this,s={};e instanceof ai&&(t.url=X.urlPathAppend(t.url,"datasets/"+e.dataset+"/terraincalculation/curvature")),ai.toObject(e,s);var r=i.Util.toJSON(s);t.url=X.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}i.TerrainCurvatureCalculationService=ni;
  1001. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1002. * This program are made available under the terms of the Apache License, Version 2.0
  1003. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1004. class oi{constructor(e){this.caption=null,this.color=new ge,this.end=0,this.start=0,this.visible=!0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=X.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){if(e){var t=new oi;return X.copy(t,e),t.color=ge.fromJson(e.color),t}}}i.ThemeGridRangeItem=oi;
  1005. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1006. * This program are made available under the terms of the Apache License, Version 2.0
  1007. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1008. class li extends Ds{constructor(e){super("GRIDRANGE",e),this.items=null,this.rangeMode=g.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=v.YELLOW_RED,this.reverseColor=!1,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.reverseColor=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new li;X.copy(t,e);var s=e.items,r=s?s.length:0;t.items=[];for(var i=0;i<r;i++)t.items.push(oi.fromObj(s[i]));return t}}}i.ThemeGridRange=li;
  1009. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1010. * This program are made available under the terms of the Apache License, Version 2.0
  1011. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1012. class hi{constructor(e){this.caption=null,this.color=new ge,this.unique=null,this.visible=!0,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=X.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){var t=new hi;return X.copy(t,e),t.color=ge.fromJson(e.color),t}}i.ThemeGridUniqueItem=hi;
  1013. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1014. * This program are made available under the terms of the Apache License, Version 2.0
  1015. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1016. class ui extends Ds{constructor(e){super("GRIDUNIQUE",e),this.defaultcolor=new ge,this.items=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridUnique"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultcolor&&(e.defaultcolor.destroy(),e.defaultcolor=null)}toServerJSONObject(){var e={};if((e=X.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,r=0;r<s;r++)t.push(e.items[r].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new ui,s=e.items,r=s?s.length:0;X.extend(t,e),t.items=[],t.defaultcolor=ge.fromJson(e.defaultcolor);for(var i=0;i<r;i++)t.items.push(hi.fromObj(s[i]));return t}}i.ThemeGridUnique=ui;
  1017. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1018. * This program are made available under the terms of the Apache License, Version 2.0
  1019. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1020. class ci{constructor(e){this.caption=null,this.unique=null,this.offsetX=0,this.offsetY=0,this.visible=!0,this.style=new ks,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelUniqueItem"}destroy(){var e=this;e.unique=null,e.caption=null,e.offsetX=null,e.offsetY=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new ci;return X.copy(t,e),t}}}i.ThemeLabelUniqueItem=ci;
  1021. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1022. * This program are made available under the terms of the Apache License, Version 2.0
  1023. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1024. class di{constructor(e){this.datasetNames=null,this.dataSourceNames=null,this.joinItems=null,this.themes=null,this.displayFilters=null,this.displayOrderBys=null,this.fieldValuesDisplayFilter=null,e&&X.extend(this,e),this.CLASS_NAME="SuperMap.ThemeParameters"}destroy(){var e=this;if(e.datasetNames=null,e.dataSourceNames=null,e.joinItems){for(let t=0,s=e.joinItems,r=s.length;t<r;t++)s[t].destroy();e.joinItems=null}if(e.themes){for(let t=0,s=e.themes,r=s.length;t<r;t++)s[t].destroy();e.themes=null}}}i.ThemeParameters=di;
  1025. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1026. * This program are made available under the terms of the Apache License, Version 2.0
  1027. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1028. class pi extends Je{constructor(e,t){super(e,t),t&&i.Util.extend(this,t),this.url=X.urlPathAppend(this.url,"tempLayersSet"),this.CLASS_NAME="SuperMap.ThemeService"}destroy(){super.destroy()}processAsync(e){if(e instanceof di){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t,s="",r=null,i=null,a=null;s+="[{'type': 'UGC','subLayers': {'layers': [";for(var n=0;n<e.themes.length;n++){r=e.themes[n];var o=X.toJSON(r);if(s+="{'theme': "+(o=o.slice(0,-1))+"},'type': 'UGC','ugcLayerType': 'THEME',",(i=e.displayFilters)&&i.length>0&&(1===i.length?s+="'displayFilter':\""+i[0]+'",':s+="'displayFilter':\""+i[n]+'",'),(a=e.displayOrderBy)&&a.length>0&&(1===a.length?s+="'displayOrderBy':'"+a[0]+"',":s+="'displayOrderBy':'"+a[n]+"',"),(t=e.fieldValuesDisplayFilter)&&(s+="'fieldValuesDisplayFilter':"+X.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[n]&&(s+="'joinItems':["+X.toJSON(e.joinItems[n])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[n]?n:e.datasetNames.length-1,h=e.dataSourceNames[n]?n:e.dataSourceNames.length-1;s+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[h]+"'}},"}else s+="},"}e.themes&&e.themes.length>0&&(s=s.substring(0,s.length-1)),s+="]},";var u=this.url.split("/");return s+="'name': '"+u[u.length-2]+"'}]"}}i.ThemeService=pi;
  1029. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1030. * This program are made available under the terms of the Apache License, Version 2.0
  1031. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1032. class mi extends Ke{constructor(e,t){super(e,t),this.mode=null,t&&X.extend(this,t),this.CLASS_NAME="SuperMap.ThiessenAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof Ft?(s.mode="datasets",s.url=X.urlPathAppend(s.url,"datasets/"+e.dataset+"/thiessenpolygon"),Ft.toObject(e,t)):e instanceof gs&&(s.mode="geometry",s.url=X.urlPathAppend(s.url,"geometry/thiessenpolygon"),gs.toObject(e,t));var r=X.toJSON(t);s.url=X.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}i.ThiessenAnalystService=mi;
  1033. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1034. * This program are made available under the terms of the Apache License, Version 2.0
  1035. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1036. class fi extends Ke{constructor(e,t){super(e,t),t&&X.extend(this,t),this.CLASS_NAME="SuperMap.GeometryBatchAnalystService"}processAsync(e){var t=this;t.url=X.urlPathAppend(t.url,"geometry/batchanalyst"),t.url=X.urlAppend(t.url,"returnContent=true&ignoreAnalystParam=true");var s=t._processParams(e),r=X.toJSON(s);t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}_processParams(e){var t=this;if(X.isArray(e)){var s=[];return e.map(function(e){return s.push(t._toJSON(e)),e}),s}}_toJSON(e){var t={};if("buffer"===e.analystName)t.analystName="buffer",t.param={},ot.toObject(e.param,t.param);else if("overlay"===e.analystName)t.analystName="overlay",t.param={},fs.toObject(e.param,t.param);else if("interpolationDensity"===e.analystName)t.analystName="interpolationDensity",t.param={},dr.toObject(e.param,t.param);else if("interpolationidw"===e.analystName)t.analystName="interpolationidw",t.param={},dr.toObject(e.param,t.param);else if("interpolationRBF"===e.analystName)t.analystName="interpolationRBF",t.param={},dr.toObject(e.param,t.param);else if("interpolationKriging"===e.analystName)t.analystName="interpolationKriging",t.param={},dr.toObject(e.param,t.param);else{if("thiessenpolygon"!==e.analystName)return e;t.analystName="thiessenpolygon",t.param={},gs.toObject(e.param,t.param)}return t}destroy(){super.destroy()}}i.GeometryBatchAnalystService=fi;
  1037. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1038. * This program are made available under the terms of the Apache License, Version 2.0
  1039. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1040. class yi extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TilesetsService"}destroy(){super.destroy()}processAsync(){if(this.url){var e=this;e.url=X.urlPathAppend(e.url,"tilesets"),e.request({method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}i.TilesetsService=yi;
  1041. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1042. * This program are made available under the terms of the Apache License, Version 2.0
  1043. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1044. class gi{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=U.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,X.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}i.TopologyValidatorJobsParameter=gi;
  1045. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1046. * This program are made available under the terms of the Apache License, Version 2.0
  1047. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1048. class vi extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,gi,t)}}i.TopologyValidatorJobsService=vi;
  1049. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1050. * This program are made available under the terms of the Apache License, Version 2.0
  1051. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1052. class Si{constructor(e){e=e||{},this.lineID=null,this.lineName=null,this.lineAliasName=null,this.startStopIndex=null,this.startStopName=null,this.startStopAliasName=null,this.endStopIndex=null,this.endStopName=null,this.endStopAliasName=null,X.extend(this,e),this.CLASS_NAME="SuperMap.TransferLine"}destroy(){X.reset(this)}static fromJson(e){if(e)return new Si({lineID:e.lineID,lineName:e.lineName,lineAliasName:e.lineAliasName,startStopIndex:e.startStopIndex,startStopName:e.startStopName,startStopAliasName:e.startStopAliasName,endStopIndex:e.endStopIndex,endStopName:e.endStopName,endStopAliasName:e.endStopAliasName})}}i.TransferLine=Si;
  1053. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1054. * This program are made available under the terms of the Apache License, Version 2.0
  1055. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1056. class bi{constructor(e){e=e||{},this.transferLines=null,this.points=null,X.extend(this,e),this.CLASS_NAME="SuperMap.TransferPathParameters"}destroy(){X.reset(this)}static toJson(e){if(e)return X.toJSON(e)}}i.TransferPathParameters=bi;
  1057. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1058. * This program are made available under the terms of the Apache License, Version 2.0
  1059. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1060. class xi extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof bi){var t,s=this;s.url=X.urlPathAppend(s.url,"path"),t={points:X.toJSON(e.points),transferLines:X.toJSON(e.transferLines)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}i.TransferPathService=xi;
  1061. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1062. * This program are made available under the terms of the Apache License, Version 2.0
  1063. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1064. class Ci{constructor(e){e=e||{},this.solutionCount=6,this.transferPreference=L.NONE,this.transferTactic=O.LESS_TIME,this.walkingRatio=null,this.points=!1,this.evadeLines=null,this.evadeStops=null,this.priorLines=null,this.priorStops=null,this.travelTime=null,X.extend(this,e),this.CLASS_NAME="SuperMap.TransferSolutionParameters"}destroy(){X.reset(this)}static toJson(e){if(e)return X.toJSON(e)}}i.TransferSolutionParameters=Ci;
  1065. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1066. * This program are made available under the terms of the Apache License, Version 2.0
  1067. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1068. class _i extends Je{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferSolutionService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ci){var t,s=this;s.url=X.urlPathAppend(s.url,"solutions"),t={points:X.toJSON(e.points),walkingRatio:e.walkingRatio,transferTactic:e.transferTactic,solutionCount:e.solutionCount,transferPreference:e.transferPreference},e.evadeLines&&(t.evadeLines=X.toJSON(e.evadeLines)),e.evadeStops&&(t.evadeStops=X.toJSON(e.evadeStops)),e.priorLines&&(t.priorLines=X.toJSON(e.priorLines)),e.priorStops&&(t.priorStops=X.toJSON(e.priorStops)),e.travelTime&&(t.travelTime=e.travelTime),s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}i.TransferSolutionService=_i;
  1069. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1070. * This program are made available under the terms of the Apache License, Version 2.0
  1071. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1072. class Ti{constructor(e){e&&(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",X.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}i.UpdateEdgeWeightParameters=Ti;
  1073. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1074. * This program are made available under the terms of the Apache License, Version 2.0
  1075. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1076. class wi extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ti){var t=this,s=t.parse(e);t.url=X.urlPathAppend(t.url,s);var r=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:r,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"edgeWeight"!==e[s])switch(s){case"edgeId":t+="/edgeweight/"+e[s];break;case"fromNodeId":t+="/fromnode/"+e[s];break;case"toNodeId":t+="/tonode/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}}i.UpdateEdgeWeightService=wi;
  1077. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1078. * This program are made available under the terms of the Apache License, Version 2.0
  1079. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1080. class Ei{constructor(e){e&&(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",X.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}i.UpdateTurnNodeWeightParameters=Ei;
  1081. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1082. * This program are made available under the terms of the Apache License, Version 2.0
  1083. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1084. class Mi extends ft{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ei){var t=this,s=t.parse(e);t.url=X.urlPathAppend(t.url,s);var r=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:r,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"turnNodeWeight"!==e[s])switch(s){case"nodeId":t+="/turnnodeweight/"+e[s];break;case"fromEdgeId":t+="/fromedge/"+e[s];break;case"toEdgeId":t+="/toedge/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}}i.UpdateTurnNodeWeightService=Mi;
  1085. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1086. * This program are made available under the terms of the Apache License, Version 2.0
  1087. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1088. class Ai{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=F.CLIP,this.output=null,this.mappingParameters=null,X.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof ht&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ut&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}i.VectorClipJobsParameter=Ai;
  1089. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1090. * This program are made available under the terms of the Apache License, Version 2.0
  1091. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1092. class Pi extends dt{constructor(e,t){super(e,t),this.url=X.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(X.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,Ai,t)}}i.VectorClipJobsService=Pi;
  1093. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1094. * This program are made available under the terms of the Apache License, Version 2.0
  1095. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1096. class Oi{constructor(e){e=e||{},this.type=null,X.extend(this,e),this.CLASS_NAME="SuperMap.RasterFunctionParameter"}destroy(){this.type=null}}i.RasterFunctionParameter=Oi;i.NDVIParameter=
  1097. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1098. * This program are made available under the terms of the Apache License, Version 2.0
  1099. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1100. class extends Oi{constructor(e){super(e),this.redIndex=0,this.nirIndex=1,this.colorMap="0:ffffe5ff;0.1:f7fcb9ff;0.2:d9f0a3ff;0.3:addd8eff;0.4:78c679ff;0.5:41ab5dff;0.6:238443ff;0.7:006837ff;1:004529ff",this.type=H.NDVI,X.extend(this,e),this.CLASS_NAME="SuperMap.NDVIParameter"}destroy(){super.destroy(),this.redIndex=null,this.nirIndex=null,this.colorMap=null}toJSON(){return{redIndex:this.redIndex,nirIndex:this.nirIndex,colorMap:this.colorMap,type:this.type}}};i.HillshadeParameter=
  1101. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1102. * This program are made available under the terms of the Apache License, Version 2.0
  1103. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1104. class extends Oi{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.zFactor=1,this.type=H.HILLSHADE,X.extend(this,e),this.CLASS_NAME="SuperMap.HillshadeParameter"}destroy(){super.destroy(),this.altitude=null,this.azimuth=null,this.zFactor=null}toJSON(){return{altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,type:this.type}}};
  1105. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1106. * This program are made available under the terms of the Apache License, Version 2.0
  1107. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1108. class Li{constructor(e){this.name=null,this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobCustomItems",X.extend(this,e)}destroy(){this.name=null,this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={name:this.name};return this.title&&(e.title=this.title),this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),X.toJSON(e)}}i.WebPrintingJobCustomItems=Li;
  1109. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1110. * This program are made available under the terms of the Apache License, Version 2.0
  1111. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1112. class Ii{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobImage",X.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl&&(e.picAsUrl=this.picAsUrl),this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),X.toJSON(e)}}i.WebPrintingJobImage=Ii;
  1113. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1114. * This program are made available under the terms of the Apache License, Version 2.0
  1115. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1116. class Ni{constructor(e){this.name=null,this.layerType=null,this.url=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayers",X.extend(this,e)}destroy(){this.name=null,this.layerType=null,this.url=null}}i.WebPrintingJobLayers=Ni;
  1117. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1118. * This program are made available under the terms of the Apache License, Version 2.0
  1119. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1120. class Ri{constructor(e){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers=null,this.customItems=null,this.CLASS_NAME="SuperMap.WebPrintingJobLegendOptions",X.extend(this,e)}destroy(){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers instanceof Ni&&(this.layers.destroy(),this.layers=null),this.customItems instanceof Li&&(this.customItems.destroy(),this.customItems=null)}toJSON(){var e={title:this.title||""};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64?e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,""):this.customItems&&(e.customItems=this.customItems),X.toJSON(e)}}i.WebPrintingJobLegendOptions=Ri;
  1121. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1122. * This program are made available under the terms of the Apache License, Version 2.0
  1123. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1124. class Fi{constructor(e){this.center=null,this.scale=null,this.layerNames=null,this.image=null,this.layers=null,this.CLASS_NAME="SuperMap.WebPrintingJobLittleMapOptions",X.extend(this,e)}destroy(){this.center=null,this.scale=null,this.layerNames=null,this.image instanceof Ii&&(this.image.destroy(),this.image=null),this.layers instanceof Ni&&(this.layers.destroy(),this.layers=null)}toJSON(){var e={scale:this.scale,center:this.center};return this.layerNames?e.layerNames=this.layerNames:this.layers&&(e.layers=this.layers),this.image&&(e.image=this.image),X.toJSON(e)}}i.WebPrintingJobLittleMapOptions=Fi;
  1125. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1126. * This program are made available under the terms of the Apache License, Version 2.0
  1127. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1128. class Di{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobNorthArrowOptions",X.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),X.toJSON(e)}}i.WebPrintingJobNorthArrowOptions=Di;
  1129. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1130. * This program are made available under the terms of the Apache License, Version 2.0
  1131. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1132. class ki{constructor(e){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null,this.CLASS_NAME="SuperMap.WebPrintingJobScaleBarOptions",X.extend(this,e)}destroy(){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null}toJSON(){var e={scaleText:this.scaleText||"",type:this.type||"BAR",intervals:this.intervals||"",unit:this.unit||"METER"};return this.orientation&&(e.orientation=this.orientation),X.toJSON(e)}}i.WebPrintingJobScaleBarOptions=ki;
  1133. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1134. * This program are made available under the terms of the Apache License, Version 2.0
  1135. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1136. class Gi{constructor(e){this.type=null,this.url=null,this.token=null,this.value=null,this.CLASS_NAME="SuperMap.WebPrintingJobContent",X.extend(this,e)}destroy(){this.type="WEBMAP",this.url=null,this.token=null,this.value=null}toJSON(){var e={type:this.type};return this.token&&(e.token=this.token),this.url?e.url=this.url:this.value&&(e.value=this.value),X.toJSON(e)}}i.WebPrintingJobContent=Gi;
  1137. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1138. * This program are made available under the terms of the Apache License, Version 2.0
  1139. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1140. class Bi{constructor(e){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions=null,this.northArrowOptions=null,this.littleMapOptions=null,this.legendOptions=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayoutOptions",X.extend(this,e)}destroy(){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions instanceof ki&&(this.scaleBarOptions.destroy(),this.scaleBarOptions=null),this.northArrowOptions instanceof Di&&(this.northArrowOptions.destroy(),this.northArrowOptions=null),this.littleMapOptions instanceof Fi&&(this.littleMapOptions.destroy(),this.littleMapOptions=null),this.legendOptions instanceof Ri&&(this.legendOptions.destroy(),this.legendOptions=null)}toJSON(){var e={templateName:this.templateName,title:this.title,subTitle:this.subTitle,author:this.author,copyright:this.copyright};return this.scaleBarOptions&&(e.scaleBarOptions=this.scaleBarOptions),this.northArrowOptions&&(e.northArrowOptions=this.northArrowOptions),this.littleMapOptions&&(e.littleMapOptions=this.littleMapOptions),this.legendOptions&&(e.legendOptions=this.legendOptions),X.toJSON(e)}}i.WebPrintingJobLayoutOptions=Bi;
  1141. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1142. * This program are made available under the terms of the Apache License, Version 2.0
  1143. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1144. class Ui{constructor(e){this.format=null,this.dpi=96,this.scale=null,this.rotation=null,this.center=null,this.CLASS_NAME="SuperMap.WebPrintingJobExportOptions",X.extend(this,e)}destroy(){this.format=null,this.dpi=null,this.scale=null,this.rotation=null,this.center=null,this.outputSize=null}toJSON(){var e={format:this.format||"PDF",dpi:this.dpi,scale:this.scale,center:this.center};return this.rotation&&(e.rotation=this.rotation),this.outputSize&&(e.outputSize=this.outputSize),X.toJSON(e)}}i.WebPrintingJobExportOptions=Ui;i.WebPrintingJobParameters=
  1145. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1146. * This program are made available under the terms of the Apache License, Version 2.0
  1147. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1148. class{constructor(e){e&&(this.content=null,this.layoutOptions=null,this.exportOptions=null,X.extend(this,e),this.CLASS_NAME="SuperMap.WebPrintingJobParameters")}destroy(){this.content instanceof Gi&&(this.content.destroy(),this.content=null),this.layoutOptions instanceof Bi&&(this.layoutOptions.destroy(),this.layoutOptions=null),this.exportOptions instanceof Ui&&(this.exportOptions.destroy(),this.exportOptions=null)}};
  1149. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1150. * This program are made available under the terms of the Apache License, Version 2.0
  1151. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1152. class ji extends Je{constructor(e,t){super(e,t),t&&X.extend(this,t),this.CLASS_NAME="SuperMap.WebPrintingService",this.url}destroy(){super.destroy()}createWebPrintingJob(e){if(e){e.layoutOptions&&e.layoutOptions.legendOptions&&(!e.layoutOptions.legendOptions.title&&(e.layoutOptions.legendOptions.title=""),e.layoutOptions.legendOptions.picAsBase64=e.layoutOptions.legendOptions.picAsBase64&&e.layoutOptions.legendOptions.picAsBase64.replace(/^data:.+;base64,/,""),e.layoutOptions.legendOptions.customItems&&e.layoutOptions.legendOptions.customItems.hasOwnProperty("picAsBase64")&&(e.layoutOptions.legendOptions.customItems.picAsBase64=e.layoutOptions.legendOptions.customItems.picAsBase64.replace(/^data:.+;base64,/,"")));var t=this;t.request({url:t._processUrl("jobs"),method:"POST",data:X.toJSON(e),scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}getPrintingJob(e){var t=this,s=t._processUrl(`jobs/${e}`);t.request({url:s,method:"GET",scope:t,success:function(e){t.rollingProcess(e,s)},failure:t.serviceProcessFailed})}getPrintingJobResult(e){var t=this;t.request({url:t._processUrl(`jobs/${e}/result`),method:"GET",scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}getLayoutTemplates(){var e=this;e.request({url:e._processUrl("layouts"),method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}rollingProcess(e,t){var s=this;if(e)var r=setInterval(function(){s.request({url:t,method:"GET",scope:s,success:function(e){switch(e.status){case"FINISHED":clearInterval(r),s.serviceProcessCompleted(e);break;case"ERROR":clearInterval(r),s.serviceProcessFailed(e);break;case"RUNNING":s.events.triggerEvent("processRunning",e)}},failure:s.serviceProcessFailed})},1e3)}_processUrl(e){return e?X.urlPathAppend(this.url,e):this.url}}i.WebPrintingService=ji;
  1153. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1154. * This program are made available under the terms of the Apache License, Version 2.0
  1155. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1156. i.ServiceStatus={DOES_NOT_INVOLVE:"DOES_NOT_INVOLVE",PUBLISH_FAILED:"PUBLISH_FAILED",PUBLISHED:"PUBLISHED",PUBLISHING:"PUBLISHING",UNPUBLISHED:"UNPUBLISHED",UNPUBLISHED_FAILED:"UNPUBLISHED_FAILED"},i.DataItemType={AUDIO:"AUDIO",COLOR:"COLOR",COLORSCHEME:"COLORSCHEME",CSV:"CSV",EXCEL:"EXCEL",FILLSYMBOL:"FILLSYMBOL",IMAGE:"IMAGE",LAYERTEMPLATE:"LAYERTEMPLATE",LAYOUTTEMPLATE:"LAYOUTTEMPLATE",LINESYMBOL:"LINESYMBOL",MAPTEMPLATE:"MAPTEMPLATE",MARKERSYMBOL:"MARKERSYMBOL",MBTILES:"MBTILES",PHOTOS:"PHOTOS",SHP:"SHP",SMTILES:"SMTILES",SVTILES:"SVTILES",THEMETEMPLATE:"THEMETEMPLATE",TPK:"TPK",UDB:"UDB",UGCV5:"UGCV5",UNKNOWN:"UNKNOWN",VIDEO:"VIDEO",WORKENVIRONMENT:"WORKENVIRONMENT",WORKSPACE:"WORKSPACE"},i.DataItemOrderBy={FILENAME:"FILENAME",ID:"ID",LASTMODIFIEDTIME:"LASTMODIFIEDTIME",NICKNAME:"NICKNAME",SERVICESTATUS:"SERVICESTATUS",SIZE:"SIZE",STATUS:"STATUS",TYPE:"TYPE",UPDATETIME:"UPDATETIME",USERNAME:"USERNAME"},i.FilterField={LINKPAGE:"LINKPAGE",MAPTITLE:"MAPTITLE",NICKNAME:"NICKNAME",RESTITLE:"RESTITLE",USERNAME:"USERNAME"};
  1157. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1158. * This program are made available under the terms of the Apache License, Version 2.0
  1159. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1160. class Vi{constructor(e){e=e||{},X.extend(this,e),this.serverType=n.ONLINE,this.CLASS_NAME="SuperMap.OnlineServiceBase"}request(e,t,s,r={}){return t=this.createCredentialUrl(t),r.crossOrigin=this.options.crossOrigin,r.headers=this.options.headers,Pe.commit(e,t,s,r).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,s=this.getCredential();if(s){var r="key="+s,i=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===i?t+=r:t.indexOf("?")>-1&&"?"!==i?t+="&"+r:t+="?"+r}return t}getCredential(){}}i.OnlineServiceBase=Vi;
  1161. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1162. * This program are made available under the terms of the Apache License, Version 2.0
  1163. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1164. class Hi extends Vi{constructor(e,t){super(e),t=t||{},this.MD5=null,this.type=null,this.userName=null,this.fileName=null,this.size=null,this.serviceStatus=null,this.serviceId=null,this.id=null,this.lastModfiedTime=null,this.status=null,this.storageId=null,this.publishInfo=null,this.authorizeSetting=null,this.nickname=null,this.tags=[],this.description=null,this.dataItemServices=null,this.coordType=null,this.dataCheckResult=null,this.dataMetaInfo=null,this.thumbnail=null,X.extend(this,t),this.id&&(this.serviceUrl=e+"/"+this.id),this.CLASS_NAME="SuperMap.OnlineData"}load(){if(this.serviceUrl){var e=this;return e.request("GET",this.serviceUrl).then(function(t){X.extend(e,t)})}}getPublishedServices(){return this.dataItemServices}getAuthorizeSetting(){return this.authorizeSetting}}i.OnlineData=Hi;i.Online=
  1165. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1166. * This program are made available under the terms of the Apache License, Version 2.0
  1167. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1168. class{constructor(){this.rootUrl="https://www.supermapol.com",this.webUrl=this.rootUrl+"/web";var e=this.webUrl+"/mycontent";this.mDatasUrl=e+"/datas",this.CLASS_NAME="SuperMap.Online"}load(){return Pe.get(this.rootUrl).then(function(e){return e})}login(){Oe.loginOnline(this.rootUrl,!0)}queryDatas(e){var t=this,s=t.mDatasUrl;return e&&(e=e.toJSON()),Pe.get(s,e).then(function(e){if(e&&e.content&&!(e.content.length<1)){for(var s=[],r=e.content,i=r.length,a=0;a<i;a++){var n=r[a],o=new Hi(t.mDatasUrl,n);s.push(o)}return s}})}};i.OnlineQueryDatasParameter=
  1169. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1170. * This program are made available under the terms of the Apache License, Version 2.0
  1171. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1172. class{constructor(e){e=e||{},this.userNames=null,this.types=null,this.fileName=null,this.serviceStatuses=null,this.serviceId=null,this.ids=null,this.keywords=null,this.orderBy=null,this.tags=null,this.filterFields=null,X.extend(this,e),this.CLASS_NAME="SuperMap.OnlineQueryDatasParameter"}toJSON(){var e=this,t={types:e.types,fileName:e.fileName,serviceStatuses:e.serviceStatuses,serviceId:e.serviceId,ids:e.ids,keywords:e.keywords,orderBy:e.orderBy,tags:e.tags,filterFields:e.filterFields};for(var s in t)null==t[s]&&delete t[s];return t}};i.KeyServiceParameter=
  1173. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1174. * This program are made available under the terms of the Apache License, Version 2.0
  1175. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1176. class{constructor(e){this.name=null,this.serviceIds=null,this.clientType=R.SERVER,this.limitation=null,X.extend(this,e),this.CLASS_NAME="SuperMap.KeyServiceParameter"}toJSON(){return{name:this.name,serviceIds:this.serviceIds,clientType:this.clientType,limitation:this.limitation}}};i.ServerInfo=
  1177. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1178. * This program are made available under the terms of the Apache License, Version 2.0
  1179. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1180. class{constructor(e,t){this.type=e,this.server=null,this.tokenServiceUrl=null,this.keyServiceUrl=null,X.extend(this,t),this.CLASS_NAME="SuperMap.ServerInfo",this.type=this.type||n.ISERVER,this.server||console.error("server url require is not undefined");var s="/services/security/tokens";this.type===n.ISERVER&&this.server.indexOf("iserver")<0&&(s="/iserver"+s),this.tokenServiceUrl||(this.tokenServiceUrl=X.urlPathAppend(this.server,s)),this.keyServiceUrl||(this.type===n.IPORTAL?this.keyServiceUrl=X.urlPathAppend(this.server,"/web/mycontent/keys/register"):this.type===n.ONLINE&&(this.keyServiceUrl=X.urlPathAppend(this.server,"/web/mycontent/keys")))}};i.TokenServiceParameter=
  1181. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1182. * This program are made available under the terms of the Apache License, Version 2.0
  1183. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1184. class{constructor(e){this.userName=null,this.password=null,this.clientType=R.NONE,this.ip=null,this.referer=null,this.expiration=60,X.extend(this,e),this.CLASS_NAME="SuperMap.TokenServiceParameter"}toJSON(){return{userName:this.userName,password:this.password,clientType:this.clientType,ip:this.ip,referer:this.referer,expiration:this.expiration}}};const Ji=function(){try{return elasticsearch}catch(e){return{}}}();var zi=s.n(Ji);i.ElasticSearch=
  1185. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1186. * This program are made available under the terms of the Apache License, Version 2.0
  1187. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1188. class{constructor(e,t){t=t||{},this.url=e,this.client=new(zi().Client)({host:this.url}),this.change=null,this.openGeoFence=!1,this.outOfGeoFence=null,this.geoFence=null,this.EVENT_TYPES=["change","error","outOfGeoFence"],this.events=new de(this,null,this.EVENT_TYPES),this.eventListeners=null,X.extend(this,t),this.eventListeners instanceof Object&&this.events.on(this.eventListeners)}setGeoFence(e){this.geoFence=e}bulk(e,t){return this.client.bulk(e,t)}clearScroll(e,t){return this.client.clearScroll(e,t)}count(e,t){return this.client.count(e,t)}create(e,t){return this.client.create(e,t)}delete(e,t){return this.client.delete(e,t)}deleteByQuery(e,t){return this.client.deleteByQuery(e,t)}deleteScript(e,t){return this.client.deleteScript(e,t)}deleteTemplate(e,t){return this.client.deleteTemplate(e,t)}exists(e,t){return this.client.exists(e,t)}existsSource(e,t){return this.client.existsSource(e,t)}explain(e,t){return this.client.explain(e,t)}fieldCaps(e,t){return this.client.fieldCaps(e,t)}get(e,t){return this.client.get(e,t)}getScript(e,t){return this.client.getScript(e,t)}getSource(e,t){return this.client.getSource(e,t)}getTemplate(e,t){return this.client.getTemplate(e,t)}index(e,t){return this.client.index(e,t)}info(e,t){return this.client.info(e,t)}mget(e,t){return this.client.mget(e,t)}msearch(e,t){let s=this;return s.client.msearch(e).then(function(e){return s._update(e.responses,t),e},function(e){return t(e),s.events.triggerEvent("error",{error:e}),e})}msearchTemplate(e,t){return this.client.msearchTemplate(e,t)}mtermvectors(e,t){return this.client.mtermvectors(e,t)}ping(e,t){return this.client.ping(e,t)}putScript(e,t){return this.client.putScript(e,t)}putTemplate(e,t){return this.client.putTemplate(e,t)}reindex(e,t){return this.client.reindex(e,t)}reindexRessrottle(e,t){return this.client.reindexRessrottle(e,t)}renderSearchTemplate(e,t){return this.client.renderSearchTemplate(e,t)}scroll(e,t){return this.client.scroll(e,t)}search(e,t){let s=this;return s.client.search(e).then(function(e){return s._update(e.responses,t),e},function(e){return t(e),s.events.triggerEvent("error",{error:e}),e})}searchShards(e,t){return this.client.searchShards(e,t)}searchTemplate(e,t){return this.client.searchTemplate(e,t)}suggest(e,t){return this.client.suggest(e,t)}termvectors(e,t){return this.client.termvectors(e,t)}update(e,t){return this.client.update(e,t)}updateByQuery(e,t){return this.client.updateByQuery(e,t)}_update(e,t){let s=this;e&&(s.data=e,s.openGeoFence&&s.geoFence&&s._validateDatas(e),s.events.triggerEvent("change",{data:s.data}),s.change?s.change&&s.change(e):t&&t(void 0,{responses:e}))}_validateDatas(e){if(e){e instanceof Array||(e=[e]);var t,s=e.length;for(t=0;t<s;t++)this._validateData(e[t])}}_validateData(e){let t=this;e.hits.hits.map(function(s){let r=s._source,i=t._getMeterPerMapUnit(t.geoFence.unit),a=t.geoFence.center[0]*i,n=t.geoFence.center[1]*i,o=r.x*i,l=r.y*i;return t._distance(o,l,a,n)>t.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),s})}_distance(e,t,s,r){return Math.sqrt((e-s)*(e-s)+(t-r)*(t-r))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}};
  1189. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1190. * This program are made available under the terms of the Apache License, Version 2.0
  1191. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1192. class qi{constructor(){this.BUILTIN_OBJECT={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},this._ctx=null,this._canvas=null,this._pixelCtx=null,this._width=null,this._height=null,this._offsetX=0,this._offsetY=0,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Util"}clone(e){var t=this.BUILTIN_OBJECT;if("object"==typeof e&&null!==e){var s=e;if(e instanceof Array){s=[];for(var r=0,i=e.length;r<i;r++)s[r]=this.clone(e[r])}else if(!t[Object.prototype.toString.call(e)])for(var a in s={},e)e.hasOwnProperty(a)&&(s[a]=this.clone(e[a]));return s}return e}mergeItem(e,t,s,r){var i=this.BUILTIN_OBJECT;t.hasOwnProperty(s)&&("object"!=typeof e[s]||i[Object.prototype.toString.call(e[s])]?!r&&s in e||(e[s]=t[s]):this.merge(e[s],t[s],r))}merge(e,t,s){for(var r in t)this.mergeItem(e,t,r,s);return e}getContext(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx}getPixelContext(){return this._pixelCtx||(this._canvas=document.createElement("canvas"),this._width=this._canvas.width,this._height=this._canvas.height,this._pixelCtx=this._canvas.getContext("2d")),this._pixelCtx}adjustCanvasSize(e,t){var s,r=this._canvas,i=this._pixelCtx,a=this._width,n=this._height,o=this._offsetX,l=this._offsetY;e+o>a&&(a=e+o+100,r.width=a,s=!0),t+l>n&&(n=t+l+100,r.height=n,s=!0),e<-o&&(a+=o=100*Math.ceil(-e/100),r.width=a,s=!0),t<-l&&(n+=l=100*Math.ceil(-t/100),r.height=n,s=!0),s&&i.translate(o,l)}getPixelOffset(){return{x:this._offsetX,y:this._offsetY}}indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s<r;s++)if(e[s]===t)return s;return-1}inherits(e,t){var s=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,s)e.prototype[i]=s[i];e.constructor=e}}
  1193. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1194. * This program are made available under the terms of the Apache License, Version 2.0
  1195. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1196. class Wi{constructor(){this.util=new qi,this._ctx=null,this.palette=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],this._palette=this.palette,this.highlightColor="rgba(0,0,255,1)",this._highlightColor=this.highlightColor,this.colorRegExp=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,this._nameColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Color"}customPalette(e){this.palette=e}resetPalette(){this.palette=this._palette}getColor(e,t){return e|=0,(t=t||this.palette)[e%t.length]}customHighlight(e){this.highlightColor=e}resetHighlight(){this.highlightColor=this._highlightColor}getHighlightColor(){return this.highlightColor}getRadialGradient(e,t,s,r,i,a,n){var o=this.util;this._ctx||(this._ctx=o.getContext());for(var l=this._ctx.createRadialGradient(e,t,s,r,i,a),h=0,u=n.length;h<u;h++)l.addColorStop(n[h][0],n[h][1]);return l.__nonRecursion=!0,l}getLinearGradient(e,t,s,r,i){var a=this.util;this._ctx||(this._ctx=a.getContext());for(var n=this._ctx.createLinearGradient(e,t,s,r),o=0,l=i.length;o<l;o++)n.addColorStop(i[o][0],i[o][1]);return n.__nonRecursion=!0,n}getStepColors(e,t,s){e=this.toRGBA(e),t=this.toRGBA(t),e=this.getData(e);for(var r=[],i=((t=this.getData(t))[0]-e[0])/s,a=(t[1]-e[1])/s,n=(t[2]-e[2])/s,o=(t[3]-e[3])/s,l=0,h=e[0],u=e[1],c=e[2],d=e[3];l<s;l++)r[l]=this.toColor([this.adjust(Math.floor(h),[0,255]),this.adjust(Math.floor(u),[0,255]),this.adjust(Math.floor(c),[0,255]),d.toFixed(4)-0],"rgba"),h+=i,u+=a,c+=n,d+=o;return h=t[0],u=t[1],c=t[2],d=t[3],r[l]=this.toColor([h,u,c,d],"rgba"),r}getGradientColors(e,t){var s=[],r=e.length;if(void 0===t&&(t=20),1===r)s=this.getStepColors(e[0],e[0],t);else if(r>1)for(var i=0,a=r-1;i<a;i++){var n=this.getStepColors(e[i],e[i+1],t);i<a-1&&n.pop(),s=s.concat(n)}return s}toColor(e,t){if(t=t||"rgb",e&&(3===e.length||4===e.length)){if(e=this.map(e,function(e){return e>1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var s=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=s[0],e[2]=s[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}toArray(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],s=0;return e.replace(/[\d.]+/g,function(e){s<3?e|=0:e=+e,t[s++]=e}),t}convert(e,t){if(!this.isCalculableColor(e))return e;var s=this.getData(e),r=s[3];return void 0===r&&(r=1),e.indexOf("hsb")>-1?s=this._HSV_2_RGB(s):e.indexOf("hsl")>-1&&(s=this._HSL_2_RGB(s)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?s=this._RGB_2_HSB(s):t.indexOf("hsl")>-1&&(s=this._RGB_2_HSL(s)),s[3]=r,this.toColor(s,t)}toRGBA(e){return this.convert(e,"rgba")}toRGB(e){return this.convert(e,"rgb")}toHex(e){return this.convert(e,"hex")}toHSVA(e){return this.convert(e,"hsva")}toHSV(e){return this.convert(e,"hsv")}toHSBA(e){return this.convert(e,"hsba")}toHSB(e){return this.convert(e,"hsb")}toHSLA(e){return this.convert(e,"hsla")}toHSL(e){return this.convert(e,"hsl")}toName(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}trim(e){return String(e).replace(/\s+/g,"")}normalize(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,s=(240&e)<<4,r=15&e;e="#"+((1<<24)+(t<<4)+t+(s<<4)+s+(r<<4)+r).toString(16).slice(1)}return e}lift(e,t){if(!this.isCalculableColor(e))return e;var s=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var r=this.getData(e),i=0;i<3;i++)r[i]=1===s?r[i]*(1-t)|0:(255-r[i])*t+r[i]|0;return"rgb("+r.join(",")+")"}reverse(e){if(!this.isCalculableColor(e))return e;var t=this.getData(this.toRGBA(e));return t=this.map(t,function(e){return 255-e}),this.toColor(t,"rgb")}mix(e,t,s){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===s&&(s=.5);for(var r=2*(s=1-this.adjust(s,[0,1]))-1,i=this.getData(this.toRGBA(e)),a=this.getData(this.toRGBA(t)),n=i[3]-a[3],o=((r*n==-1?r:(r+n)/(1+r*n))+1)/2,l=1-o,h=[],u=0;u<3;u++)h[u]=i[u]*o+a[u]*l;var c=i[3]*s+a[3]*(1-s);return c=Math.max(0,Math.min(1,c)),1===i[3]&&1===a[3]?this.toColor(h,"rgb"):(h[3]=c,this.toColor(h,"rgba"))}random(){return"#"+Math.random().toString(16).slice(2,8)}getData(e){var t,s,r=(e=this.normalize(e)).match(this.colorRegExp);if(null===r)throw new Error("The color format error");var i,a=[];if(r[2])i=[(t=r[2].replace("#","").split(""))[0]+t[1],t[2]+t[3],t[4]+t[5]],a=this.map(i,function(e){return Wi.prototype.adjust.call(this,parseInt(e,16),[0,255])});else if(r[4]){var n=r[4].split(",");s=n[3],i=n.slice(0,3),a=this.map(i,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),Wi.prototype.adjust.call(this,e,[0,255])}),void 0!==s&&a.push(this.adjust(parseFloat(s),[0,1]))}else if(r[5]||r[6]){var o=(r[5]||r[6]).split(","),l=parseInt(o[0],0)/360,h=o[1],u=o[2];s=o[3],(a=this.map([h,u],function(e){return Wi.prototype.adjust.call(this,parseFloat(e)/100,[0,1])})).unshift(l),void 0!==s&&a.push(this.adjust(parseFloat(s),[0,1]))}return a}alpha(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var s=this.getData(this.toRGBA(e));return s[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(s,"rgba")}map(e,t){if("function"!=typeof t)throw new TypeError;for(var s=e?e.length:0,r=0;r<s;r++)e[r]=t(e[r]);return e}adjust(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e}isCalculableColor(e){return e instanceof Array||"string"==typeof e}_HSV_2_RGB(e){var t,s,r,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,s=255*n,r=255*n;else{var o=6*i;6===o&&(o=0);var l=0|o,h=n*(1-a),u=n*(1-a*(o-l)),c=n*(1-a*(1-(o-l))),d=0,p=0,m=0;0===l?(d=n,p=c,m=h):1===l?(d=u,p=n,m=h):2===l?(d=h,p=n,m=c):3===l?(d=h,p=u,m=n):4===l?(d=c,p=h,m=n):(d=n,p=h,m=u),t=255*d,s=255*p,r=255*m}return[t,s,r]}_HSL_2_RGB(e){var t,s,r,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,s=255*n,r=255*n;else{var o,l=2*n-(o=n<.5?n*(1+a):n+a-a*n);t=255*this._HUE_2_RGB(l,o,i+1/3),s=255*this._HUE_2_RGB(l,o,i),r=255*this._HUE_2_RGB(l,o,i-1/3)}return[t,s,r]}_HUE_2_RGB(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),6*s<1?e+6*(t-e)*s:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}_RGB_2_HSB(e){var t,s,r=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(r,i,a),o=Math.max(r,i,a),l=o-n,h=o;if(0===l)t=0,s=0;else{s=l/o;var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;r===o?t=d-c:i===o?t=1/3+u-d:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}_RGB_2_HSL(e){var t,s,r=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(r,i,a),o=Math.max(r,i,a),l=o-n,h=(o+n)/2;if(0===l)t=0,s=0;else{s=h<.5?l/(o+n):l/(2-o-n);var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;r===o?t=d-c:i===o?t=1/3+u-d:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}}var Yi=new Wi;class Xi{static createCanvas(e,t){var s=document.createElement("canvas");return s.height=e,s.width=t,s.getContext("2d")}static getLinearGradient(e,t,s,r,i){this._ctx||(this._ctx=this.getContext());for(var a=this._ctx.createLinearGradient(e,t,s,r),n=i.length,o=1/(n-1),l=0,h=0;h<n;h++)a.addColorStop(l,i[h]),l+=o;return a.__nonRecursion=!0,a}static getContext(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx}static getStepColors(e,t,s){e=Yi.toRGBA(e),t=Yi.toRGBA(t),e=Yi.getData(e);for(var r=[],i=((t=Yi.getData(t))[0]-e[0])/s,a=(t[1]-e[1])/s,n=(t[2]-e[2])/s,o=(t[3]-e[3])/s,l=0,h=e[0],u=e[1],c=e[2],d=e[3];l<s;l++)r[l]=Yi.toColor([Yi.adjust(Math.floor(h),[0,255]),Yi.adjust(Math.floor(u),[0,255]),Yi.adjust(Math.floor(c),[0,255]),d.toFixed(4)-0],"hex"),h+=i,u+=a,c+=n,d+=o;return h=t[0],u=t[1],c=t[2],d=t[3],r[l]=Yi.toColor([h,u,c,d],"hex"),r}static getGradientColors(e,t,s){var r,i,a,n=[],o=e.length;if(void 0!==t){if(o>=t)if("RANGE"===s)for(i=0;i<t;i++)n.push(e[i]);else for(i=0;i<t;i++){let t=Math.floor(i/2);if(i%2==0)n.push(e[t]);else{let s=e.length-1-t;n.push(e[s])}}else{for(r=Math.ceil(t/(o-1)),i=0,a=o-1;i<a;i++){var l=this.getStepColors(e[i],e[i+1],r);i<a-1&&l.pop(),n=n.concat(l)}for(var h=n.length-t,u=0;u<h;u++)n.splice(2,1)}return n}}}i.ColorsPickerUtil=Xi;class Qi{static newInstance(){return this.geostatsInstance||(this.geostatsInstance=new window.geostats),this.geostatsInstance}static getInstance(e){let t=this.newInstance();return t.setSerie(e),t}static getArrayStatistic(e,t){return e.length?"Sum"===t||"求和"===t?this.getSum(e):"Maximum"===t||"最大值"===t?this.getMax(e):"Minimum"===t||"最小值"===t?this.getMin(e):"Average"===t||"平均值"===t?this.getMean(e):"Median"===t||"中位数"===t?this.getMedian(e):"times"===t||"计数"===t?this.getTimes(e):void 0:0}static getArraySegments(e,t,s){if("offset"===t)return this.getEqInterval(e,s);if("jenks"===t)return this.getJenks(e,s);if("square"===t){return this.getMin(e)>=0&&this.getSqrtInterval(e,s)}if("logarithm"===t){return this.getMin(e)>0&&this.getGeometricProgression(e,s)}}static getSum(e){return this.getInstance(e).sum()}static getMax(e){return this.getInstance(e).max()}static getMin(e){return this.getInstance(e).min()}static getMean(e){return this.getInstance(e).mean()}static getMedian(e){return this.getInstance(e).median()}static getTimes(e){return e.length}static getEqInterval(e,t){return this.getInstance(e).getClassEqInterval(t)}static getJenks(e,t){return this.getInstance(e).getClassJenks(t)}static getSqrtInterval(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}static getGeometricProgression(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}i.ArrayStatistic=Qi;
  1197. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1198. * This program are made available under the terms of the Apache License, Version 2.0
  1199. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1200. var Ki=s(52),Zi=s.n(Ki);
  1201. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1202. * This program are made available under the terms of the Apache License, Version 2.0
  1203. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1204. class $i{constructor(e){this.env=null,this.parser=null,this.ruleSet=null,this.cartoStr="",this.shaders=null,"string"==typeof e&&(this.cartoStr=e,this.env={frames:[],errors:[],error:function(e){this.errors.push(e)}},this.parser=this.getParser(this.env),this.parse(e),this.shaders=this.toShaders())}getParser(e){var t,s,r,a,n,o,l,h,u,c=this;function d(){a=l[r],n=s,h=s}function p(){l[r]=a,h=s=n}function m(){s>h&&(l[r]=l[r].slice(s-h),h=s)}function f(e){var i,a,n,o;if(e instanceof Function)return e.call(u.parsers);if("string"==typeof e)i=t.charAt(s)===e?e:null,a=1,m();else{if(m(),!(i=e.exec(l[r])))return null;a=i[0].length}if(i){var c=s+=a;for(o=s+l[r].length-a;s<o&&(32===(n=t.charCodeAt(s))||10===n||9===n);)s++;return l[r]=l[r].slice(a+(s-c)),h=s,0===l[r].length&&r<l.length-1&&r++,"string"==typeof i?i:1===i.length?i[0]:i}}function y(s){var r,i={index:o,filename:e.filename,message:"Parse error.",line:0,column:-1};for(var a in i)0===s[a]&&(s[a]=i[a]);r=s.filename&&c.env.inputs&&c.env.inputs[s.filename]?c.env.inputs[s.filename]:t,s.line=(r.slice(0,s.index).match(/\n/g)||"").length+1;for(var n=s.index;n>=0&&"\n"!==r.charAt(n);n--)s.column++;return new Error([s.filename,s.line,s.column,s.message].join(";"))}return this.env=e=e||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},u={parse:function(a){var n,u=null;if(s=r=h=o=0,l=[],t=a.replace(/\r\n/g,"\n"),e.filename&&(c.env.inputs[e.filename]=t),l=function(e){for(var s,r,i,a,n=0,o=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,h=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,c=0,d=e[0],p=0;p<t.length;)if(o.lastIndex=p,(s=o.exec(t))&&s.index===p&&(p+=s[0].length,d.push(s[0])),i=t.charAt(p),l.lastIndex=h.lastIndex=p,(s=h.exec(t))&&s.index===p)p+=s[0].length,d.push(s[0]);else if(r||"/"!==i||"/"!==(a=t.charAt(p+1))&&"*"!==a||!(s=l.exec(t))||s.index!==p){switch(i){case"{":if(!r){c++,d.push(i);break}case"}":if(!r){c--,d.push(i),e[++n]=d=[];break}case"(":if(!r){r=!0,d.push(i);break}case")":if(r){r=!1,d.push(i);break}default:d.push(i)}p++}else p+=s[0].length,d.push(s[0]);return 0!==c&&(u={index:p-1,type:"Parse",message:c>0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),u)throw y(u);var d=function(e,t){var s=e.specificity,r=t.specificity;return s[0]!=r[0]?r[0]-s[0]:s[1]!=r[1]?r[1]-s[1]:s[2]!=r[2]?r[2]-s[2]:r[3]-s[3]};return(n=new i.CartoCSS.Tree.Ruleset([],f(this.parsers.primary))).root=!0,n.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+y(t).message:e.errors.message=y(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(d),t},n},parsers:{primary:function(){for(var e,t=[];(e=f(this.rule)||f(this.ruleset)||f(this.comment))||f(/^[\s\n]+/)||(e=f(this.invalid));)e&&t.push(e);return t},invalid:function(){var e=f(/^[^;\n]*[;\n]/);if(e)return new i.CartoCSS.Tree.Invalid(e,n)},comment:function(){var e;if("/"===t.charAt(s))return"/"===t.charAt(s+1)?new i.CartoCSS.Tree.Comment(f(/^\/\/.*/),!0):(e=f(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new i.CartoCSS.Tree.Comment(e):void 0},entities:{quoted:function(){if('"'===t.charAt(s)||"'"===t.charAt(s)){var e=f(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return e?new i.CartoCSS.Tree.Quoted(e[1]||e[2]):void 0}},field:function(){if(f("[")){var e=f(/(^[^\]]+)/);if(f("]"))return e?new i.CartoCSS.Tree.Field(e[1]):void 0}},comparison:function(){var e=f(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var e=f(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(e)return new i.CartoCSS.Tree.Keyword(e)},call:function(){var e,t;if(e=/^([\w\-]+|%)\(/.exec(l[r])){if("url"===(e=e[1]))return null;s+=e.length;if(f("("),t=f(this.entities.arguments),f(")"))return e?new i.CartoCSS.Tree.Call(e,t,s):void 0}},arguments:function(){for(var e,t=[];e=f(this.expression);){t.push(e);if(!f(","))break}return t},literal:function(){return f(this.entities.dimension)||f(this.entities.keywordcolor)||f(this.entities.hexcolor)||f(this.entities.quoted)},url:function(){var e;if("u"===t.charAt(s)&&f(/^url\(/)){e=f(this.entities.quoted)||f(this.entities.variable)||f(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return f(")")?new i.CartoCSS.Tree.URL(void 0!==e.value||e instanceof i.CartoCSS.Tree.Variable?e:new i.CartoCSS.Tree.Quoted(e)):new i.CartoCSS.Tree.Invalid(e,n,"Missing closing ) in URL.")}},variable:function(){var r,a=s;if("@"===t.charAt(s)&&(r=f(/^@[\w-]+/)))return new i.CartoCSS.Tree.Variable(r,a,e.filename)},hexcolor:function(){var e;if("#"===t.charAt(s)&&(e=f(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new i.CartoCSS.Tree.Color(e[1])},keywordcolor:function(){var e=l[r].match(/^[a-z]+/);if(e&&e[0]in i.CartoCSS.Tree.Reference.data.colors)return new i.CartoCSS.Tree.Color(i.CartoCSS.Tree.Reference.data.colors[f(/^[a-z]+/)])},dimension:function(){var e=t.charCodeAt(s);if(!(e>57||e<45||47===e)){var r=f(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return r?new i.CartoCSS.Tree.Dimension(r[1],r[2],n):void 0}}},variable:function(){var e;if("@"===t.charAt(s)&&(e=f(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=f(this.entities.call)||f(this.entities.literal),t=f(this.entities.field)||f(this.entities.variable),s=f(this.entities.url)||f(this.entities.keyword);return e||t||s},end:function(){var e;return f(";")||("string"==typeof(e="}")?t.charAt(s)===e:!!e.test(l[r]))},element:function(){var e=f(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(e)return new i.CartoCSS.Tree.Element(e)},attachment:function(){var e=f(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var e,r,a,o,l,h=[],u=new i.CartoCSS.Tree.Filterset,c=[],d=0,p=0;(a=f(this.element))||(l=f(this.zoom))||(o=f(this.filter))||(e=f(this.attachment));){if(d++,a)h.push(a);else if(l)c.push(l),p++;else if(o){var m=u.add(o);if(m)throw y({message:m,index:s-1});p++}else{if(r)throw y({message:"Encountered second attachment name.",index:s-1});r=e}var g=t.charAt(s);if("{"===g||"}"===g||";"===g||","===g)break}if(d)return new i.CartoCSS.Tree.Selector(u,c,h,r,p,n)},filter:function(){d();var t,s,r;if(f("[")&&(t=f(/^[a-zA-Z0-9\-_]+/)||f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.keyword)||f(this.entities.field))&&(t instanceof i.CartoCSS.Tree.Quoted&&(t=new i.CartoCSS.Tree.Field(t.toString())),(s=f(this.entities.comparison))&&(r=f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.dimension)||f(this.entities.keyword)||f(this.entities.field)))){if(!f("]"))throw y({message:"Missing closing ] of filter.",index:n-1});return t.is||(t=new i.CartoCSS.Tree.Field(t)),new i.CartoCSS.Tree.Filter(t,s,r,n,e.filename)}},zoom:function(){d();var e,t;if(f(/^\[\s*zoom/g)&&(e=f(this.entities.comparison))&&(t=f(this.entities.variable)||f(this.entities.dimension))&&f("]"))return new i.CartoCSS.Tree.Zoom(e,t,n);p()},block:function(){var e;if(f("{")&&(e=f(this.primary))&&f("}"))return e},ruleset:function(){var e,t,s=[];for(d();e=f(this.selector);){for(s.push(e);f(this.comment););if(!f(","))break;for(;f(this.comment););}if(e)for(;f(this.comment););if(s.length>0&&(t=f(this.block))){if(1===s.length&&s[0].elements.length&&"Map"===s[0].elements[0].value){var r=new i.CartoCSS.Tree.Ruleset(s,t);return r.isMap=!0,r}return new i.CartoCSS.Tree.Ruleset(s,t)}p()},rule:function(){var r,a,l=t.charAt(s);if(d(),"."!==l&&"#"!==l&&(r=f(this.variable)||f(this.property))){if((a=f(this.value))&&f(this.end))return new i.CartoCSS.Tree.Rule(r,a,n,e.filename);o=s,p()}},font:function(){for(var e,t=[],s=[];e=f(this.entity);)s.push(e);if(t.push(new i.CartoCSS.Tree.Expression(s)),f(","))for(;(e=f(this.expression))&&(t.push(e),f(",")););return new i.CartoCSS.Tree.Value(t)},value:function(){for(var e,t=[];(e=f(this.expression))&&(t.push(e),f(",")););return t.length>1?new i.CartoCSS.Tree.Value(t.map(function(e){return e.value[0]})):1===t.length?new i.CartoCSS.Tree.Value(t):void 0},sub:function(){var e;if(f("(")&&(e=f(this.expression))&&f(")"))return e},multiplication:function(){var e,t,s,r;if(e=f(this.operand)){for(;(s=f("/")||f("*")||f("%"))&&(t=f(this.operand));)r=new i.CartoCSS.Tree.Operation(s,[r||e,t],n);return r||e}},addition:function(){var e,r,a,o;if(e=f(this.multiplication)){for(;(a=f(/^[-+]\s+/)||" "!=t.charAt(s-1)&&(f("+")||f("-")))&&(r=f(this.multiplication));)o=new i.CartoCSS.Tree.Operation(a,[o||e,r],n);return o||e}},operand:function(){return f(this.sub)||f(this.entity)},expression:function(){for(var e,t=[];e=f(this.addition)||f(this.entity);)t.push(e);if(t.length>0)return new i.CartoCSS.Tree.Expression(t)},property:function(){var e=f(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}parse(e){var t=this.parser;return this.ruleSet=t.parse(e)}toShaders(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var s={},r=[];this._toShaders(s,r,t);for(var i=[],a={},n=0,o=t.length;n<o;++n){var l=t[n],h=l.attachment,u=s[r[n]],c=[];if(!a[h]){var d=0;for(var p in u)if("zoom"!==p&&"frames"!==p&&"attachment"!==p&&"elements"!=p)if("layer-index"===p){var m=(u[p].join("\n"),null);Object.defineProperty(c,"layerIndex",{configurable:!0,enumerable:!1,value:m})}else c[d++]=function(e,t){if(!Array.isArray(e))return e;var s=e.join("\n"),r='attributes["FEATUREID"]&&attributes["FEATUREID"]',i=s.indexOf(r);if(i>=0){if(!t.featureFilter){var a=i+r.length,n=s.indexOf(")",a+1),o="featureId&&(featureId"+s.substring(a,n)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!o}})}return{property:p,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+s+";} return _value; ")}}return{property:p,getValue:Function("attributes","zoom","var _value = null;"+s+"; return _value; ")}}(u[p],c);Object.defineProperty(c,"attachment",{configurable:!0,enumerable:!1,value:h}),Object.defineProperty(c,"elements",{configurable:!0,enumerable:!1,value:l.elements}),i.push(c),a[r[n]]=!0}Object.defineProperty(c,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return i}}return null}_toShaders(e,t,s){for(let r=0,a=s.length;r<a;++r){let a=s[r],n=[];for(let e=0,t=a.elements.length;e<t;e++)n.push(a.elements[e]);let o=a.filters.filters,l=[];for(let e in o)l.push(o[e].id);let h=n.join("/")+"::"+a.attachment+"_"+l.join("_");t.push(h);let u=e[h]=e[h]||{};u.zoom=i.CartoCSS.Tree.Zoom.all;let c=a.toJS(this.env);for(let e in c)(u[e]=u[e]||[]).push(c[e].join("\n"))}}getShaders(){return this.shaders}destroy(){this.cartoStr=null,this.env=null,this.ruleSet=null,this.parser=null,this.shaders=null}}i._mapnik_reference_latest={version:"2.1.1",style:{"filter-mode":{type:["all","first"],doc:"Control the processing behavior of Rule filters within a Style. If 'all' is used then all Rules are processed sequentially independent of whether any previous filters matched. If 'first' is used then it means processing ends after the first match (a positive filter evaluation) and no further Rules in the Style are processed ('first' is usually the default for CSS implementations on top of Mapnik to simplify translation from CSS to Mapnik XML)","default-value":"all","default-meaning":"All Rules in a Style are processed whether they have filters or not and whether or not the filter conditions evaluate to true."},"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},layer:{name:{"default-value":"",type:"string",required:!0,"default-meaning":"No layer name has been provided",doc:"The name of a layer. Can be anything you wish and is not strictly validated, but ideally unique in the map"},srs:{"default-value":"",type:"string","default-meaning":"No srs value is provided and the value will be inherited from the Map's srs",doc:"The spatial reference system definition for the layer, aka the projection. Can either be a proj4 literal string like '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' or, if the proper proj4 epsg/nad/etc identifier files are installed, a string that uses an id like: '+init=epsg:4326'"},status:{"default-value":!0,type:"boolean","default-meaning":"This layer will be marked as active and available for processing",doc:"A property that can be set to false to disable this layer from being processed"},minzoom:{"default-value":"0",type:"float","default-meaning":"The layer will be visible at the minimum possible scale",doc:"The minimum scale denominator that this layer will be visible at. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},maxzoom:{"default-value":"1.79769e+308",type:"float","default-meaning":"The layer will be visible at the maximum possible scale",doc:"The maximum scale denominator that this layer will be visible at. The default is the numeric limit of the C++ double type, which may vary slightly by system, but is likely a massive number like 1.79769e+308 and ensures that this layer will always be visible unless the value is reduced. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},queryable:{"default-value":!1,type:"boolean","default-meaning":"The layer will not be available for the direct querying of data values",doc:"This property was added for GetFeatureInfo/WMS compatibility and is rarely used. It is off by default meaning that in a WMS context the layer will not be able to be queried unless the property is explicitly set to true"},"clear-label-cache":{"default-value":!1,type:"boolean","default-meaning":"The renderer's collision detector cache (used for avoiding duplicate labels and overlapping markers) will not be cleared immediately before processing this layer",doc:"This property, by default off, can be enabled to allow a user to clear the collision detector cache before a given layer is processed. This may be desirable to ensure that a given layers data shows up on the map even if it normally would not because of collisions with previously rendered labels or markers"},"group-by":{"default-value":"",type:"string","default-meaning":"No special layer grouping will be used during rendering",doc:"https://github.com/mapnik/mapnik/wiki/Grouped-rendering"},"buffer-size":{"default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:"Extra tolerance around the Layer extent (in pixels) used to when querying and (potentially) clipping the layer data during rendering"},"maximum-extent":{"default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query this specific layer data during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Layer."}},symbolizers:{"*":{"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},map:{"background-color":{css:"background-color","default-value":"none","default-meaning":"transparent",type:"color",doc:"Map Background color"},"background-image":{css:"background-image",type:"uri","default-value":"","default-meaning":"transparent",doc:"An image that is repeated below all features on a map as a background.",description:"Map Background image"},srs:{css:"srs",type:"string","default-value":"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs","default-meaning":"The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space",doc:"Map spatial reference (proj4 string)"},"buffer-size":{css:"buffer-size","default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:'Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".'},"maximum-extent":{css:"","default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map."},base:{css:"base","default-value":"","default-meaning":"This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.",type:"string",doc:"Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet."},"paths-from-xml":{css:"","default-value":!0,"default-meaning":"Paths read from XML will be interpreted from the location of the XML",type:"boolean",doc:"value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"},"minimum-version":{css:"","default-value":"none","default-meaning":"Mapnik version will not be detected and no error will be thrown about compatibility",type:"string",doc:"The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"},"font-directory":{css:"font-directory",type:"uri","default-value":"none","default-meaning":"No map-specific fonts will be registered",doc:"Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered)."}},polygon:{fill:{css:"polygon-fill",type:"color","default-value":"rgba(128,128,128,1)","default-meaning":"gray and fully opaque (alpha = 1), same as rgb(128,128,128)",doc:"Fill color to assign to a polygon"},"fill-opacity":{css:"polygon-opacity",type:"float",doc:"The opacity of the polygon","default-value":1,"default-meaning":"opaque"},gamma:{css:"polygon-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon edges"},"gamma-method":{css:"polygon-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},clip:{css:"polygon-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},line:{stroke:{css:"line-color","default-value":"rgba(0,0,0,1)",type:"color","default-meaning":"black and fully opaque (alpha = 1), same as rgb(0,0,0)",doc:"The color of a drawn line"},"stroke-width":{css:"line-width","default-value":1,type:"float",doc:"The width of a line in pixels"},"stroke-opacity":{css:"line-opacity","default-value":1,type:"float","default-meaning":"opaque",doc:"The opacity of a line"},"stroke-linejoin":{css:"line-join","default-value":"miter",type:["miter","round","bevel"],doc:"The behavior of lines when joining"},"stroke-linecap":{css:"line-cap","default-value":"butt",type:["butt","round","square"],doc:"The display of line endings"},"stroke-gamma":{css:"line-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of stroke line"},"stroke-gamma-method":{css:"line-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},"stroke-dasharray":{css:"line-dasharray",type:"numbers",doc:"A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns.","default-value":"none","default-meaning":"solid line"},"stroke-dashoffset":{css:"line-dash-offset",type:"numbers",doc:"valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled)","default-value":"none","default-meaning":"solid line"},"stroke-miterlimit":{css:"line-miterlimit",type:"float",doc:"The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts.","default-value":4,"default-meaning":"Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'"},clip:{css:"line-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},offset:{css:"line-offset",type:"float","default-value":0,"default-meaning":"no offset",doc:"Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line)."},rasterizer:{css:"line-rasterizer",type:["full","fast"],"default-value":"full",doc:"Exposes an alternate AGG rendering method that sacrifices some accuracy for speed."},"geometry-transform":{css:"line-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},markers:{file:{css:"marker-file",doc:"An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse.","default-value":"","default-meaning":"An ellipse or circle, if width equals height",type:"uri"},opacity:{css:"marker-opacity",doc:"The overall opacity of the marker, if set, overrides both the opacity of both the fill and stroke","default-value":1,"default-meaning":"The stroke-opacity and fill-opacity will be used",type:"float"},"fill-opacity":{css:"marker-fill-opacity",doc:"The fill opacity of the marker","default-value":1,"default-meaning":"opaque",type:"float"},stroke:{css:"marker-line-color",doc:"The color of the stroke around a marker shape.","default-value":"black",type:"color"},"stroke-width":{css:"marker-line-width",doc:"The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.",type:"float"},"stroke-opacity":{css:"marker-line-opacity","default-value":1,"default-meaning":"opaque",doc:"The opacity of a line",type:"float"},placement:{css:"marker-placement",type:["point","line","interior"],"default-value":"point","default-meaning":"Place markers at the center point (centroid) of the geometry",doc:"Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior"},"multi-policy":{css:"marker-multi-policy",type:["each","whole","largest"],"default-value":"each","default-meaning":"If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each",doc:"A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default)."},"marker-type":{css:"marker-type",type:["arrow","ellipse"],"default-value":"ellipse",doc:"The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)"},width:{css:"marker-width","default-value":10,doc:"The width of the marker, if using one of the default types.",type:"expression"},height:{css:"marker-height","default-value":10,doc:"The height of the marker, if using one of the default types.",type:"expression"},fill:{css:"marker-fill","default-value":"blue",doc:"The color of the area of the marker.",type:"color"},"allow-overlap":{css:"marker-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping markers are shown or hidden.","default-meaning":"Do not allow makers to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"marker-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},spacing:{css:"marker-spacing",doc:"Space between repeated labels","default-value":100,type:"float"},"max-error":{css:"marker-max-error",type:"float","default-value":.2,doc:"The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers."},transform:{css:"marker-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},clip:{css:"marker-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"marker-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"marker-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"marker-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},shield:{name:{css:"shield-name",type:"expression",serialization:"content",doc:'Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]'},file:{css:"shield-file",required:!0,type:"uri","default-value":"none",doc:"Image file to render behind the shield text"},"face-name":{css:"shield-face-name",type:"string",validate:"font",doc:"Font name and style to use for the shield text","default-value":"",required:!0},"unlock-image":{css:"shield-unlock-image",type:"boolean",doc:"This parameter should be set to true if you are trying to position text beside rather than on top of the shield image","default-value":!1,"default-meaning":"text alignment relative to the shield image uses the center of the image as the anchor for text positioning."},size:{css:"shield-size",type:"float",doc:"The size of the shield text in pixels"},fill:{css:"shield-fill",type:"color",doc:"The color of the shield text"},placement:{css:"shield-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons."},"avoid-edges":{css:"shield-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.",type:"boolean","default-value":!1},"allow-overlap":{css:"shield-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping shields are shown or hidden.","default-meaning":"Do not allow shields to overlap with other map elements already placed."},"minimum-distance":{css:"shield-min-distance",type:"float","default-value":0,doc:"Minimum distance to the next shield symbol, not necessarily the same shield."},spacing:{css:"shield-spacing",type:"float","default-value":0,doc:"The spacing between repeated occurrences of the same shield on a line"},"minimum-padding":{css:"shield-min-padding","default-value":0,doc:"Determines the minimum amount of padding that a shield gets relative to other shields",type:"float"},"wrap-width":{css:"shield-wrap-width",type:"unsigned","default-value":0,doc:"Length of a chunk of text in characters before wrapping text"},"wrap-before":{css:"shield-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"shield-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long names."},"halo-fill":{css:"shield-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"shield-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},"character-spacing":{css:"shield-character-spacing",type:"unsigned","default-value":0,doc:"Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement."},"line-spacing":{css:"shield-line-spacing",doc:"Vertical spacing between lines of multiline labels (in pixels)",type:"unsigned"},dx:{css:"shield-text-dx",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"shield-text-dy",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"shield-dx":{css:"shield-dx",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},"shield-dy":{css:"shield-dy",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},opacity:{css:"shield-opacity",type:"float",doc:"(Default 1.0) - opacity of the image used for the shield","default-value":1},"text-opacity":{css:"shield-text-opacity",type:"float",doc:"(Default 1.0) - opacity of the text placed on top of the shield","default-value":1},"horizontal-alignment":{css:"shield-horizontal-alignment",type:["left","middle","right","auto"],doc:"The shield's horizontal alignment from its centerpoint","default-value":"auto"},"vertical-alignment":{css:"shield-vertical-alignment",type:["top","middle","bottom","auto"],doc:"The shield's vertical alignment from its centerpoint","default-value":"middle"},"text-transform":{css:"shield-text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"justify-alignment":{css:"shield-justify-alignment",type:["left","center","right","auto"],doc:"Define how text in a shield's label is justified","default-value":"auto"},clip:{css:"shield-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"shield-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"line-pattern":{file:{css:"line-pattern-file",type:"uri","default-value":"none",required:!0,doc:"An image file to be repeated and warped along a line"},clip:{css:"line-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"line-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"polygon-pattern":{file:{css:"polygon-pattern-file",type:"uri","default-value":"none",required:!0,doc:"Image to use as a repeated pattern fill within a polygon"},alignment:{css:"polygon-pattern-alignment",type:["local","global"],"default-value":"local",doc:"Specify whether to align pattern fills to the layer or to the map."},gamma:{css:"polygon-pattern-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon pattern edges"},opacity:{css:"polygon-pattern-opacity",type:"float",doc:"(Default 1.0) - Apply an opacity level to the image used for the pattern","default-value":1,"default-meaning":"The image is rendered without modifications"},clip:{css:"polygon-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},raster:{opacity:{css:"raster-opacity","default-value":1,"default-meaning":"opaque",type:"float",doc:"The opacity of the raster symbolizer on top of other symbolizers."},"filter-factor":{css:"raster-filter-factor","default-value":-1,"default-meaning":"Allow the datasource to choose appropriate downscaling.",type:"float",doc:"This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed."},scaling:{css:"raster-scaling",type:["near","fast","bilinear","bilinear8","bicubic","spline16","spline36","hanning","hamming","hermite","kaiser","quadric","catrom","gaussian","bessel","mitchell","sinc","lanczos","blackman"],"default-value":"near",doc:"The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality."},"mesh-size":{css:"raster-mesh-size","default-value":16,"default-meaning":"Reprojection mesh will be 1/16 of the resolution of the source image",type:"unsigned",doc:"A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion."},"comp-op":{css:"raster-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},point:{file:{css:"point-file",type:"uri",required:!1,"default-value":"none",doc:"Image file to represent a point"},"allow-overlap":{css:"point-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping points are shown or hidden.","default-meaning":"Do not allow points to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"point-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},opacity:{css:"point-opacity",type:"float","default-value":1,"default-meaning":"Fully opaque",doc:"A value from 0 to 1 to control the opacity of the point"},placement:{css:"point-placement",type:["centroid","interior"],doc:"How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon.","default-value":"centroid"},transform:{css:"point-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},"comp-op":{css:"point-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},text:{name:{css:"text-name",type:"expression",required:!0,"default-value":"",serialization:"content",doc:"Value to use for a text label. Data columns are specified using brackets like [column_name]"},"face-name":{css:"text-face-name",type:"string",validate:"font",doc:"Font name and style to render a label in",required:!0},size:{css:"text-size",type:"float","default-value":10,doc:"Text size in pixels"},"text-ratio":{css:"text-ratio",doc:"Define the amount of text (of the total) present on successive lines when wrapping occurs","default-value":0,type:"unsigned"},"wrap-width":{css:"text-wrap-width",doc:"Length of a chunk of text in characters before wrapping text","default-value":0,type:"unsigned"},"wrap-before":{css:"text-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"text-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long text."},spacing:{css:"text-spacing",type:"unsigned",doc:"Distance between repeated text labels on a line (aka. label-spacing)"},"character-spacing":{css:"text-character-spacing",type:"float","default-value":0,doc:"Horizontal spacing adjustment between characters in pixels"},"line-spacing":{css:"text-line-spacing","default-value":0,type:"unsigned",doc:"Vertical spacing adjustment between lines in pixels"},"label-position-tolerance":{css:"text-label-position-tolerance","default-value":0,type:"unsigned",doc:"Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line)"},"max-char-angle-delta":{css:"text-max-char-angle-delta",type:"float","default-value":"22.5",doc:"The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners."},fill:{css:"text-fill",doc:"Specifies the color for the text","default-value":"#000000",type:"color"},opacity:{css:"text-opacity",doc:"A number from 0 to 1 specifying the opacity for the text","default-value":1,"default-meaning":"Fully opaque",type:"float"},"halo-fill":{css:"text-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"text-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},dx:{css:"text-dx",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"text-dy",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"vertical-alignment":{css:"text-vertical-alignment",type:["top","middle","bottom","auto"],doc:"Position of label relative to point position.","default-value":"auto","default-meaning":'Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.'},"avoid-edges":{css:"text-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.","default-value":!1,type:"boolean"},"minimum-distance":{css:"text-min-distance",doc:"Minimum permitted distance to the next text symbolizer.",type:"float"},"minimum-padding":{css:"text-min-padding",doc:"Determines the minimum amount of padding that a text symbolizer gets relative to other text",type:"float"},"minimum-path-length":{css:"text-min-path-length",type:"float","default-value":0,"default-meaning":"place labels on all paths",doc:"Place labels only on paths longer than this value."},"allow-overlap":{css:"text-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping text is shown or hidden.","default-meaning":"Do not allow text to overlap with other text - overlapping markers will not be shown."},orientation:{css:"text-orientation",type:"expression",doc:"Rotate the text."},placement:{css:"text-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"Control the style of placement of a point versus the geometry it is attached to."},"placement-type":{css:"text-placement-type",doc:'Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.',type:["dummy","simple"],"default-value":"dummy"},placements:{css:"text-placements",type:"string","default-value":"",doc:'If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` '},"text-transform":{css:"text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"horizontal-alignment":{css:"text-horizontal-alignment",type:["left","middle","right","auto"],doc:"The text's horizontal alignment from its centerpoint","default-value":"auto"},"justify-alignment":{css:"text-align",type:["left","right","center","auto"],doc:"Define how text is justified","default-value":"auto","default-meaning":"Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives"},clip:{css:"text-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"text-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},building:{fill:{css:"building-fill","default-value":"#FFFFFF",doc:"The color of the buildings walls.",type:"color"},"fill-opacity":{css:"building-fill-opacity",type:"float",doc:"The opacity of the building as a whole, including all walls.","default-value":1},height:{css:"building-height",doc:"The height of the building in pixels.",type:"expression","default-value":"0"}}},colors:{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50],transparent:[0,0,0,0]},filter:{value:["true","false","null","point","linestring","polygon","collection"]}},$i.mapnik_reference={version:{latest:i._mapnik_reference_latest,"2.1.1":i._mapnik_reference_latest}},i.CartoCSS=$i,i.CartoCSS.Tree={},i.CartoCSS.Tree.operate=function(e,t,s){switch(e){case"+":return t+s;case"-":return t-s;case"*":return t*s;case"%":return t%s;case"/":return t/s}},i.CartoCSS.Tree.functions={rgb:function(e,t,s){return this.rgba(e,t,s,1)},rgba:function(e,t,s,r){var a=this,n=[e,t,s].map(function(e){return a.number(e)});return r=a.number(r),n.some(isNaN)||isNaN(r)?null:new i.CartoCSS.Tree.Color(n,r)},stop:function(e){var t,s;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(s=arguments[2]),{is:"tag",val:e,color:t,mode:s,toString:r=>'\n\t<stop value="'+e.ev(r)+'"'+(t?' color="'+t.ev(r)+'" ':"")+(s?' mode="'+s.ev(r)+'" ':"")+"/>"}},hsl:function(e,t,s){return this.hsla(e,t,s,1)},hsla:function(e,t,s,r){if([e=this.number(e)%360/360,t=this.number(t),s=this.number(s),r=this.number(r)].some(isNaN))return null;var i=s<=.5?s*(t+1):s+t-s*t,a=2*s-i;return this.rgba(255*n(e+1/3),255*n(e),255*n(e-1/3),r);function n(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?a+(i-a)*e*6:2*e<1?i:3*e<2?a+(i-a)*(2/3-e)*6:a}},hue:function(e){return"toHSL"in e?new i.CartoCSS.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new i.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new i.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new i.CartoCSS.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s+=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},desaturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s-=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},lighten:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l+=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},darken:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l-=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},fadein:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a+=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},fadeout:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a-=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},spin:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL(),r=(s.h+t.value)%360;return s.h=r<0?360+r:r,this.hsla_simple(s)},replace:function(e,t,s){return"field"===e.is?e.toString+".replace("+t.toString()+", "+s.toString()+")":e.replace(t,s)},mix:function(e,t,s){var r=s.value/100,a=2*r-1,n=e.toHSL().a-t.toHSL().a,o=((a*n==-1?a:(a+n)/(1+a*n))+1)/2,l=1-o,h=[e.rgb[0]*o+t.rgb[0]*l,e.rgb[1]*o+t.rgb[1]*l,e.rgb[2]*o+t.rgb[2]*l],u=e.alpha*r+t.alpha*(1-r);return new i.CartoCSS.Tree.Color(h,u)},greyscale:function(e){return this.desaturate(e,new i.CartoCSS.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),s=e.value,r=0;r<t.length;r++)s=s.replace(/%s/,t[r].value).replace(/%[da]/,t[r].toString());return s=s.replace(/%%/g,"%"),new i.CartoCSS.Tree.Quoted(s)},hsla_simple:function(e){return this.hsla(e.h,e.s,e.l,e.a)},number:function(e){return e instanceof i.CartoCSS.Tree.Dimension?parseFloat("%"===e.unit?e.value/100:e.value):"number"==typeof e?e:NaN},clamp:function(e){return Math.min(1,Math.max(0,e))}},i.CartoCSS.Tree.Call=class{constructor(e,t,s){this.is="call",this.name=e,this.args=t,this.index=s}ev(e){for(var t=this.args.map(function(t){return t.ev(e)}),s=0;s<t.length;s++)if("undefined"===t[s].is)return{is:"undefined",value:"undefined"};if(this.name in i.CartoCSS.Tree.functions){if(i.CartoCSS.Tree.functions[this.name].length<=t.length){var r=i.CartoCSS.Tree.functions[this.name].apply(i.CartoCSS.Tree.functions,t);return null===r?(e.error({message:"incorrect arguments given to "+this.name+"()",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r}return e.error({message:"incorrect number of arguments for "+this.name+"(). "+i.CartoCSS.Tree.functions[this.name].length+" expected.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}var a=i.CartoCSS.Tree.Reference.mapnikFunctions[this.name];if(void 0===a){var n=Zi()(i.CartoCSS.Tree.Reference.mapnikFunctions),o=this.name,l=n.map(function(e){return[e[0],i.CartoCSS.Tree.Reference.editDistance(o,e[0]),e[1]]}).sort(function(e,t){return e[1]-t[1]});return e.error({message:"unknown function "+this.name+"(), did you mean "+l[0][0]+"("+l[0][2]+")",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}return a!==t.length&&-1!==a?(e.error({message:"function "+this.name+"() takes "+a+" arguments and was given "+t.length,index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):(this.args=t,this)}toString(e,t){return this.args.length?this.name+"("+this.args.join(",")+")":this.name}},i.CartoCSS.Tree.Color=class{constructor(e,t){this.is="color",Array.isArray(e)?this.rgb=e.slice(0,3):6==e.length?this.rgb=e.match(/.{2}/g).map(function(e){return parseInt(e,16)}):this.rgb=e.split("").map(function(e){return parseInt(e+e,16)}),"number"==typeof t?this.alpha=t:4===e.length?this.alpha=e[3]:this.alpha=1}ev(){return this}toString(){return"rgba("+this.rgb.map(function(e){return Math.round(e)}).concat(this.alpha).join(", ")+")"}operate(e,t,s){var r=[];s instanceof i.CartoCSS.Tree.Color||(s=s.toColor());for(var a=0;a<3;a++)r[a]=i.CartoCSS.Tree.operate(t,this.rgb[a],s.rgb[a]);return new i.CartoCSS.Tree.Color(r)}toHSL(){var e,t,s=this.rgb[0]/255,r=this.rgb[1]/255,i=this.rgb[2]/255,a=this.alpha,n=Math.max(s,r,i),o=Math.min(s,r,i),l=(n+o)/2,h=n-o;if(n===o)e=t=0;else{switch(t=l>.5?h/(2-n-o):h/(n+o),n){case s:e=(r-i)/h+(r<i?6:0);break;case r:e=(i-s)/h+2;break;case i:e=(s-r)/h+4}e/=6}return{h:360*e,s:t,l,a}}},i.CartoCSS.Tree.Comment=class{constructor(e,t){this.value=e,this.silent=!!t}toString(e){return"\x3c!--"+this.value+"--\x3e"}ev(){return this}},i.CartoCSS.Tree.Definition=class{constructor(e,t){this.elements=e.elements,this.rules=t,this.ruleIndex={};for(var s=0;s<this.rules.length;s++)"zoom"in this.rules[s]&&(this.rules[s]=this.rules[s].clone()),this.rules[s].zoom=e.zoom,this.ruleIndex[this.rules[s].updateID()]=!0;this.filters=e.filters,this.zoom=e.zoom,this.attachment=e.attachment||"__default__",this.specificity=e.specificity()}toString(){for(var e=this.filters.toString(),t=0;t<this.rules.length;t++)e+="\n "+this.rules[t];return e}toJS(e){var t={},s=this.zoom,r=this.filters.toJS(e),a=[s];function n(s){if(s instanceof i.CartoCSS.Tree.Rule)t[s.name]=t[s.name]||[],r?t[s.name].push("if("+r+"){"+s.value.toJS(e)+"}"):t[s.name].push(s.value.toJS(e));else if(s instanceof i.CartoCSS.Tree.Ruleset){var a=s.toJS(e);for(var n in a)for(var o in t[n]=t[n]||[],a[n])t[n].push(a[n][o])}}for(var o in r&&a.push(r),r=a.join(" && "),this.rules)n(this.rules[o]);return t}},i.CartoCSS.Tree.Dimension=class{constructor(e,t,s){this.is="float",this.physical_units=["m","cm","in","mm","pt","pc"],this.screen_units=["px","%"],this.all_units=["m","cm","in","mm","pt","pc","px","%"],this.densities={m:.0254,mm:25.4,cm:2.54,pt:72,pc:6},this.value=parseFloat(e),this.unit=t||null,this.index=s}ev(e){if(this.unit&&this.all_units.indexOf(this.unit)<0)return e.error({message:"Invalid unit: '"+this.unit+"'",index:this.index}),{is:"undefined",value:"undefined"};if(this.unit&&this.physical_units.indexOf(this.unit)>=0){if(!e.ppi)return e.error({message:"ppi is not set, so metric units can't be used",index:this.index}),{is:"undefined",value:"undefined"};this.value=this.value/this.densities[this.unit]*e.ppi,this.unit="px"}return this}toColor(){return new i.CartoCSS.Tree.Color([this.value,this.value,this.value])}round(){return this.value=Math.round(this.value),this}toString(){return this.value.toString()}operate(e,t,s){return"%"===this.unit&&"%"!==s.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===s.unit?"*"===t||"/"===t||"%"===t?(e.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new i.CartoCSS.Tree.Dimension(i.CartoCSS.Tree.operate(t,this.value,this.value*s.value*.01),this.unit):new i.CartoCSS.Tree.Dimension(i.CartoCSS.Tree.operate(t,this.value,s.value),this.unit||s.unit)}},i.CartoCSS.Tree.Element=class{constructor(e){this.value=e.trim(),"#"===this.value[0]&&(this.type="id",this.clean=this.value.replace(/^#/,"")),"."===this.value[0]&&(this.type="class",this.clean=this.value.replace(/^\./,"")),-1!==this.value.indexOf("*")&&(this.type="wildcard")}specificity(){return["id"===this.type?1:0,"class"===this.type?1:0]}toString(){return this.value}},i.CartoCSS.Tree.Expression=class{constructor(e){this.is="expression",this.value=e}ev(e){return this.value.length>1?new i.CartoCSS.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}toString(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}},i.CartoCSS.Tree.Field=class{constructor(e){this.is="field",this.value=e||""}toString(){return'["'+this.value.toUpperCase()+'"]'}ev(){return this}},i.CartoCSS.Tree.Filter=class{constructor(e,t,s,r,i){this.ops={"<":[" &lt; ","numeric"],">":[" &gt; ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" &lt;= ","numeric"],">=":[" &gt;= ","numeric"],"=~":[".match(","string",")"]},this.key=e,this.op=t,this.val=s,this.index=r,this.filename=i,this.id=this.key+this.op+this.val}ev(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}toString(){return"["+this.id+"]"}},i.CartoCSS.Tree.Filterset=class{constructor(){this.filters={}}toJS(e){function t(e){var t=e.op;"="===t&&(t="==");var s=e.val;void 0!==e._val&&(s=e._val.toString(!0)),e.key&&"scale"===e.key.value?s=+s:"string"!=typeof s&&"object"!=typeof s||(s="'"+s+"'");var r="attributes";return r+"&&"+r+e.key+"&&"+r+e.key+" "+t+s}var s=[];for(var r in this.filters)s.push(t(this.filters[r]));return s.join(" && ")}toString(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}ev(e){for(var t in this.filters)this.filters[t].ev(e);return this}clone(){var e=new i.CartoCSS.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}cloneWith(e){var t=[];for(var s in e.filters){var r=this.addable(e.filters[s]);if(!1===r)return!1;!0===r&&t.push(e.filters[s])}if(!t.length)return null;var a=new i.CartoCSS.Tree.Filterset;for(s in this.filters)a.filters[s]=this.filters[s];for(;s=t.shift();)a.add(s);return a}addable(e){var t=e.key.toString(),s=e.val.toString();switch(s.match(/^[0-9]+(\.[0-9]*)?_match/)&&(s=parseFloat(s)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==s&&null:void 0===this.filters[t+"!="+s]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s))));case"=~":return!0;case"!=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val!==s&&null:void 0!==this.filters[t+"!="+s]?null:void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)||null;case">":return t+"="in this.filters?!(this.filters[t+"="].val<=s)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val<s)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=s)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<s)||null));case"<=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>s)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)||null))}}conflict(e){var t=e.key.toString(),s=e.val.toString();return isNaN(parseFloat(s))||(s=parseFloat(s)),("="===e.op&&void 0!==this.filters[t+"="]&&s!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&s==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&s===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}add(e,t){var s,r=e.key.toString(),i=e.op,a=this.conflict(e);if(a)return a;if("="===i){for(var n in this.filters)this.filters[n].key===r&&delete this.filters[n];this.filters[r+"="]=e}else if("!="===i)this.filters[r+"!="+e.val]=e;else if("=~"===i)this.filters[r+"=~"+e.val]=e;else if(">"===i){for(var o in this.filters)this.filters[o].key===r&&this.filters[o].val<=e.val&&delete this.filters[o];this.filters[r+">"]=e}else if(">="===i){for(var l in this.filters)s=+this.filters[l].val.toString(),this.filters[l].key===r&&s<e.val&&delete this.filters[l];void 0!==this.filters[r+"!="+e.val]?(delete this.filters[r+"!="+e.val],e.op=">",this.filters[r+">"]=e):this.filters[r+">="]=e}else if("<"===i){for(var h in this.filters)s=+this.filters[h].val.toString(),this.filters[h].key===r&&s>=e.val&&delete this.filters[h];this.filters[r+"<"]=e}else if("<="===i){for(var u in this.filters)s=+this.filters[u].val.toString(),this.filters[u].key===r&&s>e.val&&delete this.filters[u];void 0!==this.filters[r+"!="+e.val]?(delete this.filters[r+"!="+e.val],e.op="<",this.filters[r+"<"]=e):this.filters[r+"<="]=e}}},i.CartoCSS.Tree.Fontset=class{constructor(e,t){this.fonts=t,this.name="fontset-"+e.effects.length}},i.CartoCSS.Tree.Invalid=class{constructor(e,t,s){this.is="invalid",this.chunk=e,this.index=t,this.type="syntax",this.message=s||"Invalid code: "+this.chunk}ev(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}},i.CartoCSS.Tree.Keyword=class{ev(){return this}constructor(e){this.value=e;var t={transparent:"color",true:"boolean",false:"boolean"};this.is=t[e]?t[e]:"keyword"}toString(){return this.value}},i.CartoCSS.Tree.Literal=class{constructor(e){this.value=e||"",this.is="field"}toString(){return this.value}ev(){return this}},i.CartoCSS.Tree.Operation=class{constructor(e,t,s){this.is="operation",this.op=e.trim(),this.operands=t,this.index=s}ev(e){var t,s=this.operands[0].ev(e),r=this.operands[1].ev(e);return"undefined"===s.is||"undefined"===r.is?{is:"undefined",value:"undefined"}:(s instanceof i.CartoCSS.Tree.Dimension&&r instanceof i.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(t=r,r=s,s=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),s instanceof i.CartoCSS.Tree.Quoted&&r instanceof i.CartoCSS.Tree.Quoted&&"+"!==this.op?(e.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):s instanceof i.CartoCSS.Tree.Field||r instanceof i.CartoCSS.Tree.Field||s instanceof i.CartoCSS.Tree.Literal||r instanceof i.CartoCSS.Tree.Literal?"color"===s.is||"color"===r.is?(e.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new i.CartoCSS.Tree.Literal(s.ev(e).toString(!0)+this.op+r.ev(e).toString(!0)):void 0===s.operate?(e.error({message:"Cannot do math with type "+s.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):s.operate(e,this.op,r))}},i.CartoCSS.Tree.Quoted=class{constructor(e){this.is="string",this.value=e||""}toString(e){var t=this.value.replace(/&/g,"&amp;"),s=t.replace(/\'/g,"\\'").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/\>/g,"&gt;");return!0===e?"'"+s+"'":t}ev(){return this}operate(e,t,s){return new i.CartoCSS.Tree.Quoted(i.CartoCSS.Tree.operate(t,this.toString(),s.toString(this.contains_field)))}},i.CartoCSS.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var s in e.symbolizers)for(var r in e.symbolizers[s])e.symbolizers[s][r].hasOwnProperty("css")&&(t[e.symbolizers[s][r].css]=[e.symbolizers[s][r],s,r]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var s in e.symbolizers)for(var r in e.symbolizers[s])if("functions"===e.symbolizers[s][r].type)for(var i=0;i<e.symbolizers[s][r].functions.length;i++){var a=e.symbolizers[s][r].functions[i];t[a[0]]=a[1]}return t}(e),this.required_cache=function(e){var t={};for(var s in e.symbolizers)for(var r in t[s]=[],e.symbolizers[s])e.symbolizers[s][r].required&&t[s].push(e.symbolizers[s][r].css);return t}(e)},setVersion:function(e){return!!i.CartoCSS.mapnik_reference.version.hasOwnProperty(e)&&(this.setData(i.CartoCSS.mapnik_reference.version[e]),!0)},selectorData:function(e,t){if(this.selector_cache&&this.selector_cache[e])return this.selector_cache[e][t]},validSelector:function(e){return!!this.selector_cache[e]},selectorName:function(e){return this.selectorData(e,2)},selector:function(e){return this.selectorData(e,0)},symbolizer:function(e){return this.selectorData(e,1)},requiredProperties:function(e,t){var s=this.required_cache[e];for(var r in s)if(!(s[r]in t))return"Property "+s[r]+" required for defining "+e+" styles."},isFont:function(e){return"font"===this.selector(e).validate},editDistance:function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;for(var s=[],r=0;r<=t.length;r++)s[r]=[r];for(var i=0;i<=e.length;i++)s[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?s[r][i]=s[r-1][i-1]:s[r][i]=Math.min(s[r-1][i-1]+1,Math.min(s[r][i-1]+1,s[r-1][i]+1));return s[t.length][e.length]},validValue:function(e,t,s){var r;if(this.selector(t)){if("keyword"===s.value[0].is)return function(e,t){return"object"==typeof this.selector(t).type?-1!==this.selector(t).type.indexOf(e.value[0].value):"string"===this.selector(t).type}(s,t);if("undefined"===s.value[0].is)return!0;if("numbers"===this.selector(t).type){for(r in s.value)if("float"!==s.value[r].is)return!1;return!0}if("tags"===this.selector(t).type){if(!s.value)return!1;if(!s.value[0].value)return"tag"===s.value[0].is;for(r=0;r<s.value[0].value.length;r++)if("tag"!==s.value[0].value[r].is)return!1;return!0}if("functions"==this.selector(t).type)return function(e,t){if("string"===e.value[0].is)return!0;for(var s in e.value)for(var r in e.value[s].value){if("call"!==e.value[s].value[r].is)return!1;var i=find(this.selector(t).functions,function(t){return t[0]===e.value[s].value[r].name});if(!(i&&-1===i[1]||i&&i[1]===e.value[s].value[r].args.length))return!1}return!0}(s,t);if("expression"===this.selector(t).type)return!0;if("unsigned"===this.selector(t).type)return"float"===s.value[0].is&&(s.value[0].round(),!0);if(this.selector(t).validate){for(r=0;r<s.value.length;r++)if(this.selector(t).type===s.value[r].is&&this._validateValue[this.selector(t).validate](e,s.value[r].value))return!0;return!1}return this.selector(t).type===s.value[0].is}return!1}},i.CartoCSS.Tree.Reference.setVersion("latest"),i.CartoCSS.Tree.Rule=class{constructor(e,t,s,r){this.is="rule";var a=e.split("/");this.name=a.pop(),this.instance=a.length?a[0]:"__default__",this.value=t instanceof i.CartoCSS.Tree.Value?t:new i.CartoCSS.Tree.Value([t]),this.index=s,this.symbolizer=i.CartoCSS.Tree.Reference.symbolizer(this.name),this.filename=r,this.variable="@"===e.charAt(0)}clone(){var e=Object.create(i.CartoCSS.Tree.Rule.prototype);return e.name=this.name,e.value=this.value,e.index=this.index,e.instance=this.instance,e.symbolizer=this.symbolizer,e.filename=this.filename,e.variable=this.variable,e}updateID(){return this.id=this.zoom+"#"+this.instance+"#"+this.name}toString(){return"["+i.CartoCSS.Tree.Zoom.toString(this.zoom)+"] "+this.name+": "+this.value}ev(e){return new i.CartoCSS.Tree.Rule(this.name,this.value.ev(e),this.index,this.filename)}},i.CartoCSS.Tree.Ruleset=class{constructor(e,t){this.is="ruleset",this.selectors=e,this.rules=t,this._lookups={}}ev(e){var t,s,r=new i.CartoCSS.Tree.Ruleset(this.selectors,this.rules.slice(0));for(r.root=this.root,e.frames.unshift(r),t=0;t<r.rules.length;t++)s=r.rules[t],r.rules[t]=s.ev?s.ev(e):s;return e.frames.shift(),r}match(e){return!e||0===e.length}variables(){return this._variables?this._variables:this._variables=this.rules.reduce(function(e,t){return t instanceof i.CartoCSS.Tree.Rule&&!0===t.variable&&(e[t.name]=t),e},{})}variable(e){return this.variables()[e]}rulesets(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(e){return e instanceof i.CartoCSS.Tree.Ruleset})}find(e,t){t=t||this;var s=[],r=e.toString();return r in this._lookups?this._lookups[r]:(this.rulesets().forEach(function(r){if(r!==t)for(var a=0;a<r.selectors.length;a++)if(e.match(r.selectors[a])){e.elements.length>1?Array.prototype.push.apply(s,r.find(new i.CartoCSS.Tree.Selector(null,null,e.elements.slice(1)),t)):s.push(r);break}}),this._lookups[r]=s)}evZooms(e){for(var t=0;t<this.selectors.length;t++){for(var s=i.CartoCSS.Tree.Zoom.all,r=0;r<this.selectors[t].zoom.length;r++)s=this.selectors[t].zoom[r].ev(e).zoom;this.selectors[t].zoom=s}}flatten(e,t,s){var r,a,n=[];for(0===this.selectors.length&&(s.frames=s.frames.concat(this.rules)),this.evZooms(s),r=0;r<this.selectors.length;r++){var o=this.selectors[r];if(o.filters)if(t.length)for(a=0;a<t.length;a++){var l=t[a],h=l.filters.cloneWith(o.filters);if(null===h){if(l.zoom===o.zoom&&l.attachment===o.attachment&&l.elements.join()===o.elements.join()){n.push(l);continue}h=l.filters}else if(!h)continue;var u=Object.create(i.CartoCSS.Tree.Selector.prototype);u.filters=h,u.zoom=o.zoom,u.elements=l.elements.concat(o.elements),l.attachment&&o.attachment?u.attachment=l.attachment+"/"+o.attachment:u.attachment=o.attachment||l.attachment,u.conditions=l.conditions+o.conditions,u.index=o.index,n.push(u)}else n.push(o)}var c=[];for(r=0;r<this.rules.length;r++){var d=this.rules[r];d instanceof i.CartoCSS.Tree.Ruleset?d.flatten(e,n,s):d instanceof i.CartoCSS.Tree.Rule?c.push(d):d instanceof i.CartoCSS.Tree.Invalid&&s.error(d)}var p=!!c.length&&c[0].index;for(r=0;r<n.length;r++)!1!==p&&(n[r].index=p),e.push(new i.CartoCSS.Tree.Definition(n[r],c.slice()));return e}},i.CartoCSS.Tree.Selector=class{constructor(e,t,s,r,a,n){this.elements=s||[],this.attachment=r,this.filters=e||{},this.zoom=void 0!==t?t:i.CartoCSS.Tree.Zoom.all,this.conditions=a,this.index=n}specificity(){return this.elements.reduce(function(e,t){var s=t.specificity();return e[0]+=s[0],e[1]+=s[1],e},[0,0,this.conditions,this.index])}},i.CartoCSS.Tree.URL=class{constructor(e,t){this.is="uri",this.value=e,this.paths=t}toString(){return this.value.toString()}ev(e){return new i.CartoCSS.Tree.URL(this.value.ev(e),this.paths)}},i.CartoCSS.Tree.Value=class{constructor(e){this.is="value",this.value=e}ev(e){return 1===this.value.length?this.value[0].ev(e):new i.CartoCSS.Tree.Value(this.value.map(function(t){return t.ev(e)}))}toJS(e){var t=this.ev(e),s=t.toString();return"color"===t.is||"uri"===t.is||"string"===t.is||"keyword"===t.is?s="'"+s+"'":"field"===t.is?s=s.replace(/\[(.*)\]/g,"attributes['_match1']"):t.value&&"object"==typeof t.value&&(s="["+s+"]"),"_value = "+s+";"}toString(e,t,s,r){return this.value.map(function(t){return t.toString(e,r)}).join(s||", ")}clone(){var e=Object.create(i.CartoCSS.Tree.Value.prototype);return Array.isArray(e)?e.value=this.value.slice():e.value=this.value,e.is=this.is,e}},i.CartoCSS.Tree.Variable=class{constructor(e,t,s){this.is="variable",this.name=e,this.index=t,this.filename=s}toString(){return this.name}ev(e){if(this._css)return this._css;var t=e.frames.filter(function(e){return e.name===this.name}.bind(this));return t.length?t[0].value.ev(e):(e.error({message:"variable "+this.name+" is undefined",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"})}},i.CartoCSS.Tree.Zoom=class{constructor(e,t,s){this.op=e,this.value=t,this.index=s}setZoom(e){return this.zoom=e,this}ev(e){var t=parseInt(this.value.ev(e).toString(),10);switch((t>i.CartoCSS.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+i.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+t,this;case">":this.zoom="zoom && zoom > "+t;break;case">=":this.zoom="zoom && zoom >= "+t;break;case"<":this.zoom="zoom && zoom < "+t;break;case"<=":this.zoom="zoom && zoom <= "+t;break;default:return this}return this}toString(){for(var e="",t=0;t<=i.CartoCSS.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<<t?"X":".";return e}},i.CartoCSS.Tree.Zoom.all=23,i.CartoCSS.Tree.Zoom.maxZoom=22,i.CartoCSS.Tree.Zoom.ranges={0:1e9,1:5e8,2:2e8,3:1e8,4:5e7,5:25e6,6:125e5,7:65e5,8:3e6,9:15e5,10:75e4,11:4e5,12:2e5,13:1e5,14:5e4,15:25e3,16:12500,17:5e3,18:2500,19:1500,20:750,21:500,22:250,23:100};i.ThemeStyle=
  1205. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1206. * This program are made available under the terms of the Apache License, Version 2.0
  1207. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1208. class{constructor(e){e=e||{},this.fill=!0,this.fillColor="#000000",this.fillOpacity=1,this.stroke=!1,this.strokeColor="#000000",this.strokeOpacity=1,this.strokeWidth=1,this.strokeLinecap="butt",this.strokeLineJoin="miter",this.strokeDashstyle="solid",this.pointRadius=6,this.shadowBlur=0,this.shadowColor="#000000",this.shadowOffsetX=0,this.shadowOffsetY=0,this.label="",this.labelRect=!1,this.fontColor="",this.fontSize=12,this.fontStyle="normal",this.fontVariant="normal",this.fontWeight="normal",this.fontFamily="arial,sans-serif",this.labelPosition="top",this.labelAlign="center",this.labelBaseline="middle",this.labelXOffset=0,this.labelYOffset=0,X.extend(this,e)}};
  1209. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1210. * This program are made available under the terms of the Apache License, Version 2.0
  1211. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1212. class ea{constructor(){this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,this.clickable=!0,this.hoverable=!0,this.style=null,this.highlightStyle={},this.CLASS_NAME="SuperMap.Feature.ShapeParameters"}destroy(){this.refOriginalPosition=null,this.refDataID=null,this.isHoverByRefDataID=null,this.refDataHoverGroup=null,this.dataInfo=null,this.clickable=null,this.hoverable=null,this.style=null,this.highlightStyle=null}}i.Feature=i.Feature||{},i.Feature.ShapeParameters=ea;
  1213. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1214. * This program are made available under the terms of the Apache License, Version 2.0
  1215. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1216. class ta extends ea{constructor(e,t){super(e,t),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=6,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Point"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}i.Feature=i.Feature||{},i.Feature.ShapeParameters.Point=ta;
  1217. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1218. * This program are made available under the terms of the Apache License, Version 2.0
  1219. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1220. class sa extends ea{constructor(e){super(e),this.pointList=e,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Line"}destroy(){this.pointList=null,super.destroy()}}i.Feature=i.Feature||{},i.Feature.ShapeParameters.Line=sa;
  1221. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1222. * This program are made available under the terms of the Apache License, Version 2.0
  1223. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1224. class ra extends ea{constructor(e){super(e),this.pointList=e,this.holePolygonPointLists=null,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Polygon"}destroy(){this.pointList=null,this.holePolygonPointLists=null,super.destroy()}}i.Feature=i.Feature||{},i.Feature.ShapeParameters.Polygon=ra;
  1225. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1226. * This program are made available under the terms of the Apache License, Version 2.0
  1227. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1228. class ia extends ea{constructor(e,t,s,r){super(e,t,s,r),this.x=isNaN(e)?0:e,this.y=isNaN(e)?0:t,this.width=isNaN(s)?0:s,this.height=isNaN(r)?0:r,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Rectangle"}destroy(){this.x=null,this.y=null,this.width=null,this.height=null,super.destroy()}}i.Feature=i.Feature||{},i.Feature.ShapeParameters.Rectangle=ia;
  1229. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1230. * This program are made available under the terms of the Apache License, Version 2.0
  1231. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1232. class aa extends ea{constructor(e,t,s,r,i,a,n){super(e,t,s,r,i,a,n),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(s)?0:s,this.startAngle=isNaN(r)?0:r,this.endAngle=isNaN(i)?0:i,this.r0=isNaN(a)?0:a,this.clockWise=n,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Sector"}destroy(){this.x=null,this.y=null,this.r=null,this.startAngle=null,this.endAngle=null,this.r0=null,this.clockWise=null,super.destroy()}}i.Feature=i.Feature||{},i.Feature.ShapeParameters.Sector=aa;
  1233. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1234. * This program are made available under the terms of the Apache License, Version 2.0
  1235. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1236. class na extends ea{constructor(e,t,s){super(e,t,s),this.x=e,this.y=t,this.text=s,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Label"}destroy(){this.x=null,this.y=null,this.text=null,super.destroy()}}i.Feature=i.Feature||{},i.Feature.ShapeParameters.Label=na;
  1237. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1238. * This program are made available under the terms of the Apache License, Version 2.0
  1239. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1240. class oa extends ea{constructor(e,t,s,r,i,a,n,o,l){super(e,t,s,r,i,a,n,o,l),this.x=e,this.y=t,this.image=s,this.width=r,this.height=i,this.sx=a,this.sy=n,this.sWidth=o,this.sHeight=l,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Image"}destroy(){this.x=null,this.y=null,this.image=null,this.width=null,this.height=null,this.sx=null,this.sy=null,this.sWidth=null,this.sHeight=null,super.destroy()}}i.Feature=i.Feature||{},i.Feature.ShapeParameters.Image=oa;
  1241. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1242. * This program are made available under the terms of the Apache License, Version 2.0
  1243. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1244. class la extends ea{constructor(e,t,s){super(e,t,s),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(s)?0:s,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Circle"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}i.Feature=i.Feature||{},i.Feature.ShapeParameters.Circle=la;
  1245. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1246. * This program are made available under the terms of the Apache License, Version 2.0
  1247. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1248. class ha{constructor(){this._handlers={},this.CLASS_NAME="SuperMap.LevelRenderer.Eventful"}destroy(){this._handlers=null}one(e,t,s){var r=this._handlers;return t&&e?(r[e]||(r[e]=[]),r[e].push({h:t,one:!0,ctx:s||this}),this):this}bind(e,t,s){var r=this._handlers;return t&&e?(r[e]||(r[e]=[]),r[e].push({h:t,one:!1,ctx:s||this}),this):this}unbind(e,t){var s=this._handlers;if(!e)return this._handlers={},this;if(t){if(s[e]){for(var r=[],i=0,a=s[e].length;i<a;i++)s[e][i].h!=t&&r.push(s[e][i]);s[e]=r}s[e]&&0===s[e].length&&delete s[e]}else delete s[e];return this}dispatch(e){if(this._handlers[e]){var t=arguments,s=t.length;s>3&&(t=Array.prototype.slice.call(t,1));for(var r=this._handlers[e],i=r.length,a=0;a<i;){switch(s){case 1:r[a].h.call(r[a].ctx);break;case 2:r[a].h.call(r[a].ctx,t[1]);break;case 3:r[a].h.call(r[a].ctx,t[1],t[2]);break;default:r[a].h.apply(r[a].ctx,t)}r[a].one?(r.splice(a,1),i--):a++}}return this}dispatchWithContext(e){if(this._handlers[e]){var t=arguments,s=t.length;s>4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var r=t[t.length-1],i=this._handlers[e],a=i.length,n=0;n<a;){switch(s){case 1:i[n].h.call(r);break;case 2:i[n].h.call(r,t[1]);break;case 3:i[n].h.call(r,t[1],t[2]);break;default:i[n].h.apply(r,t)}i[n].one?(i.splice(n,1),a--):n++}}return this}}
  1249. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1250. * This program are made available under the terms of the Apache License, Version 2.0
  1251. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1252. class ua{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Vector"}create(e,t){var s=new(0,this.ArrayCtor)(2);return s[0]=e||0,s[1]=t||0,s}copy(e,t){return e[0]=t[0],e[1]=t[1],e}set(e,t,s){return e[0]=t,e[1]=s,e}add(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e}scaleAndAdd(e,t,s,r){return e[0]=t[0]+s[0]*r,e[1]=t[1]+s[1]*r,e}sub(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e}len(e){return Math.sqrt(this.lenSquare(e))}lenSquare(e){return e[0]*e[0]+e[1]*e[1]}mul(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e}div(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e}dot(e,t){return e[0]*t[0]+e[1]*t[1]}scale(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e}normalize(e,t){var s=this.len(t);return 0===s?(e[0]=0,e[1]=0):(e[0]=t[0]/s,e[1]=t[1]/s),e}distance(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}distanceSquare(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}negate(e,t){return e[0]=-t[0],e[1]=-t[1],e}lerp(e,t,s,r){return e[0]=t[0]+r*(s[0]-t[0]),e[1]=t[1]+r*(s[1]-t[1]),e}applyTransform(e,t,s){var r=t[0],i=t[1];return e[0]=s[0]*r+s[2]*i+s[4],e[1]=s[1]*r+s[3]*i+s[5],e}min(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e}max(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[1]),e}length(e){return this.len(e)}lengthSquare(e){return this.lenSquare(e)}dist(e,t){return this.distance(e,t)}distSquare(e,t){return this.distanceSquare(e,t)}}
  1253. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1254. * This program are made available under the terms of the Apache License, Version 2.0
  1255. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1256. class ca{constructor(){this.vector=new ua,this.EPSILON=1e-4,this.THREE_SQRT=Math.sqrt(3),this.ONE_THIRD=1/3,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Curve"}isAroundZero(e){return e>-this.EPSILON&&e<this.EPSILON}isNotAroundZero(e){return e>this.EPSILON||e<-this.EPSILON}cubicAt(e,t,s,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*s)}cubicDerivativeAt(e,t,s,r,i){var a=1-i;return 3*(((t-e)*a+2*(s-t)*i)*a+(r-s)*i*i)}cubicRootAt(e,t,s,r,i,a){var n=r+3*(t-s)-e,o=3*(s-2*t+e),l=3*(t-e),h=e-i,u=o*o-3*n*l,c=o*l-9*n*h,d=l*l-3*o*h,p=0;if(this.isAroundZero(u)&&this.isAroundZero(c))if(this.isAroundZero(o))a[0]=0;else{let e=-l/o;e>=0&&e<=1&&(a[p++]=e)}else{var m=c*c-4*u*d;if(this.isAroundZero(m)){var f=c/u;let e=-o/n+f,t=-f/2;e>=0&&e<=1&&(a[p++]=e),t>=0&&t<=1&&(a[p++]=t)}else if(m>0){let e=Math.sqrt(m),t=u*o+1.5*n*(-c+e),s=u*o+1.5*n*(-c-e),r=(-o-((t=t<0?-Math.pow(-t,this.ONE_THIRD):Math.pow(t,this.ONE_THIRD))+(s=s<0?-Math.pow(-s,this.ONE_THIRD):Math.pow(s,this.ONE_THIRD))))/(3*n);r>=0&&r<=1&&(a[p++]=r)}else{var y=(2*u*o-3*n*c)/(2*Math.sqrt(u*u*u)),g=Math.acos(y)/3,v=Math.sqrt(u),S=Math.cos(g);let e=(-o-2*v*S)/(3*n),t=(-o+v*(S+this.THREE_SQRT*Math.sin(g)))/(3*n),s=(-o+v*(S-this.THREE_SQRT*Math.sin(g)))/(3*n);e>=0&&e<=1&&(a[p++]=e),t>=0&&t<=1&&(a[p++]=t),s>=0&&s<=1&&(a[p++]=s)}}return p}cubicExtrema(e,t,s,r,i){var a=6*s-12*t+6*e,n=9*t+3*r-3*e-9*s,o=3*t-3*e,l=0;if(this.isAroundZero(n)){if(this.isNotAroundZero(a)){let e=-o/a;e>=0&&e<=1&&(i[l++]=e)}}else{var h=a*a-4*n*o;if(this.isAroundZero(h))i[0]=-a/(2*n);else if(h>0){let e=Math.sqrt(h),t=(-a+e)/(2*n),s=(-a-e)/(2*n);t>=0&&t<=1&&(i[l++]=t),s>=0&&s<=1&&(i[l++]=s)}}return l}cubicSubdivide(e,t,s,r,i,a){var n=(t-e)*i+e,o=(s-t)*i+t,l=(r-s)*i+s,h=(o-n)*i+n,u=(l-o)*i+o,c=(u-h)*i+h;a[0]=e,a[1]=n,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=r}cubicProjectPoint(e,t,s,r,i,a,n,o,l,h,u){var c,d=this.vector.create(),p=this.vector.create(),m=this.vector.create(),f=.005,y=1/0;d[0]=l,d[1]=h;for(let l=0;l<1;l+=.05){p[0]=this.cubicAt(e,s,i,n,l),p[1]=this.cubicAt(t,r,a,o,l);let h=this.vector.distSquare(d,p);h<y&&(c=l,y=h)}y=1/0;for(let l=0;l<32&&!(f<this.EPSILON);l++){let l=c-f,h=c+f;p[0]=this.cubicAt(e,s,i,n,l),p[1]=this.cubicAt(t,r,a,o,l);let u=this.vector.distSquare(p,d);if(l>=0&&u<y)c=l,y=u;else{m[0]=this.cubicAt(e,s,i,n,h),m[1]=this.cubicAt(t,r,a,o,h);let l=this.vector.distSquare(m,d);h<=1&&l<y?(c=h,y=l):f*=.5}}return u&&(u[0]=this.cubicAt(e,s,i,n,c),u[1]=this.cubicAt(t,r,a,o,c)),Math.sqrt(y)}quadraticAt(e,t,s,r){var i=1-r;return i*(i*e+2*r*t)+r*r*s}quadraticDerivativeAt(e,t,s,r){return 2*((1-r)*(t-e)+r*(s-t))}quadraticRootAt(e,t,s,r,i){var a=e-2*t+s,n=2*(t-e),o=e-r,l=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(n)){var h=-o/n;h>=0&&h<=1&&(i[l++]=h)}}else{var u=n*n-4*a*o;if(this.isAroundZero(u)){let e=-n/(2*a);e>=0&&e<=1&&(i[l++]=e)}else if(u>0){let e=Math.sqrt(u),t=(-n+e)/(2*a),s=(-n-e)/(2*a);t>=0&&t<=1&&(i[l++]=t),s>=0&&s<=1&&(i[l++]=s)}}return l}quadraticExtremum(e,t,s){var r=e+s-2*t;return 0===r?.5:(e-t)/r}quadraticProjectPoint(e,t,s,r,i,a,n,o,l){var h,u=this.vector.create(),c=this.vector.create(),d=this.vector.create(),p=.005,m=1/0;u[0]=n,u[1]=o;for(let n=0;n<1;n+=.05){c[0]=this.quadraticAt(e,s,i,n),c[1]=this.quadraticAt(t,r,a,n);let o=this.vector.distSquare(u,c);o<m&&(h=n,m=o)}m=1/0;for(let n=0;n<32&&!(p<this.EPSILON);n++){let n=h-p,o=h+p;c[0]=this.quadraticAt(e,s,i,n),c[1]=this.quadraticAt(t,r,a,n);let l=this.vector.distSquare(c,u);if(n>=0&&l<m)h=n,m=l;else{d[0]=this.quadraticAt(e,s,i,o),d[1]=this.quadraticAt(t,r,a,o);let n=this.vector.distSquare(d,u);o<=1&&n<m?(h=o,m=n):p*=.5}}return l&&(l[0]=this.quadraticAt(e,s,i,h),l[1]=this.quadraticAt(t,r,a,h)),Math.sqrt(m)}}
  1257. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1258. * This program are made available under the terms of the Apache License, Version 2.0
  1259. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1260. class da{}da.EVENT={RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300},da.catchBrushException=!1,da.debugMode=0;
  1261. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1262. * This program are made available under the terms of the Apache License, Version 2.0
  1263. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1264. class pa{static SUtil_smoothBezier(e,t,s,r,i){i&&2===i||(i=[0,0]);var a,n,o=i,l=[],h=[],u=[],c=[],d=!!r;if(d){a=[1/0,1/0],n=[-1/0,-1/0];let t=e.length;for(let s=0;s<t;s++)pa.Util_vector.min(a,a,[e[s][0]+o[0],e[s][1]+o[1]]),pa.Util_vector.max(n,n,[e[s][0]+o[0],e[s][1]+o[1]]);pa.Util_vector.min(a,a,r[0]),pa.Util_vector.max(n,n,r[1])}let p=e.length;for(let r=0;r<p;r++){let i,m,f=[e[r][0]+o[0],e[r][1]+o[1]];if(s)i=[e[r?r-1:p-1][0]+o[0],e[r?r-1:p-1][1]+o[1]],m=[e[(r+1)%p][0]+o[0],e[(r+1)%p][1]+o[1]];else{if(0===r||r===p-1){l.push([e[r][0]+o[0],e[r][1]+o[1]]);continue}i=[e[r-1][0]+o[0],e[r-1][1]+o[1]],m=[e[r+1][0]+o[0],e[r+1][1]+o[1]]}pa.Util_vector.sub(h,m,i),pa.Util_vector.scale(h,h,t);let y=pa.Util_vector.distance(f,i),g=pa.Util_vector.distance(f,m),v=y+g;0!==v&&(y/=v,g/=v),pa.Util_vector.scale(u,h,-y),pa.Util_vector.scale(c,h,g);let S=pa.Util_vector.add([],f,u),b=pa.Util_vector.add([],f,c);d&&(pa.Util_vector.max(S,S,a),pa.Util_vector.min(S,S,n),pa.Util_vector.max(b,b,a),pa.Util_vector.min(b,b,n)),l.push(S),l.push(b)}return s&&l.push(l.shift()),l}static SUtil_smoothSpline(e,t,s,r){r&&2===r||(r=[0,0]);var i=r,a=e.length,n=[],o=0;for(let t=1;t<a;t++)o+=pa.Util_vector.distance([e[t-1][0]+i[0],e[t-1][1]+i[1]],[e[t][0]+i[0],e[t][1]+i[1]]);var l=o/5;l=l<a?a:l;for(let s=0;s<l;s++){let r,o,u,c=s/(l-1)*(t?a:a-1),d=Math.floor(c),p=c-d,m=[e[d%a][0]+i[0],e[d%a][1]+i[1]];t?(r=[e[(d-1+a)%a][0]+i[0],e[(d-1+a)%a][1]+i[1]],o=[e[(d+1)%a][0]+i[0],e[(d+1)%a][1]+i[1]],u=[e[(d+2)%a][0]+i[0],e[(d+2)%a][1]+i[1]]):(r=[e[0===d?d:d-1][0]+i[0],e[0===d?d:d-1][1]+i[1]],o=[e[d>a-2?a-1:d+1][0]+i[0],e[d>a-2?a-1:d+1][1]+i[1]],u=[e[d>a-3?a-1:d+2][0]+i[0],e[d>a-3?a-1:d+2][1]+i[1]]);let f=p*p,y=p*f;n.push([h(r[0],m[0],o[0],u[0],p,f,y),h(r[1],m[1],o[1],u[1],p,f,y)])}return n;function h(e,t,s,r,i,a,n){var o=.5*(s-e),l=.5*(r-t);return(2*(t-s)+o+l)*n+(-3*(t-s)-2*o-l)*a+o*i+t}}static SUtil_dashedLineTo(e,t,s,r,i,a,n){var o=[5,5];if(a="number"!=typeof a?5:a,e.setLineDash)return o[0]=a,o[1]=a,n&&n instanceof Array?e.setLineDash(n):e.setLineDash(o),e.moveTo(t,s),void e.lineTo(r,i);var l=r-t,h=i-s,u=Math.floor(Math.sqrt(l*l+h*h)/a);l/=u,h/=u;for(var c=!0,d=0;d<u;++d)c?e.moveTo(t,s):e.lineTo(t,s),c=!c,t+=l,s+=h;e.lineTo(r,i)}}pa.Util_area=new
  1265. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1266. * This program are made available under the terms of the Apache License, Version 2.0
  1267. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1268. class{constructor(){this.util=new qi,this.curve=new ca,this._ctx=null,this._textWidthCache={},this._textHeightCache={},this._textWidthCacheCounter=0,this._textHeightCacheCounter=0,this.TEXT_CACHE_MAX=5e3,this.PI2=2*Math.PI,this.roots=[-1,-1,-1],this.extrema=[-1,-1],this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Area"}normalizeRadian(e){return(e%=this.PI2)<0&&(e+=this.PI2),e}isInside(e,t,s,r){if(!t||!e)return!1;var i=e.type;this._ctx=this._ctx||this.util.getContext();var a=this._mathMethod(e,t,s,r);if(void 0!==a)return a;if(e.buildPath&&this._ctx.isPointInPath)return this._buildPathMethod(e,this._ctx,t,s,r);switch(i){case"ellipse":case"smicellipse":return!0;case"trochoid":var n="out"==t.location?t.r1+t.r2+t.d:t.r1-t.r2+t.d;return this.isInsideCircle(t,s,r,n);case"rose":return this.isInsideCircle(t,s,r,t.maxr);default:return!1}}_mathMethod(e,t,s,r){switch(e.type){case"bezier-curve":return void 0===t.cpX2?this.isInsideQuadraticStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.xEnd,t.yEnd,t.lineWidth,s,r):this.isInsideCubicStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd,t.lineWidth,s,r);case"line":return this.isInsideLine(t.xStart,t.yStart,t.xEnd,t.yEnd,t.lineWidth,s,r);case"broken-line":return this.isInsideBrokenLine(t.pointList,t.lineWidth,s,r);case"smicbroken-line":{let i=s,a=r;return e.refOriginalPosition&&(i=s-e.refOriginalPosition[0],a=r-e.refOriginalPosition[1]),this.isInsideBrokenLine(t.pointList,t.lineWidth,i,a)}case"ring":return this.isInsideRing(t.x,t.y,t.r0,t.r,s,r);case"smicring":{let i=t.x,a=t.y;return e.refOriginalPosition&&(i=t.x+e.refOriginalPosition[0],a=t.y+e.refOriginalPosition[1]),this.isInsideRing(i,a,t.r0,t.r,s,r)}case"circle":return this.isInsideCircle(t.x,t.y,t.r,s,r);case"smicpoint":{let i=s,a=r;return e.refOriginalPosition&&(i=s-e.refOriginalPosition[0],a=r-e.refOriginalPosition[1]),this.isInsideCircle(t.x,t.y,t.r,i,a)}case"sector":{let e=t.startAngle*Math.PI/180,i=t.endAngle*Math.PI/180;return t.clockWise||(e=-e,i=-i),this.isInsideSector(t.x,t.y,t.r0,t.r,e,i,!t.clockWise,s,r)}case"smicsector":{let i=t.startAngle*Math.PI/180,a=t.endAngle*Math.PI/180;t.clockWise||(i=-i,a=-a);let n=t.x,o=t.y;return e.refOriginalPosition&&(n=t.x+e.refOriginalPosition[0],o=t.y+e.refOriginalPosition[1]),this.isInsideSector(n,o,t.r0,t.r,i,a,!t.clockWise,s,r)}case"path":return this.isInsidePath(t.pathArray,Math.max(t.lineWidth,5),t.brushType,s,r);case"polygon":case"star":case"smicstar":case"isogon":case"smicisogon":return this.isInsidePolygon(t.pointList,s,r);case"smicpolygon":{let u=s,c=r;if(e.refOriginalPosition&&(u=s-e.refOriginalPosition[0],c=r-e.refOriginalPosition[1]),e.holePolygonPointLists&&e.holePolygonPointLists.length>0){for(var i=this.isInsidePolygon(t.pointList,u,c),a=e.holePolygonPointLists,n=!1,o=0,l=a.length;o<l;o++){var h=a[o];!0===this.isInsidePolygon(h,u,c)&&(n=!0)}return!0===i&&!1===n}return this.isInsidePolygon(t.pointList,u,c)}case"text":var u=t.__rect||e.getRect(t);return this.isInsideRect(u.x,u.y,u.width,u.height,s,r);case"smictext":var c=e.getTextBackground(t);return this.isInsidePolygon(c,s,r);case"rectangle":case"image":return this.isInsideRect(t.x,t.y,t.width,t.height,s,r);case"smicimage":{let i=t.x,a=t.y;return e.refOriginalPosition&&(i=t.x+e.refOriginalPosition[0],a=t.y+e.refOriginalPosition[1]),this.isInsideRect(i,a,t.width,t.height,s,r)}}}_buildPathMethod(e,t,s,r,i){return t.beginPath(),e.buildPath(t,s),t.closePath(),t.isPointInPath(r,i)}isOutside(e,t,s,r){return!this.isInside(e,t,s,r)}isInsideLine(e,t,s,r,i,a,n){if(0===i)return!1;var o=Math.max(i,5),l=0;if(n>t+o&&n>r+o||n<t-o&&n<r-o||a>e+o&&a>s+o||a<e-o&&a<s-o)return!1;if(e===s)return Math.abs(a-e)<=o/2;var h=(l=(t-r)/(e-s))*a-n+(e*r-s*t)/(e-s);return h*h/(l*l+1)<=o/2*o/2}isInsideCubicStroke(e,t,s,r,i,a,n,o,l,h,u){if(0===l)return!1;var c=Math.max(l,5);return!(u>t+c&&u>r+c&&u>a+c&&u>o+c||u<t-c&&u<r-c&&u<a-c&&u<o-c||h>e+c&&h>s+c&&h>i+c&&h>n+c||h<e-c&&h<s-c&&h<i-c&&h<n-c)&&this.curve.cubicProjectPoint(e,t,s,r,i,a,n,o,h,u,null)<=c/2}isInsideQuadraticStroke(e,t,s,r,i,a,n,o,l){if(0===n)return!1;var h=Math.max(n,5);return!(l>t+h&&l>r+h&&l>a+h||l<t-h&&l<r-h&&l<a-h||o>e+h&&o>s+h&&o>i+h||o<e-h&&o<s-h&&o<i-h)&&this.curve.quadraticProjectPoint(e,t,s,r,i,a,o,l,null)<=h/2}isInsideArcStroke(e,t,s,r,i,a,n,o,l){var h=this.PI2;if(0===n)return!1;var u=Math.max(n,5);o-=e,l-=t;var c=Math.sqrt(o*o+l*l);if(c-u>s||c+u<s)return!1;if(Math.abs(r-i)>=h)return!0;if(a){var d=r;r=this.normalizeRadian(i),i=this.normalizeRadian(d)}else r=this.normalizeRadian(r),i=this.normalizeRadian(i);r>i&&(i+=h);var p=Math.atan2(l,o);return p<0&&(p+=h),p>=r&&p<=i||p+h>=r&&p+h<=i}isInsideBrokenLine(e,t,s,r){for(var i=Math.max(t,10),a=0,n=e.length-1;a<n;a++){var o=e[a][0],l=e[a][1],h=e[a+1][0],u=e[a+1][1];if(this.isInsideLine(o,l,h,u,i,s,r))return!0}return!1}isInsideRing(e,t,s,r,i,a){var n=(i-e)*(i-e)+(a-t)*(a-t);return n<r*r&&n>s*s}isInsideRect(e,t,s,r,i,a){return i>=e&&i<=e+s&&a>=t&&a<=t+r}isInsideCircle(e,t,s,r,i){return(r-e)*(r-e)+(i-t)*(i-t)<s*s}isInsideSector(e,t,s,r,i,a,n,o,l){return this.isInsideArcStroke(e,t,(s+r)/2,i,a,n,r-s,o,l)}isInsidePolygon(e,t,s){for(var r=e.length,i=0,a=0,n=r-1;a<r;a++){var o=e[n][0],l=e[n][1],h=e[a][0],u=e[a][1];i+=this.windingLine(o,l,h,u,t,s),n=a}return 0!==i}windingLine(e,t,s,r,i,a){return a>t&&a>r||a<t&&a<r?0:r==t?0:(a-t)/(r-t)*(s-e)+e>i?r<t?1:-1:0}swapExtrema(){var e=this.extrema[0];this.extrema[0]=this.extrema[1],this.extrema[1]=e}windingCubic(e,t,s,r,i,a,n,o,l,h){var u=this.curve,c=this.roots,d=this.extrema;if(h>t&&h>r&&h>a&&h>o||h<t&&h<r&&h<a&&h<o)return 0;var p=u.cubicRootAt(t,r,a,o,h,c);if(0===p)return 0;for(var m,f,y=0,g=-1,v=0;v<p;v++){var S=c[v];u.cubicAt(e,s,i,n,S)<l||(g<0&&(g=u.cubicExtrema(t,r,a,o,d),d[1]<d[0]&&g>1&&this.swapExtrema(),m=u.cubicAt(t,r,a,o,d[0]),g>1&&(f=u.cubicAt(t,r,a,o,d[1]))),2==g?S<d[0]?y+=m<t?1:-1:S<d[1]?y+=f<m?1:-1:y+=o<f?1:-1:S<d[0]?y+=m<t?1:-1:y+=o<m?1:-1)}return y}windingQuadratic(e,t,s,r,i,a,n,o){var l=this.curve,h=this.roots;if(o>t&&o>r&&o>a||o<t&&o<r&&o<a)return 0;var u=l.quadraticRootAt(t,r,a,o,h);if(0===u)return 0;var c=l.quadraticExtremum(t,r,a);if(c>=0&&c<=1){var d=0,p=l.quadraticAt(t,r,a,c);for(let r=0;r<u;r++)l.quadraticAt(e,s,i,h[r])>n||(h[r]<c?d+=p<t?1:-1:d+=a<p?1:-1);return d}return l.quadraticAt(e,s,i,h[0])>n?0:a<t?1:-1}windingArc(e,t,s,r,i,a,n,o){var l=this.roots,h=this.PI2;if((o-=t)>s||o<-s)return 0;let u=Math.sqrt(s*s-o*o);if(l[0]=-u,l[1]=u,Math.abs(r-i)>=h){r=0,i=h;var c=a?1:-1;return n>=l[0]+e&&n<=l[1]+e?c:0}if(a){let e=r;r=this.normalizeRadian(i),i=this.normalizeRadian(e)}else r=this.normalizeRadian(r),i=this.normalizeRadian(i);r>i&&(i+=h);var d=0;for(let t=0;t<2;t++){var p=l[t];if(p+e>n){let e=Math.atan2(o,p),t=a?1:-1;e<0&&(e=h+e),(e>=r&&e<=i||e+h>=r&&e+h<=i)&&(e>Math.PI/2&&e<1.5*Math.PI&&(t=-t),d+=t)}}return d}isInsidePath(e,t,s,r,i){for(var a=0,n=0,o=0,l=0,h=0,u=!0,c=!0,d="stroke"===(s=s||"fill")||"both"===s,p="fill"===s||"both"===s,m=0;m<e.length;m++){var f=e[m],y=f.points;if(u||"M"===f.command){if(m>0&&(p&&(a+=this.windingLine(n,o,l,h,r,i)),0!==a))return!0;l=y[y.length-2],h=y[y.length-1],u=!1,c&&"A"!==f.command&&(c=!1,n=l,o=h)}switch(f.command){case"M":n=y[0],o=y[1];break;case"L":if(d&&this.isInsideLine(n,o,y[0],y[1],t,r,i))return!0;p&&(a+=this.windingLine(n,o,y[0],y[1],r,i)),n=y[0],o=y[1];break;case"C":if(d&&this.isInsideCubicStroke(n,o,y[0],y[1],y[2],y[3],y[4],y[5],t,r,i))return!0;p&&(a+=this.windingCubic(n,o,y[0],y[1],y[2],y[3],y[4],y[5],r,i)),n=y[4],o=y[5];break;case"Q":if(d&&this.isInsideQuadraticStroke(n,o,y[0],y[1],y[2],y[3],t,r,i))return!0;p&&(a+=this.windingQuadratic(n,o,y[0],y[1],y[2],y[3],r,i)),n=y[2],o=y[3];break;case"A":var g=y[0],v=y[1],S=y[2],b=y[3],x=y[4],C=y[5],_=Math.cos(x)*S+g,T=Math.sin(x)*b+v;c?(c=!1,l=_,h=T):a+=this.windingLine(n,o,_,T);var w=(r-g)*b/S+g;if(d&&this.isInsideArcStroke(g,v,b,x,x+C,1-y[7],t,w,i))return!0;p&&(a+=this.windingArc(g,v,b,x,x+C,1-y[7],w,i)),n=Math.cos(x+C)*S+g,o=Math.sin(x+C)*b+v;break;case"z":if(d&&this.isInsideLine(n,o,l,h,t,r,i))return!0;u=!0}}return p&&(a+=this.windingLine(n,o,l,h,r,i)),0!==a}getTextWidth(e,t){var s=e+":"+t;if(this._textWidthCache[s])return this._textWidthCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var r=0,i=0,a=(e=(e+"").split("\n")).length;i<a;i++)r=Math.max(this._ctx.measureText(e[i]).width,r);return this._ctx.restore(),this._textWidthCache[s]=r,++this._textWidthCacheCounter>this.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),r}getTextHeight(e,t){var s=e+":"+t;if(this._textHeightCache[s])return this._textHeightCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var r=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[s]=r,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),r}},pa.Util_color=new Wi,pa.Util_computeBoundingBox=new
  1269. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1270. * This program are made available under the terms of the Apache License, Version 2.0
  1271. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1272. class{constructor(){3===arguments.length&&this.computeBoundingBox(arguments),this.CLASS_NAME="SuperMap.LevelRenderer.Tool.ComputeBoundingBox"}computeBoundingBox(e,t,s){if(0!==e.length){for(var r=e[0][0],i=e[0][0],a=e[0][1],n=e[0][1],o=1;o<e.length;o++){var l=e[o];l[0]<r&&(r=l[0]),l[0]>i&&(i=l[0]),l[1]<a&&(a=l[1]),l[1]>n&&(n=l[1])}t[0]=r,t[1]=a,s[0]=i,s[1]=n}}cubeBezier(e,t,s,r,i,a){var n=new ca,o=[];n.cubicExtrema(e[0],t[0],s[0],r[0],o);for(let i=0;i<o.length;i++)o[i]=n.cubicAt(e[0],t[0],s[0],r[0],o[i]);var l=[];n.cubicExtrema(e[1],t[1],s[1],r[1],l);for(let i=0;i<l.length;i++)l[i]=n.cubicAt(e[1],t[1],s[1],r[1],l[i]);o.push(e[0],r[0]),l.push(e[1],r[1]);var h=Math.min.apply(null,o),u=Math.max.apply(null,o),c=Math.min.apply(null,l),d=Math.max.apply(null,l);i[0]=h,i[1]=c,a[0]=u,a[1]=d}quadraticBezier(e,t,s,r,i){var a=new ca,n=a.quadraticExtremum(e[0],t[0],s[0]),o=a.quadraticExtremum(e[1],t[1],s[1]),l=1-(n=Math.max(Math.min(n,1),0)),h=1-(o=Math.max(Math.min(o,1),0)),u=l*l*e[0]+2*l*n*t[0]+n*n*s[0],c=l*l*e[1]+2*l*n*t[1]+n*n*s[1],d=h*h*e[0]+2*h*o*t[0]+o*o*s[0],p=h*h*e[1]+2*h*o*t[1]+o*o*s[1];r[0]=Math.min(e[0],s[0],u,d),r[1]=Math.min(e[1],s[1],c,p),i[0]=Math.max(e[0],s[0],u,d),i[1]=Math.max(e[1],s[1],c,p)}arc(e,t,s,r,i,a,n,o){var l=new ua,h=l.create(),u=l.create(),c=l.create();if(h[0]=Math.cos(r)*s+e,h[1]=Math.sin(r)*s+t,u[0]=Math.cos(i)*s+e,u[1]=Math.sin(i)*s+t,l.min(n,h,u),l.max(o,h,u),(r%=2*Math.PI)<0&&(r+=2*Math.PI),(i%=2*Math.PI)<0&&(i+=2*Math.PI),r>i&&!a?i+=2*Math.PI:r<i&&a&&(r+=2*Math.PI),a){var d=i;i=r,r=d}for(var p=0;p<i;p+=Math.PI/2)p>r&&(c[0]=Math.cos(p)*s+e,c[1]=Math.sin(p)*s+t,l.min(n,c,n),l.max(o,c,o))}},pa.Util_curve=new ca,pa.Util_env=new
  1273. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1274. * This program are made available under the terms of the Apache License, Version 2.0
  1275. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1276. class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Env";var e,t,s,r,i,a,n,o,l,h,u,c,d,p,m,f,y,g,v,S,b,x=this;return e=navigator.userAgent,t=x.os={},s=x.browser={},r=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),a=e.match(/(iPad).*OS\s([\d_]+)/),n=e.match(/(iPod)(.*OS\s([\d_]+))?/),o=!a&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),u=e.match(/Kindle\/([\d.]+)/),c=e.match(/Silk\/([\d._]+)/),d=e.match(/(BlackBerry).*Version\/([\d.]+)/),p=e.match(/(BB10).*Version\/([\d.]+)/),m=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),f=e.match(/PlayBook/),y=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),v=e.match(/MSIE ([\d.]+)/),S=r&&e.match(/Mobile\//)&&!y,b=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!y,(s.webkit=!!r)&&(s.version=r[1]),i&&(t.android=!0,t.version=i[2]),o&&!n&&(t.ios=t.iphone=!0,t.version=o[2].replace(/_/g,".")),a&&(t.ios=t.ipad=!0,t.version=a[2].replace(/_/g,".")),n&&(t.ios=t.ipod=!0,t.version=n[3]?n[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),d&&(t.blackberry=!0,t.version=d[2]),p&&(t.bb10=!0,t.version=p[2]),m&&(t.rimtabletos=!0,t.version=m[2]),f&&(s.playbook=!0),u&&(t.kindle=!0,t.version=u[1]),c&&(s.silk=!0,s.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(s.silk=!0),y&&(s.chrome=!0,s.version=y[1]),g&&(s.firefox=!0,s.version=g[1]),v&&(s.ie=!0,s.version=v[1]),S&&(e.match(/Safari/)||t.ios)&&(s.safari=!0),b&&(s.webview=!0),v&&(s.ie=!0,s.version=v[1]),t.tablet=!!(a||f||i&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||v&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(i||o||l||d||p||y&&e.match(/Android/)||y&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||v&&e.match(/Touch/))),{browser:s,os:t,canvasSupported:!!document.createElement("canvas").getContext}}destory(){return!0}},pa.Util_event=new
  1277. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1278. * This program are made available under the terms of the Apache License, Version 2.0
  1279. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1280. class{constructor(){this.stop="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Event"}getX(e){return void 0!==e.zrenderX&&e.zrenderX||void 0!==e.offsetX&&e.offsetX||void 0!==e.layerX&&e.layerX||void 0!==e.clientX&&e.clientX}getY(e){return void 0!==e.zrenderY&&e.zrenderY||void 0!==e.offsetY&&e.offsetY||void 0!==e.layerY&&e.layerY||void 0!==e.clientY&&e.clientY}getDelta(e){return void 0!==e.zrenderDelta&&e.zrenderDelta||void 0!==e.wheelDelta&&e.wheelDelta||void 0!==e.detail&&-e.detail}},pa.Util_http=new
  1281. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1282. * This program are made available under the terms of the Apache License, Version 2.0
  1283. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1284. class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Http"}get(e,t,s){if("object"==typeof e){var r=e;e=r.url,t=r.onsuccess,s=r.onerror}var i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");i.open("GET",e,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status>=200&&i.status<300||304===i.status?t&&t(i.responseText):s&&s(),i.onreadystatechange=new Function,i=null)},i.send(null)}},pa.Util_log=new
  1285. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1286. * This program are made available under the terms of the Apache License, Version 2.0
  1287. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1288. class{constructor(){return this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Log",function(){if(0!==da.debugMode)if(1==da.debugMode)for(let e in arguments)throw new Error(arguments[e]);else if(da.debugMode>1)for(let e in arguments)console.log(arguments[e])}}destory(){return!0}},pa.Util_math=new
  1289. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1290. * This program are made available under the terms of the Apache License, Version 2.0
  1291. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1292. class{constructor(){this._radians=window.Math.PI/180,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Math"}sin(e,t){return window.Math.sin(t?e*this._radians:e)}cos(e,t){return window.Math.cos(t?e*this._radians:e)}degreeToRadian(e){return e*this._radians}radianToDegree(e){return e/this._radians}},pa.Util_matrix=new
  1293. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1294. * This program are made available under the terms of the Apache License, Version 2.0
  1295. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1296. class{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Matrix"}create(){var e=new(0,this.ArrayCtor)(6);return this.identity(e),e}identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}copy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}mul(e,t,s){return e[0]=t[0]*s[0]+t[2]*s[1],e[1]=t[1]*s[0]+t[3]*s[1],e[2]=t[0]*s[2]+t[2]*s[3],e[3]=t[1]*s[2]+t[3]*s[3],e[4]=t[0]*s[4]+t[2]*s[5]+t[4],e[5]=t[1]*s[4]+t[3]*s[5]+t[5],e}translate(e,t,s){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+s[0],e[5]=t[5]+s[1],e}rotate(e,t,s){var r=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5],h=Math.sin(s),u=Math.cos(s);return e[0]=r*u+n*h,e[1]=-r*h+n*u,e[2]=i*u+o*h,e[3]=-i*h+u*o,e[4]=u*a+h*l,e[5]=u*l-h*a,e}scale(e,t,s){var r=s[0],i=s[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}invert(e,t){var s=t[0],r=t[2],i=t[4],a=t[1],n=t[3],o=t[5],l=s*n-a*r;return l?(l=1/l,e[0]=n*l,e[1]=-a*l,e[2]=-r*l,e[3]=s*l,e[4]=(r*o-n*i)*l,e[5]=(a*i-s*o)*l,e):null}mulVector(e,t,s){var r=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5];return e[0]=s[0]*r+s[1]*i+a,e[1]=s[0]*n+s[1]*o+l,e}},pa.Util=new qi,pa.Util_vector=new ua;
  1297. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1298. * This program are made available under the terms of the Apache License, Version 2.0
  1299. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1300. class ma{constructor(){var e;this.position=[0,0],this.rotation=[0,0,0],this.scale=[1,1,0,0],this.needLocalTransform=!1,this.needTransform=!1,this.CLASS_NAME="SuperMap.LevelRenderer.Transformable",this.lookAt=(e=pa.Util_vector.create(),function(t){this.transform||(this.transform=pa.Util_matrix.create());var s=this.transform;function r(e){return e>-5e-5&&e<5e-5}pa.Util_vector.sub(e,t,this.position),r(e[0])&&r(e[1])||(pa.Util_vector.normalize(e,e),s[2]=e[0]*this.scale[1],s[3]=e[1]*this.scale[1],s[0]=e[1]*this.scale[0],s[1]=-e[0]*this.scale[0],s[4]=this.position[0],s[5]=this.position[1],this.decomposeTransform())})}destroy(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}updateNeedTransform(){function e(e){return e>5e-5||e<-5e-5}this.needLocalTransform=e(this.rotation[0])||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)}updateTransform(){if(this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform,this.needTransform){var e=[0,0],t=this.transform||pa.Util_matrix.create();if(pa.Util_matrix.identity(t),this.needLocalTransform){if(s(this.scale[0])||s(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;let r=s(e[0])||s(e[1]);r&&pa.Util_matrix.translate(t,t,e),pa.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],pa.Util_matrix.translate(t,t,e))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){e[0]=-this.rotation[1]||0,e[1]=-this.rotation[2]||0;let r=s(e[0])||s(e[1]);r&&pa.Util_matrix.translate(t,t,e),pa.Util_matrix.rotate(t,t,this.rotation[0]),r&&(e[0]=-e[0],e[1]=-e[1],pa.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&pa.Util_matrix.rotate(t,t,this.rotation);(s(this.position[0])||s(this.position[1]))&&pa.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?pa.Util_matrix.mul(this.transform,this.parent.transform,this.transform):pa.Util_matrix.copy(this.transform,this.parent.transform))}function s(e){return e>5e-5||e<-5e-5}}setTransform(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}decomposeTransform(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],s=this.position,r=this.scale,i=this.rotation;n(t-1)&&(t=Math.sqrt(t));var a=e[2]*e[2]+e[3]*e[3];n(a-1)&&(a=Math.sqrt(a)),s[0]=e[4],s[1]=e[5],r[0]=t,r[1]=a,r[2]=r[3]=0,i[0]=Math.atan2(-e[1]/a,e[0]/t),i[1]=i[2]=0}function n(e){return e>5e-5||e<-5e-5}}}
  1301. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1302. * This program are made available under the terms of the Apache License, Version 2.0
  1303. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1304. class fa extends(i.mixin(ha,ma)){constructor(e){var t;super(e),e=e||{},this.id=null,this.style={},this.highlightStyle=null,this.parent=null,this.__dirty=!0,this.__clipShapes=[],this.invisible=!1,this.ignore=!1,this.zlevel=0,this.draggable=!1,this.clickable=!1,this.hoverable=!0,this.z=0,this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,X.extend(this,e),this.id=this.id||X.createUniqueID("smShape_"),this.CLASS_NAME="SuperMap.LevelRenderer.Shape",this.getTansform=(t=[],function(e,s){var r=[e,s];return this.needTransform&&this.transform&&(pa.Util_matrix.invert(t,this.transform),pa.Util_matrix.mulVector(r,t,[e,s,1]),e==r[0]&&s==r[1]&&this.updateNeedTransform()),r})}destroy(){this.id=null,this.style=null,this.highlightStyle=null,this.parent=null,this.__dirty=null,this.__clipShapes=null,this.invisible=null,this.ignore=null,this.zlevel=null,this.draggable=null,this.clickable=null,this.hoverable=null,this.z=null,this.refOriginalPosition=null,this.refDataID=null,this.refDataHoverGroup=null,this.isHoverByRefDataID=null,this.dataInfo=null,super.destroy()}brush(e,t){var s=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,s),s.brushType){case"both":this.setCtxGlobalAlpha(e,"fill",s),e.fill(),s.lineWidth>0&&(this.setCtxGlobalAlpha(e,"stroke",s),e.stroke()),this.setCtxGlobalAlpha(e,"reset",s);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",s),s.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",s);break;default:this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)}this.drawText(e,s,this.style),this.afterBrush(e)}beforeBrush(e,t){var s=this.style;return this.brushTypeOnly&&(s.brushType=this.brushTypeOnly),t&&(s=this.getHighlightStyle(s,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(s.strokeColor=s.strokeColor||s.color),e.save(),this.doClip(e),this.setContext(e,s),this.setTransform(e),s}afterBrush(e){e.restore()}setContext(e,t){for(var s=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],r=0,i=s.length;r<i;r++){var a=t[s[r][0]],n=s[r][1];void 0!==a&&(e[n]=a)}}doClip(e){var t=pa.Util_matrix.create();if(this.__clipShapes)for(var s=0;s<this.__clipShapes.length;s++){var r=this.__clipShapes[s];if(r.needTransform){let s=r.transform;pa.Util_matrix.invert(t,s),e.transform(s[0],s[1],s[2],s[3],s[4],s[5])}if(e.beginPath(),r.buildPath(e,r.style),e.clip(),r.needTransform){let s=t;e.transform(s[0],s[1],s[2],s[3],s[4],s[5])}}}getHighlightStyle(e,t,s){var r={};for(let t in e)r[t]=e[t];var i=pa.Util_color.getHighlightColor();"stroke"!=e.brushType?(r.strokeColor=i,r.lineWidth=e.lineWidth||1,r.brushType="both"):"stroke"!=s?(r.strokeColor=i,r.lineWidth=e.lineWidth||1):r.strokeColor=t.strokeColor||pa.Util_color.mix(e.strokeColor,pa.Util_color.toRGB(i));for(let e in t)void 0!==t[e]&&(r[e]=t[e]);return r}getHighlightZoom(){return"text"!=this.type?6:2}drift(e,t){this.position[0]+=e,this.position[1]+=t}buildPath(e,t){pa.Util_log("buildPath not implemented in "+this.type)}getRect(e){pa.Util_log("getRect not implemented in "+this.type)}isCover(e,t){var s=this.getTansform(e,t);e=s[0],t=s[1];var r=this.style.__rect;return r||(r=this.style.__rect=this.getRect(this.style)),e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height&&pa.Util_area.isInside(this,this.style,e,t)}drawText(e,t,s){if(void 0!==t.text&&!1!==t.text){var r=t.textColor||t.color||t.strokeColor;e.fillStyle=r;var i,a,n,o,l=10,h=t.textPosition||this.textPosition||"top",u=[];switch(u=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],h){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var c=(s||t).__rect||this.getRect(s||t);switch(h){case"inside":n=c.x+c.width/2,o=c.y+c.height/2,i="center",a="middle","stroke"!=t.brushType&&r==t.color&&(e.fillStyle="#fff");break;case"left":n=c.x-l,o=c.y+c.height/2,i="end",a="middle";break;case"right":n=c.x+c.width+l,o=c.y+c.height/2,i="start",a="middle";break;case"top":n=c.x+c.width/2,o=c.y-l,i="center",a="bottom";break;case"bottom":n=c.x+c.width/2,o=c.y+c.height+l,i="center",a="top"}}break;case"start":case"end":var d=0,p=0,m=0,f=0;if(void 0!==t.pointList){var y=t.pointList;if(y.length<2)return;var g=y.length;switch(h){case"start":d=y[0][0]+u[0],p=y[1][0]+u[0],m=y[0][1]+u[1],f=y[1][1]+u[1];break;case"end":d=y[g-2][0]+u[0],p=y[g-1][0]+u[0],m=y[g-2][1]+u[1],f=y[g-1][1]+u[1]}}else d=t.xStart+u[0]||0,p=t.xEnd+u[0]||0,m=t.yStart+u[1]||0,f=t.yEnd+u[1]||0;switch(h){case"start":i=d<p?"end":"start",a=m<f?"bottom":"top",n=d,o=m;break;case"end":i=d<p?"start":"end",a=m<f?"top":"bottom",n=p,o=f}l-=4,d&&p&&d!=p?n-="end"==i?l:-l:i="center",m!=f?o-="bottom"==a?l:-l:a="middle";break;case"specific":n=t.textX||0,o=t.textY||0,i="start",a="middle"}t.labelXOffset&&!isNaN(t.labelXOffset)&&(n+=t.labelXOffset),t.labelYOffset&&!isNaN(t.labelYOffset)&&(o+=t.labelYOffset),null!=n&&null!=o&&fa._fillText(e,t.text,n,o,t.textFont,t.textAlign||i,t.textBaseline||a)}}modSelf(){this.__dirty=!0,this.style&&(this.style.__rect=null),this.highlightStyle&&(this.highlightStyle.__rect=null)}isSilent(){return!(this.hoverable||this.draggable||this.clickable||this.onmousemove||this.onmouseover||this.onmouseout||this.onmousedown||this.onmouseup||this.onclick||this.ondragenter||this.ondragover||this.ondragleave||this.ondrop)}setCtxGlobalAlpha(e,t,s){e.globalAlpha="fill"===t?void 0===s.fillOpacity?void 0===s.opacity?1:s.opacity:s.fillOpacity:"stroke"===t?void 0===s.strokeOpacity?void 0===s.opacity?1:s.opacity:s.strokeOpacity:void 0===s.opacity?1:s.opacity}static _fillText(e,t,s,r,i,a,n){i&&(e.font=i),e.textAlign=a,e.textBaseline=n;var o=fa._getTextRect(t,s,r,i,a,n);t=(t+"").split("\n");var l=pa.Util_area.getTextHeight("ZH",i);switch(n){case"top":r=o.y;break;case"bottom":r=o.y+l;break;default:r=o.y+l/2}for(var h=0,u=t.length;h<u;h++)e.fillText(t[h],s,r),r+=l}static _getTextRect(e,t,s,r,i,a){var n=pa.Util_area.getTextWidth(e,r),o=pa.Util_area.getTextHeight("ZH",r);switch(e=(e+"").split("\n"),i){case"end":case"right":t-=n;break;case"center":t-=n/2}switch(a){case"top":break;case"bottom":s-=o*e.length;break;default:s-=o*e.length/2}return{x:t,y:s,width:n,height:o*e.length}}}
  1305. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1306. * This program are made available under the terms of the Apache License, Version 2.0
  1307. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1308. class ya extends fa{constructor(e){super(e),this.type="smicpoint",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPoint"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;e.arc(t.x+s[0],t.y+s[1],t.r,0,2*Math.PI,!0)}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+s[0]-e.r-t/2),y:Math.round(e.y+s[1]-e.r-t/2),width:2*e.r+t,height:2*e.r+t},e.__rect)}}
  1309. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1310. * This program are made available under the terms of the Apache License, Version 2.0
  1311. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1312. class ga extends fa{constructor(e){super(e),this.type="smictext",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicText"}destroy(){this.type=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=this.style;if(t&&(r=this.getHighlightStyle(r,this.highlightStyle||{})),void 0!==r.text&&!1!==r.text){e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r.textFont&&(e.font=r.textFont),e.textAlign=r.textAlign||"start",e.textBaseline=r.textBaseline||"middle";var i,a=(r.text+"").split("\n"),n=pa.Util_area.getTextHeight("ZH",r.textFont),o=this.getRectNoRotation(r),l=r.x+s[0];i="top"==r.textBaseline?o.y:"bottom"==r.textBaseline?o.y+n:o.y+n/2;for(var h=r.x+s[0],u=r.y+s[1],c=0,d=a.length;c<d;c++){switch(r.labelRect&&(e.fillRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=r.strokeColor,e.strokeRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=r.textColor),r.brushType){case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?e.strokeText(a[c],0,n*c,r.maxWidth):e.strokeText(a[c],0,n*c):"bottom"==r.textBaseline?r.maxWidth?e.strokeText(a[c],0,n*(c+1)-o.height,r.maxWidth):e.strokeText(a[c],0,n*(c+1)-o.height):r.maxWidth?e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth):e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2),e.restore()):r.maxWidth?e.strokeText(a[c],l,i,r.maxWidth):e.strokeText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r);break;case"both":r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*c,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*c,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*c),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*c),this.setCtxGlobalAlpha(e,"reset",r)):"bottom"==r.textBaseline?r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",r)):r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],0,n*(c+1)-o.height/2-n/2),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],0,n*(c+1)-o.height/2-n/2),this.setCtxGlobalAlpha(e,"reset",r)),e.restore()):r.maxWidth?(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],l,i,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],l,i,r.maxWidth),this.setCtxGlobalAlpha(e,"reset",r)):(this.setCtxGlobalAlpha(e,"fill",r),e.fillText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r),this.setCtxGlobalAlpha(e,"stroke",r),e.strokeText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r));break;default:this.setCtxGlobalAlpha(e,"fill",r),r.textRotation&&0!==r.textRotation?(e.save(),e.translate(h,u),e.rotate(r.textRotation*Math.PI/180),"top"==r.textBaseline?r.maxWidth?e.fillText(a[c],0,n*c,r.maxWidth):e.fillText(a[c],0,n*c):"bottom"==r.textBaseline?r.maxWidth?e.fillText(a[c],0,n*(c+1)-o.height,r.maxWidth):e.fillText(a[c],0,n*(c+1)-o.height):r.maxWidth?e.fillText(a[c],0,n*(c+1)-o.height/2-n/2,r.maxWidth):e.fillText(a[c],0,n*(c+1)-o.height/2-n/2),e.restore()):r.maxWidth?e.fillText(a[c],l,i,r.maxWidth):e.fillText(a[c],l,i),this.setCtxGlobalAlpha(e,"reset",r)}i+=n}e.restore()}}getRect(e){if(e.__rect)return e.__rect;for(var t,s,r,i,a=this.getTextBackground(e,!0),n=0,o=a.length;n<o;n++){var l=a[n];0==n?(t=l[0],r=l[0],s=l[1],i=l[1]):(l[0]<t&&(t=l[0]),l[0]>r&&(r=l[0]),l[1]<s&&(s=l[1]),l[1]>i&&(i=l[1]))}return e.__rect={x:t,y:s,width:r-t,height:i-s},e.__rect}getRectNoRotation(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition,r=pa.Util_area.getTextHeight("ZH",e.textFont),i=pa.Util_area.getTextWidth(e.text,e.textFont),a=pa.Util_area.getTextHeight(e.text,e.textFont),n=e.x+s[0];"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2),t="top"==e.textBaseline?e.y+s[1]:"bottom"==e.textBaseline?e.y+s[1]-a:e.y+s[1]-a/2;var o,l=!1;if(e.maxWidth){var h=parseInt(e.maxWidth);h<i&&(o=i,l=!0,i=h),n=e.x+s[0],"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2)}e.textFont&&(e.textFont.toLowerCase().indexOf("italic")>-1&&(i+=!0===l?r/3*(i/o):r/3));return{x:n,y:t,width:i,height:a}}getTextBackground(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var r=this.getRectNoRotation(e),i=e.x+s[0],a=e.y+s[1],n=[];if(e.textRotation&&0!==e.textRotation){let t=e.textRotation,s=this.getRotatedLocation(r.x,r.y,i,a,t),o=this.getRotatedLocation(r.x+r.width,r.y,i,a,t),l=this.getRotatedLocation(r.x+r.width,r.y+r.height,i,a,t),h=this.getRotatedLocation(r.x,r.y+r.height,i,a,t);n.push(s),n.push(o),n.push(l),n.push(h)}else{let e=[r.x,r.y],t=[r.x+r.width,r.y],s=[r.x+r.width,r.y+r.height],i=[r.x,r.y+r.height];n.push(e),n.push(t),n.push(s),n.push(i)}return e.__textBackground=n,e.__textBackground}getRotatedLocation(e,t,s,r,i){var a,n,o=new Array;return t=-t,r=-r,i=-i,a=(e-s)*Math.cos(i/180*Math.PI)-(t-r)*Math.sin(i/180*Math.PI)+s,n=(e-s)*Math.sin(i/180*Math.PI)+(t-r)*Math.cos(i/180*Math.PI)+r,o[0]=a,o[1]=-n,o}}
  1313. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1314. * This program are made available under the terms of the Apache License, Version 2.0
  1315. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1316. class va extends fa{constructor(e){super(e),this.type="smiccircle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicCircle"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=t.x+s[0],i=t.y+s[1];return e.moveTo(r+t.r,i),e.arc(r,i,t.r,0,2*Math.PI,!0),!0}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition,r=e.x+s[0],i=e.y+s[1],a=e.r;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(r-a-t/2),y:Math.round(i-a-t/2),width:2*a+t,height:2*a+t},e.__rect}}
  1317. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1318. * This program are made available under the terms of the Apache License, Version 2.0
  1319. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1320. class Sa extends fa{constructor(e){super(e),this.type="smicpolygon",this.holePolygonPointLists=null,this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPolygon"}destroy(){this.type=null,this.holePolygonPointLists=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.style;t&&(s=this.getHighlightStyle(s,this.highlightStyle||{})),e.save(),this.setContext(e,s),this.setTransform(e);var r=!1;"fill"!=s.brushType&&"both"!=s.brushType&&void 0!==s.brushType||(e.beginPath(),"dashed"==s.lineType||"dotted"==s.lineType||"dot"==s.lineType||"dash"==s.lineType||"dashdot"==s.lineType||"longdash"==s.lineType||"longdashdot"==s.lineType?this.buildPath(e,{lineType:"solid",lineWidth:s.lineWidth,pointList:s.pointList}):(this.buildPath(e,s),r=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)),s.lineWidth>0&&("stroke"==s.brushType||"both"==s.brushType)&&(r||(e.beginPath(),this.buildPath(e,s)),this.setCtxGlobalAlpha(e,"stroke",s),e.stroke(),this.setCtxGlobalAlpha(e,"reset",s)),this.drawText(e,s,this.style);var i=X.cloneObject(s);if(i.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var a=this.holePolygonPointLists,n=a.length,o=0;o<n;o++){var l=a[o];i.pointList=l,e.globalCompositeOperation="destination-out",r=!1,"fill"!=i.brushType&&"both"!=i.brushType&&void 0!==i.brushType||(e.beginPath(),"dashed"==i.lineType||"dotted"==i.lineType||"dot"==i.lineType||"dash"==i.lineType||"dashdot"==i.lineType||"longdash"==i.lineType||"longdashdot"==i.lineType?this.buildPath(e,{lineType:"solid",lineWidth:i.lineWidth,pointList:i.pointList}):(this.buildPath(e,i),r=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",i),e.fill(),this.setCtxGlobalAlpha(e,"reset",i)),i.lineWidth>0&&("stroke"==i.brushType||"both"==i.brushType)?(r||(e.beginPath(),this.buildPath(e,i)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",i),e.stroke(),this.setCtxGlobalAlpha(e,"reset",i)):e.globalCompositeOperation="source-over"}e.restore()}buildPath(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=t.pointList;if(!(r.length<2))if(t.smooth&&"spline"!==t.smooth){var i,a,n,o=pa.SUtil_smoothBezier(r,t.smooth,!0,t.smoothConstraint,s);e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(var l=r.length,h=0;h<l;h++)i=o[2*h],a=o[2*h+1],n=[r[(h+1)%l][0]+s[0],r[(h+1)%l][1]+s[1]],e.bezierCurveTo(i[0],i[1],a[0],a[1],n[0],n[1])}else if("spline"===t.smooth&&(r=pa.SUtil_smoothSpline(r,!0,null,s)),t.lineType&&"solid"!=t.lineType){if("dashed"===t.lineType||"dotted"===t.lineType||"dot"===t.lineType||"dash"===t.lineType||"longdash"===t.lineType){let i=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=i;let a=t.lineWidth||1,n=a,o=a;"dashed"===t.lineType&&(n*=5,o*=5,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"dotted"===t.lineType&&t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a),"dot"===t.lineType&&(o*=4,t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a)),"dash"===t.lineType&&(n*=4,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"longdash"===t.lineType&&(n*=8,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)pa.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o]);pa.SUtil_dashedLineTo(e,r[r.length-1][0]+s[0],r[r.length-1][1]+s[1],r[0][0]+s[0],r[0][1]+s[1],a,[n,o])}else if("dashdot"===t.lineType||"longdashdot"===t.lineType){let i=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=i;let a=t.lineWidth||1,n=a,o=a,l=a,h=a;"dashdot"===t.lineType&&(n*=4,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),"longdashdot"===t.lineType&&(n*=8,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)pa.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o,l,h]);pa.SUtil_dashedLineTo(e,r[r.length-1][0]+s[0],r[r.length-1][1]+s[1],r[0][0]+s[0],r[0][1]+s[1],a,[n,o,l,h])}}else{e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<r.length;t++)e.lineTo(r[t][0]+s[0],r[t][1]+s[1]);e.lineTo(r[0][0]+s[0],r[0][1]+s[1])}}getRect(e,t){var s;if(t?s=t:(this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),s=this.refOriginalPosition),e.__rect)return e.__rect;for(var r,i=Number.MAX_VALUE,a=Number.MIN_VALUE,n=Number.MAX_VALUE,o=Number.MIN_VALUE,l=e.pointList,h=0,u=l.length;h<u;h++)l[h][0]+s[0]<i&&(i=l[h][0]+s[0]),l[h][0]+s[0]>a&&(a=l[h][0]+s[0]),l[h][1]+s[1]<n&&(n=l[h][1]+s[1]),l[h][1]+s[1]>o&&(o=l[h][1]+s[1]);return r="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(i-r/2),y:Math.round(n-r/2),width:a-i+r,height:o-n+r},e.__rect}}
  1321. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1322. * This program are made available under the terms of the Apache License, Version 2.0
  1323. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1324. class ba extends fa{constructor(e){super(e),this.brushTypeOnly="stroke",this.textPosition="end",this.type="smicbroken-line",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicBrokenLine"}destroy(){this.brushTypeOnly=null,this.textPosition=null,this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=t.pointList;if(!(r.length<2)){var i=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&"spline"!==t.smooth){var a,n,o,l=pa.SUtil_smoothBezier(r,t.smooth,!1,t.smoothConstraint,s);e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=0;t<i-1;t++)a=l[2*t],n=l[2*t+1],o=[r[t+1][0]+s[0],r[t+1][1]+s[1]],e.bezierCurveTo(a[0],a[1],n[0],n[1],o[0],o[1])}else if("spline"===t.smooth&&(i=(r=pa.SUtil_smoothSpline(r,null,null,s)).length),t.lineType&&"solid"!==t.lineType){if("dashed"===t.lineType||"dotted"===t.lineType||"dot"===t.lineType||"dash"===t.lineType||"longdash"===t.lineType){let a=t.lineWidth||1,n=a,o=a;"dashed"===t.lineType&&(n*=5,o*=5,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"dotted"===t.lineType&&t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a),"dot"===t.lineType&&(o*=4,t.lineCap&&"butt"!==t.lineCap&&(n=1,o+=a)),"dash"===t.lineType&&(n*=4,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),"longdash"===t.lineType&&(n*=8,o*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a)),e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(var h=1;h<i;h++)pa.SUtil_dashedLineTo(e,r[h-1][0]+s[0],r[h-1][1]+s[1],r[h][0]+s[0],r[h][1]+s[1],a,[n,o])}else if("dashdot"===t.lineType||"longdashdot"===t.lineType){let a=t.lineWidth||1,n=a,o=a,l=a,h=a;"dashdot"===t.lineType&&(n*=4,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),"longdashdot"===t.lineType&&(n*=8,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(n-=a,o+=a,l=1,h+=a)),a=(t.lineWidth||1)*("dashed"===t.lineType?5:1),e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<i;t++)pa.SUtil_dashedLineTo(e,r[t-1][0]+s[0],r[t-1][1]+s[1],r[t][0]+s[0],r[t][1]+s[1],a,[n,o,l,h])}}else{e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=1;t<i;t++)e.lineTo(r[t][0]+s[0],r[t][1]+s[1])}}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return Sa.prototype.getRect.apply(this,[e,t])}}
  1325. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1326. * This program are made available under the terms of the Apache License, Version 2.0
  1327. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1328. class xa extends fa{constructor(e){super(e),this.type="smicimage",this._imageCache={},this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicImage"}destroy(){this.type=null,this._imageCache=null,super.destroy()}brush(e,t,s){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,i=this.style||{};t&&(i=this.getHighlightStyle(i,this.highlightStyle||{}));var a=i.image,n=this;if("string"==typeof a){var o=a;this._imageCache[o]?a=this._imageCache[o]:((a=new Image).onload=function(){a.onload=null,clearTimeout(xa._refreshTimeout),xa._needsRefresh.push(n),xa._refreshTimeout=setTimeout(function(){s&&s(xa._needsRefresh),xa._needsRefresh=[]},10)},a.src=o,this._imageCache[o]=a)}if(a){if("IMG"==a.nodeName.toUpperCase())if(window.ActiveXObject){if("complete"!=a.readyState)return}else if(!a.complete)return;var l=i.width||a.width,h=i.height||a.height,u=i.x+r[0],c=i.y+r[1];if(!a.width||!a.height)return;if(e.save(),this.doClip(e),this.setContext(e,i),this.setTransform(e),i.sWidth&&i.sHeight){let t=i.sx+r[0]||0,s=i.sy+r[1]||0;e.drawImage(a,t,s,i.sWidth,i.sHeight,u,c,l,h)}else if(i.sx&&i.sy){let t=i.sx+r[0],s=i.sy+r[1];var d=l-t,p=h-s;e.drawImage(a,t,s,d,p,u,c,l,h)}else e.drawImage(a,u,c,l,h);i.width||(i.width=l),i.height||(i.height=h),this.style.width||(this.style.width=l),this.style.height||(this.style.height=h),this.drawText(e,i,this.style),e.restore()}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return{x:e.x+t[0],y:e.y+t[1],width:e.width,height:e.height}}clearCache(){this._imageCache={}}}xa._needsRefresh=[],xa._refreshTimeout=null;
  1329. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1330. * This program are made available under the terms of the Apache License, Version 2.0
  1331. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1332. class Ca extends fa{constructor(e){super(e),this.type="smicrectangle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicRectangle"}destroy(){this.type=null,super.destroy()}_buildRadiusPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s,r,i,a,n,o=this.refOriginalPosition,l=t.x+o[0],h=t.y+o[1],u=t.width,c=t.height,d=t.radius;"number"==typeof d?s=r=i=a=d:d instanceof Array?1===d.length?s=r=i=a=d[0]:2===d.length?(s=i=d[0],r=a=d[1]):3===d.length?(s=d[0],r=a=d[1],i=d[2]):(s=d[0],r=d[1],i=d[2],a=d[3]):s=r=i=a=0,s+r>u&&(s*=u/(n=s+r),r*=u/n),i+a>u&&(i*=u/(n=i+a),a*=u/n),r+i>c&&(r*=c/(n=r+i),i*=c/n),s+a>c&&(s*=c/(n=s+a),a*=c/n),e.moveTo(l+s,h),e.lineTo(l+u-r,h),0!==r&&e.quadraticCurveTo(l+u,h,l+u,h+r),e.lineTo(l+u,h+c-i),0!==i&&e.quadraticCurveTo(l+u,h+c,l+u-i,h+c),e.lineTo(l+a,h+c),0!==a&&e.quadraticCurveTo(l,h+c,l,h+c-a),e.lineTo(l,h+s),0!==s&&e.quadraticCurveTo(l,h,l+s,h)}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+s[0],t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1])),e.closePath()}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+s[0]-t/2),y:Math.round(e.y+s[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}
  1333. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1334. * This program are made available under the terms of the Apache License, Version 2.0
  1335. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1336. class _a extends fa{constructor(e){super(e),this.type="smicsector",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicSector"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=t.x+s[0],i=t.y+s[1],a=t.r0||0,n=t.r,o=t.startAngle,l=t.endAngle,h=t.clockWise||!1;o=pa.Util_math.degreeToRadian(o),l=pa.Util_math.degreeToRadian(l),h||(o=-o,l=-l);var u=pa.Util_math.cos(o),c=pa.Util_math.sin(o);e.moveTo(u*a+r,c*a+i),e.lineTo(u*n+r,c*n+i),e.arc(r,i,n,o,l,!h),e.lineTo(pa.Util_math.cos(l)*a+r,pa.Util_math.sin(l)*a+i),0!==a&&e.arc(r,i,a,l,o,h),e.closePath()}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition,s=pa.Util_vector.create(),r=pa.Util_vector.create(),i=pa.Util_vector.create(),a=pa.Util_vector.create(),n=e.x+t[0],o=e.y+t[1],l=e.r0||0,h=e.r,u=pa.Util_math.degreeToRadian(e.startAngle),c=pa.Util_math.degreeToRadian(e.endAngle),d=e.clockWise;return d||(u=-u,c=-c),l>1?pa.Util_computeBoundingBox.arc(n,o,l,u,c,!d,s,i):(s[0]=i[0]=n,s[1]=i[1]=o),pa.Util_computeBoundingBox.arc(n,o,h,u,c,!d,r,a),pa.Util_vector.min(s,s,r),pa.Util_vector.max(i,i,a),e.__rect={x:s[0],y:s[1],width:i[0]-s[0],height:i[1]-s[1]},e.__rect}}
  1337. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1338. * This program are made available under the terms of the Apache License, Version 2.0
  1339. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1340. class Ta{constructor(e){this.shapeParameters=e,this.CLASS_NAME="SuperMap.Feature.ShapeFactory"}destroy(){this.shapeParameters=null}createShape(e){if(e&&(this.shapeParameters=e),!this.shapeParameters)return null;var t=this.shapeParameters;if(t instanceof ta){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e=X.copyAttributesWithClip(e,t.style,["x","y"]);let s=new ya;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),X.copyAttributesWithClip(s,t,["x","y","style","highlightStyle"]),s}if(t instanceof sa){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=X.copyAttributesWithClip(e,t.style,["pointList"]);let s=new ba;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),X.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof ra){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=X.copyAttributesWithClip(e,t.style,["pointList"]);let s=new Sa;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),X.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof ia){if(!t.x&&!t.y&!t.width&!t.height)return null;let e=new Object;e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e=X.copyAttributesWithClip(e,t.style,["x","y","width","height"]);let s=new Ca;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),X.copyAttributesWithClip(s,t,["x","y","width","height","style","highlightStyle"]),s}if(t instanceof aa){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e.startAngle=t.startAngle,e.endAngle=t.endAngle,t.r0&&(e.r0=t.r0),t.clockWise&&(e.clockWise=t.clockWise),e=X.copyAttributesWithClip(e,t.style,["x","y","r","startAngle","endAngle","r0","endAngle"]);let s=new _a;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),X.copyAttributesWithClip(s,t,["x","y","r","startAngle","endAngle","r0","endAngle","style","highlightStyle"]),s}if(t instanceof na){let e=new Object;e.x=t.x,e.y=t.y,e.text=t.text,e=X.copyAttributesWithClip(e,t.style,["x","y","text"]);let s=new ga;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),X.copyAttributesWithClip(s,t,["x","y","text","style","highlightStyle"]),s}if(t instanceof oa){let e=new Object;e.x=t.x,e.y=t.y,t.image&&(e.image=t.image),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sx&&(e.sx=t.sx),t.sy&&(e.sy=t.sy),t.sWidth&&(e.sWidth=t.sWidth),t.sHeight&&(e.sHeight=t.sHeight),e=X.copyAttributesWithClip(e,t.style,["x","y","image","width","height","sx","sy","sWidth","sHeight"]);let s=new xa;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),X.copyAttributesWithClip(s,t,["x","y","image","width","height","style","highlightStyle"]),s}if(t instanceof la){let e=new Object;e.x=t.x,e.r=t.r,e.y=t.y,e=X.copyAttributesWithClip(e,t.style,["x","y","r"]);let s=new va;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),X.copyAttributesWithClip(s,t,["x","y","r","style","highlightStyle","lineWidth","text","textPosition"]),s}return null}static transformStyle(e){var t={},s=["normal","normal","normal","12","arial,sans-serif"],r=[!0,!1];for(var i in e)switch(i){case"fill":r[0]=e[i];break;case"fillColor":t.color=e[i];break;case"stroke":r[1]=e[i];break;case"strokeWidth":t.lineWidth=e[i];break;case"strokeLinecap":t.lineCap=e[i];break;case"strokeLineJoin":t.lineJoin=e[i];break;case"strokeDashstyle":t.lineType=e[i];break;case"pointRadius":t.r=e[i];break;case"label":t.text=e[i];break;case"labelRect":t.labelRect=e[i];break;case"fontColor":t.textColor=e[i];break;case"fontStyle":s[0]=e[i];break;case"fontVariant":s[1]=e[i];break;case"fontWeight":s[2]=e[i];break;case"fontSize":var a="";e[i]&&e[i].toString().indexOf("px")<0&&(a="px"),s[3]=e[i]+a;break;case"fontFamily":s[4]=e[i];break;case"fontOpacity":t.opacity=e[i];break;case"labelPosition":t.textPosition=e[i];break;case"labelAlign":t.textAlign=e[i];break;case"labelBaseline":t.textBaseline=e[i];break;case"labelRotation":t.textRotation=e[i];break;default:t[i]=e[i]}return t.textFont=s.join(" "),!0===r[0]&&!1===r[1]?t.brushType="fill":!1===r[0]&&!0===r[1]?t.brushType="stroke":!0===r[0]&&!0===r[1]?t.brushType="both":t.brushType="fill",null==t.lineWidth&&(t.lineWidth=1),t}static Background(e,t,s){var r=s||{},i=new ia(t[0],t[3],Math.abs(t[2]-t[0]),Math.abs(t[3]-t[1]));return i.style={fillColor:"#f3f3f3"},r.backgroundStyle&&X.copyAttributesWithClip(i.style,r.backgroundStyle),r.backgroundRadius&&(i.style.radius=r.backgroundRadius),i.clickable=!1,i.hoverable=!1,e.createShape(i)}static GraphAxis(e,t,s,r){var i=t,a=s||{},n=[],o=[],l=!!a.useXReferenceLine&&a.useXReferenceLine,h=a.axisYTick&&!isNaN(a.axisYTick)?a.axisYTick:0,u=[],c=[];if(0==h){if(c.push([i[0],i[3]-5]),c.push([i[0],i[1]]),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([i[0],i[1]])}c.push([i[2]+5,i[1]])}else{var d=Math.abs(i[1]-i[3])/h,p=i[3];c.push([i[0],p-5]);for(var m=0;m<h;m++){if(c.push([i[0],p]),c.push([i[0]-5,p]),c.push([i[0],p]),l){var f=new sa([[i[0],p],[i[2],p]]);f.style={strokeColor:"#cfcfcf",strokeLinecap:"butt",strokeLineJoin:"round",strokeWidth:1},f.clickable=!1,f.hoverable=!1,a.xReferenceLineStyle&&X.copyAttributesWithClip(f.style,a.xReferenceLineStyle),n.push(e.createShape(f))}p+=d}if(c.push([i[0],i[1]]),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([i[0],i[1]])}c.push([i[2]+5,i[1]])}if(a.axisUseArrow){var y=[[i[2]+5,i[1]+4],[i[2]+13,i[1]],[i[2]+5,i[1]-4]],g=[[i[0]-4,i[3]-5],[i[0],i[3]-13],[i[0]+4,i[3]-5]],v=new ra(y);v.style={fillColor:"#008acd"},X.copyAttributesWithClip(v.style,a.axisStyle),o.push(e.createShape(v));var S=new ra(g);if(S.style={fillColor:"#008acd"},X.copyAttributesWithClip(S.style,a.axisStyle),o.push(e.createShape(S)),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){var b=new ra(u);b.style={fillColor:"#008acd"},X.copyAttributesWithClip(b.style,a.axisStyle),o.push(e.createShape(b))}}var x=new sa(c);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},a.axisStyle&&X.copyAttributesWithClip(x.style,a.axisStyle),x.clickable=!1,x.hoverable=!1;var C=[e.createShape(x)],_=[];if(a.axisYLabels&&a.axisYLabels.length&&a.axisYLabels.length>0){var T=a.axisYLabels;let t=T.length;var w=[0,0];if(a.axisYLabelsOffset&&a.axisYLabelsOffset.length&&(w=a.axisYLabelsOffset),1==t){let t=new na(i[0]-5+w[0],i[3]+w[1],T[0]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&X.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,_.push(e.createShape(t))}else for(var E=i[3],M=Math.abs(i[1]-i[3])/(t-1),A=0;A<t;A++){let t=new na(i[0]-5+w[0],E+w[1],T[A]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&X.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,_.push(e.createShape(t)),E+=M}}var P=[];if(a.axisXLabels&&a.axisXLabels.length&&a.axisXLabels.length>0){let t=a.axisXLabels,s=t.length,n=[0,0];if(a.axisXLabelsOffset&&a.axisXLabelsOffset.length&&(n=a.axisXLabelsOffset),r&&r.xPositions&&r.xPositions.length&&r.xPositions.length==s){let o=r.xPositions;for(let r=0;r<s;r++){let s=new na(o[r]+n[0],i[1]+n[1],t[r]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&X.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,P.push(e.createShape(s))}}else if(1==s){let s=new na(i[0]-5+n[0],i[1]+n[0],t[0]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&X.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,P.push(e.createShape(s))}else{let r=i[0],o=Math.abs(i[2]-i[0])/(s-1);for(let l=0;l<s;l++){let s=new na(r+n[0],i[1]+n[1],t[l]);s.style={labelAlign:"center",labelBaseline:"top"},a.axisXLabelsStyle&&X.copyAttributesWithClip(s.style,a.axisXLabelsStyle),s.clickable=!1,s.hoverable=!1,P.push(e.createShape(s)),r+=o}}}return n.concat(C).concat(_).concat(P).concat(o)}static ShapeStyleTool(e,t,s,r,i,a){var n=e||{};if(t&&X.copyAttributesWithClip(n,t),s&&s.length&&void 0!==i&&!isNaN(i)&&i>=0&&s[i]&&X.copyAttributesWithClip(n,s[i]),r&&r.length&&void 0!==a)for(var o=r,l=o.length,h=parseFloat(a),u=0;u<l;u++)if(o[u].start<=h&&h<o[u].end){X.copyAttributesWithClip(n,o[u].style);break}return n}}i.Feature=i.Feature||{},i.Feature.ShapeFactory=Ta;
  1341. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1342. * This program are made available under the terms of the Apache License, Version 2.0
  1343. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1344. class wa{constructor(e,t){e&&t&&t.map&&t.renderer&&(this.id=X.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=null,this.location=[],this.data=e,this.shapes=[],this.layer=t,this.CLASS_NAME="SuperMap.Feature.Theme")}destroy(){this.data=null,this.id=null,this.lonlat=null,this.location=null,this.shapes=null,this.layer=null}getLocalXY(e){var t=this.layer.map.getResolution(),s=this.layer.map.getExtent();if(e instanceof se||e instanceof ie){return[e.x/t+-s.left/t,s.top/t-e.y/t]}if(e instanceof Q){return[e.lon/t+-s.left/t,s.top/t-e.lat/t]}return null}}i.Feature=i.Feature||{},i.Feature.Theme=wa;
  1345. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1346. * This program are made available under the terms of the Apache License, Version 2.0
  1347. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1348. class Ea extends wa{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.shapeFactory=new Ta,this.shapeParameters=null,this.RelativeCoordinate=!1,this.setting=null,this.origonPoint=null,this.chartBox=null,this.chartBounds=null,this.width=null,this.height=null,this.XOffset=0,this.YOffset=0,this.DVBParameter=null,this.dataViewBox=null,this.DVBCodomain=null,this.DVBCenterPoint=null,this.DVBUnitValue=null,this.DVBOrigonPoint=null,this.DVBWidth=null,this.DVBHeight=null,this.origonPointOffset=null,this.fields=s||[],this.dataValues=null,this.lonlat=i||this.data.geometry.getBounds().getCenterLonLat(),r&&r.width&&r.height&&r.codomain&&(this.setting=r),this.CLASS_NAME="SuperMap.Feature.Theme.Graph"}destroy(){this.shapeFactory=null,this.shapeParameters=null,this.width=null,this.height=null,this.origonPoint=null,this.chartBox=null,this.dataViewBox=null,this.chartBounds=null,this.DVBParameter=null,this.DVBOrigonPoint=null,this.DVBCenterPoint=null,this.DVBWidth=null,this.DVBHeight=null,this.DVBCodomain=null,this.DVBUnitValue=null,this.origonPointOffset=null,this.XOffset=null,this.YOffset=null,this.fields=null,this.dataValues=null,this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;if(!(e.width&&e.height&&e.codomain))return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,s=wa.getDataValues(this.data,this.fields,t);this.dataValues=s||[],this.width=parseFloat(e.width),this.height=parseFloat(e.height),this.DVBCodomain=e.codomain,this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var r=this.width,i=this.height,a=this.location;this.origonPoint=[a[0]-r/2,a[1]-i/2];var n=this.origonPoint;this.chartBox=[n[0],n[1]+i,n[0]+r,n[1]];var o=this.chartBox,l=this.DVBParameter;this.dataViewBox=[o[0]+l[0],o[1]-l[1],o[2]-l[2],o[3]+l[3]];var h=this.dataViewBox;return!(h[0]>=h[2]||h[1]<=h[3])&&(this.DVBOrigonPoint=[h[0],h[3]],this.DVBWidth=Math.abs(h[2]-h[0]),this.DVBHeight=Math.abs(h[1]-h[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-n[0],this.DVBOrigonPoint[1]-n[1]],!0)}resetLocation(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var s=this.width,r=this.height,i=this.location;return this.chartBounds=new K(i[0]-s/2,i[1]+r/2,i[0]+s/2,i[1]-r/2),this.resetLinearGradient(),i}resetLinearGradient(){}shapesConvertToRelativeCoordinate(){for(var e=this.shapes,t=this.location,s=0,r=e.length;s<r;s++){e[s].refOriginalPosition=t;var i=e[s].style;for(var a in i)switch(a){case"pointList":for(var n=i[a],o=0,l=n.length;o<l;o++)n[o][0]-=t[0],n[o][1]-=t[1];break;case"x":i[a]-=t[0];break;case"y":i[a]-=t[1]}}this.RelativeCoordinate=!0}assembleShapes(){}getLocalXY(e){return this.layer.getLocalXY(e)}}wa.getDataValues=function(e,t,s){if(!e.attributes)return!1;for(var r=[],i=e.attributes,a=0;a<t.length;a++)for(var n in i)if(n===t[a])try{!isNaN(s)&&s>=0?r.push(parseFloat(i[n].toString()).toFixed(s)):r.push(parseFloat(i[n].toString()))}catch(e){throw new Error("not a number")}return r.length===t.length&&r},i.Feature.Theme.Graph=Ea;i.Feature.Theme.Bar=
  1349. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1350. * This program are made available under the terms of the Apache License, Version 2.0
  1351. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1352. class extends Ea{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Bar"}destroy(){super.destroy()}assembleShapes(){var e={showShadow:!0,shadowBlur:8,shadowColor:"rgba(100,100,100,0.8)",shadowOffsetX:2,shadowOffsetY:2},t=this.setting;if(t.barLinearGradient||(t.barLinearGradient=[["#00FF00","#00CD00"],["#00CCFF","#5E87A2"],["#00FF66","#669985"],["#CCFF00","#94A25E"],["#FF9900","#A2945E"]]),t.dataViewBoxParameter||(void 0===t.useAxis||t.useAxis?t.dataViewBoxParameter=[45,15,15,15]:t.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.dataViewBox,i=this.dataValues;if(!(i.length<1)){for(let e=0,t=i.length;e<t;e++)if(i[e]<s[0]||i[e]>s[1])return;var a=this.calculateXShapeInfo();if(a){var n=a.xPositions,o=a.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,r,t,a)));for(var l=0;l<i.length;l++){var h=r[1]-(i[l]-s[0])/this.DVBUnitValue,u=[[n[l]-o/2,r[1]-1],[n[l]+o/2,r[1]-1],[n[l]+o/2,h],[n[l]-o/2,h]],c=new ra(u);if(void 0===t.showShadow||t.showShadow){if(t.barShadowStyle){var d=t.barShadowStyle;d.shadowBlur&&(e.shadowBlur=d.shadowBlur),d.shadowColor&&(e.shadowColor=d.shadowColor),d.shadowOffsetX&&(e.shadowOffsetX=d.shadowOffsetX),d.shadowOffsetY&&(e.shadowOffsetY=d.shadowOffsetY)}c.style={},X.copyAttributesWithClip(c.style,e)}c.refDataID=this.data.id,c.dataInfo={field:this.fields[l],value:i[l]},void 0!==t.barHoverAble&&(c.hoverable=t.barHoverAble),void 0!==t.barClickAble&&(c.clickable=t.barClickAble),this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=0,n=this.DVBWidth;if(s.xShapeBlank&&s.xShapeBlank.length&&3==s.xShapeBlank.length){var o=n-((e=s.xShapeBlank)[0]+e[2]+(r-1)*e[1]);if(o<=r)return null;a=o/r}else e=[a=n/(2*r+1),a,a];for(var l=0,h=0;h<r;h++)0==h?l=e[0]+a/2:l+=a+e[1],i.push(t[0]+l);return{xPositions:i,width:a}}resetLinearGradient(){if(this.RelativeCoordinate)for(var e=this.shapes.length,t=this.setting.barLinearGradient,s=-1,r=0;r<e;r++){var i=this.shapes[r];if("SuperMap.LevelRenderer.Shape.SmicPolygon"===i.CLASS_NAME){var a=i.style,n=this.location[0]+a.pointList[0][0],o=this.location[0]+a.pointList[1][0];++s>=t.length&&(s%=t.length);var l=t[s][0],h=t[s][1],u=(new Wi).getLinearGradient(n,0,o,0,[[0,l],[1,h]]);i.style.color=u}}}};i.Feature.Theme.Bar3D=
  1353. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1354. * This program are made available under the terms of the Apache License, Version 2.0
  1355. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1356. class extends Ea{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Bar3D"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,25,20,20]:e.dataViewBoxParameter=[5,5,5,5]),e.axisUseArrow=void 0===e.axisUseArrow||e.axisUseArrow,e.axisXLabelsOffset=void 0!==e.axisXLabelsOffset?e.axisXLabelsOffset:[-10,10],this.initBaseParameter()){var t=this.DVBCodomain;this.DVBUnitValue=(t[1]-t[0])/this.DVBHeight;var s=this.dataViewBox,r=this.dataValues;if(!(r.length<1)){for(let e=0,s=r.length;e<s;e++)if(r[e]<t[0]||r[e]>t[1])return;var i=this.calculateXShapeInfo();if(i){var a=i.xPositions,n=i.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,e)),(!e.axis3DParameter||isNaN(e.axis3DParameter)||e.axis3DParameter<15)&&(e.axis3DParameter=20),(void 0===e.useAxis||e.useAxis)&&(this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,s,e,i)));var o=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10;for(let i=0;i<r.length;i++){var l=s[1]-(r[i]-t[0])/this.DVBUnitValue,h=a[i]-n/2,u=a[i]+n/2,c=[[h,l],[u,l],[u-o,l+o],[h-o,l+o]],d=[[u,l],[u-o,l+o],[u-o,s[1]+o],[u,s[1]]],p=[[h-o,s[1]+o],[u-o,s[1]+o],[u-o,l+o],[h-o,l+o]];o<=0&&(p=[[h,s[1]],[u,s[1]],[u,l],[h,l]]);var m=new ra(c),f=new ra(d),y=new ra(p);e.barSideStyle=e.barSideStyle?e.barSideStyle:e.barFaceStyle,e.barSideStyleByFields=e.barSideStyleByFields?e.barSideStyleByFields:e.barFaceStyleByFields,e.barSideStyleByCodomain=e.barSideStyleByCodomain?e.barSideStyleByCodomain:e.barFaceStyleByCodomain,e.barTopStyle=e.barTopStyle?e.barTopStyle:e.barFaceStyle,e.barTopStyleByFields=e.barTopStyleByFields?e.barTopStyleByFields:e.barFaceStyleByFields,e.barTopStyleByCodomain=e.barTopStyleByCodomain?e.barTopStyleByCodomain:e.barFaceStyleByCodomain,y.style=Ta.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barFaceStyle,e.barFaceStyleByFields,e.barFaceStyleByCodomain,i,r[i]),f.style=Ta.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barSideStyle,e.barSideStyleByFields,e.barSideStyleByCodomain,i,r[i]),m.style=Ta.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barTopStyle,e.barTopStyleByFields,e.barTopStyleByCodomain,i,r[i]),e.barSideHoverStyle=e.barSideHoverStyle?e.barSideHoverStyle:e.barFaceHoverStyle,e.barTopHoverStyle=e.barTopHoverStyle?e.barTopHoverStyle:e.barFaceHoverStyle,y.highlightStyle=Ta.ShapeStyleTool({stroke:!0},e.barFaceHoverStyle),f.highlightStyle=Ta.ShapeStyleTool({stroke:!0},e.barSideHoverStyle),m.highlightStyle=Ta.ShapeStyleTool({stroke:!0},e.barTopHoverStyle),m.refDataID=f.refDataID=y.refDataID=this.data.id,m.isHoverByRefDataID=f.isHoverByRefDataID=y.isHoverByRefDataID=!0,m.refDataHoverGroup=f.refDataHoverGroup=y.refDataHoverGroup=X.createUniqueID("lr_shg"),m.dataInfo=f.dataInfo=y.dataInfo={field:this.fields[i],value:r[i]},void 0!==e.barHoverAble&&(m.hoverable=f.hoverable=y.hoverable=e.barHoverAble),void 0!==e.barClickAble&&(m.clickable=f.clickable=y.clickable=e.barClickAble),this.shapes.push(this.shapeFactory.createShape(f)),this.shapes.push(this.shapeFactory.createShape(m)),this.shapes.push(this.shapeFactory.createShape(y))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=0,n=this.DVBWidth;if(s.xShapeBlank&&s.xShapeBlank.length&&3==s.xShapeBlank.length){var o=n-((e=s.xShapeBlank)[0]+e[2]+(r-1)*e[1]);if(o<=r)return null;a=o/r}else e=[a=n/(2*r+1),a,a];for(var l=0,h=0;h<r;h++)0==h?l=e[0]+a/2:l+=a+e[1],i.push(t[0]+l);return{xPositions:i,width:a}}};
  1357. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1358. * This program are made available under the terms of the Apache License, Version 2.0
  1359. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1360. class Ma extends Ea{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.setting=null,r&&r.codomain&&(this.setting=r,this.DVBCodomain=this.setting.codomain),this.CLASS_NAME="SuperMap.Feature.Theme.RankSymbol"}destroy(){this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;e.XOffset&&(this.XOffset=e.XOffset),e.YOffset&&(this.YOffset=e.YOffset),this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var t=this.width,s=this.height,r=this.location;this.origonPoint=[r[0]-t/2,r[1]-s/2];var i=this.origonPoint;this.chartBox=[i[0],i[1]+s,i[0]+t,i[1]];var a=this.chartBox,n=this.DVBParameter;this.dataViewBox=[a[0]+n[0],a[1]-n[1],a[2]-n[2],a[3]+n[3]];var o=this.dataViewBox;return!(o[0]>=o[2]||o[1]<=o[3])&&(this.DVBOrigonPoint=[o[0],o[3]],this.DVBWidth=Math.abs(o[2]-o[0]),this.DVBHeight=Math.abs(o[1]-o[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-i[0],this.DVBOrigonPoint[1]-i[1]],!0)}}i.Feature.Theme.RankSymbol=Ma;i.Feature.Theme.Circle=
  1361. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1362. * This program are made available under the terms of the Apache License, Version 2.0
  1363. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1364. class extends Ma{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Circle"}destroy(){super.destroy()}assembleShapes(){if(!this.setting)return!1;var e=this.setting;if(!e.codomain)return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,s=wa.getDataValues(this.data,this.fields,t);this.dataValues=s||[];var r=this.dataValues;e.maxR||(e.maxR=100),e.minR||(e.minR=0);var i=this.DVBCodomain;i&&i[1]-i[0]>0?this.DVBUnitValue=e.maxR/(i[1]-i[0]):this.DVBUnitValue=e.maxR;var a=this.DVBUnitValue,n=r[0]*a+e.minR;if(this.width=2*n,this.height=2*n,this.initBaseParameter()&&(!i||!(r[0]<i[0]||r[0]>i[1]))){var o=this.DVBCenterPoint,l=new la(o[0],o[1],n);l.style=Ta.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=Ta.ShapeStyleTool(null,e.circleHoverStyle),void 0!==e.circleHoverAble&&(l.hoverable=e.circleHoverAble),void 0!==e.circleClickAble&&(l.clickable=e.circleClickAble),l.refDataID=this.data.id,l.dataInfo={field:this.fields[0],r:n,value:r[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}};i.Feature.Theme.Line=
  1365. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1366. * This program are made available under the terms of the Apache License, Version 2.0
  1367. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1368. class extends Ea{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.CLASS_NAME="SuperMap.Feature.Theme.Line"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.DVBUnitValue,i=this.dataValues;if(!(i.length<1)){var a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,t,e,a));for(var h=[],u=[],c=0,d=i.length;c<d;c++){if(i[c]<s[0]||i[c]>s[1])return null;n=l[c],o=t[1]-(i[c]-s[0])/r;var p=new ta(n,o);p.style=Ta.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,c,i[c]),p.highlightStyle=Ta.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(p.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(p.clickable=e.pointClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:i[c]},u.push(this.shapeFactory.createShape(p));var m=[n,o];h.push(m)}var f=new sa(h);f.style=Ta.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),f.clickable=!1,f.hoverable=!1;var y=this.shapeFactory.createShape(f);this.shapes.push(y),this.shapes=this.shapes.concat(u),this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=this.DVBWidth,n=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=a-((e=s.xShapeBlank)[0]+e[1]);if(o<=r)return null;n=o/(r-1)}else e=[n=a/(r+1),n,n];for(var l=0,h=0;h<r;h++)0==h?l=e[0]:l+=n,i.push(t[0]+l);return{xPositions:i,width:0}}};i.Feature.Theme.Pie=
  1369. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1370. * This program are made available under the terms of the Apache License, Version 2.0
  1371. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1372. class extends Ea{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Pie"}destroy(){super.destroy()}assembleShapes(){var e=this.setting,t=[{fillColor:"#ff9277"},{fillColor:"#dddd00"},{fillColor:"#ffc877"},{fillColor:"#bbe3ff"},{fillColor:"#d5ffbb"},{fillColor:"#bbbbff"},{fillColor:"#ddb000"},{fillColor:"#b0dd00"},{fillColor:"#e2bbff"},{fillColor:"#ffbbe3"},{fillColor:"#ff7777"},{fillColor:"#ff9900"},{fillColor:"#83dd00"},{fillColor:"#77e3ff"},{fillColor:"#778fff"},{fillColor:"#c877ff"},{fillColor:"#ff77ab"},{fillColor:"#ff6600"},{fillColor:"#aa8800"},{fillColor:"#77c7ff"},{fillColor:"#ad77ff"},{fillColor:"#ff77ff"},{fillColor:"#dd0083"},{fillColor:"#777700"},{fillColor:"#00aa00"},{fillColor:"#0088aa"},{fillColor:"#8400dd"},{fillColor:"#aa0088"},{fillColor:"#dd0000"},{fillColor:"#772e00"}];if(this.initBaseParameter()){e.useBackground&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,e));var s=this.dataValues;if(!(s.length<1)){var r=this.DVBCodomain;for(let e=0;e<s.length;e++)if(s[e]<r[0]||s[e]>r[1])return;var i=0;for(let e=0;e<s.length;e++)i+=Math.abs(s[e]);this.DVBUnitValue=360/i;for(var a=this.DVBUnitValue,n=this.DVBCenterPoint,o=0,l=0,h=o,u=this.DVBHeight<this.DVBWidth?this.DVBHeight/2:this.DVBWidth/2,c=0;c<s.length;c++){var d=Math.abs(s[c]);(l=0===c?o+d*a:c===d.length-1?h:o+d*a)-o>=360&&(l=359.9999999);var p=new aa(n[0],n[1],u,o,l);if(void 0===e.sectorStyleByFields){var m=c%t.length;p.style=Ta.ShapeStyleTool(null,e.sectorStyle,t,null,m)}else p.style=Ta.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,c,s[c]);p.highlightStyle=Ta.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(p.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(p.clickable=e.sectorClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:s[c]},this.shapes.push(this.shapeFactory.createShape(p)),o=l}this.shapesConvertToRelativeCoordinate()}}}};i.Feature.Theme.Point=
  1373. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1374. * This program are made available under the terms of the Apache License, Version 2.0
  1375. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1376. class extends Ea{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),this.CLASS_NAME="SuperMap.Feature.Theme.Point"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.DVBUnitValue,i=this.dataValues,a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,t,e,a));for(var h=0,u=i.length;h<u;h++){if(i[h]<s[0]||i[h]>s[1])return null;n=l[h],o=t[1]-(i[h]-s[0])/r;var c=new ta(n,o);c.style=Ta.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,h,i[h]),c.highlightStyle=Ta.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(c.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(c.clickable=e.pointClickAble),c.refDataID=this.data.id,c.dataInfo={field:this.fields[h],value:i[h]},this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=this.DVBWidth,n=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=a-((e=s.xShapeBlank)[0]+e[1]);if(o<=r)return null;n=o/(r-1)}else e=[n=a/(r+1),n,n];for(var l=0,h=0;h<r;h++)0==h?l=e[0]:l+=n,i.push(t[0]+l);return{xPositions:i,width:0}}};i.Feature.Theme.Ring=
  1377. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1378. * This program are made available under the terms of the Apache License, Version 2.0
  1379. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1380. class extends Ea{constructor(e,t,s,r,i){super(e,t,s,r,i),this.CLASS_NAME="SuperMap.Feature.Theme.Ring"}destroy(){super.destroy()}assembleShapes(){if(this.initBaseParameter()){var e=[{fillColor:"#ff9277"},{fillColor:"#dddd00"},{fillColor:"#ffc877"},{fillColor:"#bbe3ff"},{fillColor:"#d5ffbb"},{fillColor:"#bbbbff"},{fillColor:"#ddb000"},{fillColor:"#b0dd00"},{fillColor:"#e2bbff"},{fillColor:"#ffbbe3"},{fillColor:"#ff7777"},{fillColor:"#ff9900"},{fillColor:"#83dd00"},{fillColor:"#77e3ff"},{fillColor:"#778fff"},{fillColor:"#c877ff"},{fillColor:"#ff77ab"},{fillColor:"#ff6600"},{fillColor:"#aa8800"},{fillColor:"#77c7ff"},{fillColor:"#ad77ff"},{fillColor:"#ff77ff"},{fillColor:"#dd0083"},{fillColor:"#777700"},{fillColor:"#00aa00"},{fillColor:"#0088aa"},{fillColor:"#8400dd"},{fillColor:"#aa0088"},{fillColor:"#dd0000"},{fillColor:"#772e00"}],t=this.setting;t.useBackground&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,t));var s=this.dataValues;if(!(s.length<1)){var r=this.DVBCodomain;for(let e=0;e<s.length;e++)if(s[e]<r[0]||s[e]>r[1])return;var i=0;for(let e=0;e<s.length;e++)i+=Math.abs(s[e]);this.DVBUnitValue=360/i;for(var a=this.DVBUnitValue,n=this.DVBCenterPoint,o=0,l=0,h=o,u=this.DVBHeight<this.DVBWidth?this.DVBHeight/2:this.DVBWidth/2,c=t.innerRingRadius>=0&&t.innerRingRadius<u,d=void 0!==t.innerRingRadius&&!isNaN(t.innerRingRadius)&&c?t.innerRingRadius:0,p=0;p<s.length;p++){var m=Math.abs(s[p]);l=0===p?o+m*a:p===m.length-1?h:o+m*a;var f=new aa(n[0],n[1],u,o,l,d);if(void 0===t.sectorStyleByFields){var y=p%e.length;f.style=Ta.ShapeStyleTool(null,t.sectorStyle,e,null,y)}else f.style=Ta.ShapeStyleTool(null,t.sectorStyle,t.sectorStyleByFields,t.sectorStyleByCodomain,p,s[p]);f.highlightStyle=Ta.ShapeStyleTool(null,t.sectorHoverStyle),void 0!==t.sectorHoverAble&&(f.hoverable=t.sectorHoverAble),void 0!==t.sectorClickAble&&(f.clickable=t.sectorClickAble),f.refDataID=this.data.id,f.dataInfo={field:this.fields[p],value:s[p]},this.shapes.push(this.shapeFactory.createShape(f)),o=l}this.shapesConvertToRelativeCoordinate()}}}};
  1381. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1382. * This program are made available under the terms of the Apache License, Version 2.0
  1383. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1384. class Aa extends wa{constructor(e,t,s,r,i){if(super(e,t),e.geometry&&e.geometry instanceof Z){this.dataBounds=e.geometry.getBounds(),this.nodesClipPixel=2,this.isHoverAble=!0,this.isMultiHover=!0,this.isClickAble=!0,this.highlightStyle=null,this.shapeOptions={},this.style=s||{},this.CLASS_NAME="SuperMap.Feature.Theme.Vector",this.style=s||{},r&&X.copyAttributesWithClip(this,r,["shapeOptions","dataBounds"]),i&&X.copyAttributesWithClip(this.shapeOptions,i);var a=e.geometry;this.lonlat=this.dataBounds.getCenterLonLat(),this.location=this.getLocalXY(this.lonlat),a instanceof ae?this.lineToTF(a):a instanceof re?this.lineToTF(a):a instanceof te||(a instanceof ee?this.multiPointToTF(a):a instanceof ne?this.multiLineStringToTF(a):a instanceof oe?this.multiPolygonToTF(a):a instanceof le?this.polygonToTF(a):a instanceof $||(a instanceof se?this.pointToTF(a):a instanceof he?this.rectangleToTF(a):a instanceof ie&&this.geoTextToTF(a)))}}destroy(){this.style=null,this.dataBounds=null,this.nodesClipPixel=null,this.isHoverAble=null,this.isMultiHover=null,this.isClickAble=null,this.highlightStyle=null,this.shapeOptions=null,super.destroy()}lineToTF(e){for(var t=e.components,s=[],r=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(r=[],s=this.getLocalXY(l),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var h=a[a.length-1];if(Math.abs(h[0]-r[0])<=n&&Math.abs(h[1]-r[1])<=n)continue}a.push(r)}if(a.length<2)return null;var u=new Object;(u=X.copyAttributesWithClip(u,this.style,["pointList"])).pointList=a;var c=new ba({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=this.location,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&X.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}multiPointToTF(e){for(var t=e.components,s=[],r=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(r=[],s=this.getLocalXY(l),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var h=a[a.length-1];if(Math.abs(h[0]-r[0])<=n&&Math.abs(h[1]-r[1])<=n)continue}a.push(r);var u=new Object;u.r=6,(u=X.copyAttributesWithClip(u,this.style)).x=r[0],u.y=r[1];var c=new ya({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=i,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&X.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}}multiLineStringToTF(e){for(var t=e.components,s=0;s<t.length;s++){var r=t[s];this.lineToTF(r)}}multiPolygonToTF(e){for(var t=e.components,s=0;s<t.length;s++){var r=t[s];this.polygonToTF(r)}}pointToTF(e){var t=this.location,s=this.getLocalXY(e),r=new Object;r.r=6,(r=X.copyAttributesWithClip(r,this.style)).x=s[0]-t[0],r.y=s[1]-t[1];var i=new ya({style:r,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(i.highlightStyle=this.highlightStyle),i.refOriginalPosition=t,i.refDataID=this.data.id,i.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&X.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}polygonToTF(e){for(var t=e.components,s=[],r=[],i=this.location,a=[],n=[],o=[],l=this.nodesClipPixel,h=0;h<t.length;h++){var u=t[h].components;if(0===h){a=[];for(var c=0;c<u.length;c++){if(r=[],s=this.getLocalXY(u[c]),r[0]=s[0]-i[0],r[1]=s[1]-i[1],a.length>0){var d=a[a.length-1];if(Math.abs(d[0]-r[0])<=l&&Math.abs(d[1]-r[1])<=l)continue}a.push(r)}}else{n=[];for(var p=0;p<u.length;p++){if(r=[],s=this.getLocalXY(u[p]),r[0]=s[0]-i[0],r[1]=s[1]-i[1],n.length>0){var m=n[n.length-1];if(Math.abs(m[0]-r[0])<=l&&Math.abs(m[1]-r[1])<=l)continue}n.push(r)}}n.length<2||o.push(n)}if(!(a.length<2)){var f={};(f=X.copyAttributesWithClip(f,this.style,["pointList"])).pointList=a;var y=new Sa({style:f,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(y.highlightStyle=this.highlightStyle),y.refOriginalPosition=this.location,y.refDataID=this.data.id,y.isHoverByRefDataID=this.isMultiHover,o.length>0&&(y.holePolygonPointLists=o),this.shapeOptions&&X.copyAttributesWithClip(y,this.shapeOptions),this.shapes.push(y)}}rectangleToTF(e){var t=this.location,s=new Q(e.x,e.y),r=this.layer.map.getResolution(),i=this.getLocalXY(s),a=new Object;a.r=6,(a=X.copyAttributesWithClip(a,this.style)).x=i[0]-t[0],a.y=i[1]-t[1]-2*e.width/r,a.width=e.width/r,a.height=e.height/r;var n=new Ca({style:a,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(n.highlightStyle=this.highlightStyle),n.refOriginalPosition=t,n.refDataID=this.data.id,n.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&X.copyAttributesWithClip(n,this.shapeOptions),this.shapes.push(n)}geoTextToTF(e){var t=this.location,s=this.getLocalXY(e),r=new Object;r.r=6,(r=X.copyAttributesWithClip(r,this.style,["x","y","text"])).x=s[0]-t[0],r.y=s[1]-t[1],r.text=e.text;var i=new ga({style:r,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(i.highlightStyle=this.highlightStyle),i.refOriginalPosition=t,i.refDataID=this.data.id,i.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&X.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}updateAndAddShapes(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,s=0,r=this.shapes.length;s<r;s++){var i=this.shapes[s];i.refOriginalPosition=e,t.addShape(i)}}getShapesCount(){return this.shapes.length}getLocalXY(e){return this.layer.getLocalXY(e)}}i.Feature.Theme.ThemeVector=Aa;
  1385. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1386. * This program are made available under the terms of the Apache License, Version 2.0
  1387. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1388. class Pa extends(i.mixin(ha,ma)){constructor(e){super(e),e=e||{},this.id=null,this.type="group",this.clipShape=null,this._children=[],this._storage=null,this.__dirty=!0,this.ignore=!1,X.extend(this,e),this.id=this.id||X.createUniqueID("smShapeGroup_"),this.CLASS_NAME="SuperMap.LevelRenderer.Group"}destroy(){this.id=null,this.type=null,this.clipShape=null,this._children=null,this._storage=null,this.__dirty=null,this.ignore=null,super.destroy()}children(){return this._children.slice()}childAt(e){return this._children[e]}addChild(e){e!=this&&e.parent!=this&&(e.parent&&e.parent.removeChild(e),this._children.push(e),e.parent=this,this._storage&&this._storage!==e._storage&&(this._storage.addToMap(e),e instanceof Pa&&e.addChildrenToStorage(this._storage)))}removeChild(e){var t=X.indexOf(this._children,e);this._children.splice(t,1),e.parent=null,this._storage&&(this._storage.delFromMap(e.id),e instanceof Pa&&e.delChildrenFromStorage(this._storage))}eachChild(e,t){for(var s=!!t,r=0;r<this._children.length;r++){var i=this._children[r];s?e.call(t,i):e(i)}}traverse(e,t){for(var s=!!t,r=0;r<this._children.length;r++){var i=this._children[r];s?e.call(t,i):e(i),"group"===i.type&&i.traverse(e,t)}}addChildrenToStorage(e){for(var t=0;t<this._children.length;t++){var s=this._children[t];e.addToMap(s),"group"===s.type&&s.addChildrenToStorage(e)}}delChildrenFromStorage(e){for(var t=0;t<this._children.length;t++){var s=this._children[t];e.delFromMap(s.id),"group"===s.type&&s.delChildrenFromStorage(e)}}modSelf(){this.__dirty=!0}}
  1389. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1390. * This program are made available under the terms of the Apache License, Version 2.0
  1391. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1392. class Oa{constructor(){this._elements={},this._hoverElements=[],this._roots=[],this._shapeList=[],this._shapeListOffset=0,this.CLASS_NAME="SuperMap.LevelRenderer.Storage"}destroy(){this.dispose(),this._shapeList=null,this._shapeListOffset=null}iterShape(e,t){if(!t){t={hover:!1,normal:"down",update:!1}}if(t.hover)for(var s=0,r=this._hoverElements.length;s<r;s++){var i=this._hoverElements[s];if(i.updateTransform(),e(i))return this}switch(t.update&&this.updateShapeList(),t.normal){case"down":{let t=this._shapeList.length;for(;t--;)if(e(this._shapeList[t]))return this;break}default:for(let t=0,s=this._shapeList.length;t<s;t++)if(e(this._shapeList[t]))return this}return this}getHoverShapes(e){var t=[],s=this._hoverElements.length;for(let e=0;e<s;e++){t.push(this._hoverElements[e]);var r=this._hoverElements[e].hoverConnect;if(r)for(var i,a=0,n=(r=r instanceof Array?r:[r]).length;a<n;a++)(i=r[a].id?r[a]:this.get(r[a]))&&t.push(i)}if(t.sort(Oa.shapeCompareFunc),e)for(let e=0,s=t.length;e<s;e++)t[e].updateTransform();return t}getShapeList(e){return e&&this.updateShapeList(),this._shapeList}updateShapeList(){this._shapeListOffset=0;var e=this._roots.length;for(let t=0;t<e;t++){let e=this._roots[t];this._updateAndAddShape(e)}this._shapeList.length=this._shapeListOffset;var t=this._shapeList.length;for(let e=0;e<t;e++)this._shapeList[e].__renderidx=e;this._shapeList.sort(Oa.shapeCompareFunc)}_updateAndAddShape(e,t){if(!e.ignore)if(e.updateTransform(),"group"==e.type){e.clipShape&&(e.clipShape.parent=e,e.clipShape.updateTransform(),t?(t=t.slice()).push(e.clipShape):t=[e.clipShape]);for(var s=0;s<e._children.length;s++){var r=e._children[s];r.__dirty=e.__dirty||r.__dirty,this._updateAndAddShape(r,t)}e.__dirty=!1}else e.__clipShapes=t,this._shapeList[this._shapeListOffset++]=e}mod(e,t){var s=this._elements[e];if(s&&(s.modSelf(),t))if(t.parent||t._storage||t.__startClip){var r={};for(var i in t)"parent"!=i&&"_storage"!=i&&"__startClip"!=i&&t.hasOwnProperty(i)&&(r[i]=t[i]);(new qi).merge(s,r,!0)}else(new qi).merge(s,t,!0);return this}drift(e,t,s){var r=this._elements[e];return r&&(r.needTransform=!0,"horizontal"===r.draggable?s=0:"vertical"===r.draggable&&(t=0),(!r.ondrift||r.ondrift&&!r.ondrift(t,s))&&r.drift(t,s)),this}addHover(e){return e.updateNeedTransform(),this._hoverElements.push(e),this}delHover(){return this._hoverElements=[],this}hasHoverShape(){return this._hoverElements.length>0}addRoot(e){e instanceof Pa&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}delRoot(e){if(void 0===e){for(var t=0;t<this._roots.length;t++){var s=this._roots[t];s instanceof Pa&&s.delChildrenFromStorage(this)}return this._elements={},this._hoverElements=[],void(this._roots=[])}if(e instanceof Array){var r=e.length;for(let t=0;t<r;t++)this.delRoot(e[t])}else{var i;i="string"==typeof e?this._elements[e]:e;var a=(new qi).indexOf(this._roots,i);a>=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof Pa&&i.delChildrenFromStorage(this))}}addToMap(e){return e instanceof Pa&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}get(e){return this._elements[e]}delFromMap(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof Pa&&(t._storage=null)),this}dispose(){this._elements=null,this._roots=null,this._hoverElements=null}static shapeCompareFunc(e,t){return e.zlevel==t.zlevel?e.z==t.z?e.__renderidx-t.__renderidx:e.z-t.z:e.zlevel-t.zlevel}}
  1393. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1394. * This program are made available under the terms of the Apache License, Version 2.0
  1395. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1396. class La{constructor(e,t){this.root=e,this.storage=t,this._domRoot=null,this._layers={},this._zlevelList=[],this._layerConfig={},this._bgDom=null,this.shapeToImage=null,La.devicePixelRatio=Math.max(window.devicePixelRatio||1,1),this.CLASS_NAME="SuperMap.LevelRenderer.Painter",this.root.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var s=document.createElement("div");this._domRoot=s,s.style.position="relative",s.style.overflow="hidden",s.style.width=this._width+"px",s.style.height=this._height+"px",this.root.appendChild(s),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=La.createDom(X.createUniqueID("SuperMap.Theme_background_"),"div",this),s.appendChild(this._bgDom),this._bgDom.onselectstart=a,this._bgDom.style["-webkit-user-select"]="none",this._bgDom.style["user-select"]="none",this._bgDom.style["-webkit-touch-callout"]="none";var r=new Ia(X.createUniqueID("_highLightLayer_"),this);this._layers.hover=r,s.appendChild(r.dom),r.initContext(),r.dom.onselectstart=a,r.dom.style["-webkit-user-select"]="none",r.dom.style["user-select"]="none",r.dom.style["-webkit-touch-callout"]="none";var i=this;function a(){return!1}this.updatePainter=function(e,t){i.refreshShapes(e,t)}}destroy(){this.dispose(),this._zlevelList=null,this._layerConfig=null,this._bgDom=null,this.shapeToImage=null}render(e){return this.refresh(e,!0),this}refresh(e,t){var s=this.storage.getShapeList(!0);return this._paintList(s,t),"function"==typeof e&&e(),this}_paintList(e,t){var s,r,i;for(var a in void 0===t&&(t=!1),this._updateLayerStatus(e),this._layers)"hover"!==a&&(this._layers[a].unusedCount++,this._layers[a].updateTransform());for(var n=[],o=0,l=e.length;o<l;o++){var h=e[o];if(r!==h.zlevel&&(s&&s.needTransform&&i.restore(),i=(s=this.getLayer(h.zlevel)).ctx,r=h.zlevel,s.unusedCount=0,(s.dirty||t)&&s.clear(),s.needTransform&&(i.save(),s.setTransform(i))),i&&h.__startClip){var u=h.__startClip;if(i.save(),u.needTransform){let e=u.transform;pa.Util_matrix.invert(n,e),i.transform(e[0],e[1],e[2],e[3],e[4],e[5])}if(i.beginPath(),u.buildPath(i,u.style),i.clip(),u.needTransform){let e=n;i.transform(e[0],e[1],e[2],e[3],e[4],e[5])}}if((s&&s.dirty||t)&&!h.invisible&&(!h.onbrush||h.onbrush&&!h.onbrush(i,!1)))if(da.catchBrushException)try{h.brush(i,!1,this.updatePainter)}catch(e){pa.Util_log(e,"brush error of "+h.type,h)}else h.brush(i,!1,this.updatePainter);i&&h.__stopClip&&i.restore(),h.__dirty=!1}i&&s&&s.needTransform&&i.restore();for(let e in this._layers)if("hover"!==e){var c=this._layers[e];c.dirty=!1,1==c.unusedCount&&c.clear()}}getLayer(e){var t=this._layers[e];if(!t){var s=this._zlevelList.length,r=null,i=-1;if(s>0&&e>this._zlevelList[0]){for(i=0;i<s-1&&!(this._zlevelList[i]<e&&this._zlevelList[i+1]>e);i++);r=this._layers[this._zlevelList[i]]}this._zlevelList.splice(i+1,0,e),t=new Ia(X.createUniqueID("_levelLayer_"+e),this);var a=r?r.dom:this._bgDom;a.nextSibling?a.parentNode.insertBefore(t.dom,a.nextSibling):a.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new qi).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}getLayers(){return this._layers}_updateLayerStatus(e){var t=this._layers,s={};for(let e in t)"hover"!==e&&(s[e]=t[e].elCount,t[e].elCount=0);for(let s=0;s<e.length;s++){var r=e[s],i=t[r.zlevel];if(i){if(i.elCount++,i.dirty)continue;i.dirty=r.__dirty}}for(let e in t)"hover"!==e&&s[e]!==t[e].elCount&&(t[e].dirty=!0)}refreshShapes(e,t){for(var s=0,r=e.length;s<r;s++){var i=e[s];this.storage.mod(i.id)}return this.refresh(t),this}clear(){for(var e in this._layers)"hover"!=e&&this._layers[e].clear();return this}modLayer(e,t){if(t){this._layerConfig[e]?(new qi).merge(this._layerConfig[e],t,!0):this._layerConfig[e]=t;var s=this._layers[e];s&&(new qi).merge(s,this._layerConfig[e],!0)}}delLayer(e){var t=this._layers[e];t&&(this.modLayer(e,{position:t.position,rotation:t.rotation,scale:t.scale}),t.dom.parentNode.removeChild(t.dom),delete this._layers[e],this._zlevelList.splice((new qi).indexOf(this._zlevelList,e),1))}refreshHover(){this.clearHover();for(var e=this.storage.getHoverShapes(!0),t=0,s=e.length;t<s;t++)this._brushHover(e[t]);return this.storage.delHover(),this}clearHover(){var e=this._layers.hover;return e&&e.clear(),this}resize(){var e=this._domRoot;e.style.display="none";var t=this._getWidth(),s=this._getHeight();if(e.style.display="",this._width!=t||s!=this._height){for(var r in this._width=t,this._height=s,e.style.width=t+"px",e.style.height=s+"px",this._layers)this._layers[r].resize(t,s);this.refresh(null,!0)}return this}clearLayer(e){var t=this._layers[e];t&&t.clear()}dispose(){this.root.innerHTML="",this.root=null,this.storage=null,this._domRoot=null,this._layers=null}getDomHover(){return this._layers.hover.dom}toDataURL(e,t,s){var r=La.createDom(X.createUniqueID("SuperMap.Theme.image_"),"canvas",this);this._bgDom.appendChild(r);var i=r.getContext("2d");1!=La.devicePixelRatio&&i.scale(La.devicePixelRatio,La.devicePixelRatio),i.fillStyle=t||"#fff",i.rect(0,0,this._width*La.devicePixelRatio,this._height*La.devicePixelRatio),i.fill();var a=this;this.storage.iterShape(function(e){if(!e.invisible&&(!e.onbrush||e.onbrush&&!e.onbrush(i,!1)))if(da.catchBrushException)try{e.brush(i,!1,a.updatePainter)}catch(t){pa.Util_log(t,"brush error of "+e.type,e)}else e.brush(i,!1,a.updatePainter)},{normal:"up",update:!0});var n=r.toDataURL(e,s);return i=null,this._bgDom.removeChild(r),n}getWidth(){return this._width}getHeight(){return this._height}_getWidth(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientWidth||parseInt(t.width,10))-parseInt(t.paddingLeft,10)-parseInt(t.paddingRight,10)).toFixed(0)-0}_getHeight(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientHeight||parseInt(t.height,10))-parseInt(t.paddingTop,10)-parseInt(t.paddingBottom,10)).toFixed(0)-0}_brushHover(e){var t=this._layers.hover.ctx;if(!e.onbrush||e.onbrush&&!e.onbrush(t,!0)){var s=this.getLayer(e.zlevel);if(s.needTransform&&(t.save(),s.setTransform(t)),da.catchBrushException)try{e.brush(t,!0,this.updatePainter)}catch(t){pa.Util_log(t,"hoverBrush error of "+e.type,e)}else e.brush(t,!0,this.updatePainter);s.needTransform&&t.restore()}}_shapeToImage(e,t,s,r,i){var a=document.createElement("canvas"),n=a.getContext("2d"),o=i||window.devicePixelRatio||1;a.style.width=s+"px",a.style.height=r+"px",a.setAttribute("width",s*o),a.setAttribute("height",r*o),n.clearRect(0,0,s*o,r*o);var l={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[0,0,0],t.rotation=0,t.scale=[1,1],t&&t.brush(n,!1);var h=new xa({id:e,style:{x:0,y:0,image:a}});return null!=l.position&&(h.position=t.position=l.position),null!=l.rotation&&(h.rotation=t.rotation=l.rotation),null!=l.scale&&(h.scale=t.scale=l.scale),h}_createShapeToImageProcessor(){var e=this;return function(t,s,r,i){return e._shapeToImage(t,s,r,i,La.devicePixelRatio)}}updateHoverLayer(e){if(!(e instanceof Array))return this;this.clearHover(),this.storage.delHover();for(var t=0;t<e.length;t++)this.storage.addHover(e[t]),this._brushHover(e[t])}static createDom(e,t,s){var r=document.createElement(t),i=s._width,a=s._height;return r.style.position="absolute",r.style.left=0,r.style.top=0,r.style.width=i+"px",r.style.height=a+"px",r.setAttribute("width",i*La.devicePixelRatio),r.setAttribute("height",a*La.devicePixelRatio),r.setAttribute("id",e),r}}class Ia extends ma{constructor(e,t){super(e,t),this.dom=null,this.domBack=null,this.ctxBack=null,this.painter=t,this.unusedCount=0,this.config=null,this.dirty=!0,this.elCount=0,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.zoomable=!1,this.panable=!1,this.maxZoom=1/0,this.minZoom=0,this.ctx=null,this.dom=La.createDom(X.createUniqueID("SuperMap.Theme"+e),"canvas",t),this.dom.onselectstart=function(){return!1},this.dom.style["-webkit-user-select"]="none",this.dom.style["user-select"]="none",this.dom.style["-webkit-touch-callout"]="none",this.CLASS_NAME="SuperMap.LevelRenderer.Painter.Layer"}destroy(){this.dom=null,this.domBack=null,this.ctxBack=null,this.painter=null,this.unusedCount=null,this.config=null,this.dirty=null,this.elCount=null,this.clearColor=null,this.motionBlur=null,this.lastFrameAlpha=null,this.zoomable=null,this.panable=null,this.maxZoom=null,this.minZoom=null,this.ctx=null,ma.destroy.apply(this,arguments)}initContext(){this.ctx=this.dom.getContext("2d"),1!=La.devicePixelRatio&&this.ctx.scale(La.devicePixelRatio,La.devicePixelRatio)}createBackBuffer(){this.domBack=La.createDom(X.createUniqueID("SuperMap.Theme.back-"+this.id),"canvas",this.painter),this.ctxBack=this.domBack.getContext("2d"),1!=La.devicePixelRatio&&this.ctxBack.scale(La.devicePixelRatio,La.devicePixelRatio)}resize(e,t){this.dom.style.width=e+"px",this.dom.style.height=t+"px",this.dom.setAttribute("width",e*La.devicePixelRatio),this.dom.setAttribute("height",t*La.devicePixelRatio),1!=La.devicePixelRatio&&this.ctx.scale(La.devicePixelRatio,La.devicePixelRatio),this.domBack&&(this.domBack.setAttribute("width",e*La.devicePixelRatio),this.domBack.setAttribute("height",t*La.devicePixelRatio),1!=La.devicePixelRatio&&this.ctxBack.scale(La.devicePixelRatio,La.devicePixelRatio))}clear(){var e=this.dom,t=this.ctx,s=e.width,r=e.height,i=this.clearColor,a=this.motionBlur,n=this.lastFrameAlpha;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,s/La.devicePixelRatio,r/La.devicePixelRatio)),i?(t.save(),t.fillStyle=this.config.clearColor,t.fillRect(0,0,s/La.devicePixelRatio,r/La.devicePixelRatio),t.restore()):t.clearRect(0,0,s/La.devicePixelRatio,r/La.devicePixelRatio),a){var o=this.domBack;t.save(),t.globalAlpha=n,t.drawImage(o,0,0,s/La.devicePixelRatio,r/La.devicePixelRatio),t.restore()}}}
  1397. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1398. * This program are made available under the terms of the Apache License, Version 2.0
  1399. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1400. class Na extends ha{constructor(e,t,s){var r,i;super(e,t,s),this.root=e,this.storage=t,this.painter=s,this._lastX=0,this._lastY=0,this._mouseX=0,this._mouseY=0,this._findHover=null,this._domHover=null,this._findHover=(r=function(e,t,s){var r=this;if(r._draggingTarget&&r._draggingTarget.id==e.id||e.isSilent())return!1;var i=r._event;if(e.isCover(t,s)){if(e.hoverable)if(e.isHoverByRefDataID&&!0===e.isHoverByRefDataID){if(e.refDataID){var a=e.refDataID,n=null;e.refDataHoverGroup&&(n=e.refDataHoverGroup);for(var o=r.storage._shapeList,l=0,h=o.length;l<h;l++){var u=o[l];u.refDataID&&a===u.refDataID&&(n?u.refDataHoverGroup&&n===u.refDataHoverGroup&&r.storage.addHover(u):r.storage.addHover(u))}}}else r.storage.addHover(e);for(var c=e.parent;c;){if(c.clipShape&&!c.clipShape.isCover(r._mouseX,r._mouseY))return!1;c=c.parent}return r._lastHover!=e&&(r._processOutShape(i),r._processDragLeave(i),r._lastHover=e,r._processDragEnter(i)),r._processOverShape(i),r._processDragOver(i),r._hasfound=1,!0}return!1},i=this,function(e,t,s){return r.call(i,e,t,s)}),this._domHover=s.getDomHover(),this.CLASS_NAME="SuperMap.LevelRenderer.Handler";var a={resize:function(e){e=e||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(da.EVENT.RESIZE,e)},click:function(e){e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<10&&this._dispatchAgency(t,da.EVENT.CLICK,e),this._mousemoveHandler(e)},dblclick:function(e){e=e||window.event,e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<5&&this._dispatchAgency(t,da.EVENT.DBLCLICK,e),this._mousemoveHandler(e)},mousewheel:function(e){var t=((e=this._zrenderEventFixed(e)).wheelDelta||-e.detail)>0?1.1:1/1.1,s=this.painter.getLayers(),r=!1;for(var i in s)if("hover"!==i){var a=s[i],n=a.position;if(a.zoomable){a.__zoom=a.__zoom||1;var o=a.__zoom;o*=t,t=(o=Math.max(Math.min(a.maxZoom,o),a.minZoom))/a.__zoom,a.__zoom=o,n[0]-=(this._mouseX-n[0])*(t-1),n[1]-=(this._mouseY-n[1])*(t-1),a.scale[0]*=t,a.scale[1]*=t,a.dirty=!0,r=!0}}r&&this.painter.refresh(),this._dispatchAgency(this._lastHover,da.EVENT.MOUSEWHEEL,e),this._mousemoveHandler(e)},mousemove:function(e){this._clickThreshold++,e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=pa.Util_event.getX(e),this._mouseY=pa.Util_event.getY(e);var t=this._mouseX-this._lastX,s=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var r="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,s),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var i=this.painter.getLayers(),a=!1;for(var n in i)if("hover"!==n){var o=i[n];o.panable&&(r="move",o.position[0]+=t,o.position[1]+=s,a=!0,o.dirty=!0)}a&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?r="move":this._hasfound&&this._lastHover.clickable&&(r="pointer"),this.root.style.cursor=r,this._dispatchAgency(this._lastHover,da.EVENT.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()},mouseout:function(e){var t=(e=this._zrenderEventFixed(e)).toElement||e.relatedTarget;if(t!=this.root)for(;t&&9!=t.nodeType;){if(t==this.root)return void this._mousemoveHandler(e);t=t.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.refreshHover(),this.dispatch(da.EVENT.GLOBALOUT,e)},mousedown:function(e){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=e.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,da.EVENT.MOUSEDOWN,e),this._lastDownButton=e.button},mouseup:function(e){e=this._zrenderEventFixed(e),this.root.style.cursor="",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,da.EVENT.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e)},touchstart:function(e){e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobildFindFixed(e),this._mousedownHandler(e)},touchmove:function(e){e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&pa.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment<da.EVENT.touchClickDelay&&(this._mobildFindFixed(e),this._clickHandler(e),t-this._lastClickMoment<da.EVENT.touchClickDelay/2&&(this._dblclickHandler(e),this._lastHover&&this._lastHover.clickable&&pa.Util_event.stop(e)),this._lastClickMoment=t),this.painter.clearHover()}};function n(e,t){return function(s){return e.call(t,s)}}!function(e){var t=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],s=t.length;for(;s--;){var r=t[s];e["_"+r+"Handler"]=n(a[r],e)}}(this),window.addEventListener?(window.addEventListener("resize",this._resizeHandler),pa.Util_env.os.tablet||pa.Util_env.os.phone?(e.addEventListener("touchstart",this._touchstartHandler),e.addEventListener("touchmove",this._touchmoveHandler),e.addEventListener("touchend",this._touchendHandler)):(e.addEventListener("click",this._clickHandler),e.addEventListener("dblclick",this._dblclickHandler),e.addEventListener("mousewheel",this._mousewheelHandler),e.addEventListener("mousemove",this._mousemoveHandler),e.addEventListener("mousedown",this._mousedownHandler),e.addEventListener("mouseup",this._mouseupHandler)),e.addEventListener("DOMMouseScroll",this._mousewheelHandler),e.addEventListener("mouseout",this._mouseoutHandler)):(window.attachEvent("onresize",this._resizeHandler),e.attachEvent("onclick",this._clickHandler),e.ondblclick=this._dblclickHandler,e.attachEvent("onmousewheel",this._mousewheelHandler),e.attachEvent("onmousemove",this._mousemoveHandler),e.attachEvent("onmouseout",this._mouseoutHandler),e.attachEvent("onmousedown",this._mousedownHandler),e.attachEvent("onmouseup",this._mouseupHandler))}destroy(){this.dispose(),this._lastX=null,this._lastY=null,this._mouseX=null,this._mouseY=null,this._findHover=null,ha.prototype.destroy.apply(this,arguments)}on(e,t){return this.bind(e,t),this}un(e,t){return this.unbind(e,t),this}trigger(e,t){var s=da.EVENT;switch(e){case s.RESIZE:case s.CLICK:case s.DBLCLICK:case s.MOUSEWHEEL:case s.MOUSEMOVE:case s.MOUSEDOWN:case s.MOUSEUP:case s.MOUSEOUT:this["_"+e+"Handler"](t)}}dispose(){var e=this.root;window.removeEventListener?(window.removeEventListener("resize",this._resizeHandler),pa.Util_env.os.tablet||pa.Util_env.os.phone?(e.removeEventListener("touchstart",this._touchstartHandler),e.removeEventListener("touchmove",this._touchmoveHandler),e.removeEventListener("touchend",this._touchendHandler)):(e.removeEventListener("click",this._clickHandler),e.removeEventListener("dblclick",this._dblclickHandler),e.removeEventListener("mousewheel",this._mousewheelHandler),e.removeEventListener("mousemove",this._mousemoveHandler),e.removeEventListener("mousedown",this._mousedownHandler),e.removeEventListener("mouseup",this._mouseupHandler)),e.removeEventListener("DOMMouseScroll",this._mousewheelHandler),e.removeEventListener("mouseout",this._mouseoutHandler)):(window.detachEvent("onresize",this._resizeHandler),e.detachEvent("onclick",this._clickHandler),e.detachEvent("dblclick",this._dblclickHandler),e.detachEvent("onmousewheel",this._mousewheelHandler),e.detachEvent("onmousemove",this._mousemoveHandler),e.detachEvent("onmouseout",this._mouseoutHandler),e.detachEvent("onmousedown",this._mousedownHandler),e.detachEvent("onmouseup",this._mouseupHandler)),this.root=null,this._domHover=null,this.storage=null,this.painter=null,this.un()}_processDragStart(e){var t=this._lastHover;if(this._isMouseDown&&t&&t.draggable&&!this._draggingTarget&&this._mouseDownTarget==t){if(t.dragEnableTime&&new Date-this._lastMouseDownMoment<t.dragEnableTime)return;var s=t;this._draggingTarget=s,this._isDragging=1,s.invisible=!0,this.storage.mod(s.id),this._dispatchAgency(s,da.EVENT.DRAGSTART,e),this.painter.refresh()}}_processDragEnter(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,da.EVENT.DRAGENTER,e,this._draggingTarget)}_processDragOver(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,da.EVENT.DRAGOVER,e,this._draggingTarget)}_processDragLeave(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,da.EVENT.DRAGLEAVE,e,this._draggingTarget)}_processDrop(e){this._draggingTarget&&(this._draggingTarget.invisible=!1,this.storage.mod(this._draggingTarget.id),this.painter.refresh(),this._dispatchAgency(this._lastHover,da.EVENT.DROP,e,this._draggingTarget))}_processDragEnd(e){this._draggingTarget&&(this._dispatchAgency(this._draggingTarget,da.EVENT.DRAGEND,e),this._lastHover=null),this._isDragging=0,this._draggingTarget=null}_processOverShape(e){this._dispatchAgency(this._lastHover,da.EVENT.MOUSEOVER,e)}_processOutShape(e){this._dispatchAgency(this._lastHover,da.EVENT.MOUSEOUT,e)}_dispatchAgency(e,t,s,r){var i="on"+t,a={type:t,event:s,target:e,cancelBubble:!1},n=e;for(r&&(a.dragged=r);n&&(n[i]&&(a.cancelBubble=n[i](a)),n.dispatch(t,a),n=n.parent,!a.cancelBubble););e?a.cancelBubble||this.dispatch(t,a):r||this.dispatch(t,{type:t,event:s})}_iterateAndFindHover(){for(var e,t=pa.Util_matrix.create(),s=this.storage.getShapeList(),r=[0,0],i=s.length-1;i>=0;i--){var a=s[i];if(void 0!==a.zlevel&&(e=this.painter.getLayer(a.zlevel,e),r[0]=this._mouseX,r[1]=this._mouseY,e.needTransform&&(pa.Util_matrix.invert(t,e.transform),pa.Util_vector.applyTransform(r,r,t))),this._findHover(a,r[0],r[1]))break}}_mobildFindFixed(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var s=0;!this._lastHover&&s<t.length;s++){var r=t[s];r.x&&(this._mouseX+=r.x),r.y&&(this._mouseX+=r.y),this._iterateAndFindHover()}this._lastHover&&(e.zrenderX=this._mouseX,e.zrenderY=this._mouseY)}_zrenderEventFixed(e,t){if(e.zrenderFixed)return e;if(t){var s="touchend"!=e.type?e.targetTouches[0]:e.changedTouches[0];if(s){var r=this.root.getBoundingClientRect();e.zrenderX=s.clientX-r.left,e.zrenderY=s.clientY-r.top}}else{var i=(e=e||window.event).toElement||e.relatedTarget||e.srcElement||e.target;i&&i!=this._domHover&&(e.zrenderX=(void 0!==e.offsetX?e.offsetX:e.layerX)+i.offsetLeft,e.zrenderY=(void 0!==e.offsetY?e.offsetY:e.layerY)+i.offsetTop)}return e.zrenderFixed=1,e}getLastHoverOne(){return this._lastHover?this._lastHover:null}}
  1401. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1402. * This program are made available under the terms of the Apache License, Version 2.0
  1403. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1404. class Ra{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Animation.easing"}destroy(){}Linear(e){return e}QuadraticIn(e){return e*e}QuadraticOut(e){return e*(2-e)}QuadraticInOut(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}CubicIn(e){return e*e*e}CubicOut(e){return--e*e*e+1}CubicInOut(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}QuarticIn(e){return e*e*e*e}QuarticOut(e){return 1- --e*e*e*e}QuarticInOut(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}QuinticIn(e){return e*e*e*e*e}QuinticOut(e){return--e*e*e*e*e+1}QuinticInOut(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}SinusoidalIn(e){return 1-Math.cos(e*Math.PI/2)}SinusoidalOut(e){return Math.sin(e*Math.PI/2)}SinusoidalInOut(e){return.5*(1-Math.cos(Math.PI*e))}ExponentialIn(e){return 0===e?0:Math.pow(1024,e-1)}ExponentialOut(e){return 1===e?1:1-Math.pow(2,-10*e)}ExponentialInOut(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}CircularIn(e){return 1-Math.sqrt(1-e*e)}CircularOut(e){return Math.sqrt(1- --e*e)}CircularInOut(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}ElasticIn(e){var t,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),-s*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))}ElasticOut(e){var t,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),s*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)}ElasticInOut(e){var t,s=.1;return 0===e?0:1===e?1:(s<1?(s=1,t=.1):t=.4*Math.asin(1/s)/(2*Math.PI),(e*=2)<1?s*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:s*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)}BackIn(e){var t=1.70158;return e*e*((t+1)*e-t)}BackOut(e){var t=1.70158;return--e*e*((t+1)*e+t)+1}BackInOut(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}BounceIn(e){return 1-this.BounceOut(1-e)}BounceOut(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}BounceInOut(e){return e<.5?.5*this.BounceIn(2*e):.5*this.BounceOut(2*e-1)+.5}}
  1405. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1406. * This program are made available under the terms of the Apache License, Version 2.0
  1407. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1408. class Fa{constructor(e){this._targetPool=e.target||{},this._targetPool instanceof Array||(this._targetPool=[this._targetPool]),this._life=e.life||1e3,this._delay=e.delay||0,this._startTime=(new Date).getTime()+this._delay,this._endTime=this._startTime+1e3*this._life,this.loop=void 0!==e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Clip"}destroy(){}step(e){var t=new Ra,s=(e-this._startTime)/this._life;if(!(s<0)){s=Math.min(s,1);var r="string"==typeof this.easing?t[this.easing]:this.easing,i="function"==typeof r?r(s):s;return this.fire("frame",i),1==s?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}}restart(){var e=((new Date).getTime()-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap}fire(e,t){for(var s=0,r=this._targetPool.length;s<r;s++)this["on"+e]&&this["on"+e](this._targetPool[s],t)}}
  1409. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1410. * This program are made available under the terms of the Apache License, Version 2.0
  1411. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1412. class Da extends ha{constructor(e){super(e),e=e||{},this.stage={},this.onframe=function(){},this._clips=[],this._running=!1,this._time=0,X.extend(this,e),this.CLASS_NAME="SuperMap.LevelRenderer.Animation"}add(e){this._clips.push(e)}remove(e){var t=(new qi).indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)}_update(){var e=(new Date).getTime(),t=e-this._time,s=this._clips,r=s.length,i=[],a=[];for(let t=0;t<r;t++){var n=s[t],o=n.step(e);o&&(i.push(o),a.push(n))}this.stage.update&&this.stage.update();for(let e=0;e<r;)s[e]._needsRemove?(s[e]=s[r-1],s.pop(),r--):e++;r=i.length;for(let e=0;e<r;e++)a[e].fire(i[e]);this._time=e,this.onframe(t),this.dispatch("frame",t)}start(){var e=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},t=this;this._running=!0,this._time=(new Date).getTime(),e(function s(){t._running&&(t._update(),e(s))})}stop(){this._running=!1}clear(){this._clips=[]}animate(e,t){var s=new ka(e,(t=t||{}).loop,t.getter,t.setter);return s.animation=this,s}static _interpolateNumber(e,t,s){return(t-e)*s+e}static _interpolateArray(e,t,s,r,i){var a=e.length;if(1==i)for(let i=0;i<a;i++)r[i]=Da._interpolateNumber(e[i],t[i],s);else{var n=e[0].length;for(let i=0;i<a;i++)for(let a=0;a<n;a++)r[i][a]=Da._interpolateNumber(e[i][a],t[i][a],s)}}static _isArrayLike(e){switch(typeof e){case"undefined":case"string":return!1}return void 0!==e.length}static _catmullRomInterpolateArray(e,t,s,r,i,a,n,o,l){var h=e.length;if(1==l)for(let l=0;l<h;l++)o[l]=Da._catmullRomInterpolate(e[l],t[l],s[l],r[l],i,a,n);else{var u=e[0].length;for(let l=0;l<h;l++)for(var c=0;c<u;c++)o[l][c]=Da._catmullRomInterpolate(e[l][c],t[l][c],s[l][c],r[l][c],i,a,n)}}static _catmullRomInterpolate(e,t,s,r,i,a,n){var o=.5*(s-e),l=.5*(r-t);return(2*(t-s)+o+l)*n+(-3*(t-s)-2*o-l)*a+o*i+t}static _cloneValue(e){var t=Array.prototype.slice;if(Da._isArrayLike(e)){var s=e.length;if(Da._isArrayLike(e[0])){for(var r=[],i=0;i<s;i++)r.push(t.call(e[i]));return r}return t.call(e)}return e}static rgba2String(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}}class ka{constructor(e,t,s,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=s||function(e,t){return e[t]},this._setter=r||function(e,t,s){e[t]=s},this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[],this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Animator"}when(e,t){for(var s in t)this._tracks[s]||(this._tracks[s]=[],0!==e&&this._tracks[s].push({time:0,value:Da._cloneValue(this._getter(this._target,s))})),this._tracks[s].push({time:parseInt(e,10),value:t[s]});return this}during(e){return this._onframeList.push(e),this}start(e){var t=this,s=this._setter,r=this._getter,i=t._onframeList.length,a="spline"===e,n=function(){if(t._clipCount--,0===t._clipCount){t._tracks={};for(var e=t._doneList.length,s=0;s<e;s++)t._doneList[s].call(t)}},o=function(o,l){var h=o.length;if(h){var u=o[0].value,c=Da._isArrayLike(u),d=!1,p=c&&Da._isArrayLike(u[0])?2:1;o.sort(function(e,t){return e.time-t.time});var m=o[h-1].time,f=[],y=[];for(let e=0;e<h;e++){f.push(o[e].time/m);var g=o[e].value;"string"==typeof g&&(0===(g=pa.Util_color.toArray(g)).length&&(g[0]=g[1]=g[2]=0,g[3]=1),d=!0),y.push(g)}var v,S,b,x,C,_,T,w=0,E=0;if(d)var M=[0,0,0,0];var A=new Fa({target:t._target,life:m,loop:t._loop,delay:t._delay,onframe:function(e,n){if(n<E){for(v=Math.min(w+1,h-1),S=v;S>=0&&!(f[S]<=n);S--);S=Math.min(S,h-2)}else{for(S=w;S<h&&!(f[S]>n);S++);S=Math.min(S-1,h-2)}w=S,E=n;var o=f[S+1]-f[S];if(0!==o){if(b=(n-f[S])/o,a)if(C=y[S],x=y[0===S?S:S-1],_=y[S>h-2?h-1:S+1],T=y[S>h-3?h-1:S+2],c)Da._catmullRomInterpolateArray(x,C,_,T,b,b*b,b*b*b,r(e,l),p);else{let t;t=d?Da.rgba2String(M):Da._catmullRomInterpolate(x,C,_,T,b,b*b,b*b*b),s(e,l,t)}else if(c)Da._interpolateArray(y[S],y[S+1],b,r(e,l),p);else{let t;d?(Da._interpolateArray(y[S],y[S+1],b,M,1),t=Da.rgba2String(M)):t=Da._interpolateNumber(y[S],y[S+1],b),s(e,l,t)}for(S=0;S<i;S++)t._onframeList[S](e,n)}},ondestroy:n});e&&"spline"!==e&&(A.easing=e),t._clipList.push(A),t._clipCount++,t.animation.add(A)}};for(var l in this._tracks)o(this._tracks[l],l);return this}stop(){for(var e=0;e<this._clipList.length;e++){var t=this._clipList[e];this.animation.remove(t)}this._clipList=[]}delay(e){return this._delay=e,this}done(e){return e&&this._doneList.push(e),this}}
  1413. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1414. * This program are made available under the terms of the Apache License, Version 2.0
  1415. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1416. class Ga{constructor(e,t){this.id=e,this.storage=new Oa,this.painter=new La(t,this.storage),this.handler=new Na(t,this.storage,this.painter),this.animatingElements=[],this.animation=new Da({stage:{update:Ga.getFrameCallback(this)}}),this._needsRefreshNextFrame=!1,this.animation.start(),this.CLASS_NAME="SuperMap.LevelRenderer.Render"}destroy(){this.id=null,this.storage=null,this.painter=null,this.handler=null,this.animatingElements=null,this.animation=null,this._needsRefreshNextFrame=null}getId(){return this.id}addShape(e){return this.storage.addRoot(e),this}addGroup(e){return this.storage.addRoot(e),this}delShape(e){return this.storage.delRoot(e),this}delGroup(e){return this.storage.delRoot(e),this}modShape(e,t){return this.storage.mod(e,t),this}modGroup(e,t){return this.storage.mod(e,t),this}modLayer(e,t){return this.painter.modLayer(e,t),this}addHoverShape(e){return this.storage.addHover(e),this}render(e){return this.painter.render(e),this._needsRefreshNextFrame=!1,this}refresh(e){return this.painter.refresh(e),this._needsRefreshNextFrame=!1,this}refreshNextFrame(){return this._needsRefreshNextFrame=!0,this}refreshHover(e){return this.painter.refreshHover(e),this}refreshShapes(e,t){return this.painter.refreshShapes(e,t),this}resize(){return this.painter.resize(),this}animate(e,t,s){if("string"==typeof e&&(e=this.storage.get(e)),e){var r;if(t){for(var i=t.split("."),a=e,n=0,o=i.length;n<o;n++)a&&(a=a[i[n]]);a&&(r=a)}else r=e;if(!r)return void pa.Util_log('Property "'+t+'" is not existed in element '+e.id);var l=this.animatingElements;return void 0===e.__aniCount&&(e.__aniCount=0),0===e.__aniCount&&l.push(e),e.__aniCount++,this.animation.animate(r,{loop:s}).done(function(){if(e.__aniCount--,0===e.__aniCount){var t=(new qi).indexOf(l,e);l.splice(t,1)}})}pa.Util_log("Element not existed")}clearAnimation(){this.animation.clear()}getWidth(){return this.painter.getWidth()}getHeight(){return this.painter.getHeight()}toDataURL(e,t,s){return this.painter.toDataURL(e,t,s)}shapeToImage(e,t,s){var r=X.createUniqueID("SuperMap.LevelRenderer.ToImage_");return this.painter.shapeToImage(r,e,t,s)}on(e,t){return this.handler.on(e,t),this}un(e,t){return this.handler.un(e,t),this}trigger(e,t){return this.handler.trigger(e,t),this.handler.dispatch(e,t),this}clear(){return this.storage.delRoot(),this.painter.clear(),this}dispose(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=null,this.animatingElements=null,this.storage=null,this.painter=null,this.handler=null}updateHoverShapes(e){return this.painter.updateHoverLayer(e),this}getAllShapes(){return this.storage._shapeList}clearAll(){return this.clear(),this.painter.clearHover(),this}getHoverOne(){return this.handler.getLastHoverOne()}static getFrameCallback(e){return function(){var t=e.animatingElements;if(t instanceof Array){for(var s=0,r=t.length;s<r;s++)e.storage.mod(t[s].id);(t.length||e._needsRefreshNextFrame)&&e.refresh()}}}}
  1417. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1418. * This program are made available under the terms of the Apache License, Version 2.0
  1419. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1420. class Ba{constructor(){Ba._instances={},Ba.Tool={},this.version="2.0.4",this.CLASS_NAME="SuperMap.LevelRenderer"}destroy(){this.dispose(),this.version=null}init(e){var t=new Ga(X.createUniqueID("LRenderer_"),e);return Ba._instances[t.id]=t,t}dispose(e){if(e)e.dispose(),this.delInstance(e.id);else{for(var t in Ba._instances)Ba._instances[t].dispose();Ba._instances={}}return this}getInstance(e){return Ba._instances[e]}delInstance(e){return delete Ba._instances[e],this}}i.LevelRenderer=Ba;
  1421. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1422. * This program are made available under the terms of the Apache License, Version 2.0
  1423. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1424. const Ua="EXCEL",ja="CSV",Va="GEOJSON",Ha="JSON";
  1425. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1426. * This program are made available under the terms of the Apache License, Version 2.0
  1427. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1428. class Ja{constructor(){this._initView()}_initView(){const e=document.createElement("div");e.hidden=!0,e.setAttribute("class","component-messageboxcontainer component-border-bottom-orange");const t=document.createElement("div");t.setAttribute("class","icon"),this.icon=document.createElement("span"),this.icon.setAttribute("class","supermapol-icons-message-warning"),t.appendChild(this.icon),e.appendChild(t);const s=document.createElement("div");s.setAttribute("class","component-messagebox"),s.innerHTML="",e.appendChild(s),this.messageBox=s;const r=document.createElement("div");r.setAttribute("class","component-messagebox__cancelbtncontainer");const i=document.createElement("button");i.setAttribute("class","component-messagebox__cancelBtn"),i.innerHTML="x",i.onclick=this.closeView.bind(this),r.appendChild(i),e.appendChild(r),this.messageBoxContainer=e,document.body.appendChild(this.messageBoxContainer)}closeView(){this.messageBoxContainer.hidden=!0}showView(e,t="warring"){"success"===t?(this.icon.setAttribute("class","supermapol-icons-message-success"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-green")):"failure"===t?(this.icon.setAttribute("class","supermapol-icons-message-failure"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-red")):"warring"===t&&(this.icon.setAttribute("class","supermapol-icons-message-warning"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-orange")),this.messageBox.innerHTML=e,this.messageBoxContainer.hidden=!1}}i.Components.MessageBox=Ja;const za=function(){try{return echarts}catch(e){return{}}}();var qa=s.n(za);
  1429. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1430. * This program are made available under the terms of the Apache License, Version 2.0
  1431. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1432. let Wa={code:null,defaultCode:"en-US",getCode:function(){return i.Lang.code||i.Lang.setCode(),i.Lang.code},setCode:function(){var e=this.getLanguageFromCookie();e?i.Lang.code=e:(e=i.Lang.defaultCode,0===(e="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(e="zh-CN"),0===e.indexOf("en")&&(e="en-US"),i.Lang.code=e)},getLanguageFromCookie(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){for(var s=e[t];" "===s.charAt(0);)s=s.substring(1);if(-1!==s.indexOf("language="))return s.substring("language=".length,s.length)}return""},i18n:function(e){var t=i.Lang[i.Lang.getCode()],s=t&&t[e];return s||(s=e),s}};i.Lang=Wa,i.i18n=i.Lang.i18n;const Ya=function(){try{return XLSX}catch(e){return{}}}();var Xa=s.n(Ya);
  1433. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1434. * This program are made available under the terms of the Apache License, Version 2.0
  1435. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1436. let Qa={rABS:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsBinaryString,rABF:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsArrayBuffer,rAT:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsText,readFile(e,t,s,r,i){Ha===e||Va===e?this.readTextFile(t,s,r,i):Ua!==e&&ja!==e||this.readXLSXFile(t,s,r,i)},readTextFile(e,t,s,r){let i=new FileReader;i.onloadend=function(e){t&&t.call(r,e.target.result)},i.onerror=function(e){s&&s.call(r,e)},this.rAT?i.readAsText(e.file,"utf-8"):i.readAsBinaryString(e.file)},readXLSXFile(e,t,s,r){let i=new FileReader;i.onloadend=function(e){let i=new Uint8Array(e.target.result),a=Xa().read(i,{type:"array"});try{if(a&&a.SheetNames&&a.SheetNames.length>0){let e=a.SheetNames[0],s=Xa().utils.sheet_to_csv(a.Sheets[e]);t&&t.call(r,s)}}catch(e){s&&s.call(r,e)}},i.onerror=function(e){s&&s.call(r,e)},this.rABF&&i.readAsArrayBuffer(e.file)},processDataToGeoJson(e,t,s,r,i){let a=null;if("EXCEL"===e||"CSV"===e)a=this.processExcelDataToGeoJson(t),s&&s.call(i,a);else if("JSON"===e||"GEOJSON"===e){let e=t;"string"==typeof e&&(e=JSON.parse(e)),"ISERVER"===e.type?a=e.data.recordsets[0].features:"FeatureCollection"===e.type?a=e:r&&r.call(i,Wa.i18n("msg_dataInWrongGeoJSONFormat")),s&&s.call(i,a)}else r&&r.call(i,Wa.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson(e){let t=this.string2Csv(e),s=t.colTitles,r=-1,i=-1;for(let e=0,t=s.length;e<t;e++)this.isXField(s[e])&&(r=e),this.isYField(s[e])&&(i=e);let a=[];for(let e=0,s=t.rows.length;e<s;e++){let s=t.rows[e],n=Number(s[r]),o=Number(s[i]),l={};for(let s in t.colTitles){l[t.colTitles[s]]=t.rows[e][s]}let h={type:"Feature",geometry:{type:"Point",coordinates:[n,o]},properties:l};a.push(h)}return a},isXField(e){var t=e.toLowerCase();return"x"===t||"smx"===t||"jd"===t||"经度"===t||"东经"===t||"longitude"===t||"lot"===t||"lon"===t||"lng"===t||"x坐标"===t},isYField(e){var t=e.toLowerCase();return"y"===t||"smy"===t||"wd"===t||"纬度"===t||"北纬"===t||"latitude"===t||"lat"===t||"y坐标"===t},string2Csv(e,t){let s=e.split("\n"),r={};r.colTitles=t?[]:s[0].split(","),r.rows=[];for(let e=t?0:1;e<s.length;e++)s[e]&&r.rows.push(s[e].split(","));return r}};i.Components.FileReaderUtil=Qa;
  1437. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1438. * This program are made available under the terms of the Apache License, Version 2.0
  1439. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1440. class Ka{constructor(e){this.datasets=e,this.EVENT_TYPES=["getdatafailed"],this.events=new de(this,null,this.EVENT_TYPES)}getDatasetInfo(e){let t=this.datasets.url,s=this;Pe.get(t).then(function(e){return e.json()}).then(function(t){if(t.datasetInfo){let r=t.datasetInfo;s.datasetsInfo={dataSourceName:r.dataSourceName,datasetName:r.name,mapName:t.name},e({result:s.datasetsInfo})}}).catch(function(e){console.log(e),s._fireFailedEvent(e)})}getDataFeatures(e,t){let s,r,a,n=e.result,o={name:n.datasetName+"@"+n.dataSourceName};Object.assign(o,this.datasets.queryInfo),s=new i.FilterParameter(o),r=new i.GetFeaturesBySQLParameters({queryParameter:s,datasetNames:[n.dataSourceName+":"+n.datasetName],fromIndex:0,toIndex:1e5}),(a=new i.GetFeaturesBySQLService(n.dataUrl,{eventListeners:{processCompleted:t,processFailed:function(){}}})).processAsync(r)}getLayerFeatures(e,t){let s,r,a,n=e.result,o={name:n.mapName};Object.assign(o,this.datasets.queryInfo),s=new i.FilterParameter(o),r=new i.QueryBySQLParameters({queryParams:[s],expectCount:1e5}),(a=new i.QueryBySQLService(n.dataUrl,{eventListeners:{processCompleted:t,processFailed:function(){}}})).processAsync(r)}getDataInfoByIptl(e){this.getServiceInfo(this.datasets.url,e)}getServiceInfo(e,t){let s=this;Pe.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(r=>{if(!1!==r.succeed)if(r.dataItemServices&&r.dataItemServices.length>0){let i;r.dataItemServices.forEach(r=>{if("RESTDATA"===r.serviceType&&"PUBLISHED"===r.serviceStatus)i=r;else{if("RESTMAP"!==r.serviceType||"PUBLISHED"!==r.serviceStatus)return void s.getDatafromContent(e,t);i=r}}),i&&s.getDatafromRest(i.serviceType,i.address,t)}else s.getDatafromContent(e,t);else s._fireFailedEvent(r)}).catch(e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromContent(e,t){let s={result:{}},r=this;e+="/content.json?pageSize=9999999&currentPage=1",Pe.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(e=>{if(!1!==e.succeed){if(e.type){if("JSON"===e.type||"GEOJSON"===e.type){if(e.content=JSON.parse(e.content.trim()),!e.content.features)return void console.log(Wa.i18n("msg_jsonResolveFiled"));let t=this._formatGeoJSON(e.content);s.result.features={type:e.content.type,features:t}}else if("EXCEL"===e.type||"CSV"===e.type){let t=this._excelData2Feature(e.content);s.result.features={type:"FeatureCollection",features:t}}t(s,"content")}}else r._fireFailedEvent(e)},this).catch(e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromRest(e,t,s){let r=this,i=this.datasets.withCredentials;if("RESTDATA"===e){let e,a,n=`${t}/data/datasources`;Pe.get(n,null,{withCredentials:i}).then(e=>e.json()).then(o=>{e=o.datasourceNames[0],n=`${t}/data/datasources/${e}/datasets`,Pe.get(n,null,{withCredentials:i}).then(e=>e.json()).then(i=>(a=i.datasetNames[0],r.getDatafromRestData(`${t}/data`,[e+":"+a],s),[e+":"+a])).catch(function(e){r._fireFailedEvent(e)})}).catch(function(e){r._fireFailedEvent(e)})}else{let e,a,n,o=`${t}/maps`;Pe.get(o,null,{withCredentials:i}).then(e=>e.json()).then(l=>{e=l[0].name,n=l[0].path,o=o=`${t}/maps/${e}/layers`,Pe.get(o,null,{withCredentials:i}).then(e=>e.json()).then(e=>(a=e[0].subLayers.layers[0].caption,r.getDatafromRestMap(a,n,s),a)).catch(function(e){r._fireFailedEvent(e)})}).catch(function(e){r._fireFailedEvent(e)})}}getDatafromRestData(e,t,s){let r=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,e=>{s(e,"RESTDATA")},e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromRestMap(e,t,s){let r=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,e=>{s(e,"RESTMAP")},e=>{console.log(e),r._fireFailedEvent(e)})}_getFeatureBySQL(e,t,s,r,i){let a,n,o,l={name:t.join().replace(":","@")};Object.assign(l,s),a=new at(l),o=new Ls({queryParameter:a,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(n=new Is(e,{eventListeners:{processCompleted:e=>{r&&r(e)},processFailed:e=>{i&&i(e)}}})).processAsync(o)}_queryFeatureBySQL(e,t,s,r,i,a,n,o,h,u){var c,d,p={name:t};Object.assign(p,s),c=new at(p),r&&(c.fields=r);var m={queryParams:[c]};u&&(m.queryOption=l.ATTRIBUTE),o&&(m.startRecord=o),h&&(m.expectCount=h),i&&(m.prjCoordSys={epsgCode:i}),d=new Dr(m),this._queryBySQL(e,d,e=>{"processCompleted"===e.type?a(e):n(e)})}_queryBySQL(e,t,s,r){new kr(e,{eventListeners:{scope:this,processCompleted:s,processFailed:s},format:this._processFormat(r)}).processAsync(t)}_processFormat(e){return e||a.GEOJSON}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,s=-1,r=-1;for(let e=0,i=t.length;e<i;e++)Qa.isXField(t[e])&&(s=e),Qa.isYField(t[e])&&(r=e);let i=[];for(let t=0,a=e.rows.length;t<a;t++){let a=e.rows[t],n=Number(a[s]),o=Number(a[r]),l={};for(let s in e.colTitles){l[e.colTitles[s]]=e.rows[t][s]}l.index=t+"";let h={type:"Feature",geometry:{type:"Point",coordinates:[n,o]},properties:l};i.push(h)}return i}_fireFailedEvent(e){let t=e?{error:e,message:Wa.i18n("msg_getdatafailed")}:{message:Wa.i18n("msg_getdatafailed")};this.events.triggerEvent("getdatafailed",t)}}
  1441. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1442. * This program are made available under the terms of the Apache License, Version 2.0
  1443. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1444. class Za{constructor(e){this.datasets=e.datasets,this.xField=[],this.yField=[],this.grid={top:"50px",bottom:"50px",left:"50px",right:"60px"},this.chartType=e.type||"bar",this._initXYField(e.chartOptions),this.EVENT_TYPES=["getdatafailed"],this.events=new de(this,null,this.EVENT_TYPES)}_initXYField(e){let t=this;e&&e.length>0&&e.forEach(function(e){e.xAxis&&t.xField.push({field:e.xAxis.field,name:e.xAxis.name}),e.yAxis&&t.yField.push({field:e.yAxis.field,name:e.yAxis.name})})}getDatasetInfo(e){this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new Ka(this.datasets),"iServer"===this.datasets.type?this.chartModel.getDatasetInfo(this._getDatasetInfoSuccess.bind(this)):"iPortal"===this.datasets.type&&this.chartModel.getDataInfoByIptl(this._getDataInfoSuccess.bind(this)),this.chartModel.events.on({getdatafailed:e=>{this.events.triggerEvent("getdatafailed",e)}}))}_getDatasetInfoSuccess(e){let t=this.datasets.url,s=t.indexOf("rest");if(s>0){let r=t.indexOf("/",s+5),i=t.substring(s+5,r),a=t.substring(0,s+4)+"/data";if("maps"===i){let i=t.indexOf("/",r+1),n=t.substring(r+1,i);a=t.substring(0,s+4)+"/maps/"+n,e.result.dataUrl=a,this._getLayerFeatures(e)}else"data"===i&&(e.result.dataUrl=a,this._getDataFeatures(e))}}_getDataInfoSuccess(e,t){let s=this;"RESTMAP"===t?s._getChartDatasFromLayer(e):s._getChartDatas(e)}_getDataFeatures(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}_getLayerFeatures(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}_getChartDatas(e){if(e){this.features=e.result.features;let t=this.features.features,s={};if(t.length){let e=t[0],r=[],i=[];for(let t in e.properties)r.push(t),i.push(this._getDataType(e.properties[t]));s={features:t,fieldCaptions:r,fieldTypes:i,fieldValues:[]};for(let e in i){let r=[];for(let i in t){let a=t[i],n=s.fieldCaptions[e],o=a.properties[n];r.push(o)}s.fieldValues.push(r)}this.createChart(s)}}}_getChartDatasFromLayer(e){if(e.result.recordsets){let t=e.result.recordsets[0],s=t.features.features;this.features=t.features;let r={};if(s.length){r={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]};for(let e in r.fieldCaptions){let t=[];for(let i in s){let a=s[i],n=r.fieldCaptions[e],o=a.properties[n];t.push(o)}r.fieldValues.push(t)}this.createChart(r)}}}_createChartOptions(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}changeType(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}updateData(e,t,s){this.updateChart=s,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}_updateDataSuccess(e){let t=this._createChartOptions(e);this.updateChart(t)}updateChartOptions(e,t){if(this.calculatedData){let s=this.grid,r=this._createChartSeries(this.calculatedData,e),i=[];for(let e in this.calculatedData.XData)i.push({value:this.calculatedData.XData[e].fieldsData});let a={type:"category",name:this.xField[0].name||"X",data:i,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},n={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},o={formatter:"{b0}: {c0}"},l="#404a59";return t&&(t.grid&&(s=t.grid),t.tooltip&&(o=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:s,series:r,xAxis:a,yAxis:n,tooltip:o}}}_createChartDatas(e){let t=0,s=[],r=e.fieldCaptions,i=this;r.forEach(function(e,s){i.xField[0]&&e===i.xField[0].field&&(t=s)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(i.yFieldName=i.yFieldName+","),i.yFieldName=i.yFieldName+e.name,r.forEach(function(t,r){t===e.field&&s.push(r)})});let a=this._getAttrData(e,t),n=[];if(s.length>0)s.forEach(function(t){let s=[];for(let r in e.fieldValues[t])s.push({value:e.fieldValues[t][r]});n.push(s)});else{let e=[],t=[],s=a.length;for(let r=0;r<s;r++){let s=!1;for(let i=0,n=t.length;i<n;i++)if(a[r].fieldsData===t[i].fieldsData){e[i].value++,t[i].recordIndexs.push(r),s=!0;break}s||a[r].fieldsData&&(t.push({fieldsData:a[r].fieldsData,recordIndexs:[r]}),e.push({value:1}))}a=t,n=[e]}return{XData:a,YData:n}}_getAttrData(e,t){0===t&&(this.xField=[{field:e.fieldCaptions[t],name:e.fieldCaptions[t]}]);let s=[];for(let r=0,i=e.fieldValues[t].length;r<i;r++){let i=e.fieldValues[t][r];s.push({recordIndexs:r,fieldsData:i})}return s}_createChartSeries(e,t){let s=[];return e.YData.forEach(function(e){let r=0,i=[];for(let t of e)r=t.value,i.push({value:r});let a={type:t,data:i,name:"y"};s.push(a)}),s}_isDate(e){return/((^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(10|12|0?[13578])([-\/\._])(3[01]|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(11|0?[469])([-\/\._])(30|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(0?2)([-\/\._])(2[0-8]|1[0-9]|0?[1-9])$)|(^([2468][048]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([3579][26]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][13579][26])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][13579][26])([-\/\._])(0?2)([-\/\._])(29)$))/gi.test(e)}_isNumber(e){let t=Number(e);return 0===t||!isNaN(t)}_getDataType(e){if(null!==e&&void 0!==e&&""!==e){if(this._isDate(e))return"DATE";if(this._isNumber(e))return"NUMBER"}return"STRING"}_checkUrl(e){let t;return t=!(""===e||!this._isMatchUrl(e))&&(!/^http[s]?:\/\/localhost/.test(e)&&!/^http[s]?:\/\/127.0.0.1/.test(e))}_isMatchUrl(e){return new RegExp("(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]").test(e)}getStyle(){return{grid:this.grid,tooltip:this.tooltip,backgroundColor:this.backgroundColor}}getFeatures(){return this.features}setStyle(e){return this.updateChartOptions(this.chartType,e)}}i.Components.ChartViewModel=Za;i.Components.Chart=
  1445. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1446. * This program are made available under the terms of the Apache License, Version 2.0
  1447. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1448. class{constructor(e,t){this.domID=e,this.chartType=t.type||"bar",t.datasets.type=t.datasets.type||"iServer",t.datasets.withCredentials=t.datasets.withCredentials||!1,this.viewModel=new Za(t),this._fillDataToView()}onAdd(e){this.addChart=e}_fillDataToView(){let e=new Ja;this.viewModel.getDatasetInfo(this._createChart.bind(this)),this.viewModel.events.on({getdatafailed:t=>{e.showView(t.message)}})}getStyle(){return this.viewModel.getStyle()}getFeatures(){return this.viewModel.getFeatures()}setStyle(e){let t=this.viewModel.setStyle(e);this._updateChart(t)}changeType(e){if(this.chartType!==e){this.chartType=e;let t=this.viewModel.changeType(e);this._updateChart(t)}}updateData(e,t){let s=this;this.viewModel.updateData(e,t,function(e){s._updateChart(e),s.addChart&&s.addChart()})}_createChart(e){this.echart=qa().init(document.getElementById(this.domID),null,{renderer:"canvas"});let t=this.viewModel._createChartOptions(e);this.echart.setOption(t),this.addChart&&this.addChart()}_updateChart(e){this.echart&&(this.echart.clear(),this.echart.setOption(e))}};
  1449. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1450. * This program are made available under the terms of the Apache License, Version 2.0
  1451. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1452. class $a{constructor(e){e=e||{},this.id=e.id?e.id:null,this.rootContainer=null}getElement(){return this.id&&(this.rootContainer.id=this.id),this.rootContainer}_initView(){}showView(){this.rootContainer.hidden=!1}closeView(){this.rootContainer.hidden=!0}}i.Components.TemplateBase=$a;i.Components.CommonContainer=
  1453. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1454. * This program are made available under the terms of the Apache License, Version 2.0
  1455. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1456. class extends $a{constructor(e){super(e);let t=e.title?e.title:"";this._initView(t)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-container");const s=document.createElement("div");s.setAttribute("class","component-title");const r=document.createElement("div");r.innerHTML=e,s.appendChild(r),t.appendChild(s);const i=document.createElement("div");return i.setAttribute("class","component-content"),t.appendChild(i),this.content=i,this.rootContainer=t,t}getContentElement(){return this.content}appendContent(e){this.content.appendChild(e)}};i.Components.Select=
  1457. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1458. * This program are made available under the terms of the Apache License, Version 2.0
  1459. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1460. class extends $a{constructor(e){super(e),this._initView(e)}_initView(e){let t=this._createElement("div","component-selecttool");e.labelName&&(this._createElement("label","component-selecttool__lable--describe",t).innerHTML=e.labelName);let s=this._createElement("div","component-selecttool--chart",t);s.setAttribute("tabindex","1");let r=this._createElement("div","component-selecttool__name",s);r.title=e.optionsArr[0],r.innerHTML=e.optionsArr[0];let i=this._createElement("div","component-selecttool__trianglebtn--chart",s),a=this._createElement("div","component-triangle-down-img",i),n=this._createElement("div","component-selecttool__content",s),o=this._createElement("div","component-selecttool__content--chart",n),l=this._createElement("div","component-selecttool__scrollarea__content",o);l.setAttribute("tabindex","1"),this.createOptions(l,e.optionsArr),this.optionClickEvent(l,r,e.optionsClickCb),this._selectClickEvent(s,n,a),this.rootContainer=t}createOptions(e,t){for(let s in t){let r=this._createElement("div","component-selecttool__option",e);r.title=t[s],r.innerHTML=t[s]}}_selectClickEvent(e,t,s){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",s.className="component-triangle-down-img"):(t.style.display="block",s.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())},e.onblur=function(){t.style.display="none",s.className="component-triangle-down-img"}}_createElement(e,t,s){let r=document.createElement(e||"div");return t&&(r.className=t),s&&s.appendChild(r),r}optionClickEvent(e,t,s){for(let r=0;r<e.children.length;r++){let i=e.children[r];i.onclick=function(){t.innerHTML=i.innerHTML,t.title=i.title,i.getAttribute("data-value")&&t.setAttribute("data-value",i.getAttribute("data-value")),s&&s(i)}}}};i.Components.DropDownBox=
  1461. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1462. * This program are made available under the terms of the Apache License, Version 2.0
  1463. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1464. class extends $a{constructor(e){super(e),this._initView(e)}_initView(e){let t=document.createElement("div");t.className="component-dropdownbox--container";let s=document.createElement("div");s.setAttribute("tabindex","1"),s.className="component-dropdownbox",t.appendChild(s);let r=document.createElement("div");s.appendChild(r),this._createDropDownOption(e[0],r);let i=document.createElement("div");i.className="component-dropdownbox__triangle-btn",s.appendChild(i);let a=document.createElement("div");a.className="component-triangle-down-img",i.appendChild(a);let n={parentEle:s,dropDownContent:["component-dropdownbox__content component-dropdownbox__content--chart","dropDownContent"],scrollareaContent:"component-selecttool__scrollarea__content",optionsArr:e,triangleBtn:a,dropDownTopContainer:r};this._createDropDownBox(n),this.rootContainer=t}_createDropDownBox(e){let t=e.parentEle,s=e.dropDownTopContainer,r=document.createElement("div");r.className=e.dropDownContent[0],t.appendChild(r);let i=document.createElement("div");i.className=e.scrollareaContent,r.appendChild(i);let a=e.optionsArr;for(let e=0;e<a.length;e++)this._createDropDownOption(a[e],i);let n=e.triangleBtn;this._dropDownClickEvent(t,r,n),this._eleOnblur(t,r,n);let o=i.children;for(let e=0;e<o.length;e++)o[e].onclick=function(){s.innerHTML=o[e].outerHTML}}_createDropDownOption(e,t){let s=document.createElement("div");s.className="component-dropdownbox__item";let r=e;r.dataValue&&s.setAttribute("data-value",r.dataValue),t.appendChild(s);let i=document.createElement("div");i.className="component-dropdownbox__item__img",s.appendChild(i);let a=document.createElement("div");r.icon.className&&(a.className=r.icon.className),r.icon.background&&(a.style.background=r.icon.background),i.appendChild(a);let n=document.createElement("div");n.className="component-dropdownbox__item__title",n.title=r.title,n.innerHTML=r.title,s.appendChild(n);let o=document.createElement("div");o.className="component-dropdownbox__item__remark",o.title=r.remark,o.innerHTML=r.remark,s.appendChild(o)}_dropDownClickEvent(e,t,s){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",s.className="component-triangle-down-img"):(t.style.display="block",s.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())}}_eleOnblur(e,t,s){e.onblur=function(){t.style.display="none",s.className="component-triangle-down-img"}}_createElement(e,t,s){let r=document.createElement(e||"div");return t&&(r.className=t),s&&s.appendChild(r),r}};
  1465. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1466. * This program are made available under the terms of the Apache License, Version 2.0
  1467. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1468. class en extends $a{constructor(e){super(e=e||{}),e.title=e.title?e.title:"",this._initView(e.title)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-popcontainer");const s=document.createElement("div");s.setAttribute("class","component-popcontainer__header");const r=document.createElement("label");r.setAttribute("class","component-popcontainer__header__title"),r.innerHTML=e,s.appendChild(r);const i=document.createElement("span");i.setAttribute("class","supermapol-icons-clear component-popcontainer__header__close"),i.onclick=this.closeView.bind(this),t.appendChild(i),t.appendChild(s);const a=document.createElement("div");a.setAttribute("class","component-popcontainer__content"),this.content=a,t.appendChild(a),this.rootContainer=t}appendContent(e){this.content.appendChild(e)}}i.Components.PopContainer=en;i.Components.AttributesPopContainer=
  1469. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1470. * This program are made available under the terms of the Apache License, Version 2.0
  1471. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1472. class extends en{constructor(e){e.title=e.title?e.title:"属性",super(e),this.rootContainer.firstChild.hidden=!0,e.attributes=e.attributes?e.attributes:[],this._createAttributesTable(e.attributes)}_createAttributesTable(e){const t=document.createElement("table");t.setAttribute("class","component-popcontainer__content__table");const s=document.createElement("tbody");let r=!0;for(let t in e){const i=document.createElement("tr");r&&i.setAttribute("class","component-popcontainer__content__td--color");const a=document.createElement("td"),n=document.createElement("Span");n.innerHTML=t,a.appendChild(n);const o=document.createElement("td");o.innerHTML=e[t],i.appendChild(a),i.appendChild(o),s.appendChild(i),r=!r}t.appendChild(s),this.appendContent(t)}};
  1473. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1474. * This program are made available under the terms of the Apache License, Version 2.0
  1475. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1476. class tn extends $a{constructor(e){super(e),this._initView()}_initView(){const e=document.createElement("div");e.setAttribute("class","component-tabpage");const t=document.createElement("ul");this.header=t;const s=document.createElement("div");s.setAttribute("class","component-tabpage__content"),this.content=s,e.appendChild(t),e.appendChild(s),this.rootContainer=e}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let s=document.createElement("span");s.index=t,s.appendChild(document.createTextNode(e[t].title)),s.onclick=this._changeTabsPage.bind(this);let r=e[t].content;r.index=t,r.hidden=!0,this.header.appendChild(s),this.content.appendChild(r)}this.header.firstChild.setAttribute("class","on"),this.content.firstChild.hidden=!1}removeTab(e){this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}removeAllTabs(){for(let e=this.header.children.length;e>0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e<this.header.children.length;e++)this.header.children[e].setAttribute("class",""),this.content.children[e].hidden=!0,e===t&&(this.header.children[e].setAttribute("class","on"),this.content.children[e].hidden=!1)}}i.Components.IndexTabsPageContainer=tn;i.Components.CityTabsPage=
  1477. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1478. * This program are made available under the terms of the Apache License, Version 2.0
  1479. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1480. class extends tn{constructor(e){super(e),this.rootContainer.classList.add("component-citytabpage--noneBoxShadow"),this.config=e.config,X.isArray(this.config)?(this.header.hidden=!0,this._createCityItem("城市",this.config),this.content.style.border="none"):(this._createTabs(),this.header.onclick=(e=>{for(let e=0;e<this.header.children.length;e++)this.header.children[e].setAttribute("class","");e.target.setAttribute("class","on"),this._createCityContent(e.target.innerHTML)}))}_createTabs(){if(X.isArray(this.config))for(let e=0;e<this.config.length;e++){let t="";for(const s in this.config[e])t+=s;let s=document.createElement("li");s.innerHTML=t,this.header.appendChild(s)}else for(const e in this.config){let t=document.createElement("li");t.innerHTML=e,this.header.appendChild(t)}this.header.firstChild.setAttribute("class","on"),this._createCityContent(this.header.firstChild.innerHTML)}_createCityContent(e){for(let e=this.content.children.length;e>0;e--)this.content.removeChild(this.content.children[e-1]);const t=this.config[e];for(let e in t)this._createCityItem(e,t[e])}_createCityItem(e,t){const s=document.createElement("div"),r=document.createElement("div");r.setAttribute("class","component-citytabpag__py-key"),r.innerHTML=e,s.appendChild(r);const i=document.createElement("div");i.setAttribute("class","component-citytabpag__content");for(let e=0;e<t.length;e++){let s=document.createElement("span");s.innerHTML=t[e],i.appendChild(s)}"HOT"===e&&(i.style.width="428px"),s.appendChild(i),this.content.appendChild(s)}};i.Components.NavTabsPage=
  1481. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1482. * This program are made available under the terms of the Apache License, Version 2.0
  1483. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1484. class extends $a{constructor(e){super(e),this.navTabsTitle=null,this.navTabsContent=null,e.tabs=e.tabs?e.tabs:[],this._initView(e.tabs)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-navtabspage");const s=document.createElement("span");s.setAttribute("class","supermapol-icons-close"),s.onclick=this.closeView.bind(this),t.appendChild(s);const r=document.createElement("div");this.navTabsTitle=r,r.setAttribute("class","component-navtabspage__title"),t.appendChild(r);const i=document.createElement("div");this.navTabsContent=i,i.setAttribute("class","component-navtabspage__content"),t.appendChild(i),e.length>0&&this.appendTabs(e),this.rootContainer=t}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let s=document.createElement("span");s.index=t,s.appendChild(document.createTextNode(e[t].title)),s.onclick=this._changeTabsPage.bind(this);let r=e[t].content;r.index=t,r.hidden=!0,this.navTabsTitle.appendChild(s),this.navTabsContent.appendChild(r)}this.navTabsTitle.firstChild.setAttribute("class","component-navtabspage__tabs--select"),this.navTabsContent.firstChild.hidden=!1}removeTab(e){this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}removeAllTabs(){for(let e=this.navTabsTitle.children.length;e>0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e<this.navTabsTitle.children.length;e++)this.navTabsTitle.children[e].setAttribute("class",""),this.navTabsContent.children[e].hidden=!0,e===t&&(this.navTabsTitle.children[e].setAttribute("class","component-navtabspage__tabs--select"),this.navTabsContent.children[e].hidden=!1)}};i.Components.PaginationContainer=
  1485. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1486. * This program are made available under the terms of the Apache License, Version 2.0
  1487. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1488. class extends $a{constructor(e){super(e=e||{}),this.currentPage=0,this.pageNumberLis=[],this.currentPageNumberLis=[],this.linkageEvent=null,e.contents=e.contents?e.contents:null,e.pageCounts=e.pageCounts?e.pageCounts:0,this._initView(e.contents,e.pageCounts)}setLinkageEvent(e){this.linkageEvent=e}_initView(e,t){const s=document.createElement("div");s.setAttribute("class","component-pagination");const r=document.createElement("div");r.setAttribute("class","component-pagination__content"),s.appendChild(r),this.content=r;const i=document.createElement("ul");i.setAttribute("class","component-pagination__link"),i.onclick=this._changePageEvent.bind(this),s.appendChild(i),this._createLink(i),this.link=i,e&&this.setContent(e),0!==t&&this.setPageLink(t),this.rootContainer=s}setContent(e){this.clearContent(),this.appendContent(e)}appendContent(e){this.content.appendChild(e)}clearContent(){for(let e=this.content.children.length-1;e>=0;e--)this.content.removeChild(this.content.children[e])}setPageLink(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}_createPageLi(e){for(let t=0;t<e;t++){const e=document.createElement("li");e.innerHTML=t+1,this.pageNumberLis.push(e)}if(this.pageNumberLis[0].setAttribute("class","active"),this.currentPage=1,e<5)this.currentPageNumberLis=this.pageNumberLis;else for(let e=0;e<5;e++)this.currentPageNumberLis.push(this.pageNumberLis[e])}_appendPageLink(){for(let e=0;e<this.currentPageNumberLis.length;e++)this.link.insertBefore(this.currentPageNumberLis[e],this.link.childNodes[this.link.children.length-2]);for(let e=0;e<this.currentPageNumberLis.length;e++)this.currentPageNumberLis[e].setAttribute("class",""),Number(this.currentPageNumberLis[e].innerHTML)===this.currentPage&&this.currentPageNumberLis[e].setAttribute("class","active");this._changeDisableState(),this.linkageEvent&&this.linkageEvent(this.currentPage)}clearPageLink(){for(let e=this.link.children.length-3;e>1;e--)this.link.removeChild(this.link.children[e])}_createLink(e){for(let t=0;t<4;t++){const s=document.createElement("li");s.setAttribute("class","disable");const r=document.createElement("span");s.appendChild(r),0===t?(r.id="first",r.setAttribute("class","supermapol-icons-first")):1===t?(r.id="prev",r.setAttribute("class","supermapol-icons-prev")):2===t?(r.id="next",r.setAttribute("class","supermapol-icons-next")):3===t&&(r.id="last",r.setAttribute("class","supermapol-icons-last")),e.appendChild(s)}}_changePageEvent(e){const t=e.target;if("disable"===t.parentElement.classList[0])return;let s;if(t.id)s=t.id;else{if(!Number(t.innerHTML))return;s=Number(t.innerHTML)}this._prePageNum(s),this.clearPageLink(),this._appendPageLink()}_changeDisableState(){this.link.children[0].setAttribute("class",""),this.link.children[1].setAttribute("class",""),this.link.children[this.link.children.length-1].setAttribute("class",""),this.link.children[this.link.children.length-2].setAttribute("class",""),1===this.currentPage&&(this.link.children[0].setAttribute("class","disable"),this.link.children[1].setAttribute("class","disable")),this.currentPage===this.pageNumberLis.length&&(this.link.children[this.link.children.length-1].setAttribute("class","disable"),this.link.children[this.link.children.length-2].setAttribute("class","disable"))}_prePageNum(e){const t=[];if(this.currentPage="first"===e?1:"last"===e?this.pageNumberLis.length:"prev"===e?this.currentPage-1:"next"===e?this.currentPage+1:e,this.pageNumberLis.length<=5)for(let e=0;e<this.pageNumberLis.length;e++)t.push(this.pageNumberLis[e]);else if(this.currentPage<=3)for(let e=0;e<5;e++)t.push(this.pageNumberLis[e]);else if(this.currentPage>=this.pageNumberLis.length-3)for(let e=this.pageNumberLis.length-5;e<this.pageNumberLis.length;e++)t.push(this.pageNumberLis[e]);else for(let e=this.currentPage-3;e<=this.currentPage+1;e++)t.push(this.pageNumberLis[e]);t.length>0&&(this.currentPageNumberLis=t)}};i.Lang["en-US"]={title_dataFlowService:"Data Flow Service",title_distributedAnalysis:"Distributed Analysis",title_clientComputing:"Client Computing",title_dataServiceQuery:"Data Service Query",title_searchCity:"Search city",title_searchLayer:" Search layer",text_input_value_inputDataFlowUrl:"Please enter the data stream service address such as: ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"Display feature information",text_subscribe:"subscribe",text_cancelSubscribe:"unsubscribe",text_densityAnalysis:"Density Analysis",text_CalculateTheValuePerUnitArea:"Calculate the value per unit area within the neighborhood shape",text_option_selectDataset:"Please select a dataset",text_label_dataset:"Dataset",text_option_simplePointDensityAnalysis:"Simple point density analysis",text_option_nuclearDensityAnalysis:"Nuclear density analysis",text_label_analyticalMethod:"Analytical method",text_option_quadrilateral:"Quadrilateral",text_option_hexagon:"hexagon",text_label_meshType:"Mesh type",text_option_notSet:"Not set",text_label_weightField:"Weight field",text_label_gridSizeInMeters:"Grid size",text_label_searchRadius:"Search radius",text_label_queryRange:"Scope of analysis",text_label_areaUnit:"Area unit",text_option_equidistantSegmentation:"Equidistant segmentation",text_option_logarithm:"Logarithm",text_option_equalCountingSegment:"Equal counting segment",text_option_squareRootSegmentation:"Square root segmentation",text_label_thematicMapSegmentationMode:"Thematic map segmentation mode",text_label_thematicMapSegmentationParameters:"Thematic map segmentation parameters",text_option_greenOrangePurpleGradient:"Green orange purple gradient",text_option_greenOrangeRedGradient:"Green orange red gradient",text_option_rainbowGradient:"Rainbow gradient",text_option_spectralGradient:"Spectral gradient",text_option_terrainGradient:"Terrain gradient",text_label_thematicMapColorGradientMode:"Thematic map color gradient mode",text_label_resultLayerName:"Result layer name",text_chooseFile:"Open File",text_isoline:"Isoline",text_extractDiscreteValue:"Extract discrete value generation curve",text_buffer:"Buffer",text_specifyTheDistance:"Specify the distance to create the surrounding area",text_label_analysisLayer:"Analysis layer",text_label_extractField:"Extract field",text_label_extractedValue:"Extracted value",text_label_distanceAttenuation:"Distance attenuation",text_label_gridSize:"gridSize",text_label_bufferRadius:"Buffer radius",text_label_defaultkilometers:"Default 10 kilometers",text_label_kilometer:"kilometer",text_label_unit:"unit",text_retainOriginal:"Retain original object field",text_mergeBuffer:"Merge buffer",text_label_color:"Color",text_label_buffer:"[Buffer]",text_label_isolines:"[Isolines]",text_label_queryRangeTips:"The default is the full range of input data. Example: -74.050, 40.650, -73.850, 40.850",text_label_queryModel:"Query mode",text_label_IDArrayOfFeatures:"ID array of features",text_label_maxFeatures:"The maximum number of features that can be returned",text_label_bufferDistance:"Buffer distance",text_label_queryRange1:"Query range",text_label_spatialQueryMode:"Spatial query mode",text_label_featureFilter:"Feature filter",text_label_geometricObject:"Geometric object",text_label_queryMode:"Query mode",text_label_searchTips:"Search for city locations or layer features",text_label_chooseSearchLayers:"Select a query layer",text_loadSearchCriteria:"Load search criteria",text_saveSearchCriteria:"Save search criteria",btn_analyze:"Analyze",btn_analyzing:"Analyzing",btn_emptyTheAnalysisLayer:"Empty the analysis layer",btn_cancelAnalysis:"Cancel",btn_query:"Query",btn_querying:"Querying",btn_emptyTheRresultLayer:"Clear all result layers","msg_dataReturnedIsEmpty.":"The request is successful and the data returned by the query is empty.",msg_dataFlowServiceHasBeenSubscribed:"The data stream service has been subscribed to.",msg_inputDataFlowUrlFirst:"Please enter the data stream service address first.",msg_datasetOrMethodUnsupport:"This dataset does not support this analysis type. Please reselect the dataset.",msg_selectDataset:"Please select a data set!",msg_setTheWeightField:"Please set the weight field!",msg_theFieldNotSupportAnalysis:"The field you currently select does not support analysis!",msg_resultIsEmpty:"The result of the analysis is empty!",msg_openFileFail:"Failed to open file!",msg_fileTypeUnsupported:"File format is not supported!",msg_fileSizeExceeded:"File size exceeded! The file size should not exceed 10M!",msg_dataInWrongGeoJSONFormat:"Wrong data format! Non standard GEOJSON format data!",msg_dataInWrongFormat:"Wrong data format! Non standard EXCEL, CSV or GEOJSON format data!",msg_searchKeywords:"Search keywords cannot be empty. Please enter your search criteria.",msg_searchGeocodeField:"Did not match the address matching service data!",msg_cityGeocodeField:"The address matching service of the current city is not configured.",msg_getFeatureField:"No related vector features found!",msg_dataflowservicesubscribed:"The data stream service has been subscribed to.",msg_subscribesucceeded:"The data stream service subscription was successful.",msg_crsunsupport:"Does not support the coordinate system of the current map",msg_tilematrixsetunsupport:"Incoming TileMatrixSet is not supported",msg_jsonResolveFiled:"JSON format parsing failure!",msg_requestContentFiled:"Failed to request data through iportal!",msg_getdatafailed:"Failed to get data!"};i.Lang["zh-CN"]={title_dataFlowService:"数据流服务",title_distributedAnalysis:"分布式分析",title_clientComputing:"客户端计算",title_dataServiceQuery:"数据服务查询",title_searchCity:"搜索城市",title_searchLayer:"搜索图层",text_input_value_inputDataFlowUrl:"请输入数据流服务地址如:ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"显示要素信息",text_subscribe:"订阅",text_cancelSubscribe:"取消订阅",text_densityAnalysis:"密度分析",text_CalculateTheValuePerUnitArea:"计算点指定邻域形状内的每单位面积量值",text_option_selectDataset:"请选择数据集",text_label_dataset:"数据集",text_option_simplePointDensityAnalysis:"简单点密度分析",text_option_nuclearDensityAnalysis:"核密度分析",text_label_analyticalMethod:"分析方法",text_option_quadrilateral:"四边形",text_option_hexagon:"六边形",text_label_meshType:"网格面类型",text_option_notSet:"未设置",text_label_weightField:"权重字段",text_label_gridSizeInMeters:"网格大小",text_label_searchRadius:"搜索半径",text_label_queryRange:"分析范围",text_label_areaUnit:"面积单位",text_option_equidistantSegmentation:"等距离分段",text_option_logarithm:"对数",text_option_equalCountingSegment:"等计数分段",text_option_squareRootSegmentation:"平方根分段",text_label_thematicMapSegmentationMode:"专题图分段模式",text_label_thematicMapSegmentationParameters:"专题图分段参数",text_option_greenOrangePurpleGradient:"绿橙紫渐变",text_option_greenOrangeRedGradient:"绿橙红渐变",text_option_rainbowGradient:"彩虹渐变",text_option_spectralGradient:"光谱渐变",text_option_terrainGradient:"地形渐变",text_label_thematicMapColorGradientMode:"专题图颜色渐变模式",text_label_resultLayerName:"结果图层名称",text_chooseFile:"选择文件",text_isoline:"等值线",text_extractDiscreteValue:"提取离散值生成曲线",text_buffer:"缓冲区",text_specifyTheDistance:"指定距离创建周边区域",text_label_analysisLayer:"分析图层",text_label_extractField:"提取字段",text_label_extractedValue:"提取值",text_label_distanceAttenuation:"距离衰减",text_label_gridSize:"栅格大小",text_label_bufferRadius:"缓冲半径",text_label_defaultkilometers:"默认10千米",text_option_kilometer:"千米",text_label_unit:"单位",text_retainOriginal:"保留原对象字段属性",text_mergeBuffer:"合并缓冲区",text_label_color:"颜色",text_label_buffer:"[缓冲区]",text_label_isolines:"[等值线]",text_label_queryRangeTips:"默认为输入数据的全幅范围。范例:-74.050,40.650,-73.850,40.850",text_label_IDArrayOfFeatures:"要素 ID 数组",text_label_maxFeatures:"最多可返回的要素数量",text_label_bufferDistance:"缓冲区距离",text_label_queryRange1:"查询范围",text_label_spatialQueryMode:"空间查询模式",text_label_featureFilter:"要素过滤器",text_label_geometricObject:"几何对象",text_label_queryMode:"查询模式",text_label_searchTips:"搜索城市地点或图层要素",text_label_chooseSearchLayers:"选择查询图层",text_loadSearchCriteria:"加载搜索条件",text_saveSearchCriteria:"保存搜索条件",btn_analyze:"分析",btn_analyzing:"分析中",btn_emptyTheAnalysisLayer:"清空分析图层",btn_cancelAnalysis:"取消",btn_query:"查询",btn_querying:"查询中",btn_emptyTheRresultLayer:"清除所有结果图层",msg_dataFlowServiceHasBeenSubscribed:"已订阅该数据流服务。",msg_inputDataFlowUrlFirst:"请先输入数据流服务地址。",msg_datasetOrMethodUnsupport:"该数据集不支持本分析类型,请重新选择数据集",msg_selectDataset:"请选择数据集!",msg_setTheWeightField:"请设置权重字段!",msg_theFieldNotSupportAnalysis:"您当前选择的字段不支持分析!",msg_resultIsEmpty:"分析的结果为空!",msg_dataReturnedIsEmpty:"请求成功,查询返回的数据为空。",msg_openFileFail:"打开文件失败!",msg_fileTypeUnsupported:"不支持该文件格式!",msg_fileSizeExceeded:"文件大小超限!文件大小不得超过 10M!",msg_dataInWrongGeoJSONFormat:"数据格式错误!非标准的 GEOJSON 格式数据!",msg_dataInWrongFormat:"数据格式错误!非标准的 EXCEL, CSV 或 GEOJSON 格式数据!",msg_searchKeywords:"搜索关键字不能为空,请输入搜索条件。",msg_searchGeocodeField:"未匹配到地址匹配服务数据!",msg_cityGeocodeField:"未配置当前城市的地址匹配服务。",msg_getFeatureField:"未查找到相关矢量要素!",msg_dataflowservicesubscribed:"已订阅该数据流服务。",msg_subscribesucceeded:"数据流服务订阅成功。",msg_crsunsupport:"不支持当前地图的坐标系",msg_tilematrixsetunsupport:"不支持传入的TileMatrixSet",msg_jsonResolveFiled:"json格式解析失败!",msg_requestContentFiled:"通过iportal请求数据失败!",msg_getdatafailed:"获取数据失败!"};
  1489. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1490. * This program are made available under the terms of the Apache License, Version 2.0
  1491. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1492. class sn extends r{constructor(e,t){super(e,t)}getMapInfo(e){var t=this;new xr(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()}getTilesets(e){var t=this;new yi(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}}const rn=ol.control.Control;var an=s.n(rn);
  1493. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1494. * This program are made available under the terms of the Apache License, Version 2.0
  1495. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1496. class nn extends(an()){constructor(e){function t(e,t,s){var r=document.createElement(e);return r.className=t||"",s&&s.appendChild(r),r}function s(e,t,s,r){var i=function(t){if(s)return s.call(r||e,t||window.event)},a=i;return"addEventListener"in e?"mousewheel"===t?e.addEventListener("onwheel"in e?"wheel":"mousewheel",i,!1):"mouseenter"===t||"mouseleave"===t?(i=function(t){t=t||window.event,function(e,t){var s=t.relatedTarget;if(!s)return!0;try{for(;s&&s!==e;)s=s.parentNode}catch(e){return!1}return s!==e}(e,t)&&a(t)},e.addEventListener("mouseenter"===t?"mouseover":"mouseout",i,!1)):e.addEventListener(t,i,!1):"attachEvent"in e&&e.attachEvent("on"+t,i),this}function r(){this._container.classList.add("ol-control-ctv-expanded")}function i(){this._container.classList.remove("ol-control-ctv-expanded")}function a(){var e=this.getVersion();this.tilesVersion(e)}(e=e||{}).title||(e.title="switch tile version"),e.tooltip||(e.tooltip="top"),e.collapsed||(e.collapsed=!0),e.lastText||(e.lastText="-"),e.nextText||(e.nextText="+"),e.ico||(e.ico="V"),"vertical"!==e.orientation&&(e.orientation="horizontal"),e.switch||(e.switch=!0),super(e),this.options=e,this.element=e.element=function(){var n="ol-control-ctv";this._container=t("div",n+" "+n+"-"+e.orientation+" ol-unselectable ol-control"),this._sliderBtn=t("button",n+"-toggle",this._container),this._sliderBtn.setAttribute("title",e.title),this._sliderBtn.innerHTML=e.ico,this._sliderValue=t("p",n+"-value",this._container),this._sliderValue.innerHTML=e.ico,this._sliderValue.setAttribute("title",e.title);this._sliderContent=t("div","ol-ctv-slider-main tooltip",this._container),"vertical"===e.orientation&&"top"===e.tooltip&&(e.tooltip="right");this.tooltip=t("span","tooltip-text tooltip-"+e.tooltip,this._sliderContent),this.tooltip.innerHTML=e.ico,e.switch&&(this._next=t("a","ol-ctv-slider-incdec ol-ctv-slider-next",this._sliderContent),this._next.innerHTML=e.nextText,s(this._next,"click",this.nextTilesVersion,this),this._container.classList.add(n+"-incdec"));this._sliderContainer=t("div","ol-ctv-slider-container",this._sliderContent),this.slider=t("input","ol-ctv-slider",this._sliderContainer),this.min=null==this.min||isNaN(this.min)?0:parseInt(this.min),this.slider.setAttribute("title",e.title),this.slider.setAttribute("id","slider"),this.slider.setAttribute("type","range"),this.slider.setAttribute("min",this.min),this.slider.setAttribute("max",0),this.slider.setAttribute("step",1),this.slider.setAttribute("value",0),this.firstLoad=!0,"oninput"in this.slider||"onchange"in this.slider?s(this.slider,"change",a,this):this.slider.onpropertychange=a;e.switch&&(this._last=t("a","ol-ctv-slider-incdec ol-ctv-slider-last",this._sliderContent),this._last.innerHTML=e.lastText,s(this._last,"click",this.lastTilesVersion,this));"vertical"==e.orientation?(this.slider.style.width="170px",this._sliderContainer.style.height="170px"):this._sliderContainer.style.width="150px";s(this._container,"click",function(e){e.preventDefault(),e.stopPropagation()},this),e.collapsed?(s(this._container,"mouseenter",r,this),s(this._container,"mouseleave",i,this),s(this._sliderBtn,"click",function(e){e.preventDefault(),e.stopPropagation()}),s(this._sliderBtn,"click",r,this),s(this._sliderBtn,"focus",r,this)):r();return this._container}.call(this),e.layer&&this.setLayer(e.layer)}setContent(e){var t=e||{};this.setVersionName(t.desc).setToolTip(t.desc)}setVersionName(e){var t=e;return e||(t=this.getValue()),this._sliderValue.innerHTML=t,this}setToolTip(e){return this.tooltip.innerHTML=e,this}updateLength(e){e>0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))}setLayer(e){e&&(this.options.layer=e);var t=this,s=t.options.layer;s.on("tilesetsinfoloaded",function(e){var s=e.value&&e.value.tileVersions;t.update(s)}),s.on("tileversionschanged",function(e){var s=e.value&&e.value.tileVersion;t.setContent(s)}),t.getTileSetsInfo()}update(e){this.tileVersions=e,this.updateLength(this.tileVersions.length)}getTileSetsInfo(){var e=this;e.options.layer&&new sn(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})}removeLayer(){this.options.layer=null}nextTilesVersion(){return this.firstLoad?(this.options.layer.nextTilesVersion(),this.firstLoad=!1,this):parseInt(this.slider.value)>this.max-1?this:(this.slider.value=parseInt(this.slider.value)+1,this.options.layer.nextTilesVersion(),this)}lastTilesVersion(){return parseInt(this.slider.value)<this.min+1?this:(this.slider.value=parseInt(this.slider.value)-1,this.options.layer.lastTilesVersion(),this)}tilesVersion(e){for(var t=this.options.layer,s=this.tileVersions,r=s.length,i=0;i<r;i++)if(s[i].name==e){t.updateCurrentTileSetsIndex(i),t.changeTilesVersion();break}}getValue(){return this.slider.value}getVersion(){var e=this.tileVersions[this.getValue()];return e&&e.name}}const on=ol.control.ScaleLine;var ln=s.n(on);const hn=ol.proj,un=ol.AssertionError;var cn=s.n(un);
  1497. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1498. * This program are made available under the terms of the Apache License, Version 2.0
  1499. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1500. class dn extends(ln()){constructor(e){(e=e||{}).render=function(e){var t=e.frameState;this.viewState_=t?t.viewState:null,this.updateElementRepair()},super(e)}updateElementRepair(){const e=this.viewState_||this.o;if(!e)return this.renderedVisible_=this.renderedVisible_||this.j,void(this.renderedVisible_&&(this.element_=this.element_||this.c,this.element.style.display="none",this.renderedVisible_=!1));const t=e.center,s=e.projection,r=this.getUnits(),i="degrees"==r?"degrees":"m";let a=hn.getPointResolution(s,e.resolution,t,i);this.minWidth_=this.minWidth_||this.v;let n=this.minWidth_*a,o="";if("degrees"==r){const e=hn.METERS_PER_UNIT.degrees;(n*=e)<e/60?(o="″",a*=3600):n<e?(o="′",a*=60):o="°"}else if("imperial"==r)n<.9144?(o="in",a/=.0254):n<1609.344?(o="ft",a/=.3048):(o="mi",a/=1609.344);else if("nautical"==r)a/=1852,o="nm";else if("metric"==r)n<.001?(o="μm",a*=1e6):n<1?(o="mm",a*=1e3):n<1e3?o="m":(o="km",a/=1e3);else{if("us"!=r)throw new(cn())(33);n<.9144?(o="in",a*=39.37):n<1609.344?(o="ft",a/=.30480061):(o="mi",a/=1609.3472)}var l=[1,2,5];let h,u,c,d=3*Math.floor(Math.log(this.minWidth_*a)/Math.log(10));for(;;){c=Math.floor(d/3);const e=Math.pow(10,c);if(h=l[(d%3+3)%3]*e,u=Math.round(h/a),isNaN(u))return this.element.style.display="none",void(this.renderedVisible_=!1);if(u>=this.minWidth_)break;++d}this.renderedHTML_=this.renderedHTML_||this.D,this.innerElement_=this.innerElement_||this.l,this.renderedWidth_=this.renderedWidth_||this.B,this.renderedVisible_=this.renderedVisible_||this.j,this.element_=this.element_||this.c;let p=h.toFixed(c<0?-c:0)+" "+o;this.renderedHTML_!=p&&(this.innerElement_.innerHTML=p,this.renderedHTML_=p),this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}}
  1501. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1502. * This program are made available under the terms of the Apache License, Version 2.0
  1503. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1504. var pn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAdCAYAAAAjHtusAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozYWZlOGIwMi01MWE3LTRiZjYtYWVkYS05MGQ2ZTQ4YjZiMmUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODg0NkFBQUE3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODg0NkFBQTk3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4MWI3NzdhNC1lZmEyLTQ1MzUtOGQzNi03MmRjNDkyODMzN2UiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpjYTYzODVjMi1jNDQ1LTExN2EtYTc0ZC1lM2I5MzJlMGE4Y2QiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5q1HM0AAAF/ElEQVR42tSabYhUVRjHZ7W01C1uaCRW4F3oi9SXCUnwQ9gsGUFvOEtQH1bLu5VS9sbYh5KicjYt29qiGQwVg2xWWKgocob91AvC+CWsoJqB3qHMSdTMpZyeU/+Df07n3pk7997Z6cBv99z7nHvOvf/z/pxJNZvNVI/jCKXmv6EquAmVkxPSlvtp2GItr0/96fFQForChJAWDiVYTkMYMu4XBFcYjLOwWS3sNwmn8NGzZ0h4Flv/zwIdchAnh/slCGmmKUNIBzYPaXOUr0vPuEjD71JAPh7l61embzinhV3V8nnCGmGT8LwlzSL8/yUh4Tfjo9T/CgnCIYNKycA2Qq21AcHU/VHE80Idoo3Qs0W6p0UtUnkZvEMDeVcCyqxEafF7hL8Qf0oYsIj+lfC9cH1CwhchWAGCtZO+AooQOkdC1Km1VtCb63StW73uFSzgKFUkNwBbmZGGmqowhvg8ZNpH9oXChcIcYRdeNomgxLkaH+S1SGubAxyIpFv+Zp+0DYjrAS00j/dem2VGEl6FJ4Qa4quEu8j2hTCJ+GJhe4JjfQMf6JCYPPbysMPxBlp0BUKOogEF9Rg9/heNvNKYfM0KsZUZaYxX4STGrzJa+zbhPeFH2DcK10KItcI+pI0rVElwXl1ULaKnIJhDw0oRQpTQc1zcbwRU8ATy4DR6yMlTzwkqMziEWHvubJ4Nk4ZtHdnqwvwY17xq3Z4FjrG+z2Kdrdf2ZSGD+xlLPh6t1R0jP9fI22ZzKI92yvQl7EbmBxI4S7Y+vIAOL87QZqsc5uNnssxZIcfYjXT9snCR7jjobidp+FkxA2v+Cq1QervMDmp4P7Xs3YZtE9kOC3P/By6JGaETl8ElwueYTNTDq4UDsKnd7YfCNbT239LF1udS72xYJt1UWxNfN4IIP4bWuTpEja01JtMFZFsm/AHbtHBlDE6yasA4moYTrUbvdBTXHqUrAH4uSadbyzF+vbBM2IsNkS3MNa5305JxqfA02T4TnkX8XOH1mPw8ruVejpxbI9hZD2Cz1U7LdrrUvjP/WfZinNZhr6V27hP+FPZh9aLvLxVO4DllX0G2OcKnlO/DCblxaz6uXBtmi+8mBaP3/SP8IuEIiTRoPPQm2TaEmEyXo0JU+F0YiPFD0hhOsiE/vqeEVwyTgF8L51OilcIZ2I4Ll5NttvAJPfukUeB2sk0ZPSbKIUUJpCII7+DasWy08uhNNazT0wGHI7mAtB7KqMKm38HhDdAUibTVKGicbB8YAqrJ9DRsp43JdB4qUof1HQrPE6XTQWu3Ce/inVzjXhXpMiTwUYugNVQ+p80jrUsV5EH0POKeuXO9QjhFq5GryNYvfEMCDhsftYVsB9ETtG0V9ZjfhCURhbcJFpfwVZ9jvhxsLHwTYtp2svlWQw3vXL8UnqHVSIG8l8ex+tHhBXgjddgqHEZ8ufAA2aaEnYgrF/KrPXrEmMUqZ9THLW06xhoBaVueQpkug+ewOUphE3Qv2Q5gGamXYa+QbVq4O+DQ5FHyZqrjxNt7UHh9uuRa0F7HjCF8o9PCTOGnscM7g2u1Hl9C9oeEnxC/1ajZg8JLiM9Hj9GHJseMShwL2DO0G5yEWn3Zh1QUods5CPkIoqlwAZxhXMsb6HrcEPBxchhdJ6wj29vCW4hfLOzo8J3rltYX50nXQAATSf/K4DEaGlTLvplsk/QCpoD60EQ7gLYZc8H9wq+I3yncEOEcNhuz6HWf3XEiwU/4Y8YEqVp2P10rt+8REvBGw026i4aDcbL9jF8r8Blmf4fCOzhViiscskygXRdehf3CO4hfigmTBXyQrl8TFtD1IzQX3CbcQrY3hPcRv4z8OmHPXwchVNln2MmE7BX6VwIFi/he6uxvb6JM3m0fdqvx/ATidxg2JeC7VDErAw5NzGfvwRJVheEIQ8Mg/pdwIM+UOmi9Q8ivCsrIy0tF+wVbEcLrd3Pb2XisEb4Tdlhsi4WP4RBbaLGrHfC3PrvMIezy9rTpGm5lz9LOMG15xvFxD/j5gjzjjDbMOzk+9zzt3v5bgAEAibzFeFHVgYkAAAAASUVORK5CYII=";
  1505. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1506. * This program are made available under the terms of the Apache License, Version 2.0
  1507. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1508. class mn extends(an()){constructor(e){(e=e||{}).imageUrl=e.imageUrl||null,e.width=e.width||null,e.height=e.height||null,e.link=e.link||"https://iclient.supermap.io",e.alt=e.alt||"SuperMap iClient",super(e),this.options=e,this.element=e.element=function(){var e=document.createElement("div");e.className="ol-control-logo ol-unselectable ol-control",function(e){var t=document.getElementsByClassName("ol-attribution"),s=(t=t&&t[0])&&t.clientHeight||29;e.style.bottom=parseInt(s)+6+"px",e.style.right="4px",e.style.marginTop=0,e.style.marginLeft=0,e.style.marginBottom=0,e.style.marginRight=0;var r=document.createElement("style");r.type="text/css",r.innerHTML=".ol-control-logo,.ol-control-logo:hover {background-color: rgba(255,255,255,0);}",document.getElementsByTagName("head")[0].appendChild(r)}.call(this,e);var t=pn;this.options.imageUrl&&(t=this.options.imageUrl);var s=this.options.alt,r=this.options.link,i="94px",a="29px",n="width:"+i+";height:"+a+";";this.options.imageUrl&&(i=this.options.width,a=this.options.height,n="width:"+i+";height:"+a+";",i&&a||(n=""));return e.innerHTML="<a href='"+r+"' target='_blank' style='border: none;display: block;'><img src="+t+" alt='"+s+"' style='border: none;"+n+"white-space: nowrap;margin-bottom: 2px'></a>",e}.call(this)}}
  1509. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1510. * This program are made available under the terms of the Apache License, Version 2.0
  1511. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1512. var fn={"point-file":"pointFile","point-fill":"fillStyle","point-radius":"pointRadius","point-halo-radius":"pointHaloRadius","point-halo-color":"pointHaloColor","point-dx":"offsetX","point-dy":"offsetY","point-opacity":"globalAlpha","point-comp-op":"globalCompositeOperation"},yn={"line-color":"strokeStyle","line-width":"lineWidth","line-cap":"lineCap","line-join":"lineJoin","line-miterlimit":"miterLimit","line-dash-offset":"lineDashOffset","line-opacity":"strokeOpacity","line-dasharray":"lineDasharray","line-offset":"offset","line-comp-op":"globalCompositeOperation"},gn={"line-color":"strokeStyle","line-width":"lineWidth","line-cap":"lineCap","line-join":"lineJoin","line-miterlimit":"miterLimit","line-dash-offset":"lineDashOffset","line-opacity":"strokeOpacity","line-dasharray":"lineDasharray","polygon-fill":"fillStyle","polygon-dx":"offsetX","polygon-dy":"offsetY","polygon-opacity":"fillOpacity","polygon-comp-op":"globalCompositeOperation"},vn={CartoStyleMap:{TEXT:{"text-size":"fontSize","text-face-name":"fontFamily","text-align":"textAlign","text-vertical-alignment":"textBaseline","text-horizontal-alignment":"textAlign","text-bold":"bold","text-weight":"fontWeight","text-name":"textName","text-halo-radius":"haloRadius","text-halo-color":"backColor","text-fill":"foreColor","text-opacity":"globalAlpha","text-dx":"offsetX","text-dy":"offsetY","text-comp-op":"globalCompositeOperation"},POINT:fn,MULTIPOINT:fn,LINE:yn,LINESTRING:yn,MULTILINESTRING:yn,REGION:gn,POLYGON:gn,MULTIPOLYGON:gn},ServerStyleMap:{fillBackOpaque:{canvasStyle:"",type:"bool",defaultValue:!0},lineWidth:{canvasStyle:"lineWidth",type:"number",unit:"mm",defaultValue:.1},fillBackColor:{canvasStyle:"",type:"color",defaultValue:"rgba(0,0,0,0)"},markerWidth:{canvasStyle:"",type:"number",unit:"mm",defaultValue:""},markerAngle:{canvasStyle:"",type:"number",unit:"degree",defaultValue:""},fillForeColor:{canvasStyle:"fillStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},foreColor:{canvasStyle:"fillStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},markerSize:{canvasStyle:"markerSize",type:"number",unit:"mm",defaultValue:2.4},fillGradientOffsetRatioX:{canvasStyle:"",type:"number",defaultValue:0},fillGradientOffsetRatioY:{canvasStyle:"",type:"number",defaultValue:0},lineColor:{canvasStyle:"strokeStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},fillOpaqueRate:{canvasStyle:"",type:"number",defaultValue:100},markerHeight:{canvasStyle:"",type:"number",unit:"mm",defaultValue:0},fillGradientMode:{canvasStyle:"",type:"string",defaultValue:"NONE"},fillSymbolID:{canvasStyle:"",type:"number",defaultValue:0},fillGradientAngle:{canvasStyle:"",type:"number",unit:"degree",defaultValue:0},markerSymbolID:{canvasStyle:"",type:"number",defaultValue:0},lineSymbolID:{canvasStyle:"",type:"number",defaultValue:0}},CartoCompOpMap:{clear:"",src:"",dst:"","src-over":"source-over","dst-over":"destination-over","src-in":"source-in","dst-in":"destination-in","src-out":"source-out","dst-out":"destination-out","src-atop":"source-atop","dst-atop":"destination-atop",xor:"xor",plus:"lighter",minus:"",multiply:"",screen:"",overlay:"",darken:"",lighten:"lighter","color-dodge":"","color-burn":"","hard-light":"","soft-light":"",difference:"",exclusion:"",contrast:"",invert:"","invert-rgb":"","grain-merge":"","grain-extract":"",hue:"",saturation:"",color:"",value:""}},Sn={pointFile:"",pointRadius:3,pointHaloRadius:1,pointHaloColor:"#c33",offsetX:0,offsetY:0,fillStyle:"#fc0",globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},bn={strokeStyle:"rgba(0,0,0,0)",lineWidth:1,lineCap:"butt",lineJoin:"round",miterLimit:10,lineDashOffset:0,lineDasharray:[],strokeOpacity:1,offset:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},xn={strokeStyle:"rgba(0,0,0,0)",lineWidth:1,lineCap:"butt",lineJoin:"round",miterLimit:10,lineDashOffset:0,lineOpacity:1,fillOpacity:1,lineDasharray:[],fillStyle:"rgba(0,0,0,0)",polygonOpacity:1,offsetX:0,offsetY:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},Cn={TEXT:{font:"10px sans-serif",textAlign:"middle",textBaseline:"center",direction:"ltr",bold:!1,haloRadius:0,backColor:"rgba(255,255,255,1)",foreColor:"rgba(0,0,0,1)",offsetX:0,offsetY:0,textHeight:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},POINT:Sn,MULTIPOINT:Sn,LINE:bn,LINESTRING:bn,MULTILINESTRING:bn,REGION:xn,POLYGON:xn,MULTIPOLYGON:xn,SHADOW:{shadowBlur:0,shadowColor:"rgba(0,0,0,0)",shadowOffsetX:0,shadowOffsetY:0},GLOBAL:{globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0}};const _n=ol.geom.Point;var Tn=s.n(_n);const wn=ol.format.GeoJSON;var En=s.n(wn);
  1513. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1514. * This program are made available under the terms of the Apache License, Version 2.0
  1515. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1516. class Mn extends r{constructor(e,t){super(e,t)}queryByBounds(e,t,s){var r=this;new Lr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryByDistance(e,t,s){var r=this;new Nr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryBySQL(e,t,s){var r=this;new kr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryByGeometry(e,t,s){var r=this;new Fr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.queryParams&&!Un.isArray(e.queryParams)&&(e.queryParams=[e.queryParams]),e.bounds&&(e.bounds=new K(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.geometry&&(e.geometry instanceof Tn()?e.geometry=new se(e.geometry.getCoordinates()[0],e.geometry.getCoordinates()[1]):e.geometry=Un.toSuperMapGeometry(JSON.parse((new(En())).writeGeometry(e.geometry)))),e):{}}_processFormat(e){return e||a.GEOJSON}}
  1517. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1518. * This program are made available under the terms of the Apache License, Version 2.0
  1519. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1520. class An extends r{constructor(e,t){super(e,t)}getFeaturesByIDs(e,t,s){var r=this;new Os(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByBounds(e,t,s){var r=this;new Ts(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByBuffer(e,t,s){var r=this;new Es(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesBySQL(e,t,s){var r=this;new Is(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}getFeaturesByGeometry(e,t,s){var r=this;new As(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}editFeatures(e,t){if(e&&e.dataSourceName&&e.dataSetName){var s=this,r=s.url,i=e.dataSourceName,a=e.dataSetName;r=X.urlPathAppend(r,"datasources/"+i+"/datasets/"+a),new Bt(r,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}}_processParams(e){if(!e)return{};var t=this;if(e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=e.toIndex?e.toIndex:-1,e.bounds&&(e.bounds=Un.toSuperMapBounds(e.bounds)),e.geometry&&(e.geometry=Un.toSuperMapGeometry(JSON.parse((new(En())).writeGeometry(e.geometry)))),e.editType&&(e.editType=e.editType.toLowerCase()),e.features){var s=[];Un.isArray(e.features)?e.features.map(function(e){return s.push(t._createServerFeature(e)),e}):s.push(t._createServerFeature(e.features)),e.features=s}return e}_createServerFeature(e){var t={},s=[],r=[],i=e.getProperties();for(var a in i)a!==e.getGeometryName()&&(s.push(a),r.push(i[a]));return t.fieldNames=s,t.fieldValues=r,e.getId()&&(t.id=e.getId()),t.geometry=Un.toSuperMapGeometry((new(En())).writeFeatureObject(e)),t}_processFormat(e){return e||a.GEOJSON}}const Pn=ol.util,On=ol.geom.Geometry;var Ln=s.n(On);const In=ol.render,Nn=ol.source.Vector;var Rn=s.n(Nn);const Fn=ol.layer.Vector;var Dn=s.n(Fn);const kn=ol.style,Gn=ol.Feature;var Bn=s.n(Gn);
  1521. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1522. * This program are made available under the terms of the Apache License, Version 2.0
  1523. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1524. class Un{constructor(){}static getOlVersion(){if(Pn&&Pn.VERSION)return Pn.VERSION.split(".")[0];if(window&&window.ol){if(window.ol.util)return"6";if(window.ol.WebGLMap)return"5"}return"4"}static toGeoJSON(e){return e?(new Ce).toGeoJSON(e):null}static toSuperMapGeometry(e){if(!e||!e.type)return null;return(new Ce).read(e,"FeatureCollection")[0].geometry}static resolutionToScale(e,t,s){return 1/(e*t*(1/.0254)*this.getMeterPerMapUnit(s))}static toSuperMapBounds(e){return new K(e[0],e[1],e[2],e[3])}static toProcessingParam(e){if(e.length<1)return"";const t={},s=[];for(let t=0;t<e.length;t++){const r={x:e[t][0],y:e[t][1]};s.push(r)}return s.push(s[0]),t.type="REGION",t.points=s,t}static scaleToResolution(e,t,s){return 1/(e*t*(1/.0254)*this.getMeterPerMapUnit(s))}static getMeterPerMapUnit(e){let t;if(e===c.METER)t=1;else if(e===c.DEGREE)t=2*Math.PI*6378137/360;else if(e===c.KILOMETER)t=.001;else if(e===c.INCH)t=1/.025399999918;else{if(e!==c.FOOT)return t;t=.3048}return t}static isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}static Csv2GeoJSON(e,t){t=t||{titles:["lon","lat"],latitudeTitle:"lat",longitudeTitle:"lon",fieldSeparator:",",lineSeparator:"\n",deleteDoubleQuotes:!0,firstLineTitles:!1};const s=[];if("string"==typeof e){let i=t.titles;if(t.firstLineTitles){if((e=e.split(t.lineSeparator)).length<2)return;i=e[0],e.splice(0,1),e=e.join(t.lineSeparator),i=i.trim().split(t.fieldSeparator);for(let e=0;e<i.length;e++)i[e]=r(i[e]);t.titles=i}for(let e=0;e<i.length;e++){let t=i[e].toLowerCase().replace(/[^\w ]+/g,"").replace(/ +/g,"_");""!==t&&"_"!==t||(t=`prop-${e}`),s[e]=t}e=function(e){const i={type:"FeatureCollection",features:[]},a=t.titles;e=e.split(t.lineSeparator);for(let n=0;n<e.length;n++){const o=e[n].trim().split(t.fieldSeparator),l=parseFloat(o[a.indexOf(t.longitudeTitle)]),h=parseFloat(o[a.indexOf(t.latitudeTitle)]),u=l<180&&l>-180&&h<90&&h>-90;if(o.length!==a.length||!u)continue;const c={type:"Feature",geometry:{},properties:{}};c.geometry.type="Point",c.geometry.coordinates=[l,h];for(let e=0;e<a.length;e++)a[e]!==t.latitudeTitle&&a[e]!==t.longitudeTitle&&(c.properties[s[e]]=r(o[e]));i.features.push(c)}return i}(e)}return e;function r(e){return t.deleteDoubleQuotes&&(e=e.trim().replace(/^"/,"").replace(/"$/,"")),e}}static createCanvasContext2D(e,t){const s=document.createElement("CANVAS");return e&&(s.width=e),t&&(s.height=t),s.getContext("2d")}static supportWebGL2(){const e=document.createElement("canvas");return Boolean(e&&e.getContext("webgl2"))}static isString(e){return"string"==typeof e&&e.constructor===String}static isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}static trim(e=""){return e.replace(/(^\s*)|(\s*$)/g,"")}static newGuid(e){let t=e||32,s="";for(let e=1;e<t;e++){s+=Math.floor(16*Math.random()).toString(16)}return s}static isNumber(e){if(""===e)return!1;let t=Number(e);return 0===t||!isNaN(t)}static getFeatureBySQL(e,t,s,r,i,a){let n=new at({name:t.join().replace(":","@")}),o=new Ls({queryParameter:n,datasetNames:t,fromIndex:0,toIndex:1e5,maxFeatures:1e5,returnContent:!0,targetEpsgCode:a});new An(e,s).getFeaturesBySQL(o,e=>{"processCompleted"===e.type?r&&r(e):i&&i(e)})}static queryFeatureBySQL(e,t,s,r,i,a,n,o,h,u){const c=new at({name:t,attributeFilter:s});r&&(c.fields=r);const d={queryParams:[c]};u&&(d.queryOption=l.ATTRIBUTE),o&&(d.startRecord=o),h&&(d.expectCount=h),i&&(d.prjCoordSys={epsgCode:i});const p=new Dr(d);new Mn(e).queryBySQL(p,function(e){"processCompleted"===e.type?a(e):n(e)})}static getFeatureProperties(e){let t=[];return Un.isArray(e)&&e.length&&e.forEach(e=>{let s=e.get("attributes");s&&t.push(s)}),t}static isMatchAdministrativeName(e,t){if(Un.isString(t)){let s=e.substr(0,2);return"张家"===s&&(s=e.substr(0,3)),!!t.match(new RegExp(s))}return!1}static getHighestMatchAdministration(e,t){let s=0,r=null;return e.filter(e=>Un.isMatchAdministrativeName(e.properties.Name,t)).forEach(e=>{let i=0;Array.from(new Set(e.properties.Name.split(""))).forEach(e=>{t.includes(e)&&i++}),i>s&&(s=i,r=e)}),r}static setMask(e,t){if(!t)return;if(!((t instanceof Bn()?t.getGeometry():t)instanceof Ln())&&["MultiPolygon","Polygon"].indexOf(t.getType())<0)return;const s=t instanceof Bn()?t:new(Bn())(t),r=new kn.Style({fill:new kn.Fill({color:"black"})}),i=new(Dn())({source:new(Rn())({features:[s],wrapX:!1})}),a=function(e){const t=(0,In.getVectorContext)(e);e.context.globalCompositeOperation="destination-in",i.getSource().forEachFeature(function(s){t.drawFeature(s,r),e.context.globalCompositeOperation="source-over"})},n=Array.isArray(e)?e:[e];Un.unsetMask(n),n.forEach(e=>{e.classNameBak_=e.className_,e.className_=`ol_mask_layer_${e.ol_uid}`,e.clipRender=a,e.extentBak_=e.getExtent(),e.setExtent(i.getSource().getExtent()),e.on("postrender",a),e.changed()})}static unsetMask(e){const t=Array.isArray(e)?e:[e];for(let e=0;e<t.length;e++){const s=t[e];s.clipRender&&(s.un("postrender",s.clipRender),s.className_=s.classNameBak_,s.setExtent(s.extentBak),delete s.classNameBak_,delete s.clipRender,delete s.extentBak_,s.changed())}}}const jn=function(){try{return canvg}catch(e){return{}}}();var Vn=s.n(jn);const Hn=ol.style.Style;var Jn=s.n(Hn);const zn=ol.style.Icon;var qn=s.n(zn);const Wn=ol.style.Circle;var Yn=s.n(Wn);const Xn=ol.style.Fill;var Qn=s.n(Xn);const Kn=ol.style.Stroke;var Zn=s.n(Kn);const $n=ol.style.Text;var eo=s.n($n),to=8,so=2*to;const ro=1e-7;class io{static getValidStyleFromLayerInfo(e,t,s){var r=t.getGeometry().getType().toUpperCase(),a=e.layerStyle,n=this.getDefaultStyle(r);if(!("POINT"!==r&&"MULTIPOINT"!==r||t.getProperties().textStyle||"LABEL"===e.type||t.getProperties().TEXT_FEATURE_CONTENT)){if(a){var o={transparent:!0,resourceType:"SYMBOLMARKER",picWidth:Math.ceil(a.markerSize*i.DOTS_PER_INCH*i.INCHES_PER_UNIT.mm)||13,picHeight:Math.ceil(a.markerSize*i.DOTS_PER_INCH*i.INCHES_PER_UNIT.mm)||13,style:JSON.stringify(a)},l=X.urlAppend(s+"/symbol.png",X.getParameterString(o));return n.pointFile=l,new(Jn())({image:new(qn())({src:n.pointFile})})}return this.toOLPointStyle(n)}if(("POINT"===r||"MULTIPOINT"===r)&&(t.getProperties().textStyle||"LABEL"===e.type||t.getProperties().TEXT_STYLE_INFO)){if(n=this.getDefaultStyle("TEXT"),t.getProperties().textStyle&&(a=t.getProperties().textStyle),t.getProperties().TEXT_STYLE_INFO&&(a=JSON.parse(t.getProperties().TEXT_STYLE_INFO).textStyle),a&&"{}"!==a){var h="";n.fontStyle=a.italic?"italic":"normal",n.fontWeight=a.bold?a.fontWeight:"normal";var u=a.fontHeight*i.DOTS_PER_INCH*i.INCHES_PER_UNIT.mm*.85;n.fontSize=u+"px",h=a.fontName.indexOf("@")?a.fontName.replace(/@/g,""):a.fontName,n.fontFamily=h,n.textHeight=u;var c=a.align.replace(/TOP|MIDDLE|BASELINE|BOTTOM/,"");n.textAlign=c.toLowerCase();var d=a.align.replace(/LEFT|RIGHT|CENTER/,"");"BASELINE"===d&&(d="alphabetic"),n.textBaseline=d.toLowerCase(),n.haloRadius=a.outline?a.outlineWidth:0,n.backColor="rgba("+a.backColor.red+","+a.backColor.green+","+a.backColor.blue+",1)",n.foreColor="rgba("+a.foreColor.red+","+a.foreColor.green+","+a.foreColor.blue+",1)",n.rotation=a.rotation}var p;if(t.getProperties().textStyle&&t.getProperties().texts&&(p=t.getProperties().texts[0]),"LABEL"===e.type){var m=e.textField;if(m&&m.indexOf(".")){var f=m.split(".");m=f&&f.length>0&&f[f.length-1]}p=t.getProperties().attributes?t.getProperties().attributes[m]:t.getProperties()[m]}return t.getProperties().TEXT_FEATURE_CONTENT&&(p=t.getProperties().TEXT_FEATURE_CONTENT),p?this.toOLTextStyle(n,p):this.toOLPointStyle(this.getDefaultStyle("POINT"))}if(a){var y=a.fillSymbolID>7?0:a.fillSymbolID,g=a.lineSymbolID>5?0:a.lineSymbolID;for(var v in a){var S,b=vn.ServerStyleMap[v],x=b.canvasStyle;if(x&&""!=x)switch(b.type){case"number":S=a[v],b.unit&&(S=S*i.DOTS_PER_INCH*i.INCHES_PER_UNIT[b.unit]*2.5),n[x]=S;break;case"color":var C=a[v],_=a.fillBackColor,T=1;if("fillStyle"===x)if(0===y||1===y)T=1-y,S="rgba("+C.red+","+C.green+","+C.blue+","+T+")";else try{var w=document.createElement("canvas");w.height=8,w.width=8;var E=w.getContext("2d"),M=new Image;this.layer&&this.layer.fillImages&&E.drawImage(this.layer.fillImages["System "+y],0,0);for(var A=E.getImageData(0,0,w.width,w.height),P=A.data,O=0,L=P.length;O<L;O+=4){var I=P[O],N=P[O+1],R=P[O+2];I<225&&N<225&&R<225?(P[O]=C.red,P[O+1]=C.green,P[O+2]=C.blue):_&&(P[O]=_.red,P[O+1]=_.green,P[O+2]=_.blue)}E.putImageData(A,0,0),M.src=w.toDataURL(),this.context&&(S=this.context.createPattern(M,"repeat"))}catch(e){throw Error(e.message)}else if("strokeStyle"===x){if(0===g||5===g)T=0===g?1:0;else{var F=[1,0];switch(g){case 1:F=[9.7,3.7];break;case 2:F=[3.7,3.7];break;case 3:F=[9.7,3.7,2.3,3.7];break;case 4:F=[9.7,3.7,2.3,3.7,2.3,3.7]}n.lineDasharray=F}S="rgba("+C.red+","+C.green+","+C.blue+","+T+")"}n[x]=S}}}return"LINESTRING"===r||"MULTILINESTRING"===r?this.toOLLineStyle(n):"POLYGON"===r||"MULTIPOLYGON"===r?this.toOLPolygonStyle(n):void 0}static getStyleFromCarto(e,t,s,r,i,a){var n=r.getGeometry().getType().toUpperCase(),o={},l=this.getDefaultStyle(n);o.FEATUREID=r.getProperties().id,o.SCALE=t;var h,u,c="TEXT"===r.getProperties().type?"TEXT":n,d=vn.CartoStyleMap[c];if(s)for(var p=0,m=s.length;p<m;p++){var f=s[p],y=d[f.property],g=f.getValue(o,e,!0);if(null!==g&&y)if("fontSize"===y)i&&(g*=.8),h=g+"px",l.fontSize=h;else if("fontName"===y)u=g,l.fontName=u;else{if("globalCompositeOperation"===y){if(!(g=vn.CartoCompOpMap[g]))continue}else i&&"pointFile"===y&&(g=(g=a+"/tileFeature/symbols/"+g.replace(/(___)/gi,"@")).replace(/(__0__0__)/gi,"__8__8__"));"lineWidth"===y&&g<1&&(g=Math.ceil(g)),l[y]=g}}if("TEXT"===r.getProperties().type){var v;if(r.getProperties().texts&&(v=r.getProperties().texts[0]),null==v&&l.textName){var S=l.textName.substring(1,l.textName.length-1);if(null!=(v=r.getProperties().attributes?r.getProperties().attributes[S]:r.getProperties()[S])){var b=r.getProperties().texts||[];b.push(v),r.setProperties({texts:b})}}return this.toOLTextStyle(l,v)}return"POINT"===n||"MULTIPOINT"===n?this.toOLPointStyle(l):"LINESTRING"===n||"MULTILINESTRING"===n?this.toOLLineStyle(l):"POLYGON"===n||"MULTIPOLYGON"===n?this.toOLPolygonStyle(l):void 0}static toOLPointStyle(e){return""!==e.pointFile?new(Jn())({image:new(qn())({src:e.pointFile})}):new(Jn())({image:new(Yn())({radius:e.pointRadius,fill:new(Qn())({color:e.fillStyle}),stroke:new(Zn())({color:e.pointHaloColor,width:e.pointHaloRadius})})})}static toOLLineStyle(e){return new(Jn())({stroke:new(Zn())({color:e.strokeStyle,width:e.lineWidth,lineCap:e.lineCap,lineDash:e.lineDasharray,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,miterLimit:e.miterLimit})})}static toOLPolygonStyle(e){var t=new(Qn())({color:e.fillStyle}),s=new(Zn())({color:e.strokeStyle,width:e.lineWidth,lineCap:e.lineCap,lineDash:e.lineDasharray,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,miterLimit:e.miterLimit});return new(Jn())({fill:t,stroke:s})}static toOLTextStyle(e,t){return new(Jn())({text:new(eo())({font:(e.fontStyle||"")+" "+(e.fontWeight||"")+" "+(e.fontSize||"")+" "+e.fontFamily,text:t,textAlign:e.textAlign,textBaseline:e.textBaseline,fill:new(Qn())({color:e.foreColor}),stroke:new(Zn())({color:e.backColor}),offsetX:e.offsetX,offsetY:e.offsetY})})}static dashStyle(e,t){if(!e)return[];var s=e.strokeWidth*t,r=e.strokeDashstyle||e.lineDash;switch(r){case"solid":return[0];case"dot":return[1,4*s];case"dash":return[4*s,4*s];case"dashdot":return[4*s,4*s,1,4*s];case"longdash":return[8*s,4*s];case"longdashdot":return[8*s,4*s,1,4*s];default:return r?X.isArray(r)?r:(r=q.trim(r).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}static getStyleFromiPortalMarker(e){return 0==e.indexOf("./")?null:(0==e.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(e=e.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),new(Jn())({image:new(qn())({src:e,opacity:1,size:[48,43],anchor:[.5,1]})}))}static getStyleFromiPortalStyle(e,t,s){var r=s?JSON.parse(s):null,i=this;if("Point"===t||"MultiPoint"===t){var a=r||e.pointStyle;return a.externalGraphic?0==a.externalGraphic.indexOf("./")?null:(0==a.externalGraphic.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(a.externalGraphic=a.externalGraphic.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),new(Jn())({image:new(qn())({src:a.externalGraphic,opacity:a.graphicOpacity,size:[a.graphicWidth,a.graphicHeight]})})):new(Jn())({image:new(Yn())({fill:new(Qn())({color:i.hexToRgba(a.fillColor,a.fillOpacity)}),stroke:new(Zn())({color:i.hexToRgba(a.strokeColor,a.strokeOpacity),lineCap:a.strokeLineCap,lineDash:this.dashStyle(a,1),width:a.strokeWidth}),radius:a.pointRadius})})}if("LineString"===t||"MultiLineString"===t||"Box"===t){var n=r||e.lineStyle;return new(Jn())({stroke:new(Zn())({color:i.hexToRgba(n.strokeColor,n.strokeOpacity),lineCap:n.strokeLineCap,lineDash:this.dashStyle(n,1),width:n.strokeWidth})})}if("Polygon"===t||"MultiPolygon"===t){var o=r||e.polygonStyle;return new(Jn())({fill:new(Qn())({color:i.hexToRgba(o.fillColor,o.fillOpacity)}),stroke:new(Zn())({color:i.hexToRgba(o.strokeColor,o.strokeOpacity),lineCap:o.strokeLineCap,lineDash:this.dashStyle(o,1),width:o.strokeWidth})})}}static hexToRgba(e,t){var s=[],r=[];if(3==(e=e.replace(/#/,"")).length){var i=[];for(let t=0;t<3;t++)i.push(e.charAt(t)+e.charAt(t));e=i.join("")}for(let t=0;t<6;t+=2)s[t]="0x"+e.substr(t,2),r.push(parseInt(Number(s[t])));return r.push(t),"rgba("+r.join(",")+")"}static getDefaultStyle(e){var t={},s=Cn[e];for(var r in s){var i=s[r];t[r]=i}return t}static toOpenLayersStyle(e,t){e=e||this.getDefaultStyle();let s,r,i,a=new(Jn()),{fillColor:n,fillOpacity:o,strokeColor:l,strokeWidth:h,strokeOpacity:u,radius:c,lineCap:d,src:p,scale:m,offsetX:f,offsetY:y,anchor:g}=e,v=this.hexToRgb(n);v&&v.push(o);let S=this.hexToRgb(l);if(S&&S.push(u),"POINT"===t)p?/.+(\.svg$)/.test(p)?(this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this.getCanvasFromSVG(p,this.svgDiv,e=>{s=new(qn())({img:e,scale:c/e.width,imgSize:[e.width,e.height],anchor:[.5,.5]})})):s=new(qn())({src:p,scale:m,anchor:g}):s=new(Yn())({radius:c,fill:new(Qn())({color:v}),stroke:new(Zn())({width:h||ro,color:S}),displacement:this.getCircleDisplacement(c,f,y)}),a.setImage(s);else if("LINE"===t||"LINESTRING"===t||"MULTILINESTRING"===t||"LINEARRING"===t)i=new(Zn())({width:h||ro,color:S,lineCap:d||"round",lineDash:this.dashStyle(e,1)}),a.setStroke(i);else if("POLYGON"===t||"MULTIPOLYGON"===t||"REGION"===t)r=new(Qn())({color:v}),i=new(Zn())({width:h||ro,color:S,lineCap:d||"round",lineDash:this.dashStyle(e,1)}),a.setFill(r),a.setStroke(i);else{let t=this.getCanvas(e);s=new(qn())({img:t.canvas,imgSize:[t.width,t.height],scale:1,anchor:[.5,.5]}),a.setImage(s)}return a}static getIconAnchor(e=.5,t=.5){return[e,t]}static getCircleDisplacement(e,t=0,s=0){return[e*t,-(e*s)]}static getTextOffset(e,t=0,s=0){const r=e.substr(0,e.length-2)/2;return{x:r*t,y:r*s}}static getCanvas(e){let t;e.canvas?t=document.querySelector("#"+e.canvas)?document.getElemntById(e.canvas):this.createCanvas(e):(t=this.createCanvas(e),e.canvas=t.id),t.style.display="none";var s=t.getContext("2d");let r=Number(e.font.replace(/[^0-9]/gi,"")),i=e.text.split("\r\n"),a=i.length;s.font=e.font;let n=this.drawRect(s,e,i,r,t);return this.positionY=to,a>1?i.forEach(function(t,i){0!==i&&(this.positionY=this.positionY+r),this.canvasTextAutoLine(t,e,s,r,n.width)},this):this.canvasTextAutoLine(i[0],e,s,r,n.width),{canvas:t,width:n.width,height:n.height}}static createCanvas(e){let t=document.createElement("div");document.body.appendChild(t);let s=document.createElement("canvas");return s.id=e.canvas?e.canvas:"textCanvas"+Un.newGuid(8),t.appendChild(s),s}static drawRect(e,t,s,r,i){let a,n=t.backgroundFill,o=t.maxWidth-so,l=0,h=0,u=[];return s.forEach(function(t){let s,r="";h++;for(var i=0;i<t.length;i++){let n=r+t[i],l=e.measureText(n).width;l>o&&i>0||"\n"===t[i]?(r=t[i],h++,s=!0):(r=n,a=l)}s?u.push(o):u.push(a)},this),a=this.getCanvasWidth(u,o),l=h*r,l+=so,i.width=a,i.height=l,e.fillStyle=n,e.fillRect(0,0,a,l),{width:a,height:l}}static getCanvasWidth(e,t){let s=0;for(let r=0;r<e.length;r++){let i=e[r];if(i>=t)return t+so;i>s&&(s=i)}return s+so}static canvasTextAutoLine(e,t,s,r,i){s.font=t.font;let a=t.textAlign,n=this.getPositionX(a,i),o=e.split(""),l="",h=t.fillColor,u=t.maxWidth-so;for(var c=0;c<o.length;c++){let e=l+o[c];s.measureText(e).width>u&&c>0||"\n"===o[c]?(s.fillStyle=h,s.textAlign=a,s.textBaseline="top",s.fillText(l,n,this.positionY),l=o[c],this.positionY+=r):l=e}s.fillStyle=h,s.textAlign=a,s.textBaseline="top",s.fillText(l,n,this.positionY)}static getPositionX(e,t){let s,r=t-so;switch(e){case"center":s=r/2;break;case"right":s=r;break;default:s=8}return s}static hexToRgb(e){if(e){var t=e.replace("#","").split(""),s=[t[0]+t[1],t[2]+t[3],t[4]+t[5]];return s=s.map(function(e){return parseInt(e,16)})}}static formatRGB(e){let t;return 3===e.length?(t="rgb(",e.forEach(function(e,s){t+=2===s?e:e+","})):(t="rgba(",e.forEach(function(e,s){t+=3===s?e:e+","})),t+=")"}static getCanvasFromSVG(e,t,s){let r=window.canvg?window.canvg:Vn(),i=document.createElement("canvas");i.id="dataviz-canvas-"+Un.newGuid(8),i.style.display="none",t.appendChild(i);try{r(i.id,e,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:function(){i.width>300||i.height>300||s(i)},forceRedraw:function(){return!1}})}catch(e){return}}static getMarkerDefaultStyle(e,t){let s;switch(e){case"POINT":s={src:`${t}apps/dataviz/static/imgs/markers/mark_red.png`,scale:1,anchor:[.5,1]};break;case"LINE":case"LINESTRING":case"MULTILINESTRING":s={strokeColor:"#3498db",strokeOpacity:1,strokeWidth:5,lineCap:"round",lineDash:"solid"};break;case"REGION":case"POLYGON":case"MULTIPOLYGON":s={fillColor:"#1abd9c",fillOpacity:1,strokeColor:"#3498db",strokeOpacity:1,strokeWidth:3,lineCap:"round",lineDash:"solid"}}return s}static getOpenlayersStyle(e,t,s){let r;return"BASIC_POINT"===e.type?r=this.toOpenLayersStyle(e,t):"SYMBOL_POINT"===e.type?r=this.getSymbolStyle(e,s):"SVG_POINT"===e.type?r=this.getSVGStyle(e):"IMAGE_POINT"===e.type&&(r=this.getImageStyle(e)),r}static getSymbolStyle(e,t){let s="";e.unicode&&(s=String.fromCharCode(parseInt(e.unicode.replace(/^&#x/,""),16)));let r=io.hexToRgb(e.fillColor);r.push(e.fillOpacity);let i=io.hexToRgb(e.strokeColor);i.push(e.strokeOpacity);let a=t?2*e.radius+"px":e.fontSize;const{offsetX:n,offsetY:o,rotation:l=0}=e,h=io.getTextOffset(a,n,o);return new(Jn())({text:new(eo())({text:s,font:a+" supermapol-icons",placement:"point",textAlign:"center",fill:new(Qn())({color:r}),backgroundFill:new(Qn())({color:[0,0,0,0]}),stroke:new(Zn())({width:e.strokeWidth||1e-6,color:i}),offsetX:h.x,offsetY:h.y,rotation:l})})}static getSVGStyle(e){let t,s=this;s.svgDiv||(s.svgDiv=document.createElement("div"),document.body.appendChild(s.svgDiv));const{url:r,radius:i,offsetX:a,offsetY:n,fillOpacity:o,rotation:l}=e;let h=this.getIconAnchor(a,n);return io.getCanvasFromSVG(r,s.svgDiv,function(r){t=new(Jn())({image:new(qn())({img:s.setColorToCanvas(r,e),scale:2*i/r.width,imgSize:[r.width,r.height],anchor:h||[.5,.5],opacity:o,anchorOrigin:"bottom-right",rotation:l})})}),t}static setColorToCanvas(e,t){let s=e.getContext("2d"),r=io.hexToRgb(t.fillColor);r&&r.push(t.fillOpacity);let i=io.hexToRgb(t.strokeColor);return i&&i.push(t.strokeOpacity),s.fillStyle=io.formatRGB(r),s.fill(),s.strokeStyle=io.formatRGB(i),s.lineWidth=t.strokeWidth,s.stroke(),e}static getImageStyle(e){let t=e.imageInfo.size,s=2*e.radius/t.w,r=e.imageInfo,i=r.img;i&&i.src||((i=new Image).src=r.url);const{offsetX:a,offsetY:n,rotation:o}=e;let l=this.getIconAnchor(a,n);return new(Jn())({image:new(qn())({img:i,scale:s,imgSize:[t.w,t.h],anchor:l||[.5,.5],anchorOrigin:"bottom-right",rotation:o})})}static getRoadPath(e,t){const{strokeWidth:s=ro,lineCap:r,strokeColor:i,strokeOpacity:a}=e;let n=this.hexToRgb(i);n&&n.push(a);var o=new(Jn())({stroke:new(Zn())({width:s||ro,color:n,lineCap:r||"round",lineDash:[0]})});const{strokeColor:l}=t;let h=this.hexToRgb(l);h&&h.push(a);let u=0===s?ro:s+2;return[new(Jn())({stroke:new(Zn())({width:u,color:h,lineCap:r||"round",lineDash:[0]})}),o]}static getPathway(e,t){let{strokeWidth:s=ro,strokeColor:r,strokeOpacity:i}=e;const a=(e=>[e,e+2*s])(4*s);let n=this.hexToRgb(r);n&&n.push(i);var o=new(Jn())({stroke:new(Zn())({width:.5*s||ro,color:n,lineCap:"square",lineDash:a})});const{strokeColor:l}=t;let h=this.hexToRgb(l);return h&&h.push(i),[new(Jn())({stroke:new(Zn())({width:s||ro,color:h,lineCap:"square"})}),o]}}const ao=ol.Map;var no=s.n(ao);const oo=ol.layer.Group;var lo=s.n(oo);!function(){const e=function(t,s,r,i,a,n){t instanceof lo()?t.getLayers().forEach(function(t){e(t,s,r,i,a,n)}):t.getSource()._forEachFeatureAtCoordinate&&t.getSource()._forEachFeatureAtCoordinate(s,r,e=>{i(e,t)},a,n)};no().prototype.forEachFeatureAtPixelDefault=no().prototype.forEachFeatureAtPixel,no().prototype.forEachFeatureAtPixel=no().prototype.Tc=function(t,s,r,i){const a=r&&r.layerFilter?r.layerFilter:()=>!0,n=this.getLayers().getArray(),o=this.getView().getResolution(),l=this.getCoordinateFromPixel(t);for(let r=0;r<n.length;r++){const h=n[r];h.getVisible()&&a.call(null,h)&&e(h,l,o,s,t,i)}return this.forEachFeatureAtPixelDefault(t,s,r)}}();const ho=ol.source.TileImage;var uo=s.n(ho);const co=ol.asserts,po=ol.tilegrid.TileGrid;var mo=s.n(po);
  1525. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1526. * This program are made available under the terms of the Apache License, Version 2.0
  1527. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1528. class fo extends(uo()){constructor(e){var t=e||{},s=t.attributions||"Map Data © 2018 Baidu - GS(2016)2089号 - Data © 长地万方 with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>",r=fo.defaultTileGrid(),i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",a=void 0!==t.url?t.url:"http://online1.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles={styles}&udt=20170408",n=t.hidpi||(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;a=a.replace("{styles}",n?"ph":"pl"),super({attributions:s,cacheSize:t.cacheSize,crossOrigin:i,opaque:void 0===t.opaque||t.opaque,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,projection:"EPSG:3857",wrapX:t.wrapX,tilePixelRatio:n?2:1,tileGrid:r,tileUrlFunction:function(e,t,s){var i=a.replace("{z}",e[0].toString()).replace("{x}",e[1].toString()).replace("{y}",function(){console.log(Un.getOlVersion());var t=["4","5"].indexOf(Un.getOlVersion())>-1?e[2]:-e[2]-1;return t.toString()}).replace("{-y}",function(){var t=e[0],s=r.getFullTileRange(t);co.assert(s,55);var i=s.getHeight()+e[2];return i.toString()});o.tileProxy&&(i=o.tileProxy+encodeURIComponent(i));return i}}),t.tileProxy&&(this.tileProxy=t.tileProxy);var o=this}static defaultTileGrid(){return new(mo())({extent:[-33554432,-33554432,33554432,33554432],resolutions:[262144,131072,65536,32768,16284,8192,4096,2048,1024,512,256,128,64,32,16,8,4,2,1,.5],origin:[0,0],minZoom:3})}}const yo=ol.size,go=ol.tilegrid;
  1529. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1530. * This program are made available under the terms of the Apache License, Version 2.0
  1531. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1532. class vo extends(uo()){constructor(e){if(void 0===e.url)return;e.attributions=e.attributions||"Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <a href='https://iclient.supermap.io/'>© SuperMap iClient</a>",e.format=e.format?e.format:"png";var t=X.urlPathAppend(e.url,"image."+e.format);e.serverType=e.serverType||n.ISERVER,t=function(e,t,s){var r,i,a=t;switch(s){case n.IPORTAL:i=Oe.getToken(e),(r=i?new ue(i,"token"):null)||(i=Oe.getKey(e),r=i?new ue(i,"key"):null);break;case n.ONLINE:i=Oe.getKey(e),r=i?new ue(i,"key"):null;break;default:i=Oe.getToken(e),r=i?new ue(i,"token"):null}r&&(a=X.urlAppend(a,r.getUrlParameters()));return a}(e.url,t,e.serverType);const s={};var r=void 0===e.transparent||e.transparent;s.transparent=r;var i=void 0===e.cacheEnabled||e.cacheEnabled;s.cacheEnabled=i,void 0!==e.layersID&&(s.layersID=e.layersID);var a=!1;void 0!==e.redirect&&(a=e.redirect),s.redirect=a,e.prjCoordSys&&(s.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.clipRegionEnabled&&e.clipRegion instanceof Ln()&&(e.clipRegion=Un.toSuperMapGeometry((new(En())).writeGeometryObject(e.clipRegion)),e.clipRegion=X.toJSON(xe.fromGeometry(e.clipRegion)),s.clipRegionEnabled=e.clipRegionEnabled,s.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed&&e.overlapDisplayedOptions&&(s.overlapDisplayed=e.overlapDisplayed,s.overlapDisplayedOptions=e.overlapDisplayedOptions.toString()),!0===i&&e.tileversion&&(s.tileversion=e.tileversion),e.rasterfunction&&(s.rasterfunction=JSON.stringify(e.rasterfunction)),t=X.urlAppend(encodeURI(t),X.getParameterString(s)),super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:"4"===Un.getOlVersion()?e.logo:null,opaque:e.opaque,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:function(s,r,i){this.tileGrid||(this.tileGrid=this.getTileGridForProjection&&this.getTileGridForProjection(i));this.tileGrid||(e.extent?(this.tileGrid=vo.createTileGrid(e.extent),this.resolutions&&(this.tileGrid.resolutions=o.resolutions)):("EPSG:3857"===i.getCode()&&(this.tileGrid=vo.createTileGrid([-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),this.extent=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),"EPSG:4326"===i.getCode()&&(this.tileGrid=vo.createTileGrid([-180,-90,180,90]),this.extent=[-180,-90,180,90])));var a=this.tileGrid.getTileCoordExtent(s,this.tmpExtent_),n=yo.toSize(this.tileGrid.getTileSize(s[0]),this.tmpSize),l=t+encodeURI("&width="+n[0]+"&height="+n[1]+'&viewBounds={"leftBottom" : {"x":'+a[0]+',"y":'+a[1]+'},"rightTop" : {"x":'+a[2]+',"y":'+a[3]+"}}");o.tileProxy&&(l=o.tileProxy+encodeURIComponent(l));o.cacheEnabled||(l+="&_t="+(new Date).getTime());return l},wrapX:void 0!==e.wrapX&&e.wrapX,cacheEnabled:e.cacheEnabled,layersID:e.layersID}),this.cacheEnabled=i,e.tileProxy&&(this.tileProxy=e.tileProxy);var o=this}static optionsFromMapJSON(e,t){var s={};s.url=e,s.crossOrigin="anonymous";var r=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],i=function(){var e,s=r[2]-r[0],i=r[3]-r[1],a=s>=i?s:i;e=a===s?a/t.viewer.width:a/t.viewer.height;var n=[],o=c.METER;t.coordUnit===c.DEGREE&&(o=c.DEGREE);if(t.visibleScales.length>0)for(let e=0;e<t.visibleScales.length;e++)n.push(Un.scaleToResolution(t.visibleScales[e],96,o));else for(let t=0;t<17;t++)n.push(e/Math.pow(2,t));return n.sort(function(e,t){return t-e})}();return s.tileGrid=new(mo())({extent:r,resolutions:i}),s}static createTileGrid(e,t,s,r,i){var a=go.createXYZ({extent:e,maxZoom:t,minZoom:s,tileSize:r});return new(mo())({extent:e,minZoom:s,origin:i,resolutions:a.getResolutions(),tileSize:a.getTileSize()})}}const So=ol.source.XYZ;var bo=s.n(So);
  1533. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1534. * This program are made available under the terms of the Apache License, Version 2.0
  1535. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1536. class xo extends(bo()){constructor(e){var t=e||{},s=t.attributions||"Map Data ©2014 SuperMap - GS(2014)6070号-data©Navinfo with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>",r=t.mapName||"quanguo",i=t.mapType||"web",a=t.url||"http://t2.dituhui.com/FileService/image?map={mapName}&type={type}&x={x}&y={y}&z={z}";a=a.replace("{mapName}",r).replace("{type}",i);var n={attributions:s,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,opaque:void 0===t.opaque||t.opaque,maxZoom:t.maxZoom||18,reprojectionErrorThreshold:t.reprojectionErrorThreshold,url:a,wrapX:t.wrapX};t.tileProxy&&(n.tileLoadFunction=function(e,t){e.getImage().src=o.tileProxy+encodeURIComponent(t)}),super(n),t.tileProxy&&(this.tileProxy=t.tileProxy);var o=this}}const Co=ol.source.WMTS;var _o=s.n(Co);const To=ol.tilegrid.WMTS;var wo=s.n(To);
  1537. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1538. * This program are made available under the terms of the Apache License, Version 2.0
  1539. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1540. class Eo extends(_o()){constructor(e){var t=e||{},s=t.attributions||"Map Data <a href='http://www.tianditu.gov.cn' target='_blank'><img style='background-color:transparent;bottom:2px;opacity:1;' src='http://api.tianditu.gov.cn/img/map/logo.png' width='53px' height='22px' opacity='0'></a> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>";t.layerType=t.layerType||"vec",t.layerType=t.isLabel?{vec:"cva",ter:"cta",img:"cia"}[t.layerType]:t.layerType,t.matrixSet="EPSG:4326"===t.projection||"EPSG:4490"===t.projection?"c":"w",t.url||t.urls||(t.url="http://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?"),t.key&&(t.url=`${t.url}tk=${t.key}`),t.url=t.url.replace("{layer}",t.layerType).replace("{proj}",t.matrixSet);var r=t.tileGrid||Eo.getTileGrid(t.projection||"EPSG:3857"),i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",a={version:t.version||"1.0.0",format:t.format||"tiles",dimensions:t.dimensions||{},layer:t.layerType,matrixSet:t.matrixSet,tileGrid:r,style:t.style||"default",attributions:s,cacheSize:t.cacheSize,crossOrigin:i,opaque:void 0===t.opaque||t.opaque,maxZoom:{vec:18,ter:14,img:18}[t.layerType],reprojectionErrorThreshold:t.reprojectionErrorThreshold,url:t.url,urls:t.urls,projection:t.projection||"EPSG:3857",wrapX:t.wrapX};t.tileProxy&&(a.tileLoadFunction=function(e,t){e.getImage().src=n.tileProxy+encodeURIComponent(t)}),super(a),t.tileProxy&&(this.tileProxy=t.tileProxy);var n=this}static getTileGrid(e){return"EPSG:4326"===e||"EPSG:4490"===e?Eo.default4326TileGrid():Eo.default3857TileGrid()}static default4326TileGrid(){for(var e=[],t=[],s=1;s<19;s++)e.push(1.40625/Math.pow(2,s)),t.push(s);return new(wo())({extent:[-180,-90,180,90],resolutions:e,origin:[-180,90],matrixIds:t,minZoom:1})}static default3857TileGrid(){for(var e=[],t=[],s=1;s<19;s++)e.push(156543.03392804062/Math.pow(2,s)),t.push(s);return new(wo())({extent:[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],resolutions:e,matrixIds:t,origin:[-20037508.3427892,20037508.3427892],minZoom:1})}}
  1541. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1542. * This program are made available under the terms of the Apache License, Version 2.0
  1543. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1544. class Mo extends(uo()){constructor(e){if(void 0!==(e=e||{}).url){e.attributions=e.attributions||"Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>",e.format=e.format?e.format:"png",e.serverType=e.serverType||n.ISERVER,super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:"4"===Un.getOlVersion()?e.logo:null,opaque:e.opaque,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:function(s,i,a){t.tileGrid||(e.extent?(t.tileGrid=Mo.createTileGrid(e.extent),t.resolutions&&(t.tileGrid.resolutions=t.resolutions)):("EPSG:3857"===a.getCode()&&(t.tileGrid=Mo.createTileGrid([-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),t.extent=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),"EPSG:4326"===a.getCode()&&(t.tileGrid=Mo.createTileGrid([-180,-90,180,90]),t.extent=[-180,-90,180,90])));t.origin=t.tileGrid.getOrigin(0);var n=s[0],o=s[1],l=["4","5"].indexOf(Un.getOlVersion())>-1?-s[2]-1:s[2],h=t.tileGrid.getResolution(n),u=t.dpi||96,d=a.getUnits()||c.DEGREE;"degrees"!==d&&"degree"!==d||(d=c.DEGREE);"m"!==d&&"meter"!==d||(d=c.METER);var p=Un.resolutionToScale(h,u,d),m=yo.toSize(t.tileGrid.getTileSize(n,t.tmpSize)),f=function(){this._paramsChanged&&(this._layerUrl=r.call(this),this._paramsChanged=!1);return this._layerUrl||r.call(this)}.call(t)+encodeURI("&x="+o+"&y="+l+"&width="+m[0]+"&height="+m[1]+"&scale="+p);t.tileProxy&&(f=t.tileProxy+encodeURIComponent(f));t.cacheEnabled||(f+="&_t="+(new Date).getTime());return f},wrapX:void 0!==e.wrapX&&e.wrapX,cacheEnabled:e.cacheEnabled,layersID:e.layersID}),e.tileProxy&&(this.tileProxy=e.tileProxy),this.options=e,this._url=e.url,this.tileSetsIndex=-1,this.tempIndex=-1,this.dpi=this.options.dpi||96;var t=this,s=X.urlPathAppend(e.url,"tileImage."+e.format)}function r(){return this.requestParams=this.requestParams||function(){var t={};return t.redirect=void 0!==e.redirect&&e.redirect,t.transparent=void 0===e.transparent||e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),this.cacheEnabled=t.cacheEnabled,t._cache=t.cacheEnabled,this.origin&&(t.origin=JSON.stringify({x:this.origin[0],y:this.origin[1]})),e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID.toString()),e.clipRegion instanceof Ln()&&(e.clipRegionEnabled=!0,e.clipRegion=Un.toSuperMapGeometry((new(En())).writeGeometryObject(e.clipRegion)),e.clipRegion=X.toJSON(xe.fromGeometry(e.clipRegion)),t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed?t.overlapDisplayed=!0:(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=this.overlapDisplayedOptions.toString())),t.cacheEnabled&&e.tileversion&&(t.tileversion=e.tileversion.toString()),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),t}.call(this),this._layerUrl=X.urlAppend(s,X.getParameterString(this.requestParams)),this._layerUrl=function(e,s){var r,i,a=e;switch(s){case n.IPORTAL:(r=(i=Oe.getToken(t._url))?new ue(i,"token"):null)||(r=(i=Oe.getKey(t._url))?new ue(i,"key"):null);break;case n.ONLINE:r=(i=Oe.getKey(t._url))?new ue(i,"key"):null;break;default:r=(i=Oe.getToken(t._url))?new ue(i,"token"):null}return r&&(a=X.urlAppend(a,r.getUrlParameters())),a}(this._layerUrl,e.serverType),this._layerUrl}}setTileSetsInfo(e){this.tileSets=e,Un.isArray(this.tileSets)&&(this.tileSets=e[0]),this.tileSets&&(this.dispatchEvent({type:"tilesetsinfoloaded",value:{tileVersions:this.tileSets.tileVersions}}),this.changeTilesVersion())}lastTilesVersion(){this.tempIndex=this.tileSetsIndex-1,this.changeTilesVersion()}nextTilesVersion(){this.tempIndex=this.tileSetsIndex+1,this.changeTilesVersion()}changeTilesVersion(){var e=this;if(null!=e.tileSets&&!(e.tempIndex===e.tileSetsIndex||this.tempIndex<0)){var t=e.tileSets.tileVersions;if(t&&e.tempIndex<t.length&&e.tempIndex>=0){var s=t[e.tempIndex].name;e.mergeTileVersionParam(s)&&(e.tileSetsIndex=e.tempIndex,e.dispatchEvent({type:"tileversionschanged",value:{tileVersion:t[e.tempIndex]}}))}}}updateCurrentTileSetsIndex(e){this.tempIndex=e}mergeTileVersionParam(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.refresh(),!0)}static optionsFromMapJSON(e,t){var s={};s.url=e,s.crossOrigin="anonymous";var r=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],i=function(){var e,s=r[2]-r[0],i=r[3]-r[1],a=s>=i?s:i;e=a===s?a/t.viewer.width:a/t.viewer.height;var n=[],o=c.METER;t.coordUnit===c.DEGREE&&(o=c.DEGREE);if(t.visibleScalesEnabled&&t.visibleScales&&t.visibleScales.length>0)for(let e=0;e<t.visibleScales.length;e++)n.push(Un.scaleToResolution(t.visibleScales[e],96,o));else for(let t=0;t<22;t++)n.push(e/Math.pow(2,t));return n.sort(function(e,t){return t-e})}();return s.tileGrid=new(mo())({extent:r,resolutions:i}),s}static createTileGrid(e,t,s,r,i){var a=go.createXYZ({extent:e,maxZoom:t,minZoom:s,tileSize:r});return new(mo())({extent:e,minZoom:s,origin:i,resolutions:a.getResolutions(),tileSize:a.getTileSize()})}}var Ao=1,Po=2,Oo=4,Lo=5,Io=484813681109536e-20,No=Math.PI/2,Ro=.16666666666666666,Fo=.04722222222222222,Do=.022156084656084655,ko=1e-10,Go=.017453292519943295,Bo=57.29577951308232,Uo=Math.PI/4,jo=2*Math.PI,Vo=3.14159265359,Ho={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const Jo={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var zo=/[\s_\-\/\(\)]/g;function qo(e,t){if(e[t])return e[t];for(var s,r=Object.keys(e),i=t.toLowerCase().replace(zo,""),a=-1;++a<r.length;)if((s=r[a]).toLowerCase().replace(zo,"")===i)return e[s]}function Wo(e){var t,s,r,i={},a=e.split("+").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var s=t.split("=");return s.push(!0),e[s[0].toLowerCase()]=s[1],e},{}),n={proj:"projName",datum:"datumCode",rf:function(e){i.rf=parseFloat(e)},lat_0:function(e){i.lat0=e*Go},lat_1:function(e){i.lat1=e*Go},lat_2:function(e){i.lat2=e*Go},lat_ts:function(e){i.lat_ts=e*Go},lon_0:function(e){i.long0=e*Go},lon_1:function(e){i.long1=e*Go},lon_2:function(e){i.long2=e*Go},alpha:function(e){i.alpha=parseFloat(e)*Go},lonc:function(e){i.longc=e*Go},x_0:function(e){i.x0=parseFloat(e)},y_0:function(e){i.y0=parseFloat(e)},k_0:function(e){i.k0=parseFloat(e)},k:function(e){i.k0=parseFloat(e)},a:function(e){i.a=parseFloat(e)},b:function(e){i.b=parseFloat(e)},r_a:function(){i.R_A=!0},zone:function(e){i.zone=parseInt(e,10)},south:function(){i.utmSouth=!0},towgs84:function(e){i.datum_params=e.split(",").map(function(e){return parseFloat(e)})},to_meter:function(e){i.to_meter=parseFloat(e)},units:function(e){i.units=e;var t=qo(Jo,e);t&&(i.to_meter=t.to_meter)},from_greenwich:function(e){i.from_greenwich=e*Go},pm:function(e){var t=qo(Ho,e);i.from_greenwich=(t||parseFloat(e))*Go},nadgrids:function(e){"@null"===e?i.datumCode="none":i.nadgrids=e},axis:function(e){3===e.length&&-1!=="ewnsud".indexOf(e.substr(0,1))&&-1!=="ewnsud".indexOf(e.substr(1,1))&&-1!=="ewnsud".indexOf(e.substr(2,1))&&(i.axis=e)}};for(t in a)s=a[t],t in n?"function"==typeof(r=n[t])?r(s):i[r]=s:i[t]=s;return"string"==typeof i.datumCode&&"WGS84"!==i.datumCode&&(i.datumCode=i.datumCode.toLowerCase()),i}const Yo=function(e){return new tl(e).output()};var Xo=1,Qo=/\s/,Ko=/[A-Za-z]/,Zo=/[A-Za-z84]/,$o=/[,\]]/,el=/[\d\.E\-\+]/;function tl(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Xo}function sl(e,t,s){Array.isArray(t)&&(s.unshift(t),t=null);var r=t?{}:e,i=s.reduce(function(e,t){return rl(t,e),e},r);t&&(e[t]=i)}function rl(e,t){if(Array.isArray(e)){var s=e.shift();if("PARAMETER"===s&&(s=e.shift()),1===e.length)return Array.isArray(e[0])?(t[s]={},void rl(e[0],t[s])):void(t[s]=e[0]);if(e.length)if("TOWGS84"!==s){if("AXIS"===s)return s in t||(t[s]=[]),void t[s].push(e);var r;switch(Array.isArray(s)||(t[s]={}),s){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[s]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&rl(e[2],t[s]));case"SPHEROID":case"ELLIPSOID":return t[s]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&rl(e[3],t[s]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void sl(t,s,e);default:for(r=-1;++r<e.length;)if(!Array.isArray(e[r]))return rl(e,t[s]);return sl(t,s,e)}}else t[s]=e;else t[s]=!0}else t[e]=!0}tl.prototype.readCharicter=function(){var e=this.text[this.place++];if(4!==this.state)for(;Qo.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case Xo:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},tl.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if($o.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},tl.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=Xo)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=Xo,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},tl.prototype.number=function(e){if(!el.test(e)){if($o.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},tl.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},tl.prototype.keyword=function(e){if(Zo.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=Xo)}if(!$o.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},tl.prototype.neutral=function(e){if(Ko.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(el.test(e))return this.word=e,void(this.state=3);if(!$o.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},tl.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var il=.017453292519943295;function al(e){return e*il}function nl(e){var t=Yo(e),s=t.shift(),r=t.shift();t.unshift(["name",r]),t.unshift(["type",s]);var i={};return rl(t,i),function(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",s=0,r=e.AXIS.length;s<r;++s){var i=e.AXIS[s][0].toLowerCase();-1!==i.indexOf("north")?t+="n":-1!==i.indexOf("south")?t+="s":-1!==i.indexOf("east")?t+="e":-1!==i.indexOf("west")&&(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var a=e.GEOGCS;function n(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(a=e),a&&(a.DATUM?e.datumCode=a.DATUM.name.toLowerCase():e.datumCode=a.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==e.datumCode&&"new_zealand_1949"!==e.datumCode||(e.datumCode="nzgd49"),"wgs_1984"!==e.datumCode&&"world_geodetic_system_1984"!==e.datumCode||("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(e.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=a.DATUM.SPHEROID.a,e.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(e.datum_params=a.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",al],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",al],["x0","false_easting",n],["y0","false_northing",n],["long0","central_meridian",al],["lat0","latitude_of_origin",al],["lat0","standard_parallel_1",al],["lat1","standard_parallel_1",al],["lat2","standard_parallel_2",al],["azimuth","Azimuth"],["alpha","azimuth",al],["srsCode","name"]].forEach(function(t){return s=e,i=(r=t)[0],a=r[1],void(!(i in s)&&a in s&&(s[i]=s[a],3===r.length&&(s[i]=r[2](s[i]))));var s,r,i,a}),e.long0||!e.longc||"Albers_Conic_Equal_Area"!==e.projName&&"Lambert_Azimuthal_Equal_Area"!==e.projName||(e.long0=e.longc),e.lat_ts||!e.lat1||"Stereographic_South_Pole"!==e.projName&&"Polar Stereographic (variant B)"!==e.projName||(e.lat0=al(e.lat1>0?90:-90),e.lat_ts=e.lat1)}(i),i}function ll(e){var t=this;if(2===arguments.length){var s=arguments[1];"string"==typeof s?"+"===s.charAt(0)?ll[e]=Wo(arguments[1]):ll[e]=nl(arguments[1]):ll[e]=s}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?ll.apply(t,e):ll(e)});if("string"==typeof e){if(e in ll)return ll[e]}else"EPSG"in e?ll["EPSG:"+e.EPSG]=e:"ESRI"in e?ll["ESRI:"+e.ESRI]=e:"IAU2000"in e?ll["IAU2000:"+e.IAU2000]=e:console.log(e);return}}!function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}(ll);const hl=ll;var ul=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var cl=["3857","900913","3785","102113"];const dl=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in hl}(e))return hl[e];if(function(e){return ul.some(function(t){return e.indexOf(t)>-1})}(e)){var t=nl(e);if(function(e){var t=qo(e,"authority");if(t){var s=qo(t,"epsg");return s&&cl.indexOf(s)>-1}}(t))return hl["EPSG:3857"];var s=function(e){var t=qo(e,"extension");if(t)return qo(t,"proj4")}(t);return s?Wo(s):t}return function(e){return"+"===e[0]}(e)?Wo(e):void 0};function pl(e,t){var s,r;if(e=e||{},!t)return e;for(r in t)void 0!==(s=t[r])&&(e[r]=s);return e}function ml(e,t,s){var r=e*t;return s/Math.sqrt(1-r*r)}function fl(e){return e<0?-1:1}function yl(e){return Math.abs(e)<=Vo?e:e-fl(e)*jo}function gl(e,t,s){var r=e*s,i=.5*e;return r=Math.pow((1-r)/(1+r),i),Math.tan(.5*(No-t))/r}function vl(e,t){for(var s,r,i=.5*e,a=No-2*Math.atan(t),n=0;n<=15;n++)if(s=e*Math.sin(a),a+=r=No-2*Math.atan(t*Math.pow((1-s)/(1+s),i))-a,Math.abs(r)<=1e-10)return a;return-9999}function Sl(e){return e}var bl=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var t,s,r=e.x,i=e.y;if(i*Bo>90&&i*Bo<-90&&r*Bo>180&&r*Bo<-180)return null;if(Math.abs(Math.abs(i)-No)<=ko)return null;if(this.sphere)t=this.x0+this.a*this.k0*yl(r-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(Uo+.5*i));else{var a=Math.sin(i),n=gl(this.e,i,a);t=this.x0+this.a*this.k0*yl(r-this.long0),s=this.y0-this.a*this.k0*Math.log(n)}return e.x=t,e.y=s,e},inverse:function(e){var t,s,r=e.x-this.x0,i=e.y-this.y0;if(this.sphere)s=No-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var a=Math.exp(-i/(this.a*this.k0));if(-9999===(s=vl(this.e,a)))return null}return t=yl(this.long0+r/(this.a*this.k0)),e.x=t,e.y=s,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:Sl,inverse:Sl,names:["longlat","identity"]}],xl={},Cl=[];function _l(e,t){var s=Cl.length;return e.names?(Cl[s]=e,e.names.forEach(function(e){xl[e.toLowerCase()]=s}),this):(console.log(t),!0)}const Tl={start:function(){bl.forEach(_l)},add:_l,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==xl[t]&&Cl[xl[t]]?Cl[xl[t]]:void 0}};var wl={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},El=wl.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};wl.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Ml={};Ml.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},Ml.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},Ml.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},Ml.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},Ml.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},Ml.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},Ml.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},Ml.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},Ml.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},Ml.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},Ml.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},Ml.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},Ml.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},Ml.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},Ml.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},Ml.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},Ml.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};const Al=function(e,t,s,r,i,a){var n={};return n.datum_type=void 0===e||"none"===e?Lo:Oo,t&&(n.datum_params=t.map(parseFloat),0===n.datum_params[0]&&0===n.datum_params[1]&&0===n.datum_params[2]||(n.datum_type=Ao),n.datum_params.length>3&&(0===n.datum_params[3]&&0===n.datum_params[4]&&0===n.datum_params[5]&&0===n.datum_params[6]||(n.datum_type=Po,n.datum_params[3]*=Io,n.datum_params[4]*=Io,n.datum_params[5]*=Io,n.datum_params[6]=n.datum_params[6]/1e6+1))),n.a=s,n.b=r,n.es=i,n.ep2=a,n};function Pl(e,t){if(!(this instanceof Pl))return new Pl(e);t=t||function(e){if(e)throw e};var s=dl(e);if("object"==typeof s){var r=Pl.projections.get(s.projName);if(r){if(s.datumCode&&"none"!==s.datumCode){var i=qo(Ml,s.datumCode);i&&(s.datum_params=i.towgs84?i.towgs84.split(","):null,s.ellps=i.ellipse,s.datumName=i.datumName?i.datumName:s.datumCode)}s.k0=s.k0||1,s.axis=s.axis||"enu",s.ellps=s.ellps||"wgs84";var a,n,o,l,h,u,c,d=function(e,t,s,r,i){if(!e){var a=qo(wl,r);a||(a=El),e=a.a,t=a.b,s=a.rf}return s&&!t&&(t=(1-1/s)*e),(0===s||Math.abs(e-t)<ko)&&(i=!0,t=e),{a:e,b:t,rf:s,sphere:i}}(s.a,s.b,s.rf,s.ellps,s.sphere),p=(a=d.a,n=d.b,d.rf,o=s.R_A,u=((l=a*a)-(h=n*n))/l,c=0,o?(l=(a*=1-u*(Ro+u*(Fo+u*Do)))*a,u=0):c=Math.sqrt(u),{es:u,e:c,ep2:(l-h)/h}),m=s.datum||Al(s.datumCode,s.datum_params,d.a,d.b,p.es,p.ep2);pl(this,s),pl(this,r),this.a=d.a,this.b=d.b,this.rf=d.rf,this.sphere=d.sphere,this.es=p.es,this.e=p.e,this.ep2=p.ep2,this.datum=m,this.init(),t(null,this)}else t(e)}else t(e)}Pl.projections=Tl,Pl.projections.start();const Ol=Pl;function Ll(e,t,s){var r,i,a,n,o=e.x,l=e.y,h=e.z?e.z:0;if(l<-No&&l>-1.001*No)l=-No;else if(l>No&&l<1.001*No)l=No;else{if(l<-No)return{x:-1/0,y:-1/0,z:e.z};if(l>No)return{x:1/0,y:1/0,z:e.z}}return o>Math.PI&&(o-=2*Math.PI),i=Math.sin(l),n=Math.cos(l),a=i*i,{x:((r=s/Math.sqrt(1-t*a))+h)*n*Math.cos(o),y:(r+h)*n*Math.sin(o),z:(r*(1-t)+h)*i}}function Il(e,t,s,r){var i,a,n,o,l,h,u,c,d,p,m,f,y,g,v,S=e.x,b=e.y,x=e.z?e.z:0;if(i=Math.sqrt(S*S+b*b),a=Math.sqrt(S*S+b*b+x*x),i/s<1e-12){if(g=0,a/s<1e-12)return No,v=-r,{x:e.x,y:e.y,z:e.z}}else g=Math.atan2(b,S);n=x/a,c=(o=i/a)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*o*o)),d=n*l,y=0;do{y++,h=t*(u=s/Math.sqrt(1-t*d*d))/(u+(v=i*c+x*d-u*(1-t*d*d))),f=(m=n*(l=1/Math.sqrt(1-h*(2-h)*o*o)))*c-(p=o*(1-h)*l)*d,c=p,d=m}while(f*f>1e-24&&y<30);return{x:g,y:Math.atan(m/Math.abs(p)),z:v}}function Nl(e){return e===Ao||e===Po}function Rl(e,t,s){return function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===Ao?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==Po||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t)?s:e.datum_type===Lo||t.datum_type===Lo?s:e.es!==t.es||e.a!==t.a||Nl(e.datum_type)||Nl(t.datum_type)?(s=Ll(s,e.es,e.a),Nl(e.datum_type)&&(s=function(e,t,s){if(t===Ao)return{x:e.x+s[0],y:e.y+s[1],z:e.z+s[2]};if(t===Po){var r=s[0],i=s[1],a=s[2],n=s[3],o=s[4],l=s[5],h=s[6];return{x:h*(e.x-l*e.y+o*e.z)+r,y:h*(l*e.x+e.y-n*e.z)+i,z:h*(-o*e.x+n*e.y+e.z)+a}}}(s,e.datum_type,e.datum_params)),Nl(t.datum_type)&&(s=function(e,t,s){if(t===Ao)return{x:e.x-s[0],y:e.y-s[1],z:e.z-s[2]};if(t===Po){var r=s[0],i=s[1],a=s[2],n=s[3],o=s[4],l=s[5],h=s[6],u=(e.x-r)/h,c=(e.y-i)/h,d=(e.z-a)/h;return{x:u+l*c-o*d,y:-l*u+c+n*d,z:o*u-n*c+d}}}(s,t.datum_type,t.datum_params)),Il(s,t.es,t.a,t.b)):s}function Fl(e,t,s){var r,i,a,n=s.x,o=s.y,l=s.z||0,h={};for(a=0;a<3;a++)if(!t||2!==a||void 0!==s.z)switch(0===a?(r=n,i=-1!=="ew".indexOf(e.axis[a])?"x":"y"):1===a?(r=o,i=-1!=="ns".indexOf(e.axis[a])?"y":"x"):(r=l,i="z"),e.axis[a]){case"e":case"w":case"n":case"s":h[i]=r;break;case"u":void 0!==s[i]&&(h.z=r);break;case"d":void 0!==s[i]&&(h.z=-r);break;default:return null}return h}function Dl(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function kl(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function Gl(e,t,s){var r;if(Array.isArray(s)&&(s=Dl(s)),function(e){kl(e.x),kl(e.y)}(s),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===Ao||e.datum.datum_type===Po)&&"WGS84"!==t.datumCode||(t.datum.datum_type===Ao||t.datum.datum_type===Po)&&"WGS84"!==e.datumCode}(e,t)&&(s=Gl(e,r=new Ol("WGS84"),s),e=r),"enu"!==e.axis&&(s=Fl(e,!1,s)),"longlat"===e.projName)s={x:s.x*Go,y:s.y*Go,z:s.z||0};else if(e.to_meter&&(s={x:s.x*e.to_meter,y:s.y*e.to_meter,z:s.z||0}),!(s=e.inverse(s)))return;return e.from_greenwich&&(s.x+=e.from_greenwich),s=Rl(e.datum,t.datum,s),t.from_greenwich&&(s={x:s.x-t.from_greenwich,y:s.y,z:s.z||0}),"longlat"===t.projName?s={x:s.x*Bo,y:s.y*Bo,z:s.z||0}:(s=t.forward(s),t.to_meter&&(s={x:s.x/t.to_meter,y:s.y/t.to_meter,z:s.z||0})),"enu"!==t.axis?Fl(t,!0,s):s}var Bl=Ol("WGS84");function Ul(e,t,s){var r,i,a;return Array.isArray(s)?(r=Gl(e,t,s)||{x:NaN,y:NaN},s.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(s.splice(3)):[r.x,r.y,s[2]].concat(s.splice(3)):[r.x,r.y].concat(s.splice(2)):[r.x,r.y]):(i=Gl(e,t,s),2===(a=Object.keys(s)).length?i:(a.forEach(function(r){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===r||"y"===r||"z"===r)return}else if("x"===r||"y"===r)return;i[r]=s[r]}),i))}function jl(e){return e instanceof Ol?e:e.oProj?e.oProj:Ol(e)}const Vl=function(e,t,s){e=jl(e);var r,i=!1;return void 0===t?(t=e,e=Bl,i=!0):(void 0!==t.x||Array.isArray(t))&&(s=t,t=e,e=Bl,i=!0),t=jl(t),s?Ul(e,t,s):(r={forward:function(s){return Ul(e,t,s)},inverse:function(s){return Ul(t,e,s)}},i&&(r.oProj=t),r)};var Hl=6,Jl="AJSAJS",zl="AFAFAF",ql=65,Wl=73,Yl=79,Xl=86,Ql=90;const Kl={forward:Zl,inverse:function(e){var t=sh(ih(e.toUpperCase()));if(t.lat&&t.lon)return[t.lon,t.lat,t.lon,t.lat];return[t.left,t.bottom,t.right,t.top]},toPoint:$l};function Zl(e,t){return t=t||5,function(e,t){var s="00000"+e.easting,r="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(p=e.easting,m=e.northing,f=e.zoneNumber,y=rh(f),g=Math.floor(p/1e5),v=Math.floor(m/1e5)%20,i=g,a=v,n=y,o=n-1,l=Jl.charCodeAt(o),h=zl.charCodeAt(o),u=l+i-1,c=h+a,d=!1,u>Ql&&(u=u-Ql+ql-1,d=!0),(u===Wl||l<Wl&&u>Wl||(u>Wl||l<Wl)&&d)&&u++,(u===Yl||l<Yl&&u>Yl||(u>Yl||l<Yl)&&d)&&++u===Wl&&u++,u>Ql&&(u=u-Ql+ql-1),c>Xl?(c=c-Xl+ql-1,d=!0):d=!1,(c===Wl||h<Wl&&c>Wl||(c>Wl||h<Wl)&&d)&&c++,(c===Yl||h<Yl&&c>Yl||(c>Yl||h<Yl)&&d)&&++c===Wl&&c++,c>Xl&&(c=c-Xl+ql-1),String.fromCharCode(u)+String.fromCharCode(c))+s.substr(s.length-5,t)+r.substr(r.length-5,t);var i,a,n,o,l,h,u,c,d;var p,m,f,y,g,v}(function(e){var t,s,r,i,a,n,o,l=e.lat,h=e.lon,u=6378137,c=eh(l),d=eh(h);o=Math.floor((h+180)/6)+1,180===h&&(o=60);l>=56&&l<64&&h>=3&&h<12&&(o=32);l>=72&&l<84&&(h>=0&&h<9?o=31:h>=9&&h<21?o=33:h>=21&&h<33?o=35:h>=33&&h<42&&(o=37));n=eh(6*(o-1)-180+3),.006739496752268451,t=u/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),s=Math.tan(c)*Math.tan(c),r=.006739496752268451*Math.cos(c)*Math.cos(c),i=Math.cos(c)*(d-n),a=u*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c));var p=.9996*t*(i+(1-s+r)*i*i*i/6+(5-18*s+s*s+72*r-.39089081163157013)*i*i*i*i*i/120)+5e5,m=.9996*(a+t*Math.tan(c)*(i*i/2+(5-s+9*r+4*r*r)*i*i*i*i/24+(61-58*s+s*s+600*r-2.2240339282485886)*i*i*i*i*i*i/720));l<0&&(m+=1e7);return{northing:Math.round(m),easting:Math.round(p),zoneNumber:o,zoneLetter:function(e){var t="Z";84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C");return t}(l)}}({lat:e[1],lon:e[0]}),t)}function $l(e){var t=sh(ih(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function eh(e){return e*(Math.PI/180)}function th(e){return e/Math.PI*180}function sh(e){var t=e.northing,s=e.easting,r=e.zoneLetter,i=e.zoneNumber;if(i<0||i>60)return null;var a,n,o,l,h,u,c,d,p=6378137,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),f=s-5e5,y=t;r<"N"&&(y-=1e7),u=6*(i-1)-180+3,d=(c=y/.9996/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*c)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*c)+151*m*m*m/96*Math.sin(6*c),a=p/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),n=Math.tan(d)*Math.tan(d),o=.006739496752268451*Math.cos(d)*Math.cos(d),l=.99330562*p/Math.pow(1-.00669438*Math.sin(d)*Math.sin(d),1.5),h=f/(.9996*a);var g=d-a*Math.tan(d)/l*(h*h/2-(5+3*n+10*o-4*o*o-.06065547077041606)*h*h*h*h/24+(61+90*n+298*o+45*n*n-1.6983531815716497-3*o*o)*h*h*h*h*h*h/720);g=th(g);var v,S=(h-(1+2*n+o)*h*h*h/6+(5-2*o+28*n-3*o*o+.05391597401814761+24*n*n)*h*h*h*h*h/120)/Math.cos(d);if(S=u+th(S),e.accuracy){var b=sh({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});v={top:b.lat,right:b.lon,bottom:g,left:S}}else v={lat:g,lon:S};return v}function rh(e){var t=e%Hl;return 0===t&&(t=Hl),t}function ih(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,s=e.length,r=null,i="",a=0;!/[A-Z]/.test(t=e.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+e;i+=t,a++}var n=parseInt(i,10);if(0===a||a+3>s)throw"MGRSPoint bad conversion from: "+e;var o=e.charAt(a++);if(o<="A"||"B"===o||"Y"===o||o>="Z"||"I"===o||"O"===o)throw"MGRSPoint zone letter "+o+" not handled: "+e;r=e.substring(a,a+=2);for(var l=rh(n),h=function(e,t){var s=Jl.charCodeAt(t-1),r=1e5,i=!1;for(;s!==e.charCodeAt(0);){if(++s===Wl&&s++,s===Yl&&s++,s>Ql){if(i)throw"Bad character: "+e;s=ql,i=!0}r+=1e5}return r}(r.charAt(0),l),u=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var s=zl.charCodeAt(t-1),r=0,i=!1;for(;s!==e.charCodeAt(0);){if(++s===Wl&&s++,s===Yl&&s++,s>Xl){if(i)throw"Bad character: "+e;s=ql,i=!0}r+=1e5}return r}(r.charAt(1),l);u<ah(o);)u+=2e6;var c=s-a;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var d,p,m,f=c/2,y=0,g=0;return f>0&&(d=1e5/Math.pow(10,f),p=e.substring(a,a+f),y=parseFloat(p)*d,m=e.substring(a+f),g=parseFloat(m)*d),{easting:y+h,northing:g+u,zoneLetter:o,zoneNumber:n,accuracy:d}}function ah(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function nh(e,t,s){if(!(this instanceof nh))return new nh(e,t,s);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var r=e.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=e,this.y=t,this.z=s||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}nh.fromMGRS=function(e){return new nh($l(e))},nh.prototype.toMGRS=function(e){return Zl([this.x,this.y],e)};const oh=nh;var lh=1,hh=.25,uh=.046875,ch=.01953125,dh=.01068115234375,ph=.75,mh=.46875,fh=.013020833333333334,yh=.007120768229166667,gh=.3645833333333333,vh=.005696614583333333,Sh=.3076171875;function bh(e){var t=[];t[0]=lh-e*(hh+e*(uh+e*(ch+e*dh))),t[1]=e*(ph-e*(uh+e*(ch+e*dh)));var s=e*e;return t[2]=s*(mh-e*(fh+e*yh)),s*=e,t[3]=s*(gh-e*vh),t[4]=s*e*Sh,t}function xh(e,t,s,r){return s*=t,t*=t,r[0]*e-s*(r[1]+t*(r[2]+t*(r[3]+t*r[4])))}var Ch=20;function _h(e,t,s){for(var r=1/(1-t),i=e,a=Ch;a;--a){var n=Math.sin(i),o=1-t*n*n;if(i-=o=(xh(i,n,Math.cos(i),s)-e)*(o*Math.sqrt(o))*r,Math.abs(o)<ko)return i}return i}const Th={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=bh(this.es),this.ml0=xh(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(e){var t,s,r,i=e.x,a=e.y,n=yl(i-this.long0),o=Math.sin(a),l=Math.cos(a);if(this.es){var h=l*n,u=Math.pow(h,2),c=this.ep2*Math.pow(l,2),d=Math.pow(c,2),p=Math.abs(l)>ko?Math.tan(a):0,m=Math.pow(p,2),f=Math.pow(m,2);t=1-this.es*Math.pow(o,2),h/=Math.sqrt(t);var y=xh(a,o,l,this.en);s=this.a*(this.k0*h*(1+u/6*(1-m+c+u/20*(5-18*m+f+14*c-58*m*c+u/42*(61+179*f-f*m-479*m)))))+this.x0,r=this.a*(this.k0*(y-this.ml0+o*n*h/2*(1+u/12*(5-m+9*c+4*d+u/30*(61+f-58*m+270*c-330*m*c+u/56*(1385+543*f-f*m-3111*m))))))+this.y0}else{var g=l*Math.sin(n);if(Math.abs(Math.abs(g)-1)<ko)return 93;if(s=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,r=l*Math.cos(n)/Math.sqrt(1-Math.pow(g,2)),(g=Math.abs(r))>=1){if(g-1>ko)return 93;r=0}else r=Math.acos(r);a<0&&(r=-r),r=this.a*this.k0*(r-this.lat0)+this.y0}return e.x=s,e.y=r,e},inverse:function(e){var t,s,r,i,a=(e.x-this.x0)*(1/this.a),n=(e.y-this.y0)*(1/this.a);if(this.es)if(s=_h(t=this.ml0+n/this.k0,this.es,this.en),Math.abs(s)<No){var o=Math.sin(s),l=Math.cos(s),h=Math.abs(l)>ko?Math.tan(s):0,u=this.ep2*Math.pow(l,2),c=Math.pow(u,2),d=Math.pow(h,2),p=Math.pow(d,2);t=1-this.es*Math.pow(o,2);var m=a*Math.sqrt(t)/this.k0,f=Math.pow(m,2);r=s-(t*=h)*f/(1-this.es)*.5*(1-f/12*(5+3*d-9*u*d+u-4*c-f/30*(61+90*d-252*u*d+45*p+46*u-f/56*(1385+3633*d+4095*p+1574*p*d)))),i=yl(this.long0+m*(1-f/6*(1+2*d+u-f/20*(5+28*d+24*p+8*u*d+6*u-f/42*(61+662*d+1320*p+720*p*d))))/l)}else r=No*fl(n),i=0;else{var y=Math.exp(a/this.k0),g=.5*(y-1/y),v=this.lat0+n/this.k0,S=Math.cos(v);t=Math.sqrt((1-Math.pow(S,2))/(1+Math.pow(g,2))),r=Math.asin(t),n<0&&(r=-r),i=0===g&&0===S?0:yl(Math.atan2(g,S)+this.long0)}return e.x=i,e.y=r,e},names:["Transverse_Mercator","Transverse Mercator","tmerc"]};function wh(e){var t=Math.exp(e);return t=(t-1/t)/2}function Eh(e,t){e=Math.abs(e),t=Math.abs(t);var s=Math.max(e,t),r=Math.min(e,t)/(s||1);return s*Math.sqrt(1+Math.pow(r,2))}function Mh(e){var t=Math.abs(e);return t=function(e){var t=1+e,s=t-1;return 0===s?e:e*Math.log(t)/s}(t*(1+t/(Eh(1,t)+1))),e<0?-t:t}function Ah(e,t){for(var s,r=2*Math.cos(2*t),i=e.length-1,a=e[i],n=0;--i>=0;)s=r*a-n+e[i],n=a,a=s;return t+s*Math.sin(2*t)}function Ph(e,t,s){for(var r,i,a=Math.sin(t),n=Math.cos(t),o=wh(s),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(s),h=2*n*l,u=-2*a*o,c=e.length-1,d=e[c],p=0,m=0,f=0;--c>=0;)r=m,i=p,d=h*(m=d)-r-u*(p=f)+e[c],f=u*m-i+h*p;return[(h=a*l)*d-(u=n*o)*f,h*f+u*d]}const Oh={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),s=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),s*=t,this.cgb[1]=s*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=s*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),s*=t,this.cgb[2]=s*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=s*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),s*=t,this.cgb[3]=s*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=s*(1237/630+t*(t*(-24832/14175)-2.4)),s*=t,this.cgb[4]=s*(4174/315+t*(-144838/6237)),this.cbg[4]=s*(-734/315+t*(109598/31185)),s*=t,this.cgb[5]=s*(601676/22275),this.cbg[5]=s*(444337/155925),s=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+s*(.25+s*(1/64+s/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=s*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=s*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),s*=t,this.utg[2]=s*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=s*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),s*=t,this.utg[3]=s*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=s*(49561/161280+t*(-179/168+t*(6601661/7257600))),s*=t,this.utg[4]=s*(-4583/161280+t*(108847/3991680)),this.gtu[4]=s*(34729/80640+t*(-3418889/1995840)),s*=t,this.utg[5]=-.03233083094085698*s,this.gtu[5]=.6650675310896665*s;var r=Ah(this.cbg,this.lat0);this.Zb=-this.Qn*(r+function(e,t){for(var s,r=2*Math.cos(t),i=e.length-1,a=e[i],n=0;--i>=0;)s=r*a-n+e[i],n=a,a=s;return Math.sin(t)*s}(this.gtu,2*r))},forward:function(e){var t=yl(e.x-this.long0),s=e.y;s=Ah(this.cbg,s);var r=Math.sin(s),i=Math.cos(s),a=Math.sin(t),n=Math.cos(t);s=Math.atan2(r,n*i),t=Math.atan2(a*i,Eh(r,i*n)),t=Mh(Math.tan(t));var o,l,h=Ph(this.gtu,2*s,2*t);return s+=h[0],t+=h[1],Math.abs(t)<=2.623395162778?(o=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*s+this.Zb)+this.y0):(o=1/0,l=1/0),e.x=o,e.y=l,e},inverse:function(e){var t,s,r=(e.x-this.x0)*(1/this.a),i=(e.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,r/=this.Qn,Math.abs(r)<=2.623395162778){var a=Ph(this.utg,2*i,2*r);i+=a[0],r+=a[1],r=Math.atan(wh(r));var n=Math.sin(i),o=Math.cos(i),l=Math.sin(r),h=Math.cos(r);i=Math.atan2(n*h,Eh(l,h*o)),t=yl((r=Math.atan2(l,h*o))+this.long0),s=Ah(this.cgb,i)}else t=1/0,s=1/0;return e.x=t,e.y=s,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]};const Lh={init:function(){var e=function(e,t){if(void 0===e){if((e=Math.floor(30*(yl(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e}(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*Go,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Oh.init.apply(this),this.forward=Oh.forward,this.inverse=Oh.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function Ih(e,t){return Math.pow((1-e)/(1+e),t)}var Nh=20;const Rh={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Uo)/(Math.pow(Math.tan(.5*this.lat0+Uo),this.C)*Ih(this.e*e,this.ratexp))},forward:function(e){var t=e.x,s=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+Uo),this.C)*Ih(this.e*Math.sin(s),this.ratexp))-No,e.x=this.C*t,e},inverse:function(e){for(var t=e.x/this.C,s=e.y,r=Math.pow(Math.tan(.5*s+Uo)/this.K,1/this.C),i=Nh;i>0&&(s=2*Math.atan(r*Ih(this.e*Math.sin(e.y),-.5*this.e))-No,!(Math.abs(s-e.y)<1e-14));--i)e.y=s;return i?(e.x=t,e.y=s,e):null},names:["gauss"]};const Fh={init:function(){Rh.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,s,r,i;return e.x=yl(e.x-this.long0),Rh.forward.apply(this,[e]),t=Math.sin(e.y),s=Math.cos(e.y),r=Math.cos(e.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*s*r),e.x=i*s*Math.sin(e.x),e.y=i*(this.cosc0*t-this.sinc0*s*r),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,s,r,i,a;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,a=Math.sqrt(e.x*e.x+e.y*e.y)){var n=2*Math.atan2(a,this.R2);t=Math.sin(n),s=Math.cos(n),i=Math.asin(s*this.sinc0+e.y*t*this.cosc0/a),r=Math.atan2(e.x*t,a*this.cosc0*s-e.y*this.sinc0*t)}else i=this.phic0,r=0;return e.x=r,e.y=i,Rh.inverse.apply(this,[e]),e.x=yl(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};const Dh={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ko&&(this.k0=.5*(1+fl(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=ko&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ko&&(this.k0=.5*this.cons*ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/gl(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ml(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-No,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,s,r,i,a,n,o=e.x,l=e.y,h=Math.sin(l),u=Math.cos(l),c=yl(o-this.long0);return Math.abs(Math.abs(o-this.long0)-Math.PI)<=ko&&Math.abs(l+this.lat0)<=ko?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*h+this.coslat0*u*Math.cos(c)),e.x=this.a*t*u*Math.sin(c)+this.x0,e.y=this.a*t*(this.coslat0*h-this.sinlat0*u*Math.cos(c))+this.y0,e):(s=2*Math.atan(this.ssfn_(l,h,this.e))-No,i=Math.cos(s),r=Math.sin(s),Math.abs(this.coslat0)<=ko?(a=gl(this.e,l*this.con,this.con*h),n=2*this.a*this.k0*a/this.cons,e.x=this.x0+n*Math.sin(o-this.long0),e.y=this.y0-this.con*n*Math.cos(o-this.long0),e):(Math.abs(this.sinlat0)<ko?(t=2*this.a*this.k0/(1+i*Math.cos(c)),e.y=t*r):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*r+this.cosX0*i*Math.cos(c))),e.y=t*(this.cosX0*r-this.sinX0*i*Math.cos(c))+this.y0),e.x=t*i*Math.sin(c)+this.x0,e))},inverse:function(e){var t,s,r,i,a;e.x-=this.x0,e.y-=this.y0;var n=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var o=2*Math.atan(n/(2*this.a*this.k0));return t=this.long0,s=this.lat0,n<=ko?(e.x=t,e.y=s,e):(s=Math.asin(Math.cos(o)*this.sinlat0+e.y*Math.sin(o)*this.coslat0/n),t=Math.abs(this.coslat0)<ko?this.lat0>0?yl(this.long0+Math.atan2(e.x,-1*e.y)):yl(this.long0+Math.atan2(e.x,e.y)):yl(this.long0+Math.atan2(e.x*Math.sin(o),n*this.coslat0*Math.cos(o)-e.y*this.sinlat0*Math.sin(o))),e.x=t,e.y=s,e)}if(Math.abs(this.coslat0)<=ko){if(n<=ko)return s=this.lat0,t=this.long0,e.x=t,e.y=s,e;e.x*=this.con,e.y*=this.con,r=n*this.cons/(2*this.a*this.k0),s=this.con*vl(this.e,r),t=this.con*yl(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else i=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,n<=ko?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+e.y*Math.sin(i)*this.cosX0/n),t=yl(this.long0+Math.atan2(e.x*Math.sin(i),n*this.cosX0*Math.cos(i)-e.y*this.sinX0*Math.sin(i)))),s=-1*vl(this.e,Math.tan(.5*(No+a)));return e.x=t,e.y=s,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,t,s){return t*=s,Math.tan(.5*(No+e))*Math.pow((1-t)/(1+t),.5*s)}};const kh={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),s=this.a,r=1/this.rf,i=2*r-Math.pow(r,2),a=this.e=Math.sqrt(i);this.R=this.k0*s*Math.sqrt(1-i)/(1-i*Math.pow(t,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var n=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+a*t)/(1-a*t));this.K=n-this.alpha*o+this.alpha*a/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),s=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),r=-this.alpha*(t+s)+this.K,i=2*(Math.atan(Math.exp(r))-Math.PI/4),a=this.alpha*(e.x-this.lambda0),n=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),o=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return e.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,e.x=this.R*n+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,s=e.y-this.y0,r=t/this.R,i=2*(Math.atan(Math.exp(s/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(r)),n=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(i))),o=this.lambda0+n/this.alpha,l=0,h=a,u=-1e3,c=0;Math.abs(h-u)>1e-7;){if(++c>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=o,e.y=h,e},names:["somerc"]};const Gh={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var e=Math.sin(this.lat0),t=Math.cos(this.lat0),s=this.e*e;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(t,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-s*s);var r,i,a=gl(this.e,this.lat0,e),n=this.bl/t*Math.sqrt((1-this.es)/(1-s*s));if(n*n<1&&(n=1),isNaN(this.longc)){var o=gl(this.e,this.lat1,Math.sin(this.lat1)),l=gl(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(n+Math.sqrt(n*n-1))*Math.pow(a,this.bl):this.el=(n-Math.sqrt(n*n-1))*Math.pow(a,this.bl);var h=Math.pow(o,this.bl),u=Math.pow(l,this.bl);i=.5*((r=this.el/h)-1/r);var c=(this.el*this.el-u*h)/(this.el*this.el+u*h),d=(u-h)/(u+h),p=yl(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(c*Math.tan(.5*this.bl*p)/d)/this.bl,this.long0=yl(this.long0);var m=yl(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*m)/i),this.alpha=Math.asin(n*Math.sin(this.gamma0))}else r=this.lat0>=0?n+Math.sqrt(n*n-1):n-Math.sqrt(n*n-1),this.el=r*Math.pow(a,this.bl),i=.5*(r-1/r),this.gamma0=Math.asin(Math.sin(this.alpha)/n),this.long0=this.longc-Math.asin(i*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(n*n-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(n*n-1),Math.cos(this.alpha))},forward:function(e){var t,s,r,i=e.x,a=e.y,n=yl(i-this.long0);if(Math.abs(Math.abs(a)-No)<=ko)r=a>0?-1:1,s=this.al/this.bl*Math.log(Math.tan(Uo+r*this.gamma0*.5)),t=-1*r*No*this.al/this.bl;else{var o=gl(this.e,a,Math.sin(a)),l=this.el/Math.pow(o,this.bl),h=.5*(l-1/l),u=.5*(l+1/l),c=Math.sin(this.bl*n),d=(h*Math.sin(this.gamma0)-c*Math.cos(this.gamma0))/u;s=Math.abs(Math.abs(d)-1)<=ko?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-d)/(1+d))/this.bl,t=Math.abs(Math.cos(this.bl*n))<=ko?this.al*this.bl*n:this.al*Math.atan2(h*Math.cos(this.gamma0)+c*Math.sin(this.gamma0),Math.cos(this.bl*n))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+s):(t-=this.uc,e.x=this.x0+s*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-s*Math.sin(this.alpha)),e},inverse:function(e){var t,s;this.no_rot?(s=e.y-this.y0,t=e.x-this.x0):(s=(e.x-this.x0)*Math.cos(this.alpha)-(e.y-this.y0)*Math.sin(this.alpha),t=(e.y-this.y0)*Math.cos(this.alpha)+(e.x-this.x0)*Math.sin(this.alpha),t+=this.uc);var r=Math.exp(-1*this.bl*s/this.al),i=.5*(r-1/r),a=.5*(r+1/r),n=Math.sin(this.bl*t/this.al),o=(n*Math.cos(this.gamma0)+i*Math.sin(this.gamma0))/a,l=Math.pow(this.el/Math.sqrt((1+o)/(1-o)),1/this.bl);return Math.abs(o-1)<ko?(e.x=this.long0,e.y=No):Math.abs(o+1)<ko?(e.x=this.long0,e.y=-1*No):(e.y=vl(this.e,l),e.x=yl(this.long0-Math.atan2(i*Math.cos(this.gamma0)-n*Math.sin(this.gamma0),Math.cos(this.bl*t/this.al))/this.bl)),e},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]};const Bh={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<ko)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),s=Math.cos(this.lat1),r=ml(this.e,t,s),i=gl(this.e,this.lat1,t),a=Math.sin(this.lat2),n=Math.cos(this.lat2),o=ml(this.e,a,n),l=gl(this.e,this.lat2,a),h=gl(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>ko?this.ns=Math.log(r/o)/Math.log(i/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=r/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,s=e.y;Math.abs(2*Math.abs(s)-Math.PI)<=ko&&(s=fl(s)*(No-2*ko));var r,i,a=Math.abs(Math.abs(s)-No);if(a>ko)r=gl(this.e,s,Math.sin(s)),i=this.a*this.f0*Math.pow(r,this.ns);else{if((a=s*this.ns)<=0)return null;i=0}var n=this.ns*yl(t-this.long0);return e.x=this.k0*(i*Math.sin(n))+this.x0,e.y=this.k0*(this.rh-i*Math.cos(n))+this.y0,e},inverse:function(e){var t,s,r,i,a,n=(e.x-this.x0)/this.k0,o=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(n*n+o*o),s=1):(t=-Math.sqrt(n*n+o*o),s=-1);var l=0;if(0!==t&&(l=Math.atan2(s*n,s*o)),0!==t||this.ns>0){if(s=1/this.ns,r=Math.pow(t/(this.a*this.f0),s),-9999===(i=vl(this.e,r)))return null}else i=-No;return a=yl(l/this.ns+this.long0),e.x=a,e.y=i,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]};const Uh={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,s,r,i,a,n,o,l=e.x,h=e.y,u=yl(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),s=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),r=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(r)),a=Math.asin(Math.cos(s)*Math.sin(r)/Math.cos(i)),n=this.n*a,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),e.y=o*Math.cos(n)/1,e.x=o*Math.sin(n)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,s,r,i,a,n,o,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),a=Math.sqrt(e.x*e.x+e.y*e.y),i=Math.atan2(e.y,e.x)/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),s=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(t)),e.x=this.long0-s/this.alfa,n=t,o=0;var h=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-e.y)<1e-10&&(o=1),n=e.y,h+=1}while(0===o&&h<15);return h>=15?null:e},names:["Krovak","krovak"]};function jh(e,t,s,r,i){return e*i-t*Math.sin(2*i)+s*Math.sin(4*i)-r*Math.sin(6*i)}function Vh(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function Hh(e){return.375*e*(1+.25*e*(1+.46875*e))}function Jh(e){return.05859375*e*e*(1+.75*e)}function zh(e){return e*e*e*(35/3072)}function qh(e,t,s){var r=t*s;return e/Math.sqrt(1-r*r)}function Wh(e){return Math.abs(e)<No?e:e-fl(e)*Math.PI}function Yh(e,t,s,r,i){var a,n;a=e/t;for(var o=0;o<15;o++)if(a+=n=(e-(t*a-s*Math.sin(2*a)+r*Math.sin(4*a)-i*Math.sin(6*a)))/(t-2*s*Math.cos(2*a)+4*r*Math.cos(4*a)-6*i*Math.cos(6*a)),Math.abs(n)<=1e-10)return a;return NaN}const Xh={init:function(){this.sphere||(this.e0=Vh(this.es),this.e1=Hh(this.es),this.e2=Jh(this.es),this.e3=zh(this.es),this.ml0=this.a*jh(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(e){var t,s,r=e.x,i=e.y;if(r=yl(r-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(i)*Math.sin(r)),s=this.a*(Math.atan2(Math.tan(i),Math.cos(r))-this.lat0);else{var a=Math.sin(i),n=Math.cos(i),o=qh(this.a,this.e,a),l=Math.tan(i)*Math.tan(i),h=r*Math.cos(i),u=h*h,c=this.es*n*n/(1-this.es);t=o*h*(1-u*l*(1/6-(8-l+8*c)*u/120)),s=this.a*jh(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+o*a/n*u*(.5+(5-l+6*c)*u/24)}return e.x=t+this.x0,e.y=s+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,s,r=e.x/this.a,i=e.y/this.a;if(this.sphere){var a=i+this.lat0;t=Math.asin(Math.sin(a)*Math.cos(r)),s=Math.atan2(Math.tan(r),Math.cos(a))}else{var n=Yh(this.ml0/this.a+i,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(n)-No)<=ko)return e.x=this.long0,e.y=No,i<0&&(e.y*=-1),e;var o=qh(this.a,this.e,Math.sin(n)),l=o*o*o/this.a/this.a*(1-this.es),h=Math.pow(Math.tan(n),2),u=r*this.a/o,c=u*u;t=n-o*Math.tan(n)/l*u*u*(.5-(1+3*h)*u*u/24),s=u*(1-c*(h/3+(1+3*h)*h*c/15))/Math.cos(n)}return e.x=yl(s+this.long0),e.y=Wh(t),e},names:["Cassini","Cassini_Soldner","cass"]};function Qh(e,t){var s;return e>1e-7?(1-e*e)*(t/(1-(s=e*t)*s)-.5/e*Math.log((1-s)/(1+s))):2*t}var Kh=.3333333333333333,Zh=.17222222222222222,$h=.10257936507936508,eu=.06388888888888888,tu=.0664021164021164,su=.016415012942191543;const ru={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-No)<ko?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<ko?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=Qh(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,s=[];return s[0]=e*Kh,t=e*e,s[0]+=t*Zh,s[1]=t*eu,t*=e,s[0]+=t*$h,s[1]+=t*tu,s[2]=t*su,s}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Qh(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var t,s,r,i,a,n,o,l,h,u,c=e.x,d=e.y;if(c=yl(c-this.long0),this.sphere){if(a=Math.sin(d),u=Math.cos(d),r=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((s=this.mode===this.EQUIT?1+u*r:1+this.sinph0*a+this.cosph0*u*r)<=ko)return null;t=(s=Math.sqrt(2/s))*u*Math.sin(c),s*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(d+this.lat0)<ko)return null;s=Uo-.5*d,t=(s=2*(this.mode===this.S_POLE?Math.cos(s):Math.sin(s)))*Math.sin(c),s*=r}}else{switch(o=0,l=0,h=0,r=Math.cos(c),i=Math.sin(c),a=Math.sin(d),n=Qh(this.e,a),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(o=n/this.qp,l=Math.sqrt(1-o*o)),this.mode){case this.OBLIQ:h=1+this.sinb1*o+this.cosb1*l*r;break;case this.EQUIT:h=1+l*r;break;case this.N_POLE:h=No+d,n=this.qp-n;break;case this.S_POLE:h=d-No,n=this.qp+n}if(Math.abs(h)<ko)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),s=this.mode===this.OBLIQ?this.ymf*h*(this.cosb1*o-this.sinb1*l*r):(h=Math.sqrt(2/(1+l*r)))*o*this.ymf,t=this.xmf*h*l*i;break;case this.N_POLE:case this.S_POLE:n>=0?(t=(h=Math.sqrt(n))*i,s=r*(this.mode===this.S_POLE?h:-h)):t=s=0}}return e.x=this.a*t+this.x0,e.y=this.a*s+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,s,r,i,a,n,o,l,h,u,c=e.x/this.a,d=e.y/this.a;if(this.sphere){var p,m=0,f=0;if((s=.5*(p=Math.sqrt(c*c+d*d)))>1)return null;switch(s=2*Math.asin(s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(f=Math.sin(s),m=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(p)<=ko?0:Math.asin(d*f/p),c*=f,d=m*p;break;case this.OBLIQ:s=Math.abs(p)<=ko?this.lat0:Math.asin(m*this.sinph0+d*f*this.cosph0/p),c*=f*this.cosph0,d=(m-Math.sin(s)*this.sinph0)*p;break;case this.N_POLE:d=-d,s=No-s;break;case this.S_POLE:s-=No}t=0!==d||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(c,d):0}else{if(o=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c/=this.dd,d*=this.dd,(n=Math.sqrt(c*c+d*d))<ko)return e.x=this.long0,e.y=this.lat0,e;i=2*Math.asin(.5*n/this.rq),r=Math.cos(i),c*=i=Math.sin(i),this.mode===this.OBLIQ?(o=r*this.sinb1+d*i*this.cosb1/n,a=this.qp*o,d=n*this.cosb1*r-d*this.sinb1*i):(o=d*i/n,a=this.qp*o,d=n*r)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(d=-d),!(a=c*c+d*d))return e.x=this.long0,e.y=this.lat0,e;o=1-a/this.qp,this.mode===this.S_POLE&&(o=-o)}t=Math.atan2(c,d),l=Math.asin(o),h=this.apa,u=l+l,s=l+h[0]*Math.sin(u)+h[1]*Math.sin(u+u)+h[2]*Math.sin(u+u+u)}return e.x=yl(this.long0+t),e.y=s,e},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function iu(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}const au={init:function(){Math.abs(this.lat1+this.lat2)<ko||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ml(this.e3,this.sin_po,this.cos_po),this.qs1=Qh(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ml(this.e3,this.sin_po,this.cos_po),this.qs2=Qh(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Qh(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>ko?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,s=e.y;this.sin_phi=Math.sin(s),this.cos_phi=Math.cos(s);var r=Qh(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,a=this.ns0*yl(t-this.long0),n=i*Math.sin(a)+this.x0,o=this.rh-i*Math.cos(a)+this.y0;return e.x=n,e.y=o,e},inverse:function(e){var t,s,r,i,a,n;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),r=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),r=-1),i=0,0!==t&&(i=Math.atan2(r*e.x,r*e.y)),r=t*this.ns0/this.a,this.sphere?n=Math.asin((this.c-r*r)/(2*this.ns0)):(s=(this.c-r*r)/this.ns0,n=this.phi1z(this.e3,s)),a=yl(i/this.ns0+this.long0),e.x=a,e.y=n,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var s,r,i,a,n,o=iu(.5*t);if(e<ko)return o;for(var l=e*e,h=1;h<=25;h++)if(s=Math.sin(o),r=Math.cos(o),o+=n=.5*(a=1-(i=e*s)*i)*a/r*(t/(1-l)-s/a+.5/e*Math.log((1-i)/(1+i))),Math.abs(n)<=1e-7)return o;return null}};const nu={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(e){var t,s,r,i,a,n,o,l=e.x,h=e.y;return r=yl(l-this.long0),t=Math.sin(h),s=Math.cos(h),i=Math.cos(r),(a=this.sin_p14*t+this.cos_p14*s*i)>0||Math.abs(a)<=ko?(n=this.x0+1*this.a*s*Math.sin(r)/a,o=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*s*i)/a):(n=this.x0+this.infinity_dist*s*Math.sin(r),o=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*s*i)),e.x=n,e.y=o,e},inverse:function(e){var t,s,r,i,a,n;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(i=Math.atan2(t,this.rc),s=Math.sin(i),n=iu((r=Math.cos(i))*this.sin_p14+e.y*s*this.cos_p14/t),a=Math.atan2(e.x*s,t*this.cos_p14*r-e.y*this.sin_p14*s),a=yl(this.long0+a)):(n=this.phic0,a=0),e.x=a,e.y=n,e},names:["gnom"]};const ou={init:function(){this.sphere||(this.k0=ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,s,r=e.x,i=e.y,a=yl(r-this.long0);if(this.sphere)t=this.x0+this.a*a*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var n=Qh(this.e,Math.sin(i));t=this.x0+this.a*this.k0*a,s=this.y0+this.a*n*.5/this.k0}return e.x=t,e.y=s,e},inverse:function(e){var t,s;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=yl(this.long0+e.x/this.a/Math.cos(this.lat_ts)),s=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(s=function(e,t){var s=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-s)<1e-6)return t<0?-1*No:No;for(var r,i,a,n,o=Math.asin(.5*t),l=0;l<30;l++)if(i=Math.sin(o),a=Math.cos(o),n=e*i,o+=r=Math.pow(1-n*n,2)/(2*a)*(t/(1-e*e)-i/(1-n*n)+.5/e*Math.log((1-n)/(1+n))),Math.abs(r)<=1e-10)return o;return NaN}(this.e,2*e.y*this.k0/this.a),t=yl(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=s,e},names:["cea"]};const lu={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,s=e.y,r=yl(t-this.long0),i=Wh(s-this.lat0);return e.x=this.x0+this.a*r*this.rc,e.y=this.y0+this.a*i,e},inverse:function(e){var t=e.x,s=e.y;return e.x=yl(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=Wh(this.lat0+(s-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var hu=20;const uu={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Vh(this.es),this.e1=Hh(this.es),this.e2=Jh(this.es),this.e3=zh(this.es),this.ml0=this.a*jh(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,s,r,i=e.x,a=e.y,n=yl(i-this.long0);if(r=n*Math.sin(a),this.sphere)Math.abs(a)<=ko?(t=this.a*n,s=-1*this.a*this.lat0):(t=this.a*Math.sin(r)/Math.tan(a),s=this.a*(Wh(a-this.lat0)+(1-Math.cos(r))/Math.tan(a)));else if(Math.abs(a)<=ko)t=this.a*n,s=-1*this.ml0;else{var o=qh(this.a,this.e,Math.sin(a))/Math.tan(a);t=o*Math.sin(r),s=this.a*jh(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+o*(1-Math.cos(r))}return e.x=t+this.x0,e.y=s+this.y0,e},inverse:function(e){var t,s,r,i,a,n,o,l,h;if(r=e.x-this.x0,i=e.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=ko)t=yl(r/this.a+this.long0),s=0;else{var u;for(n=this.lat0+i/this.a,o=r*r/this.a/this.a+n*n,l=n,a=hu;a;--a)if(l+=h=-1*(n*(l*(u=Math.tan(l))+1)-l-.5*(l*l+o)*u)/((l-n)/u-1),Math.abs(h)<=ko){s=l;break}t=yl(this.long0+Math.asin(r*Math.tan(l)/this.a)/Math.sin(s))}else if(Math.abs(i+this.ml0)<=ko)s=0,t=yl(this.long0+r/this.a);else{var c,d,p,m,f;for(n=(this.ml0+i)/this.a,o=r*r/this.a/this.a+n*n,l=n,a=hu;a;--a)if(f=this.e*Math.sin(l),c=Math.sqrt(1-f*f)*Math.tan(l),d=this.a*jh(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=h=(n*(c*(m=d/this.a)+1)-m-.5*c*(m*m+o))/(this.es*Math.sin(2*l)*(m*m+o-2*n*m)/(4*c)+(n-m)*(c*p-2/Math.sin(2*l))-p),Math.abs(h)<=ko){s=l;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(s),2))*Math.tan(s),t=yl(this.long0+Math.asin(r*c/this.a)/Math.sin(s))}return e.x=t,e.y=s,e},names:["Polyconic","poly"]};const cu={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var t,s=e.x,r=e.y-this.lat0,i=s-this.long0,a=r/Io*1e-5,n=i,o=1,l=0;for(t=1;t<=10;t++)o*=a,l+=this.A[t]*o;var h,u=l,c=n,d=1,p=0,m=0,f=0;for(t=1;t<=6;t++)h=p*u+d*c,d=d*u-p*c,p=h,m=m+this.B_re[t]*d-this.B_im[t]*p,f=f+this.B_im[t]*d+this.B_re[t]*p;return e.x=f*this.a+this.x0,e.y=m*this.a+this.y0,e},inverse:function(e){var t,s,r=e.x,i=e.y,a=r-this.x0,n=(i-this.y0)/this.a,o=a/this.a,l=1,h=0,u=0,c=0;for(t=1;t<=6;t++)s=h*n+l*o,l=l*n-h*o,h=s,u=u+this.C_re[t]*l-this.C_im[t]*h,c=c+this.C_im[t]*l+this.C_re[t]*h;for(var d=0;d<this.iterations;d++){var p,m=u,f=c,y=n,g=o;for(t=2;t<=6;t++)p=f*u+m*c,m=m*u-f*c,f=p,y+=(t-1)*(this.B_re[t]*m-this.B_im[t]*f),g+=(t-1)*(this.B_im[t]*m+this.B_re[t]*f);m=1,f=0;var v=this.B_re[1],S=this.B_im[1];for(t=2;t<=6;t++)p=f*u+m*c,m=m*u-f*c,f=p,v+=t*(this.B_re[t]*m-this.B_im[t]*f),S+=t*(this.B_im[t]*m+this.B_re[t]*f);var b=v*v+S*S;u=(y*v+g*S)/b,c=(g*v-y*S)/b}var x=u,C=c,_=1,T=0;for(t=1;t<=9;t++)_*=x,T+=this.D[t]*_;var w=this.lat0+T*Io*1e5,E=this.long0+C;return e.x=E,e.y=w,e},names:["New_Zealand_Map_Grid","nzmg"]};const du={init:function(){},forward:function(e){var t=e.x,s=e.y,r=yl(t-this.long0),i=this.x0+this.a*r,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+s/2.5))*1.25;return e.x=i,e.y=a,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t=yl(this.long0+e.x/this.a),s=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=s,e},names:["Miller_Cylindrical","mill"]};var pu=20;const mu={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=bh(this.es)},forward:function(e){var t,s,r=e.x,i=e.y;if(r=yl(r-this.long0),this.sphere){if(this.m)for(var a=this.n*Math.sin(i),n=pu;n;--n){var o=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=o,Math.abs(o)<ko)break}else i=1!==this.n?Math.asin(this.n*Math.sin(i)):i;t=this.a*this.C_x*r*(this.m+Math.cos(i)),s=this.a*this.C_y*i}else{var l=Math.sin(i),h=Math.cos(i);s=this.a*xh(i,l,h,this.en),t=this.a*r*h/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=s,e},inverse:function(e){var t,s,r;return e.x-=this.x0,s=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,s/=this.C_x*(this.m+Math.cos(t)),this.m?t=iu((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=iu(Math.sin(t)/this.n)),s=yl(s+this.long0),t=Wh(t)):(t=_h(e.y/this.a,this.es,this.en),(r=Math.abs(t))<No?(r=Math.sin(t),s=yl(this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)))):r-ko<No&&(s=this.long0)),e.x=s,e.y=t,e},names:["Sinusoidal","sinu"]};const fu={init:function(){},forward:function(e){for(var t=e.x,s=e.y,r=yl(t-this.long0),i=s,a=Math.PI*Math.sin(s);;){var n=-(i+Math.sin(i)-a)/(1+Math.cos(i));if(i+=n,Math.abs(n)<ko)break}i/=2,Math.PI/2-Math.abs(s)<ko&&(r=0);var o=.900316316158*this.a*r*Math.cos(i)+this.x0,l=1.4142135623731*this.a*Math.sin(i)+this.y0;return e.x=o,e.y=l,e},inverse:function(e){var t,s;e.x-=this.x0,e.y-=this.y0,s=e.y/(1.4142135623731*this.a),Math.abs(s)>.999999999999&&(s=.999999999999),t=Math.asin(s);var r=yl(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),s=(2*t+Math.sin(2*t))/Math.PI,Math.abs(s)>1&&(s=1);var i=Math.asin(s);return e.x=r,e.y=i,e},names:["Mollweide","moll"]};const yu={init:function(){Math.abs(this.lat1+this.lat2)<ko||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Vh(this.es),this.e1=Hh(this.es),this.e2=Jh(this.es),this.e3=zh(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=ml(this.e,this.sinphi,this.cosphi),this.ml1=jh(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<ko?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=ml(this.e,this.sinphi,this.cosphi),this.ml2=jh(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=jh(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(e){var t,s=e.x,r=e.y;if(this.sphere)t=this.a*(this.g-r);else{var i=jh(this.e0,this.e1,this.e2,this.e3,r);t=this.a*(this.g-i)}var a=this.ns*yl(s-this.long0),n=this.x0+t*Math.sin(a),o=this.y0+this.rh-t*Math.cos(a);return e.x=n,e.y=o,e},inverse:function(e){var t,s,r,i;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(s=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(s=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var a=0;return 0!==s&&(a=Math.atan2(t*e.x,t*e.y)),this.sphere?(i=yl(this.long0+a/this.ns),r=Wh(this.g-s/this.a),e.x=i,e.y=r,e):(r=Yh(this.g-s/this.a,this.e0,this.e1,this.e2,this.e3),i=yl(this.long0+a/this.ns),e.x=i,e.y=r,e)},names:["Equidistant_Conic","eqdc"]};const gu={init:function(){this.R=this.a},forward:function(e){var t,s,r=e.x,i=e.y,a=yl(r-this.long0);Math.abs(i)<=ko&&(t=this.x0+this.R*a,s=this.y0);var n=iu(2*Math.abs(i/Math.PI));(Math.abs(a)<=ko||Math.abs(Math.abs(i)-No)<=ko)&&(t=this.x0,s=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var o=.5*Math.abs(Math.PI/a-a/Math.PI),l=o*o,h=Math.sin(n),u=Math.cos(n),c=u/(h+u-1),d=c*c,p=c*(2/h-1),m=p*p,f=Math.PI*this.R*(o*(c-m)+Math.sqrt(l*(c-m)*(c-m)-(m+l)*(d-m)))/(m+l);a<0&&(f=-f),t=this.x0+f;var y=l+c;return f=Math.PI*this.R*(p*y-o*Math.sqrt((m+l)*(l+1)-y*y))/(m+l),s=i>=0?this.y0+f:this.y0-f,e.x=t,e.y=s,e},inverse:function(e){var t,s,r,i,a,n,o,l,h,u,c,d;return e.x-=this.x0,e.y-=this.y0,c=Math.PI*this.R,a=(r=e.x/c)*r+(i=e.y/c)*i,c=3*(i*i/(l=-2*(n=-Math.abs(i)*(1+a))+1+2*i*i+a*a)+(2*(o=n-2*i*i+r*r)*o*o/l/l/l-9*n*o/l/l)/27)/(h=(n-o*o/3/l)/l)/(u=2*Math.sqrt(-h/3)),Math.abs(c)>1&&(c=c>=0?1:-1),d=Math.acos(c)/3,s=e.y>=0?(-u*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI:-(-u*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI,t=Math.abs(r)<ko?this.long0:yl(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(r*r-i*i)+a*a))/2/r),e.x=t,e.y=s,e},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};const vu={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(e){var t,s,r,i,a,n,o,l,h,u,c,d,p,m,f,y,g,v,S,b,x,C,_=e.x,T=e.y,w=Math.sin(e.y),E=Math.cos(e.y),M=yl(_-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=ko?(e.x=this.x0+this.a*(No-T)*Math.sin(M),e.y=this.y0-this.a*(No-T)*Math.cos(M),e):Math.abs(this.sin_p12+1)<=ko?(e.x=this.x0+this.a*(No+T)*Math.sin(M),e.y=this.y0+this.a*(No+T)*Math.cos(M),e):(v=this.sin_p12*w+this.cos_p12*E*Math.cos(M),g=(y=Math.acos(v))?y/Math.sin(y):1,e.x=this.x0+this.a*g*E*Math.sin(M),e.y=this.y0+this.a*g*(this.cos_p12*w-this.sin_p12*E*Math.cos(M)),e):(t=Vh(this.es),s=Hh(this.es),r=Jh(this.es),i=zh(this.es),Math.abs(this.sin_p12-1)<=ko?(a=this.a*jh(t,s,r,i,No),n=this.a*jh(t,s,r,i,T),e.x=this.x0+(a-n)*Math.sin(M),e.y=this.y0-(a-n)*Math.cos(M),e):Math.abs(this.sin_p12+1)<=ko?(a=this.a*jh(t,s,r,i,No),n=this.a*jh(t,s,r,i,T),e.x=this.x0+(a+n)*Math.sin(M),e.y=this.y0+(a+n)*Math.cos(M),e):(o=w/E,l=qh(this.a,this.e,this.sin_p12),h=qh(this.a,this.e,w),u=Math.atan((1-this.es)*o+this.es*l*this.sin_p12/(h*E)),S=0===(c=Math.atan2(Math.sin(M),this.cos_p12*Math.tan(u)-this.sin_p12*Math.cos(M)))?Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.abs(Math.abs(c)-Math.PI)<=ko?-Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.asin(Math.sin(M)*Math.cos(u)/Math.sin(c)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),y=l*S*(1-(b=S*S)*(f=(p=this.e*this.cos_p12*Math.cos(c)/Math.sqrt(1-this.es))*p)*(1-f)/6+(x=b*S)/8*(m=d*p)*(1-2*f)+(C=x*S)/120*(f*(4-7*f)-3*d*d*(1-7*f))-C*S/48*m),e.x=this.x0+y*Math.sin(c),e.y=this.y0+y*Math.cos(c),e))},inverse:function(e){var t,s,r,i,a,n,o,l,h,u,c,d,p,m,f,y,g,v,S,b,x,C,_;if(e.x-=this.x0,e.y-=this.y0,this.sphere){if((t=Math.sqrt(e.x*e.x+e.y*e.y))>2*No*this.a)return;return s=t/this.a,r=Math.sin(s),i=Math.cos(s),a=this.long0,Math.abs(t)<=ko?n=this.lat0:(n=iu(i*this.sin_p12+e.y*r*this.cos_p12/t),o=Math.abs(this.lat0)-No,a=Math.abs(o)<=ko?this.lat0>=0?yl(this.long0+Math.atan2(e.x,-e.y)):yl(this.long0-Math.atan2(-e.x,e.y)):yl(this.long0+Math.atan2(e.x*r,t*this.cos_p12*i-e.y*this.sin_p12*r))),e.x=a,e.y=n,e}return l=Vh(this.es),h=Hh(this.es),u=Jh(this.es),c=zh(this.es),Math.abs(this.sin_p12-1)<=ko?(n=Yh(((d=this.a*jh(l,h,u,c,No))-(t=Math.sqrt(e.x*e.x+e.y*e.y)))/this.a,l,h,u,c),a=yl(this.long0+Math.atan2(e.x,-1*e.y)),e.x=a,e.y=n,e):Math.abs(this.sin_p12+1)<=ko?(d=this.a*jh(l,h,u,c,No),n=Yh(((t=Math.sqrt(e.x*e.x+e.y*e.y))-d)/this.a,l,h,u,c),a=yl(this.long0+Math.atan2(e.x,e.y)),e.x=a,e.y=n,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),f=Math.atan2(e.x,e.y),p=qh(this.a,this.e,this.sin_p12),y=Math.cos(f),v=-(g=this.e*this.cos_p12*y)*g/(1-this.es),S=3*this.es*(1-v)*this.sin_p12*this.cos_p12*y/(1-this.es),C=1-v*(x=(b=t/p)-v*(1+v)*Math.pow(b,3)/6-S*(1+3*v)*Math.pow(b,4)/24)*x/2-b*x*x*x/6,m=Math.asin(this.sin_p12*Math.cos(x)+this.cos_p12*Math.sin(x)*y),a=yl(this.long0+Math.asin(Math.sin(f)*Math.sin(x)/Math.cos(m))),_=Math.sin(m),n=Math.atan2((_-this.es*C*this.sin_p12)*Math.tan(m),_*(1-this.es)),e.x=a,e.y=n,e)},names:["Azimuthal_Equidistant","aeqd"]};const Su={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,s,r,i,a,n,o,l=e.x,h=e.y;return r=yl(l-this.long0),t=Math.sin(h),s=Math.cos(h),i=Math.cos(r),((a=this.sin_p14*t+this.cos_p14*s*i)>0||Math.abs(a)<=ko)&&(n=1*this.a*s*Math.sin(r),o=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*s*i)),e.x=n,e.y=o,e},inverse:function(e){var t,s,r,i,a,n,o;return e.x-=this.x0,e.y-=this.y0,s=iu((t=Math.sqrt(e.x*e.x+e.y*e.y))/this.a),r=Math.sin(s),i=Math.cos(s),n=this.long0,Math.abs(t)<=ko?(o=this.lat0,e.x=n,e.y=o,e):(o=iu(i*this.sin_p14+e.y*r*this.cos_p14/t),a=Math.abs(this.lat0)-No,Math.abs(a)<=ko?(n=this.lat0>=0?yl(this.long0+Math.atan2(e.x,-e.y)):yl(this.long0-Math.atan2(-e.x,e.y)),e.x=n,e.y=o,e):(n=yl(this.long0+Math.atan2(e.x*r,t*this.cos_p14*i-e.y*this.sin_p14*r)),e.x=n,e.y=o,e))},names:["ortho"]};var bu={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},xu={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Cu(e,t,s,r){var i;return e<ko?(r.value=xu.AREA_0,i=0):(i=Math.atan2(t,s),Math.abs(i)<=Uo?r.value=xu.AREA_0:i>Uo&&i<=No+Uo?(r.value=xu.AREA_1,i-=No):i>No+Uo||i<=-(No+Uo)?(r.value=xu.AREA_2,i=i>=0?i-Vo:i+Vo):(r.value=xu.AREA_3,i+=No)),i}function _u(e,t){var s=e+t;return s<-Vo?s+=jo:s>+Vo&&(s-=jo),s}const Tu={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=No-Uo/2?this.face=bu.TOP:this.lat0<=-(No-Uo/2)?this.face=bu.BOTTOM:Math.abs(this.long0)<=Uo?this.face=bu.FRONT:Math.abs(this.long0)<=No+Uo?this.face=this.long0>0?bu.RIGHT:bu.LEFT:this.face=bu.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var t,s,r,i,a,n,o={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,s=e.x,this.face===bu.TOP)i=No-t,s>=Uo&&s<=No+Uo?(l.value=xu.AREA_0,r=s-No):s>No+Uo||s<=-(No+Uo)?(l.value=xu.AREA_1,r=s>0?s-Vo:s+Vo):s>-(No+Uo)&&s<=-Uo?(l.value=xu.AREA_2,r=s+No):(l.value=xu.AREA_3,r=s);else if(this.face===bu.BOTTOM)i=No+t,s>=Uo&&s<=No+Uo?(l.value=xu.AREA_0,r=-s+No):s<Uo&&s>=-Uo?(l.value=xu.AREA_1,r=-s):s<-Uo&&s>=-(No+Uo)?(l.value=xu.AREA_2,r=-s-No):(l.value=xu.AREA_3,r=s>0?-s+Vo:-s-Vo);else{var h,u,c,d,p,m;this.face===bu.RIGHT?s=_u(s,+No):this.face===bu.BACK?s=_u(s,+Vo):this.face===bu.LEFT&&(s=_u(s,-No)),d=Math.sin(t),p=Math.cos(t),m=Math.sin(s),h=p*Math.cos(s),u=p*m,c=d,this.face===bu.FRONT?r=Cu(i=Math.acos(h),c,u,l):this.face===bu.RIGHT?r=Cu(i=Math.acos(u),c,-h,l):this.face===bu.BACK?r=Cu(i=Math.acos(-h),c,-u,l):this.face===bu.LEFT?r=Cu(i=Math.acos(-u),c,h,l):(i=r=0,l.value=xu.AREA_0)}return n=Math.atan(12/Vo*(r+Math.acos(Math.sin(r)*Math.cos(Uo))-No)),a=Math.sqrt((1-Math.cos(i))/(Math.cos(n)*Math.cos(n))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===xu.AREA_1?n+=No:l.value===xu.AREA_2?n+=Vo:l.value===xu.AREA_3&&(n+=1.5*Vo),o.x=a*Math.cos(n),o.y=a*Math.sin(n),o.x=o.x*this.a+this.x0,o.y=o.y*this.a+this.y0,e.x=o.x,e.y=o.y,e},inverse:function(e){var t,s,r,i,a,n,o,l,h,u,c,d,p={lam:0,phi:0},m={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,s=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?m.value=xu.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(m.value=xu.AREA_1,t-=No):e.x<0&&-e.x>=Math.abs(e.y)?(m.value=xu.AREA_2,t=t<0?t+Vo:t-Vo):(m.value=xu.AREA_3,t+=No),h=Vo/12*Math.tan(t),a=Math.sin(h)/(Math.cos(h)-1/Math.sqrt(2)),n=Math.atan(a),(o=1-(r=Math.cos(t))*r*(i=Math.tan(s))*i*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?o=-1:o>1&&(o=1),this.face===bu.TOP)l=Math.acos(o),p.phi=No-l,m.value===xu.AREA_0?p.lam=n+No:m.value===xu.AREA_1?p.lam=n<0?n+Vo:n-Vo:m.value===xu.AREA_2?p.lam=n-No:p.lam=n;else if(this.face===bu.BOTTOM)l=Math.acos(o),p.phi=l-No,m.value===xu.AREA_0?p.lam=-n+No:m.value===xu.AREA_1?p.lam=-n:m.value===xu.AREA_2?p.lam=-n-No:p.lam=n<0?-n-Vo:-n+Vo;else{var f,y,g;h=(f=o)*f,y=(h+=(g=h>=1?0:Math.sqrt(1-h)*Math.sin(n))*g)>=1?0:Math.sqrt(1-h),m.value===xu.AREA_1?(h=y,y=-g,g=h):m.value===xu.AREA_2?(y=-y,g=-g):m.value===xu.AREA_3&&(h=y,y=g,g=-h),this.face===bu.RIGHT?(h=f,f=-y,y=h):this.face===bu.BACK?(f=-f,y=-y):this.face===bu.LEFT&&(h=f,f=y,y=-h),p.phi=Math.acos(-g)-No,p.lam=Math.atan2(y,f),this.face===bu.RIGHT?p.lam=_u(p.lam,-No):this.face===bu.BACK?p.lam=_u(p.lam,-Vo):this.face===bu.LEFT&&(p.lam=_u(p.lam,+No))}return 0!==this.es&&(u=p.phi<0?1:0,c=Math.tan(p.phi),d=this.b/Math.sqrt(c*c+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),u&&(p.phi=-p.phi)),p.lam+=this.long0,e.x=p.lam,e.y=p.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var wu=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Eu=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Mu=.8487,Au=1.3523,Pu=Bo/5,Ou=1/Pu,Lu=18,Iu=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Nu=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};const Ru={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=yl(e.x-this.long0),s=Math.abs(e.y),r=Math.floor(s*Pu);r<0?r=0:r>=Lu&&(r=Lu-1),s=Bo*(s-Ou*r);var i={x:Iu(wu[r],s)*t,y:Iu(Eu[r],s)};return e.y<0&&(i.y=-i.y),i.x=i.x*this.a*Mu+this.x0,i.y=i.y*this.a*Au+this.y0,i},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*Mu),y:Math.abs(e.y-this.y0)/(this.a*Au)};if(t.y>=1)t.x/=wu[Lu][0],t.y=e.y<0?-No:No;else{var s=Math.floor(t.y*Lu);for(s<0?s=0:s>=Lu&&(s=Lu-1);;)if(Eu[s][0]>t.y)--s;else{if(!(Eu[s+1][0]<=t.y))break;++s}var r=Eu[s],i=5*(t.y-r[0])/(Eu[s+1][0]-r[0]);i=function(e,t,s,r){for(var i=t;r;--r){var a=e(i);if(i-=a,Math.abs(a)<s)break}return i}(function(e){return(Iu(r,e)-t.y)/Nu(r,e)},i,ko,100),t.x/=Iu(wu[s],i),t.y=(5*s+i)*Go,e.y<0&&(t.y=-t.y)}return t.x=yl(t.x+this.long0),t},names:["Robinson","robin"]};const Fu={init:function(){this.name="geocent"},forward:function(e){return Ll(e,this.es,this.a)},inverse:function(e){return Il(e,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};Vl.defaultDatum="WGS84",Vl.Proj=Ol,Vl.WGS84=new Vl.Proj("WGS84"),Vl.Point=oh,Vl.toPoint=Dl,Vl.defs=hl,Vl.transform=Gl,Vl.mgrs=Kl,Vl.version="__VERSION__",function(e){e.Proj.projections.add(Th),e.Proj.projections.add(Oh),e.Proj.projections.add(Lh),e.Proj.projections.add(Fh),e.Proj.projections.add(Dh),e.Proj.projections.add(kh),e.Proj.projections.add(Gh),e.Proj.projections.add(Bh),e.Proj.projections.add(Uh),e.Proj.projections.add(Xh),e.Proj.projections.add(ru),e.Proj.projections.add(au),e.Proj.projections.add(nu),e.Proj.projections.add(ou),e.Proj.projections.add(lu),e.Proj.projections.add(uu),e.Proj.projections.add(cu),e.Proj.projections.add(du),e.Proj.projections.add(mu),e.Proj.projections.add(fu),e.Proj.projections.add(yu),e.Proj.projections.add(gu),e.Proj.projections.add(vu),e.Proj.projections.add(Su),e.Proj.projections.add(Tu),e.Proj.projections.add(Ru),e.Proj.projections.add(Fu)}(Vl);const Du=Vl;
  1545. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1546. * This program are made available under the terms of the Apache License, Version 2.0
  1547. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1548. class ku extends r{constructor(e,t){(t=t||{}).projection&&(t.prjCoordSys=t.projection),super(e,t),this.dataFlow=new Mt(e,t),this.dataFlow.events.on({broadcastSocketConnected:this._defaultEvent,broadcastSocketError:this._defaultEvent,broadcastFailed:this._defaultEvent,broadcastSucceeded:this._defaultEvent,subscribeSocketConnected:this._defaultEvent,subscribeSocketError:this._defaultEvent,messageSucceeded:this._defaultEvent,setFilterParamSucceeded:this._defaultEvent,scope:this})}initBroadcast(){return this.dataFlow.initBroadcast(),this}broadcast(e){this.dataFlow.broadcast(e)}initSubscribe(){return this.dataFlow.initSubscribe(),this}setExcludeField(e){return this.dataFlow.setExcludeField(e),this.options.excludeField=e,this}setGeometry(e){return this.dataFlow.setGeometry(e),this.options.geometry=e,this}unSubscribe(){this.dataFlow.unSubscribe()}unBroadcast(){this.dataFlow.unBroadcast()}_defaultEvent(e){this.dispatchEvent({type:e.eventType||e.type,value:e})}}
  1549. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1550. * This program are made available under the terms of the Apache License, Version 2.0
  1551. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1552. class Gu extends(Rn()){constructor(e){var t=e||{};super(t),this.idField=t.idField||"id",this.dataService=new ku(t.ws,{geometry:t.geometry,prjCoordSys:t.prjCoordSys,excludeField:t.excludeField}).initSubscribe();var s=this;s.dataService.on("subscribeSocketConnected",function(e){s.dispatchEvent({type:"subscribeSucceeded",value:e})}),s.dataService.on("messageSucceeded",function(e){s._onMessageSuccessed(e)}),s.dataService.on("setFilterParamSucceeded",function(e){s.dispatchEvent({type:"setFilterParamSucceeded",value:e})}),this.featureCache={}}setExcludeField(e){return this.dataService.setExcludeField(e),this.excludeField=e,this}setGeometry(e){return this.dataService.setGeometry(e),this.geometry=e,this}_onMessageSuccessed(e){var t=(new(En())).readFeature(e.value.featureResult),s=t.get(this.idField);void 0!==s&&this.featureCache[s]?(this.featureCache[s].setGeometry(t.getGeometry()),this.featureCache[s].setProperties(t.getProperties()),this.changed()):(this.addFeature(t),this.featureCache[s]=t),this.dispatchEvent({type:"dataupdated",value:{source:this,data:t}})}}
  1553. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1554. * This program are made available under the terms of the Apache License, Version 2.0
  1555. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1556. class Bu{constructor(e,t){this.geometry=e,this.attributes=t}toFeature(){var e=this.geometry;if(e instanceof Ln()){let t=this.attributes;t.geometry=e;let s=new(Bn())(t);return(new Ce).read((new(En())).writeFeature(s),"Feature")}if(3===e.length)return e=new ie(e[0],e[1],e[2]),new me(e,this.attributes)}}const Uu=ol.source.ImageCanvas;var ju=s.n(Uu);
  1557. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1558. * This program are made available under the terms of the Apache License, Version 2.0
  1559. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1560. class Vu extends(ju()){constructor(e,t){var s=t||{};function r(e,t,s,r,i){var a=r[0]*s,n=r[1]*s;if(this.context||(this.context=Un.createCanvasContext2D(a,n)),!this.features)return this.context.canvas;this.pixelRatio=s;var o=this.map.getSize()[0]*s,l=this.map.getSize()[1]*s;this.offset=[(a-o)/2/s,(n-l)/2/s],this.notFirst||(this.redrawThematicFeatures(e),this.notFirst=!0),this.div.id=this.id,this.div.className="themeLayer",this.div.style.width=a+"px",this.div.style.height=n+"px",this.map.getViewport().appendChild(this.div),this.renderer.resize(),this.map.getViewport().removeChild(this.div),this.themeCanvas=this.renderer.painter.root.getElementsByTagName("canvas")[0],this.themeCanvas.width=a,this.themeCanvas.height=n,this.themeCanvas.style.width=a+"px",this.themeCanvas.style.height=n+"px",this.themeCanvas.getContext("2d").clearRect(0,0,a,n);var h=this.renderer.painter._layers.hover.ctx.canvas,u=Un.createCanvasContext2D(a,n);u.drawImage(h,0,0,h.width,h.height,0,0,a,n),this.redrawThematicFeatures(e);var c=this.context.canvas;return this.context.clearRect(0,0,c.width,c.height),c.width=a,c.height=n,c.style.width=a+"px",c.style.height=n+"px",this.context.drawImage(this.themeCanvas,0,0),this.context.drawImage(u.canvas,0,0),this.context.canvas}super({attributions:s.attributions||"Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>",canvasFunction:r,logo:"4"===Un.getOlVersion()?s.logo:null,projection:s.projection,ratio:s.ratio,resolutions:s.resolutions,state:s.state}),this.id=s.id?s.id:X.createUniqueID("themeLayer_"),this.canvasFunctionInternal_=r,this.EVENT_TYPES=["loadstart","loadend","loadcancel","visibilitychanged","move","moveend","added","removed","tileloaded","beforefeaturesadded","featuresadded","featuresremoved"],this.features=[],this.TFEvents=s.TFEvents||[],this.map=s.map;var i=this.map.getSize();this.div=document.createElement("div"),this.map.getViewport().appendChild(this.div),this.div.style.width=i[0]+"px",this.div.style.height=i[1]+"px",this.setOpacity(s.opacity),this.levelRenderer=new Ba,this.movingOffset=[0,0],this.renderer=this.levelRenderer.init(this.div),this.map.getViewport().removeChild(this.div),this.renderer.clear(),this.addTFEvents()}destroy(){this.EVENT_TYPES=null,this.isBaseLayer=null,this.TFEvents=null,this.destroyFeatures(),this.features=null,this.renderer&&this.renderer.dispose(),this.renderer=null,this.levelRenderer=null,this.movingOffset=null,this.currentMousePosition=null}destroyFeatures(e){if(void 0==e&&(e=this.features),e){this.removeFeatures(e);for(var t=e.length-1;t>=0;t--)e[t].destroy()}}setOpacity(e){if(e!==this.opacity){this.opacity=e;var t=this.div;X.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.dispatchEvent({type:"changelayer",value:{layer:this,property:"opacity"}})}}addFeatures(e){}removeFeatures(e){if(e&&0!==e.length){if(e===this.features)return this.removeAllFeatures();X.isArray(e)||(e=[e]);for(var t=[],s=e.length-1;s>=0;s--){var r=e[s],i=X.indexOf(this.features,r);-1!==i?this.features.splice(i,1):t.push(r)}for(var a=[],n=0,o=this.features.length;n<o;n++)r=this.features[n],a.push(r);this.features=[],this.addFeatures(a),this.renderer&&this.redrawThematicFeatures(this.map.getView().calculateExtent());var l=0==t.length;this.dispatchEvent({type:"featuresremoved",value:{features:t,succeed:l}})}}removeAllFeatures(){this.renderer&&this.renderer.clear(),this.features=[],this.dispatchEvent({type:"featuresremoved",value:{features:[],succeed:!0}})}getFeatures(){for(var e=this.features.length,t=new Array(e),s=0;s<e;++s)t[s]=this.features[s];return t}getFeatureBy(e,t){var s=null;for(var r in this.features)if(this.features[r][e]===t){s=this.features[r];break}return s}getFeatureById(e){return this.getFeatureBy("id",e)}getFeaturesByAttribute(e,t){var s,r=[];for(var i in this.features)(s=this.features[i])&&s.attributes&&s.attributes[e]===t&&r.push(s);return r}redrawThematicFeatures(e){}on(e,t){var s=t;if(this.renderer)this.renderer.on(e,s);else{var r=[];r.push(e),r.push(s),this.TFEvents.push(r)}}fire(e,t){if(this.offset){t=t.originalEvent;var s=this.getX(t),r=this.getY(t),i=-this.map.getView().getRotation(),a=this.map.getPixelFromCoordinate(this.map.getView().getCenter()),n=this.scale([s,r],a,this.pixelRatio),o=this.rotate(n,i,a),l=[o[0]+this.offset[0],o[1]+this.offset[1]],h=document.createEvent("Event");h.initEvent("pointermove",!0,!0),h.offsetX=l[0],h.offsetY=l[1],h.layerX=l[0],h.layerY=l[1],h.clientX=l[0],h.clientY=l[1],h.x=s,h.y=r,"click"===e&&this.renderer.handler._clickHandler(h),"dblclick"===e&&this.renderer.handler._dblclickHandler(h),"onmousewheel"===e&&this.renderer.handler._mousewheelHandler(h),"mousemove"===e&&(this.renderer.handler._mousemoveHandler(h),this.changed()),"onmouseout"===e&&this.renderer.handler._mouseoutHandler(h),"onmousedown"===e&&this.renderer.handler._mousedownHandler(h),"onmouseup"===e&&this.renderer.handler._mouseupHandler(h)}}getX(e){return void 0!==e.zrenderX&&e.zrenderX||void 0!==e.offsetX&&e.offsetX||void 0!==e.layerX&&e.layerX||void 0!==e.clientX&&e.clientX}getY(e){return void 0!==e.zrenderY&&e.zrenderY||void 0!==e.offsetY&&e.offsetY||void 0!==e.layerY&&e.layerY||void 0!==e.clientY&&e.clientY}un(e,t){var s=t;if(this.renderer)this.renderer.un(e,s);else{for(var r=this.TFEvents,i=r.length,a=[],n=0;n<i;n++){var o=r[n];o[0]===e&&o[1]===s||a.push(o)}this.TFEvents=a}}addTFEvents(){for(var e=this.TFEvents,t=e.length,s=0;s<t;s++)this.renderer.on(e[s][0],e[s][1])}getLocalXY(e){var t,s=this.map;(e instanceof se||e instanceof ie)&&(t=s.getPixelFromCoordinate([e.x,e.y])),e instanceof Q&&(t=s.getPixelFromCoordinate([e.lon,e.lat]));var r=-s.getView().getRotation(),i=s.getPixelFromCoordinate(s.getView().getCenter()),a=t;return this.pixelRatio&&(a=this.scale(t,i,this.pixelRatio)),t&&i&&(a=this.rotate(a,r,i)),this.offset&&a?[a[0]+this.offset[0],a[1]+this.offset[1]]:a}rotate(e,t,s){return[Math.cos(t)*(e[0]-s[0])-Math.sin(t)*(e[1]-s[1])+s[0],Math.sin(t)*(e[0]-s[0])+Math.cos(t)*(e[1]-s[1])+s[1]]}scale(e,t,s){return[(e[0]-t[0])*s+t[0],(e[1]-t[1])*s+t[1]]}toiClientFeature(e){X.isArray(e)||(e=[e]);let t=[];for(let s=0;s<e.length;s++)if(e[s]instanceof Bu)t.push(e[s].toFeature());else if(e[s]instanceof Bn())t.push(this._toFeature(e[s]));else if(e[s]instanceof me)t.push(e[s]);else if(e[s].geometry&&e[s].geometry.parts)t.push(Vr.fromJson(e[s]).toFeature());else{if(-1==["FeatureCollection","Feature","Geometry"].indexOf(e[s].type))throw new Error(`features[${s}]'s type is not be supported.`);{const r=new Ce;t=t.concat(r.read(e[s]))}}return t}toFeature(e){return this.toiClientFeature(e)}_toFeature(e){let t=(new(En())).writeFeature(e);return(new Ce).read(t,"Feature")}}
  1561. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1562. * This program are made available under the terms of the Apache License, Version 2.0
  1563. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1564. class Hu extends Vu{constructor(e,t,s){super(e,s),this.chartsSetting=s.chartsSetting||{},this.themeFields=s.themeFields||null,this.overlayWeightField=s.overlayWeightField||null,this.isOverLay=void 0===s.isOverLay||s.isOverLay,this.charts=s.charts||[],this.cache=s.cache||{},this.chartsType=t}destroy(){this.chartsType=null,this.chartsSetting=null,this.themeFields=null,this.overlayWeightField=null,this.isOverLay=null,Vu.prototype.destroy.apply(this,arguments),this.charts=null,this.cache=null}setChartsType(e){this.chartsType=e,this.redraw()}addFeatures(e){!1!==this.dispatchEvent({type:"beforefeaturesadded",value:{features:e}})&&(this.features=this.toiClientFeature(e),this.renderer&&this.changed())}redrawThematicFeatures(e){this.renderer.clearAll();for(var t=this.features,s=0,r=t.length;s<r;s++){var i=t[s],a=i.geometry.getBounds();if(e)if(!new K(e[0],e[1],e[2],e[3]).intersectsBounds(a))continue;var n=this.cache,o=i.id;if(!n[o]){n[o]=o;var l=this.createThematicFeature(i);l&&this.overlayWeightField&&i.attributes[this.overlayWeightField]&&!isNaN(i.attributes[this.overlayWeightField])&&(l.__overlayWeight=i.attributes[this.overlayWeightField]),l&&this.charts.push(l)}}this.drawCharts()}createThematicFeature(e){var t;return wa[this.chartsType]&&this.themeFields&&this.chartsSetting&&(t=new wa[this.chartsType](e,this,this.themeFields,this.chartsSetting)),!!t&&(t.assembleShapes(),t)}drawCharts(){if(this.renderer){var e=this.charts;if(this.overlayWeightField&&e.sort(function(e,t){return void 0===e.__overlayWeight&&void 0===t.__overlayWeight?0:void 0!==e.__overlayWeight&&void 0===t.__overlayWeight?-1:void 0===e.__overlayWeight&&void 0!==t.__overlayWeight?1:void 0!==e.__overlayWeight&&void 0!==t.__overlayWeight?parseFloat(e.__overlayWeight)<parseFloat(t.__overlayWeight)?1:-1:0}),this.isOverLay)for(var t=[],s=this.map.getView().calculateExtent(),r=new K(s[0],s[1],s[2],s[3]),i=this.getLocalXY(new Q(r.left,r.top)),a=this.getLocalXY(new Q(r.right,r.bottom)),n=new K(i[0],a[1],a[0],i[1]),o=0,l=e.length;o<l;o++){var h=e[o],u=h.resetLocation(),c=h.chartBounds,d=[{x:c.left,y:c.top},{x:c.left,y:c.bottom},{x:c.right,y:c.bottom},{x:c.right,y:c.top},{x:c.left,y:c.top}];if(!n||this.isChartInMap(n,d)){var p=!1;if(0!==o)for(let e=0;e<t.length;e++)if(this.isQuadrilateralOverLap(d,t[e])){p=!0;break}if(!p){t.push(d);var m=h.shapes;for(let e=0,t=m.length;e<t;e++)m[e].refOriginalPosition=u,this.renderer.addShape(m[e])}}}else for(var f=0,y=e.length;f<y;f++)for(var g=e[f],v=g.resetLocation(),S=g.shapes,b=0,x=S.length;b<x;b++)S[b].refOriginalPosition=v,this.renderer.addShape(S[b]);this.renderer.render()}}getShapesByFeatureID(e){var t=[],s=this.renderer.getAllShapes();if(!e)return s;for(var r=0,i=s.length;r<i;r++){var a=s[r];a.refDataID&&e===a.refDataID&&t.push(a)}return t}isQuadrilateralOverLap(e,t){var s=e.length,r=t.length;if(5!==s||5!==r)return null;var i=!1;for(let r=0;r<s;r++)if(this.isPointInPoly(e[r],t)){i=!0;break}for(let s=0;s<r;s++)if(this.isPointInPoly(t[s],e)){i=!0;break}for(let a=0;a<s-1&&!i;a++)for(let s=0;s<r-1;s++){if("SuperMap.Geometry.Point"===X.lineIntersection(e[a],e[a+1],t[s],t[s+1]).CLASS_NAME){i=!0;break}}return i}isPointInPoly(e,t){for(var s=!1,r=-1,i=t.length,a=i-1;++r<i;a=r)(t[r].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[r].y)&&e.x<(t[a].x-t[r].x)*(e.y-t[r].y)/(t[a].y-t[r].y)+t[r].x&&(s=!s);return s}isChartInMap(e,t){for(var s=e,r=!1,i=0,a=t.length;i<a;i++){var n=t[i];if(n.x>=s.left&&n.x<=s.right&&n.y>=s.top&&n.y<=s.bottom){r=!0;break}}return r}clearCache(){this.cache={},this.charts=[]}removeFeatures(e){this.clearCache(),super.removeFeatures(e)}removeAllFeatures(){this.clearCache(),super.removeAllFeatures()}redraw(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getView().calculateExtent()),!0)}clear(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}canvasFunctionInternal_(e,t,s,r,i){return Vu.prototype.canvasFunctionInternal_.apply(this,arguments)}}const Ju=ol.style.RegularShape;var zu=s.n(Ju);
  1565. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1566. * This program are made available under the terms of the Apache License, Version 2.0
  1567. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1568. class qu extends(zu()){constructor(e){e.stroke?(e.stroke.color=e.stroke.getColor()||"#3388ff",e.stroke.width=e.stroke.getWidth()||1):e.stroke=new(Zn())({color:"#3388ff",width:1}),e.fill?e.fill.color=e.fill.getColor()||"#66ccff":e.fill=new(Qn())({color:"#66ccff"}),super({angle:e.angle||60,stroke:e.stroke,fill:e.fill,radius:e.radius||10,rotation:e.rotation||0}),this.count_=e.count||3,this.strokeOpacity=e.strokeOpacity||1,this.fillOpacity=e.fillOpacity||1,this._canvas=this.getImage(),this._ctx=this._canvas.getContext("2d"),this._render()}_render(){var e=0,t=this.getAngle();if(this.spaceAngle=360/this.count_-this.getAngle(),!(this.spaceAngle<0)){this._ctx.translate(0,0),this._ctx.beginPath();for(var s=0;s<this.count_;s++)this._drawSector(this._ctx,this.getAnchor()[0],this.getAnchor()[1],this.getRadius(),e,t),t=(e=t+this.spaceAngle)+this.getAngle();this._fillStroke(),this._ctx.closePath()}}_drawSector(e,t,s,r,i,a){i=i/180*Math.PI,a=a/180*Math.PI,e.moveTo(t,s),e.lineTo(t+r*Math.cos(i),s+r*Math.sin(i)),e.arc(t,s,r,i,a),e.lineTo(t,s)}_fillStroke(){this.getFill()&&(this._ctx.globalAlpha=this.fillOpacity,this._ctx.fillStyle=this.getFill().color,this._ctx.fill()),this.getStroke()&&0!==this.weight&&(this._ctx.globalAlpha=this.strokeOpacity,this._ctx.lineWidth=this.getStroke().width,this._ctx.strokeStyle=this.getStroke().color,this._ctx.lineCap=this.getStroke().lineCap,this._ctx.lineJoin=this.getStroke().lineJoin,this._ctx.stroke())}getCount(){return this.count_}getSpaceAngle(){return this.spaceAngle}}
  1569. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1570. * This program are made available under the terms of the Apache License, Version 2.0
  1571. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1572. class Wu extends qu{constructor(e){super(e),this.sAngle=e.sAngle,this.eAngle=e.eAngle,this._render()}_render(){this._ctx.clearRect(0,0,this.getImage().width,this.getImage().height),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.translate(0,0),this._ctx.beginPath(),this._drawSector(this._ctx,this.getAnchor()[0],this.getAnchor()[1],this.getRadius(),this.sAngle,this.eAngle),this._fillStroke(),this._ctx.closePath()}getSAngle(){return this.sAngle}getEAngle(){return this.eAngle}}const Yu=ol.Object;var Xu=s.n(Yu);
  1573. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1574. * This program are made available under the terms of the Apache License, Version 2.0
  1575. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1576. const Qu=()=>!1,Ku=function(){let e=document.createElement("div"),t=["transform","WebkitTransform","MozTransform","OTransform","msTransform"];for(let s=0;s<t.length;s++){let r=t[s];if(void 0!==e.style[r])return r}return t[0]}();class Zu extends(Xu()){constructor(e,t){super(),this.layer=e,this.map=e.map;let s=t||{};X.extend(this,s);let r=this.pixelRatio=window?window.devicePixelRatio:1;this.width=this.map.getSize()[0]*r,this.height=this.map.getSize()[1]*r,this.center=this.map.getView().getCenter(),this._initContainer(),this._registerEvents()}_registerEvents(){let e=this.map,t=e.getView();e.on("change:size",this._resizeEvent.bind(this),this),t.on("change:resolution",this._moveEndEvent.bind(this),this),t.on("change:center",this._moveEvent.bind(this),this),t.on("change:rotation",this._moveEndEvent.bind(this),this),e.on("moveend",this._moveEndEvent.bind(this),this)}_resizeEvent(){this._resize(),this._clearAndRedraw()}_moveEvent(){let e=this.map.getPixelFromCoordinate(this.center),t=this.map.getPixelFromCoordinate(this.map.getView().getCenter()),s=[e[0]-t[0],e[1]-t[1]];this._canvas.style[Ku]="translate("+Math.round(s[0])+"px,"+Math.round(s[1])+"px)"}_moveEndEvent(){this._canvas.style[Ku]="translate(0,0)",this.center=this.map.getView().getCenter(),this._clearAndRedraw()}_clearAndRedraw(){this._clearBuffer(),this.layer.changed()}_resize(){const e=this.map.getSize(),t=e[0]*this.pixelRatio,s=e[1]*this.pixelRatio;this._canvas.width=t,this._canvas.height=s,this._canvas.style.width=t+"px",this._canvas.style.height=s+"px"}_clearBuffer(){if(!this.deckGL)return;let e=this.deckGL.layerManager;return e&&e.context.gl.clear(e.context.gl.COLOR_BUFFER_BIT),this}getCanvas(){return this._canvas}update(e){if(e&&e.length>-1&&(this._data=e),!this._renderLayer)return;this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();let t=this._getLayerState();t.data=this._data||[],this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)}drawGraphics(e){this._data=e||(this._data?this._data:[]),this._renderLayer||this._createInnerRender(),this._clearBuffer(),this._draw()}_initContainer(){this._canvas=this._createCanvas(this.width,this.height),this._layerContainer=this.container,this._wrapper=document.createElement("div"),this._wrapper.className="deck-wrapper",this._wrapper.style.position="absolute",this._wrapper.style.top="0",this._wrapper.style.left="0",this._wrapper.appendChild(this._canvas),this._layerContainer&&this._layerContainer.appendChild(this._wrapper)}_createCanvas(e,t){let s=document.createElement("canvas");return s.oncontextmenu=Qu,s.width=e,s.height=t,s.style.width=e+"px",s.style.height=t+"px",s}_createInnerRender(){let e=this,t=this._getLayerState(),{color:s,radius:r,opacity:i,highlightColor:a,radiusScale:n,radiusMinPixels:o,radiusMaxPixels:l,strokeWidth:h,outline:u}=t;r=this._pixelToMeter(r);let c={id:"scatter-plot",data:[],pickable:Boolean(this.onClick)||Boolean(this.onHover),autoHighlight:!0,color:s,opacity:i,radius:r,radiusScale:n,highlightColor:a,radiusMinPixels:o,radiusMaxPixels:l,strokeWidth:h,outline:u,getPosition(t){if(!t)return[0,0,0];let s=t.getGeometry(),r=s&&s.getCoordinates();return(r=e._project(r))&&[r[0],r[1],0]},getColor(t){let s=e._getLayerDefaultStyle(),r=t&&t.getStyle();return r&&r.getColor()||s.color},getRadius(t){let s=e._getLayerDefaultStyle(),r=t&&t.getStyle();return r&&r.getRadius()||s.radius},updateTriggers:{getColor:[s],getRadius:[r]}},d=this;this.onClick&&(c.onClick=function(){d._canvas.style.cursor="pointer",d.onClick.apply(d,arguments)}),this.onHover&&(c.onHover=function(){d._canvas.style.cursor="pointer",d.onHover.apply(d,arguments)}),e._renderLayer=new window.DeckGL.ScatterplotLayer(c)}_getLayerDefaultStyle(){let{color:e,opacity:t,radius:s,radiusScale:r,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:n,outline:o}=this._getLayerState();return{color:e,opacity:t,radius:s=this._pixelToMeter(s),radiusScale:r,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:n,outline:o}}_getLayerState(){let e=this.layer.getLayerState(),t=this.map.getView().getProjection().getCode(),s=hn.transform([e.longitude,e.latitude],t,"EPSG:4326");return e.longitude=s[0],e.latitude=s[1],e.zoom=e.zoom-1,e}_draw(){this._refreshData();let e=this._getLayerState();e.data=this._data||[];let t={};for(let s in e)t[s]=e[s];this._renderLayer.setNeedsRedraw(!0),t.layers=[this._renderLayer],t.canvas=this._canvas,this.onBeforeRender&&(t.onBeforeRender=this.onBeforeRender.bind(this)),this.onAfterRender&&(t.onAfterRender=this.onAfterRender.bind(this)),this.deckGL?this.deckGL.setProps(t):this.deckGL=new window.DeckGL.experimental.DeckGLJS(t)}_refreshData(){let e=this._data||[],t=Un.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(let e=0;e<t.length;e++)this._renderLayer.props.data.push(t[e]);this._data=this._renderLayer.props.data}_project(e){let t=this.map.getView().getProjection().getCode();return"EPSG:4326"===t?e:hn.transform(e,t,"EPSG:4326")}_pixelToMeter(e){let t=this.map.getView(),s=t.getProjection().getUnits()||"degrees";"degrees"===s&&(s=c.DEGREE),"m"===s&&(s=c.METER);const r=t.getResolution();if(s===c.DEGREE){return e*(r*(6378137*Math.PI/180))}return e*r}}class $u extends(Xu()){constructor(e,t){super(),this.layer=e,this.map=e.map;let s=t||{};X.extend(this,s),this.highLightStyle=this.layer.highLightStyle,this.mapWidth=this.size[0],this.mapHeight=this.size[1],this.width=this.map.getSize()[0],this.height=this.map.getSize()[1],this.context=Un.createCanvasContext2D(this.mapWidth,this.mapHeight),this.context.scale(this.pixelRatio,this.pixelRatio),this.canvas=this.context.canvas,this.canvas.style.width=this.width+"px",this.canvas.style.height=this.height+"px",this._registerEvents()}_registerEvents(){this.map.on("change:size",this._resizeEvent.bind(this),this)}_resizeEvent(){this._resize(),this._clearAndRedraw()}_resize(){let e=this.map.getSize(),t=e[0],s=e[1],r=t/this.width,i=s/this.height;this.width=t,this.height=s,this.mapWidth=this.mapWidth*r,this.mapHeight=this.mapHeight*i,this.canvas.width=this.mapWidth,this.canvas.height=this.mapHeight,this.canvas.style.width=this.width+"px",this.canvas.style.height=this.height+"px"}_clearAndRedraw(){this._clearBuffer(),this.layer.changed()}update(){this.layer.changed()}_clearBuffer(){}getCanvas(){return this.canvas}drawGraphics(e){this.graphics_=e||[];let t=this.mapWidth/this.pixelRatio,s=this.mapHeight/this.pixelRatio,r=In.toContext(this.context,{size:[t,s],pixelRatio:this.pixelRatio});var i=this.layer._getDefaultStyle();let a=this,n=a.layer.map;e.map(function(e){let t=e.getStyle()||i;if(a.selected===e){let e=t;t instanceof kn.Circle?e=new kn.Circle({radius:t.getRadius(),fill:new kn.Fill({color:"rgba(0, 153, 255, 1)"}),stroke:t.getStroke(),snapToPixel:"4"===Un.getOlVersion()?t.getSnapToPixel():null}):t instanceof kn.RegularShape&&(e=new kn.RegularShape({radius:t.getRadius(),radius2:t.getRadius2(),points:t.getPoints(),angle:t.getAngle(),snapToPixel:"4"===Un.getOlVersion()?t.getSnapToPixel():null,rotation:t.getRotation(),rotateWithView:t.getRotateWithView(),fill:new kn.Fill({color:"rgba(0, 153, 255, 1)"}),stroke:t.getStroke()})),t=a.highLightStyle||e}r.setStyle(new kn.Style({image:t}));let s=e.getGeometry().getCoordinates(),o=n.getView().getCenter(),l=n.getPixelFromCoordinate(o),h=n.getView().getResolution(),u=(s[0]-o[0])/h,c=(o[1]-s[1])/h,d=[u+l[0],c+l[1]],p=[(d=
  1577. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1578. * This program are made available under the terms of the Apache License, Version 2.0
  1579. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1580. function(e,t,s){return[(e[0]-t[0])*s+t[0],(e[1]-t[1])*s+t[1]]}(d,l,1))[0]+a.offset[0],d[1]+a.offset[1]],m=new(Tn())(p);return r.drawGeometry(m),e})}}
  1581. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1582. * This program are made available under the terms of the Apache License, Version 2.0
  1583. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1584. class ec extends(Xu()){constructor(e,t){super(),e instanceof Ln()&&(this.geometry_=e),this.attributes=t,this.setStyle()}clone(){var e=new ec;return e.setId(this.id),e.setGeometry(this.geometry_),e.setAttributes(this.attributes),e.setStyle(this.style_),e}getId(){return this.id}setId(e){this.id=e}getGeometry(){return this.geometry_}setGeometry(e){this.geometry_=e}setAttributes(e){this.attributes=e}getAttributes(){return this.attributes}getStyle(){return this.style_}setStyle(e){(this.style||e)&&(this.style_=e,this.styleFunction_=e?ec.createStyleFunction(new(Jn())({image:e})):void 0,this.changed())}getStyleFunction(){return this.styleFunction_}static createStyleFunction(e){var t,s;"function"==typeof e?t=2==e.length?function(t){return e(this,t)}:e:(s=Array.isArray(e)?e:[e],t=function(){return s});return t}destroy(){this.id=null,this.geometry_=null,this.attributes=null,this.style_=null}}const tc=ol.extent,sc=ol.geom.Polygon;var rc=s.n(sc);const ic=ol.layer.Image;var ac=s.n(ic);
  1585. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1586. * This program are made available under the terms of the Apache License, Version 2.0
  1587. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1588. const nc={color:[0,0,0,255],opacity:.8,radius:10,radiusScale:1,radiusMinPixels:0,radiusMaxPixels:Number.MAX_SAFE_INTEGER,strokeWidth:1,outline:!1},oc=["canvas","webgl"];class lc extends(ju()){constructor(e){super({attributions:e.attributions,canvasFunction:function(e,s,r,i,a){var n=i[0]/r,o=i[1]/r,l=t.map.getSize()[0],h=t.map.getSize()[1];t.renderer||(t.renderer=function(e,s){let r;if(t.render===oc[0])r=new $u(t,{size:e,pixelRatio:s});else{let e=X.extend({},nc),i=X.extend(e,{color:t.color,opacity:t.opacity,radius:t.radius,radiusScale:t.radiusScale,radiusMinPixels:t.radiusMinPixels,radiusMaxPixels:t.radiusMaxPixels,strokeWidth:t.strokeWidth,outline:t.outline,onClick:t.onClick,onHover:t.onHover});(i=X.extend(t,i)).pixelRatio=s,i.container=t.map.getViewport().getElementsByClassName("ol-overlaycontainer")[0],i.onBeforeRender=function(){return!1},i.onAfterRender=function(){return!1},r=new Zu(t,i)}return r}(i,r));t.renderer.mapWidth=n,t.renderer.mapHeight=o,t.renderer.pixelRatio=r,t.renderer.offset=[(n-l)/2,(o-h)/2];let u=this.getGraphicsInExtent(e);return t.renderer._clearBuffer(),t.renderer.selected=this.selected,t.renderer.drawGraphics(u),t.renderer.getCanvas()},logo:"4"===Un.getOlVersion()?e.logo:null,projection:e.projection,ratio:e.ratio,resolutions:e.resolutions,state:e.state}),this.graphics=[].concat(e.graphics),this.map=e.map,X.extend(this,e),this.render=e.render||oc[0],Un.supportWebGL2()||(this.render=oc[0]),this.highLightStyle=e.highLightStyle,this.isHighLight=void 0===e.isHighLight||e.isHighLight,this.hitGraphicLayer=null,this._forEachFeatureAtCoordinate=function(e,s,r,i,a){let n=t.getGraphicsInExtent();t._highLightClose();for(let t=n.length-1;t>=0;t--){let o=n[t].getStyle();if(!o)return;if(o instanceof Wu)continue;let l=n[t].getGeometry().getCoordinates(),h=new(Jn())({image:o}).getImage(),u=!1;if(h instanceof qu&&1===h.getCount()){const e=180*h.getRotation()/Math.PI,t=Number.parseFloat(h.getAngle()),r=h.getRadius()*s;let a=null;if(t>355)a=new(Yn())(l,r);else{const s=[];s.push(l);const i=t/8;for(let t=0;t<8;t++){const a=(e+t*i)/180*Math.PI;s.push([l[0]+r*Math.cos(a),l[1]-r*Math.sin(a)])}s.push(l),a=new(rc())([s])}a.intersectsCoordinate(this.map.getCoordinateFromPixel(i))&&(u=!0)}else{let t=[];t[0]=l[0]-h.getAnchor()[0]*s,t[2]=l[0]+h.getAnchor()[0]*s,t[1]=l[1]-h.getAnchor()[1]*s,t[3]=l[1]+h.getAnchor()[1]*s,tc.containsCoordinate(t,e)&&(u=!0)}!0!==u||r&&r(n[t],a)}return};const t=this;e.onClick&&t.map.on("click",function(s){if(t.renderer instanceof Zu)return;const r=t.map.getFeaturesAtPixel(s.pixel)||[];for(let i=0;i<r.length;i++){const a=r[i];if(t.graphics.indexOf(a)>-1){e.onClick(a,s),t.isHighLight&&t._highLight(a.getGeometry().getCoordinates(),new(Jn())({image:a.getStyle()}).getImage(),a,s.pixel);break}}})}setGraphics(e){this.graphics=this.graphics||[],this.graphics.length=0;let t=Un.isArray(e)?[].concat(e):[e];this.graphics=[].concat(t),this.update()}addGraphics(e){this.graphics=this.graphics||[];let t=Un.isArray(e)?[].concat(e):[e];this.graphics=this.graphics.concat(t),this.update()}getGraphicBy(e,t){let s=null;for(let r in this.graphics)if(this.graphics[r][e]===t){s=this.graphics[r];break}return s}getGraphicById(e){return this.getGraphicBy("id",e)}getGraphicsByAttribute(e,t){var s,r=[];for(let i in this.graphics)(s=this.graphics[i])&&s.attributes&&s.attributes[e]===t&&r.push(s);return r}removeGraphics(e=null){if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,void this.update();X.isArray(e)||(e=[e]);for(let t=e.length-1;t>=0;t--){let s=e[t],r=X.indexOf(this.graphics,s);-1!==r&&this.graphics.splice(r,1)}this.update()}clear(){this.removeGraphics()}update(){this.renderer.update(this.graphics,this._getDefaultStyle())}_getDefaultStyle(){const e={};return this.color&&(e.fill=new(Qn())({color:this.toRGBA(this.color)})),this.radius&&(e.radius=this.radius),this.outline&&(e.stroke=new(Qn())({color:this.toRGBA(this.color),width:this.strokeWidth})),new(Yn())(e)}toRGBA(e){return`rgba(${e[0]},${e[1]},${e[2]},${(e[3]||255)/255})`}setStyle(e){let t={color:this.color,radius:this.radius,opacity:this.opacity,highlightColor:this.highlightColor,radiusScale:this.radiusScale,radiusMinPixels:this.radiusMinPixels,radiusMaxPixels:this.radiusMaxPixels,strokeWidth:this.strokeWidth,outline:this.outline};X.extend(this,X.extend(t,e)),this.update()}getLayerState(){let e=this.map,t=e.getSize()[0],s=e.getSize()[1],r=e.getView(),i=r.getCenter(),a={longitude:i[0],latitude:i[1],zoom:r.getZoom(),maxZoom:r.getMaxZoom(),pitch:0,bearing:180*-r.getRotation()/Math.PI},n={};for(let e in a)n[e]=a[e];return n.width=t,n.height=s,n.color=this.color,n.radius=this.radius,n.opacity=this.opacity,n.highlightColor=this.highlightColor,n.radiusScale=this.radiusScale,n.radiusMinPixels=this.radiusMinPixels,n.radiusMaxPixels=this.radiusMaxPixels,n.strokeWidth=this.strokeWidth,n.outline=this.outline,n}_highLightClose(){this.selected=null,this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null),this.changed()}_highLight(e,t,s,r){if(s.getStyle()instanceof qu){this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null);var i=this.map.getPixelFromCoordinate([e[0],e[1]]);r=r||[0,0];var a=Math.atan2(r[1]-i[1],r[0]-i[0])/Math.PI*180;a=a>0?a:360+a;var n=(Math.ceil(a/(t.getAngle()+t.getSpaceAngle()))-1)*(t.getAngle()+t.getSpaceAngle()),o={stroke:new(Zn())({color:"#ff0000",width:1}),fill:new(Qn())({color:"#0099ff"}),radius:t.getRadius(),angle:t.getAngle(),eAngle:n+t.getAngle(),sAngle:n,rotation:t.getRotation()};this.highLightStyle&&this.highLightStyle instanceof Wu&&(o.stroke=this.highLightStyle.getStroke(),o.fill=this.highLightStyle.getFill(),o.radius=this.highLightStyle.getRadius(),o.angle=this.highLightStyle.getAngle());var l=new ec(new(Tn())(e));l.setStyle(new Wu(o)),this.hitGraphicLayer=new(ac())({source:new lc({map:this.map,graphics:[l]})}),this.map.addLayer(this.hitGraphicLayer)}else this.selected=s,this.changed()}getGraphicsInExtent(e){var t=[];return e?(this.graphics.map(function(s){return tc.containsExtent(e,s.getGeometry().getExtent())&&t.push(s),s}),t):(this.graphics.map(function(e){return t.push(e),e}),t)}}
  1589. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1590. * This program are made available under the terms of the Apache License, Version 2.0
  1591. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1592. class hc extends Vu{constructor(e,t){super(e,t),this.cache=t.cache||{},this.cacheFields=t.cacheFields||[],this.style=t.style||{},this.maxCacheCount=t.maxCacheCount||0,this.isCustomSetMaxCacheCount=void 0!==t.isCustomSetMaxCacheCount&&t.isCustomSetMaxCacheCount,this.nodesClipPixel=t.nodesClipPixel||2,this.isHoverAble=void 0!==t.isHoverAble&&t.isHoverAble,this.isMultiHover=void 0!==t.isMultiHover&&t.isMultiHover,this.isClickAble=void 0===t.isClickAble||t.isClickAble,this.highlightStyle=t.highlightStyle||null,this.isAllowFeatureStyle=void 0!==t.isAllowFeatureStyle&&t.isAllowFeatureStyle}destroy(){this.maxCacheCount=null,this.isCustomSetMaxCacheCount=null,this.nodesClipPixel=null,this.isHoverAble=null,this.isMultiHover=null,this.isClickAble=null,this.cache=null,this.cacheFields=null,this.style=null,this.highlightStyle=null,this.isAllowFeatureStyle=null}addFeatures(e){this.dispatchEvent({type:"beforefeaturesadded",value:{features:e}}),this.features=this.toiClientFeature(e),this.isCustomSetMaxCacheCount||(this.maxCacheCount=5*this.features.length),this.renderer&&this.changed()}removeFeatures(e){this.clearCache(),Vu.prototype.removeFeatures.apply(this,arguments)}removeAllFeatures(){this.clearCache(),Vu.prototype.removeAllFeatures.apply(this,arguments)}redrawThematicFeatures(e){var t=this.renderer.getHoverOne(),s=null;t&&t.refDataID&&(s=t.refDataID),this.renderer.clearAll();for(var r=this.features,i=this.cache,a=this.cacheFields,n=this.map.getView().getZoom(),o=this.maxCacheCount,l=0,h=r.length;l<h;l++){var u=r[l];if(u.geometry){var c=u.geometry.getBounds();if(e)if(!new K(e[0],e[1],e[2],e[3]).intersectsBounds(c))continue;var d,p=u.id+"_zoom_"+n.toString();if(i[p])i[p].updateAndAddShapes();else{if((d=this.createThematicFeature(r[l])).getShapesCount()<1)continue;if(i[p]=d,a.push(p),a.length>o){var m=a[0];a.splice(0,1),delete i[m]}}}}if(this.renderer.render(),s&&this.isHoverAble&&this.isMultiHover){var f=this.getShapesByFeatureID(s);this.renderer.updateHoverShapes(f)}}createThematicFeature(e){var t=X.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=X.copyAttributesWithClip(e.style));var s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new Aa(e,this,Ta.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}canvasFunctionInternal_(e,t,s,r,i){return Vu.prototype.canvasFunctionInternal_.apply(this,arguments)}clearCache(){this.cache={},this.cacheFields=[]}clear(){this.renderer.clearAll(),this.renderer.refresh(),this.removeAllFeatures(),this.clearCache()}getCacheCount(){return this.cacheFields.length}setMaxCacheCount(e){isNaN(e)||(this.maxCacheCount=e,this.isCustomSetMaxCacheCount=!0)}getShapesByFeatureID(e){var t=[],s=this.renderer.getAllShapes();if(!e)return s;for(var r=0,i=s.length;r<i;r++){var a=s[r];a.refDataID&&e===a.refDataID&&t.push(a)}return t}}
  1593. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1594. * This program are made available under the terms of the Apache License, Version 2.0
  1595. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1596. class uc extends hc{constructor(e,t){super(e,t),this.isOverLay=null==t.isOverLay||t.isOverLay,this.isAvoid=null==t.isAvoid||t.isAvoid,this.style=t.style,this.themeField=t.themeField,this.styleGroups=t.styleGroups,this.defaultStyle={fontColor:"#000000",fontOpacity:1,fontSize:"12px",fontStyle:"normal",fontWeight:"normal",labelAlign:"cm",labelXOffset:0,labelYOffset:0,labelRotation:0,fill:!1,fillColor:"#ee9900",fillOpacity:.4,stroke:!1,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",labelSelect:!0,_isGeoTextStrategyStyle:!0},this.getPxBoundsMode=0,this.labelFeatures=[]}destroy(){this.style=null,this.themeField=null,this.styleGroups=null,super.destroy()}createThematicFeature(e){var t=this.getStyleByData(e),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new Aa(e,this,Ta.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}redrawThematicFeatures(e){if(this.features.length>0&&0===this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),s=0,r=t.length;s<r;s++)this.labelFeatures.push(t[s]);this.features=this.getDrawnLabels(this.labelFeatures),super.redrawThematicFeatures.call(this,e)}removeFeatures(e){this.labelFeatures=[],super.removeFeatures.call(this,arguments)}removeAllFeatures(){this.labelFeatures=[],super.removeAllFeatures.call(this,arguments)}getDrawnLabels(e){var t,s,r,i,a=[],n=[],o={labelAlign:"cm",labelXOffset:0,labelYOffset:0},l=this.map,h=l.getSize();h={x:h[0],y:h[1]};for(var u=l.getView().getZoom(),c=0,d=e.length;c<d;c++){(s=e[c]).isStyleChange&&(s=this.setStyle(s));var p=this.getLabelPxLocation(s);if(p.x>=0&&p.x<=h.x&&p.y>=0&&p.y<=h.y){if(s.style.minZoomLevel>-1&&u<=s.style.minZoomLevel)continue;if(s.style.maxZoomLevel>-1&&u>s.style.maxZoomLevel)continue;var m=null;s.isStyleChange?(s.isStyleChange=null,m=this.calculateLabelBounds(s,p)):m=s.geometry.bsInfo.w&&s.geometry.bsInfo.h?this.calculateLabelBounds2(s,p):this.calculateLabelBounds(s,p);var f=new K(0,h.y,h.x,0),y=m.length;if(this.isAvoid){var g=this.getAvoidInfo(f,m);if(g){if("left"===g.aspectW){s.style.labelXOffset+=g.offsetX;for(let e=0;e<y;e++)m[e].x+=g.offsetX}else if("right"===g.aspectW){s.style.labelXOffset+=-g.offsetX;for(let e=0;e<y;e++)m[e].x+=-g.offsetX}if("top"===g.aspectH){s.style.labelYOffset+=g.offsetY;for(let e=0;e<y;e++)m[e].y+=g.offsetY}else if("bottom"===g.aspectH){s.style.labelYOffset+=-g.offsetY;for(let e=0;e<y;e++)m[e].y+=-g.offsetY}s.isStyleChange=!0}}if(this.isOverLay){var v=!1;if(0!=c)for(let e=0;e<n.length;e++)if(this.isQuadrilateralOverLap(m,n[e])){v=!0;break}if(v)continue;n.push(m)}var S=[];for(let e=0;e<y-1;e++)S.push(l.getCoordinateFromPixel([m[e].x,m[e].y]));var b=new K(S[3][0],S[3][1],S[1][0],[S[1][1]]).getCenterLonLat(),x=new ie(b.lon,b.lat,s.attributes[this.themeField]);x.calculateBounds(),r=X.cloneObject(s.style),i=X.cloneObject(X.copyAttributes(r,o)),(t=new me(x,s.attributes,i)).id=s.id,t.fid=s.fid,a.push(t)}}return a}getStyleByData(e){var t=e;if(t.style=X.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=X.copyAttributes(t.style,this.style),this.themeField&&this.styleGroups&&t.attributes){var s=this.themeField,r=t.attributes,i=this.styleGroups,a=!1,n=null;for(var o in r)if(s===o){a=!0,n=r[o];break}if(a)for(var l=0,h=i.length;l<h;l++)if(n>=i[l].start&&n<i[l].end){var u=i[l].style;u&&u.fontSize&&parseFloat(u.fontSize)<12&&(u.fontSize="12px"),t.style=X.copyAttributes(t.style,u)}t.style.label=t.attributes[this.themeField]}return t.style}setLabelsStyle(e){for(var t,s=[],r=0,i=e.length;r<i;r++){var a=e[r];if("SuperMap.Geometry.GeoText"!==a.geometry.CLASS_NAME)return e;(a.geometry.bsInfo.w||a.geometry.bsInfo.h)&&(a.geometry.bsInfo.w=null,a.geometry.bsInfo.h=null,a.geometry.labelWTmp=null),(t=this.setStyle(a)).layer=this.layer,s.push(t)}return s}setStyle(e){var t=e;if(t.style=X.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=X.copyAttributes(t.style,this.style),this.groupField&&this.styleGroups&&t.attributes){var s=this.groupField,r=t.attributes,i=this.styleGroups,a=!1,n=null;for(var o in r)if(s===o){a=!0,n=r[o];break}if(a)for(var l=0,h=i.length;l<h;l++)if(n>=i[l].start&&n<i[l].end){var u=i[l].style;u&&u.fontSize&&parseFloat(u.fontSize)<12&&(u.fontSize="12px"),t.style=X.copyAttributes(t.style,u)}}return t.style.label=t.geometry.text,t}getLabelPxLocation(e){var t=e.geometry,s=e.style,r=t.getCentroid(),i=this.map.getPixelFromCoordinate([r.x,r.y]),a=new(Tn())([i[0],i[1]]);if(s.labelXOffset||s.labelYOffset){var n=isNaN(s.labelXOffset)?0:s.labelXOffset,o=isNaN(s.labelYOffset)?0:s.labelYOffset;a.translate(n,-o)}return{x:a.getCoordinates()[0],y:a.getCoordinates()[1]}}calculateLabelBounds(e,t){var s=e.geometry,r=null,i=null;if(0==this.getPxBoundsMode)r=s.getLabelPxBoundsByText(t,e.style);else{if(1!==this.getPxBoundsMode)return null;i=this.getLabelInfo(e.geometry.getCentroid(),e.style),r=s.getLabelPxBoundsByLabel(t,i.w,i.h,e.style)}var a=[];return a=e.style.labelRotation%180==0?[{x:r.left,y:r.top},{x:r.right,y:r.top},{x:r.right,y:r.bottom},{x:r.left,y:r.bottom},{x:r.left,y:r.top}]:this.rotationBounds(r,t,e.style.labelRotation),s.bounds=new K(a[1].x,a[3].y,a[2].x,a[4].y),a}calculateLabelBounds2(e,t){var s,r,i,a,n,o=e.geometry.bsInfo,l=e.style,h=X.cloneObject(t);if(l.labelAlign&&"cm"!==l.labelAlign)switch(l.labelAlign){case"lt":h.x+=o.w/2,h.y+=o.h/2;break;case"lm":h.x+=o.w/2;break;case"lb":h.x+=o.w/2,h.y-=o.h/2;break;case"ct":h.y+=o.h/2;break;case"cb":h.y-=o.h/2;break;case"rt":h.x-=o.w/2,h.y+=o.h/2;break;case"rm":h.x-=o.w/2;break;case"rb":h.x-=o.w/2,h.y-=o.h/2}r=h.x-o.w/2,i=h.y+o.h/2,n=l.fontStyle&&"italic"===l.fontStyle?h.x+o.w/2+parseInt(parseFloat(l.fontSize)/2):h.x+o.w/2,a=h.y-o.h/2,s=new K(r,i,n,a);var u=[];return u=l.labelRotation%180==0?[{x:s.left,y:s.top},{x:s.right,y:s.top},{x:s.right,y:s.bottom},{x:s.left,y:s.bottom},{x:s.left,y:s.top}]:this.rotationBounds(s,t,l.labelRotation),e.geometry.bounds=new K(u[1].x,u[3].y,u[2].x,u[4].y),u}getLabelInfo(e,t){var s={l:"left",r:"right",t:"top",b:"bottom"},r={l:0,r:-1,t:0,b:-1};t=X.extend({fontColor:"#000000",labelAlign:"cm"},t);var i=this.getLocalXY(e),a=0;if(t.labelXOffset||t.labelYOffset){var n=isNaN(t.labelXOffset)?0:t.labelXOffset,o=isNaN(t.labelYOffset)?0:t.labelYOffset;i[0]+=n,i[1]-=o}var l=document.createElement("canvas");l.globalAlpha=0,l.lineWidth=1;var h=l.getContext("2d");h.fillStyle=t.fontColor,h.globalAlpha=t.fontOpacity||1;var u,c,d,p=[t.fontStyle?t.fontStyle:"normal","normal",t.fontWeight?t.fontWeight:"normal",t.fontSize?t.fontSize:"1em",t.fontFamily?t.fontFamily:"sans-serif"].join(" "),m=t.label.split("\n"),f=m.length;if(h.fillText){h.font=p,h.textAlign=s[t.labelAlign[0]]||"center",h.textBaseline=s[t.labelAlign[1]]||"middle",null==(u=r[t.labelAlign[1]])&&(u=-.5),c=h.measureText("Mg").height||h.measureText("xx").width,i[1]+=c*u*(f-1);for(let e=0;e<f;e++)a<(d=h.measureText(m[e]).width)&&(a=d)}else if(h.mozDrawText){h.mozTextStyle=p,null==(u=r[t.labelAlign[1]])&&(u=-.5),c=h.mozMeasureText("xx"),i[1]+=c*(1+u*f);for(let e=0;e<f;e++)a<(d=h.measureText(m[e]).width)&&(a=d)}var y={};return a?(y.w=a,y.h=t.fontSize,y.rows=m.length,y):null}rotationBounds(e,t,s){var r=new(Tn())([e.left,e.top]),i=new(Tn())([e.right,e.top]),a=new(Tn())([e.right,e.bottom]),n=new(Tn())([e.left,e.bottom]),o=[];o.push(this.getRotatedLocation(r.getCoordinates()[0],r.getCoordinates()[1],t.x,t.y,s)),o.push(this.getRotatedLocation(i.getCoordinates()[0],i.getCoordinates()[1],t.x,t.y,s)),o.push(this.getRotatedLocation(a.getCoordinates()[0],a.getCoordinates()[1],t.x,t.y,s)),o.push(this.getRotatedLocation(n.getCoordinates()[0],n.getCoordinates()[1],t.x,t.y,s));for(var l=[],h=0;h<o.length;h++)l.push({x:o[h].x,y:o[h].y});return l.push({x:o[0].x,y:o[0].y}),l}getRotatedLocation(e,t,s,r,i){var a,n,o={};return t=-t,r=-r,i=-i,a=(e-s)*Math.cos(i/180*Math.PI)-(t-r)*Math.sin(i/180*Math.PI)+s,n=(e-s)*Math.sin(i/180*Math.PI)+(t-r)*Math.cos(i/180*Math.PI)+r,o.x=a,o.y=-n,o}getAvoidInfo(e,t){if(5!==t.length)return null;for(var s=[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.right,y:e.bottom},{x:e.left,y:e.bottom},{x:e.left,y:e.top}],r=!1,i=s.length,a=t.length,n=0,o=0,l="",h="",u=0;u<i-1;u++)for(var c=0;c<a-1;c++){"SuperMap.Geometry.Point"===X.lineIntersection(s[u],s[u+1],t[c],t[c+1]).CLASS_NAME&&(d(t[c]),d(t[c+1]),r=!0)}return r?{aspectW:h,aspectH:l,offsetX:n,offsetY:o}:null;function d(t){if(!e.contains(t.x,t.y)){if(t.y<e.top){let s=Math.abs(e.top-t.y);s>o&&(o=s,l="top")}if(t.y>e.bottom){let s=Math.abs(t.y-e.bottom);s>o&&(o=s,l="bottom")}if(t.x<e.left){let s=Math.abs(e.left-t.x);s>n&&(n=s,h="left")}if(t.x>e.right){let s=Math.abs(t.x-e.right);s>n&&(n=s,h="right")}}}}isQuadrilateralOverLap(e,t){var s=e.length,r=t.length;if(5!==s||5!==r)return null;var i=!1;for(let r=0;r<s;r++)if(this.isPointInPoly(e[r],t)){i=!0;break}for(let s=0;s<r;s++)if(this.isPointInPoly(t[s],e)){i=!0;break}for(let n=0;n<s-1&&!i;n++)for(var a=0;a<r-1;a++){if("SuperMap.Geometry.Point"===X.lineIntersection(e[n],e[n+1],t[a],t[a+1]).CLASS_NAME){i=!0;break}}return i}isPointInPoly(e,t){for(var s=!1,r=-1,i=t.length,a=i-1;++r<i;a=r)(t[r].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[r].y)&&e.x<(t[a].x-t[r].x)*(e.y-t[r].y)/(t[a].y-t[r].y)+t[r].x&&(s=!s);return s}canvasFunctionInternal_(e,t,s,r,i){return super.canvasFunctionInternal_.apply(this,arguments)}}
  1597. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1598. * This program are made available under the terms of the Apache License, Version 2.0
  1599. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1600. class cc{constructor(e){this.options=e||{},this.enableMassClear=this.options.enableMassClear,this._map=e.map,this.paneName=this.options.paneName||"mapPane",this.context=this.options.context||"2d",this.zIndex=this.options.zIndex||2,this.mixBlendMode=this.options.mixBlendMode||null,this.width=e.width,this.height=e.height,this.initialize()}initialize(){var e=this.canvas=document.createElement("canvas");e.style.cssText="position:absolute;left:0;top:0;z-index:"+this.zIndex+";user-select:none;",e.style.mixBlendMode=this.mixBlendMode,e.className="mapvClass";var t="undefined"==typeof window?{}:window,s=this.devicePixelRatio=t.devicePixelRatio||1;e.width=parseInt(this.width)*s,e.height=parseInt(this.height)*s,"2d"===this.context&&e.getContext(this.context).scale(s,s),e.style.width=this.width+"px",e.style.height=this.height+"px","webgl"===this.context&&this.canvas.getContext(this.context).viewport(0,0,e.width,e.height)}draw(){this.options.update&&this.options.update.call(this)}resize(e,t){var s="undefined"==typeof window?{}:window,r=this.devicePixelRatio=s.devicePixelRatio||1;this.canvas.width=e*r,this.canvas.height=t*r,"2d"===this.context&&this.canvas.getContext("2d").scale(r,r),this.canvas.style.width=e+"px",this.canvas.style.height=t+"px","webgl"===this.context&&this.canvas.getContext(this.context).viewport(0,0,this.canvas.width,this.canvas.height)}getContainer(){return this.canvas}setZIndex(e){this.canvas.style.zIndex=e}getZIndex(){return this.zIndex}}const dc=function(){try{return mapv}catch(e){return{}}}(),pc=ol.interaction.Pointer;var mc=s.n(pc),fc=dc.baiduMapLayer?dc.baiduMapLayer.__proto__:Function;class yc extends fc{constructor(e,t,s,r,i,a){super(e,t,s),this.dataSet=t,this.mapWidth=r,this.mapHeight=i;var n=this;s=s||{},this.source=a,n.animator=null,n.map=e,n.init(s),n.argCheck(s),this.canvasLayer=new cc({map:e,context:this.context,paneName:s.paneName,mixBlendMode:s.mixBlendMode,enableMassClear:s.enableMassClear,zIndex:s.zIndex,width:r,height:i,update:function(){n._canvasUpdate()}}),this.clickEvent=this.clickEvent.bind(this),this.mousemoveEvent=this.mousemoveEvent.bind(this),e.on("movestart",this.moveStartEvent.bind(this)),e.on("moveend",this.moveEndEvent.bind(this)),e.getView().on("change:center",this.zoomEvent.bind(this)),e.getView().on("change:size",this.sizeEvent.bind(this)),e.on("pointerdrag",this.dragEvent.bind(this)),this.bindEvent()}init(e){this.options=e,this.initDataRange(e),this.context=this.options.context||"2d",this.options.zIndex&&this.canvasLayer&&this.canvasLayer.setZIndex(this.options.zIndex),this.initAnimator()}clickEvent(e){var t=e.pixel;super.clickEvent({x:t[0]+this.offset[0],y:t[1]+this.offset[1]},e)}mousemoveEvent(e){var t=e.pixel;super.mousemoveEvent({x:t[0],y:t[1]},e)}dragEvent(){this.clear(this.getContext())}zoomEvent(){this.clear(this.getContext())}sizeEvent(){this.canvasLayer.resize()}moveStartEvent(){var e=this.options.animation;this.isEnabledTime()&&this.animator&&(this.steps.step=e.stepsRange.start)}moveEndEvent(){this.canvasLayer.draw()}bindEvent(){var e=this,t=e.map;e.options.methods&&(e.options.methods.click&&t.on("click",e.clickEvent),e.options.methods.mousemove&&(e.pointerInteraction=new(mc()),e.pointerInteraction.handleMoveEvent_=function(t){e.mousemoveEvent(t)},t.addInteraction(e.pointerInteraction)))}unbindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.un("click",this.clickEvent),this.options.methods.mousemove&&e.removeInteraction(this.pointerInteraction))}addData(e,t){var s=e;e&&e.get&&(s=e.get()),this.dataSet.add(s),this.update({options:t})}update(e){var t=e||{},s=t.data;s&&s.get&&(s=s.get()),void 0!=s&&this.dataSet.set(s),super.update({options:t.options})}draw(){this.canvasLayer.draw()}getData(){return this.dataSet}removeData(e){if(this.dataSet){var t=this.dataSet.get({filter:function(t){return null==e||"function"!=typeof e||!e(t)}});this.dataSet.set(t),this.update({options:null})}}clearData(){this.dataSet&&this.dataSet.clear(),this.update({options:null})}_canvasUpdate(e){if(this.canvasLayer){var t=this,s=t.options.animation,r=t.map,i=t.canvasLayer.canvas.getContext(t.context);if(t.isEnabledTime()){if(void 0===e)return void t.clear(i);t.context&&"2d"!==t.context||(i.save(),i.globalCompositeOperation="destination-out",i.fillStyle="rgba(0, 0, 0, .1)",i.fillRect(0,0,i.canvas.width,i.canvas.height),i.restore())}else this.clear(i);if(t.context&&"2d"!==t.context)i.clear(i.COLOR_BUFFER_BIT);else for(var a in t.options)i[a]=t.options[a];var n=r.getView().calculateExtent(),o=r.getPixelFromCoordinate([n[0],n[3]]);t._mapCenter=r.getView().getCenter(),t._mapCenterPx=r.getPixelFromCoordinate(t._mapCenter),t._reselutions=r.getView().getResolution(),t._rotation=-r.getView().getRotation();var l=t._reselutions,h=1;if("2d"!=this.context){var u=("undefined"==typeof window?{}:window).devicePixelRatio||1;h=u}var c={transferCoordinate:function(e){var s=(e[0]-t._mapCenter[0])/t._reselutions,r=(t._mapCenter[1]-e[1])/t._reselutions,i=[s+t._mapCenterPx[0],r+t._mapCenterPx[1]];return[((i=function(e,t,s){var r=(e[0]-t[0])*s+t[0],i=(e[1]-t[1])*s+t[1];return[r,i]}(i,t._mapCenterPx,1))[0]+t.offset[0])*h,(i[1]+t.offset[1])*h]}};void 0!==e&&(c.filter=function(t){var r=s.trails||10;return e&&t.time>e-r&&t.time<e}),t.isEnabledTime()&&!t.notFirst&&(t.canvasLayer.resize(t.mapWidth,t.mapHeight),t.notFirst=!0);var d=t.dataSet.get(c);t.processData(d),"m"===t.options.unit?(t.options.size&&(t.options._size=t.options.size/l),t.options.width&&(t.options._width=t.options.width/l),t.options.height&&(t.options._height=t.options.height/l)):(t.options._size=t.options.size,t.options._height=t.options.height,t.options._width=t.options.width);var p=r.getPixelFromCoordinate([0,0]);p=[p[0]-o[0],p[1]-o[1]],this.drawContext(i,d,t.options,{x:p[0],y:p[1]}),t.isEnabledTime()&&this.source.changed(),t.options.updateCallback&&t.options.updateCallback(e)}}isEnabledTime(){var e=this.options.animation;return e&&!(!1===e.enabled)}argCheck(e){"heatmap"===e.draw&&e.strokeStyle&&console.warn("[heatmap] options.strokeStyle is discard, pleause use options.strength [eg: options.strength = 0.1]")}getContext(){return this.canvasLayer.canvas.getContext(this.context)}clear(e){e&&e.clearRect&&e.clearRect(0,0,e.canvas.width,e.canvas.height)}}
  1601. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1602. * This program are made available under the terms of the Apache License, Version 2.0
  1603. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1604. class gc extends(ju()){constructor(e){var t=e||{};super({attributions:t.attributions||"© 2018 百度 MapV with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>",canvasFunction:function(e,t,s,r,i){var a=r[0]/s,n=r[1]/s,o=this.map.getSize()[0],l=this.map.getSize()[1];this.layer||(this.layer=new yc(this.map,this.dataSet,this.mapvOptions,a,n,this));this.layer.pixelRatio=s,this.layer.offset=[(a-o)/2,(n-l)/2],this.rotate?this.rotate!==this.map.getView().getRotation()&&(this.layer.canvasLayer.resize(a,n),this.rotate=this.map.getView().getRotation()):this.rotate=this.map.getView().getRotation();var h=this.layer.canvasLayer.canvas;this.layer.isEnabledTime()||(this.layer.canvasLayer.resize(a,n),this.layer.canvasLayer.draw());this.context||(this.context=Un.createCanvasContext2D(a,n));var u=this.context.canvas;this.context.clearRect(0,0,u.width,u.height),u.width=r[0],u.height=r[1],u.style.width=r[0]+"px",u.style.height=r[1]+"px",this.context.drawImage(h,0,0),(this.resolution!==t||JSON.stringify(this.extent)!==JSON.stringify(e))&&(this.resolution=t,this.extent=e);return this.context.canvas},logo:"4"===Un.getOlVersion()?t.logo:null,projection:t.projection,ratio:t.ratio,resolutions:t.resolutions,state:t.state}),this.map=e.map,this.dataSet=e.dataSet,this.mapvOptions=e.mapvOptions}addData(e,t){this.layer.addData(e,t)}getData(){return this.layer&&(this.dataSet=this.layer.getData()),this.dataSet}removeData(e){this.layer&&this.layer.removeData(e)}clearData(){this.layer.clearData()}update(e){this.layer.update(e),this.changed()}}
  1605. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1606. * This program are made available under the terms of the Apache License, Version 2.0
  1607. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1608. class vc extends hc{constructor(e,t){super(e,t),this.style=t.style,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle,this.themeField=t.themeField,this.styleGroups=t.styleGroups}destroy(){this.style=null,this.themeField=null,this.styleGroups=null,hc.prototype.destroy.apply(this,arguments)}createThematicFeature(e){var t=this.getStyleByData(e),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new Aa(e,this,Ta.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}getStyleByData(e){var t={},s=e;if(t=X.copyAttributesWithClip(t,this.style),this.themeField&&this.styleGroups&&this.styleGroups.length>0&&s.attributes){var r=this.themeField,i=s.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(r===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h<u;h++)if(o>=a[h].start&&o<a[h].end){var c=a[h].style;t=X.copyAttributesWithClip(t,c)}}return s.style&&!0===this.isAllowFeatureStyle&&(t=X.copyAttributesWithClip(s.style)),t}canvasFunctionInternal_(e,t,s,r,i){return hc.prototype.canvasFunctionInternal_.apply(this,arguments)}}
  1609. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1610. * This program are made available under the terms of the Apache License, Version 2.0
  1611. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1612. class Sc extends Hu{constructor(e,t,s){super(e,t,s),this.symbolType=t,this.symbolSetting=s.symbolSetting,this.themeField=s.themeField}destroy(){this.symbolType=null,this.symbolSetting=null,this.themeField=null,Hu.prototype.destroy.apply(this,arguments)}setSymbolType(e){this.symbolType=e,this.redraw()}createThematicFeature(e){var t;return wa[this.symbolType]&&this.themeField&&this.symbolSetting&&(t=new wa[this.symbolType](e,this,[this.themeField],this.symbolSetting)),!!t&&(t.assembleShapes(),t)}canvasFunctionInternal_(e,t,s,r,i){return Hu.prototype.canvasFunctionInternal_.apply(this,arguments)}}const bc=function(){try{return turf}catch(e){return{}}}();
  1613. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1614. * This program are made available under the terms of the Apache License, Version 2.0
  1615. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1616. class xc extends(Rn()){constructor(e){var t=e||{};super({attributions:t.attributions||"<span>© <a href='https://turfjs.org/' target='_blank'>turfjs</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>",features:t.features,format:t.format,extent:t.extent,logo:"4"===Un.getOlVersion()?t.logo:null,projection:t.projection,wrapX:t.wrapX}),this.turfMap={"Measurement.along":["line","distance","units"],"Measurement.area":["geojson"],"Measurement.bbox":["geojson"],"Measurement.bboxPolygon":["bbox"],"Measurement.bearing":["start","end","final"],"Measurement.center":["geojson","properties"],"Measurement.centerOfMass":["geojson","properties"],"Measurement.centroid":["geojson","properties"],"Measurement.destination":["origin","distance","bearing","units"],"Measurement.distance":["from","to","units"],"Measurement.envelope":["geojson"],"Measurement.length":["geojson","units"],"Measurement.midpoint":["point1","point2"],"Measurement.pointOnFeature":["geojson"],"Measurement.polygonTangents":["point","polygon"],"Measurement.rhumbBearing":["start","end","final"],"Measurement.rhumbDestination":["origin","distance","bearing","units"],"Measurement.rhumbDistance":["from","to","units"],"Measurement.square":["bbox"],"Measurement.greatCircle":["start","end","properties","npoints","offset"],"CoordinateMutation.cleanCoords":["geojson","mutate"],"CoordinateMutation.flip":["geojson","mutate"],"CoordinateMutation.rewind":["geojson","reverse","mutate"],"CoordinateMutation.round":["num","precision"],"CoordinateMutation.truncate":["geojson","precision","coordinates","mutate"],"Transformation.bboxClip":["feature","bbox"],"Transformation.bezierSpline":["line","resolution","sharpness"],"Transformation.buffer":["geojson","radius","units","steps"],"Transformation.circle":["center","radius","steps","units","properties"],"Transformation.clone":["geojson"],"Transformation.concave":["points","maxEdge","units"],"Transformation.convex":["geojson","concavity"],"Transformation.difference":["polygon1","polygon2"],"Transformation.dissolve":["featureCollection","propertyName"],"Transformation.intersect":["poly1","poly2"],"Transformation.lineOffset":["geojson","distance","units"],"Transformation.simplify":["feature","tolerance","highQuality"],"Transformation.tesselate":["poly"],"Transformation.transformRotate":["geojson","angle","pivot","mutate"],"Transformation.transformTranslate":["geojson","distance","direction","units","zTranslation","mutate"],"Transformation.transformScale":["geojson","factor","origin","mutate"],"Transformation.union":["A"],"Transformation.voronoi":["points","bbox"],"featureConversion.combine":["fc"],"featureConversion.explode":["geojson"],"featureConversion.flatten":["geojson"],"featureConversion.lineStringToPolygon":["lines","properties","autoComplete","orderCoords"],"featureConversion.polygonize":["geojson"],"featureConversion.polygonToLineString":["polygon","properties"],"Misc.kinks":["featureIn"],"Misc.lineArc":["center","radius","bearing1","bearing2","steps","units"],"Misc.lineChunk":["geojson","segmentLength","units","reverse"],"Misc.lineIntersect":["line1","line2"],"Misc.lineOverlap":["line1","line2"],"Misc.lineSegment":["geojson"],"Misc.lineSlice":["startPt","stopPt","line"],"Misc.lineSliceAlong":["line","startDist","stopDist","units"],"Misc.lineSplit":["line","splitter"],"Misc.mask":["polygon","mask"],"Misc.pointOnLine":["lines","pt","units"],"Misc.sector":["center","radius","bearing1","bearing2","steps","units"],"Misc.shortestPath":["start","end","obstacles","units","resolution"],"Misc.unkinkPolygon":["geojson"],"Helper.featureCollection":["features","bbox","id"],"Helper.feature":["geometry","properties","bbox","id"],"Helper.geometryCollection":["geometries","properties","bbox","id"],"Helper.lineString":["coordinates","properties","bbox","id"],"Helper.multiLineString":["coordinates","properties","bbox","id"],"Helper.multiPoint":["coordinates","properties","bbox","id"],"Helper.multiPolygon":["coordinates","properties","bbox","id"],"Helper.point":["coordinates","properties","bbox","id"],"Helper.polygon":["coordinates","properties","bbox","id"],"Data.sample":["featurecollection","num"],"Interpolation.interpolate":["points","cellSize","gridType","property","units","weight"],"Interpolation.isobands":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.isolines":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.planepoint":["point","triangle"],"Interpolation.tin":["points","z"],"Joins.pointsWithinPolygon":["points","polygons"],"Joins.tag":["points","polygons","field","outField","mask","properties"],"Grids.hexGrid":["bbox","cellSide","units","triangles"],"Grids.pointGrid":["bbox","cellSide","units","mask","properties"],"Grids.squareGrid":["bbox","cellSide","units","mask","properties"],"Grids.triangleGrid":["bbox","cellSide","units","mask","properties"],"Classification.nearestPoint":["targetPoint","points"],"Aggregation.collect":["polygons","points","inProperty","outProperty"],"Aggregation.clustersDbscan":["points","maxDistance","units","minPoints","mutate"],"Aggregation.clustersKmeans":["points","numberOfClusters","mutate"],"Meta.coordAll":["geojson"],"Meta.coordEach":["geojson","callback","excludeWrapCoord"],"Meta.coordReduce":["geojson","callback","initialValue","excludeWrapCoord"],"Meta.featureEach":["geojson","callback"],"Meta.featureReduce":["geojson","callback","initialValue"],"Meta.flattenEach":["geojson","callback"],"Meta.flattenReduce":["geojson","callback","initialValue"],"Meta.getCoord":["coord"],"Meta.getCoords":["coords"],"Meta.getGeom":["geojson"],"Meta.getGeomType":["geojson","name"],"Meta.geomEach":["geojson","callback"],"Meta.geomReduce":["geojson","callback","initialValue"],"Meta.propEach":["geojson","callback"],"Meta.propReduce":["geojson","callback","initialValue"],"Meta.segmentEach":["geojson","callback"],"Meta.segmentReduce":["geojson","callback","initialValue"],"Meta.getCluster":["geojson","filter"],"Meta.clusterEach":["geojson","property","callback"],"Meta.clusterReduce":["geojson","property","callback","initialValue"],"Assertions.collectionOf":["featureCollection","type","name"],"Assertions.containsNumber":["coordinates"],"Assertions.geojsonType":["value","type","name"],"Assertions.featureOf":["feature","type","name"],"Booleans.booleanClockwise":["line"],"Booleans.booleanContains":["feature1","feature2"],"Booleans.booleanCrosses":["feature1","feature2"],"Booleans.booleanDisjoint":["feature1","feature2"],"Booleans.booleanEqual":["feature1","feature2"],"Booleans.booleanOverlap":["feature1","feature2"],"Booleans.booleanParallel":["feature1","feature2"],"Booleans.booleanPointInPolygon":["point","polygon","ignoreBoundary"],"Booleans.booleanPointOnLine":["point","linestring","ignoreEndVertices"],"UnitConversion.bearingToAngle":["bearing"],"UnitConversion.convertArea":["area","originalUnit","finalUnit"],"UnitConversion.convertLength":["length","originalUnit","finalUnit"],"UnitConversion.degreesToradians":["degrees"],"UnitConversion.lengthToRadians":["distance","units"],"UnitConversion.lengthToDegrees":["distance","units"],"UnitConversion.radiansToLength":["radians","units"],"UnitConversion.radiansToDegrees":["radians"],"UnitConversion.toMercator":["geojson","mutate"],"UnitConversion.toWgs84":["geojson","mutate"]},this.turfOptionMap={"Measurement.along":["line","distance",{units:""}],"Measurement.bboxPolygon":["bbox",{properties:"",id:""}],"Measurement.bearing":["start","end",{final:""}],"Measurement.center":["geojson",{properties:""}],"Measurement.destination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.distance":["from","to",{units:""}],"Measurement.length":["geojson",{units:""}],"Measurement.rhumbBearing":["start","end",{final:""}],"Measurement.rhumbDestination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.rhumbDistance":["from","to",{units:""}],"Measurement.greatCircle":["start","end",{properties:"",npoints:"",offset:""}],"CoordinateMutation.cleanCoords":["geojson",{mutate:""}],"CoordinateMutation.flip":["geojson",{mutate:""}],"CoordinateMutation.rewind":["geojson",{mutate:"",reverse:""}],"CoordinateMutation.truncate":["geojson",{precision:"",coordinates:"",mutate:""}],"Transformation.bezierSpline":["line",{resolution:"",sharpness:""}],"Transformation.buffer":["geojson","radius",{units:"",steps:""}],"Transformation.circle":["center","radius",{units:"",steps:"",properties:""}],"Transformation.concave":["points",{maxEdge:"",units:""}],"Transformation.convex":["geojson",{concavity:""}],"Transformation.dissolve":["featureCollection",{propertyName:""}],"Transformation.lineOffset":["geojson","distance",{units:""}],"Transformation.simplify":["geojson",{tolerance:"",highQuality:""}],"Transformation.transformRotate":["geojson","angle",{pivot:"",mutate:""}],"Transformation.transformTranslate":["geojson","distance","direction",{units:"",zTranslation:"",mutate:""}],"Transformation.transformScale":["geojson","factor",{origin:"",mutate:""}],"Transformation.voronoi":["points",{bbox:""}],"featureConversion.lineStringToPolygon":["lines",{properties:"",autoComplete:"",orderCoords:""}],"featureConversion.polygonToLineString":["polygon",{properties:""}],"Misc.lineArc":["center","radius","bearing1","bearing2",{steps:"",units:""}],"Misc.lineChunk":["geojson","segmentLength",{units:"",reverse:""}],"Misc.lineOverlap":["line1","line2",{tolerance:""}],"Misc.lineSliceAlong":["line","startDist","stopDist",{units:""}],"Misc.pointOnLine":["lines","pt",{units:""}],"Misc.sector":["center","radius","bearing1","bearing2",{units:"",steps:"",properties:""}],"Misc.shortestPath":["start","end",{obstacles:"",units:"",resolution:""}],"Helper.feature":["geometry","properties",{bbox:"",id:""}],"Helper.geometryCollection":["geometries","properties",{bbox:"",id:""}],"Helper.lineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiLineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPoint":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPolygon":["coordinates","properties",{bbox:"",id:""}],"Helper.point":["coordinates","properties",{bbox:"",id:""}],"Helper.polygon":["coordinates","properties",{bbox:"",id:""}],"Interpolation.interpolate":["points","cellSize",{gridType:"",property:"",units:"",weight:""}],"Interpolation.isobands":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Interpolation.isolines":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Grids.hexGrid":["bbox","cellSide",{units:"",triangles:"",properties:"",mask:""}],"Grids.pointGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.squareGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.triangleGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Aggregation.clustersDbscan":["points","maxDistance",{units:"",minPoints:"",mutate:""}],"Aggregation.clustersKmeans":["points",{numberOfClusters:"",mutate:""}],"Booleans.booleanPointInPolygon":["point","polygon",{ignoreBoundary:""}],"Booleans.booleanPointOnLine":["point","linestring",{ignoreEndVertices:""}],"UnitConversion.toMercator":["geojson",{mutate:""}],"UnitConversion.toWgs84":["geojson",{mutate:""}]}}process(e,t,s,r){var i;try{i=bc[e.split(".")[1]].apply(this,this.parse(e,t))}catch(s){i=bc[e.split(".")[1]].apply(this,this.parseOption(e,t))}var a=null;try{a=(new(En())).readFeatures(i)}catch(e){return void(s&&s(i))}(r=null==r||r)&&this.addFeatures(a),s&&s(i)}parse(e,t){if("Transformation.union"===e)return t.A;var s=[],r=this.turfMap[e];return r&&r.map(function(e){return s.push(t[e]),t[e]}),s}parseOption(e,t){var s=[];return this.turfOptionMap[e].map(function(e){if(e instanceof Object){var r=e;Object.keys(r).forEach(function(e){r[e]=t[e]}),s.push(r)}else s.push(t[e]);return t}),s}}
  1617. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1618. * This program are made available under the terms of the Apache License, Version 2.0
  1619. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1620. class Cc extends hc{constructor(e,t){super(e,t),this.themeField=t.themeField,this.style=t.style,this.styleGroups=t.styleGroups,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle}destroy(){this.style=null,this.themeField=null,this.styleGroups=null,hc.prototype.destroy.apply(this,arguments)}createThematicFeature(e){var t=this.getStyleByData(e),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new Aa(e,this,Ta.transformStyle(t),s),i=0;i<r.shapes.length;i++)this.renderer.addShape(r.shapes[i]);return r}getStyleByData(e){var t={},s=e;if(t=X.copyAttributesWithClip(t,this.style),this.themeField&&this.styleGroups&&this.styleGroups.length>0&&s.attributes){var r=this.themeField,i=s.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(r===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h<u;h++)if(o.toString()===a[h].value.toString()){var c=a[h].style;t=X.copyAttributesWithClip(t,c)}}return s.style&&!0===this.isAllowFeatureStyle&&(t=X.copyAttributesWithClip(s.style)),t}canvasFunctionInternal_(e,t,s,r,i){return hc.prototype.canvasFunctionInternal_.apply(this,arguments)}}
  1621. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1622. * This program are made available under the terms of the Apache License, Version 2.0
  1623. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1624. class _c extends(t()){constructor(e){if(super(),e){var t=!1;void 0!==e.donotNeedServerCartoCss&&(t=e.donotNeedServerCartoCss),_c.setDonotNeedServerCartoCss(t),e.view&&_c.setView(e.view),e.url&&_c.setUrl(e.url),e.cartoCss&&_c.setCartoCss(e.cartoCss);var s=new(Jn())({image:new(Yn())({radius:5,fill:new(Qn())({color:"blue"})})});e.selectedPointStyle&&(s=e.selectedPointStyle),_c.setSelectedPointStyle(s);var r=new(Jn())({stroke:new(Zn())({color:"blue",width:3})});e.selectedLineStyle&&(r=e.selectedLineStyle),_c.setSelectedLineStyle(r);var i=new(Jn())({fill:new(Qn())({color:[0,0,255,.5]}),stroke:new(Zn())({color:"blue",width:3})});e.selectedRegionStyle&&(i=e.selectedRegionStyle),_c.setSelectedRegionStyle(i);var a=new(Jn())({text:new(eo())({font:"15px Microsoft YaHei",fill:new(Qn())({color:"blue"}),stroke:new(Zn())({color:"white",width:1})})});e.selectedTextStyle&&(a=e.selectedTextStyle),_c.setSelectedTextStyle(a);var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4==n.readyState){for(var e=JSON.parse(n.responseText),t={},s=0,r=e.length;s<r;s++)for(var i=e[s].subLayers.layers,a=0,o=i.length;a<o;a++)i[a].layerIndex=o-a,t[i[a].name]=i[a];if(_c.setLayersInfo(t),!_c.getDonotNeedServerCartoCss()){var l=new XMLHttpRequest;l.open("GET",X.urlPathAppend(_c.getUrl(),"tileFeature/vectorstyles.json"),!1),l.onreadystatechange=function(){if(4==l.readyState){var e,s=(new ye).read(l.responseText);if(s.style&&"cartoCSS"===s.type){for(var r in e=(e=(e=s.style).replace(/[@]/gi,"___")).replace(/\\#/gi,"___"),t){var i=r.replace(/[@#\s]/gi,"___");e=e.replace(r.replace(/[#]/gi,"\\#"),i)}e=(e=e.replace(/[#]/gi,"\n#")).replace(/\[zoom/gi,"[scale")}var a={};new $i(e).getShaders().map(function(e){return a[e.elements[0].clean]=a[e.elements[0].clean]||{},a[e.elements[0].clean][e.attachment]=a[e.elements[0].clean][e.attachment]||[],a[e.elements[0].clean][e.attachment].push(e),e}),_c.setCartoShaders(a)}},l.send(null)}if(_c.getCartoCss()){var h={};new $i(_c.getCartoCss()).getShaders().map(function(e){return h[e.elements[0].clean]=h[e.elements[0].clean]||{},h[e.elements[0].clean][e.attachment]=h[e.elements[0].clean][e.attachment]||[],h[e.elements[0].clean][e.attachment].push(e),e}),_c.setClientCartoShaders(h)}}},n.open("GET",X.urlPathAppend(_c.getUrl(),"layers.json"),!1),n.send(null),this.on("featureSelected",function(e){_c.setSelectedId(e.selectedId),_c.setLayerName(e.layerName)})}}static setCartoShaders(e){this.cartoShaders=e}static getCartoShaders(){return this.cartoShaders}static setClientCartoShaders(e){this.clientCartoShaders=e}static getClientCartoShaders(){return this.clientCartoShaders}static setCartoCss(e){this.cartoCss=e}static getCartoCss(){return this.cartoCss}static setDonotNeedServerCartoCss(e){this.donotNeedServerCartoCss=e}static getDonotNeedServerCartoCss(){return this.donotNeedServerCartoCss}static setLayersInfo(e){this.layersInfo=e}static getLayersInfo(){return this.layersInfo}static setUrl(e){this.url=e}static getUrl(){return this.url}static setView(e){this.view=e}static getView(){return this.view}static setSelectedId(e){this.selectedId=e}static getSelectedId(){return this.selectedId}static setLayerName(e){this.layerName=e}static getLayerName(){return this.layerName}static setSelectedPointStyle(e){this.selectedPointStyle=e}static setSelectedLineStyle(e){this.selectedLineStyle=e}static setSelectedRegionStyle(e){this.selectedRegionStyle=e}static setSelectedTextStyle(e){this.selectedTextStyle=e}static getSelectedStyle(e){return"POINT"===e||"MULTIPOINT"===e?this.selectedPointStyle:"LINESTRING"===e||"MULTILINESTRING"===e?this.selectedLineStyle:"POLYGON"===e||"MULTIPOLYGON"===e?this.selectedRegionStyle:"TEXT"===e?this.selectedTextStyle:void 0}static getLayerInfo(e){var t=_c.getLayersInfo();if(void 0===t)return null;var s=t[e];if(!s)return null;var r={layerIndex:s.layerIndex,ugcLayerType:s.ugcLayerType};switch(s.ugcLayerType){case"VECTOR":r.layerStyle=s.style?s.style:null;break;case"THEME":var i=s.theme;r.layerStyle=i?i.defaultStyle:null,i&&"LABEL"===i.type&&(r.type=i.type,r.textField=i.labelExpression);break;default:s.style&&(r.layerStyle=s.style)}return r}static getStyle(e,t){var s=_c.getUrl(),r=_c.getView(),i=r.getZoom(),a=Un.resolutionToScale(r.getResolution(),96,c.METER),n=e.replace(/(@)/gi,"___").replace(/(#)/gi,"___");if(_c.getCartoCss()&&_c.getClientCartoShaders()[n])return h(_c.getClientCartoShaders()[n]);var o=_c.getLayerInfo(e);if(!_c.getDonotNeedServerCartoCss()&&_c.getCartoShaders()[n]){if(t.getProperties().textStyle||t.getProperties().TEXT_FEATURE_CONTENT||"LABEL"==o.type&&o.textField){var l=io.getValidStyleFromLayerInfo(o,t,s);return"POINT"===t.getGeometry().getType().toUpperCase()&&(l=function(e,t,s){var r=io.getValidStyleFromLayerInfo(e,t,s);if("LABEL"==e.type){t.setProperties({type:"TEXT"});for(var i=h(_c.getCartoShaders()[n]),a=r.getText(),o=0;o<i.length;o++)a?a.setText(i[o].getText().getText()):a=i[o].getText();return r.setText(a),r}return r}(o,t,s)),l}return h(_c.getCartoShaders()[n])}if(o)return io.getValidStyleFromLayerInfo(o,t,s);function h(e){var r=[];for(var n in e)e[n].map(function(e){return r.push(io.getStyleFromCarto(i,a,e,t,!0,s)),e});return r}}getFeatureStyle(e){var t,s=e.getProperties().layerName||e.getProperties().layer,r=e.getProperties().id||parseInt(e.getProperties().SmID);if(e.getProperties().type&&"TEXT"===e.getProperties().type.toUpperCase()?(t=_c.getSelectedStyle(e.getProperties().type.toUpperCase()),e.getProperties().texts?t.getText().text_=e.getProperties().texts[0]:t.getText().text_=""):t=_c.getSelectedStyle(e.getGeometry().getType().toUpperCase()),t){var i=_c.getLayerName(),a=_c.getSelectedId();if(i===s&&r===a)return t}return _c.getStyle(s,e)}}const Tc=ol.source.VectorTile;var wc=s.n(Tc);const Ec=ol.format.MVT;var Mc=s.n(Ec);const Ac=ol.proj.Projection;var Pc=s.n(Ac);
  1625. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1626. * This program are made available under the terms of the Apache License, Version 2.0
  1627. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1628. class Oc extends(wc()){constructor(e){void 0===e.url&&void 0===e.style&&console.error("one of 'options.style' or 'options.style' is required");var t=/\{z\}/g,s=/\{x\}/g,r=/\{y\}/g,i=/\{-y\}/g;e.attributions=e.attributions||"Tile Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>",["4","5"].indexOf(Un.getOlVersion())<0&&(e.tileSize=e.format instanceof Mc()&&e.style?512:256),super({attributions:e.attributions,cacheSize:e.cacheSize,format:e.format||new(En()),logo:"4"===Un.getOlVersion()?e.logo:null,overlaps:e.overlaps,projection:e.projection,state:e.format instanceof Mc()&&e.style&&"[object String]"==Object.prototype.toString.call(e.style)?"loading":e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.format instanceof Mc()&&e.style?function(e){return e?a._tileUrl.replace(t,e[0].toString()).replace(s,e[1].toString()).replace(r,function(){var t=["4","5"].indexOf(Un.getOlVersion())>-1?-e[2]-1:e[2];return t.toString()}).replace(i,function(){var t=e[0],s=a.tileGrid.getFullTileRange(t),r=s.getHeight()+e[2];return r.toString()}):void 0}:function(e,t,s){a.tileGrid||(a.tileGrid=a.getTileGridForProjection(s));var r=e[0],i=e[1],n=["4","5"].indexOf(Un.getOlVersion())>-1?-e[2]-1:e[2],o=yo.toSize(a.tileGrid.getTileSize(r,a.tmpSize)),l="";if("ZXY"===a.tileType)l="&width="+o[0]+"&height="+o[1]+"&x="+i+"&y="+n+"&z="+r;else if("ViewBounds"===a.tileType){var h=a.tileGrid.getTileCoordExtent(e);l="&width="+o[0]+"&height="+o[1]+"&viewBounds="+h[0]+","+h[1]+","+h[2]+","+h[3]}else{var u=a.tileGrid.getOrigin(r),d=a.tileGrid.getResolution(r),p=s.getUnits()||"degrees";"degrees"===p&&(p=c.DEGREE),"m"===p&&(p=c.METER);var m=Un.resolutionToScale(d,96,p);l="&x="+i+"&y="+n+"&width="+o[0]+"&height="+o[1]+"&scale="+m+"&origin={'x':"+u[0]+",'y':"+u[1]+"}"}return a._tileUrl+encodeURI(l)},tileLoadFunction:e.format instanceof Mc()?function(e,t){const s=e.getFormat(),r=e.onLoad.bind(e),i=e.onError.bind(e);e.setLoader(function(e,n,o){const l=new XMLHttpRequest;l.open("GET","function"==typeof t?t(e,n,o):t,!0),"arraybuffer"==s.getType()&&(l.responseType="arraybuffer"),l.withCredentials=a.withCredentials,l.onload=function(){if(!l.status||l.status>=200&&l.status<300){const t=s.getType();let a=void 0;"json"===t||"text"===t?a=l.responseText:"xml"===t?(a=l.responseXML)||(a=(new DOMParser).parseFromString(l.responseText,"application/xml")):"arraybuffer"===t&&(a=l.response),a?["4","5"].indexOf(Un.getOlVersion())>-1?r.call(this,s.readFeatures(a,{featureProjection:o}),s.readProjection(a),s.getLastExtent()):r.call(this,s.readFeatures(a,{extent:e,featureProjection:o}),s.readProjection(a)):i.call(this)}else i.call(this)}.bind(this),l.onerror=function(){i.call(this)}.bind(this),l.send()})}:function(e,t){var s=new RegExp("(^|\\?|&)width=([^&]*)(\\s|&|$)"),r=new RegExp("(^|\\?|&)height=([^&]*)(\\s|&|$)"),i=Number(t.match(s)[2]),a=Number(t.match(r)[2]);e.setLoader(function(s,r,n){Pe.get(t).then(function(t){if(e.getFormat()instanceof En())return t.json()}).then(function(t){var r=[];if(e.getFormat()instanceof En()){t.recordsets.map(function(e){return e.features.map(function(e){for(var t=[],s=0,r=0;r<e.geometry.parts.length;r++){for(var i=2*e.geometry.parts[r],a=0,n=s;a<i;a+=2,n+=2)t.push(new se(e.geometry.points[n],e.geometry.points[n+1]));s+=i}return e.geometry.points=t,e}),e}),t.recordsets.map(function(e){return e.features.map(function(t){return t.layerName=e.layerName,t.type=t.geometry.type,r.push(t),t}),e});let o=new(Pc())({extent:[0,0,256,256],code:"TILE_PIXELS",units:"tile-pixels"});["4","5"].indexOf(Un.getOlVersion())>-1?(e.setExtent([0,0,i,a]),e.setProjection(o),r=e.getFormat().readFeatures(Un.toGeoJSON(r))):r=e.getFormat().readFeatures(Un.toGeoJSON(r),{extent:s,dataProjection:o,featureProjection:n}),e.setFeatures(r)}})})},wrapX:void 0!==e.wrapX&&e.wrapX,tileSize:e.tileSize||null,zDirection:["4","5"].indexOf(Un.getOlVersion())>-1?null:0});var a=this;a.withCredentials=e.withCredentials,a._tileType=e.tileType||"ScaleXY",this.vectorTileStyles=new _c,e.format instanceof Mc()&&e.style?"[object String]"==Object.prototype.toString.call(e.style)?Pe.get(e.style,null,{withCredentials:e.withCredentials}).then(e=>e.json()).then(t=>{this._fillByStyleJSON(t,e.source),this.setState("ready")}):this._fillByStyleJSON(e.style,e.source):this._fillByRestMapOptions(e.url,e)}_fillByStyleJSON(e,t){if(t||(t=Object.keys(e.sources)[0]),e.sources&&e.sources[t]&&(this._tileUrl=e.sources[t].tiles[0]),e.metadata&&e.metadata.indexbounds){const t=e.metadata.indexbounds;var s=Math.max(t[2]-t[0],t[3]-t[1]);const r=[];for(let e=0;e<30;e++)r.push(s/512/Math.pow(2,e));this.tileGrid=new(mo())({extent:e.metadata.indexbounds,resolutions:r,tileSize:[512,512]})}}_fillByRestMapOptions(e,t){this._tileUrl=X.urlPathAppend(t.url,"tileFeature.json"),t.format instanceof Mc()&&(this._tileUrl=X.urlPathAppend(t.url,"tileFeature.mvt")),t.serverType=t.serverType||n.ISERVER,this._tileUrl=function(e,t){var s,r,i=e;switch(t){case n.IPORTAL:r=Oe.getToken(e),(s=r?new ue(r,"token"):null)||(r=Oe.getKey(e),s=r?new ue(r,"key"):null);break;case n.ONLINE:r=Oe.getKey(e),s=r?new ue(r,"key"):null;break;default:r=Oe.getToken(e),s=r?new ue(r,"token"):null}s&&(i=X.urlAppend(i,s.getUrlParameters()));return i}(this._tileUrl,t.serverType);var s=!0;void 0!==t.returnAttributes&&(s=t.returnAttributes);var r={};r.returnAttributes=s,void 0!==t._cache&&(r._cache=t._cache),void 0!==t.layersID&&(r.layersID=t.layersID),void 0!==t.layerNames&&(r.layerNames=t.layerNames),void 0!==t.expands&&(r.expands=t.expands),void 0!==t.compressTolerance&&(r.compressTolerance=t.compressTolerance),void 0!==t.coordinateType&&(r.coordinateType=t.coordinateType),void 0!==t.returnCutEdges&&(r.returnCutEdges=t.returnCutEdges),this._tileUrl=X.urlAppend(this._tileUrl,X.getParameterString(r))}static optionsFromMapJSON(e,t){var s={};s.url=e,s.crossOrigin="anonymous";var r=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],i=function(){var e,s=r[2]-r[0],i=r[3]-r[1],a=s>=i?s:i;e=a===s?a/t.viewer.width:a/t.viewer.height;var n=[],o=c.METER;t.coordUnit===c.DEGREE&&(o=c.DEGREE);if(t.visibleScales.length>0){var l=function(e){var t=e.visibleScales;if(!t)return null;var s=e.viewBounds,r=e.coordUnit,i=e.viewer,a=e.scale,n=e.datumAxis;s=new K(s.left,s.bottom,s.right,s.top),i=new J(i.rightBottom.x,i.rightBottom.y),r=r.toLowerCase(),n=n||6378137;var o=r,l=X.calculateDpi(s,i,a,o,n),h=function(e){if(null===e)return;var t,s;s=e.length,t=[s];for(var r=0;r<s;r++)t[r]=X.getResolutionFromScaleDpi(e[r],l,o,n);return t}(t),u=h.length;t=[u];for(var c=0;c<u;c++)t[c]=X.getScaleFromResolutionDpi(h[c],l,o,n);return t}(t);for(let e=0;e<l.length;e++)n.push(Un.scaleToResolution(l[e],96,o))}else for(let t=0;t<17;t++)n.push(e/Math.pow(2,t));return n}();return s.tileGrid=new(mo())({extent:r,resolutions:i}),s}}
  1629. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1630. * This program are made available under the terms of the Apache License, Version 2.0
  1631. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1632. class Lc extends(ju()){constructor(e,t){var s=t||{};function r(e,t,s,r,i){var a=r[0]*s,n=r[1]*s;if(this.rootCanvas.width=this.maxWidth=a,this.rootCanvas.height=this.maxHeight=n,!this.features)return this.rootCanvas;this.pixelRatio=s;var o=this.map.getSize()[0]*s,l=this.map.getSize()[1]*s;return this.offset=[(a-o)/2/s,(n-l)/2/s],this.updateHeatPoints(t),this.rootCanvas}if(super({attributions:s.attributions||"Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>",canvasFunction:r,logo:"4"===Un.getOlVersion()?s.logo:null,projection:s.projection,ratio:s.ratio,resolutions:s.resolutions,state:s.state}),this.canvasFunctionInternal_=r,this.features=[],this.name=e,!s.map)throw new Error("options.map is not found.");this.map=s.map,this.id=s.id?s.id:X.createUniqueID("HeatMapSource_"),this.opacity=s.opacity?s.opacity:1,this.colors=s.colors?s.colors:["blue","cyan","lime","yellow","red"],this.useGeoUnit=!!s.useGeoUnit&&s.useGeoUnit,this.radius=s.radius?s.radius:50,this.featureWeight=s.featureWeight?s.featureWeight:null,this.maxWeight=null,this.minWeight=null,this.maxWidth=null,this.maxHeight=null,this.rootCanvas=document.createElement("canvas");var i=this.map.getSize();this.rootCanvas.width=this.maxWidth=parseInt(i[0]),this.rootCanvas.height=this.maxHeight=parseInt(i[1]),X.modifyDOMElement(this.rootCanvas,null,null,null,null,null,null,this.opacity),this.canvasContext=this.rootCanvas.getContext("2d")}addFeatures(e){this.features=this.toiClientFeature(e),this.changed()}setOpacity(e){if(e!==this.opacity){this.opacity=e;var t=this.rootCanvas;X.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.changed()}}updateHeatPoints(e){this.features&&this.features.length>0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)}convertFastToPixelPoints(e){var t,s,r,i,a,n,o=[];this.useRadius=this.useGeoUnit?parseInt(this.radius/e):this.radius;for(var l=0;l<this.features.length;l++){var h=this.features[l],u=h.geometry,c=this.getLocalXY(new Q(u.x,u.y));this.featureWeight?(c.weight=h.attributes[this.featureWeight],this.maxWeight||(i=i||c.weight,a=a||c.weight,i=Math.max(i,c.weight),a=Math.min(a,c.weight))):c.weight=1,t=Math.floor(c[0]),s=Math.floor(c[1]),r=c.weight,o.push([t,s,r])}this.maxWeight?this.draw(o,this.maxWeight):(n=i&&a?(i+a)/2:1,this.draw(o,n))}draw(e,t){if(!(this.maxHeight>0&&this.maxWidth>0))return!1;var s=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var r=0;r<e.length;r++){var i=e[r];this.canvasContext.globalAlpha=Math.max(i[2]/t,.05),this.canvasContext.drawImage(this.circle,i[0]-this.useRadius,i[1]-this.useRadius)}var a=s.getImageData(0,0,this.maxWidth,this.maxHeight);this.colorize(a.data,this.grad),s.putImageData(a,0,0)}colorize(e,t){for(var s,r=0;r<e.length;r+=4)(s=4*e[r+3])&&(e[r]=t[s],e[r+1]=t[s+1],e[r+2]=t[s+2])}drawCircle(e){var t=e/2,s=this.circle=document.createElement("canvas"),r=s.getContext("2d");s.height=2*e,s.width=2*e,r.shadowOffsetX=r.shadowOffsetY=2*e,r.shadowBlur=t,r.shadowColor="#000000",r.beginPath(),r.arc(-e,-e,e/2,0,2*Math.PI,!0),r.closePath(),r.fill()}createGradient(){var e=this.colors,t=document.createElement("canvas"),s=t.getContext("2d"),r=s.createLinearGradient(0,0,0,256);t.height=256,t.width=1;for(var i=1,a=0,n=e.length;a<n;a++)r.addColorStop(i/n,e[a]),i++;s.fillStyle=r,s.fillRect(0,0,1,256),this.grad=s.getImageData(0,0,1,256).data}getLocalXY(e){var t,s=this.map;(e instanceof se||e instanceof ie)&&(t=s.getPixelFromCoordinate([e.x,e.y])),e instanceof Q&&(t=s.getPixelFromCoordinate([e.lon,e.lat]));var r=-s.getView().getRotation(),i=s.getPixelFromCoordinate(s.getView().getCenter()),a=t;return this.pixelRatio&&(a=this.scale(t,i,this.pixelRatio)),t&&i&&(a=this.rotate(a,r,i)),this.offset&&a?[a[0]+this.offset[0],a[1]+this.offset[1]]:a}rotate(e,t,s){return[Math.cos(t)*(e[0]-s[0])-Math.sin(t)*(e[1]-s[1])+s[0],Math.sin(t)*(e[0]-s[0])+Math.cos(t)*(e[1]-s[1])+s[1]]}scale(e,t,s){return[(e[0]-t[0])*s+t[0],(e[1]-t[1])*s+t[1]]}removeFeatures(e){if(e&&0!==e.length&&this.features&&0!==this.features.length){if(e===this.features)return this.removeAllFeatures();X.isArray(e)||(e=[e]);for(var t,s,r=[],i=0,a=e.length;i<a;i++)t=e[i],-1!==(s=X.indexOf(this.features,t))?this.features.splice(s,1):r.push(t);var n=0==r.length;this.dispatchEvent({type:"featuresremoved",value:{features:r,succeed:n}}),this.changed()}}removeAllFeatures(){this.features=[],this.changed()}toiClientFeature(e){Un.isArray(e)||(e=[e]);let t,s,r=[];for(let i=0,a=e.length;i<a;i++)if(e[i]instanceof Bn())e[i].getGeometry()instanceof Tn()&&(t=new se(e[i].getGeometry().getCoordinates()[0],e[i].getGeometry().getCoordinates()[1]),s=e[i].getProperties().Properties?e[i].getProperties().Properties:{},r.push(new me(t,s)));else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[i].type)){let t=new Ce;r=r.concat(t.read(e[i]))}else{if(!e[i].geometry||!e[i].geometry.parts)throw new Error(`Features[${i}]'s type does not match, please check.`);r.push(Vr.fromJson(e[i]).toFeature())}return r}}const Ic=ol.geom.LineString;var Nc=s.n(Ic),Rc=function(e){if(Nc().prototype.getFlatMidpoint||(Nc().prototype.getFlatMidpoint=function(){return this.getCoordinateAt(.5)}),"4"===Un.getOlVersion()&&window&&window.ol&&window.ol.geom.flat){window.targetMapCache=e;let t=window.ol;t.format.MVT.prototype.readProjection=function(e){return new t.proj.Projection({code:"",units:t.proj.Units.TILE_PIXELS})},t.format.MVT.prototype.readProjection=function(e){return new t.proj.Projection({code:"",units:t.proj.Units.TILE_PIXELS})},t.render.canvas.Replay.prototype.applyFill=function(e,s){var r=e.fillStyle,i=[t.render.canvas.Instruction.SET_FILL_STYLE,r];if("string"!=typeof r){var a=window.targetMapCache.getView().getProjection().getExtent();i.push([a[0],a[3]])}this.instructions.push(i)},t.render.canvas.Replay.prototype.applyFill=function(e,s){var r=e.fillStyle,i=[t.render.canvas.Instruction.SET_FILL_STYLE,r];if("string"!=typeof r){var a=window.targetMapCache.getView().getProjection().getExtent();i.push([a[0],a[3]])}this.instructions.push(i)},t.format.MVT.prototype.createFeature_=function(e,s,r){var i,a=s.type;if(0===a)return null;var n=s.id,o=s.properties;o[this.layerName_]=s.layer.name;var l=[],h=[];t.format.MVT.readRawGeometry_(e,s,l,h);var u=t.format.MVT.getGeometryType_(a,h.length);if(this.featureClass_===t.render.Feature)i=new this.featureClass_(u,l,h,o,n);else{var c;if(u==t.geom.GeometryType.POLYGON){for(var d=[],p=0,m=0,f=0,y=h.length;f<y;++f){var g=h[f];t.geom.flat.orient.linearRingIsClockwise(l,p,g,2)||(d.push(h.slice(m,f+1)),m=f+1),p=g}d.length>1?(h=d,c=new t.geom.MultiPolygon(null)):c=new t.geom.Polygon(null)}else c=u===t.geom.GeometryType.POINT?new t.geom.Point(null):u===t.geom.GeometryType.LINE_STRING?new t.geom.LineString(null):u===t.geom.GeometryType.POLYGON?new t.geom.Polygon(null):u===t.geom.GeometryType.MULTI_POINT?new t.geom.MultiPoint(null):u===t.geom.GeometryType.MULTI_LINE_STRING?new t.geom.MultiLineString(null):null;if(c){c.setFlatCoordinates(t.geom.GeometryLayout.XY,l,h),i=new this.featureClass_,this.geometryName_&&i.setGeometryName(this.geometryName_);var v=t.format.Feature.transformWithOptions(c,!1,this.adaptOptions(r));i.setGeometry(v),i.setId(n),i.setProperties(o)}}return i},t.geom.flat.textpath.lineString=function(e,s,r,i,a,n,o,l){for(var h=[],u=Math.atan2(e[r-i+1]-e[s+1],e[r-i]-e[s]),c=u<-.785||u>2.356,d=u<-.785&&u>-2.356||u>.785&&u<2.356,p=a.length,m=e[s],f=e[s+1],y=e[s+=i],g=e[s+1],v=0,S=Math.sqrt(Math.pow(y-m,2)+Math.pow(g-f,2));s<r-i&&v+S<o;)m=y,f=g,y=e[s+=i],g=e[s+1],v+=S,S=Math.sqrt(Math.pow(y-m,2)+Math.pow(g-f,2));for(var b,x,C,_,T=(o-v)/S,w=t.math.lerp(m,y,T),E=t.math.lerp(f,g,T),M="",A=0,P=0;P<p;++P){x=c?p-P-1:P;var O=a.charAt(x),L=O.charCodeAt(0),I=L>=19968&&L<=40907,N=n(M=c?O+M:M+O)-A;for(A+=N;s<r-i&&Math.sqrt(Math.pow(y-w,2)+Math.pow(g-E,2))<N/2;)m=y,f=g,y=e[s+=i],g=e[s+1];var R=Math.pow(y-m,2)+Math.pow(g-f,2),F=2*(y-m)*(m-w)+2*(g-f)*(f-E),D=Math.pow(m-w,2)+Math.pow(f-E,2)-Math.pow(N/2,2),k=(-F+Math.sqrt(F*F-4*R*D))/(2*R),G=(-F-Math.sqrt(F*F-4*R*D))/(2*R);T=k<0||k>1?G:G<0||G>1?k:k<G?G:k;for(var B=t.math.lerp(m,y,T),U=t.math.lerp(f,g,T);s<r-i&&Math.sqrt(Math.pow(y-B,2)+Math.pow(g-U,2))<N/2;)m=y,f=g,y=e[s+=i],g=e[s+1];R=Math.pow(y-m,2)+Math.pow(g-f,2),F=2*(y-m)*(m-B)+2*(g-f)*(f-U),D=Math.pow(m-B,2)+Math.pow(f-U,2)-Math.pow(N/2,2),k=(-F+Math.sqrt(F*F-4*R*D))/(2*R),G=(-F-Math.sqrt(F*F-4*R*D))/(2*R),T=k<0||k>1?G:G<0||G>1?k:k<G?G:k;var j=t.math.lerp(m,y,T),V=t.math.lerp(f,g,T),H=Math.atan2(V-E,j-w);if(c&&(H+=H>0?-Math.PI:Math.PI),I&&d&&(H+=H>0?-Math.PI/2:Math.PI/2),void 0!==C){var J=H-C;if(J+=J>Math.PI?-2*Math.PI:J<-Math.PI?2*Math.PI:0,I===_?Math.abs(J)>l:Math.abs(J)>l+Math.PI/2)return null}C!=H||d?(A=N,b=[B,U,N/2,H,M=O],c?h.unshift(b):h.push(b),C=H,_=I):(c&&(b[0]=B,b[1]=U,b[2]=N/2),b[4]=M),w=j,E=V,o+=N}return h},t.layer.VectorTile.prototype.setFastRender=function(e){return this.fastRender=e},t.renderer.canvas.VectorTileLayer.prototype.postCompose=function(e,s,r){var i,a,n=this.getLayer(),o=n.getDeclutter()?{}:null,l=n.getSource(),h=n.getRenderMode(),u=t.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS[h],c=s.pixelRatio,d=s.viewState.rotation,p=s.size;d&&(i=Math.round(c*p[0]/2),a=Math.round(c*p[1]/2),t.render.canvas.rotateAtOffset(e,-d,i,a)),o&&this.declutterTree_.clear();for(var m=this.renderedTiles,f=l.getTileGridForProjection(s.viewState.projection),y=[],g=[],v=m.length-1;v>=0;--v){var S=m[v];if(S.getState()!=t.TileState.ABORT)for(var b=S.tileCoord,x=f.getTileCoordExtent(b)[0]-f.getTileCoordExtent(S.wrappedTileCoord)[0],C=void 0,_=0,T=S.tileKeys.length;_<T;++_){var w=S.getTile(S.tileKeys[_]);if(w.getState()!=t.TileState.ERROR){var E=w.getReplayGroup(n,b.toString());if(h==t.layer.VectorTileRenderType.VECTOR||E&&E.hasReplays(u)){C||(C=this.getTransform(s,x));var M=w.tileCoord[0],A=E.getClipCoords(C);e.save(),e.globalAlpha=r.opacity;for(var P=0,O=y.length;P<O;++P){var L=y[P];M<g[P]&&(e.beginPath(),e.moveTo(A[0],A[1]),e.lineTo(A[2],A[3]),e.lineTo(A[4],A[5]),e.lineTo(A[6],A[7]),e.moveTo(L[6],L[7]),e.lineTo(L[4],L[5]),e.lineTo(L[2],L[3]),e.lineTo(L[0],L[1]),e.clip())}E.replay(e,C,d,{},u,o),e.restore(),y.push(A),g.push(M)}else!0===n.fastRender&&(w.replayGroups_={},w.features_=[])}}}o&&t.render.canvas.ReplayGroup.replayDeclutter(o,e,d),d&&t.render.canvas.rotateAtOffset(e,d,i,a),t.renderer.canvas.TileLayer.prototype.postCompose.apply(this,arguments)}}};window.olExtends=Rc;var Fc=s(794),Dc=s.n(Fc);
  1633. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1634. * This program are made available under the terms of the Apache License, Version 2.0
  1635. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1636. class kc extends(t()){constructor(e){super(),e=e||{},this.spriteRegEx=/^(.*)(\?.*)$/,this.defaultFont=["DIN Offc Pro Medium","Arial Unicode MS Regular"],this.map=e.map,this.source=e.source,this.styleTarget=e.style||X.urlAppend(X.urlPathAppend(e.url,"tileFeature/vectorstyles"),"type=MapBox_GL&styleonly=true"),this.resolutions=e.resolutions,this.withCredentials=e.withCredentials,this.selectedObjects=[],this.selectedStyle=e.selectedStyle||function(){return new(Jn())({fill:new(Qn())({color:"rgba(255, 0, 0, 1)"}),stroke:new(Zn())({color:"rgba(255, 0, 0, 1)",width:10}),text:new(eo())({font:'normal 400 11.19px "Microsoft YaHei"',placement:"point",fill:new(Qn())({color:"blue"})}),image:new(Yn())({radius:5,fill:new(Qn())({color:"blue"})})})},this.layersBySourceLayer={},Rc(this.map),this._loadStyle(this.styleTarget)}getStyleFunction(){return this.featureStyleFuntion}getStylesBySourceLayer(e){if(this.layersBySourceLayer[e])return this.layersBySourceLayer[e];const t=[];for(let s=0;s<this._mbStyle.layers.length;s++){const r=this._mbStyle.layers[s];r["source-layer"]===e&&t.push(r)}return this.layersBySourceLayer[e]=t,t}setSelectedId(e,t){this.selectedObjects=[],this.selectedObjects.push({id:e,sourceLayer:t})}setSelectedObjects(e){Array.isArray(e)||(e=[e]),this.selectedObjects=[],this.selectedObjects=e}addSelectedObjects(e){Array.isArray(e)||(e=[e]),this.selectedObjects.push(...e)}removeSelectedObjects(e){Array.isArray(e)||(e=[e]),e.forEach(e=>{Dc()(this.selectedObjects,t=>e.id===t.id&&e.sourceLayer===t.sourceLayer)})}clearSelectedObjects(){this.selectedObjects=[]}updateStyles(e){"[object Array]"!==Object.prototype.toString.call(e)&&(e=[e]);const t={};e.forEach(e=>{t[e.id]=e});let s=0;for(const r in this._mbStyle.layers){const i=this._mbStyle.layers[r];if(s>=e.length)break;if(!t[i.id])continue;const a=JSON.parse(JSON.stringify(t[i.id]));a.paint&&(a.paint=Object.assign({},i.paint,a.paint)),a.layout&&(a.layout=Object.assign({},i.layout,a.layout)),Object.assign(i,a),s++}this._createStyleFunction()}setStyle(e){this.layersBySourceLayer={},this._loadStyle(e)}_loadStyle(e){"[object Object]"==Object.prototype.toString.call(e)?(this._mbStyle=e,this._resolve()):Pe.get(e,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(e=>{this._mbStyle=e,this._resolve()})}_resolve(){if(this.source||(this.source=Object.keys(this._mbStyle.sources)[0]),this._mbStyle.sprite){const e=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"";this._mbStyle.sprite=this._mbStyle.sprite.replace("@2x","");const t=this._toSpriteUrl(this._mbStyle.sprite,this.path,e+".json");Pe.get(t,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(t=>{this._spriteData=t,this._spriteImageUrl=this._toSpriteUrl(this._mbStyle.sprite,this.path,e+".png"),this._spriteImage=null;const s=new Image;s.crossOrigin=this.withCredentials?"use-credentials":"anonymous",s.onload=(()=>{this._spriteImage=s,this._initStyleFunction()}),s.onerror=(()=>{this._spriteImage=null,this._initStyleFunction()}),s.src=this._spriteImageUrl})}else this._initStyleFunction()}_initStyleFunction(){if(!this.resolutions&&this._mbStyle.metadata&&this._mbStyle.metadata.indexbounds){const t=this._mbStyle.metadata.indexbounds;var e=Math.max(t[2]-t[0],t[3]-t[1]);const s=[];for(let t=0;t<30;t++)s.push(e/512/Math.pow(2,t));this.resolutions=s}this._createStyleFunction(),this.dispatchEvent("styleloaded")}_createStyleFunction(){this.map&&window.olms.applyBackground(this.map,this._mbStyle),this.featureStyleFuntion=this._getStyleFunction()}_getStyleFunction(){return this.fun=window.olms.stylefunction({setStyle:function(){},set:function(){},changed:function(){}},this._mbStyle,this.source,this.resolutions,this._spriteData,"",this._spriteImage),(e,t)=>{const s=this.fun(e,t);if(this.selectedObjects.length>0&&this.selectedObjects.find(t=>t.id===e.getId()&&t.sourceLayer===e.get("layer"))){const r=s&&s[0]?s[0].getZIndex():99999;let i=this.selectedStyle(e,t);Array.isArray(i)||(i=[i]);for(let t=0;t<i.length;t++){const a=i[t];"Point"===e.getGeometry().getType()&&s[0].getText()&&a.getText()&&(a.setFill(null),a.setStroke(null),a.setImage(),a.getText().setText(s[0].getText().getText())),a.setZIndex(r)}return i}return s}}_withPath(e,t){return t&&0!=e.indexOf("http")&&(e=t+e),e}_toSpriteUrl(e,t,s){const r=(e=this._withPath(e,t)).match(this.spriteRegEx);return r?r[1]+s+(r.length>2?r[2]:""):e+s}}
  1637. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1638. * This program are made available under the terms of the Apache License, Version 2.0
  1639. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1640. class Gc extends r{constructor(e,t){super(e,t)}code(e,t){var s=this;new We(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).code(X.urlPathAppend(s.url,"geocoding"),e)}decode(e,t){var s=this;new We(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).decode(X.urlPathAppend(s.url,"geodecoding"),e)}}
  1641. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1642. * This program are made available under the terms of the Apache License, Version 2.0
  1643. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1644. class Bc extends r{constructor(e,t){super(e,t)}queryChart(e,t,s){var r=this,i=r._processParams(e),a=r._processFormat(s);new xt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:a}).processAsync(i)}getChartFeatureInfo(e){var t=this,s=X.urlPathAppend(t.url,"chartFeatureInfoSpecs");new gt(s,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}_processParams(e){if(!e)return{};e.returnContent=null==e.returnContent||e.returnContent,e.filter&&(e.chartQueryFilterParameters=Un.isArray(e.filter)?e.filter:[e.filter]),e.bounds&&(e.bounds=new K(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3]))}_processFormat(e){return e||a.GEOJSON}}
  1645. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1646. * This program are made available under the terms of the Apache License, Version 2.0
  1647. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1648. class Uc extends r{constructor(e,t){super(e,t)}getFields(e,t){var s=this;new Ns(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},datasource:e.datasource,dataset:e.dataset}).processAsync()}getFieldStatisticsInfo(e,t){var s=this,r=e.fieldName,i=e.statisticMode;i&&!Un.isArray(i)&&(i=[i]),s.currentStatisticResult={fieldName:r},s._statisticsCallback=t,i.forEach(t=>{s.currentStatisticResult[t]=null,s._fieldStatisticRequest(e.datasource,e.dataset,r,t)})}_fieldStatisticRequest(e,t,s,r){var i=this;new es(i.url,{eventListeners:{scope:i,processCompleted:i._processCompleted,processFailed:i._statisticsCallback},crossOrigin:i.options.crossOrigin,headers:i.options.headers,datasource:e,dataset:t,field:s,statisticMode:r}).processAsync()}_processCompleted(e){var t=this,s=!0,r=e.result;for(var i in this.currentStatisticResult&&null==t.currentStatisticResult[r.mode]&&(this.currentStatisticResult[r.mode]=r.result),t.currentStatisticResult)if(null==t.currentStatisticResult[i]){s=!1;break}s&&t._statisticsCallback({result:t.currentStatisticResult})}}
  1649. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1650. * This program are made available under the terms of the Apache License, Version 2.0
  1651. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1652. class jc extends r{constructor(e,t){super(e,t)}getGridCellInfos(e,t){if(!e)return null;var s=this;new Fs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}}class Vc extends r{constructor(e,t){super(e,t),this.headers=!0,this.crossOrigin=!0,this.withCredentials=!0,this.proxy=!0}getTools(e){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:e,processFailed:e}}).getTools()}getTool(e,t){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getTool(e)}execute(e,t,s,r){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).execute(e,t,s)}submitJob(e,t,s,r){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).submitJob(e,t,s)}waitForJobCompletion(e,t,s,r){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).waitForJobCompletion(e,t,s)}getJobInfo(e,t,s){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).getJobInfo(e,t)}cancelJob(e,t,s){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).cancelJob(e,t)}getJobs(e,t){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getJobs(e)}getResults(e,t,s,r){new vs(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).getResults(e,t,s)}}
  1653. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1654. * This program are made available under the terms of the Apache License, Version 2.0
  1655. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1656. class Hc extends r{constructor(e,t){super(e,t)}getLayersInfo(e){var t=this;new cr(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{processCompleted:e,processFailed:e}}).processAsync()}setLayerInfo(e,t){if(e){var s=this,r=e.resourceID,i=e.tempLayerName,a=e.layerInfo;if(r&&i){var n=X.urlPathAppend(s.url,"tempLayersSet/"+r+"/"+i);new Hr(n,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(a)}}}setLayersInfo(e,t){if(e){var s=this,r=e.resourceID,i=!!e.isTempLayers&&e.isTempLayers,a=e.layersInfo;if((!i||r)&&a)new Jr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},resourceID:r,isTempLayers:i}).processAsync(a)}}setLayerStatus(e,t){if(e){var s=this;new qr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(e)}}}
  1657. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1658. * This program are made available under the terms of the Apache License, Version 2.0
  1659. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1660. class Jc extends r{constructor(e,t){super(e,t)}measureDistance(e,t){this.measure(e,"DISTANCE",t)}measureArea(e,t){this.measure(e,"AREA",t)}measure(e,t,s){var r=this;new wr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,measureMode:t,eventListeners:{scope:r,processCompleted:s,processFailed:s}}).processAsync(r._processParam(e))}_processParam(e){return e&&e.geometry&&(e.geometry=Un.toSuperMapGeometry(JSON.parse((new(En())).writeGeometry(e.geometry)))),e}}
  1661. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1662. * This program are made available under the terms of the Apache License, Version 2.0
  1663. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1664. class zc extends r{constructor(e,t){super(e,t)}sinksFacilityAnalyst(e,t){var s=this;new Vt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}sourcesFacilityAnalyst(e,t){var s=this;new Jt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}traceUpFacilityAnalyst(e,t){var s=this;new Qt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}traceDownFacilityAnalyst(e,t){var s=this;new Yt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}upstreamFacilityAnalyst(e,t){var s=this;new Zt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}}
  1665. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1666. * This program are made available under the terms of the Apache License, Version 2.0
  1667. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1668. class qc extends r{constructor(e,t){super(e,t)}burstPipelineAnalyst(e,t){var s=this;new yt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}computeWeightMatrix(e,t){var s=this;new Et(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}findClosestFacilities(e,t,s){var r=this;new ss(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}streamFacilityAnalyst(e,t,s){var r=this;new qt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findLocation(e,t,s){var r=this;new is(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findPath(e,t,s){var r=this;new ls(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findTSPPaths(e,t,s){var r=this;new ds(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findMTSPPaths(e,t,s){var r=this;new ns(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}findServiceAreas(e,t,s){var r=this;new us(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}updateEdgeWeight(e,t){var s=this;new wi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}updateTurnNodeWeight(e,t){var s=this;new Mi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}_processParams(e){if(!e)return{};if(e.centers&&Un.isArray(e.centers)&&e.centers.map(function(t,s){return e.centers[s]=t instanceof Tn()?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.centers[s]}),e.nodes&&Un.isArray(e.nodes)&&e.nodes.map(function(t,s){return e.nodes[s]=t instanceof Tn()?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.nodes[s]}),e.event&&e.event instanceof Tn()&&(e.event={x:e.event.getCoordinates()[0],y:e.event.getCoordinates()[1]}),e.facilities&&Un.isArray(e.facilities)&&e.facilities.map(function(t,s){return e.facilities[s]=t instanceof Tn()?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.facilities[s]}),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;Un.isArray(t)?t.map(function(t,s){return e.parameter.barrierPoints[s]=t instanceof Tn()?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.parameter.barrierPoints[s]}):e.parameter.barrierPoints=[t instanceof Tn()?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t]}return e}_processFormat(e){return e||a.GEOJSON}}
  1669. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1670. * This program are made available under the terms of the Apache License, Version 2.0
  1671. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1672. class Wc extends r{constructor(e,t){super(e,t),this.kernelDensityJobs={},this.summaryMeshJobs={},this.queryJobs={},this.summaryRegionJobs={},this.vectorClipJobs={},this.overlayGeoJobs={},this.buffersJobs={},this.topologyValidatorJobs={},this.summaryAttributesJobs={}}getKernelDensityJobs(e,t){var s=this,r=s._processFormat(t);new Sr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getKernelDensityJobs()}getKernelDensityJob(e,t,s){var r=this,i=r._processFormat(s);new Sr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getKernelDensityJob(e)}addKernelDensityJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Sr(i.url,{proxy:i.proxy,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.kernelDensityJobs[e.id]=e.state}},format:n}).addKernelDensityJob(a,s)}getKernelDensityJobState(e){return this.kernelDensityJobs[e]}getSummaryMeshJobs(e,t){var s=this,r=s._processFormat(t);new ei(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryMeshJobs()}getSummaryMeshJob(e,t,s){var r=this,i=r._processFormat(s);new ei(r.url,{proxy:r.options.proxy,crossOrigin:r.options.crossOrigin,headers:r.options.headers,withCredentials:r.options.withCredentials,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getSummaryMeshJob(e)}addSummaryMeshJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new ei(i.url,{proxy:i.proxy,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryMeshJobs[e.id]=e.state}},format:n}).addSummaryMeshJob(a,s)}getSummaryMeshJobState(e){return this.summaryMeshJobs[e]}getQueryJobs(e,t){var s=this,r=s._processFormat(t);new Yr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getQueryJobs()}getQueryJob(e,t,s){var r=this,i=r._processFormat(s);new Yr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getQueryJob(e)}addQueryJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Yr(i.url,{proxy:i.proxy,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.queryJobs[e.id]=e.state}},format:n}).addQueryJob(a,s)}getQueryJobState(e){return this.queryJobs[e]}getSummaryRegionJobs(e,t){var s=this,r=s._processFormat(t);new si(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryRegionJobs()}getSummaryRegionJob(e,t,s){var r=this,i=r._processFormat(s);new si(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getSummaryRegionJob(e)}addSummaryRegionJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new si(i.url,{proxy:i.proxy,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryRegionJobs[e.id]=e.state}},format:n}).addSummaryRegionJob(a,s)}getSummaryRegionJobState(e){return this.summaryRegionJobs[e]}getVectorClipJobs(e,t){var s=this,r=s._processFormat(t);new Pi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getVectorClipJobs()}getVectorClipJob(e,t,s){var r=this,i=r._processFormat(s);new Pi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getVectorClipJob(e)}addVectorClipJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Pi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.vectorClipJobs[e.id]=e.state}},format:n}).addVectorClipJob(a,s)}getVectorClipJobState(e){return this.vectorClipJobs[e]}getOverlayGeoJobs(e,t){var s=this,r=s._processFormat(t);new Ar(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getOverlayGeoJobs()}getOverlayGeoJob(e,t,s){var r=this,i=r._processFormat(s);new Ar(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getOverlayGeoJob(e)}addOverlayGeoJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Ar(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.overlayGeoJobs[e.id]=e.state}},format:n}).addOverlayGeoJob(a,s)}getoverlayGeoJobState(e){return this.overlayGeoJobs[e]}getBuffersJobs(e,t){var s=this,r=s._processFormat(t);new pt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getBuffersJobs()}getBuffersJob(e,t,s){var r=this,i=r._processFormat(s);new pt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getBuffersJob(e)}addBuffersJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new pt(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.buffersJobs[e.id]=e.state}},format:n}).addBuffersJob(a,s)}getBuffersJobState(e){return this.buffersJobs[e]}getTopologyValidatorJobs(e,t){var s=this,r=s._processFormat(t);new vi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getTopologyValidatorJobs()}getTopologyValidatorJob(e,t,s){var r=this,i=r._processFormat(s);new vi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getTopologyValidatorJob(e)}addTopologyValidatorJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new vi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.topologyValidatorJobs[e.id]=e.state}},format:n}).addTopologyValidatorJob(a,s)}getTopologyValidatorJobState(e){return this.topologyValidatorJobs[e]}getSummaryAttributesJobs(e,t){var s=this,r=s._processFormat(t);new Zr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryAttributesJobs()}getSummaryAttributesJob(e,t,s){var r=this,i=r._processFormat(s);new Zr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getSummaryAttributesJob(e)}addSummaryAttributesJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Zr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryAttributesJobs[e.id]=e.state}},format:n}).addSummaryAttributesJob(a,s)}getSummaryAttributesJobState(e){return this.summaryAttributesJobs[e]}_processFormat(e){return e||a.GEOJSON}_processParams(e){return e?(e.bounds&&(e.bounds=Un.toSuperMapBounds(e.bounds)),e.query&&(e.query=Un.toSuperMapBounds(e.query)),e.geometryQuery&&(e.geometryQuery=Un.toProcessingParam(e.geometryQuery)),e.geometryClip&&(e.geometryClip=Un.toProcessingParam(e.geometryClip)),e):{}}}
  1673. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1674. * This program are made available under the terms of the Apache License, Version 2.0
  1675. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1676. class Yc extends r{constructor(e,t){super(e,t)}getAreaSolarRadiationResult(e,t,s){var r=this;new Ze(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(e)}bufferAnalysis(e,t,s){var r=this;new lt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}densityAnalysis(e,t,s){var r=this;new kt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}generateSpatialData(e,t,s){var r=this;new ms(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(e)}geoRelationAnalysis(e,t,s){var r=this;new bs(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(e)}interpolationAnalysis(e,t,s){var r=this;new gr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}mathExpressionAnalysis(e,t,s){var r=this;new _r(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}overlayAnalysis(e,t,s){var r=this;new Er(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}routeCalculateMeasure(e,t,s){var r=this;new Br(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}routeLocate(e,t,s){var r=this;new jr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}surfaceAnalysis(e,t,s){var r=this;new ii(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}terrainCurvatureCalculate(e,t,s){var r=this;new ni(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(e)}thiessenAnalysis(e,t,s){var r=this;new mi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}).processAsync(r._processParams(e))}geometrybatchAnalysis(e,t,s){for(var r=this,i=new fi(r.url,{serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}),a=[],n=0;n<e.length;n++){var o=e[n];a.push({analystName:o.analystName,param:r._processParams(o.param)})}i.processAsync(a)}_processParams(e){if(!e)return{};if(e.bounds&&(e.bounds=Un.toSuperMapBounds(e.bounds)),e.inputPoints)for(let s=0;s<e.inputPoints.length;s++){var t=e.inputPoints[s];Un.isArray(t)?e.inputPoints[s]={x:t[0],y:t[1],tag:t[2]}:e.inputPoints[s]={x:t.getCoordinates()[0],y:t.getCoordinates()[1],tag:t.tag}}if(e.points)for(let t=0;t<e.points.length;t++){let s=e.points[t];Un.isArray(s)&&s.setCoordinates(s),e.points[t]=new se(s.getCoordinates()[0],s.getCoordinates()[1])}if(e.point){let t=e.point;Un.isArray(t)&&t.setCoordinates(t),e.point=new se(t.getCoordinates()[0],t.getCoordinates()[1])}if(e.extractRegion&&(e.extractRegion=this.convertGeometry(e.extractRegion)),e.extractParameter&&e.extractParameter.clipRegion&&(e.extractParameter.clipRegion=this.convertGeometry(e.extractParameter.clipRegion)),e.clipParam&&e.clipParam.clipRegion&&(e.clipParam.clipRegion=this.convertGeometry(e.clipParam.clipRegion)),e.sourceGeometry){var s=null;e.sourceGeometrySRID&&(s=e.sourceGeometrySRID),e.sourceGeometry=this.convertGeometry(e.sourceGeometry),s&&(e.sourceGeometry.SRID=s),delete e.sourceGeometry.sourceGeometrySRID}if(e.operateGeometry&&(e.operateGeometry=this.convertGeometry(e.operateGeometry)),e.sourceGeometries){for(var r=[],i=0;i<e.sourceGeometries.length;i++)r.push(this.convertGeometry(e.sourceGeometries[i]));e.sourceGeometries=r}if(e.operateGeometries){for(var a=[],n=0;n<e.operateGeometries.length;n++)a.push(this.convertGeometry(e.operateGeometries[n]));e.operateGeometries=a}if(e.sourceRoute&&e.sourceRoute instanceof Nc()&&e.sourceRoute.getCoordinates()){var o={type:"LINEM"};o.parts=[e.sourceRoute.getCoordinates()[0].length],o.points=[];for(let t=0;t<e.sourceRoute.getCoordinates()[0].length;t++){let s=e.sourceRoute.getCoordinates()[0][t];o.points=o.points.concat({x:s[0],y:s[1],measure:s[2]})}e.sourceRoute=o}var l=this;return e.operateRegions&&Un.isArray(e.operateRegions)&&e.operateRegions.map(function(t,s){return e.operateRegions[s]=l.convertGeometry(t),e.operateRegions[s]}),e.sourceRoute&&e.sourceRoute.components&&Un.isArray(e.sourceRoute.components)&&e.sourceRoute.components.map(function(t,s){return e.sourceRoute.components[s]=l.convertGeometry(t),e.sourceRoute.components[s]}),e}_processFormat(e){return e||a.GEOJSON}convertGeometry(e){return-1!=["FeatureCollection","Feature","Geometry"].indexOf(e.type)?Un.toSuperMapGeometry(e):Un.toSuperMapGeometry(JSON.parse((new(En())).writeGeometry(e)))}}
  1677. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1678. * This program are made available under the terms of the Apache License, Version 2.0
  1679. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1680. class Xc extends r{constructor(e,t){super(e,t)}getThemeInfo(e,t){var s=this;new pi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}}
  1681. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1682. * This program are made available under the terms of the Apache License, Version 2.0
  1683. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1684. class Qc extends r{constructor(e,t){super(e,t)}queryStop(e,t){var s=this;new Qr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}analysisTransferPath(e,t){var s=this;new xi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}analysisTransferSolution(e,t){var s=this;new _i(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))}_processParams(e){return e?(e.transferLines&&!Un.isArray(e.transferLines)&&(e.transferLines=[e.transferLines]),e.points&&Un.isArray(e.points)&&e.points.map(function(t,s){return e.points[s]=t instanceof Tn()?{x:t.getCoordinates()[0],y:t.getCoordinates()[1]}:t,e.points[s]}),e):{}}}
  1685. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1686. * This program are made available under the terms of the Apache License, Version 2.0
  1687. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1688. class Kc extends r{constructor(e,t){super(e,t)}createWebPrintingJob(e,t){if(e){var s=this;new ji(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).createWebPrintingJob(s._processParams(e))}}getPrintingJob(e,t){var s=this;new ji(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).getPrintingJob(e)}getPrintingJobResult(e,t){var s=this;new ji(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).getPrintingJobResult(e)}getLayoutTemplates(e){var t=this;new ji(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).getLayoutTemplates()}_processParams(e){return e.layoutOptions&&e.layoutOptions.littleMapOptions&&(e.layoutOptions.littleMapOptions.center=this._toPointObject(e.layoutOptions.littleMapOptions.center)),e.exportOptions&&(e.exportOptions.center=this._toPointObject(e.exportOptions.center)),e}_toPointObject(e){return Un.isArray(e)?{x:e[0],y:e[1]}:e instanceof i.Geometry.Point||e instanceof Tn()?{x:e.x,y:e.y}:e}}const Zc=JSON.parse('[{"name":"黑龙江省","coord":[127.64559817675396,48.48668098449708]},{"name":"内蒙古自治区","coord":[118.34519572208615,45.370218276977525]},{"name":"新疆维吾尔自治区","coord":[87.13479065593184,41.75497055053711]},{"name":"吉林省","coord":[126.12985278813787,43.57983207702637]},{"name":"辽宁省","coord":[124.02494773936439,41.105743408203125]},{"name":"甘肃省","coord":[102.87785725633012,37.69582366943361]},{"name":"河北省","coord":[115.66327227481898,39.33383178710938]},{"name":"北京市","coord":[116.62199343603638,40.25053787231445]},{"name":"山西省","coord":[112.45180235808988,37.666561126708984]},{"name":"天津市","coord":[117.35711842642581,39.406789779663086]},{"name":"陕西省","coord":[109.56294003056632,35.64754199981689]},{"name":"宁夏回族自治区","coord":[105.96110877640074,37.3081169128418]},{"name":"青海省","coord":[96.07301048277901,35.44417190551758]},{"name":"山东省","coord":[118.03833752951093,36.29800605773925]},{"name":"西藏自治区","coord":[87.47361520439412,31.6703872680664]},{"name":"河南省","coord":[113.07832397097275,33.87751102447509]},{"name":"江苏省","coord":[119.93926538201052,32.945452690124505]},{"name":"安徽省","coord":[117.15146765881019,32.024482727050774]},{"name":"四川省","coord":[102.28998890142759,30.182161331176758]},{"name":"湖北省","coord":[112.87798261431585,31.157071113586426]},{"name":"重庆市","coord":[107.870126637831,30.188085556030266]},{"name":"上海市","coord":[121.42561166015514,31.276043891906745]},{"name":"浙江省","coord":[119.75337092707514,29.175934791564945]},{"name":"湖南省","coord":[111.52770282777405,27.38110256195069]},{"name":"江西省","coord":[115.51091280655628,27.283511161804206]},{"name":"云南省","coord":[101.27053825991308,25.19783210754396]},{"name":"贵州省","coord":[106.49672346773299,26.92267990112305]},{"name":"福建省","coord":[117.9976766946587,25.939599990844727]},{"name":"广西壮族自治区","coord":[108.98706831086302,23.891559600830078]},{"name":"台湾省","coord":[120.82468432537434,23.602651596069336]},{"name":"香港特别行政区","coord":[114.21036850371561,22.374858856201172]},{"name":"海南省","coord":[109.62792940960824,19.163116455078125]},{"name":"广东省","coord":[113.32127888266032,22.873867034912106]},{"name":"澳门特别行政区","coord":[113.56819996291901,22.160347992976]}]'),$c=JSON.parse('[{"name":"克拉玛依市","coord":[85.01486759299489,45.406422237230046]},{"name":"昌吉回族自治州","coord":[88.7154624754753,44.26991024636568]},{"name":"石河子市","coord":[86.0208600035924,44.239045558096805]},{"name":"霍林郭勒市","coord":[114.73479243733115,44.16058374713977]},{"name":"本溪市","coord":[124.64357865201586,41.177197783134275]},{"name":"嘉峪关市","coord":[98.16891560537093,39.76279786284264]},{"name":"莱芜市","coord":[117.65723565456207,36.27916499211527]},{"name":"神农架林区","coord":[110.48296222218153,31.581260143666697]},{"name":"天门市","coord":[113.00615321481195,30.64105781887143]},{"name":"鄂州市","coord":[114.94764081970385,30.325634953844585]},{"name":"潜江市","coord":[112.70703817700621,30.349210666019893]},{"name":"仙桃市","coord":[113.34688900729822,30.315951161935402]},{"name":"萍乡市","coord":[113.88072263074415,27.47193090553213]},{"name":"台湾省","coord":[120.14338943402045,23.596002465926095]},{"name":"东莞市","coord":[113.89443658529342,22.897826158636448]},{"name":"中山市","coord":[113.37118387764659,22.501478858616522]},{"name":"珠海市","coord":[113.21799258934986,22.23782602992192]},{"name":"北海市","coord":[109.18248083043899,21.695773689750148]},{"name":"香港","coord":[114.20689279508653,22.36016760139811]},{"name":"舟山市","coord":[122.22514712841459,30.338633120695956]},{"name":"克孜勒苏柯尔克孜","coord":[74.62910472637343,39.59886016069875]},{"name":"喀什地区","coord":[77.19899922143753,37.85462871211595]},{"name":"阿克苏地区","coord":[81.43930290016381,41.067304799230456]},{"name":"和田地区","coord":[80.69780509160952,36.95287032287055]},{"name":"阿里地区","coord":[82.536487505389,32.69566569631762]},{"name":"日喀则地区","coord":[86.5996831353606,29.54861754814263]},{"name":"那曲地区","coord":[88.32523292667608,33.20600450932715]},{"name":"玉树藏族自治州","coord":[95.2107128446203,33.90320387919257]},{"name":"迪庆藏族自治州","coord":[99.42465312188943,28.052797714348895]},{"name":"怒江傈傈族自治州","coord":[98.85737910439825,26.98345757528851]},{"name":"大理白族自治州","coord":[99.93934374816013,25.684737357453045]},{"name":"德宏傣族景颇族自","coord":[98.13830877778075,24.593421919561205]},{"name":"保山市","coord":[99.19031013453166,24.979380341662]},{"name":"临沧市","coord":[99.62483778975081,24.058807858948214]},{"name":"普洱市","coord":[100.94440267992684,23.44121660743221]},{"name":"西双版纳傣族自治","coord":[100.86105801845994,21.882475641324206]},{"name":"拉萨市","coord":[91.3684790613129,30.14176592960237]},{"name":"山南地区","coord":[92.11665242621062,28.33000201578789]},{"name":"林芝地区","coord":[94.9307847458166,29.125110156601963]},{"name":"昌都地区","coord":[97.33912235873476,30.48520825551814]},{"name":"丽江市","coord":[100.65713436205135,26.96190318191959]},{"name":"攀枝花市","coord":[101.73355913301131,26.714486678752795]},{"name":"凉山彝族自治州","coord":[102.08678551422615,27.683020519860396]},{"name":"楚雄彝族自治州","coord":[101.68264761198458,25.369603845264024]},{"name":"红河哈尼族彝族自","coord":[102.95101719613119,23.624860095239875]},{"name":"文山壮族苗族自治","coord":[104.8708359910614,23.579587266862504]},{"name":"百色市","coord":[106.69546907589859,23.98220841166522]},{"name":"崇左市","coord":[107.3277087317123,22.49769755349952]},{"name":"防城港市","coord":[107.88939931155171,21.94550204069006]},{"name":"南宁市","coord":[108.67078983716917,23.12207641861882]},{"name":"钦州市","coord":[108.8532307305186,22.157690108421384]},{"name":"玉林市","coord":[110.26918466489103,22.391823643610415]},{"name":"湛江市","coord":[109.93033457863683,21.086751055633457]},{"name":"茂名市","coord":[110.80336192333934,22.069184739040775]},{"name":"阳江市","coord":[111.70471342186183,22.108751366417575]},{"name":"江门市","coord":[112.53715618649149,22.297368082806777]},{"name":"广州市","coord":[113.4949302208309,23.28359314707863]},{"name":"清远市","coord":[113.10957368131268,24.334444053233856]},{"name":"肇庆市","coord":[112.11117530204233,23.60241158796112]},{"name":"梧州市","coord":[111.01709510772797,23.518132876753846]},{"name":"贺州市","coord":[111.50423061842756,24.4095096817199]},{"name":"桂林市","coord":[110.44046163393094,25.353966673735407]},{"name":"柳州市","coord":[109.34854449214147,24.972408051485047]},{"name":"河池市","coord":[107.81191841865586,24.649291651298164]},{"name":"黔东南苗族侗族自","coord":[108.39952601614591,26.429286420465576]},{"name":"贵阳市","coord":[106.59784062851153,26.797907456479816]},{"name":"安顺市","coord":[105.76161265300635,25.988644902171018]},{"name":"黔西南布依族苗族","coord":[105.5954078788574,25.404850939549405]},{"name":"曲靖市","coord":[103.9164335632742,25.697243690315265]},{"name":"六盘水市","coord":[104.77723228072432,26.15402255629164]},{"name":"毕节地区","coord":[105.03867422931839,27.077913968069666]},{"name":"昭通市","coord":[104.29730513046874,27.62418247971078]},{"name":"宜宾市","coord":[104.76748901448207,28.553501804266475]},{"name":"乐山市","coord":[103.56027669102787,29.160754519210577]},{"name":"自贡市","coord":[104.63272827056402,29.273152614922402]},{"name":"内江市","coord":[104.82644562304716,29.61272653799929]},{"name":"遵义市","coord":[106.82413636302059,28.191847588570702]},{"name":"达州市","coord":[107.59704170009518,31.32138258839703]},{"name":"遂宁市","coord":[105.48979445433736,30.677687821242678]},{"name":"广安市","coord":[106.56708164098042,30.43500706741521]},{"name":"泸州市","coord":[105.42591761727707,28.50277238478137]},{"name":"资阳市","coord":[104.97995126874034,30.154251886139654]},{"name":"雅安市","coord":[102.69931299964517,29.892630706195035]},{"name":"眉山市","coord":[104.07052881858888,29.894202166560405]},{"name":"甘孜藏族自治州","coord":[100.50721042614238,30.975216556269658]},{"name":"果洛藏族自治州","coord":[99.30775565051923,34.03539865224808]},{"name":"海南藏族自治州","coord":[100.39969108016373,35.90048272566899]},{"name":"黄南藏族自治州","coord":[101.5360706381689,35.10286360841902]},{"name":"赣南藏族自治州","coord":[102.97083885806067,34.326752803339026]},{"name":"陇南市","coord":[105.24780098912132,33.57031117443431]},{"name":"天水市","coord":[105.53503634660417,34.62320421368087]},{"name":"定西市","coord":[104.58787768541339,35.08900966621695]},{"name":"临夏回族自治州","coord":[103.2612870434902,35.591577124455235]},{"name":"西宁市","coord":[101.57680657999033,36.84800271717157]},{"name":"海东地区","coord":[102.30909850729282,36.287400615025646]},{"name":"海北藏族自治州","coord":[100.27122484450717,37.892557516083826]},{"name":"金昌市","coord":[102.02244049169511,38.497330414886164]},{"name":"酒泉市","coord":[95.94486678270127,40.56891536586272]},{"name":"海西蒙古族藏族自","coord":[94.67143298050689,36.022725148503724]},{"name":"巴音郭楞蒙古自治","coord":[88.18116214759745,39.556478810319916]},{"name":"哈密地区","coord":[93.84302392518026,42.95015211178875]},{"name":"叶鲁番地区","coord":[89.82035217277885,42.399368632283505]},{"name":"乌鲁木齐市","coord":[88.00048109561487,43.549986370786]},{"name":"阿勒泰地区","coord":[88.11213933257655,47.05593413019629]},{"name":"博尔塔拉蒙古自治","coord":[82.26402238163408,44.671135542630864]},{"name":"伊犁哈萨克自治州","coord":[82.80778717477179,43.53783381365267]},{"name":"阿拉善盟","coord":[103.29923966842289,40.10955801781495]},{"name":"武威市","coord":[102.73362058791429,37.94211141321436]},{"name":"兰州市","coord":[103.73793563506032,36.27379827886003]},{"name":"中卫市","coord":[105.6943786030716,37.20654236148948]},{"name":"银川市","coord":[106.20022174140034,38.52103167597483]},{"name":"石嘴山市","coord":[106.41544011793628,38.84054137571417]},{"name":"乌海市","coord":[106.8984175998405,39.54616572239788]},{"name":"鄂尔多斯市","coord":[108.43285571424619,39.24036799350715]},{"name":"巴彦淖尔市","coord":[107.45840392808307,41.30159860424196]},{"name":"包头市","coord":[110.46472193224272,41.48017783644221]},{"name":"呼和浩特市","coord":[111.48365173603975,40.498363056149884]},{"name":"乌兰察布市","coord":[112.61568977597707,41.75789561273154]},{"name":"大同市","coord":[113.7107192749083,39.898956799744184]},{"name":"朔州市","coord":[112.65428748167508,39.681772914701924]},{"name":"忻州市","coord":[112.36127575589583,38.88990233614568]},{"name":"榆林市","coord":[109.68473112169593,38.19921027134876]},{"name":"延安市","coord":[109.52425222161318,36.406522726136814]},{"name":"庆阳市","coord":[107.73052193155061,36.183821532624464]},{"name":"固原市","coord":[106.20191575442442,36.11634909496382]},{"name":"白银市","coord":[104.68634478137065,36.51582865625868]},{"name":"宝鸡市","coord":[107.33534779230747,34.3387216485855]},{"name":"汉中市","coord":[107.03534754266246,33.00142998064871]},{"name":"广元市","coord":[105.92928137563939,32.21872447205537]},{"name":"巴中市","coord":[107.03422410306194,31.99874720836291]},{"name":"南充市","coord":[106.32964805032347,31.156657700184095]},{"name":"绵阳市","coord":[104.58949560201106,31.88628780630976]},{"name":"德阳市","coord":[104.41542984932845,31.110558133718676]},{"name":"成都市","coord":[103.8852290010473,30.777258040348634]},{"name":"阿坝藏族羌族自治","coord":[102.26209319552814,32.45725845387284]},{"name":"安康市","coord":[109.14236501848015,32.77467694678074]},{"name":"十堰市","coord":[110.39934083416314,32.376209039347906]},{"name":"襄阳市","coord":[111.97539147094662,31.93399822417465]},{"name":"宜昌市","coord":[111.22204852395754,30.772457669035354]},{"name":"恩施市","coord":[109.42158366502872,30.260366574390105]},{"name":"张家界市","coord":[110.59760006538717,29.330107409240718]},{"name":"吉首市","coord":[109.72176899848378,28.681903937242495]},{"name":"铜仁地区","coord":[108.54247523485463,28.11736237519646]},{"name":"重庆市","coord":[107.86007108564992,30.186253395053196]},{"name":"怀化市","coord":[109.94325166787243,27.43919084801186]},{"name":"益阳市","coord":[112.43060358108062,28.75127294553697]},{"name":"娄底市","coord":[111.41891416951897,27.696312460064604]},{"name":"常德市","coord":[111.72571610131646,29.27189463838195]},{"name":"荆州市","coord":[112.65896596965268,30.05161542755362]},{"name":"荆门市","coord":[112.6586855902184,31.01267124474617]},{"name":"岳阳市","coord":[113.2595036144316,29.106247116930163]},{"name":"长沙市","coord":[113.15415586456598,28.222934680488425]},{"name":"湘潭市","coord":[112.51092596317824,27.69881544105668]},{"name":"株州市","coord":[113.49665538546823,27.03993794610501]},{"name":"衡阳市","coord":[112.48849636578527,26.783613569970782]},{"name":"邵阳市","coord":[110.6723832117475,26.81652287086792]},{"name":"永州市","coord":[111.8565364154186,25.768488267811968]},{"name":"韶关市","coord":[113.53420325850979,24.69848878771937]},{"name":"惠州市","coord":[114.32029589634925,23.25504544231892]},{"name":"佛山市","coord":[112.95925897403649,23.10116677189257]},{"name":"云浮市","coord":[111.78042514904234,22.840400494105687]},{"name":"深圳市","coord":[114.13138648919008,22.649563063468342]},{"name":"汕尾市","coord":[115.57412892884373,23.06989642104901]},{"name":"河源市","coord":[114.89746229844398,23.97971937124767]},{"name":"揭阳市","coord":[116.04290004239446,23.304802704715357]},{"name":"汕头市","coord":[116.7008461897183,23.35898625947344]},{"name":"潮州市","coord":[116.75405548481658,23.854381508863064]},{"name":"梅州市","coord":[116.13719397345734,24.15633544812716]},{"name":"漳州市","coord":[117.38279760543345,24.41111215459575]},{"name":"厦门市","coord":[118.04275971554665,24.675908246507944]},{"name":"龙岩市","coord":[116.69341144552507,25.20284542644492]},{"name":"泉州市","coord":[118.12035864630246,25.22984144365049]},{"name":"莆田市","coord":[118.82439690138142,25.439653480972687]},{"name":"福州市","coord":[119.1608285845262,25.99117532466728]},{"name":"三明市","coord":[117.51188176216434,26.318292906961602]},{"name":"南平市","coord":[118.16153136678187,27.306303151805437]},{"name":"抚州市","coord":[116.3455359885574,27.487043655935366]},{"name":"鹰潭市","coord":[117.01082360702333,28.241253742969946]},{"name":"吉安市","coord":[114.91377151807418,26.957486660664525]},{"name":"赣州市","coord":[115.046455717572,25.81565075681663]},{"name":"郴州市","coord":[113.1544526703492,25.871927095452524]},{"name":"新余市","coord":[114.94161795877827,27.79044654578371]},{"name":"宜春市","coord":[115.04574494880995,28.306428044943356]},{"name":"南昌市","coord":[115.9963824234495,28.664803351584705]},{"name":"九江市","coord":[115.53225905704193,29.362905920276297]},{"name":"上饶市","coord":[117.8595355766598,28.765755150094634]},{"name":"景德镇市","coord":[117.25387030721845,29.33426823662448]},{"name":"黄山市","coord":[117.85476357809696,29.969632034273722]},{"name":"池州市","coord":[117.34517113140791,30.208089337922335]},{"name":"铜陵市","coord":[117.93160431300694,30.926442655001676]},{"name":"安庆市","coord":[116.54307680610799,30.524265461641296]},{"name":"黄石市","coord":[115.02354597728443,29.924060229331015]},{"name":"咸宁市","coord":[114.26967602231792,29.652174021136048]},{"name":"黄冈市","coord":[115.2859016705373,30.65856897065683]},{"name":"武汉市","coord":[114.34552076948799,30.68836237966767]},{"name":"随州市","coord":[113.3850627838818,31.87891659924412]},{"name":"信阳市","coord":[114.81374730587638,32.0309685135914]},{"name":"驻马店市","coord":[114.07756451509235,32.896720987266114]},{"name":"商洛市","coord":[109.82044421310393,33.77403373563189]},{"name":"西安市","coord":[109.11839808451401,34.225257215515896]},{"name":"渭南市","coord":[109.75732444226935,35.025913644359306]},{"name":"铜川市","coord":[108.98695328111377,35.19235092947735]},{"name":"咸阳市","coord":[108.36398776446165,34.84311348287181]},{"name":"三门峡市","coord":[110.80049688104964,34.31818709571671]},{"name":"运城市","coord":[111.1736679525165,35.19010372283576]},{"name":"洛阳市","coord":[111.87577573098216,34.33379926109848]},{"name":"平顶山市","coord":[112.80931281928427,33.759895800153096]},{"name":"漯河市","coord":[113.83505724178012,33.70034266174508]},{"name":"许昌市","coord":[113.78762484088509,34.051835688452435]},{"name":"郑州市","coord":[113.49619951867594,34.61181797865449]},{"name":"焦作市","coord":[113.13404280173008,35.134167097471625]},{"name":"晋城市","coord":[112.7495732073233,35.63186423091449]},{"name":"长治市","coord":[112.85900842873183,36.45872910742828]},{"name":"临汾市","coord":[111.49379787924448,36.22810800777857]},{"name":"太原市","coord":[112.15628804033796,37.91704444063036]},{"name":"吕梁市","coord":[111.31901105774872,37.712740463356496]},{"name":"晋中市","coord":[113.08199599739676,37.36532613794343]},{"name":"邯郸市","coord":[114.41824047234618,36.530119932543315]},{"name":"安阳市","coord":[113.88883283163116,35.7797611183252]},{"name":"鹤壁市","coord":[114.3654094911545,35.75770487428472]},{"name":"新乡市","coord":[113.9184107718167,35.348471214026716]},{"name":"开封市","coord":[114.52801677500626,34.61371216679872]},{"name":"周口市","coord":[114.88509782391864,33.69999759722657]},{"name":"阜阳市","coord":[115.44595951398213,32.98060371610532]},{"name":"淮南市","coord":[116.68941991880993,32.79972275772595]},{"name":"蚌埠市","coord":[117.38594715783302,33.106729536033896]},{"name":"淮北市","coord":[116.69651711889378,33.69527529383458]},{"name":"宿州市","coord":[117.30175405886838,33.943330421260015]},{"name":"亳州市","coord":[116.12410804185097,33.46769392946132]},{"name":"商丘市","coord":[115.59575176872548,34.28339840831147]},{"name":"菏泽市","coord":[115.53631974831816,35.197319393220624]},{"name":"濮阳市","coord":[115.3070485514902,35.775883510964334]},{"name":"聊城市","coord":[115.8870069012884,36.40529594548765]},{"name":"邢台市","coord":[114.74259008644859,37.251396750084155]},{"name":"石家庄市","coord":[114.56923838363613,38.13141710980106]},{"name":"阳泉市","coord":[113.39216149668508,38.09075470547468]},{"name":"保定市","coord":[115.261524468934,39.09118520781398]},{"name":"衡水市","coord":[115.8182936677897,37.715661598187154]},{"name":"德州市","coord":[116.4582273790399,37.19372347888644]},{"name":"沧州市","coord":[116.76192710911863,38.20240042039232]},{"name":"廊坊市","coord":[116.50410772133856,39.27896741763884]},{"name":"天津市","coord":[117.31988934444873,39.37154482470619]},{"name":"北京市","coord":[116.59734730757869,40.237112944270976]},{"name":"张家口市","coord":[115.1823606483226,40.83732566607167]},{"name":"唐山市","coord":[117.8693184261954,39.71862889477249]},{"name":"秦皇岛市","coord":[119.30467355367742,39.990574652162564]},{"name":"承德市","coord":[117.16275671911026,41.36623845548547]},{"name":"葫芦岛市","coord":[119.9342336210531,40.5628822626519]},{"name":"朝阳市","coord":[120.11853493535794,41.471852354885755]},{"name":"赤峰市","coord":[118.50943546234379,43.25452976059767]},{"name":"锦州市","coord":[121.5167549323861,41.45933087433065]},{"name":"营口市","coord":[122.58571915054674,40.42093503997384]},{"name":"丹东市","coord":[124.33549382902183,40.46369290272115]},{"name":"辽阳市","coord":[123.34064798039414,41.152331397771356]},{"name":"盘锦市","coord":[122.06718005354679,41.05573599862555]},{"name":"阜新市","coord":[121.93889757908204,42.27641773244204]},{"name":"鞍山市","coord":[122.78904432242356,40.77781183142038]},{"name":"沈阳市","coord":[122.99508899709724,42.1162195010079]},{"name":"铁岭市","coord":[124.23100515588399,42.72666083611828]},{"name":"扶顺市","coord":[124.46027188217573,41.82955407638859]},{"name":"通辽市","coord":[122.0729370657937,43.90889130864869]},{"name":"兴安盟","coord":[120.79456431092532,45.92003249442161]},{"name":"白城市","coord":[123.10619907715235,45.25475749267784]},{"name":"齐齐哈尔市","coord":[124.5462214659102,47.55395009317394]},{"name":"大兴安岭地区","coord":[124.50992855161529,52.18438447846694]},{"name":"黑河市","coord":[127.14721400335922,49.25080134026901]},{"name":"大庆市","coord":[124.40329830095243,46.401048760966745]},{"name":"绥化市","coord":[126.5214484055605,46.76992452194825]},{"name":"松原市","coord":[124.21244334807682,44.75779381338502]},{"name":"四平市","coord":[124.27839350328821,43.52139065090318]},{"name":"通化市","coord":[125.67392830706305,41.91771808663852]},{"name":"辽源市","coord":[125.33529527643432,42.758340204944986]},{"name":"吉林市","coord":[126.83350281902375,43.60730120049175]},{"name":"长春市","coord":[125.53597875970374,44.24624314701737]},{"name":"白山市","coord":[127.16780160322108,42.093893880305075]},{"name":"哈尔滨市","coord":[127.39125008786029,45.36200668820575]},{"name":"鹤岗市","coord":[130.4703811258197,47.66520688940109]},{"name":"伊春市","coord":[128.91240831703635,47.93833794565277]},{"name":"七台河市","coord":[131.2677920224311,45.945099776108584]},{"name":"鸡西市","coord":[132.38059153660274,45.722934218318535]},{"name":"双鸭山市","coord":[132.3184817002743,46.65813679030265]},{"name":"佳木斯市","coord":[132.26174446608726,47.17569713691394]},{"name":"呼伦贝尔市","coord":[122.3210739998419,50.18176996070858]},{"name":"孝感市","coord":[113.83749892135485,31.11757234692128]},{"name":"贵港市","coord":[110.07354588052804,23.380735604767374]},{"name":"黔南布依族苗族自","coord":[107.30931767543106,26.2976919432269]},{"name":"宁德市","coord":[119.52482556634342,27.013151692716413]},{"name":"温州市","coord":[120.30037042732202,27.8699145504001]},{"name":"台州市","coord":[120.88886782713843,28.670799172772313]},{"name":"丽水市","coord":[119.56796851966463,28.170268394477755]},{"name":"衢州市","coord":[118.79479802644406,28.865874397158763]},{"name":"金华市","coord":[119.99381920686633,29.093455548185744]},{"name":"绍兴市","coord":[120.46546691682343,29.69382513836818]},{"name":"宁波市","coord":[121.42142987830871,29.70001162878972]},{"name":"杭州市","coord":[119.4405685790891,29.87218307296989]},{"name":"宣城市","coord":[118.68748382914703,30.628143499626418]},{"name":"湖州市","coord":[119.98261306633574,30.7945175862809]},{"name":"嘉兴市","coord":[120.83889215988998,30.67538495499343]},{"name":"上海市","coord":[121.37534147322967,31.25628247908459]},{"name":"苏州市","coord":[120.6906182622391,31.381280695137775]},{"name":"无锡市","coord":[120.32182300914366,31.54113306724517]},{"name":"常州市","coord":[119.61953292830165,31.611878565375576]},{"name":"南京市","coord":[118.71890548838064,31.910863187910323]},{"name":"镇江市","coord":[119.42349332902813,31.97942313430778]},{"name":"合肥市","coord":[117.30651975617157,31.79407863049138]},{"name":"六安市","coord":[116.24668220575353,31.820846193819513]},{"name":"滁州市","coord":[117.88422385307969,32.51792621904418]},{"name":"泰州市","coord":[120.03124303305091,32.56503102346783]},{"name":"南通市","coord":[120.85599446760912,32.18496706099728]},{"name":"盐城市","coord":[120.01812490612667,33.54219948734023]},{"name":"淮安市","coord":[119.0749424205415,33.39203631772854]},{"name":"宿迁市","coord":[118.45404943216346,33.666258719120265]},{"name":"徐州市","coord":[117.77482249295966,34.30847766157078]},{"name":"济宁市","coord":[116.74147276546373,35.27488504351119]},{"name":"枣庄市","coord":[117.43359942491492,34.884162021736]},{"name":"连云港市","coord":[119.01553213785074,34.54316517587849]},{"name":"临沂市","coord":[118.31478835349617,35.28173079028279]},{"name":"日照市","coord":[119.14265350444272,35.54479073199592]},{"name":"青岛市","coord":[120.27779044405756,36.3464117375903]},{"name":"威海市","coord":[122.12963327195605,37.13879077904251]},{"name":"烟台市","coord":[120.7689567423966,37.19772002195597]},{"name":"潍坊市","coord":[119.02178548592039,36.49292234053931]},{"name":"淄博市","coord":[117.92936024367185,36.60871347163638]},{"name":"泰安市","coord":[116.93810893944303,36.0423330118612]},{"name":"济南市","coord":[117.34560282551296,36.769574973846304]},{"name":"东营市","coord":[118.4915054457184,37.52194690335787]},{"name":"滨州市","coord":[117.67610299757533,37.4439597758601]},{"name":"昆明市","coord":[102.93100245594789,25.481300763922075]},{"name":"玉溪市","coord":[102.23080854291823,24.156168324611663]},{"name":"塔城地区","coord":[83.60908162840168,45.3721852373893]},{"name":"张掖市","coord":[100.47710030600572,38.704239320458385]},{"name":"南阳市","coord":[112.1400670951149,33.03033276715801]},{"name":"扬州市","coord":[119.48949608990988,32.80956776339646]},{"name":"延边朝鲜族自治州","coord":[129.3577692895626,43.24968794080283]},{"name":"牡丹江市","coord":[129.87240796405672,44.7073040108322]},{"name":"澳门","coord":[113.56289691515346,22.14602596262204]},{"name":"吴忠市","coord":[106.76894508116403,37.72566765880316]},{"name":"来宾市","coord":[109.25592217010114,23.86346274681084]},{"name":"平凉市","coord":[107.0708132782897,35.30329631658711]},{"name":"马鞍山市","coord":[118.27245878467022,31.657727937739004]},{"name":"芜湖市","coord":[118.32992684415504,31.081688223101658]},{"name":"澄迈县","coord":[110.04198076060266,19.694955078668105]},{"name":"保亭黎族苗族自治","coord":[109.6055304964257,18.6101488675304]},{"name":"乐东黎族自治县","coord":[109.04051999525574,18.643137437909203]},{"name":"儋州市","coord":[109.3431358337404,19.550974957403195]},{"name":"定安县","coord":[110.38744429685676,19.47557074114284]},{"name":"屯昌县","coord":[110.00574767630334,19.367175093044388]},{"name":"白沙黎族自治县","coord":[109.36860737761768,19.214416393082217]},{"name":"琼中黎族苗族自治","coord":[109.86691465937548,19.073671135862682]},{"name":"东方市","coord":[108.86903802405428,19.017352815445214]},{"name":"昌江黎族自治县","coord":[108.9686431884767,19.182594167127824]},{"name":"海口市","coord":[110.420654296875,19.806565564640795]},{"name":"济源市","coord":[112.38051465474433,35.07958362422394]},{"name":"五指山市","coord":[109.53595187364496,18.832908264613966]},{"name":"大连市","coord":[121.96662235866603,39.444150542439914]},{"name":"文昌市三沙市","coord":[110.81828537536748,19.756501444162936]},{"name":"三亚市","coord":[109.38424600793707,18.39186315877128]},{"name":"万宁市","coord":[110.28485046979574,18.860240588635115]},{"name":"陵水黎族自治县","coord":[109.95577603229562,18.594712684620465]},{"name":"临高县","coord":[109.71915395436967,19.79420403032508]},{"name":"琼海市","coord":[110.41650700703043,19.22315873149372]}]'),ed=JSON.parse('[{"id":"SalesJan2009","fileName":"SalesJan2009","xField":"Longitude","yField":"Latitude","type":"POINT"},{"id":"Sacramentorealestatetransactions","fileName":"Ealestate transactions","xField":"longitude","yField":"latitude","type":"POINT"},{"id":"BeijingResidentialDistrict","fileName":"北京市住宅小区","xField":"SmX","yField":"SmY","type":"POINT"},{"id":"GlobalRecordOfOver7Earthquakes","fileName":"全球历史7级以上地震记录","xField":"经度","yField":"纬度","type":"POINT"},{"id":"ChinaRecordOfOver6Earthquakes","fileName":"中国历史6级以上地震记录","xField":"经度","yField":"纬度","type":"POINT"},{"id":"ChinaMeteorologicalObservationStation","fileName":"中国气象观测站","xField":"经度","yField":"纬度","type":"POINT"},{"id":"BeijingSubwayLine","fileName":"北京市地铁交通线路","type":"LINE"},{"id":"ChinaEarthquakeIntensityZone","fileName":"中国地震烈度区划面","type":"POLYGON"}]'),td=ol.View;var sd=s.n(td);const rd=ol.proj.proj4,id=ol.proj.Units;var ad=s.n(id);const nd=ol.layer,od=ol.format.WMTSCapabilities;var ld=s.n(od);const hd=ol.geom,ud=ol.source,cd=ol.render.Feature;var dd=s.n(cd);const pd=ol.Collection;var md=s.n(pd);
  1689. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1690. * This program are made available under the terms of the Apache License, Version 2.0
  1691. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1692. window.proj4=Du,window.Proj4js=Du;const fd=new(En()),yd=1e3,gd={DEGREES:2*Math.PI*6370997/360,DEGREE:2*Math.PI*6370997/360,FEET:.3048,METERS:1,METER:1,M:1,USFEET:1200/3937},vd={default:96,iServerWMTS:90.7142857142857};class Sd extends(t()){constructor(e,t){super(),Un.isObject(e)?(t=e,this.mapId=t.id):this.mapId=e,t=t||{},this.server=t.server,this.successCallback=t.successCallback,this.errorCallback=t.errorCallback,this.credentialKey=t.credentialKey,this.credentialValue=t.credentialValue,this.withCredentials=t.withCredentials||!1,this.target=t.target||"map",this.excludePortalProxyUrl=t.excludePortalProxyUrl||!1,this.serviceProxy=t.serviceProxy||null,this.tiandituKey=t.tiandituKey,this.proxy=t.proxy,this.layerAdded=0,this.layers=[],this.events=new de(this,null,["updateDataflowFeature"],!0),this.webMap=t.webMap,this.tileFormat=t.tileFormat&&t.tileFormat.toLowerCase(),this.createMap(t.mapSetting),this.webMap?Un.isString(this.webMap)?this.createWebmap(this.webMap):this.getMapInfoSuccess(t.webMap):(this.server||(this.server="https://www.supermapol.com"),this.createWebmap())}_removeBaseLayer(){const e=this.map,{layer:t,labelLayer:s}=this.baseLayer;s&&e.removeLayer(s),t&&e.removeLayer(t),this.baseLayer=null}_removeLayers(){const e=this.map;this.layers.forEach(({layerType:t,layer:s,labelLayer:r,pathLayer:i,dataflowService:a})=>{s&&("MIGRATION"!==t?("DATAFLOW_POINT_TRACK"!==t&&"DATAFLOW_HEAT"!==t||(i&&e.removeLayer(i),a&&a.unSubscribe()),r&&e.removeLayer(r),e.removeLayer(s)):s.remove())}),this.layers=[]}_clear(){this.scales=[],this.resolutionArray=[],this.resolutions={},this.layerAdded=0,this._removeBaseLayer(),this._removeLayers()}refresh(){this._clear(),this.createWebmap()}createMap(e){let t,s,r;e&&(r=e.interactions,t=e.overlays,s=e.controls),this.map=new(no())({interactions:r,overlays:t,controls:s,target:this.target}),e&&this.registerMapEvent({mapClickCallback:e.mapClickCallback})}registerMapEvent(e){this.map.on("click",function(t){e.mapClickCallback&&e.mapClickCallback(t)})}createWebmap(e){let t;if(e)t=e;else{let e=this.server.split("");"/"!==e[e.length-1]&&(this.server+="/"),t=this.server+"web/maps/"+this.mapId+"/map";let s="getUrlResource.json?url=";if(this.excludePortalProxyUrl&&this.server.indexOf(s)>-1){let e=this.server.split(s);e.length>1&&(t=e[0]+s+this.server+"web/maps/"+this.mapId+"/map.json")}}this.getMapInfo(t)}getMapInfo(e){let t=this,s=e;-1===e.indexOf(".json")&&(s=`${e}.json`),Pe.get(t.getRequestUrl(s),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){t.getMapInfoSuccess(e)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)})}async getMapInfoSuccess(e){let t=this;if(!1===e.succeed)return void(t.errorCallback&&t.errorCallback(e.error,"getMapFaild",t.map));let s=await t.handleCRS(e.projection,e.baseLayer.url);if(t.mapParams={title:e.title,description:e.description},"BrowseMap"===s.action)t.createSpecLayer(e);else{if("OpenMap"!==s.action)return void(t.errorCallback&&t.errorCallback({type:"Not support CS",errorMsg:`Not support CS: ${e.projection}`},"getMapFaild",t.map));t.baseProjection=s.newCrs||e.projection,t.webMapVersion=e.version,t.baseLayer=e.baseLayer,t.isHaveGraticule=e.grid&&e.grid.graticule,e.baseLayer&&"MAPBOXSTYLE"===e.baseLayer.layerType?t.addMVTMapLayer(e,e.baseLayer,0).then(()=>{t.createView(e),e.layers&&0!==e.layers.length?t.addLayers(e):t.sendMapToUser(0),t.addGraticule(e)}):(await t.addBaseMap(e),e.layers&&0!==e.layers.length?t.addLayers(e):t.sendMapToUser(0),t.addGraticule(e))}}async handleCRS(e,t){let s=this,r={},i=e,a="OpenMap";return"EPSG:-1"===e?await Pe.get(s.getRequestUrl(`${t}/prjCoordSys.wkt`),null,{withCredentials:s.withCredentials,withoutFormatSuffix:!0}).then(function(e){return e.text()}).then(async function(e){if(-1!==e.indexOf("<!doctype html>"))throw"ERROR";s.addProjctionFromWKT(e,"EPSG:-1"),r={action:a,newCrs:i}}).catch(function(){r={action:a="BrowseMap",newCrs:i}}):(0===e.indexOf("EPSG")&&e.split(":")[1]<=0?a="BrowseMap":"EPSG:910111"===e||"EPSG:910112"===e?i="EPSG:3857":"EPSG:910101"===e||"EPSG:910102"===e?i="EPSG:4326":0!==e.indexOf("EPSG")&&(s.addProjctionFromWKT(i),i=s.getEpsgInfoFromWKT(e)),r={action:a,newCrs:i}),r}getScales(e){let t,s,r=[],i={},a=[],n=e.coordUnit||hn.get(e.projection).getUnits();if(n||(n="EPSG:3857"===this.baseProjection?"m":"degree"),e.visibleScales&&e.visibleScales.length>0)e.visibleScales.forEach(e=>{let s=1/e;t=this.getResFromScale(s,n),e=`1:${s.toLocaleString()}`,i[this.formatScale(e)]=t,a.push(t),r.push(e)},this);else if("WMTS"===e.layerType)e.scales.forEach(e=>{t=this.getResFromScale(e,n,90.7),e=`1:${e.toLocaleString()}`,i[this.formatScale(e)]=t,a.push(t),r.push(e)},this);else{let{minZoom:o=0,maxZoom:l=22}=e,h=this.map.getView();for(let e=o;e<=l;e++)if(t=h.getResolutionForZoom(e),s=this.getScaleFromRes(t,n),-1===r.indexOf(s)){r.push(s);let e=s.replace(/,/g,"");i[e]=t,a.push(t)}}this.scales=r,this.resolutions=i,this.resolutionArray=a}getResFromScale(e,t="DEGREE",s=96){return.0254*e/s/gd[t.toUpperCase()]}getScaleFromRes(e,t="DEGREE",s=96){let r;return"1:"+(r=e*s*gd[t.toUpperCase()]/.0254).toLocaleString()}formatScale(e){return e.replace(/,/g,"")}createSpecLayer(e){let t=this,s=e.baseLayer,r=s.url,i=s.layerType,a=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],n=new hn.Projection({extent:a,units:"m",code:"EPSG:0"});hn.addProjection(n);let o={center:e.center,level:0};t.baseProjection=n;let l={center:o.center?[o.center.x,o.center.y]:[0,0],zoom:0,projection:n};["4","5"].indexOf(Un.getOlVersion())<0&&(l.multiWorld=!0);let h,u=new(sd())(l);t.map.setView(u),t.mapParams&&(t.mapParams.extent=a,t.mapParams.projection=e.projection),r&&r.indexOf("?token=")>-1&&(t.credentialKey="token",t.credentialValue=e.baseLayer.credential=r.split("?token=")[1],r=r.split("?token=")[0]),"TILE"===i?Pe.get(t.getRequestUrl(`${r}.json`),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){s.originResult=e;let i="IPORTAL",a=s.credential,n="Token",o=s.url;(s.url.indexOf("www.supermapol.com")>-1||s.url.indexOf("itest.supermapol.com")>-1)&&(n="Key",o=[o],i="ONLINE"),a&&Oe[`register${n}`](o,a);let l={serverType:i,url:r,tileGrid:Mo.optionsFromMapJSON(r,e).tileGrid};r&&!t.isSameDomain(r)&&(l.tileProxy=t.server+"apps/viewer/getUrlResource.png?url="),h=new Mo(l),t.addSpecToMap(h)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):"WMS"===i?(h=t.createWMSSource(s),t.addSpecToMap(h)):"WMTS"===i?Pe.get(t.getRequestUrl(r,!0),null,{withCredentials:this.withCredentials}).then(function(e){return e.text()}).then(function(r){s.extent=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],s.scales=t.getWMTSScales(s.tileMatrixSet,r),s.dpi=vd.iServerWMTS,h=t.createWMTSSource(s),t.addSpecToMap(h)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):t.errorCallback&&t.errorCallback({type:"Not support CS",errorMsg:`Not support CS: ${i}`},"getMapFaild",t.map),u&&u.fit(a)}addSpecToMap(e){let t=new nd.Tile({source:e,zIndex:0});this.map.addLayer(t),this.sendMapToUser(0)}getWMTSScales(e,t){let s=(new(ld())).read(t).Contents.TileMatrixSet,r=[];for(let t=0;t<s.length;t++)if(s[t].Identifier===e){for(let e=0;e<s[t].TileMatrix.length;e++)r.push(s[t].TileMatrix[e].ScaleDenominator);break}return r}async addBaseMap(e){let{baseLayer:t}=e,s=t.layerType;"TILE"!==s&&"WMS"!==s&&"WMTS"!==s?this.getInternetMapInfo(t):"WMTS"===s?await this.getWmtsInfo(t):"TILE"===s&&await this.getTileInfo(t),t.projection=e.projection,t.extent||(t.extent=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y]),this.createView(e);let r=this.createBaseLayer(t,0,null,null,!0);if(r.setProperties({layerType:s}),this.map.addLayer(r),this.mapParams&&(this.mapParams.extent=t.extent,this.mapParams.projection=e.projection),t.labelLayerVisible){let s=new nd.Tile({source:this.createTiandituSource(t.layerType,e.projection,!0),zIndex:t.zIndex||1,visible:t.visible});this.map.addLayer(s),t.labelLayer=s}}addMVTMapLayer(e,t,s){return t.zIndex=s,this.getMapboxStyleLayerInfo(e,t).then(e=>this.createMVTLayer(e).then(e=>{let s=Un.newGuid(8);t.name&&e.setProperties({name:t.name,layerID:s,layerType:"VECTOR_TILE"}),t.visibleScale&&this.setVisibleScales(e,t.visibleScale),t.layer=e,t.layerID=s,this.map.addLayer(e)}))}createView(e){let t,s=e.center,r=void 0!==e.level?e.level:1,i=e.maxZoom||22,a=this.baseProjection,n=[];for(let e in s)n.push(s[e]);0===n.length&&(n=[0,0]),this.baseLayerExtent=t=e.baseLayer&&e.baseLayer.extent,this.mapParams&&(this.mapParams.extent=t,this.mapParams.projection=a),!(0,tc.containsCoordinate)(t,n)&&(n=(0,tc.getCenter)(t));let o,l=e.baseLayer;if(l.visibleScales&&l.visibleScales.length>0||l.scales&&l.scales.length>0)this.getScales(l);else if(e.baseLayer&&t&&4===t.length){let e=(t[2]-t[0])/512,s=(t[3]-t[1])/512;o=Math.max(e,s)}let h={};if(l.scales&&l.scales.length>0&&"WMTS"===l.layerType||this.resolutionArray&&this.resolutionArray.length>0?h={zoom:r,center:n,projection:a,resolutions:this.resolutionArray,maxZoom:i}:"WMTS"===l.layerType?(h={zoom:r,center:n,projection:a,maxZoom:i},this.getScales(l)):(h={zoom:r,center:n,projection:a,maxResolution:o,maxZoom:i},this.getScales(l)),["4","5"].indexOf(Un.getOlVersion())<0&&(h.multiWorld=!0,h.showFullExtent=!0,h.enableRotation=!1,h.constrainResolution=!0),this.map.setView(new(sd())(h)),e.visibleExtent){const t=this.map.getView(),s=t.getResolutionForExtent(e.visibleExtent,this.map.getSize());t.setResolution(s),t.setCenter((0,tc.getCenter)(e.visibleExtent))}}createBaseLayer(e,t,s,r,i){let a,n=this;r&&(n=r);let o=e.layerType;switch((o.indexOf("TIANDITU_VEC")>-1||o.indexOf("TIANDITU_IMG")>-1||o.indexOf("TIANDITU_TER")>-1)&&(o=o.substr(0,12)),o){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":a=this.createTiandituSource(o,e.projection);break;case"BAIDU":a=this.createBaiduSource();break;case"BING":a=this.createBingSource(e,e.projection);break;case"WMS":a=this.createWMSSource(e);break;case"WMTS":a=n.createWMTSSource(e);break;case"TILE":case"SUPERMAP_REST":a=n.createDynamicTiledSource(e,i);break;case"CLOUD":case"CLOUD_BLACK":case"OSM":case"JAPAN_ORT":case"JAPAN_RELIEF":case"JAPAN_PALE":case"JAPAN_STD":case"GOOGLE_CN":case"GOOGLE":a=this.createXYZSource(e)}var l=new nd.Tile({source:a,zIndex:e.zIndex||1,visible:e.visible}),h=Un.newGuid(8);e.name&&l.setProperties({name:e.name,layerID:h}),void 0!==e.visible&&null!==e.visible||(e.visible=!0),l.setVisible(e.visible),e.opacity&&l.setOpacity(e.opacity),t&&l.setZIndex(t),e.layer=l,e.layerID=h;let u,c,{visibleScale:d,autoUpdateTime:p}=e;return d&&(c=this.resolutions[d.minScale],u=this.resolutions[d.maxScale],c>1?l.setMaxResolution(Math.ceil(c)):l.setMaxResolution(1.1*c),l.setMinResolution(u)),p&&!e.autoUpdateInterval&&(e.autoUpdateInterval=setInterval(()=>{n.updateTileToMap(e,t)},p)),s&&(l.setZIndex(0),n.map.addLayer(l)),l}updateTileToMap(e,t){this.map.removeLayer(e.layer),this.map.addLayer(this.createBaseLayer(e,t))}getInternetMapInfo(e){const t=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],s=[-180,-90,180,90],r=[-20037508.34,-20037508.34,20037508.34,20037508.34],i=[12555667.53929,1281852.98656,17525908.86651,7484870.70596],a=[-19741117.14519,-10003921.36848,19981677.71404,19660983.56089];switch(e.units="m",e.layerType){case"BAIDU":e.iServerUrl="https://map.baidu.com/",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=1,e.extent=t;break;case"CLOUD":e.url="http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"CLOUD_BLACK":e.url="http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"tencent":e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"TIANDITU_VEC_3857":case"TIANDITU_IMG_3857":case"TIANDITU_TER_3857":e.iserverUrl="https://map.tianditu.gov.cn/",e.epsgCode="EPSG:3857",e.minZoom=0,e.maxZoom=19,e.level=1,e.extent=t,"TIANDITU_TER_3857"===e.layerType&&(e.maxZoom=14);break;case"TIANDITU_VEC_4326":case"TIANDITU_IMG_4326":case"TIANDITU_TER_4326":e.iserverUrl="https://map.tianditu.gov.cn/",e.epsgCode="EPSG:4326",e.minZoom=0,e.maxZoom=19,e.level=1,e.extent=s,"TIANDITU_TER_4326"===e.layerType&&(e.maxZoom=14);break;case"OSM":e.url="http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=1,e.extent=r,e.iserverUrl="https://www.openstreetmap.org";break;case"GOOGLE":e.url="https://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i380072576!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=22,e.level=1,e.extent=r,e.iserverUrl="https://www.google.cn/maps";break;case"JAPAN_STD":e.url="https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=0,e.extent=r;break;case"JAPAN_PALE":e.url="https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=2,e.maxZoom=19,e.level=2,e.extent=r;break;case"JAPAN_RELIEF":e.url="https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=5,e.maxZoom=14,e.level=5,e.extent=i;break;case"JAPAN_ORT":e.url="https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg",e.epsgCode="EPSG:3857",e.minZoom=2,e.maxZoom=12,e.level=2,e.extent=a}}createDynamicTiledSource(e,t){let s="IPORTAL",r=e.credential?e.credential.token:void 0,i="Token",a=e.url;(e.url.indexOf("www.supermapol.com")>-1||e.url.indexOf("itest.supermapol.com")>-1)&&(i="Key",a=[a],s="ONLINE"),r&&Oe[`register${i}`](a,r);let n={transparent:!0,url:e.url,wrapX:!1,serverType:s,format:e.format};if(t||"EPSG:-1"===this.baseProjection||(n.prjCoordSys={epsgCode:this.baseProjection.split(":")[1]}),e.visibleScales&&e.visibleScales.length>0){let t=[];for(let s in e.visibleScales){let r=Un.scaleToResolution(e.visibleScales[s],vd.default,e.coordUnit);t.push(r)}e.visibleResolutions=t;let s=new(mo())({extent:e.extent,resolutions:t});n.tileGrid=s}else{n.extent=this.baseLayerExtent;let t=new(mo())({extent:e.extent,resolutions:this.getResolutionsFromBounds(e.extent)});n.tileGrid=t}e.url&&!this.isSameDomain(e.url)&&"webp"!==e.format&&(n.tileProxy=this.server+"apps/viewer/getUrlResource.png?url=");let o=new Mo(n);return Oe[`register${i}`](e.url),o}getResolutionsFromBounds(e){let t=[],s=Math.abs(e[0]-e[2])/512;for(let e=0;e<22;e++)0!==e?(s/=2,t[e]=s):t[e]=s;return t}createTiandituSource(e,t,s){let r={layerType:e.split("_")[1].toLowerCase(),isLabel:s||!1,projection:t,url:`https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?tk=${this.tiandituKey}`};return new Eo(r)}createBaiduSource(){return new fo}createBingSource(e,t){return new ud.XYZ({wrapX:!1,projection:t,crossOrigin:"anonymous",tileUrlFunction:function(e){let[t,s,r]=[...e];r=r>0?r-1:-r-1;let i="";for(let e=t;e>0;e--){let t=0,a=1<<e-1;0!=(s&a)&&t++,0!=(r&a)&&(t+=2),i+=t.toString()}return"https://dynamic.t0.tiles.ditu.live.com/comp/ch/{quadKey}?it=G,TW,L,LA&mkt=zh-cn&og=109&cstl=w4c&ur=CN&n=z".replace("{quadKey}",i)}})}createXYZSource(e){return new ud.XYZ({url:e.url,wrapX:!1,crossOrigin:"anonymous"})}createWMSSource(e){return new ud.TileWMS({url:e.url,wrapX:!1,params:{LAYERS:e.layers?e.layers[0]:"0",FORMAT:"image/png"},projection:e.projection||this.baseProjection,tileLoadFunction:function(e,t){e.getImage().src=t}})}async getTileLayerExtent(e,t,s){let r=this,i=await r.getTileLayerExtentInfo(e);if(!1===i.succeed)if(400===i.error.code){let i=await r.getTileLayerExtentInfo(e,!1);!1===i.succeed?s():(Object.assign(e,i),t(e))}else s();else Object.assign(e,i),t(e)}getTileLayerExtentInfo(e,t=!0){let s,r=this,i=e.url.trim(),a=e.credential,n={withCredentials:this.withCredentials,withoutFormatSuffix:!0};if(t){let e={epsgCode:r.baseProjection.split(":")[1]};"EPSG:-1"!==r.baseProjection&&(i+=".json?prjCoordSys="+encodeURI(JSON.stringify(e)))}return a&&(i=`${i}&token=${encodeURI(a.token)}`,s=a.token),Pe.get(r.getRequestUrl(`${i}.json`),null,n).then(function(e){return e.json()}).then(async t=>{if(!1===t.succeed)return t;let i="png";if("webp"===r.tileFormat){i=await r.isSupportWebp(e.url,s)?"webp":"png"}return{units:t.coordUnit&&t.coordUnit.toLowerCase(),coordUnit:t.coordUnit,visibleScales:t.visibleScales,extent:[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],projection:`EPSG:${t.prjCoordSys.epsgCode}`,format:i}}).catch(e=>({succeed:!1,error:e}))}getTileInfo(e,t,s){let r=this,i={withCredentials:this.withCredentials,withoutFormatSuffix:!0};return e.url.indexOf("?token=")>-1&&(r.credentialKey="token",r.credentialValue=e.credential=e.url.split("?token=")[1],e.url=e.url.split("?token=")[0]),Pe.get(r.getRequestUrl(`${e.url}.json`),null,i).then(function(e){return e.json()}).then(async function(i){if(i&&i.code&&200!==i.code)throw i;i.visibleScales&&(e.visibleScales=i.visibleScales,e.coordUnit=i.coordUnit),e.maxZoom=i.maxZoom,e.maxZoom=i.minZoom;let a=e.credential?e.credential.token:void 0;if(e.format="png","webp"===r.tileFormat&&"https://maptiles.supermapol.com/iserver/services/map_China/rest/maps/China_Dark"!==e.url){const t=await r.isSupportWebp(e.url,a);e.format=t?"webp":"png"}s?t&&t(s,null,!0,r):t&&t(e)}).catch(function(e){r.errorCallback&&r.errorCallback(e,"getTileInfo",r.map)})}getWMTSUrl(e,t){let s="?";return e.indexOf("?")>-1&&(s="&"),e+=t?s+"SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities":s+"/1.0.0/WMTSCapabilities.xml",this.getRequestUrl(e,!0)}getWmtsInfo(e,t){let s=this,r={withCredentials:s.withCredentials,withoutFormatSuffix:!0};const i=!e.requestEncoding||"KVP"===e.requestEncoding;return Pe.get(s.getWMTSUrl(e.url,i),null,r).then(function(e){return e.text()}).then(function(r){let a=(new(ld())).read(r);if(s.isValidResponse(a)){let r,o,l,h=a.Contents,u=h.TileMatrixSet,c=h.Layer,d="default";for(let t=0;t<c.length;t++)if(c[t].Identifier===e.layer){l=(r=c[o=t]).Format[0];var n=r.WGS84BoundingBox;break}r&&r.Style&&r.Style.forEach(e=>{e.isDefault&&(d=e.Identifier)});let p=[],m=[];for(let t=0;t<u.length;t++)if(u[t].Identifier===e.tileMatrixSet){let s=`EPSG:${u[t].SupportedCRS.split("::")[1]}`;for(let e=0;e<u[t].TileMatrix.length;e++)p.push(u[t].TileMatrix[e].ScaleDenominator),m.push(u[t].TileMatrix[e].Identifier);let r=u[t].TileMatrix[0].TopLeftCorner;e.origin=["EPSG:4326","EPSG:4490"].indexOf(s)>-1?[r[1],r[0]]:r;break}let f,y=e.name;f=n?hn.transformExtent(n,"EPSG:4326",s.baseProjection):hn.get(s.baseProjection).getExtent(),e.tileUrl=s.getTileUrl(a.OperationsMetadata.GetTile.DCP.HTTP.Get,r,l,i),e.extent=f,e.name=y,e.orginEpsgCode=e.projection,e.overLayer=!0,e.scales=p,e.style=d,e.title=y,e.unit="m",e.layerFormat=l,e.matrixIds=m,t&&t(e)}}).catch(function(e){s.errorCallback&&s.errorCallback(e,"getWmtsFaild",s.map)})}getTileUrl(e,t,s,r){let i;if(r)e.forEach(e=>{"KVP"===e.Constraint[0].AllowedValues.Value[0].toUpperCase()&&(i=e.href)});else{const e=t.ResourceURL.filter(e=>e.format===s);i=e[0].template}return i}createWMTSSource(e){let t=e.extent||hn.get(e.projection).getExtent(),s=hn.get(this.baseProjection).getUnits();return new ud.WMTS({url:e.tileUrl||e.url,layer:e.layer,format:e.layerFormat,style:e.style,matrixSet:e.tileMatrixSet,requestEncoding:e.requestEncoding||"KVP",tileGrid:this.getWMTSTileGrid(t,e.scales,s,e.dpi,e.origin,e.matrixIds),tileLoadFunction:function(e,t){e.getImage().src=t}})}getWMTSTileGrid(e,t,s,r,i,a){let n=this.getReslutionsFromScales(t,r||vd.iServerWMTS,s);return new(wo())({origin:i,extent:e,resolutions:n.res,matrixIds:a||n.matrixIds})}getReslutionsFromScales(e,t,s,r){s=s&&s.toLowerCase()||"degrees",t=t||vd.iServerWMTS,r=r||6378137;let i=[],a=[];if(Un.isArray(e))e&&e.forEach(function(e,n){e>1&&(a.push(n),i.push(this.getResolutionFromScale(e,t,s,r)))},this);else{let n=e.TileMatrix;n&&n.forEach(function(e){a.push(e.Identifier),i.push(this.getResolutionFromScale(e.ScaleDenominator,t,s,r))},this)}return{res:i,matrixIds:a}}getResolutionFromScale(e,t=vd.default,s,r){let i;return e=(e=+e)>1?1/e:e,i="degrees"===s||"dd"===s||"degree"===s?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4}isValidResponse(e){let t=["Contents","OperationsMetadata"],s=!0;for(let r=0;r<t.length;r++)if(!e[t[r]]||e.error){s=!1;break}return s}addLayers(e){let t=e.layers,s=this,r=[],i=t.length;i>0&&(this.layers=t,t.forEach(function(t,a){let n=a+1,o=t.dataSource,l=o&&"SAMPLE_DATA"===o.type&&!!o.name;if("MAPBOXSTYLE"===t.layerType)s.addMVTMapLayer(e,t,n).then(()=>{s.layerAdded++,s.sendMapToUser(i)});else if(o&&o.serverId||"MARKER"===t.layerType||"HOSTED_TILE"===t.layerType||l){let e=t.dataSource,a=e?e.serverId:t.serverId;if(!a&&!l)return s.addLayer(t,null,n),s.layerAdded++,void s.sendMapToUser(i);if("MARKER"===t.layerType||e&&(!e.accessType||"DIRECT"===e.accessType)||l){let o=l?`${s.server}apps/dataviz/libs/sample-datas/${e.name}.json`:`${s.server}web/datas/${a}/content.json?pageSize=9999999&currentPage=1`;o=s.getRequestUrl(o),Pe.get(o,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(async function(e){if(!1===e.succeed)return s.layerAdded++,s.sendMapToUser(i),void(s.errorCallback&&s.errorCallback(e.error,"getLayerFaild",s.map));if(e&&e.type){if("JSON"===e.type||"GEOJSON"===e.type)e.content=e.content.type?e.content:JSON.parse(e.content),r=s.geojsonToFeature(e.content,t);else if("EXCEL"===e.type||"CSV"===e.type)if(t.dataSource&&t.dataSource.administrativeInfo){e.content.rows.unshift(e.content.colTitles);let{divisionType:i,divisionField:a}=t.dataSource.administrativeInfo,n=s.excelData2FeatureByDivision(e.content,i,a);r=s._parseGeoJsonData2Feature({allDatas:{features:n.features},fileCode:t.projection})}else r=await s.excelData2Feature(e.content,t);else if("SHP"===e.type){let i=JSON.parse(e.content);e.content=i.layers[0],r=s.geojsonToFeature(e.content,t)}s.addLayer(t,r,n),s.layerAdded++,s.sendMapToUser(i)}}).catch(function(e){s.layerAdded++,s.sendMapToUser(i),s.errorCallback&&s.errorCallback(e,"getLayerFaild",s.map)})}else{let r="HOSTED_TILE"===t.layerType,a=e?e.serverId:t.serverId;s.checkUploadToRelationship(a).then(function(e){if(e&&e.length>0){let o=e[0].name,l=e[0].type.toUpperCase();s.getDataService(a,o).then(function(e){let a=e.dataItemServices;if(0===a.length)return s.layerAdded++,s.sendMapToUser(i),void(s.errorCallback&&s.errorCallback(null,"getLayerFaild",s.map));if(r){let e=s.getService(a,"RESTDATA");s.isMvt(e.address,o).then(e=>{s.getServiceInfoFromLayer(n,i,t,a,o,l,e)}).catch(()=>{s.getServiceInfoFromLayer(n,i,t,a,o,l)})}else s.getServiceInfoFromLayer(n,i,t,a,o,l)})}else s.layerAdded++,s.sendMapToUser(i),s.errorCallback&&s.errorCallback(null,"getLayerFaild",s.map)}).catch(function(e){s.layerAdded++,s.sendMapToUser(i),s.errorCallback&&s.errorCallback(e,"getLayerFaild",s.map)})}}else o&&"USER_DATA"===o.type?s.addGeojsonFromUrl(t,i,n,!1):"TILE"===t.layerType?s.getTileLayerExtent(t,function(e){s.map.addLayer(s.createBaseLayer(e,n)),s.layerAdded++,s.sendMapToUser(i)},function(e){s.layerAdded++,s.sendMapToUser(i),s.errorCallback&&s.errorCallback(e,"getLayerFaild",s.map)}):"SUPERMAP_REST"===t.layerType||"WMS"===t.layerType||"WMTS"===t.layerType?"WMTS"===t.layerType?s.getWmtsInfo(t,function(e){s.map.addLayer(s.createBaseLayer(e,n)),s.layerAdded++,s.sendMapToUser(i)}):(t.projection=s.baseProjection,s.map.addLayer(s.createBaseLayer(t,n)),s.layerAdded++,s.sendMapToUser(i)):o&&"REST_DATA"===o.type?s.getFeaturesFromRestData(t,n,i):o&&"REST_MAP"===o.type&&o.url?Un.queryFeatureBySQL(o.url,o.layerName,"smid=1",null,null,function(e){var r=e&&e.result.recordsets,a=r&&r[0],o=a.fields;if(a&&o){let e=[];for(var l in o){var h=o[l];0===h.indexOf("Sm")&&"SmID"!==h||e.push(h)}s.getFeatures(e,t,function(e){s.addLayer(t,e,n),s.layerAdded++,s.sendMapToUser(i)},function(e){s.layerAdded++,s.errorCallback&&s.errorCallback(e,"getFeatureFaild",s.map)})}},function(e){s.errorCallback&&s.errorCallback(e,"getFeatureFaild",s.map)}):"DATAFLOW_POINT_TRACK"!==t.layerType&&"DATAFLOW_HEAT"!==t.layerType||s.getDataflowInfo(t,function(){s.addLayer(t,r,n),s.layerAdded++,s.sendMapToUser(i)},function(e){s.layerAdded++,s.errorCallback&&s.errorCallback(e,"getFeatureFaild",s.map)})},this))}addGeojsonFromUrl(e,t,s,r=this.withCredentials){let{dataSource:i}=e,{url:a}=i,n=this;Pe.get(a,null,{withCredentials:r,withoutFormatSuffix:!0}).then(function(e){return e.json()}).then(async function(r){if(r&&!1!==r.succeed){var i;if("CSV"===r.type||"EXCEL"===r.type)if(e.dataSource&&e.dataSource.administrativeInfo){r.content.rows.unshift(r.content.colTitles);let{divisionType:t,divisionField:s}=e.dataSource.administrativeInfo,a=n.excelData2FeatureByDivision(r.content,t,s);i=n._parseGeoJsonData2Feature({allDatas:{features:a.features},fileCode:e.projection})}else i=await n.excelData2Feature(r.content,e);else{var a=r.content?JSON.parse(r.content):r;i=n.geojsonToFeature(a,e)}t?(n.addLayer(e,i,s),n.layerAdded++,n.sendMapToUser(t)):(n.map.removeLayer(e.layer),e.labelLayer&&n.map.removeLayer(e.labelLayer),n.addLayer(e,i,s))}else t?n.errorCallback&&n.errorCallback(r.error,"autoUpdateFaild",n.map):(n.layerAdded++,n.sendMapToUser(t),n.errorCallback&&n.errorCallback(r.error,"getLayerFaild",n.map))}).catch(function(e){n.layerAdded++,n.sendMapToUser(t),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)})}getServiceInfoFromLayer(e,t,s,r,i,a,n){let o=this,l=n?!n.isMvt:"HOSTED_TILE"===s.layerType,h=!1;r.forEach(function(r){if(!h)if(r&&l&&"RESTMAP"===r.serviceType)h=!0,o.getTileLayerInfo(r.address).then(function(r){r.forEach(function(r){let i=r.bounds;s.layerType="TILE",s.orginEpsgCode=o.baseProjection,s.units=r.coordUnit&&r.coordUnit.toLowerCase(),s.extent=[i.left,i.bottom,i.right,i.top],s.visibleScales=r.visibleScales,s.url=r.url,s.sourceType="TILE",o.map.addLayer(o.createBaseLayer(s,e)),o.layerAdded++,o.sendMapToUser(t)})});else if(r&&!l&&"RESTDATA"===r.serviceType)if(h=!0,n&&n.isMvt){let r=n.bounds;s=Object.assign(s,{layerType:"VECTOR_TILE",epsgCode:n.epsgCode,projection:`EPSG:${n.epsgCode}`,bounds:r,extent:[r.left,r.bottom,r.right,r.top],name:s.name,url:n.url,visible:s.visible,featureType:a,serverId:s.serverId.toString()}),o.map.addLayer(o.addVectorTileLayer(s,e,"RESTDATA")),o.layerAdded++,o.sendMapToUser(t)}else h=!0,o.getDatasources(r.address).then(function(a){s.dataSource.dataSourceName=a+":"+i,s.dataSource.url=`${r.address}/data`,o.getFeaturesFromRestData(s,e,t)})}),h||(o.layerAdded++,o.sendMapToUser(t),o.errorCallback&&o.errorCallback(null,"getLayerFaild",o.map))}getDataflowInfo(e,t,s){let r,i=e.url,a=this.getRequestUrl(`${i}.json`,!1);e.credential&&e.credential.token&&(a+=`?token=${r=e.credential.token}`),Pe.get(a,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(s){e.featureType="POINT",s&&s.featureMetaData&&(e.featureType=s.featureMetaData.featureType.toUpperCase()),e.wsUrl=s.urls[0].url,t()}).catch(function(){s()})}getFeaturesFromRestData(e,t,s){let r=this,i=e.dataSource,a=e.dataSource.url,n=i.dataSourceName||e.name,o=r.formatUrlWithCredential(a),l={};if(l.withCredentials=this.withCredentials,this.excludePortalProxyUrl||X.isInTheSameDomain(o)||(l.proxy=this.getProxy()),["EPSG:-1","EPSG:0","EPSG:-1000"].includes(e.projection))return r.layerAdded++,r.sendMapToUser(s),void(r.errorCallback&&r.errorCallback({},"getFeatureFaild",r.map));Un.getFeatureBySQL(o,[n],l,function(i){let a=r.parseGeoJsonData2Feature({allDatas:{features:i.result.features.features},fileCode:r.baseProjection,featureProjection:r.baseProjection});r.addLayer(e,a,t),r.layerAdded++,r.sendMapToUser(s)},function(e){r.layerAdded++,r.sendMapToUser(s),r.errorCallback&&r.errorCallback(e,"getFeatureFaild",r.map)},r.baseProjection.split("EPSG:")[1])}getFeatures(e,t,s,r){var i=this,a=t.dataSource,n=t.projection;Un.queryFeatureBySQL(a.url,a.layerName,null,e,null,function(e){var t=e.result.recordsets[0].features.features,r=i.parseGeoJsonData2Feature({allDatas:{features:t},fileCode:n,featureProjection:i.baseProjection},"JSON");s(r)},function(e){r(e)})}sendMapToUser(e){const t=this.isHaveGraticule?e+1:e;this.layerAdded===t&&this.successCallback&&this.successCallback(this.map,this.mapParams,this.layers,this.baseLayer)}async excelData2Feature(e,t){let s=e.rows,r=e.colTitles;for(let e in r)Un.isString(r[e])&&(r[e]=Un.trim(r[e]));let i=t.projection,a=t.dataSource,n=this.baseProjection,o=[],l=Un.trim(t.xyField&&t.xyField.xField||t.from&&t.from.xField),h=Un.trim(t.xyField&&t.xyField.yField||t.from&&t.from.yField),u=r.indexOf(l),c=r.indexOf(h);if("MIGRATION"===t.layerType)try{if("PORTAL_DATA"===a.type){const{dataMetaInfo:e}=await Pe.get(`${this.server}web/datas/${a.serverId}.json`,null,{withCredentials:this.withCredentials}).then(e=>e.json());t.xyField={xField:e.xField,yField:e.yField},e.xIndex?(u=e.xIndex,c=e.yIndex):(u=r.indexOf(e.xField),c=r.indexOf(e.yField))}else if("SAMPLE_DATA"===a.type){const e=ed.find(e=>e.id===a.name)||{};l=e.xField,h=e.yField,t.xyField={xField:l,yField:h},u=r.findIndex(e=>e===l),c=r.findIndex(e=>e===h)}}catch(e){console.error(e)}for(let e=0,t=s.length;e<t;e++){let t=s[e],a={},l=s[e][u],h=s[e][c];if(""!==l&&""!==h){let e=new hd.Point([+l,+h]);i!==n&&e.transform(i,n);for(let e=0,s=t.length;e<s;e++){let s=r[e];if(void 0!==s&&null!==s)if(s=s.trim(),Object.keys(a).indexOf(s)>-1){a[s+"_1"]=t[e]}else a[s]=t[e]}let s=new(Bn())({geometry:e,attributes:a});o.push(s)}}return Promise.resolve(o)}excelData2FeatureByDivision(e,t,s){let r,i=this;if("Province"===t?r=window.ProvinceData:"City"===t?r=window.MunicipalData:"GB-T_2260"===t&&(r=window.AdministrativeArea),r){return i.changeExcel2Geojson(r.features,e.rows,t,s)}}_parseGeoJsonData2Feature(e){let t=e.allDatas.features,s=[];for(let r=0,i=t.length;r<i;r++){let i=Object.assign({},t[r].properties);delete t[r].properties;let a=fd.readFeature(t[r],{dataProjection:e.fileCode,featureProjection:this.baseProjection||"ESPG:4326"});a.setProperties({attributes:i}),s.push(a)}return s}changeExcel2Geojson(e,t,s,r){let i={type:"FeatureCollection",features:[]};if(t.length<2)return i;let a=t[0],n=t.slice(1),o=a.findIndex(e=>e===r);return n.forEach(t=>{let r;if(r="GB-T_2260"===s?e.find(e=>e.properties.GB===t[o]):Un.getHighestMatchAdministration(e,t[o])){let e=window.cloneDeep(r);e.properties={},t.forEach((t,s)=>{let r=a[s].trim();e.properties[r]=t}),i.features.push(e)}}),i}geojsonToFeature(e,t){let s=e.features,r=[];for(let e=0,i=s.length;e<i;e++){let i=s[e].properties||{};delete s[e].properties;let a=fd.readFeature(s[e],{dataProjection:t.projection||"EPSG:4326",featureProjection:this.baseProjection||"ESPG:4326"}),n=a.getGeometry().getCoordinates();"Point"===s[e].geometry.type&&s[e].properties&&(s[e].properties.lon=n[0],s[e].properties.lat=n[1]);let o,l,h,u=!1;if(s[e].dv_v5_markerInfo&&(o=Object.assign({},s[e].dv_v5_markerInfo,i)).lon&&(delete o.lon,delete o.lat),s[e].dv_v5_markerStyle&&(l=s[e].dv_v5_markerStyle,u=!0),u)h=Object.assign({},{attributes:o},{useStyle:l}),a.layerId=t.timeId;else if(t.featureStyles){let s,r=JSON.parse(t.featureStyles[e].style),a=i;a._smiportal_imgLinkUrl.indexOf("http://")>-1||a._smiportal_imgLinkUrl.indexOf("https://")>-1?s=a._smiportal_imgLinkUrl:void 0!==a._smiportal_imgLinkUrl&&null!==a._smiportal_imgLinkUrl&&""!==a._smiportal_imgLinkUrl&&(s=`${Un.getIPortalUrl()}resources/markerIcon/${a._smiportal_imgLinkUrl}`),o={dataViz_description:a._smiportal_description,dataViz_imgUrl:s,dataViz_title:a._smiportal_title,dataViz_url:a._smiportal_otherLinkUrl},r.anchor=[.5,1],r.src=r.externalGraphic,l=r,h=Object.assign({},{attributes:o},{useStyle:l}),delete a._smiportal_description,delete a._smiportal_imgLinkUrl,delete a._smiportal_title,delete a._smiportal_otherLinkUrl}else h={attributes:i};a.setProperties(h),r.push(a)}return r}parseGeoJsonData2Feature(e){let t=e.allDatas.features,s=[];for(let r=0,i=t.length;r<i;r++){let i=t[r].properties;delete t[r].properties;let a=fd.readFeature(t[r],{dataProjection:e.fileCode||"EPSG:4326",featureProjection:e.featureProjection||this.baseProjection||"EPSG:4326"}),n=a.getGeometry();if(!n)continue;let o=n.getCoordinates();"Point"===t[r].geometry.type&&(i.lon=o[0],i.lat=o[1]),a.setProperties({attributes:i}),s.push(a)}return s}addLayer(e,t,s){let r,i=this;"VECTOR"===e.layerType?r="POINT"===e.featureType?"SYMBOL_POINT"===e.style.type?this.createSymbolLayer(e,t):this.createGraphicLayer(e,t):this.createVectorLayer(e,t):"UNIQUE"===e.layerType?r=this.createUniqueLayer(e,t):"RANGE"===e.layerType?r=this.createRangeLayer(e,t):"HEAT"===e.layerType?r=this.createHeatLayer(e,t):"MARKER"===e.layerType?r=this.createMarkerLayer(t):"DATAFLOW_POINT_TRACK"===e.layerType?r=this.createDataflowLayer(e,s):"DATAFLOW_HEAT"===e.layerType?r=this.createDataflowHeatLayer(e):"RANK_SYMBOL"===e.layerType?r=this.createRankSymbolLayer(e,t):"MIGRATION"===e.layerType&&(r=this.createMigrationLayer(e,t));let a=Un.newGuid(8);if(r){if(e.name&&r.setProperties({name:e.name,layerID:a,layerType:e.layerType}),e&&e.style&&e.style.imageInfo){let t=new Image;t.src=e.style.imageInfo.url,t.onload=function(){r.getSource().changed()}}"MIGRATION"===e.layerType?(r.appendTo(this.map),r.setVisible(e.visible),r.setCursor()):(void 0!=e.opacity&&r.setOpacity(e.opacity),r.setVisible(e.visible),this.map.addLayer(r)),r.setZIndex(s);const{visibleScale:t,autoUpdateTime:n}=e;if(t&&this.setVisibleScales(r,t),n&&!e.autoUpdateInterval){let t=e.dataSource;"DIRECT"!==t.accessType||t.url||(t.url=`${this.server}web/datas/${t.serverId}/content.json?pageSize=9999999&currentPage=1`),e.autoUpdateInterval=setInterval(()=>{i.updateFeaturesToMap(e,s,!0)},n)}}e.layer=r,e.layerID=a,e.labelStyle&&e.labelStyle.labelField&&"DATAFLOW_POINT_TRACK"!==e.layerType&&(t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,this.addLabelLayer(e,t))}updateFeaturesToMap(e,t){let s=this,r=e.dataSource,i=e.dataSource.url,a=r.dataSourceName||e.name;if("USER_DATA"===r.type||"DIRECT"===r.accessType)s.addGeojsonFromUrl(e,null,t);else{let r=s.formatUrlWithCredential(i),n={};n.withCredentials=this.withCredentials,this.excludePortalProxyUrl||X.isInTheSameDomain(r)||(n.proxy=this.getProxy()),Un.getFeatureBySQL(r,[a],n,function(r){let i=s.parseGeoJsonData2Feature({allDatas:{features:r.result.features.features},fileCode:e.projection,featureProjection:s.baseProjection});s.map.removeLayer(e.layer),e.labelLayer&&s.map.removeLayer(e.labelLayer),s.addLayer(e,i,t)},function(e){s.errorCallback&&s.errorCallback(e,"autoUpdateFaild",s.map)})}}addVectorTileLayer(e,t,s){let r;"RESTDATA"===s&&(r=this.createDataVectorTileLayer(e));let i=Un.newGuid(8);return r&&(e.name&&r.setProperties({name:e.name,layerID:i}),void 0!=e.opacity&&r.setOpacity(e.opacity),r.setVisible(e.visible),r.setZIndex(t)),e.layer=r,e.layerID=i,r}createDataVectorTileLayer(e){var t=new(Mc())({featureClass:Bn()});Mc().prototype.readProjection=function(){return new hn.Projection({code:"",units:ad().TILE_PIXELS})};let s=e.featureType,r=io.toOpenLayersStyle(this.getDataVectorTileStyle(s),s);return new nd.VectorTile({source:new Oc({url:e.url,projection:e.projection,tileType:"ScaleXY",format:t}),style:r})}getDataVectorTileStyle(e){let t={radius:8,fillColor:"#EE4D5A",fillOpacity:.9,strokeColor:"#ffffff",strokeWidth:1,strokeOpacity:1,lineDash:"solid",type:"BASIC_POINT"};return["LINE","LINESTRING","MULTILINESTRING"].indexOf(e)>-1?(t.strokeColor="#4CC8A3",t.strokeWidth=2):["REGION","POLYGON","MULTIPOLYGON"].indexOf(e)>-1&&(t.fillColor="#826DBA"),t}getFiterFeatures(e,t){let s="select * from json where ("+this.parseFilterCondition(e)+")",r=[];for(let e=0;e<t.length;e++){let i=t[e],a=!1;try{a=window.jsonsql.query(s,{attributes:i.get("attributes")})}catch(e){continue}a&&a.length>0&&r.push(i)}return r}parseFilterCondition(e){return e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=").replace(/\(?[^\(]+?\s*in\s*\([^\)]+?\)\)?/gi,e=>{const t=e.match(/([^(]+?)\s*in\s*\(([^)]+?)\)/i);return 3===t.length?`(${t[2].split(",").map(e=>`${t[1]} == ${e.trim()}`).join(" || ")})`:e})}createGraphicLayer(e,t){t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t;let s=this.getGraphicsFromFeatures(t,e.style,e.featureType),r=new lc({graphics:s,render:"canvas",map:this.map,isHighLight:!1});return new nd.Image({source:r})}getGraphicsFromFeatures(e,t,s){let r=io.getOpenlayersStyle(t,s).getImage(),i=[];for(let t in e){let s=new ec(e[t].getGeometry());s.setStyle(r),s.setProperties({attributes:e[t].get("attributes")}),i.push(s)}return i}createSymbolLayer(e,t){let s=io.getSymbolStyle(e.style);return new nd.Vector({style:s,source:new ud.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1}),renderMode:"image"})}addLabelLayer(e,t){let s=e.labelStyle,r=this.getLabelStyle(s,e),i=e.labelLayer=new nd.Vector({declutter:!0,styleOL:r,labelField:s.labelField,source:new ud.Vector({features:t,wrapX:!1})});i.setStyle(e=>{let t=s.labelField,r=e.get("attributes")[t.trim()]+"";if("undefined"===r)return null;let a=i.get("styleOL"),n=a.getText();return n&&n.setText&&n.setText(r),a}),this.map.addLayer(i),i.setVisible(e.visible),i.setZIndex(1e3);const{visibleScale:a}=e;return a&&this.setVisibleScales(i,a),i}setVisibleScales(e,t){let s=this.resolutions[t.minScale],r=this.resolutions[t.maxScale];s>1?e.setMaxResolution(Math.ceil(s)):e.setMaxResolution(1.1*s),e.setMinResolution(r)}getLabelStyle(e,t){let s=t.style||t.pointStyle;const{radius:r=0,strokeWidth:i=0}=s,a=-(r+i),{fontSize:n="14px",fontFamily:o,fill:l,backgroundFill:h,offsetX:u=0,offsetY:c=a,placement:d="point",textBaseline:p="bottom",textAlign:m="center",outlineColor:f="#000000",outlineWidth:y=0}=e,g={font:`${n} ${o}`,placement:d,textBaseline:p,fill:new(Qn())({color:l}),backgroundFill:new(Qn())({color:h}),padding:[3,3,3,3],offsetX:"POINT"===t.featureType?u:0,offsetY:"POINT"===t.featureType?c:0,overflow:!0,maxAngle:0};return"POINT"===t.featureType&&(g.textAlign=m),y>0&&(g.stroke=new(Zn())({color:f,width:y})),new(Jn())({text:new(eo())(g)})}createVectorLayer(e,t){const{featureType:s,style:r}=e;let i;if("LINE"===s&&Un.isArray(r)){const[e,t]=r;i="solid"===t.lineDash?io.getRoadPath(t,e):io.getPathway(t,e)}else i=io.toOpenLayersStyle(e.style,e.featureType);return new nd.Vector({style:i,source:new ud.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})})}createHeatLayer(e,t){t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t;let s={source:new ud.Vector({features:t,wrapX:!1})},r=e.themeSetting;s.gradient=r.colors.slice(),s.radius=parseInt(r.radius);let i=r.customSettings;for(let e in i)s.gradient[e]=i[e];return r.weight&&this.changeWeight(t,r.weight),new nd.Heatmap(s)}changeWeight(e,t){let s=this;this.fieldMaxValue={},this.getMaxValue(e,t);let r=this.fieldMaxValue[t];e.forEach(function(e){let i=e.get("attributes");try{let a=i[t];e.set("weight",a/r)}catch(e){s.errorCallback&&s.errorCallback(e)}})}getMaxValue(e,t){let s,r=[],i=this,a=t;this.fieldMaxValue[a]||(e.forEach(function(e){s=e.get("attributes");try{r.push(parseFloat(s[a]))}catch(e){i.errorCallback&&i.errorCallback(e)}}),this.fieldMaxValue[a]=Qi.getArrayStatistic(r,"Maximum"))}createUniqueLayer(e,t){let s=this.createUniqueSource(e,t),r=new nd.Vector({styleSource:s,source:new ud.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})});return r.setStyle(e=>{let t=r.get("styleSource"),s=t.themeField,i=e.get("attributes")[s];return t.styleGroups.find(e=>e.value===i).olStyle}),r}createUniqueSource(e,t){let s=this.getUniqueStyleGroup(e,t);return{map:this.map,style:e.style,isHoverAble:e.isHoverAble,highlightStyle:e.highlightStyle,themeField:e.themeSetting.themeField,styleGroups:s}}getUniqueStyleGroup(e,t){let s=e.featureType,r=e.style,i=e.themeSetting,a=i.themeField,n=[],o=i.customSettings;for(let e in t){let s=t[e].get("attributes")[a],r=!1;for(let e in n)if(n[e]===s){r=!0;break}r||n.push(s)}let l=[];return n.forEach(function(e,t){let i="1.0"===this.webMapVersion?t:e,a=o[i];Un.isString(a)&&(a=this.getCustomSetting(r,a,s),o[i]=a);let n,h=a.type;n="SYMBOL_POINT"===h?io.getSymbolStyle(a):"SVG_POINT"===h?io.getSVGStyle(a):"IMAGE_POINT"===h?io.getImageStyle(a):io.toOpenLayersStyle(a,s),l.push({olStyle:n,style:o[i],value:e})},this),l}getCustomSetting(e,t,s){let r={};return"LINE"===s?r.strokeColor=t:r.fillColor=t,Object.assign(e,r)}createRangeLayer(e,t){let s=this.createRangeSource(e,t),r=new nd.Vector({styleSource:s,source:new ud.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})});return r.setStyle(e=>{let t=r.get("styleSource");if(t){let s=t.themeField,r=Number(e.get("attributes")[s.trim()]),i=t.styleGroups;for(let e=0;e<i.length;e++)if(0===e){if(r>=i[e].start&&r<=i[e].end)return i[e].olStyle}else if(r>i[e].start&&r<=i[e].end)return i[e].olStyle}}),r}createRangeSource(e,t){let s=this.getRangeStyleGroup(e,t);return!!s&&{style:e.style,themeField:e.themeSetting.themeField,styleGroups:s}}getRangeStyleGroup(e,t){let s,r,i=e.featureType,a=e.themeSetting,n=e.style,o=a.segmentCount,l=a.segmentMethod,h=a.colors,u=a.customSettings,c=a.themeField,d=[],p=o,m=l,f=this;t.forEach(function(e){s=e.get("attributes");try{if(s){let e=s[c.trim()];void 0!==e&&null!==e&&Un.isNumber(e)&&d.push(parseFloat(e))}else e.get(c)&&Un.isNumber(e.get(c))&&e.get(c)&&d.push(parseFloat(e.get(c)))}catch(e){f.errorCallback&&f.errorCallback(e)}});try{r=Qi.getArraySegments(d,m,p)}catch(e){f.errorCallback&&f.errorCallback(e)}if(r){let e=p;s&&r[0]===r[s.length-1]&&(e=1,r.length=2);for(let e in r){let t=r[e];t=0===Number(e)?Math.floor(100*t)/100:Math.ceil(100*t)/100+.1,r[e]=Number(t.toFixed(2))}let t=h;t=Xi.getGradientColors(t,e,"RANGE");for(let t=0;t<e;t++)t in u&&(u[t].segment.start&&(r[t]=u[t].segment.start),u[t].segment.end&&(r[t+1]=u[t].segment.end));let a=[];for(let s=0;s<e;s++){let e=t[s];s in u&&u[s].color&&(e=u[s].color),"LINE"===i?n.strokeColor=e:n.fillColor=e;let o=io.toOpenLayersStyle(n,i),l=r[s],h=r[s+1];a.push({olStyle:o,color:e,start:l,end:h})}return a}return!1}createMarkerLayer(e){return e&&this.setEachFeatureDefaultStyle(e),new nd.Vector({source:new ud.Vector({features:e,wrapX:!1})})}createDataflowLayer(e,t){let s,r=e.pointStyle;s=io.getOpenlayersStyle(r,e.featureType);let i,a,n,o,l=new ud.Vector({wrapX:!1}),h=new nd.Vector({styleOL:s,source:l});e.labelStyle&&e.visible&&((i=this.addLabelLayer(e)).setZIndex(1e3),a=i.getSource());const{visibleScale:u}=e;e.lineStyle&&e.visible&&(n=this.createVectorLayer({style:e.lineStyle,featureType:"LINE"}),o=n.getSource(),n.setZIndex(t),this.map.addLayer(n),u&&this.setVisibleScales(n,u),e.pathLayer=n);let c=this;return this.createDataflowService(e,function(t,s,r){return function(i){if(c.events.triggerEvent("updateDataflowFeature",{feature:i,identifyField:e.identifyField,layerID:e.layerID}),e.filterCondition){let n="select * from json where ("+c.parseFilterCondition(e.filterCondition)+")",h=window.jsonsql.query(n,{attributes:i.get("attributes")});h&&h.length>0&&c.addDataflowFeature(i,e.identifyField,{dataflowSource:l,featureCache:t,labelSource:a,labelFeatureCache:s,pathSource:o,pathFeatureCache:r,maxPointCount:e.maxPointCount})}else c.addDataflowFeature(i,e.identifyField,{dataflowSource:l,featureCache:t,labelSource:a,labelFeatureCache:s,pathSource:o,pathFeatureCache:r,maxPointCount:e.maxPointCount})}}({},{},{})),this.setFeatureStyle(h,e.directionField,r.type),h}addDataflowFeature(e,t,s){s.dataflowSource&&this.addFeatureFromDataflowService(s.dataflowSource,e,t,s.featureCache),s.labelSource&&this.addFeatureFromDataflowService(s.labelSource,e,t,s.labelFeatureCache),s.pathSource&&this.addPathFeature(s.pathSource,e,t,s.pathFeatureCache,s.maxPointCount)}addPathFeature(e,t,s,r,i){let a=[];var n=t.get(s);r[n]?((a=r[n].getGeometry().getCoordinates()).push(t.getGeometry().getCoordinates()),i&&a.length>i&&a.splice(0,a.length-i),r[n].getGeometry().setCoordinates(a)):(a.push(t.getGeometry().getCoordinates()),r[n]=new(Bn())({geometry:new hd.LineString(a)}),e.addFeature(r[n]))}setFeatureStyle(e,t,s){let r=e.get("styleOL");e.setStyle(e=>{let i,a;if((i=void 0!==t&&"未设置"!==t&&"None"!==t?e.get("attributes")[t]:0)>360||i<0)return null;a="SYMBOL_POINT"===s?r.getText():r.getImage();let n=Math.PI*i/180;return a&&a.setRotation(n),r})}createDataflowHeatLayer(e){let t={source:this.createDataflowHeatSource(e)};if(t.gradient=e.themeSetting.colors.slice(),t.radius=parseInt(e.themeSetting.radius),e.themeSetting.customSettings){let s=e.themeSetting.customSettings;for(let e in s)t.gradient[e]=s[e]}return new nd.Heatmap(t)}createDataflowHeatSource(e){let t=this,s=new ud.Vector({wrapX:!1});return this.createDataflowService(e,function(r){return function(i){if(e.filterCondition){let a="select * from json where ("+t.parseFilterCondition(e.filterCondition)+")",n=window.jsonsql.query(a,{attributes:i.get("attributes")});n&&n.length>0&&t.addDataflowFeature(i,e.identifyField,{dataflowSource:s,featureCache:r})}else t.addDataflowFeature(i,e.identifyField,{dataflowSource:s,featureCache:r});e.themeSetting.weight&&t.changeWeight(s.getFeatures(),e.themeSetting.weight)}}({})),s}addFeatureFromDataflowService(e,t,s,r){var i=t.get(s);void 0!==i&&r[i]?(r[i].setGeometry(t.getGeometry()),r[i].setProperties(t.getProperties()),e.changed()):(e.addFeature(t),r[i]=t)}createDataflowService(e,t){let s=this,r=new ku(e.wsUrl).initSubscribe();r.on("messageSucceeded",function(r){let i=JSON.parse(r.value.data),a=fd.readFeature(i,{dataProjection:e.projection||"EPSG:4326",featureProjection:s.baseProjection||"EPSG:4326"});a.setProperties({attributes:i.properties}),t(a)}),e.dataflowService=r}setEachFeatureDefaultStyle(e){let t=this;(e=Un.isArray(e)||e instanceof md()?e:[e]).forEach(function(e){let s=e.getGeometry().getType().toUpperCase(),r=e.getProperties().useStyle;if(r){"POINT"===s&&r.text&&(s="TEXT");let i=t.setFeatureInfo(e);e.setProperties({useStyle:r,attributes:i}),"POINT"===s&&r.src&&-1===r.src.indexOf("http://")&&-1===r.src.indexOf("https://")&&(r.src=t.server+r.src)}else r=io.getMarkerDefaultStyle(s,t.server);e.setStyle(io.toOpenLayersStyle(r,s))},this)}setFeatureInfo(e){let t=e.get("attributes"),s=Object.assign({dataViz_title:"",dataViz_description:"",dataViz_imgUrl:"",dataViz_url:""},t),r=e.getProperties();for(let e in s)r[e]&&(s[e]=r[e],delete r[e]);return s}createRankSymbolLayer(e,t){let s=this.createRankStyleSource(e,t,e.featureType),r=new nd.Vector({styleSource:s,source:new ud.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1}),renderMode:"image"});return r.setStyle(e=>{let t=r.get("styleSource"),s=t.parameters.themeSetting.themeField,i=Number(e.get("attributes")[s]),a=t.styleGroups;for(let e=0,s=a.length;e<s;e++)if(i>=a[e].start&&i<a[e].end)return t.styleGroups[e].olStyle}),r}createRankStyleSource(e,t,s){let r=e.themeSetting.themeField,i=this.getRankStyleGroup(r,t,e,s);return!!i&&{parameters:e,styleGroups:i}}getRankStyleGroup(e,t,s,r){let i=[],a=[],n=s.style,o=s.themeSetting,l=o.segmentMethod||this.defaultParameters.themeSetting.segmentMethod,h=o.segmentCount||this.defaultParameters.themeSetting.segmentCount,u=o.customSettings,c=s.themeSetting.minRadius,d=s.themeSetting.maxRadius,p=n.fillColor,m=s.themeSetting.colors;t.forEach(t=>{let s=t.get("attributes")[e];null!=s&&Un.isNumber(s)&&i.push(Number(s))});try{a=Qi.getArraySegments(i,l,h)}catch(e){console.error(e)}for(let e=0;e<h;e++)if(e in u){let t=u[e].segment.start,s=u[e].segment.end;null!=t&&(a[e]=t),null!=s&&(a[e+1]=s)}let f=[];if(a&&a.length){let e,t,s=a.length,i=(d-c)/(s-1),o=Number(((d+c)/2).toFixed(2)),l=m?Xi.getGradientColors(m,s,"RANGE"):[];for(let h=0;h<s-1;h++){o=(e=Number(a[h].toFixed(2)))===(t=Number(a[h+1].toFixed(2)))?o:c+Math.round(i*h),t=h===s-2?t+.01:t,o=u[h]&&u[h].radius?u[h].radius:o,n.radius=o,n.fillColor=u[h]&&u[h].color?u[h].color:l[h]||p;let d=io.getOpenlayersStyle(n,r,!0);f.push({olStyle:d,radius:o,start:e,end:t,fillColor:n.fillColor})}return f}return!1}checkUploadToRelationship(e){let t=this.getRequestUrl(`${this.server}web/datas/${e}/datasets.json`);return Pe.get(t,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){return e})}getDatasources(e){let t=this.getRequestUrl(`${e}/data/datasources.json`);return Pe.get(t,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){return e.datasourceNames[0]})}getDataService(e,t){let s=this.getRequestUrl(`${this.server}web/datas/${e}.json`);return Pe.get(s,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(s){return s.fileId=e,s.datasetName=t,s})}getRequestUrl(e,t){if(e=t?e:this.formatUrlWithCredential(e),!this.excludePortalProxyUrl)return X.isInTheSameDomain(e)?e:`${this.getProxy()}${encodeURIComponent(e)}`}formatUrlWithCredential(e){return this.credentialValue&&(e=-1===e.indexOf("?")?`${e}?${this.credentialKey}=${this.credentialValue}`:`${e}&${this.credentialKey}=${this.credentialValue}`),e}getProxy(e){return e||(e="json"),this.proxy||this.server+`apps/viewer/getUrlResource.${e}?url=`}getTileLayerInfo(e){let t=this,s=t.baseProjection.split("EPSG:")[1],r=t.getRequestUrl(`${e}/maps.json`);return Pe.get(r,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){let r=[];return e&&e.forEach(function(e){let i=t.getRequestUrl(`${e.path}.json?prjCoordSys=${encodeURI(JSON.stringify({epsgCode:s}))}`),a=Pe.get(i,null,{withCredentials:t.withCredentials}).then(function(e){return e.json()}).then(function(t){return t.url=e.path,t});r.push(a)}),Promise.all(r).then(function(e){return e})})}addProjctionFromWKT(e,t){if("string"!=typeof e)return!1;if("EPSG:4326"===e||"EPSG:3857"===e)return!0;{let s=t||this.getEpsgInfoFromWKT(e);return!!s&&(Du.defs(s,e),rd&&rd.register?rd.register(Du):window.ol.proj&&window.ol.proj.setProj4&&window.ol.proj.setProj4(Du),!0)}}getEpsgInfoFromWKT(e){if("string"!=typeof e)return!1;if(0===e.indexOf("EPSG"))return e;{let t=e.lastIndexOf("AUTHORITY")+10,s=e.indexOf("]",t)-1;return t>0&&s>0&&`EPSG:${e.substring(t,s).split(",")[1].substr(1)}`}}createMigrationLayer(e,t){window.EChartsLayer.prototype.getContainer||(window.EChartsLayer.prototype.getContainer=function(){return this.$container}),window.EChartsLayer.prototype.setVisible||(window.EChartsLayer.prototype.setVisible=function(e){if(e){let e=this.get("options");e&&(this.setChartOptions(e),this.unset("options"))}else{let e=this.getChartOptions();this.set("options",e),this.clear(),this.setChartOptions({})}}),window.EChartsLayer.prototype.setZIndex||(window.EChartsLayer.prototype.setZIndex=function(e){let t=this.getContainer();t&&(t.style.zIndex=e)}),window.EChartsLayer.prototype.setCursor||(window.EChartsLayer.prototype.setCursor=function(e="default"){let t=this.getContainer();t&&"default"===e&&t.classList.add("cursor-default")});let s=Un.getFeatureProperties(t),r=this.createLinesData(e,s),i=this.createPointsData(r,e,s),a=this.createOptions(e,r,i),n=new window.EChartsLayer(a,{hideOnMoving:!1,hideOnZooming:!1,forcedPrecomposeRerender:!0});return n.type="ECHARTS",n}createOptions(e,t,s){let r,i=this.createLineSeries(e,t);if(s&&s.length){let t=this.createPointSeries(e,s);r=i.concat(t)}else r=i.slice();return{series:r}}createLineSeries(e,t){let s=e.lineSetting,r=e.animationSetting,i=[{name:"line-series",type:"lines",zlevel:1,silent:!0,effect:{show:r.show,constantSpeed:r.constantSpeed,trailLength:0,symbol:r.symbol,symbolSize:r.symbolSize},lineStyle:{normal:{color:s.color,type:s.type,width:s.width,opacity:s.opacity,curveness:s.curveness}},data:t}];return t.length>yd&&(i[0].blendMode="lighter"),i}createPointSeries(e,t){let s=e.lineSetting,r=e.animationSetting,i=e.labelSetting,a=[{name:"point-series",coordinateSystem:"geo",zlevel:2,silent:!0,label:{normal:{show:i.show,position:"right",formatter:"{b}",color:i.color,fontFamily:i.fontFamily}},itemStyle:{normal:{color:s.color||i.color}},data:t}];return r.show?(a[0].type="effectScatter",a[0].rippleEffect={brushType:"stroke"}):a[0].type="scatter",a}createPointsData(e,t,s){let r=[],i=t.labelSetting;if(!i.show||!e.length)return r;let a=[],n=[];return e.forEach((e,t)=>{let r=e.coords,o=r[0],l=r[1],h=s[t][i.from],u=s[t][i.to];!a.find(e=>e.value[0]===o[0]&&e.value[1]===o[1])&&a.push({name:h,value:o}),!n.find(e=>e.value[0]===l[0]&&e.value[1]===l[1])&&n.push({name:u,value:l})}),r=a.concat(n)}createLinesData(e,t){let s=[];if(t&&t.length){let r,i,a=e.from,n=e.to;if("XY_FIELD"===a.type&&a.xField&&a.yField&&n.xField&&n.yField)t.forEach(e=>{let t=e[a.xField],o=e[a.yField],l=e[n.xField],h=e[n.yField];t&&o&&l&&h&&(r=[e[a.xField],e[a.yField]],i=[e[n.xField],e[n.yField]],s.push({coords:[r,i]}))});else if("PLACE_FIELD"===a.type&&a.field&&n.field){const e=Zc.concat($c);t.forEach(t=>{let o=t[a.field],l=t[n.field];r=e.find(e=>Un.isMatchAdministrativeName(e.name,o)),i=e.find(e=>Un.isMatchAdministrativeName(e.name,l)),r&&i&&s.push({coords:[r.coord,i.coord]})})}}return s}getService(e,t){return e.filter(e=>e&&e.serviceType===t)[0]}isMvt(e,t){let s=this;return this.getDatasetsInfo(e,t).then(e=>e.epsgCode==s.baseProjection.split("EPSG:")[1]?Pe.get(s.getRequestUrl(`${e.url}/tilefeature.mvt`),null,{withCredentials:s.withCredentials}).then(function(e){return e.json()}).then(function(t){return e.isMvt=t.error&&400===t.error.code,e}).catch(()=>e):e)}getDatasetsInfo(e,t){let s=this;return s.getDatasources(e).then(function(r){let i=`${e}/data/datasources/${r}/datasets/${t}.json`;return Pe.get(s.getRequestUrl(i),null,{withCredentials:s.withCredentials}).then(function(e){return e.json()}).then(function(e){return{epsgCode:e.datasetInfo.prjCoordSys.epsgCode,bounds:e.datasetInfo.bounds,url:i}})})}isRestMapMapboxStyle(e){let t=e.dataSource,s=e.layerType;return!(!(t&&"EXTERNAL"===t.type&&t.url.indexOf("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY")>-1)||"MAPBOXSTYLE"!==s&&"VECTOR_TILE"!==s)}getMapboxStyleLayerInfo(e,t){let s=this;return new Promise((r,i)=>s.getMapLayerExtent(t).then(t=>s.getMapboxStyle(e,t).then(e=>{Object.assign(t,e),r(t)}).catch(e=>{i(e)})).catch(e=>{i(e)}))}getMapLayerExtent(e){let t=e.dataSource.url;this.isRestMapMapboxStyle(e)&&(t=t.replace("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY","")),t=this.getRequestUrl(t+".json");let s,r,i=e.credential;return i&&(t=`${t}?${r=Object.keys(i)[0]}=${s=i[r]}`),Pe.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(t=>(e.visibleScales=t.visibleScales,e.coordUnit=t.coordUnit,e.scale=t.scale,e.epsgCode=t.prjCoordSys.epsgCode,e.bounds=t.bounds,e)).catch(e=>e)}getMapboxStyle(e,t){let s=this,r=t.url||t.dataSource.url,i=r;i.indexOf("/restjsr/")>-1&&(i=`${i}/style.json`),i=this.getRequestUrl(i);let a,n,o=t.credential;return o&&(n=Object.keys(o)[0],a=o[n],i=`${i}?${n}=${a}`),Pe.get(i,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(i=>{s._matchStyleObject(i);let o=t.bounds;if(a){i.sprite=`${i.sprite}?${n}=${a}`;let e=i.sources;Object.keys(e).forEach(function(e){i.sources[e].tiles.forEach(function(t,s){i.sources[e].tiles[s]=`${t}?${n}=${a}`})})}let l={url:r,sourceType:"VECTOR_TILE",layerType:"VECTOR_TILE",styles:i,extent:o&&[o.left,o.bottom,o.right,o.top],bounds:t.bounds,projection:"EPSG:"+t.epsgCode,epsgCode:t.epsgCode,name:t.name};return Object.assign(t,l),t.zIndex>0&&s.modifyMapboxstyleLayer(e,t),t}).catch(e=>e)}modifyMapboxstyleLayer(e,t){let s=this;if(e.layers&&0===e.layers.length)return;let r=t.styles.layers;if(!r)return;r=r.filter(e=>"background"!==e.type),t.styles.layers=r;let i=e.layers.filter(e=>"VECTOR_TILE"===e.layerType&&e.zIndex!==t.zIndex).map(e=>e.styles&&e.styles.layers);!i||i&&0===i.length||i.forEach(e=>{r.forEach(t=>{s.renameLayerId(e,t)})})}renameLayerId(e,t){if(e.find(e=>e.id===t.id)){const s=t.id.match(/(.+)\((\w)\)$/);s?t.id=`${s[1]}(${+s[2]+1})`:t.id+="(1)",e.find(e=>e.id===t.id)&&this.renameLayerId(e,t)}}_matchStyleObject(e){let{sprite:t,glyphs:s}=e;t&&"object"==typeof t&&(e.sprite=Object.values(t)[0]),s&&"object"==typeof s&&(e.glyphs=Object.values(s)[0])}isIportalProxyServiceUrl(e){if(this.serviceProxy&&this.serviceProxy.enable&&e){let t="";return this.serviceProxy.proxyServerRootUrl?t=`${this.serviceProxy.proxyServerRootUrl}/`:this.serviceProxy.rootUrlPostfix?t=`${this.serviceProxy.port}/${this.serviceProxy.rootUrlPostfix}/`:this.serviceProxy.rootUrlPostfix||(t=`${this.serviceProxy.port}/`),80!==this.serviceProxy.port?e.indexOf(t)>=0:e.indexOf(t)>=0||e.indexOf(t.replace(":80",""))>=0}return!1}getStyleResolutions(e,t=0,s=22){let r=[];let i=Math.abs(e.left-e.right)/512;for(let e=t;e<=s;e++)0!==e?(i/=2,r[e]=i):r[e]=i;return r}createVisibleResolution(e,t,s,r){let i=[];if(e&&e.length>0)i=e.map(e=>{let t=1/e;return this.getResFromScale(t,r)});else{let e=this.getEnvelope(t,s);i=this.getStyleResolutions(e)}return i}getEnvelope(e,t){let s={};return e&&4===e.length?(s.left=e[0],s.bottom=e[1],s.right=e[2],s.top=e[3]):s=t,s}createMVTLayer(e){let t=e.styles;const s=t&&t.metadata&&t.metadata.indexbounds,r=this.createVisibleResolution(e.visibleScales,s,e.bounds,e.coordUnit),i=this.getEnvelope(s,e.bounds),a=this.getStyleResolutions(i);let n=this.isIportalProxyServiceUrl(t.sprite),o=new kc({style:t,source:t.name,resolutions:a,map:this.map,withCredentials:n});return new Promise(s=>{o.on("styleloaded",function(){let i=r[r.length-1],a=r[0],l=new nd.VectorTile({declutter:!0,source:new Oc({style:t,withCredentials:n,projection:e.projection,format:new(Mc())({featureClass:dd()}),wrapX:!1}),style:o.featureStyleFuntion,visible:e.visible,zIndex:e.zIndex,opacity:e.opacity,minResolution:i,maxResolution:a>1?Math.ceil(a):1.1*a});s(l)})})}isSameDomain(e){let t=e.split("://")[1],s=t.indexOf("/"),r=t.substring(0,s),i=document.location.toString().split("://")[1],a=i.indexOf("/"),n=i.substring(0,a);if(r.indexOf(":")>-1||""!==window.location.port)return r===n;{let e=r.split("."),t=n.split(".");return e[1]===t[1]&&e[2]===t[2]}}isSupportWebp(e,t){let s;return!(this.isIE()||this.isFirefox()&&this.getFirefoxVersion()<65||this.isChrome()&&this.getChromeVersion()<32)&&(e=t?`${e}/tileImage.webp?token=${t}`:`${e}/tileImage.webp`,s=!(X.isInTheSameDomain(e)&&!t),e=this.getRequestUrl(e,s),Pe.get(e,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0}).then(function(e){if(200!==e.status)throw e.status;return e}).then(()=>!0).catch(()=>!1))}isIE(){return!!(window.ActiveXObject||"ActiveXObject"in window)}isFirefox(){return navigator.userAgent.indexOf("Firefox")>-1}isChrome(){return navigator.userAgent.indexOf("Chrome")>-1}getFirefoxVersion(){return+navigator.userAgent.toLowerCase().match(/firefox\/([\d.]+)/)[1]}getChromeVersion(){return+navigator.userAgent.toLowerCase().match(/chrome\/([\d.]+)/)[1]}addGraticule(e){if(this.isHaveGraticule){this.createGraticuleLayer(e.grid.graticule),this.layerAdded++;const t=e.layers?e.layers.length:0;this.sendMapToUser(t)}}createGraticuleLayer(e){const{strokeColor:t,strokeWidth:s,lineDash:r,extent:i,visible:a,interval:n,lonLabelStyle:o,latLabelStyle:l}=e,h=this.baseProjection;let u=new hn.get(h);u.setExtent(i),u.setWorldExtent(hn.transformExtent(i,h,"EPSG:4326"));let c={layerID:"graticule_layer",strokeStyle:new(Zn())({color:t,width:s,lineDash:r}),extent:i,visible:a,intervals:n,showLabels:!0,zIndex:9999,wrapX:!1,targetSize:0};o&&(c.lonLabelStyle=new(eo())({font:`${o.fontSize} ${o.fontFamily}`,textBaseline:o.textBaseline,fill:new(Qn())({color:o.fill}),stroke:new(Zn())({color:o.outlineColor,width:o.outlineWidth})})),l&&(c.latLabelStyle=new(eo())({font:`${l.fontSize} ${l.fontFamily}`,textBaseline:l.textBaseline,fill:new(Qn())({color:l.fill}),stroke:new(Zn())({color:l.outlineColor,width:l.outlineWidth})}));const d=new nd.Graticule(c);this.map.addLayer(d)}}
  1693. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1694. * This program are made available under the terms of the Apache License, Version 2.0
  1695. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1696. if(window&&window.ol){let e=window.ol;e.supermap=window.ol.supermap||{},e.supermap.control=window.ol.supermap.control||{},e.supermap.control.ChangeTileVersion=nn,e.supermap.control.Logo=mn,e.supermap.control.ScaleLine=dn,e.supermap.StyleUtils=io,e.supermap.Util=Un,e.source.BaiduMap=fo,e.source.ImageSuperMapRest=vo,e.source.SuperMapCloud=xo,e.source.Tianditu=Eo,e.source.TileSuperMapRest=Mo,e.supermap.WebMap=Sd,e.style.CloverShape=qu,e.Graphic=ec,e.style.HitCloverShape=Wu,e.source.GeoFeature=hc,e.source.Theme=Vu,e.supermap.ThemeFeature=Bu,e.supermap.MapboxStyles=kc,e.supermap.VectorTileStyles=_c,e.source.DataFlow=Gu,e.source.Graph=Hu,e.source.Graphic=lc,e.source.HeatMap=Lc,e.source.Label=uc,e.source.Mapv=gc,e.source.Range=vc,e.source.RankSymbol=Sc,e.source.Turf=xc,e.source.Unique=Cc,e.source.VectorTileSuperMapRest=Oc,e.supermap.AddressMatchService=Gc,e.supermap.ChartService=Bc,e.supermap.DataFlowService=ku,e.supermap.FeatureService=An,e.supermap.FieldService=Uc,e.supermap.GridCellInfosService=jc,e.supermap.GeoprocessingService=Vc,e.supermap.LayerInfoService=Hc,e.supermap.MapService=sn,e.supermap.MeasureService=Jc,e.supermap.NetworkAnalyst3DService=zc,e.supermap.NetworkAnalystService=qc,e.supermap.ProcessingService=Wc,e.supermap.QueryService=Mn,e.supermap.ServiceBase=r,e.supermap.SpatialAnalystService=Yc,e.supermap.ThemeService=Xc,e.supermap.TrafficTransferAnalystService=Qc,e.supermap.WebPrintingJobService=Kc}})(),(()=>{"use strict";
  1697. /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  1698. * This program are made available under the terms of the Apache License, Version 2.0
  1699. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/})()})();