/*! * * iclient-ol.(https://iclient.supermap.io) * Copyright© 2000 - 2021 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v10.1.1 * */!function(){var e={898:function(e,t,r){e.exports=r(70)},937:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){s.prototype.append=function(e,t){e=i(e),t=a(t);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(t)},s.prototype.delete=function(e){delete this.map[i(e)]},s.prototype.get=function(e){var t=this.map[i(e)];return t?t[0]:null},s.prototype.getAll=function(e){return this.map[i(e)]||[]},s.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},s.prototype.set=function(e,t){this.map[i(e)]=[a(t)]},s.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)};var r={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},n=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this)},f.call(h.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var o=[301,302,303,307,308];y.redirect=function(e,t){if(-1===o.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.Headers=s,t.Request=h,t.Response=y,t.fetch=function(e,t){return new Promise(function(n,o){var i;i=h.prototype.isPrototypeOf(e)&&!t?e:new h(e,t);var a=new XMLHttpRequest;var l=!1;function u(){if(4===a.readyState){var e=1223===a.status?204:a.status;if(e<100||e>599){if(l)return;return l=!0,void o(new TypeError("Network request failed"))}var t={status:e,statusText:a.statusText,headers:function(e){var t=new s;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}(a),url:"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0},r="response"in a?a.response:a.responseText;l||(l=!0,n(new y(r,t)))}}a.onreadystatechange=u,a.onload=u,a.onerror=function(){l||(l=!0,o(new TypeError("Network request failed")))},a.open(i.method,i.url,!0);try{"include"===i.credentials&&("withCredentials"in a?a.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 a&&r.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function i(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 a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){this.map={},e instanceof s?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 u(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function c(e){var t=new FileReader;return t.readAsArrayBuffer(e),u(t)}function f(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!r.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},r.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(c)},this.text=function(){var e,t,r,n,o,i,a,s=l(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,r=new FileReader,n=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",o=/charset\=[0-9a-zA-Z\-\_]*;?/,i=e.type.match(o)||n.match(o),a=[e],i&&a.push(i[0].replace(/^charset\=/,"").replace(/;$/,"")),r.readAsText.apply(r,a),u(r);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)},r.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function h(e,t){var r,o,i=(t=t||{}).body;if(h.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new s(e.headers)),this.method=e.method,this.mode=e.mode,i||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new s(t.headers)),this.method=(r=t.method||this.method||"GET",o=r.toUpperCase(),n.indexOf(o)>-1?o:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i,t)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function y(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 s?t.headers:new s(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},238:function(e,t){var r,n,o;n=[t,e],void 0===(o="function"==typeof(r=function(e,t){"use strict";var r={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function n(e){try{delete window[e]}catch(t){window[e]=void 0}}function o(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],i=e,a=t.timeout||r.timeout,s=t.jsonpCallback||r.jsonpCallback,l=void 0;return new Promise(function(r,u){var c=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),f=s+"_"+c;window[c]=function(e){r({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),o(f),n(c)},i+=-1===i.indexOf("?")?"?":"&";var h=document.createElement("script");h.setAttribute("src",""+i+s+"="+c),t.charset&&h.setAttribute("charset",t.charset),h.id=f,document.getElementsByTagName("head")[0].appendChild(h),l=setTimeout(function(){u(new Error("JSONP request to "+e+" timed out")),n(c),o(f),window[c]=function(){n(c)}},a),h.onerror=function(){u(new Error("JSONP request to "+e+" failed")),n(c),o(f),l&&clearTimeout(l)}})}})?r.apply(t,n):r)||(e.exports=o)},944:function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e=r.nmd(e);var o=200,i="Expected a function",a="__lodash_hash_undefined__",s=1,l=2,u=1/0,c=9007199254740991,f="[object Arguments]",h="[object Array]",p="[object Boolean]",y="[object Date]",d="[object Error]",v="[object Function]",m="[object GeneratorFunction]",b="[object Map]",g="[object Number]",S="[object Object]",w="[object RegExp]",O="[object Set]",_="[object String]",x="[object Symbol]",P="[object ArrayBuffer]",C="[object DataView]",T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/,k=/^\./,R=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M=/\\(\\)?/g,A=/^\[object .+?Constructor\]$/,j=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[f]=L[h]=L[P]=L[p]=L[C]=L[y]=L[d]=L[v]=L[b]=L[g]=L[S]=L[w]=L[O]=L[_]=L["[object WeakMap]"]=!1;var I="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g,N="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,D=I||N||Function("return this")(),F="object"==n(t)&&t&&!t.nodeType&&t,G=F&&"object"==n(e)&&e&&!e.nodeType&&e,B=G&&G.exports===F&&I.process,U=function(){try{return B&&B.binding("util")}catch(e){}}(),V=U&&U.isTypedArray;function H(e,t){for(var r=-1,n=e?e.length:0;++ru))return!1;var f=i.get(e);if(f&&i.get(t))return f==t;var h=-1,p=!0,y=o&s?new Te:void 0;for(i.set(e,t),i.set(t,e);++h-1},Pe.prototype.set=function(e,t){var r=this.__data__,n=Re(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ce.prototype.clear=function(){this.__data__={hash:new xe,map:new(fe||Pe),string:new xe}},Ce.prototype.delete=function(e){return Ge(this,e).delete(e)},Ce.prototype.get=function(e){return Ge(this,e).get(e)},Ce.prototype.has=function(e){return Ge(this,e).has(e)},Ce.prototype.set=function(e,t){return Ge(this,e).set(e,t),this},Te.prototype.add=Te.prototype.push=function(e){return this.__data__.set(e,a),this},Te.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.clear=function(){this.__data__=new Pe},Ee.prototype.delete=function(e){return this.__data__.delete(e)},Ee.prototype.get=function(e){return this.__data__.get(e)},Ee.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Pe){var n=r.__data__;if(!fe||n.length-1&&e%1==0&&eo?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n-1&&e%1==0&&e<=c}function ot(e){var t=n(e);return!!e&&("object"==t||"function"==t)}function it(e){return!!e&&"object"==n(e)}function at(e){return"symbol"==n(e)||it(e)&&ne.call(e)==x}var st=V?function(e){return function(t){return e(t)}}(V):function(e){return it(e)&&nt(e.length)&&!!L[ne.call(e)]};function lt(e){return tt(e)?ke(e):Ne(e)}function ut(e){return e}e.exports=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=Ie(t);++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}(e.length)&&!Y(e)}function Y(e){var t=X(e)?P.call(e):"";return t==a||t==s}function X(e){var t=n(e);return!!e&&("object"==t||"function"==t)}var Q,K=(Q=function(e){return W(e)?G(e):U(e)},function(e){var t,r,n,o=H(e);return o==l?(t=e,r=-1,n=Array(t.size),t.forEach(function(e,t){n[++r]=[t,e]}),n):o==u?function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}(e):d(e,Q(e))});e.exports=K},957:function(e,t,r){var n,o,i;function a(e){"@babel/helpers - typeof";return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=function(){"use strict";function e(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}var t=setTimeout;function n(e){return Boolean(e&&void 0!==e.length)}function o(){}function i(e){if(!(this instanceof i))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=[],f(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,i._immediateFn(function(){var r=1===e._state?t.onFulfilled:t.onRejected;if(null!==r){var n;try{n=r(e._value)}catch(e){return void u(t.promise,e)}l(t.promise,n)}else(1===e._state?l:u)(t.promise,e._value)})):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===a(t)||"function"==typeof t)){var r=t.then;if(t instanceof i)return e._state=3,e._value=t,void c(e);if("function"==typeof r)return void f((n=r,o=t,function(){n.apply(o,arguments)}),e)}e._state=1,e._value=t,c(e)}catch(t){u(e,t)}var n,o}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,r=e._deferreds.length;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}("object"===n(e=r.nmd(e))?e.exports:{});try{regeneratorRuntime=o}catch(e){Function("r","regeneratorRuntime = r")(o)}}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=ol.Observable,t=r.n(e);function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=s(e);if(t){var i=s(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return a(e)}(this,r)}}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(n,t());var r=i(n);function n(e,t){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(o=r.call(this,e,t)).options=t||{},o.url=e,o.dispatchEvent({type:"initialized",value:a(o)}),o}return n}(),u=window.SuperMap=window.SuperMap||{};u.Components=window.SuperMap.Components||{}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var c=u.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},f=u.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},h=u.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"},p=u.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},y=(u.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},u.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"}),d=(u.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},u.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"}),v=u.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"},m=u.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},b=(u.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},u.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"}),g=u.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"},S=u.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},w=u.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},O=u.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},_=(u.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},u.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"}),x=u.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"},P=(u.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},u.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"}),C=u.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},T=u.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},E=(u.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},u.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},u.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},u.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},u.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"}),k=u.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},R=u.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},M=u.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},A=u.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},j=u.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},L=u.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},I=u.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},N=u.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},D=(u.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},u.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},u.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},u.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},u.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},u.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},u.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},u.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},u.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"}),F=u.Exponent={EXP1:"EXP1",EXP2:"EXP2"},G=u.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},B=(u.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},u.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"}),U=u.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},V=u.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},H=u.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},J=u.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},z=u.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},q=u.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},W=u.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},Y=(u.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},u.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"});u.ResourceType={MAP:"MAP",SERVICE:"SERVICE",SCENE:"SCENE",DATA:"DATA",INSIGHTS_WORKSPACE:"INSIGHTS_WORKSPACE",MAP_DASHBOARD:"MAP_DASHBOARD"},u.OrderBy={UPDATETIME:"UPDATETIME",HEATLEVEL:"HEATLEVEL",RELEVANCE:"RELEVANCE"},u.OrderType={ASC:"ASC",DESC:"DESC"},u.SearchType={PUBLIC:"PUBLIC",MY_RES:"MY_RES",MYGROUP_RES:"MYGROUP_RES",MYDEPARTMENT_RES:"MYDEPARTMENT_RES",SHARETOME_RES:"SHARETOME_RES"},u.AggregationTypes={TAG:"TAG",TYPE:"TYPE"},u.PermissionType={SEARCH:"SEARCH",READ:"READ",READWRITE:"READWRITE",DELETE:"DELETE",DOWNLOAD:"DOWNLOAD"},u.EntityType={DEPARTMENT:"DEPARTMENT",GROUP:"GROUP",IPORTALGROUP:"IPORTALGROUP",ROLE:"ROLE",USER:"USER"},u.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"},u.WebExportFormatType={PNG:"PNG",PDF:"PDF"},u.WebScaleOrientationType={HORIZONTALLABELSBELOW:"HORIZONTALLABELSBELOW",HORIZONTALLABELSABOVE:"HORIZONTALLABELSABOVE",VERTICALLABELSLEFT:"VERTICALLABELSLEFT",VERTICALLABELSRIGHT:"VERTICALLABELSRIGHT"},u.WebScaleType={LINE:"LINE",BAR:"BAR",BAR_SUB:"BAR_SUB"},u.WebScaleUnit={METER:"METER",FOOT:"FOOT",DEGREES:"DEGREES"};function X(e,t){for(var r=0;r0&&(r=parseFloat(e.toPrecision(t))),r},format:function(e,t,r,n){t=void 0!==t?t:0,r=void 0!==r?r:u.Number.thousandsSeparator,n=void 0!==n?n:u.Number.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var o=e.toString().split(".");1===o.length&&null==t&&(t=0);var i,a=o[0];if(r)for(var s=/(-?[0-9]+)([0-9]{3})/;s.test(a);)a=a.replace(s,"$1"+r+"$2");if(0==t)i=a;else{var l=o.length>1?o[1]:"0";null!=t&&(l+=new Array(t-l.length+1).join("0")),i=a+n+l}return i}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return ee.limitSigDigs(this,e)});var te=u.Function={bind:function(e,t){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var n=r.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},bindAsEventListener:function(e,t){return function(r){return e.call(t,r||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}};u.Array={filter:function(e,t,r){var n=[];if(Array.prototype.filter)n=e.filter(t,r);else{var o=e.length;if("function"!=typeof t)throw new TypeError;for(var i=0;i=0;r--)e[r]===t&&e.splice(r,1);return e},u.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},u.Util.applyDefaults=function(e,t){e=e||{};var r="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!r&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!r&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},u.Util.getParameterString=function(e){var t=[];for(var r in e){var n,o=e[r];if(null!=o&&"function"!=typeof o)n=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(r)+"="+n)}return t.join("&")},u.Util.urlAppend=function(e,t){var r=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);r+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return r},u.Util.urlPathAppend=function(e,t){var r=e;if(!t)return r;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),r="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},u.Util.DEFAULT_PRECISION=14,u.Util.toFloat=function(e,t){return null==t&&(t=u.Util.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},u.Util.rad=function(e){return e*Math.PI/180},u.Util.getParameters=function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(u.String.contains(e,"?")){var r=e.indexOf("?")+1,n=u.String.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(r,n)}for(var o={},i=t.split(/[&;]/),a=0,s=i.length;a1?1/e:e},u.Util.getResolutionFromScale=function(e,t){var r;e&&(null==t&&(t="degrees"),r=1/(u.Util.normalizeScale(e)*u.INCHES_PER_UNIT[t]*u.DOTS_PER_INCH));return r},u.Util.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*u.INCHES_PER_UNIT[t]*u.DOTS_PER_INCH},u.IS_GECKO=-1===(ne=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==ne.indexOf("gecko"),u.Browser=function(){var e,t="",r="",n="pc",o=navigator.userAgent.toLowerCase();return o.indexOf("msie")>-1||o.indexOf("trident")>-1&&o.indexOf("rv")>-1?(t="msie",e=o.match(/msie ([\d.]+)/)||o.match(/rv:([\d.]+)/)):o.indexOf("chrome")>-1?(t="chrome",e=o.match(/chrome\/([\d.]+)/)):o.indexOf("firefox")>-1?(t="firefox",e=o.match(/firefox\/([\d.]+)/)):o.indexOf("opera")>-1?(t="opera",e=o.match(/version\/([\d.]+)/)):o.indexOf("safari")>-1&&(t="safari",e=o.match(/version\/([\d.]+)/)),r=e?e[1]:"",o.indexOf("ipad")>-1||o.indexOf("ipod")>-1||o.indexOf("iphone")>-1?n="apple":o.indexOf("android")>-1&&(r=(e=o.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:r,device:n}}(),u.Util.getBrowser=function(){return u.Browser},u.Util.isSupportCanvas=(oe=!0,ie=u.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===ie.name&&parseFloat(ie.version)<5&&(oe=!1),"safari"===ie.name&&parseFloat(ie.version)<4&&(oe=!1),"opera"===ie.name&&parseFloat(ie.version)<10&&(oe=!1),"msie"===ie.name&&parseFloat(ie.version)<9&&(oe=!1)):oe=!1,oe),u.Util.supportCanvas=function(){return u.Util.isSupportCanvas},u.INCHES_PER_UNIT.degree=u.INCHES_PER_UNIT.dd,u.INCHES_PER_UNIT.meter=u.INCHES_PER_UNIT.m,u.INCHES_PER_UNIT.foot=u.INCHES_PER_UNIT.ft,u.INCHES_PER_UNIT.inch=u.INCHES_PER_UNIT.inches,u.INCHES_PER_UNIT.mile=u.INCHES_PER_UNIT.mi,u.INCHES_PER_UNIT.kilometer=u.INCHES_PER_UNIT.km,u.INCHES_PER_UNIT.yard=u.INCHES_PER_UNIT.yd,u.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),r=document.location.toString(),n=r.indexOf("//");if(-1===t)return!0;var o,i=o=e.substring(0,t),a=r.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==i.toLowerCase())return!1;var c=(i=e.substring(t+2)).indexOf(":");t=i.indexOf("/");var f,h=i.substring(0,t);return-1!==c?f=i.substring(0,c):(f=i.substring(0,t),h+=":"+("http:"===o.toLowerCase()?80:443)),f===document.domain&&h===l},u.Util.calculateDpi=function(e,t,r,n,o){if(e&&t&&r){var i,a=e.getWidth(),s=e.getHeight(),l=t.w,u=t.h;if(o=o||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var c=a/l,f=s/u;i=254/(c>f?c:f)/r/(2*Math.PI*o/360)/1e4}else{i=254/(a/l)/r/1e4}return i}},u.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("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var r=[],n=0,o=t.length;n0?"{"+l.join(",")+"}":"{}"}return t.toString()}},u.Util.getResolutionFromScaleDpi=function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?(e=u.Util.normalizeScale(e),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4):-1},u.Util.getScaleFromResolutionDpi=function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4:-1},u.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},u.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var r in t){var n=t[r];void 0!==n&&"CLASS_NAME"!==r&&"function"!=typeof n&&(e[r]=n)}return e},u.Util.copyAttributesWithClip=function(e,t,r){if(e=e||{},t)for(var n in t){var o=!1;if(r&&r.length)for(var i=0,a=r.length;i=0&&i<=1&&o<=1&&i>=0?new u.Geometry.Point(e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)):"No Intersection";else if(0==s&&0==l){var f=Math.max(e.y,t.y),h=Math.min(e.y,t.y),p=Math.max(e.x,t.x),y=Math.min(e.x,t.x);a=(r.y>=h&&r.y<=f||n.y>=h&&n.y<=f)&&r.x>=y&&r.x<=p||n.x>=y&&n.x<=p?"Coincident":"Parallel"}else a="Parallel";return a},u.Util.getTextBounds=function(e,t,r){document.body.appendChild(r),r.style.width="auto",r.style.height="auto",e.fontSize&&(r.style.fontSize=e.fontSize),e.fontFamily&&(r.style.fontFamily=e.fontFamily),e.fontWeight&&(r.style.fontWeight=e.fontWeight),r.style.position="relative",r.style.visibility="hidden",r.style.display="inline-block",r.innerHTML=t;var n=r.clientWidth,o=r.clientHeight;return document.body.removeChild(r),{textWidth:n,textHeight:o}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var le=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ae.isArray(t)&&(r=t[1],t=t[0]),this.lon=t?ae.toFloat(t):0,this.lat=r?ae.toFloat(r):0,this.CLASS_NAME="SuperMap.LonLat"}var t,r,n;return t=e,n=[{key:"fromString",value:function(t){var r=t.split(",");return new e(r[0],r[1])}},{key:"fromArray",value:function(t){var r=ae.isArray(t);return new e(r&&t[0],r&&t[1])}}],(r=[{key:"toString",value:function(){return"lon="+this.lon+",lat="+this.lat}},{key:"toShortString",value:function(){return this.lon+","+this.lat}},{key:"clone",value:function(){return new e(this.lon,this.lat)}},{key:"add",value:function(t,r){if(null==t||null==r)throw new TypeError("LonLat.add cannot receive null values");return new e(this.lon+ae.toFloat(t),this.lat+ae.toFloat(r))}},{key:"equals",value:function(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}},{key:"wrapDateLine",value:function(e){var t=this.clone();if(e){for(;t.lone.right;)t.lon-=e.getWidth()}return t}},{key:"destroy",value:function(){this.lon=null,this.lat=null}}])&&se(t.prototype,r),n&&se(t,n),e}();function ue(e,t){for(var r=0;rthis.right)&&(this.right=r.right),(null==this.top||r.top>this.top)&&(this.top=r.top))}}},{key:"containsLonLat",value:function(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var r=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!r){var o=n.getWidth(),i=(n.left+n.right)/2,a=Math.round((e.lon-i)/o);r=this.containsLonLat({lon:e.lon-a*o,lat:e.lat},{inclusive:t.inclusive})}return r}},{key:"containsPixel",value:function(e,t){return this.contains(e.x,e.y,t)}},{key:"contains",value:function(e,t,r){if(null==r&&(r=!0),null==e||null==t)return!1;var n=!1;return n=r?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&ethis.bottom&&t=r.bottom&&e.bottom<=r.top||r.bottom>=e.bottom&&r.bottom<=e.top,a=e.top>=r.bottom&&e.top<=r.top||r.top>e.bottom&&r.top=r.left&&e.left<=r.right||r.left>=e.left&&r.left<=e.right,l=e.right>=r.left&&e.right<=r.right||r.right>=e.left&&r.right<=e.right;n=(i||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),f=!u.containsBounds(r),h=!u.containsBounds(e);f&&!h?(e=e.add(-c,0),n=r.intersectsBounds(e,{inclusive:t.inclusive})):h&&!f&&(r=r.add(-c,0),n=e.intersectsBounds(r,{inclusive:t.inclusive}))}return n}},{key:"containsBounds",value:function(e,t,r){null==t&&(t=!1),null==r&&(r=!0);var n=this.contains(e.left,e.bottom,r),o=this.contains(e.right,e.bottom,r),i=this.contains(e.left,e.top,r),a=this.contains(e.right,e.top,r);return t?n||o||i||a:n&&o&&i&&a}},{key:"determineQuadrant",value:function(e){var t="",r=this.getCenterLonLat();return t+=e.lat=e.right&&o.right>e.right;)o=o.add(-i,0);var a=o.left+r;ae.left&&o.right-n>e.right&&(o=o.add(-i,0))}return o}},{key:"toServerJSONObject",value:function(){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}}},{key:"destroy",value:function(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}}])&&ue(t.prototype,r),n&&ue(t,n),e}();function fe(e,t){for(var r=0;r-1)){if(null!=t&&t=0;--r)t=this.removeComponent(e[r])||t;return t}},{key:"removeComponent",value:function(e){return ae.removeItem(this.components,e),this.clearBounds(),!0}},{key:"getArea",value:function(){for(var e=0,t=0,r=this.components.length;t=1?1:m)<=-1?-1:m,c=180*Math.acos(m)/Math.PI,a=(c=o.x==r.x?t.x>r.x&&n.x>r.x||t.xh*t.x+p&&n.y>h*n.x+p||t.yr.y?n.xr.x&&(s=!1):o.xh*n.x+p&&(s=!1):o.x>r.x?n.y>r.y&&(s=!1):n.y=0?180*Math.atan(b)/Math.PI:Math.abs(180*Math.atan(b)/Math.PI)+90,S=Math.abs(t.y);r.y==S&&S==o.y&&r.x=0?b>=0?u+=l:u=180-(u-90)+l:u=b>0?u-180+l:90-u+l:w>=0?b>=0?u-=l:u=180-(u-90)-l:u=b>=0?u-180-l:90-u-l,u=u*Math.PI/180;var _=t.x+i*Math.cos(u),x=t.y+i*Math.sin(u);f.push(new De(_,x))}f.push(o)}return f}},{key:"createLineEPS",value:function(e){var t=[],r=e.length;if(r<2)return e;for(var n=0;n2;return t&&Be(He(i.prototype),"removeComponent",this).apply(this,arguments),t}},{key:"getSortedSegments",value:function(){for(var e,t,r=this.components.length-1,n=new Array(r),o=0;o1&&(r=parseFloat(r)*u),n.labelAlign&&"cm"!==n.labelAlign)switch(n.labelAlign){case"lt":l.x+=t/2,l.y+=r/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=r/2;break;case"ct":l.y+=r/2;break;case"cb":l.y-=r/2;break;case"rt":l.x-=t/2,l.y+=r/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=r/2}return this.bsInfo.h=r,this.bsInfo.w=t,o=l.x-parseFloat(t)/2,i=l.y+parseFloat(r)/2,s=l.x+parseFloat(t)/2,a=l.y-parseFloat(r)/2,new ce(o,i,s,a)}},{key:"getLabelPxBoundsByText",value:function(e,t){var r,n,o,i,a=this.getLabelPxSize(t),s=ae.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":s.x+=a.w/2,s.y+=a.h/2;break;case"lm":s.x+=a.w/2;break;case"lb":s.x+=a.w/2,s.y-=a.h/2;break;case"ct":s.y+=a.h/2;break;case"cb":s.y-=a.h/2;break;case"rt":s.x-=a.w/2,s.y+=a.h/2;break;case"rm":s.x-=a.w/2;break;case"rb":s.x-=a.w/2,s.y-=a.h/2}return this.bsInfo.h=a.h,this.bsInfo.w=a.w,r=s.x-a.w/2,n=s.y+a.h/2,i=t.fontStyle&&"italic"===t.fontStyle?s.x+a.w/2+parseInt(parseFloat(t.fontSize)/2):s.x+a.w/2,o=s.y-a.h/2,new ce(r,n,i,o)}},{key:"getLabelPxSize",value:function(e){var t,r,n,o,i=parseFloat(e.strokeWidth);t=e.label||this.text,r=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var a=t.split("\n"),s=a.length;o=s>1?r*s+s+i+.2*r:r+i+.2*r+1,n=0,this.labelWTmp&&n255?r++:n++;return t.cnC=r,t.enC=n,t.textC=e.length,t}}])&&qe(t.prototype,r),n&&qe(t,n),i}();function Ze(e){"@babel/helpers - typeof";return(Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $e(e,t){for(var r=0;r3;if(t){this.components.pop(),et(nt(i.prototype),"removeComponent",this).apply(this,arguments);var r=this.components[0];et(nt(i.prototype),"addComponent",this).apply(this,[r])}return t}},{key:"getArea",value:function(){var e=0;if(this.components&&this.components.length>2){for(var t=0,r=0,n=this.components.length;r0){e+=Math.abs(this.components[0].getArea());for(var t=1,r=this.components.length;t1},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 r=u.Event.element(e);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=t.toUpperCase());)r=r.parentNode;return r},observe:function(e,t,r,n){var o=ae.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!o._eventCacheID){var i="eventCacheID_";o.id&&(i=o.id+"_"+i),o._eventCacheID=ae.createUniqueID(i)}var a=o._eventCacheID;this.observers[a]||(this.observers[a]=[]),this.observers[a].push({element:o,name:t,observer:r,useCapture:n}),o.addEventListener?"mousewheel"===t?o.addEventListener(t,r,{useCapture:n,passive:!1}):o.addEventListener(t,r,n):o.attachEvent&&o.attachEvent("on"+t,r)},stopObservingElement:function(e){var t=ae.getElement(e)._eventCacheID;this._removeElementObservers(u.Event.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var r=e[t],n=new Array(r.element,r.name,r.observer,r.useCapture);u.Event.stopObserving.apply(this,n)}},stopObserving:function(e,t,r,n){n=n||!1;var o=ae.getElement(e),i=o._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.detachEvent)&&(t="keydown");var a=!1,s=u.Event.observers[i];if(s)for(var l=0;!a&&l0&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"]"),r.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,r){var n=t[r];return n||(n=r.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%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())+'"'}},t}return t=i,(r=[{key:"read",value:function(e,t){var r;if(this.nativeJSON)try{r=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=r),r}},{key:"write",value:function(e,t){this.pretty=!!t;var r=null,n=Jt(e);if(this.serialize[n])try{r=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch(e){}return r}},{key:"writeIndent",value:function(){var e=[];if(this.pretty)for(var t=0;t0))return null;for(var a=0,s=0,l=[];a0){e+='"points":[';for(var r=0,n=this.components.length;re[i]){var a=e[i];e[i]=e[o],e[o]=a;var s=t[i];if(t[i]=t[o],t[o]=s,r&&r.length>0){var l=r[i];r[i]=r[o],r[o]=l}if(n&&n.length>0){var u=n[i];n[i]=n[o],n[o]=u}}}}],(r=[{key:"destroy",value:function(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}},{key:"toGeometry",value:function(){var e=this;switch(e.type.toUpperCase()){case h.POINT:return e.toGeoPoint();case h.LINE:return e.toGeoLine();case h.LINEM:return e.toGeoLinem();case h.REGION:return e.toGeoRegion();case h.POINTEPS:return e.toGeoPoint();case h.LINEEPS:return e.toGeoLineEPS();case h.REGIONEPS:return e.toGeoRegionEPS();case h.GEOCOMPOUND:return e.transformGeoCompound()}}},{key:"toGeoPoint",value:function(){var e=this.parts||[],t=this.points||[],r=e.length;if(r>0){if(1===r)return new De(t[0].x,t[0].y);for(var n=[],o=0;o0){if(1===r){for(var n=[],o=0;o0){if(1===s){for(e=0,r=[];e=0;g--)if(m[b]=-1,f[g].containsBounds(f[b])){h[b]=-1*h[g],h[b]<0&&(m[b]=g);break}for(var S=0;S0?i.push(c[S]):(i[m[S]].components=i[m[S]].components.concat(c[S].components),i.push(""))}else{i=new Array;for(var w=0;w0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(l),l=[]),i.push(c[w])),w==o-1){var O=i.length;if(O)i[O-1].components=i[O-1].components.concat(l);else for(var _=0,x=l.length;_=0;S--)if(b[g]=-1,h[S].containsBounds(h[g])){p[g]=-1*p[S],p[g]<0&&(b[g]=S);break}for(var w=0;w0?a.push(f[w]):(a[b[w]].components=a[b[w]].components.concat(f[w].components),a.push(""))}else{a=new Array;for(var O=0;O0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(u),u=[]),a.push(f[O])),O==o-1){var _=a.length;if(_)a[_-1].components=a[_-1].components.concat(u);else for(var x=0,P=u.length;x-1||(t[n]=e[n]);return t}}])&&mr(t.prototype,r),n&&mr(t,n),i}();function _r(e){"@babel/helpers - typeof";return(_r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xr(e,t){for(var r=0;r0&&o.push(","),r=t[i].geometry,o.push(this.extractGeometry(r));return n&&o.push(")"),o.join("")}},{key:"extractGeometry",value:function(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}}])&&xr(t.prototype,r),n&&xr(t,n),i}();function kr(e,t){for(var r=0;r=0?t.speed:1,this.frequency=t.speed&&t.frequency>=0?t.frequency:1e3,this.startTime=t.startTime&&null!=t.startTime?t.startTime:0,this.endTime=t.endTime&&null!=t.endTime&&t.endTime>=r.startTime?t.endTime:+new Date,this.repeat=void 0===t.repeat||t.repeat,this.reverse=void 0!==t.reverse&&t.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],r.events=new At(this,null,this.EVENT_TYPES),r.speed=Number(r.speed),r.frequency=Number(r.frequency),r.startTime=Number(r.startTime),r.endTime=Number(r.endTime),r.startTime=Date.parse(new Date(r.startTime)),r.endTime=Date.parse(new Date(r.endTime)),r.currentTime=r.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}var t,r,n;return t=e,(r=[{key:"updateOptions",value:function(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)}},{key:"start",value:function(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}},{key:"pause",value:function(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}},{key:"stop",value:function(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}},{key:"toggle",value:function(){this.running?this.pause():this.start()}},{key:"setSpeed",value:function(e){return e>=0&&(this.speed=e,!0)}},{key:"getSpeed",value:function(){return this.speed}},{key:"setFrequency",value:function(e){return e>=0&&(this.frequency=e,!0)}},{key:"getFrequency",value:function(){return this.frequency}},{key:"setStartTime",value:function(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}},{key:"getEndTime",value:function(){return this.endTime}},{key:"setCurrentTime",value:function(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)}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"setRepeat",value:function(e){this.repeat=e}},{key:"getRepeat",value:function(){return this.repeat}},{key:"setReverse",value:function(e){this.reverse=e}},{key:"getReverse",value:function(){return this.reverse}},{key:"getRunning",value:function(){return this.running}},{key:"destroy",value:function(){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}},{key:"tick",value:function(){}}])&&kr(t.prototype,r),n&&kr(t,n),e}();function Mr(e){"@babel/helpers - typeof";return(Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ar(e,t){for(var r=0;r=e.endTime&&(e.currentTime=e.endTime)}}}])&&Ar(t.prototype,r),n&&Ar(t,n),i}();u.TimeFlowControl=Fr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ r(957),r(937);var Gr=r(238),Br=r.n(Gr),Ur=window.fetch,Vr=(u.setCORS=function(e){u.CORS=e},u.isCORS=function(){return void 0!=u.CORS?u.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest}),Hr=(u.setRequestTimeout=function(e){return u.RequestTimeout=e},u.getRequestTimeout=function(){return u.RequestTimeout||45e3}),Jr=u.FetchRequest={commit:function(e,t,r,n){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,r,n);case"POST":return this.post(t,r,n);case"PUT":return this.put(t,r,n);case"DELETE":return this.delete(t,r,n);default:return this.get(t,r,n)}},supportDirectRequest:function(e,t){return!!ae.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Vr()||t.proxy)},get:function(e,t,r){r=r||{};if(e=ae.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){var n={url:e=e.replace(".json",".jsonp"),data:t};return u.Util.RequestJSONPPromise.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,r):this._fetch(e,t,r,"GET")},delete:function(e,t,r){r=r||{};if(e=ae.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=DELETE",data:t};return u.Util.RequestJSONPPromise.DELETE(n)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")-1),t,r):this._fetch(e,t,r,"DELETE")},post:function(e,t,r){if(r=r||{},!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=POST",data:t};return u.Util.RequestJSONPPromise.POST(n)}return this._fetch(this._processUrl(e,r),t,r,"POST")},put:function(e,t,r){if(r=r||{},e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=PUT",data:t};return u.Util.RequestJSONPPromise.PUT(n)}return this._fetch(e,t,r,"PUT")},urlIsLong:function(e){for(var t=0,r=null,n=0,o=e.length;n-1?"&":"?")+"_method="+e,"string"!=typeof r&&(r=JSON.stringify(r)),this.post(t,r,n)},_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 r=e.split("?");2===r.length&&(e=r[0]+".json?"+r[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,r,n){return(r=r||{}).headers=r.headers||{},r.headers["Content-Type"]||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),r.timeout?this._timeout(r.timeout,Ur(e,{method:n,headers:r.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:Hr()}).then(function(e){return e})):Ur(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:Hr()}).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||{},Br()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(r,n){setTimeout(function(){n(new Error("timeout"))},e),t.then(r,n)})},_getParameterString:function(e){var t=[];for(var r in e){var n,o=e[r];if(null!=o&&"function"!=typeof o)n=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(r)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};function zr(e,t){for(var r=0;r=t.limitLength){if(0==s)return!1;o.push(a),a=n,s=0,u--}else if(a.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var c=t.queryValues[u];c.length>0;){var f=t.limitLength-a.length-t.queryKeys[u].length-2;a.indexOf("?")>-1?a+="&":a+="?";var h=c.substring(0,f);"%"===h.substring(f-1,f)?(f-=1,h=c.substring(0,f)):"%"===h.substring(f-2,f-1)&&(f-=2,h=c.substring(0,f)),a+=t.queryKeys[u]+"="+h,c=c.substring(f),h.length>0&&(o.push(a),a=n,s=0)}else s++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[u]+"="+t.queryValues[u];return o.push(a),t.send(o,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+r+"]",e&&e.proxy),i},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,r){var n=e.length;if(n>0)for(var o=(new Date).getTime(),i=0;i-1?a+="&":a+="?",a+="sectionCount="+n,a+="§ionIndex="+i,a+="&jsonpUserID="+o,r&&(a=decodeURIComponent(a),a=r+encodeURIComponent(a)),Br()(a,{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)}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var qr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"generateToken",value:function(e,t){var r=this.servers[e];if(r)return Jr.post(r.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}},{key:"registerServers",value:function(e){this.servers=this.servers||{},ae.isArray(e)||(e=[e]);for(var t=0;t3&&void 0!==arguments[3]?arguments[3]:{headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials};return t=this.createCredentialUrl(t),Jr.commit(e,t,r,n).then(function(e){return e.json()})}},{key:"createCredentialUrl",value:function(e){var t=e,r=this.getCredential();if(r){var n=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===n?t+=r.getUrlParameters():t.indexOf("?")>-1&&"?"!==n?t+="&"+r.getUrlParameters():t+="?"+r.getUrlParameters()}return t}},{key:"getCredential",value:function(){var e,t=qr.getToken(this.serviceUrl);return(e=t?new Et(t,"token"):null)||(e=(t=this.getKey())?new Et(t,"key"):null),e}},{key:"getKey",value:function(){}}])&&rn(t.prototype,r),n&&rn(t,n),e}();u.iPortalServiceBase=nn; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var on=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},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=[],ae.extend(this,t)};u.iPortalQueryParam=on; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var an=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},this.content=[],this.total=0,this.currentPage=1,this.pageSize=12,this.aggregations=null,ae.extend(this,t)};function sn(e){"@babel/helpers - typeof";return(sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ln(e,t){for(var r=0;r0?(this.totalTimes--,this.ajaxPolling()):this._processFailed(e)}},{key:"ajaxPolling",value:function(){var e=this,t=e.options.url,r=/^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(r,r.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=ae.isInTheSameDomain(t),e._commit(e.options)}},{key:"calculatePollingTimes",value:function(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.timese.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}},{key:"isServiceSupportPolling",value:function(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}},{key:"serviceProcessCompleted",value:function(e){e=ae.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}},{key:"serviceProcessFailed",value:function(e){var t=(e=ae.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}},{key:"_commit",value:function(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=ae.urlAppend(e.url,ae.getParameterString(e.params||{}))),e.params=e.data),Jr.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 r=t;("string"==typeof t&&(r=(new Xt).read(t)),(!r||r.error||r.code>=300&&304!==r.code)&&(r=r&&r.error?{error:r.error}:{error:r}),r.error)?(e.scope?te.bind(e.failure,e.scope):e.failure)(r):(r.succeed=void 0==r.succeed||r.succeed,(e.scope?te.bind(e.success,e.scope):e.success)(r))}).catch(function(t){(e.scope?te.bind(e.failure,e.scope):e.failure)(t)})}}])&&jn(t.prototype,r),n&&jn(t,n),e}();function In(e,t){for(var r=0;r0)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}}])&&ti(t.prototype,r),n&&ti(t,n),e}();function ni(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}}])&&pa(t.prototype,r),n&&pa(t,n),i}();function ga(e){"@babel/helpers - typeof";return(ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sa(e,t){for(var r=0;r=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var r=JSON.parse(e.data);e.featureResult=r,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}},{key:"_connect",value:function(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)}},{key:"_appendCredentials",value:function(e){var t=qr.getToken(e);return t&&(e=ae.urlAppend(e,"token="+t)),e}}])&&Sa(t.prototype,r),n&&Sa(t,n),i}();function Ca(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.facilityPathList)return e;var t=new Or;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}}])&&Eu(t.prototype,r),n&&Eu(t,n),i}();function Lu(e,t){for(var r=0;r0&&(t+=","),t+=ae.toJSON(e[n]);return t+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e)return null;var t=new Or;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}])&&Du(t.prototype,r),n&&Du(t,n),i}();function Hu(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.pathList)return null;var t=new Or;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}}])&&qu(t.prototype,r),n&&qu(t,n),i}();function Zu(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new Or;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}}])&&tc(t.prototype,r),n&&tc(t,n),i}();function sc(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.serviceAreaList)return e;var t=new Or;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}}])&&cc(t.prototype,r),n&&cc(t,n),i}();function vc(e,t){for(var r=0;r0&&(t+=","),t+='{"x":'+o[r].x+',"y":'+o[r].y+"}";i+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,l=s.length,u=0;u0&&(a+=","),a+=s[u];i+=a+="]"}return i}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.tspPathList)return null;var t=new Or;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}}])&&gc(t.prototype,r),n&&gc(t,n),i}();function Pc(e,t){for(var r=0;r=0;e--)this.points[e].destroy();this.points=null}}}])&&yf(t.prototype,r),n&&yf(t,n),i}();function wf(e){"@babel/helpers - typeof";return(wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Of(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&Gf(t.prototype,r),n&&Gf(t,n),i}();function qf(e){"@babel/helpers - typeof";return(qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wf(e,t){for(var r=0;r=0&&r.toIndex>=0&&!n&&(r.url=ae.urlAppend(r.url,"fromIndex=".concat(r.fromIndex,"&toIndex=").concat(r.toIndex))),e.returnCountOnly&&(r.url=ae.urlAppend(r.url,"&returnCountOnly="+e.returnContent)),t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}},{key:"serviceProcessCompleted",value:function(e){if(e=ae.transformResult(e),this.format===c.GEOJSON&&e.features){var t=new Or;e.features=t.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}])&&Wf(t.prototype,r),n&&Wf(t,n),i}();function eh(e){"@babel/helpers - typeof";return(eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function th(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}}])&&lh(t.prototype,r),n&&lh(t,n),i}();function dh(e){"@babel/helpers - typeof";return(dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vh(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&_h(t.prototype,r),n&&_h(t,n),i}();function Rh(e){"@babel/helpers - typeof";return(Rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mh(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}}}])&&Fh(t.prototype,r),n&&Fh(t,n),i}();function zh(e){"@babel/helpers - typeof";return(zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qh(e,t){for(var r=0;r0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}])&&Mp(t.prototype,r),n&&Mp(t,n),e}();function jp(e,t){for(var r=0;r0)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)}},{key:"toServerJSONObject",value:function(){var e={};if((e=ae.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,n=0;n0)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}}])&&Ky(t.prototype,r),n&&Ky(t,n),i}();function od(e,t){for(var r=0;r0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(r,t),this.events.triggerEvent("processCompleted",{result:e[0]})}},{key:"handleLayers",value:function(e,t){var r;if(e)for(var n=0;n0)this.handleLayers(t[n].subLayers.layers.length,t[n].subLayers.layers);else switch(t[n].ugcLayerType){case"THEME":(r=new Ed).fromJson(t[n]),t[n]=r;break;case"GRID":(r=new Id).fromJson(t[n]),t[n]=r;break;case"IMAGE":(r=new Vd).fromJson(t[n]),t[n]=r;break;case"VECTOR":(r=new Xd).fromJson(t[n]),t[n]=r}}}}])&&Kd(t.prototype,r),n&&Kd(t,n),i}();function ov(e,t){for(var r=0;r=200&&e.code<300||0==e.code||304===e.code,r=e.code&&t;!e.code||r?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}])&&Cm(t.prototype,r),n&&Cm(t,n),i}();function jm(e,t){for(var r=0;r0&&(r+='"subLayers":'+e.toJSON()),r+=',"visible":true,',r+='"name":"'+this.getMapName(this.mapUrl)+'"',r+="}]",t.request({method:"PUT",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}},{key:"createTempLayerComplete",value:function(e){(e=ae.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}},{key:"getMapName",value:function(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var r=t.lastIndexOf("/");return t.substring(r+1,t.length)}},{key:"serviceProcessCompleted",value:function(e){null!=(e=ae.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}])&&_S(t.prototype,r),n&&_S(t,n),i}();function RS(e,t){for(var r=0;r0)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}}])&&Hw(t.prototype,r),n&&Hw(t,n),i}();function Qw(e,t){for(var r=0;r0)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)}},{key:"toServerJSONObject",value:function(){var e={};if((e=ae.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,n=0;n0&&(1===o.length?r+="'displayFilter':\""+o[0]+'",':r+="'displayFilter':\""+o[a]+'",'),(i=e.displayOrderBy)&&i.length>0&&(1===i.length?r+="'displayOrderBy':'"+i[0]+"',":r+="'displayOrderBy':'"+i[a]+"',"),(t=e.fieldValuesDisplayFilter)&&(r+="'fieldValuesDisplayFilter':"+ae.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[a]&&(r+="'joinItems':["+ae.toJSON(e.joinItems[a])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[a]?a:e.datasetNames.length-1,u=e.dataSourceNames[a]?a:e.dataSourceNames.length-1;r+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[u]+"'}},"}else r+="},"}e.themes&&e.themes.length>0&&(r=r.substring(0,r.length-1)),r+="]},";var c=this.url.split("/");return r+="'name': '"+c[c.length-2]+"'}]"}}])&&fO(t.prototype,r),n&&fO(t,n),i}();function bO(e){"@babel/helpers - typeof";return(bO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gO(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:{};return t=this.createCredentialUrl(t),n.crossOrigin=this.options.crossOrigin,n.headers=this.options.headers,Jr.commit(e,t,r,n).then(function(e){return e.json()})}},{key:"createCredentialUrl",value:function(e){var t=e,r=this.getCredential();if(r){var n="key="+r,o=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===o?t+=n:t.indexOf("?")>-1&&"?"!==o?t+="&"+n:t+="?"+n}return t}},{key:"getCredential",value:function(){}}])&&Fx(t.prototype,r),n&&Fx(t,n),e}();function Bx(e){"@babel/helpers - typeof";return(Bx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ux(e,t){for(var r=0;rt.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),r})}},{key:"_distance",value:function(e,t,r,n){return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n))}},{key:"_getMeterPerMapUnit",value:function(e){var t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}])&&nP(t.prototype,r),n&&nP(t,n),e}();function iP(e){"@babel/helpers - typeof";return(iP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aP(e,t){for(var r=0;ri&&(i=e+s+100,n.width=i,r=!0),t+l>a&&(a=t+l+100,n.height=a,r=!0),e<-s&&(i+=s=100*Math.ceil(-e/100),n.width=i,r=!0),t<-l&&(a+=l=100*Math.ceil(-t/100),n.height=a,r=!0),r&&o.translate(s,l)}},{key:"getPixelOffset",value:function(){return{x:this._offsetX,y:this._offsetY}}},{key:"indexOf",value:function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r1)for(var o=0,i=n-1;o1?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 r=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=r[0],e[2]=r[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(",")+")"}}},{key:"toArray",value:function(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],r=0;return e.replace(/[\d.]+/g,function(e){r<3?e|=0:e=+e,t[r++]=e}),t}},{key:"convert",value:function(e,t){if(!this.isCalculableColor(e))return e;var r=this.getData(e),n=r[3];return void 0===n&&(n=1),e.indexOf("hsb")>-1?r=this._HSV_2_RGB(r):e.indexOf("hsl")>-1&&(r=this._HSL_2_RGB(r)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?r=this._RGB_2_HSB(r):t.indexOf("hsl")>-1&&(r=this._RGB_2_HSL(r)),r[3]=n,this.toColor(r,t)}},{key:"toRGBA",value:function(e){return this.convert(e,"rgba")}},{key:"toRGB",value:function(e){return this.convert(e,"rgb")}},{key:"toHex",value:function(e){return this.convert(e,"hex")}},{key:"toHSVA",value:function(e){return this.convert(e,"hsva")}},{key:"toHSV",value:function(e){return this.convert(e,"hsv")}},{key:"toHSBA",value:function(e){return this.convert(e,"hsba")}},{key:"toHSB",value:function(e){return this.convert(e,"hsb")}},{key:"toHSLA",value:function(e){return this.convert(e,"hsla")}},{key:"toHSL",value:function(e){return this.convert(e,"hsl")}},{key:"toName",value:function(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}},{key:"trim",value:function(e){return String(e).replace(/\s+/g,"")}},{key:"normalize",value:function(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,r=(240&e)<<4,n=15&e;e="#"+((1<<24)+(t<<4)+t+(r<<4)+r+(n<<4)+n).toString(16).slice(1)}return e}},{key:"lift",value:function(e,t){if(!this.isCalculableColor(e))return e;var r=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var n=this.getData(e),o=0;o<3;o++)n[o]=1===r?n[o]*(1-t)|0:(255-n[o])*t+n[o]|0;return"rgb("+n.join(",")+")"}},{key:"reverse",value:function(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")}},{key:"mix",value:function(e,t,r){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===r&&(r=.5);for(var n=2*(r=1-this.adjust(r,[0,1]))-1,o=this.getData(this.toRGBA(e)),i=this.getData(this.toRGBA(t)),a=o[3]-i[3],s=((n*a==-1?n:(n+a)/(1+n*a))+1)/2,l=1-s,u=[],c=0;c<3;c++)u[c]=o[c]*s+i[c]*l;var f=o[3]*r+i[3]*(1-r);return f=Math.max(0,Math.min(1,f)),1===o[3]&&1===i[3]?this.toColor(u,"rgb"):(u[3]=f,this.toColor(u,"rgba"))}},{key:"random",value:function(){return"#"+Math.random().toString(16).slice(2,8)}},{key:"getData",value:function(t){var r,n,o=(t=this.normalize(t)).match(this.colorRegExp);if(null===o)throw new Error("The color format error");var i,a=[];if(o[2])i=[(r=o[2].replace("#","").split(""))[0]+r[1],r[2]+r[3],r[4]+r[5]],a=this.map(i,function(t){return e.prototype.adjust.call(this,parseInt(t,16),[0,255])});else if(o[4]){var s=o[4].split(",");n=s[3],i=s.slice(0,3),a=this.map(i,function(t){return t=Math.floor(t.indexOf("%")>0?2.55*parseInt(t,0):t),e.prototype.adjust.call(this,t,[0,255])}),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]))}else if(o[5]||o[6]){var l=(o[5]||o[6]).split(","),u=parseInt(l[0],0)/360,c=l[1],f=l[2];n=l[3],(a=this.map([c,f],function(t){return e.prototype.adjust.call(this,parseFloat(t)/100,[0,1])})).unshift(u),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]))}return a}},{key:"alpha",value:function(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var r=this.getData(this.toRGBA(e));return r[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(r,"rgba")}},{key:"map",value:function(e,t){if("function"!=typeof t)throw new TypeError;for(var r=e?e.length:0,n=0;n=t[1]&&(e=t[1]),e}},{key:"isCalculableColor",value:function(e){return e instanceof Array||"string"==typeof e}},{key:"_HSV_2_RGB",value:function(e){var t,r,n,o=e[0],i=e[1],a=e[2];if(0===i)t=255*a,r=255*a,n=255*a;else{var s=6*o;6===s&&(s=0);var l=0|s,u=a*(1-i),c=a*(1-i*(s-l)),f=a*(1-i*(1-(s-l))),h=0,p=0,y=0;0===l?(h=a,p=f,y=u):1===l?(h=c,p=a,y=u):2===l?(h=u,p=a,y=f):3===l?(h=u,p=c,y=a):4===l?(h=f,p=u,y=a):(h=a,p=u,y=c),t=255*h,r=255*p,n=255*y}return[t,r,n]}},{key:"_HSL_2_RGB",value:function(e){var t,r,n,o=e[0],i=e[1],a=e[2];if(0===i)t=255*a,r=255*a,n=255*a;else{var s,l=2*a-(s=a<.5?a*(1+i):a+i-i*a);t=255*this._HUE_2_RGB(l,s,o+1/3),r=255*this._HUE_2_RGB(l,s,o),n=255*this._HUE_2_RGB(l,s,o-1/3)}return[t,r,n]}},{key:"_HUE_2_RGB",value:function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?e+6*(t-e)*r:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}},{key:"_RGB_2_HSB",value:function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),l=s-a,u=s;if(0===l)t=0,r=0;else{r=l/s;var c=((s-n)/6+l/2)/l,f=((s-o)/6+l/2)/l,h=((s-i)/6+l/2)/l;n===s?t=h-f:o===s?t=1/3+c-h:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,u*=100]}},{key:"_RGB_2_HSL",value:function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),l=s-a,u=(s+a)/2;if(0===l)t=0,r=0;else{r=u<.5?l/(s+a):l/(2-s-a);var c=((s-n)/6+l/2)/l,f=((s-o)/6+l/2)/l,h=((s-i)/6+l/2)/l;n===s?t=h-f:o===s?t=1/3+c-h:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,u*=100]}}])&&lP(t.prototype,r),n&&lP(t,n),e}();function cP(e,t){for(var r=0;r=t)if("RANGE"===r)for(o=0;o=0&&this.getSqrtInterval(e,r):"logarithm"===t?this.getMin(e)>0&&this.getGeometricProgression(e,r):void 0}},{key:"getSum",value:function(e){return this.getInstance(e).sum()}},{key:"getMax",value:function(e){return this.getInstance(e).max()}},{key:"getMin",value:function(e){return this.getInstance(e).min()}},{key:"getMean",value:function(e){return this.getInstance(e).mean()}},{key:"getMedian",value:function(e){return this.getInstance(e).median()}},{key:"getTimes",value:function(e){return e.length}},{key:"getEqInterval",value:function(e,t){return this.getInstance(e).getClassEqInterval(t)}},{key:"getJenks",value:function(e,t){return this.getInstance(e).getClassJenks(t)}},{key:"getSqrtInterval",value:function(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}},{key:"getGeometricProgression",value:function(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}],(r=null)&&pP(t.prototype,r),n&&pP(t,n),e}();u.ArrayStatistic=yP; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var dP=r(820),vP=r.n(dP);function mP(e){"@babel/helpers - typeof";return(mP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gP(e,t){for(var r=0;rl&&(s[n]=s[n].slice(r-l),l=r)}function d(e){var o,i,a,u;if(e instanceof Function)return e.call(c.parsers);if("string"==typeof e)o=t.charAt(r)===e?e:null,i=1,y();else{if(y(),!(o=e.exec(s[n])))return null;i=o[0].length}if(o){var f=r+=i;for(u=r+s[n].length-i;r=0&&"\n"!==n.charAt(s);s--)r.column++;return new Error([r.filename,r.line,r.column,r.message].join(";"))}return this.env=e=e||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},c={parse:function(o){var i,c=null;if(r=n=l=a=0,s=[],t=o.replace(/\r\n/g,"\n"),e.filename&&(f.env.inputs[e.filename]=t),s=function(e){for(var r,n,o,i,a=0,s=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,u=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,f=0,h=e[0],p=0;p0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),c)throw v(c);var h=function(e,t){var r=e.specificity,n=t.specificity;return r[0]!=n[0]?n[0]-r[0]:r[1]!=n[1]?n[1]-r[1]:r[2]!=n[2]?n[2]-r[2]:n[3]-r[3]};return(i=new u.CartoCSS.Tree.Ruleset([],d(this.parsers.primary))).root=!0,i.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+v(t).message:e.errors.message=v(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(h),t},i},parsers:{primary:function(){for(var e,t=[];(e=d(this.rule)||d(this.ruleset)||d(this.comment))||d(/^[\s\n]+/)||(e=d(this.invalid));)e&&t.push(e);return t},invalid:function(){var e=d(/^[^;\n]*[;\n]/);if(e)return new u.CartoCSS.Tree.Invalid(e,i)},comment:function(){var e;if("/"===t.charAt(r))return"/"===t.charAt(r+1)?new u.CartoCSS.Tree.Comment(d(/^\/\/.*/),!0):(e=d(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new u.CartoCSS.Tree.Comment(e):void 0},entities:{quoted:function(){if('"'===t.charAt(r)||"'"===t.charAt(r)){var e=d(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return e?new u.CartoCSS.Tree.Quoted(e[1]||e[2]):void 0}},field:function(){if(d("[")){var e=d(/(^[^\]]+)/);if(d("]"))return e?new u.CartoCSS.Tree.Field(e[1]):void 0}},comparison:function(){var e=d(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var e=d(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(e)return new u.CartoCSS.Tree.Keyword(e)},call:function(){var e,t;if(e=/^([\w\-]+|%)\(/.exec(s[n])){if("url"===(e=e[1]))return null;r+=e.length;if(d("("),t=d(this.entities.arguments),d(")"))return e?new u.CartoCSS.Tree.Call(e,t,r):void 0}},arguments:function(){for(var e,t=[];e=d(this.expression);){t.push(e);if(!d(","))break}return t},literal:function(){return d(this.entities.dimension)||d(this.entities.keywordcolor)||d(this.entities.hexcolor)||d(this.entities.quoted)},url:function(){var e;if("u"===t.charAt(r)&&d(/^url\(/)){e=d(this.entities.quoted)||d(this.entities.variable)||d(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return d(")")?new u.CartoCSS.Tree.URL(void 0!==e.value||e instanceof u.CartoCSS.Tree.Variable?e:new u.CartoCSS.Tree.Quoted(e)):new u.CartoCSS.Tree.Invalid(e,i,"Missing closing ) in URL.")}},variable:function(){var n,o=r;if("@"===t.charAt(r)&&(n=d(/^@[\w-]+/)))return new u.CartoCSS.Tree.Variable(n,o,e.filename)},hexcolor:function(){var e;if("#"===t.charAt(r)&&(e=d(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new u.CartoCSS.Tree.Color(e[1])},keywordcolor:function(){var e=s[n].match(/^[a-z]+/);if(e&&e[0]in u.CartoCSS.Tree.Reference.data.colors)return new u.CartoCSS.Tree.Color(u.CartoCSS.Tree.Reference.data.colors[d(/^[a-z]+/)])},dimension:function(){var e=t.charCodeAt(r);if(!(e>57||e<45||47===e)){var n=d(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return n?new u.CartoCSS.Tree.Dimension(n[1],n[2],i):void 0}}},variable:function(){var e;if("@"===t.charAt(r)&&(e=d(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=d(this.entities.call)||d(this.entities.literal),t=d(this.entities.field)||d(this.entities.variable),r=d(this.entities.url)||d(this.entities.keyword);return e||t||r},end:function(){var e;return d(";")||("string"==typeof(e="}")?t.charAt(r)===e:!!e.test(s[n]))},element:function(){var e=d(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(e)return new u.CartoCSS.Tree.Element(e)},attachment:function(){var e=d(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var e,n,o,a,s,l=[],c=new u.CartoCSS.Tree.Filterset,f=[],h=0,p=0;(o=d(this.element))||(s=d(this.zoom))||(a=d(this.filter))||(e=d(this.attachment));){if(h++,o)l.push(o);else if(s)f.push(s),p++;else if(a){var y=c.add(a);if(y)throw v({message:y,index:r-1});p++}else{if(n)throw v({message:"Encountered second attachment name.",index:r-1});n=e}var m=t.charAt(r);if("{"===m||"}"===m||";"===m||","===m)break}if(h)return new u.CartoCSS.Tree.Selector(c,f,l,n,p,i)},filter:function(){h();var t,r,n;if(d("[")&&(t=d(/^[a-zA-Z0-9\-_]+/)||d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.keyword)||d(this.entities.field))&&(t instanceof u.CartoCSS.Tree.Quoted&&(t=new u.CartoCSS.Tree.Field(t.toString())),(r=d(this.entities.comparison))&&(n=d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.dimension)||d(this.entities.keyword)||d(this.entities.field)))){if(!d("]"))throw v({message:"Missing closing ] of filter.",index:i-1});return t.is||(t=new u.CartoCSS.Tree.Field(t)),new u.CartoCSS.Tree.Filter(t,r,n,i,e.filename)}},zoom:function(){h();var e,t;if(d(/^\[\s*zoom/g)&&(e=d(this.entities.comparison))&&(t=d(this.entities.variable)||d(this.entities.dimension))&&d("]"))return new u.CartoCSS.Tree.Zoom(e,t,i);p()},block:function(){var e;if(d("{")&&(e=d(this.primary))&&d("}"))return e},ruleset:function(){var e,t,r=[];for(h();e=d(this.selector);){for(r.push(e);d(this.comment););if(!d(","))break;for(;d(this.comment););}if(e)for(;d(this.comment););if(r.length>0&&(t=d(this.block))){if(1===r.length&&r[0].elements.length&&"Map"===r[0].elements[0].value){var n=new u.CartoCSS.Tree.Ruleset(r,t);return n.isMap=!0,n}return new u.CartoCSS.Tree.Ruleset(r,t)}p()},rule:function(){var n,o,s=t.charAt(r);if(h(),"."!==s&&"#"!==s&&(n=d(this.variable)||d(this.property))){if((o=d(this.value))&&d(this.end))return new u.CartoCSS.Tree.Rule(n,o,i,e.filename);a=r,p()}},font:function(){for(var e,t=[],r=[];e=d(this.entity);)r.push(e);if(t.push(new u.CartoCSS.Tree.Expression(r)),d(","))for(;(e=d(this.expression))&&(t.push(e),d(",")););return new u.CartoCSS.Tree.Value(t)},value:function(){for(var e,t=[];(e=d(this.expression))&&(t.push(e),d(",")););return t.length>1?new u.CartoCSS.Tree.Value(t.map(function(e){return e.value[0]})):1===t.length?new u.CartoCSS.Tree.Value(t):void 0},sub:function(){var e;if(d("(")&&(e=d(this.expression))&&d(")"))return e},multiplication:function(){var e,t,r,n;if(e=d(this.operand)){for(;(r=d("/")||d("*")||d("%"))&&(t=d(this.operand));)n=new u.CartoCSS.Tree.Operation(r,[n||e,t],i);return n||e}},addition:function(){var e,n,o,a;if(e=d(this.multiplication)){for(;(o=d(/^[-+]\s+/)||" "!=t.charAt(r-1)&&(d("+")||d("-")))&&(n=d(this.multiplication));)a=new u.CartoCSS.Tree.Operation(o,[a||e,n],i);return a||e}},operand:function(){return d(this.sub)||d(this.entity)},expression:function(){for(var e,t=[];e=d(this.addition)||d(this.entity);)t.push(e);if(t.length>0)return new u.CartoCSS.Tree.Expression(t)},property:function(){var e=d(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}},{key:"parse",value:function(e){var t=this.parser;return this.ruleSet=t.parse(e)}},{key:"toShaders",value:function(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var r={},n=[];this._toShaders(r,n,t);for(var o=[],i={},a=0,s=t.length;a=0){if(!t.featureFilter){var i=o+n.length,a=r.indexOf(")",i+1),s="featureId&&(featureId"+r.substring(i,a)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!s}})}return{property:p,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+r+";} return _value; ")}}return{property:p,getValue:Function("attributes","zoom","var _value = null;"+r+"; return _value; ")}}(c[p],f);Object.defineProperty(f,"attachment",{configurable:!0,enumerable:!1,value:u}),Object.defineProperty(f,"elements",{configurable:!0,enumerable:!1,value:l.elements}),o.push(f),i[n[a]]=!0}Object.defineProperty(f,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return o}}return null}},{key:"_toShaders",value:function(e,t,r){for(var n=0,o=r.length;n= 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"]}},wP.mapnik_reference={version:{latest:u._mapnik_reference_latest,"2.1.1":u._mapnik_reference_latest}},u.CartoCSS=wP,u.CartoCSS.Tree={},u.CartoCSS.Tree.operate=function(e,t,r){switch(e){case"+":return t+r;case"-":return t-r;case"*":return t*r;case"%":return t%r;case"/":return t/r}},u.CartoCSS.Tree.functions={rgb:function(e,t,r){return this.rgba(e,t,r,1)},rgba:function(e,t,r,n){var o=this,i=[e,t,r].map(function(e){return o.number(e)});return n=o.number(n),i.some(isNaN)||isNaN(n)?null:new u.CartoCSS.Tree.Color(i,n)},stop:function(e){var t,r;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(r=arguments[2]),{is:"tag",val:e,color:t,mode:r,toString:function(n){return'\n\t"}}},hsl:function(e,t,r){return this.hsla(e,t,r,1)},hsla:function(e,t,r,n){if([e=this.number(e)%360/360,t=this.number(t),r=this.number(r),n=this.number(n)].some(isNaN))return null;var o=r<=.5?r*(t+1):r+t-r*t,i=2*r-o;return this.rgba(255*a(e+1/3),255*a(e),255*a(e-1/3),n);function a(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?i+(o-i)*e*6:2*e<1?o:3*e<2?i+(o-i)*(2/3-e)*6:i}},hue:function(e){return"toHSL"in e?new u.CartoCSS.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new u.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new u.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new u.CartoCSS.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s+=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},desaturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s-=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},lighten:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l+=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},darken:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l-=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},fadein:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a+=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},fadeout:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a-=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},spin:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL(),n=(r.h+t.value)%360;return r.h=n<0?360+n:n,this.hsla_simple(r)},replace:function(e,t,r){return"field"===e.is?e.toString+".replace("+t.toString()+", "+r.toString()+")":e.replace(t,r)},mix:function(e,t,r){var n=r.value/100,o=2*n-1,i=e.toHSL().a-t.toHSL().a,a=((o*i==-1?o:(o+i)/(1+o*i))+1)/2,s=1-a,l=[e.rgb[0]*a+t.rgb[0]*s,e.rgb[1]*a+t.rgb[1]*s,e.rgb[2]*a+t.rgb[2]*s],c=e.alpha*n+t.alpha*(1-n);return new u.CartoCSS.Tree.Color(l,c)},greyscale:function(e){return this.desaturate(e,new u.CartoCSS.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),r=e.value,n=0;n.5?u/(2-a-s):u/(a+s),a){case r:e=(n-o)/u+(n=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}},{key:"toColor",value:function(){return new u.CartoCSS.Tree.Color([this.value,this.value,this.value])}},{key:"round",value:function(){return this.value=Math.round(this.value),this}},{key:"toString",value:function(){return this.value.toString()}},{key:"operate",value:function(e,t,r){return"%"===this.unit&&"%"!==r.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===r.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 u.CartoCSS.Tree.Dimension(u.CartoCSS.Tree.operate(t,this.value,this.value*r.value*.01),this.unit):new u.CartoCSS.Tree.Dimension(u.CartoCSS.Tree.operate(t,this.value,r.value),this.unit||r.unit)}}]),e}(),u.CartoCSS.Tree.Element=function(){function e(t){bP(this,e),this.value=t.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")}return SP(e,[{key:"specificity",value:function(){return["id"===this.type?1:0,"class"===this.type?1:0]}},{key:"toString",value:function(){return this.value}}]),e}(),u.CartoCSS.Tree.Expression=function(){function e(t){bP(this,e),this.is="expression",this.value=t}return SP(e,[{key:"ev",value:function(e){return this.value.length>1?new u.CartoCSS.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}},{key:"toString",value:function(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}}]),e}(),u.CartoCSS.Tree.Field=function(){function e(t){bP(this,e),this.is="field",this.value=t||""}return SP(e,[{key:"toString",value:function(){return'["'+this.value.toUpperCase()+'"]'}},{key:"ev",value:function(){return this}}]),e}(),u.CartoCSS.Tree.Filter=function(){function e(t,r,n,o,i){bP(this,e),this.ops={"<":[" < ","numeric"],">":[" > ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" <= ","numeric"],">=":[" >= ","numeric"],"=~":[".match(","string",")"]},this.key=t,this.op=r,this.val=n,this.index=o,this.filename=i,this.id=this.key+this.op+this.val}return SP(e,[{key:"ev",value:function(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}},{key:"toString",value:function(){return"["+this.id+"]"}}]),e}(),u.CartoCSS.Tree.Filterset=function(){function e(){bP(this,e),this.filters={}}return SP(e,[{key:"toJS",value:function(e){function t(e){var t=e.op;"="===t&&(t="==");var r=e.val;void 0!==e._val&&(r=e._val.toString(!0)),e.key&&"scale"===e.key.value?r=+r:"string"!=typeof r&&"object"!==mP(r)||(r="'"+r+"'");var n="attributes";return n+"&&"+n+e.key+"&&"+n+e.key+" "+t+r}var r=[];for(var n in this.filters)r.push(t(this.filters[n]));return r.join(" && ")}},{key:"toString",value:function(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}},{key:"ev",value:function(e){for(var t in this.filters)this.filters[t].ev(e);return this}},{key:"clone",value:function(){var e=new u.CartoCSS.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}},{key:"cloneWith",value:function(e){var t=[];for(var r in e.filters){var n=this.addable(e.filters[r]);if(!1===n)return!1;!0===n&&t.push(e.filters[r])}if(!t.length)return null;var o=new u.CartoCSS.Tree.Filterset;for(r in this.filters)o.filters[r]=this.filters[r];for(;r=t.shift();)o.add(r);return o}},{key:"addable",value:function(e){var t=e.key.toString(),r=e.val.toString();switch(r.match(/^[0-9]+(\.[0-9]*)?_match/)&&(r=parseFloat(r)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==r&&null:void 0===this.filters[t+"!="+r]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val"]&&this.filters[t+">"].val>=r?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val":return t+"="in this.filters?!(this.filters[t+"="].val<=r)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=r)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].valr)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)||null))}}},{key:"conflict",value:function(e){var t=e.key.toString(),r=e.val.toString();return isNaN(parseFloat(r))||(r=parseFloat(r)),("="===e.op&&void 0!==this.filters[t+"="]&&r!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&r==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&r===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}},{key:"add",value:function(e,t){var r,n=e.key.toString(),o=e.op,i=this.conflict(e);if(i)return i;if("="===o){for(var a in this.filters)this.filters[a].key===n&&delete this.filters[a];this.filters[n+"="]=e}else if("!="===o)this.filters[n+"!="+e.val]=e;else if("=~"===o)this.filters[n+"=~"+e.val]=e;else if(">"===o){for(var s in this.filters)this.filters[s].key===n&&this.filters[s].val<=e.val&&delete this.filters[s];this.filters[n+">"]=e}else if(">="===o){for(var l in this.filters)r=+this.filters[l].val.toString(),this.filters[l].key===n&&r",this.filters[n+">"]=e):this.filters[n+">="]=e}else if("<"===o){for(var u in this.filters)r=+this.filters[u].val.toString(),this.filters[u].key===n&&r>=e.val&&delete this.filters[u];this.filters[n+"<"]=e}else if("<="===o){for(var c in this.filters)r=+this.filters[c].val.toString(),this.filters[c].key===n&&r>e.val&&delete this.filters[c];void 0!==this.filters[n+"!="+e.val]?(delete this.filters[n+"!="+e.val],e.op="<",this.filters[n+"<"]=e):this.filters[n+"<="]=e}}}]),e}(),u.CartoCSS.Tree.Fontset=function e(t,r){bP(this,e),this.fonts=r,this.name="fontset-"+t.effects.length},u.CartoCSS.Tree.Invalid=function(){function e(t,r,n){bP(this,e),this.is="invalid",this.chunk=t,this.index=r,this.type="syntax",this.message=n||"Invalid code: "+this.chunk}return SP(e,[{key:"ev",value:function(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}}]),e}(),u.CartoCSS.Tree.Keyword=function(){function e(t){bP(this,e),this.value=t;var r={transparent:"color",true:"boolean",false:"boolean"};this.is=r[t]?r[t]:"keyword"}return SP(e,[{key:"ev",value:function(){return this}}]),SP(e,[{key:"toString",value:function(){return this.value}}]),e}(),u.CartoCSS.Tree.Literal=function(){function e(t){bP(this,e),this.value=t||"",this.is="field"}return SP(e,[{key:"toString",value:function(){return this.value}},{key:"ev",value:function(){return this}}]),e}(),u.CartoCSS.Tree.Operation=function(){function e(t,r,n){bP(this,e),this.is="operation",this.op=t.trim(),this.operands=r,this.index=n}return SP(e,[{key:"ev",value:function(e){var t,r=this.operands[0].ev(e),n=this.operands[1].ev(e);return"undefined"===r.is||"undefined"===n.is?{is:"undefined",value:"undefined"}:(r instanceof u.CartoCSS.Tree.Dimension&&n instanceof u.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(t=n,n=r,r=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),r instanceof u.CartoCSS.Tree.Quoted&&n instanceof u.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"}):r instanceof u.CartoCSS.Tree.Field||n instanceof u.CartoCSS.Tree.Field||r instanceof u.CartoCSS.Tree.Literal||n instanceof u.CartoCSS.Tree.Literal?"color"===r.is||"color"===n.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 u.CartoCSS.Tree.Literal(r.ev(e).toString(!0)+this.op+n.ev(e).toString(!0)):void 0===r.operate?(e.error({message:"Cannot do math with type "+r.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r.operate(e,this.op,n))}}]),e}(),u.CartoCSS.Tree.Quoted=function(){function e(t){bP(this,e),this.is="string",this.value=t||""}return SP(e,[{key:"toString",value:function(e){var t=this.value.replace(/&/g,"&"),r=t.replace(/\'/g,"\\'").replace(/\"/g,""").replace(//g,">");return!0===e?"'"+r+"'":t}},{key:"ev",value:function(){return this}},{key:"operate",value:function(e,t,r){return new u.CartoCSS.Tree.Quoted(u.CartoCSS.Tree.operate(t,this.toString(),r.toString(this.contains_field)))}}]),e}(),u.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 r in e.symbolizers)for(var n in e.symbolizers[r])e.symbolizers[r][n].hasOwnProperty("css")&&(t[e.symbolizers[r][n].css]=[e.symbolizers[r][n],r,n]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var r in e.symbolizers)for(var n in e.symbolizers[r])if("functions"===e.symbolizers[r][n].type)for(var o=0;o1?Array.prototype.push.apply(r,n.find(new u.CartoCSS.Tree.Selector(null,null,e.elements.slice(1)),t)):r.push(n);break}}),this._lookups[n]=r)}},{key:"evZooms",value:function(e){for(var t=0;tu.CartoCSS.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+u.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}},{key:"toString",value:function(){for(var e="",t=0;t<=u.CartoCSS.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<3&&(t=Array.prototype.slice.call(t,1));for(var n=this._handlers[e],o=n.length,i=0;i4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var n=t[t.length-1],o=this._handlers[e],i=o.length,a=0;a-this.EPSILON&&ethis.EPSILON||e<-this.EPSILON}},{key:"cubicAt",value:function(e,t,r,n,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*n+3*i*r)}},{key:"cubicDerivativeAt",value:function(e,t,r,n,o){var i=1-o;return 3*(((t-e)*i+2*(r-t)*o)*i+(n-r)*o*o)}},{key:"cubicRootAt",value:function(e,t,r,n,o,i){var a=n+3*(t-r)-e,s=3*(r-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,f=s*l-9*a*u,h=l*l-3*s*u,p=0;if(this.isAroundZero(c)&&this.isAroundZero(f))if(this.isAroundZero(s))i[0]=0;else{var y=-l/s;y>=0&&y<=1&&(i[p++]=y)}else{var d=f*f-4*c*h;if(this.isAroundZero(d)){var v=f/c,m=-s/a+v,b=-v/2;m>=0&&m<=1&&(i[p++]=m),b>=0&&b<=1&&(i[p++]=b)}else if(d>0){var g=Math.sqrt(d),S=c*s+1.5*a*(-f+g),w=c*s+1.5*a*(-f-g),O=(-s-((S=S<0?-Math.pow(-S,this.ONE_THIRD):Math.pow(S,this.ONE_THIRD))+(w=w<0?-Math.pow(-w,this.ONE_THIRD):Math.pow(w,this.ONE_THIRD))))/(3*a);O>=0&&O<=1&&(i[p++]=O)}else{var _=(2*c*s-3*a*f)/(2*Math.sqrt(c*c*c)),x=Math.acos(_)/3,P=Math.sqrt(c),C=Math.cos(x),T=(-s-2*P*C)/(3*a),E=(-s+P*(C+this.THREE_SQRT*Math.sin(x)))/(3*a),k=(-s+P*(C-this.THREE_SQRT*Math.sin(x)))/(3*a);T>=0&&T<=1&&(i[p++]=T),E>=0&&E<=1&&(i[p++]=E),k>=0&&k<=1&&(i[p++]=k)}}return p}},{key:"cubicExtrema",value:function(e,t,r,n,o){var i=6*r-12*t+6*e,a=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(i)){var u=-s/i;u>=0&&u<=1&&(o[l++]=u)}}else{var c=i*i-4*a*s;if(this.isAroundZero(c))o[0]=-i/(2*a);else if(c>0){var f=Math.sqrt(c),h=(-i+f)/(2*a),p=(-i-f)/(2*a);h>=0&&h<=1&&(o[l++]=h),p>=0&&p<=1&&(o[l++]=p)}}return l}},{key:"cubicSubdivide",value:function(e,t,r,n,o,i){var a=(t-e)*o+e,s=(r-t)*o+t,l=(n-r)*o+r,u=(s-a)*o+a,c=(l-s)*o+s,f=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=n}},{key:"cubicProjectPoint",value:function(e,t,r,n,o,i,a,s,l,u,c){var f,h=this.vector.create(),p=this.vector.create(),y=this.vector.create(),d=.005,v=1/0;h[0]=l,h[1]=u;for(var m=0;m<1;m+=.05){p[0]=this.cubicAt(e,r,o,a,m),p[1]=this.cubicAt(t,n,i,s,m);var b=this.vector.distSquare(h,p);b=0&&O=0&&u<=1&&(o[l++]=u)}}else{var c=a*a-4*i*s;if(this.isAroundZero(c)){var f=-a/(2*i);f>=0&&f<=1&&(o[l++]=f)}else if(c>0){var h=Math.sqrt(c),p=(-a+h)/(2*i),y=(-a-h)/(2*i);p>=0&&p<=1&&(o[l++]=p),y>=0&&y<=1&&(o[l++]=y)}}return l}},{key:"quadraticExtremum",value:function(e,t,r){var n=e+r-2*t;return 0===n?.5:(e-t)/n}},{key:"quadraticProjectPoint",value:function(e,t,r,n,o,i,a,s,l){var u,c=this.vector.create(),f=this.vector.create(),h=this.vector.create(),p=.005,y=1/0;c[0]=a,c[1]=s;for(var d=0;d<1;d+=.05){f[0]=this.quadraticAt(e,r,o,d),f[1]=this.quadraticAt(t,n,i,d);var v=this.vector.distSquare(c,f);v=0&&S0){for(var b=this.isInsidePolygon(t.pointList,v,m),g=e.holePolygonPointLists,S=!1,w=0,O=g.length;wt+s&&a>n+s||ae+s&&i>r+s||it+f&&c>n+f&&c>i+f&&c>s+f||ce+f&&u>r+f&&u>o+f&&u>a+f||ut+u&&l>n+u&&l>i+u||le+u&&s>r+u&&s>o+u||sr||f+c=u)return!0;if(i){var h=n;n=this.normalizeRadian(o),o=this.normalizeRadian(h)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=u);var p=Math.atan2(l,s);return p<0&&(p+=u),p>=n&&p<=o||p+u>=n&&p+u<=o}},{key:"isInsideBrokenLine",value:function(e,t,r,n){for(var o=Math.max(t,10),i=0,a=e.length-1;ir*r}},{key:"isInsideRect",value:function(e,t,r,n,o,i){return o>=e&&o<=e+r&&i>=t&&i<=t+n}},{key:"isInsideCircle",value:function(e,t,r,n,o){return(n-e)*(n-e)+(o-t)*(o-t)t&&i>n||io?nt&&u>n&&u>i&&u>s||u1&&this.swapExtrema(),y=c.cubicAt(t,n,i,s,h[0]),m>1&&(d=c.cubicAt(t,n,i,s,h[1]))),2==m?gt&&s>n&&s>i||s=0&&f<=1){for(var h=0,p=l.quadraticAt(t,n,i,f),y=0;ya||(u[y]a?0:ir||s<-r)return 0;var c=Math.sqrt(r*r-s*s);if(l[0]=-c,l[1]=c,Math.abs(n-o)>=u){n=0,o=u;var f=i?1:-1;return a>=l[0]+e&&a<=l[1]+e?f:0}if(i){var h=n;n=this.normalizeRadian(o),o=this.normalizeRadian(h)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=u);for(var p=0,y=0;y<2;y++){var d=l[y];if(d+e>a){var v=Math.atan2(s,d),m=i?1:-1;v<0&&(v=u+v),(v>=n&&v<=o||v+u>=n&&v+u<=o)&&(v>Math.PI/2&&v<1.5*Math.PI&&(m=-m),p+=m)}}return p}},{key:"isInsidePath",value:function(e,t,r,n,o){for(var i=0,a=0,s=0,l=0,u=0,c=!0,f=!0,h="stroke"===(r=r||"fill")||"both"===r,p="fill"===r||"both"===r,y=0;y0&&(p&&(i+=this.windingLine(a,s,l,u,n,o)),0!==i))return!0;l=v[v.length-2],u=v[v.length-1],c=!1,f&&"A"!==d.command&&(f=!1,a=l,s=u)}switch(d.command){case"M":a=v[0],s=v[1];break;case"L":if(h&&this.isInsideLine(a,s,v[0],v[1],t,n,o))return!0;p&&(i+=this.windingLine(a,s,v[0],v[1],n,o)),a=v[0],s=v[1];break;case"C":if(h&&this.isInsideCubicStroke(a,s,v[0],v[1],v[2],v[3],v[4],v[5],t,n,o))return!0;p&&(i+=this.windingCubic(a,s,v[0],v[1],v[2],v[3],v[4],v[5],n,o)),a=v[4],s=v[5];break;case"Q":if(h&&this.isInsideQuadraticStroke(a,s,v[0],v[1],v[2],v[3],t,n,o))return!0;p&&(i+=this.windingQuadratic(a,s,v[0],v[1],v[2],v[3],n,o)),a=v[2],s=v[3];break;case"A":var m=v[0],b=v[1],g=v[2],S=v[3],w=v[4],O=v[5],_=Math.cos(w)*g+m,x=Math.sin(w)*S+b;f?(f=!1,l=_,u=x):i+=this.windingLine(a,s,_,x);var P=(n-m)*S/g+m;if(h&&this.isInsideArcStroke(m,b,S,w,w+O,1-v[7],t,P,o))return!0;p&&(i+=this.windingArc(m,b,S,w,w+O,1-v[7],P,o)),a=Math.cos(w+O)*g+m,s=Math.sin(w+O)*S+b;break;case"z":if(h&&this.isInsideLine(a,s,l,u,t,n,o))return!0;c=!0}}return p&&(i+=this.windingLine(a,s,l,u,n,o)),0!==i}},{key:"getTextWidth",value:function(e,t){var r=e+":"+t;if(this._textWidthCache[r])return this._textWidthCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var n=0,o=0,i=(e=(e+"").split("\n")).length;othis.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),n}},{key:"getTextHeight",value:function(e,t){var r=e+":"+t;if(this._textHeightCache[r])return this._textHeightCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var n=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[r]=n,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),n}}])&&AC(t.prototype,r),n&&AC(t,n),e}();function LC(e,t){for(var r=0;ro&&(o=l[0]),l[1]a&&(a=l[1])}t[0]=n,t[1]=i,r[0]=o,r[1]=a}}},{key:"cubeBezier",value:function(e,t,r,n,o,i){var a=new MC,s=[];a.cubicExtrema(e[0],t[0],r[0],n[0],s);for(var l=0;lo&&!i?o+=2*Math.PI:nn&&(f[0]=Math.cos(p)*r+e,f[1]=Math.sin(p)*r+t,l.min(a,f,a),l.max(s,f,s))}}])&&LC(t.prototype,r),n&&LC(t,n),e}();function NC(e,t){for(var r=0;r=200&&o.status<300||304===o.status?t&&t(o.responseText):r&&r(),o.onreadystatechange=new Function,o=null)},o.send(null)}}])&&UC(t.prototype,r),n&&UC(t,n),e}(); /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var HC=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function JC(e,t){for(var r=0;r1)for(var t in arguments)console.log(arguments[t])}}var t,r,n;return t=e,(r=[{key:"destory",value:function(){return!0}}])&&JC(t.prototype,r),n&&JC(t,n),e}();function qC(e,t){for(var r=0;ra-2?a-1:p+1][0]+i[0],t[p>a-2?a-1:p+1][1]+i[1]],b=[t[p>a-3?a-1:p+2][0]+i[0],t[p>a-3?a-1:p+2][1]+i[1]]);var g=y*y,S=y*g;s.push([w(d[0],v[0],m[0],b[0],y,g,S),w(d[1],v[1],m[1],b[1],y,g,S)])}return s;function w(e,t,r,n,o,i,a){var s=.5*(r-e),l=.5*(n-t);return(2*(t-r)+s+l)*a+(-3*(t-r)-2*s-l)*i+s*o+t}}},{key:"SUtil_dashedLineTo",value:function(e,t,r,n,o,i,a){var s=[5,5];if(i="number"!=typeof i?5:i,e.setLineDash)return s[0]=i,s[1]=i,a&&a instanceof Array?e.setLineDash(a):e.setLineDash(s),e.moveTo(t,r),void e.lineTo(n,o);var l=n-t,u=o-r,c=Math.floor(Math.sqrt(l*l+u*u)/i);l/=c,u/=c;for(var f=!0,h=0;h-5e-5&&e<5e-5}KC.Util_vector.sub(t,e,this.position),n(t[0])&&n(t[1])||(KC.Util_vector.normalize(t,t),r[2]=t[0]*this.scale[1],r[3]=t[1]*this.scale[1],r[0]=t[1]*this.scale[0],r[1]=-t[0]*this.scale[0],r[4]=this.position[0],r[5]=this.position[1],this.decomposeTransform())})}var t,r,n;return t=e,(r=[{key:"destroy",value:function(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}},{key:"updateNeedTransform",value:function(){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)}},{key:"updateTransform",value:function(){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||KC.Util_matrix.create();if(KC.Util_matrix.identity(t),this.needLocalTransform){if(o(this.scale[0])||o(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;var r=o(e[0])||o(e[1]);r&&KC.Util_matrix.translate(t,t,e),KC.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],KC.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;var n=o(e[0])||o(e[1]);n&&KC.Util_matrix.translate(t,t,e),KC.Util_matrix.rotate(t,t,this.rotation[0]),n&&(e[0]=-e[0],e[1]=-e[1],KC.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&KC.Util_matrix.rotate(t,t,this.rotation);(o(this.position[0])||o(this.position[1]))&&KC.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?KC.Util_matrix.mul(this.transform,this.parent.transform,this.transform):KC.Util_matrix.copy(this.transform,this.parent.transform))}function o(e){return e>5e-5||e<-5e-5}}},{key:"setTransform",value:function(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}},{key:"decomposeTransform",value:function(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],r=this.position,n=this.scale,o=this.rotation;a(t-1)&&(t=Math.sqrt(t));var i=e[2]*e[2]+e[3]*e[3];a(i-1)&&(i=Math.sqrt(i)),r[0]=e[4],r[1]=e[5],n[0]=t,n[1]=i,n[2]=n[3]=0,o[0]=Math.atan2(-e[1]/i,e[0]/t),o[1]=o[2]=0}function a(e){return e>5e-5||e<-5e-5}}}])&&ZC(t.prototype,r),n&&ZC(t,n),e}();function eT(e){"@babel/helpers - typeof";return(eT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tT(e,t){for(var r=0;r0&&(this.setCtxGlobalAlpha(e,"stroke",r),e.stroke()),this.setCtxGlobalAlpha(e,"reset",r);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",r);break;default:this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)}this.drawText(e,r,this.style),this.afterBrush(e)}},{key:"beforeBrush",value:function(e,t){var r=this.style;return this.brushTypeOnly&&(r.brushType=this.brushTypeOnly),t&&(r=this.getHighlightStyle(r,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(r.strokeColor=r.strokeColor||r.color),e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r}},{key:"afterBrush",value:function(e){e.restore()}},{key:"setContext",value:function(e,t){for(var r=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],n=0,o=r.length;n=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height&&KC.Util_area.isInside(this,this.style,e,t)}},{key:"drawText",value:function(e,t,r){if(void 0!==t.text&&!1!==t.text){var n=t.textColor||t.color||t.strokeColor;e.fillStyle=n;var o,a,s,l,u=10,c=t.textPosition||this.textPosition||"top",f=[];switch(f=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],c){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var h=(r||t).__rect||this.getRect(r||t);switch(c){case"inside":s=h.x+h.width/2,l=h.y+h.height/2,o="center",a="middle","stroke"!=t.brushType&&n==t.color&&(e.fillStyle="#fff");break;case"left":s=h.x-u,l=h.y+h.height/2,o="end",a="middle";break;case"right":s=h.x+h.width+u,l=h.y+h.height/2,o="start",a="middle";break;case"top":s=h.x+h.width/2,l=h.y-u,o="center",a="bottom";break;case"bottom":s=h.x+h.width/2,l=h.y+h.height+u,o="center",a="top"}}break;case"start":case"end":var p=0,y=0,d=0,v=0;if(void 0!==t.pointList){var m=t.pointList;if(m.length<2)return;var b=m.length;switch(c){case"start":p=m[0][0]+f[0],y=m[1][0]+f[0],d=m[0][1]+f[1],v=m[1][1]+f[1];break;case"end":p=m[b-2][0]+f[0],y=m[b-1][0]+f[0],d=m[b-2][1]+f[1],v=m[b-1][1]+f[1]}}else p=t.xStart+f[0]||0,y=t.xEnd+f[0]||0,d=t.yStart+f[1]||0,v=t.yEnd+f[1]||0;switch(c){case"start":o=pn&&(n=l[0]),l[1]o&&(o=l[1]))}return e.__rect={x:t,y:r,width:n-t,height:o-r},e.__rect}},{key:"getRectNoRotation",value:function(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition,n=KC.Util_area.getTextHeight("ZH",e.textFont),o=KC.Util_area.getTextWidth(e.text,e.textFont),i=KC.Util_area.getTextHeight(e.text,e.textFont),a=e.x+r[0];"end"==e.textAlign||"right"==e.textAlign?a-=o:"center"==e.textAlign&&(a-=o/2),t="top"==e.textBaseline?e.y+r[1]:"bottom"==e.textBaseline?e.y+r[1]-i:e.y+r[1]-i/2;var s,l=!1;if(e.maxWidth){var u=parseInt(e.maxWidth);u-1&&(o+=!0===l?n/3*(o/s):n/3));return{x:a,y:t,width:o,height:i}}},{key:"getTextBackground",value:function(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var n=this.getRectNoRotation(e),o=e.x+r[0],i=e.y+r[1],a=[];if(e.textRotation&&0!==e.textRotation){var s=e.textRotation,l=this.getRotatedLocation(n.x,n.y,o,i,s),u=this.getRotatedLocation(n.x+n.width,n.y,o,i,s),c=this.getRotatedLocation(n.x+n.width,n.y+n.height,o,i,s),f=this.getRotatedLocation(n.x,n.y+n.height,o,i,s);a.push(l),a.push(u),a.push(c),a.push(f)}else{var h=[n.x,n.y],p=[n.x+n.width,n.y],y=[n.x+n.width,n.y+n.height],d=[n.x,n.y+n.height];a.push(h),a.push(p),a.push(y),a.push(d)}return e.__textBackground=a,e.__textBackground}},{key:"getRotatedLocation",value:function(e,t,r,n,o){var i,a,s=new Array;return t=-t,n=-n,o=-o,i=(e-r)*Math.cos(o/180*Math.PI)-(t-n)*Math.sin(o/180*Math.PI)+r,a=(e-r)*Math.sin(o/180*Math.PI)+(t-n)*Math.cos(o/180*Math.PI)+n,s[0]=i,s[1]=-a,s}}])&&vT(t.prototype,r),n&&vT(t,n),i}();function OT(e){"@babel/helpers - typeof";return(OT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _T(e,t){for(var r=0;r0&&("stroke"==r.brushType||"both"==r.brushType)&&(n||(e.beginPath(),this.buildPath(e,r)),this.setCtxGlobalAlpha(e,"stroke",r),e.stroke(),this.setCtxGlobalAlpha(e,"reset",r)),this.drawText(e,r,this.style);var o=ae.cloneObject(r);if(o.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var i=this.holePolygonPointLists,a=i.length,s=0;s0&&("stroke"==o.brushType||"both"==o.brushType)?(n||(e.beginPath(),this.buildPath(e,o)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",o),e.stroke(),this.setCtxGlobalAlpha(e,"reset",o)):e.globalCompositeOperation="source-over"}e.restore()}},{key:"buildPath",value:function(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 r=this.refOriginalPosition,n=t.pointList;if(!(n.length<2))if(t.smooth&&"spline"!==t.smooth){var o,i,a,s=KC.SUtil_smoothBezier(n,t.smooth,!0,t.smoothConstraint,r);e.moveTo(n[0][0]+r[0],n[0][1]+r[1]);for(var l=n.length,u=0;ui&&(i=l[u][0]+r[0]),l[u][1]+r[1]s&&(s=l[u][1]+r[1]);return n="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(o-n/2),y:Math.round(a-n/2),width:i-o+n,height:s-a+n},e.__rect}}])&&RT(t.prototype,r),n&&RT(t,n),i}();function NT(e){"@babel/helpers - typeof";return(NT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DT(e,t){for(var r=0;rc&&(r*=c/(a=r+n),n*=c/a),o+i>c&&(o*=c/(a=o+i),i*=c/a),n+o>f&&(n*=f/(a=n+o),o*=f/a),r+i>f&&(r*=f/(a=r+i),i*=f/a),e.moveTo(l+r,u),e.lineTo(l+c-n,u),0!==n&&e.quadraticCurveTo(l+c,u,l+c,u+n),e.lineTo(l+c,u+f-o),0!==o&&e.quadraticCurveTo(l+c,u+f,l+c-o,u+f),e.lineTo(l+i,u+f),0!==i&&e.quadraticCurveTo(l,u+f,l,u+f-i),e.lineTo(l,u+r),0!==r&&e.quadraticCurveTo(l,u,l+r,u)}},{key:"buildPath",value:function(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+r[0],t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1])),e.closePath()}},{key:"getRect",value:function(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=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+r[0]-t/2),y:Math.round(e.y+r[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}])&&KT(t.prototype,r),n&&KT(t,n),i}();function nE(e){"@babel/helpers - typeof";return(nE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oE(e,t){for(var r=0;r1?KC.Util_computeBoundingBox.arc(a,s,l,c,f,!h,r,o):(r[0]=o[0]=a,r[1]=o[1]=s),KC.Util_computeBoundingBox.arc(a,s,u,c,f,!h,n,i),KC.Util_vector.min(r,r,n),KC.Util_vector.max(o,o,i),e.__rect={x:r[0],y:r[1],width:o[0]-r[0],height:o[1]-r[1]},e.__rect}}])&&oE(t.prototype,r),n&&oE(t,n),i}();function cE(e,t){for(var r=0;r=15){var h=parseInt(i.axis3DParameter),p=[o[0]-h,o[1]+h];i.axisUseArrow?(c.push([p[0]+1.5,p[1]-7.5]),c.push([p[0]-1,p[1]+1]),c.push([p[0]+7.5,p[1]-1.5]),f.push([p[0],p[1]])):f.push([p[0],p[1]]),f.push([o[0],o[1]])}f.push([o[2]+5,o[1]])}else{var y=Math.abs(o[1]-o[3])/u,d=o[3];f.push([o[0],d-5]);for(var v=0;v=15){var b=parseInt(i.axis3DParameter),g=[o[0]-b,o[1]+b];i.axisUseArrow?(c.push([g[0]+1.5,g[1]-7.5]),c.push([g[0]-1,g[1]+1]),c.push([g[0]+7.5,g[1]-1.5]),f.push([g[0],g[1]])):f.push([g[0],g[1]]),f.push([o[0],o[1]])}f.push([o[2]+5,o[1]])}if(i.axisUseArrow){var S=[[o[2]+5,o[1]+4],[o[2]+13,o[1]],[o[2]+5,o[1]-4]],w=[[o[0]-4,o[3]-5],[o[0],o[3]-13],[o[0]+4,o[3]-5]],O=new JP(S);O.style={fillColor:"#008acd"},ae.copyAttributesWithClip(O.style,i.axisStyle),s.push(e.createShape(O));var _=new JP(w);if(_.style={fillColor:"#008acd"},ae.copyAttributesWithClip(_.style,i.axisStyle),s.push(e.createShape(_)),i.axis3DParameter&&!isNaN(i.axis3DParameter)&&i.axis3DParameter>=15){var x=new JP(c);x.style={fillColor:"#008acd"},ae.copyAttributesWithClip(x.style,i.axisStyle),s.push(e.createShape(x))}}var P=new DP(f);P.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},i.axisStyle&&ae.copyAttributesWithClip(P.style,i.axisStyle),P.clickable=!1,P.hoverable=!1;var C=[e.createShape(P)],T=[];if(i.axisYLabels&&i.axisYLabels.length&&i.axisYLabels.length>0){var E=i.axisYLabels,k=E.length,R=[0,0];if(i.axisYLabelsOffset&&i.axisYLabelsOffset.length&&(R=i.axisYLabelsOffset),1==k){var M=new fC(o[0]-5+R[0],o[3]+R[1],E[0]);M.style={labelAlign:"right"},i.axisYLabelsStyle&&ae.copyAttributesWithClip(M.style,i.axisYLabelsStyle),M.clickable=!1,M.hoverable=!1,T.push(e.createShape(M))}else for(var A=o[3],j=Math.abs(o[1]-o[3])/(k-1),L=0;L0){var D=i.axisXLabels,F=D.length,G=[0,0];if(i.axisXLabelsOffset&&i.axisXLabelsOffset.length&&(G=i.axisXLabelsOffset),n&&n.xPositions&&n.xPositions.length&&n.xPositions.length==F)for(var B=n.xPositions,U=0;U=0&&r[o]&&ae.copyAttributesWithClip(a,r[o]),n&&n.length&&void 0!==i)for(var s=n,l=s.length,u=parseFloat(i),c=0;c=u[2]||u[1]<=u[3])&&(this.DVBOrigonPoint=[u[0],u[3]],this.DVBWidth=Math.abs(u[2]-u[0]),this.DVBHeight=Math.abs(u[1]-u[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-a[0],this.DVBOrigonPoint[1]-a[1]],!0)}},{key:"resetLocation",value:function(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var r=this.width,n=this.height,o=this.location;return this.chartBounds=new ce(o[0]-r/2,o[1]+n/2,o[0]+r/2,o[1]-n/2),this.resetLinearGradient(),o}},{key:"resetLinearGradient",value:function(){}},{key:"shapesConvertToRelativeCoordinate",value:function(){for(var e=this.shapes,t=this.location,r=0,n=e.length;r=0?n.push(parseFloat(o[a].toString()).toFixed(r)):n.push(parseFloat(o[a].toString()))}catch(e){throw new Error("not a number")}return n.length===t.length&&n},u.Feature.Theme.Graph=SE;var TE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xE(e,t)}(i,SE);var t,r,n,o=PE(i);function i(e,t,r,n,a){var s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(s=o.call(this,e,t,r,n,a)).CLASS_NAME="SuperMap.Feature.Theme.Bar",s}return t=i,(r=[{key:"destroy",value:function(){_E(CE(i.prototype),"destroy",this).call(this)}},{key:"assembleShapes",value:function(){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 r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var n=this.dataViewBox,o=this.dataValues;if(!(o.length<1)){for(var i=0,a=o.length;ir[1])return;var s=this.calculateXShapeInfo();if(s){var l=s.xPositions,u=s.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(fE.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(fE.GraphAxis(this.shapeFactory,n,t,s)));for(var c=0;c=t.length&&(r%=t.length);var l=t[r][0],u=t[r][1],c=(new uP).getLinearGradient(a,0,s,0,[[0,l],[1,u]]);o.style.color=c}}}}])&&OE(t.prototype,r),n&&OE(t,n),i}();function EE(e){"@babel/helpers - typeof";return(EE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kE(e,t){for(var r=0;rt[1])return;var a=this.calculateXShapeInfo();if(a){var s=a.xPositions,l=a.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(fE.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(fE.GraphAxis(this.shapeFactory,r,e,a)));for(var u=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10,c=0;c=s[2]||s[1]<=s[3])&&(this.DVBOrigonPoint=[s[0],s[3]],this.DVBWidth=Math.abs(s[2]-s[0]),this.DVBHeight=Math.abs(s[1]-s[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-o[0],this.DVBOrigonPoint[1]-o[1]],!0)}}])&&NE(t.prototype,r),n&&NE(t,n),i}();function VE(e){"@babel/helpers - typeof";return(VE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HE(e,t){for(var r=0;r0?this.DVBUnitValue=e.maxR/(o[1]-o[0]):this.DVBUnitValue=e.maxR;var i=this.DVBUnitValue,a=n[0]*i+e.minR;if(this.width=2*a,this.height=2*a,this.initBaseParameter()&&(!o||!(n[0]o[1]))){var s=this.DVBCenterPoint,l=new PC(s[0],s[1],a);l.style=fE.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=fE.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:a,value:n[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}}])&&HE(t.prototype,r),n&&HE(t,n),i}();function XE(e){"@babel/helpers - typeof";return(XE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QE(e,t){for(var r=0;rr[1])return null;a=l[f],s=t[1]-(o[f]-r[0])/n;var p=new RP(a,s);p.style=fE.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,f,o[f]),p.highlightStyle=fE.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[f],value:o[f]},c.push(this.shapeFactory.createShape(p));var y=[a,s];u.push(y)}var d=new DP(u);d.style=fE.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),d.clickable=!1,d.hoverable=!1;var v=this.shapeFactory.createShape(d);this.shapes.push(v),this.shapes=this.shapes.concat(c),this.shapesConvertToRelativeCoordinate()}}}}},{key:"calculateXShapeInfo",value:function(){var e,t=this.dataViewBox,r=this.setting,n=this.dataValues.length;if(n<1)return null;var o=[],i=this.DVBWidth,a=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var s=i-((e=r.xShapeBlank)[0]+e[1]);if(s<=n)return null;a=s/(n-1)}else e=[a=i/(n+1),a,a];for(var l=0,u=0;un[1])return;for(var i=0,a=0;a=360&&(c=359.9999999);var d=new oC(l[0],l[1],h,u,c);if(void 0===e.sectorStyleByFields){var v=p%t.length;d.style=fE.ShapeStyleTool(null,e.sectorStyle,t,null,v)}else d.style=fE.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,p,r[p]);d.highlightStyle=fE.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(d.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(d.clickable=e.sectorClickAble),d.refDataID=this.data.id,d.dataInfo={field:this.fields[p],value:r[p]},this.shapes.push(this.shapeFactory.createShape(d)),u=c}this.shapesConvertToRelativeCoordinate()}}}}])&&nk(t.prototype,r),n&&nk(t,n),i}();function uk(e){"@babel/helpers - typeof";return(uk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ck(e,t){for(var r=0;rr[1])return null;a=l[u],s=t[1]-(o[u]-r[0])/n;var f=new RP(a,s);f.style=fE.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,u,o[u]),f.highlightStyle=fE.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(f.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(f.clickable=e.pointClickAble),f.refDataID=this.data.id,f.dataInfo={field:this.fields[u],value:o[u]},this.shapes.push(this.shapeFactory.createShape(f))}this.shapesConvertToRelativeCoordinate()}}}},{key:"calculateXShapeInfo",value:function(){var e,t=this.dataViewBox,r=this.setting,n=this.dataValues.length;if(n<1)return null;var o=[],i=this.DVBWidth,a=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var s=i-((e=r.xShapeBlank)[0]+e[1]);if(s<=n)return null;a=s/(n-1)}else e=[a=i/(n+1),a,a];for(var l=0,u=0;un[1])return;for(var i=0,a=0;a=0&&t.innerRingRadius0){var u=i[i.length-1];if(Math.abs(u[0]-n[0])<=a&&Math.abs(u[1]-n[1])<=a)continue}i.push(n)}if(i.length<2)return null;var c=new Object;(c=ae.copyAttributesWithClip(c,this.style,["pointList"])).pointList=i;var f=new VT({style:c,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=this.location,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ae.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}},{key:"multiPointToTF",value:function(e){for(var t=e.components,r=[],n=[],o=this.location,i=[],a=this.nodesClipPixel,s=0;s0){var u=i[i.length-1];if(Math.abs(u[0]-n[0])<=a&&Math.abs(u[1]-n[1])<=a)continue}i.push(n);var c=new Object;c.r=6,(c=ae.copyAttributesWithClip(c,this.style)).x=n[0],c.y=n[1];var f=new yT({style:c,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=o,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ae.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}}},{key:"multiLineStringToTF",value:function(e){for(var t=e.components,r=0;r0){var h=i[i.length-1];if(Math.abs(h[0]-n[0])<=l&&Math.abs(h[1]-n[1])<=l)continue}i.push(n)}}else{a=[];for(var p=0;p0){var y=a[a.length-1];if(Math.abs(y[0]-n[0])<=l&&Math.abs(y[1]-n[1])<=l)continue}a.push(n)}}a.length<2||s.push(a)}if(!(i.length<2)){var d={};(d=ae.copyAttributesWithClip(d,this.style,["pointList"])).pointList=i;var v=new IT({style:d,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(v.highlightStyle=this.highlightStyle),v.refOriginalPosition=this.location,v.refDataID=this.data.id,v.isHoverByRefDataID=this.isMultiHover,s.length>0&&(v.holePolygonPointLists=s),this.shapeOptions&&ae.copyAttributesWithClip(v,this.shapeOptions),this.shapes.push(v)}}},{key:"rectangleToTF",value:function(e){var t=this.location,r=new le(e.x,e.y),n=this.layer.map.getResolution(),o=this.getLocalXY(r),i=new Object;i.r=6,(i=ae.copyAttributesWithClip(i,this.style)).x=o[0]-t[0],i.y=o[1]-t[1]-2*e.width/n,i.width=e.width/n,i.height=e.height/n;var a=new rE({style:i,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(a.highlightStyle=this.highlightStyle),a.refOriginalPosition=t,a.refDataID=this.data.id,a.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ae.copyAttributesWithClip(a,this.shapeOptions),this.shapes.push(a)}},{key:"geoTextToTF",value:function(e){var t=this.location,r=this.getLocalXY(e),n=new Object;n.r=6,(n=ae.copyAttributesWithClip(n,this.style,["x","y","text"])).x=r[0]-t[0],n.y=r[1]-t[1],n.text=e.text;var o=new wT({style:n,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(o.highlightStyle=this.highlightStyle),o.refOriginalPosition=t,o.refDataID=this.data.id,o.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ae.copyAttributesWithClip(o,this.shapeOptions),this.shapes.push(o)}},{key:"updateAndAddShapes",value:function(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,r=0,n=this.shapes.length;r0}},{key:"addRoot",value:function(e){e instanceof Gk&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}},{key:"delRoot",value:function(e){if(void 0===e){for(var t=0;t=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof Gk&&i.delChildrenFromStorage(this))}}},{key:"addToMap",value:function(e){return e instanceof Gk&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}},{key:"get",value:function(e){return this._elements[e]}},{key:"delFromMap",value:function(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof Gk&&(t._storage=null)),this}},{key:"dispose",value:function(){this._elements=null,this._roots=null,this._hoverElements=null}}])&&Bk(t.prototype,r),n&&Bk(t,n),e}();function Vk(e){"@babel/helpers - typeof";return(Vk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hk(e,t){return(Hk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jk(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=zk(e);if(t){var o=zk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Vk(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function zk(e){return(zk=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wk(e,t){for(var r=0;r0&&e>this._zlevelList[0]){for(o=0;oe);o++);n=this._layers[this._zlevelList[o]]}this._zlevelList.splice(o+1,0,e),t=new Qk(ae.createUniqueID("_levelLayer_"+e),this);var i=n?n.dom:this._bgDom;i.nextSibling?i.parentNode.insertBefore(t.dom,i.nextSibling):i.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new sP).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}},{key:"getLayers",value:function(){return this._layers}},{key:"_updateLayerStatus",value:function(e){var t=this._layers,r={};for(var n in t)"hover"!==n&&(r[n]=t[n].elCount,t[n].elCount=0);for(var o=0;o0?1.1:1/1.1,r=this.painter.getLayers(),n=!1;for(var o in r)if("hover"!==o){var i=r[o],a=i.position;if(i.zoomable){i.__zoom=i.__zoom||1;var s=i.__zoom;s*=t,t=(s=Math.max(Math.min(i.maxZoom,s),i.minZoom))/i.__zoom,i.__zoom=s,a[0]-=(this._mouseX-a[0])*(t-1),a[1]-=(this._mouseY-a[1])*(t-1),i.scale[0]*=t,i.scale[1]*=t,i.dirty=!0,n=!0}}n&&this.painter.refresh(),this._dispatchAgency(this._lastHover,HC.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=KC.Util_event.getX(e),this._mouseY=KC.Util_event.getY(e);var t=this._mouseX-this._lastX,r=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 n="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,r),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var o=this.painter.getLayers(),i=!1;for(var a in o)if("hover"!==a){var s=o[a];s.panable&&(n="move",s.position[0]+=t,s.position[1]+=r,i=!0,s.dirty=!0)}i&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?n="move":this._hasfound&&this._lastHover.clickable&&(n="pointer"),this.root.style.cursor=n,this._dispatchAgency(this._lastHover,HC.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(HC.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,HC.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,HC.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&&KC.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment=0;o--){var i=r[o];if(void 0!==i.zlevel&&(e=this.painter.getLayer(i.zlevel,e),n[0]=this._mouseX,n[1]=this._mouseY,e.needTransform&&(KC.Util_matrix.invert(t,e.transform),KC.Util_vector.applyTransform(n,n,t))),this._findHover(i,n[0],n[1]))break}}},{key:"_mobildFindFixed",value:function(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 r=0;!this._lastHover&&r=0&&this._clips.splice(t,1)}},{key:"_update",value:function(){for(var e=(new Date).getTime(),t=e-this._time,r=this._clips,n=r.length,o=[],i=[],a=0;a=0&&!(d[S]<=a);S--);S=Math.min(S,u-2)}else{for(S=C;Sa);S++);S=Math.min(S-1,u-2)}C=S,T=a;var s=d[S+1]-d[S];if(0!==s){var c,y;for(w=(a-d[S])/s,i?(_=v[S],O=v[0===S?S:S-1],x=v[S>u-2?u-1:S+1],P=v[S>u-3?u-1:S+2],f?vR._catmullRomInterpolateArray(O,_,x,P,w,w*w,w*w*w,n(e,l),p):(c=h?vR.rgba2String(E):vR._catmullRomInterpolate(O,_,x,P,w,w*w,w*w*w),r(e,l,c))):f?vR._interpolateArray(v[S],v[S+1],w,n(e,l),p):(h?(vR._interpolateArray(v[S],v[S+1],w,E,1),y=vR.rgba2String(E)):y=vR._interpolateNumber(v[S],v[S+1],w),r(e,l,y)),S=0;S1&&void 0!==arguments[1]?arguments[1]:"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}}])&&CR(t.prototype,r),n&&CR(t,n),e}();u.Components.MessageBox=TR;var ER=function(){try{return echarts}catch(e){return{}}}(),kR=r.n(ER),RR={code:null,defaultCode:"en-US",getCode:function(){return u.Lang.code||u.Lang.setCode(),u.Lang.code},setCode:function(){var e=this.getLanguageFromCookie();e?u.Lang.code=e:(e=u.Lang.defaultCode,0===(e="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(e="zh-CN"),0===e.indexOf("en")&&(e="en-US"),u.Lang.code=e)},getLanguageFromCookie:function(){for(var e=document.cookie.split(";"),t=0;t0){var a=i.SheetNames[0],s=AR().utils.sheet_to_csv(i.Sheets[a]);t&&t.call(n,s)}}catch(e){r&&r.call(n,e)}},o.onerror=function(e){r&&r.call(n,e)},this.rABF&&o.readAsArrayBuffer(e.file)},processDataToGeoJson:function(e,t,r,n,o){var i=null;if("EXCEL"===e||"CSV"===e)i=this.processExcelDataToGeoJson(t),r&&r.call(o,i);else if("JSON"===e||"GEOJSON"===e){var a=t;"string"==typeof a&&(a=JSON.parse(a)),"ISERVER"===a.type?i=a.data.recordsets[0].features:"FeatureCollection"===a.type?i=a:n&&n.call(o,RR.i18n("msg_dataInWrongGeoJSONFormat")),r&&r.call(o,i)}else n&&n.call(o,RR.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson:function(e){for(var t=this.string2Csv(e),r=t.colTitles,n=-1,o=-1,i=0,a=r.length;i0?(n.dataItemServices.forEach(function(n){if("RESTDATA"===n.serviceType&&"PUBLISHED"===n.serviceStatus)o=n;else{if("RESTMAP"!==n.serviceType||"PUBLISHED"!==n.serviceStatus)return void r.getDatafromContent(e,t);o=n}}),o&&r.getDatafromRest(o.serviceType,o.address,t)):r.getDatafromContent(e,t):r._fireFailedEvent(n)}).catch(function(e){console.log(e),r._fireFailedEvent(e)})}},{key:"getDatafromContent",value:function(e,t){var r=this,n={result:{}},o=this;e+="/content.json?pageSize=9999999¤tPage=1",Jr.get(e,null,{withCredentials:this.datasets.withCredentials}).then(function(e){return e.json()}).then(function(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(RR.i18n("msg_jsonResolveFiled"));var i=r._formatGeoJSON(e.content);n.result.features={type:e.content.type,features:i}}else if("EXCEL"===e.type||"CSV"===e.type){var a=r._excelData2Feature(e.content);n.result.features={type:"FeatureCollection",features:a}}t(n,"content")}}else o._fireFailedEvent(e)},this).catch(function(e){console.log(e),o._fireFailedEvent(e)})}},{key:"getDatafromRest",value:function(e,t,r){var n=this,o=this.datasets.withCredentials;if("RESTDATA"===e){var i,a,s="".concat(t,"/data/datasources");Jr.get(s,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){i=e.datasourceNames[0],s="".concat(t,"/data/datasources/").concat(i,"/datasets"),Jr.get(s,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){return a=e.datasetNames[0],n.getDatafromRestData("".concat(t,"/data"),[i+":"+a],r),[i+":"+a]}).catch(function(e){n._fireFailedEvent(e)})}).catch(function(e){n._fireFailedEvent(e)})}else{var l,u,c,f="".concat(t,"/maps");Jr.get(f,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){l=e[0].name,c=e[0].path,f=f="".concat(t,"/maps/").concat(l,"/layers"),Jr.get(f,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){return u=e[0].subLayers.layers[0].caption,n.getDatafromRestMap(u,c,r),u}).catch(function(e){n._fireFailedEvent(e)})}).catch(function(e){n._fireFailedEvent(e)})}}},{key:"getDatafromRestData",value:function(e,t,r){var n=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,function(e){r(e,"RESTDATA")},function(e){console.log(e),n._fireFailedEvent(e)})}},{key:"getDatafromRestMap",value:function(e,t,r){var n=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,function(e){r(e,"RESTMAP")},function(e){console.log(e),n._fireFailedEvent(e)})}},{key:"_getFeatureBySQL",value:function(e,t,r,n,o){var i,a,s={name:t.join().replace(":","@")};Object.assign(s,r),i=new Eo(s),a=new ip({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),new hp(e,{eventListeners:{processCompleted:function(e){n&&n(e)},processFailed:function(e){o&&o(e)}}}).processAsync(a)}},{key:"_queryFeatureBySQL",value:function(e,t,r,n,o,i,a,s,l,u){var c,f,h={name:t};Object.assign(h,r),c=new Eo(h),n&&(c.fields=n);var y={queryParams:[c]};u&&(y.queryOption=p.ATTRIBUTE),s&&(y.startRecord=s),l&&(y.expectCount=l),o&&(y.prjCoordSys={epsgCode:o}),f=new Cg(y),this._queryBySQL(e,f,function(e){"processCompleted"===e.type?i(e):a(e)})}},{key:"_queryBySQL",value:function(e,t,r,n){new jg(e,{eventListeners:{scope:this,processCompleted:r,processFailed:r},format:this._processFormat(n)}).processAsync(t)}},{key:"_processFormat",value:function(e){return e||c.GEOJSON}},{key:"_formatGeoJSON",value:function(e){var t=e.features;return t.forEach(function(e,t){e.properties.index=t}),t}},{key:"_excelData2Feature",value:function(e){for(var t=e.colTitles,r=-1,n=-1,o=0,i=t.length;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function DR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&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})})}},{key:"getDatasetInfo",value:function(e){var t=this;this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new IR(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:function(e){t.events.triggerEvent("getdatafailed",e)}}))}},{key:"_getDatasetInfoSuccess",value:function(e){var t=this.datasets.url,r=t.indexOf("rest");if(r>0){var n=t.indexOf("/",r+5),o=t.substring(r+5,n),i=t.substring(0,r+4)+"/data";if("maps"===o){var a=t.indexOf("/",n+1),s=t.substring(n+1,a);i=t.substring(0,r+4)+"/maps/"+s,e.result.dataUrl=i,this._getLayerFeatures(e)}else"data"===o&&(e.result.dataUrl=i,this._getDataFeatures(e))}}},{key:"_getDataInfoSuccess",value:function(e,t){"RESTMAP"===t?this._getChartDatasFromLayer(e):this._getChartDatas(e)}},{key:"_getDataFeatures",value:function(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}},{key:"_getLayerFeatures",value:function(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}},{key:"_getChartDatas",value:function(e){if(e){this.features=e.result.features;var t=this.features.features,r={};if(t.length){var n=t[0],o=[],i=[];for(var a in n.properties)o.push(a),i.push(this._getDataType(n.properties[a]));for(var s in r={features:t,fieldCaptions:o,fieldTypes:i,fieldValues:[]},i){var l=[];for(var u in t){var c=t[u],f=r.fieldCaptions[s],h=c.properties[f];l.push(h)}r.fieldValues.push(l)}this.createChart(r)}}}},{key:"_getChartDatasFromLayer",value:function(e){if(e.result.recordsets){var t=e.result.recordsets[0],r=t.features.features;this.features=t.features;var n={};if(r.length){for(var o in(n={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]}).fieldCaptions){var i=[];for(var a in r){var s=r[a],l=n.fieldCaptions[o],u=s.properties[l];i.push(u)}n.fieldValues.push(i)}this.createChart(n)}}}},{key:"_createChartOptions",value:function(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}},{key:"changeType",value:function(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}},{key:"updateData",value:function(e,t,r){this.updateChart=r,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))}},{key:"_updateDataSuccess",value:function(e){var t=this._createChartOptions(e);this.updateChart(t)}},{key:"updateChartOptions",value:function(e,t){if(this.calculatedData){var r=this.grid,n=this._createChartSeries(this.calculatedData,e),o=[];for(var i in this.calculatedData.XData)o.push({value:this.calculatedData.XData[i].fieldsData});var a={type:"category",name:this.xField[0].name||"X",data:o,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},s={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},l={formatter:"{b0}: {c0}"},u="#404a59";return t&&(t.grid&&(r=t.grid),t.tooltip&&(l=t.tooltip),t.backgroundColor&&(u=t.backgroundColor)),{backgroundColor:u,grid:r,series:n,xAxis:a,yAxis:s,tooltip:l}}}},{key:"_createChartDatas",value:function(e){var t=0,r=[],n=e.fieldCaptions,o=this;n.forEach(function(e,r){o.xField[0]&&e===o.xField[0].field&&(t=r)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(o.yFieldName=o.yFieldName+","),o.yFieldName=o.yFieldName+e.name,n.forEach(function(t,n){t===e.field&&r.push(n)})});var i=this._getAttrData(e,t),a=[];if(r.length>0)r.forEach(function(t){var r=[];for(var n in e.fieldValues[t])r.push({value:e.fieldValues[t][n]});a.push(r)});else{for(var s=[],l=[],u=i.length,c=0;c0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}},{key:"_changeTabsPage",value:function(e){for(var t=e.target.index,r=0;r0;t--)this.content.removeChild(this.content.children[t-1]);var r=this.config[e];for(var n in r)this._createCityItem(n,r[n])}},{key:"_createCityItem",value:function(e,t){var r=document.createElement("div"),n=document.createElement("div");n.setAttribute("class","component-citytabpag__py-key"),n.innerHTML=e,r.appendChild(n);var o=document.createElement("div");o.setAttribute("class","component-citytabpag__content");for(var i=0;i0&&this.appendTabs(e),this.rootContainer=t}},{key:"setTabs",value:function(e){this.removeAllTabs(),this.appendTabs(e)}},{key:"appendTabs",value:function(e){for(var t=0;t0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}},{key:"_changeTabsPage",value:function(e){for(var t=e.target.index,r=0;r=0;e--)this.content.removeChild(this.content.children[e])}},{key:"setPageLink",value:function(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}},{key:"_createPageLi",value:function(e){for(var t=0;t1;e--)this.link.removeChild(this.link.children[e])}},{key:"_createLink",value:function(e){for(var t=0;t<4;t++){var r=document.createElement("li");r.setAttribute("class","disable");var n=document.createElement("span");r.appendChild(n),0===t?(n.id="first",n.setAttribute("class","supermapol-icons-first")):1===t?(n.id="prev",n.setAttribute("class","supermapol-icons-prev")):2===t?(n.id="next",n.setAttribute("class","supermapol-icons-next")):3===t&&(n.id="last",n.setAttribute("class","supermapol-icons-last")),e.appendChild(r)}}},{key:"_changePageEvent",value:function(e){var t=e.target;if("disable"!==t.parentElement.classList[0]){var r;if(t.id)r=t.id;else{if(!Number(t.innerHTML))return;r=Number(t.innerHTML)}this._prePageNum(r),this.clearPageLink(),this._appendPageLink()}}},{key:"_changeDisableState",value:function(){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"))}},{key:"_prePageNum",value:function(e){var 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(var r=0;r=this.pageNumberLis.length-3)for(var o=this.pageNumberLis.length-5;o0&&(this.currentPageNumberLis=t)}}])&&GM(t.prototype,r),n&&GM(t,n),i}();u.Components.PaginationContainer=HM;u.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!"};function JM(e){"@babel/helpers - typeof";return(JM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zM(e,t){for(var r=0;r0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))}},{key:"setLayer",value:function(e){e&&(this.options.layer=e);var t=this,r=t.options.layer;r.on("tilesetsinfoloaded",function(e){var r=e.value&&e.value.tileVersions;t.update(r)}),r.on("tileversionschanged",function(e){var r=e.value&&e.value.tileVersion;t.setContent(r)}),t.getTileSetsInfo()}},{key:"update",value:function(e){this.tileVersions=e,this.updateLength(this.tileVersions.length)}},{key:"getTileSetsInfo",value:function(){var e=this;e.options.layer&&new XM(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})}},{key:"removeLayer",value:function(){this.options.layer=null}},{key:"nextTilesVersion",value:function(){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)}},{key:"lastTilesVersion",value:function(){return parseInt(this.slider.value)=this.minWidth_)break;++p}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;var d=u.toFixed(f<0?-f:0)+" "+s;this.renderedHTML_!=d&&(this.innerElement_.innerHTML=d,this.renderedHTML_=d),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}}])&&fA(t.prototype,r),n&&fA(t,n),i}(),vA="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=";function mA(e){"@babel/helpers - typeof";return(mA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bA(e,t){return(bA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=wA(e);if(t){var o=wA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===mA(t)||"function"==typeof t))return t;return SA(e)}(this,r)}}function SA(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wA(e){return(wA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var OA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bA(e,t)}(r,KM());var t=gA(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(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",(n=t.call(this,e)).options=e,n.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"),r=(t=t&&t[0])&&t.clientHeight||29;e.style.bottom=parseInt(r)+6+"px",e.style.right="4px",e.style.marginTop=0,e.style.marginLeft=0,e.style.marginBottom=0,e.style.marginRight=0;var n=document.createElement("style");n.type="text/css",n.innerHTML=".ol-control-logo,.ol-control-logo:hover {background-color: rgba(255,255,255,0);}",document.getElementsByTagName("head")[0].appendChild(n)}.call(this,e);var t=vA;this.options.imageUrl&&(t=this.options.imageUrl);var r=this.options.alt,n=this.options.link,o="94px",i="29px",a="width:"+o+";height:"+i+";";this.options.imageUrl&&(o=this.options.width,i=this.options.height,a="width:"+o+";height:"+i+";",o&&i||(a=""));return e.innerHTML=""+r+"",e}.call(SA(n)),n}return r}(),_A={"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"},xA={"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"},PA={"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"},CA={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:_A,MULTIPOINT:_A,LINE:xA,LINESTRING:xA,MULTILINESTRING:xA,REGION:PA,POLYGON:PA,MULTIPOLYGON:PA},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:""}},TA={pointFile:"",pointRadius:3,pointHaloRadius:1,pointHaloColor:"#c33",offsetX:0,offsetY:0,fillStyle:"#fc0",globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},EA={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},kA={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},RA={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:TA,MULTIPOINT:TA,LINE:EA,LINESTRING:EA,MULTILINESTRING:EA,REGION:kA,POLYGON:kA,MULTIPOLYGON:kA,SHADOW:{shadowBlur:0,shadowColor:"rgba(0,0,0,0)",shadowOffsetX:0,shadowOffsetY:0},GLOBAL:{globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0}},MA=ol.geom.Point,AA=r.n(MA),jA=ol.format.GeoJSON,LA=r.n(jA);function IA(e){"@babel/helpers - typeof";return(IA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NA(e,t){for(var r=0;r-180&&u<90&&u>-90;if(a.length===o.length&&c){var f={type:"Feature",geometry:{},properties:{}};f.geometry.type="Point",f.geometry.coordinates=[l,u];for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:"").replace(/(^\s*)|(\s*$)/g,"")}},{key:"newGuid",value:function(e){for(var t=e||32,r="",n=1;nn&&(n=t,o=e)}),o}},{key:"setMask",value:function(t,r){if(r&&((r instanceof nj()?r.getGeometry():r)instanceof XA()||!(["MultiPolygon","Polygon"].indexOf(r.getType())<0))){var n=r instanceof nj()?r:new(nj())(r),o=new tj.Style({fill:new tj.Fill({color:"black"})}),i=new(ej())({source:new(ZA())({features:[n],wrapX:!1})}),a=function(e){var t=(0,QA.getVectorContext)(e);e.context.globalCompositeOperation="destination-in",i.getSource().forEachFeature(function(r){t.drawFeature(r,o),e.context.globalCompositeOperation="source-over"})},s=Array.isArray(t)?t:[t];e.unsetMask(s),s.forEach(function(e){e.classNameBak_=e.className_,e.className_="ol_mask_layer_".concat(e.ol_uid),e.clipRender=a,e.extentBak_=e.getExtent(),e.setExtent(i.getSource().getExtent()),e.on("postrender",a),e.changed()})}}},{key:"unsetMask",value:function(e){for(var t=Array.isArray(e)?e:[e],r=0;r0&&d[d.length-1]}p=t.getProperties().attributes?t.getProperties().attributes[y]:t.getProperties()[y]}return t.getProperties().TEXT_FEATURE_CONTENT&&(p=t.getProperties().TEXT_FEATURE_CONTENT),p?this.toOLTextStyle(i,p):this.toOLPointStyle(this.getDefaultStyle("POINT"))}if(o){var v=o.fillSymbolID>7?0:o.fillSymbolID,m=o.lineSymbolID>5?0:o.lineSymbolID;for(var b in o){var g,S=CA.ServerStyleMap[b],w=S.canvasStyle;if(w&&""!=w)switch(S.type){case"number":g=o[b],S.unit&&(g=g*u.DOTS_PER_INCH*u.INCHES_PER_UNIT[S.unit]*2.5),i[w]=g;break;case"color":var O=o[b],_=o.fillBackColor,x=1;if("fillStyle"===w)if(0===v||1===v)x=1-v,g="rgba("+O.red+","+O.green+","+O.blue+","+x+")";else try{var P=document.createElement("canvas");P.height=8,P.width=8;var C=P.getContext("2d"),T=new Image;this.layer&&this.layer.fillImages&&C.drawImage(this.layer.fillImages["System "+v],0,0);for(var E=C.getImageData(0,0,P.width,P.height),k=E.data,R=0,M=k.length;R0&&void 0!==arguments[0]?arguments[0]:.5,arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5]}},{key:"getCircleDisplacement",value:function(e){return[e*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),-(e*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0))]}},{key:"getTextOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.substr(0,e.length-2)/2;return{x:n*t,y:n*r}}},{key:"getCanvas",value:function(e){var 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 r=t.getContext("2d"),n=Number(e.font.replace(/[^0-9]/gi,"")),o=e.text.split("\r\n"),i=o.length;r.font=e.font;var a=this.drawRect(r,e,o,n,t);return this.positionY=8,i>1?o.forEach(function(t,o){0!==o&&(this.positionY=this.positionY+n),this.canvasTextAutoLine(t,e,r,n,a.width)},this):this.canvasTextAutoLine(o[0],e,r,n,a.width),{canvas:t,width:a.width,height:a.height}}},{key:"createCanvas",value:function(e){var t=document.createElement("div");document.body.appendChild(t);var r=document.createElement("canvas");return r.id=e.canvas?e.canvas:"textCanvas"+ij.newGuid(8),t.appendChild(r),r}},{key:"drawRect",value:function(e,t,r,n,o){var i,a=t.backgroundFill,s=t.maxWidth-16,l=0,u=0,c=[];return r.forEach(function(t){var r,n="";u++;for(var o=0;os&&o>0||"\n"===t[o]?(n=t[o],u++,r=!0):(n=a,i=l)}r?c.push(s):c.push(i)},this),i=this.getCanvasWidth(c,s),l=u*n,l+=16,o.width=i,o.height=l,e.fillStyle=a,e.fillRect(0,0,i,l),{width:i,height:l}}},{key:"getCanvasWidth",value:function(e,t){for(var r=0,n=0;n=t)return t+16;o>r&&(r=o)}return r+16}},{key:"canvasTextAutoLine",value:function(e,t,r,n,o){r.font=t.font;for(var i=t.textAlign,a=this.getPositionX(i,o),s=e.split(""),l="",u=t.fillColor,c=t.maxWidth-16,f=0;fc&&f>0||"\n"===s[f]?(r.fillStyle=u,r.textAlign=i,r.textBaseline="top",r.fillText(l,a,this.positionY),l=s[f],this.positionY+=n):l=h}r.fillStyle=u,r.textAlign=i,r.textBaseline="top",r.fillText(l,a,this.positionY)}},{key:"getPositionX",value:function(e,t){var r,n=t-16;switch(e){case"center":r=n/2;break;case"right":r=n;break;default:r=8}return r}},{key:"hexToRgb",value:function(e){if(e){var t=e.replace("#","").split(""),r=[t[0]+t[1],t[2]+t[3],t[4]+t[5]];return r=r.map(function(e){return parseInt(e,16)})}}},{key:"formatRGB",value:function(e){var t;return 3===e.length?(t="rgb(",e.forEach(function(e,r){t+=2===r?e:e+","})):(t="rgba(",e.forEach(function(e,r){t+=3===r?e:e+","})),t+=")"}},{key:"getCanvasFromSVG",value:function(e,t,r){var n=window.canvg?window.canvg:sj(),o=document.createElement("canvas");o.id="dataviz-canvas-"+ij.newGuid(8),o.style.display="none",t.appendChild(o);try{n(o.id,e,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:function(){o.width>300||o.height>300||r(o)},forceRedraw:function(){return!1}})}catch(e){return}}},{key:"getMarkerDefaultStyle",value:function(e,t){var r;switch(e){case"POINT":r={src:"".concat(t,"apps/dataviz/static/imgs/markers/mark_red.png"),scale:1,anchor:[.5,1]};break;case"LINE":case"LINESTRING":case"MULTILINESTRING":r={strokeColor:"#3498db",strokeOpacity:1,strokeWidth:5,lineCap:"round",lineDash:"solid"};break;case"REGION":case"POLYGON":case"MULTIPOLYGON":r={fillColor:"#1abd9c",fillOpacity:1,strokeColor:"#3498db",strokeOpacity:1,strokeWidth:3,lineCap:"round",lineDash:"solid"}}return r}},{key:"getOpenlayersStyle",value:function(e,t,r){var n;return"BASIC_POINT"===e.type?n=this.toOpenLayersStyle(e,t):"SYMBOL_POINT"===e.type?n=this.getSymbolStyle(e,r):"SVG_POINT"===e.type?n=this.getSVGStyle(e):"IMAGE_POINT"===e.type&&(n=this.getImageStyle(e)),n}},{key:"getSymbolStyle",value:function(t,r){var n="";t.unicode&&(n=String.fromCharCode(parseInt(t.unicode.replace(/^&#x/,""),16)));var o=e.hexToRgb(t.fillColor);o.push(t.fillOpacity);var i=e.hexToRgb(t.strokeColor);i.push(t.strokeOpacity);var a=r?2*t.radius+"px":t.fontSize,s=t.offsetX,l=t.offsetY,u=t.rotation,c=void 0===u?0:u,f=e.getTextOffset(a,s,l);return new(uj())({text:new(gj())({text:n,font:a+" supermapol-icons",placement:"point",textAlign:"center",fill:new(dj())({color:o}),backgroundFill:new(dj())({color:[0,0,0,0]}),stroke:new(mj())({width:t.strokeWidth||1e-6,color:i}),offsetX:f.x,offsetY:f.y,rotation:c})})}},{key:"getSVGStyle",value:function(t){var r,n=this;n.svgDiv||(n.svgDiv=document.createElement("div"),document.body.appendChild(n.svgDiv));var o=t.url,i=t.radius,a=t.offsetX,s=t.offsetY,l=t.fillOpacity,u=t.rotation,c=this.getIconAnchor(a,s);return e.getCanvasFromSVG(o,n.svgDiv,function(e){r=new(uj())({image:new(fj())({img:n.setColorToCanvas(e,t),scale:2*i/e.width,imgSize:[e.width,e.height],anchor:c||[.5,.5],opacity:l,anchorOrigin:"bottom-right",rotation:u})})}),r}},{key:"setColorToCanvas",value:function(t,r){var n=t.getContext("2d"),o=e.hexToRgb(r.fillColor);o&&o.push(r.fillOpacity);var i=e.hexToRgb(r.strokeColor);return i&&i.push(r.strokeOpacity),n.fillStyle=e.formatRGB(o),n.fill(),n.strokeStyle=e.formatRGB(i),n.lineWidth=r.strokeWidth,n.stroke(),t}},{key:"getImageStyle",value:function(e){var t=e.imageInfo.size,r=2*e.radius/t.w,n=e.imageInfo,o=n.img;o&&o.src||((o=new Image).src=n.url);var i=e.offsetX,a=e.offsetY,s=e.rotation,l=this.getIconAnchor(i,a);return new(uj())({image:new(fj())({img:o,scale:r,imgSize:[t.w,t.h],anchor:l||[.5,.5],anchorOrigin:"bottom-right",rotation:s})})}},{key:"getRoadPath",value:function(e,t){var r=e.strokeWidth,n=void 0===r?1e-7:r,o=e.lineCap,i=e.strokeColor,a=e.strokeOpacity,s=this.hexToRgb(i);s&&s.push(a);var l=new(uj())({stroke:new(mj())({width:n||1e-7,color:s,lineCap:o||"round",lineDash:[0]})}),u=t.strokeColor,c=this.hexToRgb(u);c&&c.push(a);var f=0===n?1e-7:n+2;return[new(uj())({stroke:new(mj())({width:f,color:c,lineCap:o||"round",lineDash:[0]})}),l]}},{key:"getPathway",value:function(e,t){var r,n=e.strokeWidth,o=void 0===n?1e-7:n,i=e.strokeColor,a=e.strokeOpacity,s=[r=4*o,r+2*o],l=this.hexToRgb(i);l&&l.push(a);var u=new(uj())({stroke:new(mj())({width:.5*o||1e-7,color:l,lineCap:"square",lineDash:s})}),c=t.strokeColor,f=this.hexToRgb(c);return f&&f.push(a),[new(uj())({stroke:new(mj())({width:o||1e-7,color:f,lineCap:"square"})}),u]}}],(r=null)&&Sj(t.prototype,r),n&&Sj(t,n),e}(),_j=ol.Map,xj=r.n(_j),Pj=ol.layer.Group,Cj=r.n(Pj),Tj=(wj=function e(t,r,n,o,i,a){t instanceof Cj()?t.getLayers().forEach(function(t){e(t,r,n,o,i,a)}):t.getSource()._forEachFeatureAtCoordinate&&t.getSource()._forEachFeatureAtCoordinate(r,n,function(e){o(e,t)},i,a)},xj().prototype.forEachFeatureAtPixelDefault=xj().prototype.forEachFeatureAtPixel,xj().prototype.forEachFeatureAtPixel=xj().prototype.Tc=function(e,t,r,n){for(var o=r&&r.layerFilter?r.layerFilter:function(){return!0},i=this.getLayers().getArray(),a=this.getView().getResolution(),s=this.getCoordinateFromPixel(e),l=0;l© SuperMap iClient",a=i.defaultTileGrid(),s=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",l=void 0!==r.url?r.url:"http://online1.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles={styles}&udt=20170408",u=r.hidpi||(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;l=l.replace("{styles}",u?"ph":"pl"),t=o.call(this,{attributions:n,cacheSize:r.cacheSize,crossOrigin:s,opaque:void 0===r.opaque||r.opaque,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,projection:"EPSG:3857",wrapX:r.wrapX,tilePixelRatio:u?2:1,tileGrid:a,tileUrlFunction:function(e,t,r){var n=l.replace("{z}",e[0].toString()).replace("{x}",e[1].toString()).replace("{y}",function(){console.log(ij.getOlVersion());var t=["4","5"].indexOf(ij.getOlVersion())>-1?e[2]:-e[2]-1;return t.toString()}).replace("{-y}",function(){var t=e[0],r=a.getFullTileRange(t);kj.assert(r,55);var n=r.getHeight()+e[2];return n.toString()});c.tileProxy&&(n=c.tileProxy+encodeURIComponent(n));return n}}),r.tileProxy&&(t.tileProxy=r.tileProxy);var c=Nj(t);return t}return t=i,n=[{key:"defaultTileGrid",value:function(){return new(Mj())({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})}}],(r=null)&&jj(t.prototype,r),n&&jj(t,n),i}(),Gj=ol.size,Bj=ol.tilegrid;function Uj(e){"@babel/helpers - typeof";return(Uj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vj(e,t){for(var r=0;r© SuperMap iServer with © SuperMap iClient",e.format=e.format?e.format:"png";var r=ae.urlPathAppend(e.url,"image."+e.format);e.serverType=e.serverType||f.ISERVER,r=function(e,t,r){var n,o,i=t;switch(r){case f.IPORTAL:o=qr.getToken(e),(n=o?new Et(o,"token"):null)||(o=qr.getKey(e),n=o?new Et(o,"key"):null);break;case f.ONLINE:o=qr.getKey(e),n=o?new Et(o,"key"):null;break;default:o=qr.getToken(e),n=o?new Et(o,"token"):null}n&&(i=ae.urlAppend(i,n.getUrlParameters()));return i}(e.url,r,e.serverType);var n={},a=void 0===e.transparent||e.transparent;n.transparent=a;var s=void 0===e.cacheEnabled||e.cacheEnabled;n.cacheEnabled=s,void 0!==e.layersID&&(n.layersID=e.layersID);var l=!1;void 0!==e.redirect&&(l=e.redirect),n.redirect=l,e.prjCoordSys&&(n.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.clipRegionEnabled&&e.clipRegion instanceof XA()&&(e.clipRegion=ij.toSuperMapGeometry((new(LA())).writeGeometryObject(e.clipRegion)),e.clipRegion=ae.toJSON(dr.fromGeometry(e.clipRegion)),n.clipRegionEnabled=e.clipRegionEnabled,n.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed&&e.overlapDisplayedOptions&&(n.overlapDisplayed=e.overlapDisplayed,n.overlapDisplayedOptions=e.overlapDisplayedOptions.toString()),!0===s&&e.tileversion&&(n.tileversion=e.tileversion),e.rasterfunction&&(n.rasterfunction=JSON.stringify(e.rasterfunction)),r=ae.urlAppend(encodeURI(r),ae.getParameterString(n)),(t=o.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:"4"===ij.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(t,n,o){this.tileGrid||(this.tileGrid=this.getTileGridForProjection&&this.getTileGridForProjection(o));this.tileGrid||(e.extent?(this.tileGrid=i.createTileGrid(e.extent),this.resolutions&&(this.tileGrid.resolutions=u.resolutions)):("EPSG:3857"===o.getCode()&&(this.tileGrid=i.createTileGrid([-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),this.extent=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),"EPSG:4326"===o.getCode()&&(this.tileGrid=i.createTileGrid([-180,-90,180,90]),this.extent=[-180,-90,180,90])));var a=this.tileGrid.getTileCoordExtent(t,this.tmpExtent_),s=Gj.toSize(this.tileGrid.getTileSize(t[0]),this.tmpSize),l=r+encodeURI("&width="+s[0]+"&height="+s[1]+'&viewBounds={"leftBottom" : {"x":'+a[0]+',"y":'+a[1]+'},"rightTop" : {"x":'+a[2]+',"y":'+a[3]+"}}");u.tileProxy&&(l=u.tileProxy+encodeURIComponent(l));u.cacheEnabled||(l+="&_t="+(new Date).getTime());return l},wrapX:void 0!==e.wrapX&&e.wrapX,cacheEnabled:e.cacheEnabled,layersID:e.layersID})).cacheEnabled=s,e.tileProxy&&(t.tileProxy=e.tileProxy);var u=qj(t);return t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var n=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],o=function(){var e,r=n[2]-n[0],o=n[3]-n[1],i=r>=o?r:o;e=i===r?i/t.viewer.width:i/t.viewer.height;var a=[],s=v.METER;t.coordUnit===v.DEGREE&&(s=v.DEGREE);if(t.visibleScales.length>0)for(var l=0;l© SuperMap iClient",a=o.mapName||"quanguo",s=o.mapType||"web",l=o.url||"http://t2.dituhui.com/FileService/image?map={mapName}&type={type}&x={x}&y={y}&z={z}";l=l.replace("{mapName}",a).replace("{type}",s);var u={attributions:i,cacheSize:o.cacheSize,crossOrigin:o.crossOrigin,opaque:void 0===o.opaque||o.opaque,maxZoom:o.maxZoom||18,reprojectionErrorThreshold:o.reprojectionErrorThreshold,url:l,wrapX:o.wrapX};o.tileProxy&&(u.tileLoadFunction=function(e,t){e.getImage().src=c.tileProxy+encodeURIComponent(t)}),n=t.call(this,u),o.tileProxy&&(n.tileProxy=o.tileProxy);var c=eL(n);return n}return r}(),nL=ol.source.WMTS,oL=r.n(nL),iL=ol.tilegrid.WMTS,aL=r.n(iL);function sL(e){"@babel/helpers - typeof";return(sL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lL(e,t){for(var r=0;r with © SuperMap iClient";r.layerType=r.layerType||"vec",r.layerType=r.isLabel?{vec:"cva",ter:"cta",img:"cia"}[r.layerType]:r.layerType,r.matrixSet="EPSG:4326"===r.projection||"EPSG:4490"===r.projection?"c":"w",r.url||r.urls||(r.url="http://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?"),r.key&&(r.url="".concat(r.url,"tk=").concat(r.key)),r.url=r.url.replace("{layer}",r.layerType).replace("{proj}",r.matrixSet);var a=r.tileGrid||i.getTileGrid(r.projection||"EPSG:3857"),s=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",l={version:r.version||"1.0.0",format:r.format||"tiles",dimensions:r.dimensions||{},layer:r.layerType,matrixSet:r.matrixSet,tileGrid:a,style:r.style||"default",attributions:n,cacheSize:r.cacheSize,crossOrigin:s,opaque:void 0===r.opaque||r.opaque,maxZoom:{vec:18,ter:14,img:18}[r.layerType],reprojectionErrorThreshold:r.reprojectionErrorThreshold,url:r.url,urls:r.urls,projection:r.projection||"EPSG:3857",wrapX:r.wrapX};r.tileProxy&&(l.tileLoadFunction=function(e,t){e.getImage().src=u.tileProxy+encodeURIComponent(t)}),t=o.call(this,l),r.tileProxy&&(t.tileProxy=r.tileProxy);var u=fL(t);return t}return t=i,n=[{key:"getTileGrid",value:function(e){return"EPSG:4326"===e||"EPSG:4490"===e?i.default4326TileGrid():i.default3857TileGrid()}},{key:"default4326TileGrid",value:function(){for(var e=[],t=[],r=1;r<19;r++)e.push(1.40625/Math.pow(2,r)),t.push(r);return new(aL())({extent:[-180,-90,180,90],resolutions:e,origin:[-180,90],matrixIds:t,minZoom:1})}},{key:"default3857TileGrid",value:function(){for(var e=[],t=[],r=1;r<19;r++)e.push(156543.03392804062/Math.pow(2,r)),t.push(r);return new(aL())({extent:[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],resolutions:e,matrixIds:t,origin:[-20037508.3427892,20037508.3427892],minZoom:1})}}],(r=null)&&lL(t.prototype,r),n&&lL(t,n),i}();function yL(e){"@babel/helpers - typeof";return(yL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dL(e,t){for(var r=0;r© SuperMap iServer with © SuperMap iClient",e.format=e.format?e.format:"png",e.serverType=e.serverType||f.ISERVER,t=o.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:"4"===ij.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(t,n,o){r.tileGrid||(e.extent?(r.tileGrid=i.createTileGrid(e.extent),r.resolutions&&(r.tileGrid.resolutions=r.resolutions)):("EPSG:3857"===o.getCode()&&(r.tileGrid=i.createTileGrid([-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),r.extent=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),"EPSG:4326"===o.getCode()&&(r.tileGrid=i.createTileGrid([-180,-90,180,90]),r.extent=[-180,-90,180,90])));r.origin=r.tileGrid.getOrigin(0);var s=t[0],l=t[1],u=["4","5"].indexOf(ij.getOlVersion())>-1?-t[2]-1:t[2],c=r.tileGrid.getResolution(s),f=r.dpi||96,h=o.getUnits()||v.DEGREE;"degrees"!==h&&"degree"!==h||(h=v.DEGREE);"m"!==h&&"meter"!==h||(h=v.METER);var p=ij.resolutionToScale(c,f,h),y=Gj.toSize(r.tileGrid.getTileSize(s,r.tmpSize)),d=function(){this._paramsChanged&&(this._layerUrl=a.call(this),this._paramsChanged=!1);return this._layerUrl||a.call(this)}.call(r)+encodeURI("&x="+l+"&y="+u+"&width="+y[0]+"&height="+y[1]+"&scale="+p);r.tileProxy&&(d=r.tileProxy+encodeURIComponent(d));r.cacheEnabled||(d+="&_t="+(new Date).getTime());return d},wrapX:void 0!==e.wrapX&&e.wrapX,cacheEnabled:e.cacheEnabled,layersID:e.layersID}),e.tileProxy&&(t.tileProxy=e.tileProxy),t.options=e,t._url=e.url,t.tileSetsIndex=-1,t.tempIndex=-1,t.dpi=t.options.dpi||96;var r=gL(t),n=ae.urlPathAppend(e.url,"tileImage."+e.format);function a(){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 XA()&&(e.clipRegionEnabled=!0,e.clipRegion=ij.toSuperMapGeometry((new(LA())).writeGeometryObject(e.clipRegion)),e.clipRegion=ae.toJSON(dr.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=ae.urlAppend(n,ae.getParameterString(this.requestParams)),this._layerUrl=function(e,t){var n,o,i=e;switch(t){case f.IPORTAL:(n=(o=qr.getToken(r._url))?new Et(o,"token"):null)||(n=(o=qr.getKey(r._url))?new Et(o,"key"):null);break;case f.ONLINE:n=(o=qr.getKey(r._url))?new Et(o,"key"):null;break;default:n=(o=qr.getToken(r._url))?new Et(o,"token"):null}return n&&(i=ae.urlAppend(i,n.getUrlParameters())),i}(this._layerUrl,e.serverType),this._layerUrl}return t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var n=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],o=function(){var e,r=n[2]-n[0],o=n[3]-n[1],i=r>=o?r:o;e=i===r?i/t.viewer.width:i/t.viewer.height;var a=[],s=v.METER;t.coordUnit===v.DEGREE&&(s=v.DEGREE);if(t.visibleScalesEnabled&&t.visibleScales&&t.visibleScales.length>0)for(var l=0;l=0){var r=t[e.tempIndex].name;e.mergeTileVersionParam(r)&&(e.tileSetsIndex=e.tempIndex,e.dispatchEvent({type:"tileversionschanged",value:{tileVersion:t[e.tempIndex]}}))}}}},{key:"updateCurrentTileSetsIndex",value:function(e){this.tempIndex=e}},{key:"mergeTileVersionParam",value:function(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.refresh(),!0)}}])&&dL(t.prototype,r),n&&dL(t,n),i}(),OL=r(898),_L=r.n(OL);var xL=1,PL=2,CL=4,TL=5,EL=484813681109536e-20,kL=Math.PI/2,RL=.16666666666666666,ML=.04722222222222222,AL=.022156084656084655,jL=1e-10,LL=.017453292519943295,IL=57.29577951308232,NL=Math.PI/4,DL=2*Math.PI,FL=3.14159265359,GL={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},BL={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},UL=/[\s_\-\/\(\)]/g;function VL(e,t){if(e[t])return e[t];for(var r,n=Object.keys(e),o=t.toLowerCase().replace(UL,""),i=-1;++i=this.text.length)return;e=this.text[this.place++]}switch(this.state){case zL: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}},KL.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(XL.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)},KL.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=zL)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=zL,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},KL.prototype.number=function(e){if(!QL.test(e)){if(XL.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},KL.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},KL.prototype.keyword=function(e){if(YL.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=zL)}if(!XL.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},KL.prototype.neutral=function(e){if(WL.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(QL.test(e))return this.word=e,void(this.state=3);if(!XL.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},KL.prototype.output=function(){for(;this.place0?90:-90),e.lat_ts=e.lat1)}(o),o}function oI(e){var t=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?oI[e]=HL(arguments[1]):oI[e]=nI(arguments[1]):oI[e]=r}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?oI.apply(t,e):oI(e)});if("string"==typeof e){if(e in oI)return oI[e]}else"EPSG"in e?oI["EPSG:"+e.EPSG]=e:"ESRI"in e?oI["ESRI:"+e.ESRI]=e:"IAU2000"in e?oI["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"]}(oI);var iI=oI;var aI=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var sI=["3857","900913","3785","102113"];var lI=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in iI}(e))return iI[e];if(function(e){return aI.some(function(t){return e.indexOf(t)>-1})}(e)){var t=nI(e);if(function(e){var t=VL(e,"authority");if(t){var r=VL(t,"epsg");return r&&sI.indexOf(r)>-1}}(t))return iI["EPSG:3857"];var r=function(e){var t=VL(e,"extension");if(t)return VL(t,"proj4")}(t);return r?HL(r):t}return function(e){return"+"===e[0]}(e)?HL(e):void 0};function uI(e,t){var r,n;if(e=e||{},!t)return e;for(n in t)void 0!==(r=t[n])&&(e[n]=r);return e}function cI(e,t,r){var n=e*t;return r/Math.sqrt(1-n*n)}function fI(e){return e<0?-1:1}function hI(e){return Math.abs(e)<=FL?e:e-fI(e)*DL}function pI(e,t,r){var n=e*r,o=.5*e;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(kL-t))/n}function yI(e,t){for(var r,n,o=.5*e,i=kL-2*Math.atan(t),a=0;a<=15;a++)if(r=e*Math.sin(i),i+=n=kL-2*Math.atan(t*Math.pow((1-r)/(1+r),o))-i,Math.abs(n)<=1e-10)return i;return-9999}function dI(e){return e}var vI=[{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=cI(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,r,n=e.x,o=e.y;if(o*IL>90&&o*IL<-90&&n*IL>180&&n*IL<-180)return null;if(Math.abs(Math.abs(o)-kL)<=jL)return null;if(this.sphere)t=this.x0+this.a*this.k0*hI(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(NL+.5*o));else{var i=Math.sin(o),a=pI(this.e,o,i);t=this.x0+this.a*this.k0*hI(n-this.long0),r=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=r,e},inverse:function(e){var t,r,n=e.x-this.x0,o=e.y-this.y0;if(this.sphere)r=kL-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var i=Math.exp(-o/(this.a*this.k0));if(-9999===(r=yI(this.e,i)))return null}return t=hI(this.long0+n/(this.a*this.k0)),e.x=t,e.y=r,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:dI,inverse:dI,names:["longlat","identity"]}],mI={},bI=[];function gI(e,t){var r=bI.length;return e.names?(bI[r]=e,e.names.forEach(function(e){mI[e.toLowerCase()]=r}),this):(console.log(t),!0)}var SI={start:function(){vI.forEach(gI)},add:gI,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==mI[t]&&bI[mI[t]]?bI[mI[t]]:void 0}},wI={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"}},OI=wI.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};wI.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var _I={};_I.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},_I.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},_I.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},_I.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},_I.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},_I.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},_I.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},_I.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},_I.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},_I.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},_I.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},_I.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},_I.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},_I.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},_I.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},_I.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},_I.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var xI=function(e,t,r,n,o,i){var a={};return a.datum_type=void 0===e||"none"===e?TL:CL,t&&(a.datum_params=t.map(parseFloat),0===a.datum_params[0]&&0===a.datum_params[1]&&0===a.datum_params[2]||(a.datum_type=xL),a.datum_params.length>3&&(0===a.datum_params[3]&&0===a.datum_params[4]&&0===a.datum_params[5]&&0===a.datum_params[6]||(a.datum_type=PL,a.datum_params[3]*=EL,a.datum_params[4]*=EL,a.datum_params[5]*=EL,a.datum_params[6]=a.datum_params[6]/1e6+1))),a.a=r,a.b=n,a.es=o,a.ep2=i,a};function PI(e){"@babel/helpers - typeof";return(PI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CI(e,t){if(!(this instanceof CI))return new CI(e);t=t||function(e){if(e)throw e};var r=lI(e);if("object"===PI(r)){var n=CI.projections.get(r.projName);if(n){if(r.datumCode&&"none"!==r.datumCode){var o=VL(_I,r.datumCode);o&&(r.datum_params=o.towgs84?o.towgs84.split(","):null,r.ellps=o.ellipse,r.datumName=o.datumName?o.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||"enu",r.ellps=r.ellps||"wgs84";var i,a,s,l,u,c,f,h=function(e,t,r,n,o){if(!e){var i=VL(wI,n);i||(i=OI),e=i.a,t=i.b,r=i.rf}return r&&!t&&(t=(1-1/r)*e),(0===r||Math.abs(e-t)-1.001*kL)l=-kL;else if(l>kL&&l<1.001*kL)l=kL;else{if(l<-kL)return{x:-1/0,y:-1/0,z:e.z};if(l>kL)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),o=Math.sin(l),a=Math.cos(l),i=o*o,{x:((n=r/Math.sqrt(1-t*i))+u)*a*Math.cos(s),y:(n+u)*a*Math.sin(s),z:(n*(1-t)+u)*o}}function kI(e,t,r,n){var o,i,a,s,l,u,c,f,h,p,y,d,v,m,b,g=e.x,S=e.y,w=e.z?e.z:0;if(o=Math.sqrt(g*g+S*S),i=Math.sqrt(g*g+S*S+w*w),o/r<1e-12){if(m=0,i/r<1e-12)return kL,b=-n,{x:e.x,y:e.y,z:e.z}}else m=Math.atan2(S,g);a=w/i,f=(s=o/i)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),h=a*l,v=0;do{v++,u=t*(c=r/Math.sqrt(1-t*h*h))/(c+(b=o*f+w*h-c*(1-t*h*h))),d=(y=a*(l=1/Math.sqrt(1-u*(2-u)*s*s)))*f-(p=s*(1-u)*l)*h,f=p,h=y}while(d*d>1e-24&&v<30);return{x:m,y:Math.atan(y/Math.abs(p)),z:b}}function RI(e){return e===xL||e===PL}function MI(e,t,r){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===xL?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!==PL||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)?r:e.datum_type===TL||t.datum_type===TL?r:e.es!==t.es||e.a!==t.a||RI(e.datum_type)||RI(t.datum_type)?(r=EI(r,e.es,e.a),RI(e.datum_type)&&(r=function(e,t,r){if(t===xL)return{x:e.x+r[0],y:e.y+r[1],z:e.z+r[2]};if(t===PL){var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],u=r[6];return{x:u*(e.x-l*e.y+s*e.z)+n,y:u*(l*e.x+e.y-a*e.z)+o,z:u*(-s*e.x+a*e.y+e.z)+i}}}(r,e.datum_type,e.datum_params)),RI(t.datum_type)&&(r=function(e,t,r){if(t===xL)return{x:e.x-r[0],y:e.y-r[1],z:e.z-r[2]};if(t===PL){var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],u=r[6],c=(e.x-n)/u,f=(e.y-o)/u,h=(e.z-i)/u;return{x:c+l*f-s*h,y:-l*c+f+a*h,z:s*c-a*f+h}}}(r,t.datum_type,t.datum_params)),kI(r,t.es,t.a,t.b)):r}function AI(e,t,r){var n,o,i,a=r.x,s=r.y,l=r.z||0,u={};for(i=0;i<3;i++)if(!t||2!==i||void 0!==r.z)switch(0===i?(n=a,o=-1!=="ew".indexOf(e.axis[i])?"x":"y"):1===i?(n=s,o=-1!=="ns".indexOf(e.axis[i])?"y":"x"):(n=l,o="z"),e.axis[i]){case"e":case"w":case"n":case"s":u[o]=n;break;case"u":void 0!==r[o]&&(u.z=n);break;case"d":void 0!==r[o]&&(u.z=-n);break;default:return null}return u}function jI(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 LI(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 II(e,t,r){var n;if(Array.isArray(r)&&(r=jI(r)),function(e){LI(e.x),LI(e.y)}(r),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===xL||e.datum.datum_type===PL)&&"WGS84"!==t.datumCode||(t.datum.datum_type===xL||t.datum.datum_type===PL)&&"WGS84"!==e.datumCode}(e,t)&&(r=II(e,n=new TI("WGS84"),r),e=n),"enu"!==e.axis&&(r=AI(e,!1,r)),"longlat"===e.projName)r={x:r.x*LL,y:r.y*LL,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),!(r=e.inverse(r)))return;return e.from_greenwich&&(r.x+=e.from_greenwich),r=MI(e.datum,t.datum,r),t.from_greenwich&&(r={x:r.x-t.from_greenwich,y:r.y,z:r.z||0}),"longlat"===t.projName?r={x:r.x*IL,y:r.y*IL,z:r.z||0}:(r=t.forward(r),t.to_meter&&(r={x:r.x/t.to_meter,y:r.y/t.to_meter,z:r.z||0})),"enu"!==t.axis?AI(t,!0,r):r}var NI=TI("WGS84");function DI(e,t,r){var n,o,i;return Array.isArray(r)?(n=II(e,t,r)||{x:NaN,y:NaN},r.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(r.splice(3)):[n.x,n.y,r[2]].concat(r.splice(3)):[n.x,n.y].concat(r.splice(2)):[n.x,n.y]):(o=II(e,t,r),2===(i=Object.keys(r)).length?o:(i.forEach(function(n){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;o[n]=r[n]}),o))}function FI(e){return e instanceof TI?e:e.oProj?e.oProj:TI(e)}var GI=function(e,t,r){e=FI(e);var n,o=!1;return void 0===t?(t=e,e=NI,o=!0):(void 0!==t.x||Array.isArray(t))&&(r=t,t=e,e=NI,o=!0),t=FI(t),r?DI(e,t,r):(n={forward:function(r){return DI(e,t,r)},inverse:function(r){return DI(t,e,r)}},o&&(n.oProj=t),n)},BI=6,UI="AJSAJS",VI="AFAFAF",HI=65,JI=73,zI=79,qI=86,WI=90,YI={forward:XI,inverse:function(e){var t=$I(tN(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:QI};function XI(e,t){return t=t||5,function(e,t){var r="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(p=e.easting,y=e.northing,d=e.zoneNumber,v=eN(d),m=Math.floor(p/1e5),b=Math.floor(y/1e5)%20,o=m,i=b,a=v,s=a-1,l=UI.charCodeAt(s),u=VI.charCodeAt(s),c=l+o-1,f=u+i,h=!1,c>WI&&(c=c-WI+HI-1,h=!0),(c===JI||lJI||(c>JI||lzI||(c>zI||lWI&&(c=c-WI+HI-1),f>qI?(f=f-qI+HI-1,h=!0):h=!1,(f===JI||uJI||(f>JI||uzI||(f>zI||uqI&&(f=f-qI+HI-1),String.fromCharCode(c)+String.fromCharCode(f))+r.substr(r.length-5,t)+n.substr(n.length-5,t);var o,i,a,s,l,u,c,f,h;var p,y,d,v,m,b}(function(e){var t,r,n,o,i,a,s,l=e.lat,u=e.lon,c=6378137,f=KI(l),h=KI(u);s=Math.floor((u+180)/6)+1,180===u&&(s=60);l>=56&&l<64&&u>=3&&u<12&&(s=32);l>=72&&l<84&&(u>=0&&u<9?s=31:u>=9&&u<21?s=33:u>=21&&u<33?s=35:u>=33&&u<42&&(s=37));a=KI(6*(s-1)-180+3),.006739496752268451,t=c/Math.sqrt(1-.00669438*Math.sin(f)*Math.sin(f)),r=Math.tan(f)*Math.tan(f),n=.006739496752268451*Math.cos(f)*Math.cos(f),o=Math.cos(f)*(h-a),i=c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-3.418046101696858e-9*Math.sin(6*f));var p=.9996*t*(o+(1-r+n)*o*o*o/6+(5-18*r+r*r+72*n-.39089081163157013)*o*o*o*o*o/120)+5e5,y=.9996*(i+t*Math.tan(f)*(o*o/2+(5-r+9*n+4*n*n)*o*o*o*o/24+(61-58*r+r*r+600*n-2.2240339282485886)*o*o*o*o*o*o/720));l<0&&(y+=1e7);return{northing:Math.round(y),easting:Math.round(p),zoneNumber:s,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 QI(e){var t=$I(tN(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function KI(e){return e*(Math.PI/180)}function ZI(e){return e/Math.PI*180}function $I(e){var t=e.northing,r=e.easting,n=e.zoneLetter,o=e.zoneNumber;if(o<0||o>60)return null;var i,a,s,l,u,c,f,h,p=6378137,y=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),d=r-5e5,v=t;n<"N"&&(v-=1e7),c=6*(o-1)-180+3,h=(f=v/.9996/6367449.145945056)+(3*y/2-27*y*y*y/32)*Math.sin(2*f)+(21*y*y/16-55*y*y*y*y/32)*Math.sin(4*f)+151*y*y*y/96*Math.sin(6*f),i=p/Math.sqrt(1-.00669438*Math.sin(h)*Math.sin(h)),a=Math.tan(h)*Math.tan(h),s=.006739496752268451*Math.cos(h)*Math.cos(h),l=.99330562*p/Math.pow(1-.00669438*Math.sin(h)*Math.sin(h),1.5),u=d/(.9996*i);var m=h-i*Math.tan(h)/l*(u*u/2-(5+3*a+10*s-4*s*s-.06065547077041606)*u*u*u*u/24+(61+90*a+298*s+45*a*a-1.6983531815716497-3*s*s)*u*u*u*u*u*u/720);m=ZI(m);var b,g=(u-(1+2*a+s)*u*u*u/6+(5-2*s+28*a-3*s*s+.05391597401814761+24*a*a)*u*u*u*u*u/120)/Math.cos(h);if(g=c+ZI(g),e.accuracy){var S=$I({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});b={top:S.lat,right:S.lon,bottom:m,left:g}}else b={lat:m,lon:g};return b}function eN(e){var t=e%BI;return 0===t&&(t=BI),t}function tN(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,r=e.length,n=null,o="",i=0;!/[A-Z]/.test(t=e.charAt(i));){if(i>=2)throw"MGRSPoint bad conversion from: "+e;o+=t,i++}var a=parseInt(o,10);if(0===i||i+3>r)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(i++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(i,i+=2);for(var l=eN(a),u=function(e,t){var r=UI.charCodeAt(t-1),n=1e5,o=!1;for(;r!==e.charCodeAt(0);){if(++r===JI&&r++,r===zI&&r++,r>WI){if(o)throw"Bad character: "+e;r=HI,o=!0}n+=1e5}return n}(n.charAt(0),l),c=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var r=VI.charCodeAt(t-1),n=0,o=!1;for(;r!==e.charCodeAt(0);){if(++r===JI&&r++,r===zI&&r++,r>qI){if(o)throw"Bad character: "+e;r=HI,o=!0}n+=1e5}return n}(n.charAt(1),l);c0&&(h=1e5/Math.pow(10,d),p=e.substring(i,i+d),v=parseFloat(p)*h,y=e.substring(i+d),m=parseFloat(y)*h),{easting:v+u,northing:m+c,zoneLetter:s,zoneNumber:a,accuracy:h}}function rN(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 nN(e){"@babel/helpers - typeof";return(nN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oN(e,t,r){if(!(this instanceof oN))return new oN(e,t,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"===nN(e))this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}oN.fromMGRS=function(e){return new oN(QI(e))},oN.prototype.toMGRS=function(e){return XI([this.x,this.y],e)};var iN=oN,aN=1,sN=.25,lN=.046875,uN=.01953125,cN=.01068115234375,fN=.75,hN=.46875,pN=.013020833333333334,yN=.007120768229166667,dN=.3645833333333333,vN=.005696614583333333,mN=.3076171875;function bN(e){var t=[];t[0]=aN-e*(sN+e*(lN+e*(uN+e*cN))),t[1]=e*(fN-e*(lN+e*(uN+e*cN)));var r=e*e;return t[2]=r*(hN-e*(pN+e*yN)),r*=e,t[3]=r*(dN-e*vN),t[4]=r*e*mN,t}function gN(e,t,r,n){return r*=t,t*=t,n[0]*e-r*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var SN=20;function wN(e,t,r){for(var n=1/(1-t),o=e,i=SN;i;--i){var a=Math.sin(o),s=1-t*a*a;if(o-=s=(gN(o,a,Math.cos(o),r)-e)*(s*Math.sqrt(s))*n,Math.abs(s)jL?Math.tan(i):0,y=Math.pow(p,2),d=Math.pow(y,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var v=gN(i,s,l,this.en);r=this.a*(this.k0*u*(1+c/6*(1-y+f+c/20*(5-18*y+d+14*f-58*y*f+c/42*(61+179*d-d*y-479*y)))))+this.x0,n=this.a*(this.k0*(v-this.ml0+s*a*u/2*(1+c/12*(5-y+9*f+4*h+c/30*(61+d-58*y+270*f-330*y*f+c/56*(1385+543*d-d*y-3111*y))))))+this.y0}else{var m=l*Math.sin(a);if(Math.abs(Math.abs(m)-1)=1){if(m-1>jL)return 93;n=0}else n=Math.acos(n);i<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=r,e.y=n,e},inverse:function(e){var t,r,n,o,i=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(r=wN(t=this.ml0+a/this.k0,this.es,this.en),Math.abs(r)jL?Math.tan(r):0,c=this.ep2*Math.pow(l,2),f=Math.pow(c,2),h=Math.pow(u,2),p=Math.pow(h,2);t=1-this.es*Math.pow(s,2);var y=i*Math.sqrt(t)/this.k0,d=Math.pow(y,2);n=r-(t*=u)*d/(1-this.es)*.5*(1-d/12*(5+3*h-9*c*h+c-4*f-d/30*(61+90*h-252*c*h+45*p+46*c-d/56*(1385+3633*h+4095*p+1574*p*h)))),o=hI(this.long0+y*(1-d/6*(1+2*h+c-d/20*(5+28*h+24*p+8*c*h+6*c-d/42*(61+662*h+1320*p+720*p*h))))/l)}else n=kL*fI(a),o=0;else{var v=Math.exp(i/this.k0),m=.5*(v-1/v),b=this.lat0+a/this.k0,g=Math.cos(b);t=Math.sqrt((1-Math.pow(g,2))/(1+Math.pow(m,2))),n=Math.asin(t),a<0&&(n=-n),o=0===m&&0===g?0:hI(Math.atan2(m,g)+this.long0)}return e.x=o,e.y=n,e},names:["Transverse_Mercator","Transverse Mercator","tmerc"]};function _N(e){var t=Math.exp(e);return t=(t-1/t)/2}function xN(e,t){e=Math.abs(e),t=Math.abs(t);var r=Math.max(e,t),n=Math.min(e,t)/(r||1);return r*Math.sqrt(1+Math.pow(n,2))}function PN(e){var t=Math.abs(e);return t=function(e){var t=1+e,r=t-1;return 0===r?e:e*Math.log(t)/r}(t*(1+t/(xN(1,t)+1))),e<0?-t:t}function CN(e,t){for(var r,n=2*Math.cos(2*t),o=e.length-1,i=e[o],a=0;--o>=0;)r=n*i-a+e[o],a=i,i=r;return t+r*Math.sin(2*t)}function TN(e,t,r){for(var n,o,i=Math.sin(t),a=Math.cos(t),s=_N(r),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(r),u=2*a*l,c=-2*i*s,f=e.length-1,h=e[f],p=0,y=0,d=0;--f>=0;)n=y,o=p,h=u*(y=h)-n-c*(p=d)+e[f],d=c*y-o+u*p;return[(u=i*l)*h-(c=a*s)*d,u*d+c*h]}var EN={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),r=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),r*=t,this.cgb[1]=r*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),r*=t,this.cgb[2]=r*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=r*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),r*=t,this.cgb[3]=r*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=r*(1237/630+t*(t*(-24832/14175)-2.4)),r*=t,this.cgb[4]=r*(4174/315+t*(-144838/6237)),this.cbg[4]=r*(-734/315+t*(109598/31185)),r*=t,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+r*(.25+r*(1/64+r/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]=r*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=r*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),r*=t,this.utg[2]=r*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=r*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),r*=t,this.utg[3]=r*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=r*(49561/161280+t*(-179/168+t*(6601661/7257600))),r*=t,this.utg[4]=r*(-4583/161280+t*(108847/3991680)),this.gtu[4]=r*(34729/80640+t*(-3418889/1995840)),r*=t,this.utg[5]=-.03233083094085698*r,this.gtu[5]=.6650675310896665*r;var n=CN(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(e,t){for(var r,n=2*Math.cos(t),o=e.length-1,i=e[o],a=0;--o>=0;)r=n*i-a+e[o],a=i,i=r;return Math.sin(t)*r}(this.gtu,2*n))},forward:function(e){var t=hI(e.x-this.long0),r=e.y;r=CN(this.cbg,r);var n=Math.sin(r),o=Math.cos(r),i=Math.sin(t),a=Math.cos(t);r=Math.atan2(n,a*o),t=Math.atan2(i*o,xN(n,o*a)),t=PN(Math.tan(t));var s,l,u=TN(this.gtu,2*r,2*t);return r+=u[0],t+=u[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*r+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e},inverse:function(e){var t,r,n=(e.x-this.x0)*(1/this.a),o=(e.y-this.y0)*(1/this.a);if(o=(o-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var i=TN(this.utg,2*o,2*n);o+=i[0],n+=i[1],n=Math.atan(_N(n));var a=Math.sin(o),s=Math.cos(o),l=Math.sin(n),u=Math.cos(n);o=Math.atan2(a*u,xN(l,u*s)),t=hI((n=Math.atan2(l,u*s))+this.long0),r=CN(this.cgb,o)}else t=1/0,r=1/0;return e.x=t,e.y=r,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]};var kN={init:function(){var e=function(e,t){if(void 0===e){if((e=Math.floor(30*(hI(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)*LL,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,EN.init.apply(this),this.forward=EN.forward,this.inverse=EN.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function RN(e,t){return Math.pow((1-e)/(1+e),t)}var MN=20;var AN={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+NL)/(Math.pow(Math.tan(.5*this.lat0+NL),this.C)*RN(this.e*e,this.ratexp))},forward:function(e){var t=e.x,r=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+NL),this.C)*RN(this.e*Math.sin(r),this.ratexp))-kL,e.x=this.C*t,e},inverse:function(e){for(var t=e.x/this.C,r=e.y,n=Math.pow(Math.tan(.5*r+NL)/this.K,1/this.C),o=MN;o>0&&(r=2*Math.atan(n*RN(this.e*Math.sin(e.y),-.5*this.e))-kL,!(Math.abs(r-e.y)<1e-14));--o)e.y=r;return o?(e.x=t,e.y=r,e):null},names:["gauss"]};var jN={init:function(){AN.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,r,n,o;return e.x=hI(e.x-this.long0),AN.forward.apply(this,[e]),t=Math.sin(e.y),r=Math.cos(e.y),n=Math.cos(e.x),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*r*n),e.x=o*r*Math.sin(e.x),e.y=o*(this.cosc0*t-this.sinc0*r*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,r,n,o,i;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,i=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(i,this.R2);t=Math.sin(a),r=Math.cos(a),o=Math.asin(r*this.sinc0+e.y*t*this.cosc0/i),n=Math.atan2(e.x*t,i*this.cosc0*r-e.y*this.sinc0*t)}else o=this.phic0,n=0;return e.x=n,e.y=o,AN.inverse.apply(this,[e]),e.x=hI(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var LN={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)<=jL&&(this.k0=.5*(1+fI(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=jL&&(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)<=jL&&(this.k0=.5*this.cons*cI(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/pI(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=cI(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-kL,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,r,n,o,i,a,s=e.x,l=e.y,u=Math.sin(l),c=Math.cos(l),f=hI(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=jL&&Math.abs(l+this.lat0)<=jL?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*u+this.coslat0*c*Math.cos(f)),e.x=this.a*t*c*Math.sin(f)+this.x0,e.y=this.a*t*(this.coslat0*u-this.sinlat0*c*Math.cos(f))+this.y0,e):(r=2*Math.atan(this.ssfn_(l,u,this.e))-kL,o=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=jL?(i=pI(this.e,l*this.con,this.con*u),a=2*this.a*this.k0*i/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)0?hI(this.long0+Math.atan2(e.x,-1*e.y)):hI(this.long0+Math.atan2(e.x,e.y)):hI(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=r,e)}if(Math.abs(this.coslat0)<=jL){if(a<=jL)return r=this.lat0,t=this.long0,e.x=t,e.y=r,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),r=this.con*yI(this.e,n),t=this.con*hI(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else o=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=jL?i=this.X0:(i=Math.asin(Math.cos(o)*this.sinX0+e.y*Math.sin(o)*this.cosX0/a),t=hI(this.long0+Math.atan2(e.x*Math.sin(o),a*this.cosX0*Math.cos(o)-e.y*this.sinX0*Math.sin(o)))),r=-1*yI(this.e,Math.tan(.5*(kL+i)));return e.x=t,e.y=r,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,t,r){return t*=r,Math.tan(.5*(kL+e))*Math.pow((1-t)/(1+t),.5*r)}};var IN={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),r=this.a,n=1/this.rf,o=2*n-Math.pow(n,2),i=this.e=Math.sqrt(o);this.R=this.k0*r*Math.sqrt(1-o)/(1-o*Math.pow(t,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+i*t)/(1-i*t));this.K=a-this.alpha*s+this.alpha*i/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+r)+this.K,o=2*(Math.atan(Math.exp(n))-Math.PI/4),i=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(i)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(i))),s=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(i));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,r=e.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),i=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),s=this.lambda0+a/this.alpha,l=0,u=i,c=-1e3,f=0;Math.abs(u-c)>1e-7;){if(++f>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+i/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=u,e},names:["somerc"]};var NN={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),r=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-r*r);var n,o,i=pI(this.e,this.lat0,e),a=this.bl/t*Math.sqrt((1-this.es)/(1-r*r));if(a*a<1&&(a=1),isNaN(this.longc)){var s=pI(this.e,this.lat1,Math.sin(this.lat1)),l=pI(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(a+Math.sqrt(a*a-1))*Math.pow(i,this.bl):this.el=(a-Math.sqrt(a*a-1))*Math.pow(i,this.bl);var u=Math.pow(s,this.bl),c=Math.pow(l,this.bl);o=.5*((n=this.el/u)-1/n);var f=(this.el*this.el-c*u)/(this.el*this.el+c*u),h=(c-u)/(c+u),p=hI(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(f*Math.tan(.5*this.bl*p)/h)/this.bl,this.long0=hI(this.long0);var y=hI(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*y)/o),this.alpha=Math.asin(a*Math.sin(this.gamma0))}else n=this.lat0>=0?a+Math.sqrt(a*a-1):a-Math.sqrt(a*a-1),this.el=n*Math.pow(i,this.bl),o=.5*(n-1/n),this.gamma0=Math.asin(Math.sin(this.alpha)/a),this.long0=this.longc-Math.asin(o*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(a*a-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha))},forward:function(e){var t,r,n,o=e.x,i=e.y,a=hI(o-this.long0);if(Math.abs(Math.abs(i)-kL)<=jL)n=i>0?-1:1,r=this.al/this.bl*Math.log(Math.tan(NL+n*this.gamma0*.5)),t=-1*n*kL*this.al/this.bl;else{var s=pI(this.e,i,Math.sin(i)),l=this.el/Math.pow(s,this.bl),u=.5*(l-1/l),c=.5*(l+1/l),f=Math.sin(this.bl*a),h=(u*Math.sin(this.gamma0)-f*Math.cos(this.gamma0))/c;r=Math.abs(Math.abs(h)-1)<=jL?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-h)/(1+h))/this.bl,t=Math.abs(Math.cos(this.bl*a))<=jL?this.al*this.bl*a:this.al*Math.atan2(u*Math.cos(this.gamma0)+f*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+r):(t-=this.uc,e.x=this.x0+r*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-r*Math.sin(this.alpha)),e},inverse:function(e){var t,r;this.no_rot?(r=e.y-this.y0,t=e.x-this.x0):(r=(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 n=Math.exp(-1*this.bl*r/this.al),o=.5*(n-1/n),i=.5*(n+1/n),a=Math.sin(this.bl*t/this.al),s=(a*Math.cos(this.gamma0)+o*Math.sin(this.gamma0))/i,l=Math.pow(this.el/Math.sqrt((1+s)/(1-s)),1/this.bl);return Math.abs(s-1)jL?this.ns=Math.log(n/s)/Math.log(o/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,r=e.y;Math.abs(2*Math.abs(r)-Math.PI)<=jL&&(r=fI(r)*(kL-2*jL));var n,o,i=Math.abs(Math.abs(r)-kL);if(i>jL)n=pI(this.e,r,Math.sin(r)),o=this.a*this.f0*Math.pow(n,this.ns);else{if((i=r*this.ns)<=0)return null;o=0}var a=this.ns*hI(t-this.long0);return e.x=this.k0*(o*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-o*Math.cos(a))+this.y0,e},inverse:function(e){var t,r,n,o,i,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),r=1):(t=-Math.sqrt(a*a+s*s),r=-1);var l=0;if(0!==t&&(l=Math.atan2(r*a,r*s)),0!==t||this.ns>0){if(r=1/this.ns,n=Math.pow(t/(this.a*this.f0),r),-9999===(o=yI(this.e,n)))return null}else o=-kL;return i=hI(l/this.ns+this.long0),e.x=i,e.y=o,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]};var FN={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,r,n,o,i,a,s,l=e.x,u=e.y,c=hI(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),i=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(o)),a=this.n*i,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,r,n,o,i,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),i=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/i,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),r=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(t)),e.x=this.long0-r/this.alfa,a=t,s=0;var u=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(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,u+=1}while(0===s&&u<15);return u>=15?null:e},names:["Krovak","krovak"]};function GN(e,t,r,n,o){return e*o-t*Math.sin(2*o)+r*Math.sin(4*o)-n*Math.sin(6*o)}function BN(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function UN(e){return.375*e*(1+.25*e*(1+.46875*e))}function VN(e){return.05859375*e*e*(1+.75*e)}function HN(e){return e*e*e*(35/3072)}function JN(e,t,r){var n=t*r;return e/Math.sqrt(1-n*n)}function zN(e){return Math.abs(e)1e-7?(1-e*e)*(t/(1-(r=e*t)*r)-.5/e*Math.log((1-r)/(1+r))):2*t}var XN=.3333333333333333,QN=.17222222222222222,KN=.10257936507936508,ZN=.06388888888888888,$N=.0664021164021164,eD=.016415012942191543;var tD={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-kL)0)switch(this.qp=YN(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,r=[];return r[0]=e*XN,t=e*e,r[0]+=t*QN,r[1]=t*ZN,t*=e,r[0]+=t*KN,r[1]+=t*$N,r[2]=t*eD,r}(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=YN(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,r,n,o,i,a,s,l,u,c,f=e.x,h=e.y;if(f=hI(f-this.long0),this.sphere){if(i=Math.sin(h),c=Math.cos(h),n=Math.cos(f),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+c*n:1+this.sinph0*i+this.cosph0*c*n)<=jL)return null;t=(r=Math.sqrt(2/r))*c*Math.sin(f),r*=this.mode===this.EQUIT?i:this.cosph0*i-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(h+this.lat0)=0?(t=(u=Math.sqrt(a))*o,r=n*(this.mode===this.S_POLE?u:-u)):t=r=0}}return e.x=this.a*t+this.x0,e.y=this.a*r+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,r,n,o,i,a,s,l,u,c,f=e.x/this.a,h=e.y/this.a;if(this.sphere){var p,y=0,d=0;if((r=.5*(p=Math.sqrt(f*f+h*h)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(r),y=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(p)<=jL?0:Math.asin(h*d/p),f*=d,h=y*p;break;case this.OBLIQ:r=Math.abs(p)<=jL?this.lat0:Math.asin(y*this.sinph0+h*d*this.cosph0/p),f*=d*this.cosph0,h=(y-Math.sin(r)*this.sinph0)*p;break;case this.N_POLE:h=-h,r=kL-r;break;case this.S_POLE:r-=kL}t=0!==h||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,h):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,h*=this.dd,(a=Math.sqrt(f*f+h*h))1&&(e=e>1?1:-1),Math.asin(e)}var nD={init:function(){Math.abs(this.lat1+this.lat2)jL?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,r=e.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=YN(this.e3,this.sin_phi,this.cos_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,i=this.ns0*hI(t-this.long0),a=o*Math.sin(i)+this.x0,s=this.rh-o*Math.cos(i)+this.y0;return e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a;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),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),o=0,0!==t&&(o=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,r)),i=hI(o/this.ns0+this.long0),e.x=i,e.y=a,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var r,n,o,i,a,s=rD(.5*t);if(e0||Math.abs(i)<=jL?(a=this.x0+1*this.a*r*Math.sin(n)/i,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*o)/i):(a=this.x0+this.infinity_dist*r*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*r*o)),e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a;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))?(o=Math.atan2(t,this.rc),r=Math.sin(o),a=rD((n=Math.cos(o))*this.sin_p14+e.y*r*this.cos_p14/t),i=Math.atan2(e.x*r,t*this.cos_p14*n-e.y*this.sin_p14*r),i=hI(this.long0+i)):(a=this.phic0,i=0),e.x=i,e.y=a,e},names:["gnom"]};var iD={init:function(){this.sphere||(this.k0=cI(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,r,n=e.x,o=e.y,i=hI(n-this.long0);if(this.sphere)t=this.x0+this.a*i*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(o)/Math.cos(this.lat_ts);else{var a=YN(this.e,Math.sin(o));t=this.x0+this.a*this.k0*i,r=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=r,e},inverse:function(e){var t,r;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=hI(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=function(e,t){var r=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-r)<1e-6)return t<0?-1*kL:kL;for(var n,o,i,a,s=Math.asin(.5*t),l=0;l<30;l++)if(o=Math.sin(s),i=Math.cos(s),a=e*o,s+=n=Math.pow(1-a*a,2)/(2*i)*(t/(1-e*e)-o/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN}(this.e,2*e.y*this.k0/this.a),t=hI(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=r,e},names:["cea"]};var aD={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,r=e.y,n=hI(t-this.long0),o=zN(r-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*o,e},inverse:function(e){var t=e.x,r=e.y;return e.x=hI(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=zN(this.lat0+(r-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},sD=20;var lD={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=BN(this.es),this.e1=UN(this.es),this.e2=VN(this.es),this.e3=HN(this.es),this.ml0=this.a*GN(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,r,n,o=e.x,i=e.y,a=hI(o-this.long0);if(n=a*Math.sin(i),this.sphere)Math.abs(i)<=jL?(t=this.a*a,r=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(i),r=this.a*(zN(i-this.lat0)+(1-Math.cos(n))/Math.tan(i)));else if(Math.abs(i)<=jL)t=this.a*a,r=-1*this.ml0;else{var s=JN(this.a,this.e,Math.sin(i))/Math.tan(i);t=s*Math.sin(n),r=this.a*GN(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=r+this.y0,e},inverse:function(e){var t,r,n,o,i,a,s,l,u;if(n=e.x-this.x0,o=e.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=jL)t=hI(n/this.a+this.long0),r=0;else{var c;for(a=this.lat0+o/this.a,s=n*n/this.a/this.a+a*a,l=a,i=sD;i;--i)if(l+=u=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(u)<=jL){r=l;break}t=hI(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(r))}else if(Math.abs(o+this.ml0)<=jL)r=0,t=hI(this.long0+n/this.a);else{var f,h,p,y,d;for(a=(this.ml0+o)/this.a,s=n*n/this.a/this.a+a*a,l=a,i=sD;i;--i)if(d=this.e*Math.sin(l),f=Math.sqrt(1-d*d)*Math.tan(l),h=this.a*GN(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-=u=(a*(f*(y=h/this.a)+1)-y-.5*f*(y*y+s))/(this.es*Math.sin(2*l)*(y*y+s-2*a*y)/(4*f)+(a-y)*(f*p-2/Math.sin(2*l))-p),Math.abs(u)<=jL){r=l;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),t=hI(this.long0+Math.asin(n*f/this.a)/Math.sin(r))}return e.x=t,e.y=r,e},names:["Polyconic","poly"]};var uD={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,r=e.x,n=e.y-this.lat0,o=r-this.long0,i=n/EL*1e-5,a=o,s=1,l=0;for(t=1;t<=10;t++)s*=i,l+=this.A[t]*s;var u,c=l,f=a,h=1,p=0,y=0,d=0;for(t=1;t<=6;t++)u=p*c+h*f,h=h*c-p*f,p=u,y=y+this.B_re[t]*h-this.B_im[t]*p,d=d+this.B_im[t]*h+this.B_re[t]*p;return e.x=d*this.a+this.x0,e.y=y*this.a+this.y0,e},inverse:function(e){var t,r,n=e.x,o=e.y,i=n-this.x0,a=(o-this.y0)/this.a,s=i/this.a,l=1,u=0,c=0,f=0;for(t=1;t<=6;t++)r=u*a+l*s,l=l*a-u*s,u=r,c=c+this.C_re[t]*l-this.C_im[t]*u,f=f+this.C_im[t]*l+this.C_re[t]*u;for(var h=0;h.999999999999&&(r=.999999999999),t=Math.asin(r);var n=hI(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*t+Math.sin(2*t))/Math.PI,Math.abs(r)>1&&(r=1);var o=Math.asin(r);return e.x=n,e.y=o,e},names:["Mollweide","moll"]};var yD={init:function(){Math.abs(this.lat1+this.lat2)=0?(r=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(r=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var i=0;return 0!==r&&(i=Math.atan2(t*e.x,t*e.y)),this.sphere?(o=hI(this.long0+i/this.ns),n=zN(this.g-r/this.a),e.x=o,e.y=n,e):(n=qN(this.g-r/this.a,this.e0,this.e1,this.e2,this.e3),o=hI(this.long0+i/this.ns),e.x=o,e.y=n,e)},names:["Equidistant_Conic","eqdc"]};var dD={init:function(){this.R=this.a},forward:function(e){var t,r,n=e.x,o=e.y,i=hI(n-this.long0);Math.abs(o)<=jL&&(t=this.x0+this.R*i,r=this.y0);var a=rD(2*Math.abs(o/Math.PI));(Math.abs(i)<=jL||Math.abs(Math.abs(o)-kL)<=jL)&&(t=this.x0,r=o>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/i-i/Math.PI),l=s*s,u=Math.sin(a),c=Math.cos(a),f=c/(u+c-1),h=f*f,p=f*(2/u-1),y=p*p,d=Math.PI*this.R*(s*(f-y)+Math.sqrt(l*(f-y)*(f-y)-(y+l)*(h-y)))/(y+l);i<0&&(d=-d),t=this.x0+d;var v=l+f;return d=Math.PI*this.R*(p*v-s*Math.sqrt((y+l)*(l+1)-v*v))/(y+l),r=o>=0?this.y0+d:this.y0-d,e.x=t,e.y=r,e},inverse:function(e){var t,r,n,o,i,a,s,l,u,c,f,h;return e.x-=this.x0,e.y-=this.y0,f=Math.PI*this.R,i=(n=e.x/f)*n+(o=e.y/f)*o,f=3*(o*o/(l=-2*(a=-Math.abs(o)*(1+i))+1+2*o*o+i*i)+(2*(s=a-2*o*o+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(u=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-u/3)),Math.abs(f)>1&&(f=f>=0?1:-1),h=Math.acos(f)/3,r=e.y>=0?(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)2*kL*this.a)return;return r=t/this.a,n=Math.sin(r),o=Math.cos(r),i=this.long0,Math.abs(t)<=jL?a=this.lat0:(a=rD(o*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-kL,i=Math.abs(s)<=jL?this.lat0>=0?hI(this.long0+Math.atan2(e.x,-e.y)):hI(this.long0-Math.atan2(-e.x,e.y)):hI(this.long0+Math.atan2(e.x*n,t*this.cos_p12*o-e.y*this.sin_p12*n))),e.x=i,e.y=a,e}return l=BN(this.es),u=UN(this.es),c=VN(this.es),f=HN(this.es),Math.abs(this.sin_p12-1)<=jL?(a=qN(((h=this.a*GN(l,u,c,f,kL))-(t=Math.sqrt(e.x*e.x+e.y*e.y)))/this.a,l,u,c,f),i=hI(this.long0+Math.atan2(e.x,-1*e.y)),e.x=i,e.y=a,e):Math.abs(this.sin_p12+1)<=jL?(h=this.a*GN(l,u,c,f,kL),a=qN(((t=Math.sqrt(e.x*e.x+e.y*e.y))-h)/this.a,l,u,c,f),i=hI(this.long0+Math.atan2(e.x,e.y)),e.x=i,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),d=Math.atan2(e.x,e.y),p=JN(this.a,this.e,this.sin_p12),v=Math.cos(d),b=-(m=this.e*this.cos_p12*v)*m/(1-this.es),g=3*this.es*(1-b)*this.sin_p12*this.cos_p12*v/(1-this.es),O=1-b*(w=(S=t/p)-b*(1+b)*Math.pow(S,3)/6-g*(1+3*b)*Math.pow(S,4)/24)*w/2-S*w*w*w/6,y=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*v),i=hI(this.long0+Math.asin(Math.sin(d)*Math.sin(w)/Math.cos(y))),_=Math.sin(y),a=Math.atan2((_-this.es*O*this.sin_p12)*Math.tan(y),_*(1-this.es)),e.x=i,e.y=a,e)},names:["Azimuthal_Equidistant","aeqd"]};var mD={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,r,n,o,i,a,s,l=e.x,u=e.y;return n=hI(l-this.long0),t=Math.sin(u),r=Math.cos(u),o=Math.cos(n),((i=this.sin_p14*t+this.cos_p14*r*o)>0||Math.abs(i)<=jL)&&(a=1*this.a*r*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*o)),e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a,s;return e.x-=this.x0,e.y-=this.y0,r=rD((t=Math.sqrt(e.x*e.x+e.y*e.y))/this.a),n=Math.sin(r),o=Math.cos(r),a=this.long0,Math.abs(t)<=jL?(s=this.lat0,e.x=a,e.y=s,e):(s=rD(o*this.sin_p14+e.y*n*this.cos_p14/t),i=Math.abs(this.lat0)-kL,Math.abs(i)<=jL?(a=this.lat0>=0?hI(this.long0+Math.atan2(e.x,-e.y)):hI(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=hI(this.long0+Math.atan2(e.x*n,t*this.cos_p14*o-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))},names:["ortho"]},bD={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},gD={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function SD(e,t,r,n){var o;return eNL&&o<=kL+NL?(n.value=gD.AREA_1,o-=kL):o>kL+NL||o<=-(kL+NL)?(n.value=gD.AREA_2,o=o>=0?o-FL:o+FL):(n.value=gD.AREA_3,o+=kL)),o}function wD(e,t){var r=e+t;return r<-FL?r+=DL:r>+FL&&(r-=DL),r}var OD={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>=kL-NL/2?this.face=bD.TOP:this.lat0<=-(kL-NL/2)?this.face=bD.BOTTOM:Math.abs(this.long0)<=NL?this.face=bD.FRONT:Math.abs(this.long0)<=kL+NL?this.face=this.long0>0?bD.RIGHT:bD.LEFT:this.face=bD.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,r,n,o,i,a,s={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,r=e.x,this.face===bD.TOP)o=kL-t,r>=NL&&r<=kL+NL?(l.value=gD.AREA_0,n=r-kL):r>kL+NL||r<=-(kL+NL)?(l.value=gD.AREA_1,n=r>0?r-FL:r+FL):r>-(kL+NL)&&r<=-NL?(l.value=gD.AREA_2,n=r+kL):(l.value=gD.AREA_3,n=r);else if(this.face===bD.BOTTOM)o=kL+t,r>=NL&&r<=kL+NL?(l.value=gD.AREA_0,n=-r+kL):r=-NL?(l.value=gD.AREA_1,n=-r):r<-NL&&r>=-(kL+NL)?(l.value=gD.AREA_2,n=-r-kL):(l.value=gD.AREA_3,n=r>0?-r+FL:-r-FL);else{var u,c,f,h,p,y;this.face===bD.RIGHT?r=wD(r,+kL):this.face===bD.BACK?r=wD(r,+FL):this.face===bD.LEFT&&(r=wD(r,-kL)),h=Math.sin(t),p=Math.cos(t),y=Math.sin(r),u=p*Math.cos(r),c=p*y,f=h,this.face===bD.FRONT?n=SD(o=Math.acos(u),f,c,l):this.face===bD.RIGHT?n=SD(o=Math.acos(c),f,-u,l):this.face===bD.BACK?n=SD(o=Math.acos(-u),f,-c,l):this.face===bD.LEFT?n=SD(o=Math.acos(-c),f,u,l):(o=n=0,l.value=gD.AREA_0)}return a=Math.atan(12/FL*(n+Math.acos(Math.sin(n)*Math.cos(NL))-kL)),i=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===gD.AREA_1?a+=kL:l.value===gD.AREA_2?a+=FL:l.value===gD.AREA_3&&(a+=1.5*FL),s.x=i*Math.cos(a),s.y=i*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e},inverse:function(e){var t,r,n,o,i,a,s,l,u,c,f,h,p={lam:0,phi:0},y={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,r=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)?y.value=gD.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(y.value=gD.AREA_1,t-=kL):e.x<0&&-e.x>=Math.abs(e.y)?(y.value=gD.AREA_2,t=t<0?t+FL:t-FL):(y.value=gD.AREA_3,t+=kL),u=FL/12*Math.tan(t),i=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(i),(s=1-(n=Math.cos(t))*n*(o=Math.tan(r))*o*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===bD.TOP)l=Math.acos(s),p.phi=kL-l,y.value===gD.AREA_0?p.lam=a+kL:y.value===gD.AREA_1?p.lam=a<0?a+FL:a-FL:y.value===gD.AREA_2?p.lam=a-kL:p.lam=a;else if(this.face===bD.BOTTOM)l=Math.acos(s),p.phi=l-kL,y.value===gD.AREA_0?p.lam=-a+kL:y.value===gD.AREA_1?p.lam=-a:y.value===gD.AREA_2?p.lam=-a-kL:p.lam=a<0?-a-FL:-a+FL;else{var d,v,m;u=(d=s)*d,v=(u+=(m=u>=1?0:Math.sqrt(1-u)*Math.sin(a))*m)>=1?0:Math.sqrt(1-u),y.value===gD.AREA_1?(u=v,v=-m,m=u):y.value===gD.AREA_2?(v=-v,m=-m):y.value===gD.AREA_3&&(u=v,v=m,m=-u),this.face===bD.RIGHT?(u=d,d=-v,v=u):this.face===bD.BACK?(d=-d,v=-v):this.face===bD.LEFT&&(u=d,d=v,v=-u),p.phi=Math.acos(-m)-kL,p.lam=Math.atan2(v,d),this.face===bD.RIGHT?p.lam=wD(p.lam,-kL):this.face===bD.BACK?p.lam=wD(p.lam,-FL):this.face===bD.LEFT&&(p.lam=wD(p.lam,+kL))}return 0!==this.es&&(c=p.phi<0?1:0,f=Math.tan(p.phi),h=this.b/Math.sqrt(f*f+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-h*h)/(this.one_minus_f*h)),c&&(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"]},_D=[[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]],xD=[[-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]],PD=.8487,CD=1.3523,TD=IL/5,ED=1/TD,kD=18,RD=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},MD=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};var AD={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=hI(e.x-this.long0),r=Math.abs(e.y),n=Math.floor(r*TD);n<0?n=0:n>=kD&&(n=kD-1),r=IL*(r-ED*n);var o={x:RD(_D[n],r)*t,y:RD(xD[n],r)};return e.y<0&&(o.y=-o.y),o.x=o.x*this.a*PD+this.x0,o.y=o.y*this.a*CD+this.y0,o},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*PD),y:Math.abs(e.y-this.y0)/(this.a*CD)};if(t.y>=1)t.x/=_D[kD][0],t.y=e.y<0?-kL:kL;else{var r=Math.floor(t.y*kD);for(r<0?r=0:r>=kD&&(r=kD-1);;)if(xD[r][0]>t.y)--r;else{if(!(xD[r+1][0]<=t.y))break;++r}var n=xD[r],o=5*(t.y-n[0])/(xD[r+1][0]-n[0]);o=function(e,t,r,n){for(var o=t;n;--n){var i=e(o);if(o-=i,Math.abs(i)© SuperMap iServer with © SuperMap iClient",canvasFunction:a,logo:"4"===ij.getOlVersion()?n.logo:null,projection:n.projection,ratio:n.ratio,resolutions:n.resolutions,state:n.state})).id=n.id?n.id:ae.createUniqueID("themeLayer_"),r.canvasFunctionInternal_=a,r.EVENT_TYPES=["loadstart","loadend","loadcancel","visibilitychanged","move","moveend","added","removed","tileloaded","beforefeaturesadded","featuresadded","featuresremoved"],r.features=[],r.TFEvents=n.TFEvents||[],r.map=n.map;var s=r.map.getSize();return r.div=document.createElement("div"),r.map.getViewport().appendChild(r.div),r.div.style.width=s[0]+"px",r.div.style.height=s[1]+"px",r.setOpacity(n.opacity),r.levelRenderer=new wR,r.movingOffset=[0,0],r.renderer=r.levelRenderer.init(r.div),r.map.getViewport().removeChild(r.div),r.renderer.clear(),r.addTFEvents(),r}return t=i,(r=[{key:"destroy",value:function(){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}},{key:"destroyFeatures",value:function(e){if(void 0==e&&(e=this.features),e){this.removeFeatures(e);for(var t=e.length-1;t>=0;t--)e[t].destroy()}}},{key:"setOpacity",value:function(e){if(e!==this.opacity){this.opacity=e;var t=this.div;ae.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.dispatchEvent({type:"changelayer",value:{layer:this,property:"opacity"}})}}},{key:"addFeatures",value:function(e){}},{key:"removeFeatures",value:function(e){if(e&&0!==e.length){if(e===this.features)return this.removeAllFeatures();ae.isArray(e)||(e=[e]);for(var t=[],r=e.length-1;r>=0;r--){var n=e[r],o=ae.indexOf(this.features,n);-1!==o?this.features.splice(o,1):t.push(n)}for(var i=[],a=0,s=this.features.length;a=r.left&&a.x<=r.right&&a.y>=r.top&&a.y<=r.bottom){n=!0;break}}return n}},{key:"clearCache",value:function(){this.cache={},this.charts=[]}},{key:"removeFeatures",value:function(e){this.clearCache(),sF(cF(i.prototype),"removeFeatures",this).call(this,e)}},{key:"removeAllFeatures",value:function(){this.clearCache(),sF(cF(i.prototype),"removeAllFeatures",this).call(this)}},{key:"redraw",value:function(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getView().calculateExtent()),!0)}},{key:"clear",value:function(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}},{key:"canvasFunctionInternal_",value:function(e,t,r,n,o){return oF.prototype.canvasFunctionInternal_.apply(this,arguments)}}])&&aF(t.prototype,r),n&&aF(t,n),i}(),hF=ol.style.RegularShape,pF=r.n(hF);function yF(e){"@babel/helpers - typeof";return(yF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dF(e,t){for(var r=0;r-1&&(this._data=e),this._renderLayer){this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();var t=this._getLayerState();t.data=this._data||[],this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)}}},{key:"drawGraphics",value:function(e){this._data=e||(this._data?this._data:[]),this._renderLayer||this._createInnerRender(),this._clearBuffer(),this._draw()}},{key:"_initContainer",value:function(){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)}},{key:"_createCanvas",value:function(e,t){var r=document.createElement("canvas");return r.oncontextmenu=LF,r.width=e,r.height=t,r.style.width=e+"px",r.style.height=t+"px",r}},{key:"_createInnerRender",value:function(){var e=this,t=this._getLayerState(),r=t.color,n=t.radius,o=t.opacity,i=t.highlightColor,a=t.radiusScale,s=t.radiusMinPixels,l=t.radiusMaxPixels,u=t.strokeWidth,c=t.outline;n=this._pixelToMeter(n);var f={id:"scatter-plot",data:[],pickable:Boolean(this.onClick)||Boolean(this.onHover),autoHighlight:!0,color:r,opacity:o,radius:n,radiusScale:a,highlightColor:i,radiusMinPixels:s,radiusMaxPixels:l,strokeWidth:u,outline:c,getPosition:function(t){if(!t)return[0,0,0];var r=t.getGeometry(),n=r&&r.getCoordinates();return(n=e._project(n))&&[n[0],n[1],0]},getColor:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.getStyle();return n&&n.getColor()||r.color},getRadius:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.getStyle();return n&&n.getRadius()||r.radius},updateTriggers:{getColor:[r],getRadius:[n]}},h=this;this.onClick&&(f.onClick=function(){h._canvas.style.cursor="pointer",h.onClick.apply(h,arguments)}),this.onHover&&(f.onHover=function(){h._canvas.style.cursor="pointer",h.onHover.apply(h,arguments)}),e._renderLayer=new window.DeckGL.ScatterplotLayer(f)}},{key:"_getLayerDefaultStyle",value:function(){var e=this._getLayerState(),t=e.color,r=e.opacity,n=e.radius,o=e.radiusScale,i=e.radiusMinPixels,a=e.radiusMaxPixels,s=e.strokeWidth,l=e.outline;return{color:t,opacity:r,radius:n=this._pixelToMeter(n),radiusScale:o,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:s,outline:l}}},{key:"_getLayerState",value:function(){var e=this.layer.getLayerState(),t=this.map.getView().getProjection().getCode(),r=sA.transform([e.longitude,e.latitude],t,"EPSG:4326");return e.longitude=r[0],e.latitude=r[1],e.zoom=e.zoom-1,e}},{key:"_draw",value:function(){this._refreshData();var e=this._getLayerState();e.data=this._data||[];var t={};for(var r in e)t[r]=e[r];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)}},{key:"_refreshData",value:function(){var e=this._data||[],t=ij.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(var r=0;r=0;s--){var l=a[s].getStyle();if(!l)return;if(!(l instanceof PF)){var u=a[s].getGeometry().getCoordinates(),c=new(uj())({image:l}).getImage(),f=!1;if(c instanceof gF&&1===c.getCount()){var h=180*c.getRotation()/Math.PI,p=Number.parseFloat(c.getAngle()),y=c.getRadius()*t,d=null;if(p>355)d=new(pj())(u,y);else{var v=[];v.push(u);for(var m=p/8,b=0;b<8;b++){var g=(h+b*m)/180*Math.PI;v.push([u[0]+y*Math.cos(g),u[1]-y*Math.sin(g)])}v.push(u),d=new(ZF())([v])}d.intersectsCoordinate(this.map.getCoordinateFromPixel(o))&&(f=!0)}else{var S=[];S[0]=u[0]-c.getAnchor()[0]*t,S[2]=u[0]+c.getAnchor()[0]*t,S[1]=u[1]-c.getAnchor()[1]*t,S[3]=u[1]+c.getAnchor()[1]*t,QF.containsCoordinate(S,e)&&(f=!0)}!0!==f||n&&n(a[s],i)}}return};var r=iG(t);return e.onClick&&r.map.on("click",function(t){if(!(r.renderer instanceof NF))for(var n=r.map.getFeaturesAtPixel(t.pixel)||[],o=0;o-1){e.onClick(i,t),r.isHighLight&&r._highLight(i.getGeometry().getCoordinates(),new(uj())({image:i.getStyle()}).getImage(),i,t.pixel);break}}}),t}return t=i,(r=[{key:"setGraphics",value:function(e){this.graphics=this.graphics||[],this.graphics.length=0;var t=ij.isArray(e)?[].concat(e):[e];this.graphics=[].concat(t),this.update()}},{key:"addGraphics",value:function(e){this.graphics=this.graphics||[];var t=ij.isArray(e)?[].concat(e):[e];this.graphics=this.graphics.concat(t),this.update()}},{key:"getGraphicBy",value:function(e,t){var r=null;for(var n in this.graphics)if(this.graphics[n][e]===t){r=this.graphics[n];break}return r}},{key:"getGraphicById",value:function(e){return this.getGraphicBy("id",e)}},{key:"getGraphicsByAttribute",value:function(e,t){var r,n=[];for(var o in this.graphics)(r=this.graphics[o])&&r.attributes&&r.attributes[e]===t&&n.push(r);return n}},{key:"removeGraphics",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,void this.update();ae.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--){var r=e[t],n=ae.indexOf(this.graphics,r);-1!==n&&this.graphics.splice(n,1)}this.update()}},{key:"clear",value:function(){this.removeGraphics()}},{key:"update",value:function(){this.renderer.update(this.graphics,this._getDefaultStyle())}},{key:"_getDefaultStyle",value:function(){var e={};return this.color&&(e.fill=new(dj())({color:this.toRGBA(this.color)})),this.radius&&(e.radius=this.radius),this.outline&&(e.stroke=new(dj())({color:this.toRGBA(this.color),width:this.strokeWidth})),new(pj())(e)}},{key:"toRGBA",value:function(e){return"rgba(".concat(e[0],",").concat(e[1],",").concat(e[2],",").concat((e[3]||255)/255,")")}},{key:"setStyle",value:function(e){var 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};ae.extend(this,ae.extend(t,e)),this.update()}},{key:"getLayerState",value:function(){var e=this.map,t=e.getSize()[0],r=e.getSize()[1],n=e.getView(),o=n.getCenter(),i={longitude:o[0],latitude:o[1],zoom:n.getZoom(),maxZoom:n.getMaxZoom(),pitch:0,bearing:180*-n.getRotation()/Math.PI},a={};for(var s in i)a[s]=i[s];return a.width=t,a.height=r,a.color=this.color,a.radius=this.radius,a.opacity=this.opacity,a.highlightColor=this.highlightColor,a.radiusScale=this.radiusScale,a.radiusMinPixels=this.radiusMinPixels,a.radiusMaxPixels=this.radiusMaxPixels,a.strokeWidth=this.strokeWidth,a.outline=this.outline,a}},{key:"_highLightClose",value:function(){this.selected=null,this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null),this.changed()}},{key:"_highLight",value:function(e,t,r,n){if(r.getStyle()instanceof gF){this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null);var o=this.map.getPixelFromCoordinate([e[0],e[1]]);n=n||[0,0];var a=Math.atan2(n[1]-o[1],n[0]-o[0])/Math.PI*180;a=a>0?a:360+a;var s=(Math.ceil(a/(t.getAngle()+t.getSpaceAngle()))-1)*(t.getAngle()+t.getSpaceAngle()),l={stroke:new(mj())({color:"#ff0000",width:1}),fill:new(dj())({color:"#0099ff"}),radius:t.getRadius(),angle:t.getAngle(),eAngle:s+t.getAngle(),sAngle:s,rotation:t.getRotation()};this.highLightStyle&&this.highLightStyle instanceof PF&&(l.stroke=this.highLightStyle.getStroke(),l.fill=this.highLightStyle.getFill(),l.radius=this.highLightStyle.getRadius(),l.angle=this.highLightStyle.getAngle());var u=new XF(new(AA())(e));u.setStyle(new PF(l)),this.hitGraphicLayer=new(eG())({source:new i({map:this.map,graphics:[u]})}),this.map.addLayer(this.hitGraphicLayer)}else this.selected=r,this.changed()}},{key:"getGraphicsInExtent",value:function(e){var t=[];return e?(this.graphics.map(function(r){return QF.containsExtent(e,r.getGeometry().getExtent())&&t.push(r),r}),t):(this.graphics.map(function(e){return t.push(e),e}),t)}}])&&rG(t.prototype,r),n&&rG(t,n),i}();function cG(e){"@babel/helpers - typeof";return(cG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fG(e,t){for(var r=0;rs){var y=i[0];i.splice(0,1),delete o[y]}}}}if(this.renderer.render(),r&&this.isHoverAble&&this.isMultiHover){var d=this.getShapesByFeatureID(r);this.renderer.updateHoverShapes(d)}}},{key:"createThematicFeature",value:function(e){var t=ae.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=ae.copyAttributesWithClip(e.style));var r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=fE.transformStyle(this.highlightStyle);for(var n=new Mk(e,this,fE.transformStyle(t),r),o=0;o0&&0===this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),r=0,n=t.length;r=0&&p.x<=u.x&&p.y>=0&&p.y<=u.y){if(r.style.minZoomLevel>-1&&c<=r.style.minZoomLevel)continue;if(r.style.maxZoomLevel>-1&&c>r.style.maxZoomLevel)continue;var y=null;r.isStyleChange?(r.isStyleChange=null,y=this.calculateLabelBounds(r,p)):y=r.geometry.bsInfo.w&&r.geometry.bsInfo.h?this.calculateLabelBounds2(r,p):this.calculateLabelBounds(r,p);var d=new ce(0,u.y,u.x,0),v=y.length;if(this.isAvoid){var m=this.getAvoidInfo(d,y);if(m){if("left"===m.aspectW){r.style.labelXOffset+=m.offsetX;for(var b=0;b=o[l].start&&a=o[l].start&&as&&(s=r,l="top")}if(t.y>e.bottom){var n=Math.abs(t.y-e.bottom);n>s&&(s=n,l="bottom")}if(t.xa&&(a=o,u="left")}if(t.x>e.right){var i=Math.abs(t.x-e.right);i>a&&(a=i,u="right")}}}}},{key:"isQuadrilateralOverLap",value:function(e,t){var r=e.length,n=t.length;if(5!==r||5!==n)return null;for(var o=!1,i=0;ie-n&&t.time© SuperMap iClient",canvasFunction:function(e,t,r,n,o){var i=n[0]/r,a=n[1]/r,s=this.map.getSize()[0],l=this.map.getSize()[1];this.layer||(this.layer=new NG(this.map,this.dataSet,this.mapvOptions,i,a,this));this.layer.pixelRatio=r,this.layer.offset=[(i-s)/2,(a-l)/2],this.rotate?this.rotate!==this.map.getView().getRotation()&&(this.layer.canvasLayer.resize(i,a),this.rotate=this.map.getView().getRotation()):this.rotate=this.map.getView().getRotation();var u=this.layer.canvasLayer.canvas;this.layer.isEnabledTime()||(this.layer.canvasLayer.resize(i,a),this.layer.canvasLayer.draw());this.context||(this.context=ij.createCanvasContext2D(i,a));var c=this.context.canvas;this.context.clearRect(0,0,c.width,c.height),c.width=n[0],c.height=n[1],c.style.width=n[0]+"px",c.style.height=n[1]+"px",this.context.drawImage(u,0,0),(this.resolution!==t||JSON.stringify(this.extent)!==JSON.stringify(e))&&(this.resolution=t,this.extent=e);return this.context.canvas},logo:"4"===ij.getOlVersion()?r.logo:null,projection:r.projection,ratio:r.ratio,resolutions:r.resolutions,state:r.state})).map=e.map,t.dataSet=e.dataSet,t.mapvOptions=e.mapvOptions,t}return t=i,(r=[{key:"addData",value:function(e,t){this.layer.addData(e,t)}},{key:"getData",value:function(){return this.layer&&(this.dataSet=this.layer.getData()),this.dataSet}},{key:"removeData",value:function(e){this.layer&&this.layer.removeData(e)}},{key:"clearData",value:function(){this.layer.clearData()}},{key:"update",value:function(e){this.layer.update(e),this.changed()}}])&&FG(t.prototype,r),n&&FG(t,n),i}();function HG(e){"@babel/helpers - typeof";return(HG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JG(e,t){for(var r=0;r0&&r.attributes){var n=this.themeField,o=r.attributes,i=this.styleGroups,a=!1,s=null;for(var l in o)if(n===l){a=!0,s=o[l];break}if(a)for(var u=0,c=i.length;u=i[u].start&&s© turfjs with © SuperMap iClient",features:r.features,format:r.format,extent:r.extent,logo:"4"===ij.getOlVersion()?r.logo:null,projection:r.projection,wrapX:r.wrapX})).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"]},t.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:""}]},t}return t=i,(r=[{key:"process",value:function(e,t,r,n){var o;try{o=tB[e.split(".")[1]].apply(this,this.parse(e,t))}catch(r){o=tB[e.split(".")[1]].apply(this,this.parseOption(e,t))}var i=null;try{i=(new(LA())).readFeatures(o)}catch(e){return void(r&&r(o))}(n=null==n||n)&&this.addFeatures(i),r&&r(o)}},{key:"parse",value:function(e,t){if("Transformation.union"===e)return t.A;var r=[],n=this.turfMap[e];return n&&n.map(function(e){return r.push(t[e]),t[e]}),r}},{key:"parseOption",value:function(e,t){var r=[];return this.turfOptionMap[e].map(function(e){if(e instanceof Object){var n=e;Object.keys(n).forEach(function(e){n[e]=t[e]}),r.push(n)}else r.push(t[e]);return t}),r}}])&&nB(t.prototype,r),n&&nB(t,n),i}();function lB(e){"@babel/helpers - typeof";return(lB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uB(e,t){for(var r=0;r0&&r.attributes){var n=this.themeField,o=r.attributes,i=this.styleGroups,a=!1,s=null;for(var l in o)if(n===l){a=!0,s=o[l];break}if(a)for(var u=0,c=i.length;u© SuperMap iServer with © SuperMap iClient",["4","5"].indexOf(ij.getOlVersion())<0&&(e.tileSize=e.format instanceof xB()&&e.style?512:256);var l=MB(t=o.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,format:e.format||new(LA()),logo:"4"===ij.getOlVersion()?e.logo:null,overlaps:e.overlaps,projection:e.projection,state:e.format instanceof xB()&&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 xB()&&e.style?function(e){return e?l._tileUrl.replace(r,e[0].toString()).replace(n,e[1].toString()).replace(a,function(){var t=["4","5"].indexOf(ij.getOlVersion())>-1?-e[2]-1:e[2];return t.toString()}).replace(s,function(){var t=e[0],r=l.tileGrid.getFullTileRange(t),n=r.getHeight()+e[2];return n.toString()}):void 0}:function(e,t,r){l.tileGrid||(l.tileGrid=l.getTileGridForProjection(r));var n=e[0],o=e[1],i=["4","5"].indexOf(ij.getOlVersion())>-1?-e[2]-1:e[2],a=Gj.toSize(l.tileGrid.getTileSize(n,l.tmpSize)),s="";if("ZXY"===l.tileType)s="&width="+a[0]+"&height="+a[1]+"&x="+o+"&y="+i+"&z="+n;else if("ViewBounds"===l.tileType){var u=l.tileGrid.getTileCoordExtent(e);s="&width="+a[0]+"&height="+a[1]+"&viewBounds="+u[0]+","+u[1]+","+u[2]+","+u[3]}else{var c=l.tileGrid.getOrigin(n),f=l.tileGrid.getResolution(n),h=r.getUnits()||"degrees";"degrees"===h&&(h=v.DEGREE),"m"===h&&(h=v.METER);var p=ij.resolutionToScale(f,96,h);s="&x="+o+"&y="+i+"&width="+a[0]+"&height="+a[1]+"&scale="+p+"&origin={'x':"+c[0]+",'y':"+c[1]+"}"}return l._tileUrl+encodeURI(s)},tileLoadFunction:e.format instanceof xB()?function(e,t){var r=e.getFormat(),n=e.onLoad.bind(e),o=e.onError.bind(e);e.setLoader(function(e,i,a){var s=new XMLHttpRequest;s.open("GET","function"==typeof t?t(e,i,a):t,!0),"arraybuffer"==r.getType()&&(s.responseType="arraybuffer"),s.withCredentials=l.withCredentials,s.onload=function(){if(!s.status||s.status>=200&&s.status<300){var t=r.getType(),i=void 0;"json"===t||"text"===t?i=s.responseText:"xml"===t?(i=s.responseXML)||(i=(new DOMParser).parseFromString(s.responseText,"application/xml")):"arraybuffer"===t&&(i=s.response),i?["4","5"].indexOf(ij.getOlVersion())>-1?n.call(this,r.readFeatures(i,{featureProjection:a}),r.readProjection(i),r.getLastExtent()):n.call(this,r.readFeatures(i,{extent:e,featureProjection:a}),r.readProjection(i)):o.call(this)}else o.call(this)}.bind(this),s.onerror=function(){o.call(this)}.bind(this),s.send()})}:function(e,t){var r=new RegExp("(^|\\?|&)width=([^&]*)(\\s|&|$)"),n=new RegExp("(^|\\?|&)height=([^&]*)(\\s|&|$)"),o=Number(t.match(r)[2]),i=Number(t.match(n)[2]);e.setLoader(function(r,n,a){Jr.get(t).then(function(t){if(e.getFormat()instanceof LA())return t.json()}).then(function(t){var n=[];if(e.getFormat()instanceof LA()){t.recordsets.map(function(e){return e.features.map(function(e){for(var t=[],r=0,n=0;n-1?(e.setExtent([0,0,o,i]),e.setProjection(s),n=e.getFormat().readFeatures(ij.toGeoJSON(n))):n=e.getFormat().readFeatures(ij.toGeoJSON(n),{extent:r,dataProjection:s,featureProjection:a}),e.setFeatures(n)}})})},wrapX:void 0!==e.wrapX&&e.wrapX,tileSize:e.tileSize||null,zDirection:["4","5"].indexOf(ij.getOlVersion())>-1?null:0}));return l.withCredentials=e.withCredentials,l._tileType=e.tileType||"ScaleXY",t.vectorTileStyles=new SB,e.format instanceof xB()&&e.style?"[object String]"==Object.prototype.toString.call(e.style)?Jr.get(e.style,null,{withCredentials:e.withCredentials}).then(function(e){return e.json()}).then(function(r){t._fillByStyleJSON(r,e.source),t.setState("ready")}):t._fillByStyleJSON(e.style,e.source):t._fillByRestMapOptions(e.url,e),t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var n=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],o=function(){var e,r=n[2]-n[0],o=n[3]-n[1],i=r>=o?r:o;e=i===r?i/t.viewer.width:i/t.viewer.height;var a=[],s=v.METER;t.coordUnit===v.DEGREE&&(s=v.DEGREE);if(t.visibleScales.length>0)for(var l=function(e){var t=e.visibleScales;if(!t)return null;var r=e.viewBounds,n=e.coordUnit,o=e.viewer,i=e.scale,a=e.datumAxis;r=new ce(r.left,r.bottom,r.right,r.top),o=new Q(o.rightBottom.x,o.rightBottom.y),n=n.toLowerCase(),a=a||6378137;var s=n,l=ae.calculateDpi(r,o,i,s,a),u=function(e){if(null===e)return;var t,r;r=e.length,t=[r];for(var n=0;n© SuperMap iServer with © SuperMap iClient",canvasFunction:a,logo:"4"===ij.getOlVersion()?n.logo:null,projection:n.projection,ratio:n.ratio,resolutions:n.resolutions,state:n.state})).canvasFunctionInternal_=a,r.features=[],r.name=e,!n.map)throw new Error("options.map is not found.");r.map=n.map,r.id=n.id?n.id:ae.createUniqueID("HeatMapSource_"),r.opacity=n.opacity?n.opacity:1,r.colors=n.colors?n.colors:["blue","cyan","lime","yellow","red"],r.useGeoUnit=!!n.useGeoUnit&&n.useGeoUnit,r.radius=n.radius?n.radius:50,r.featureWeight=n.featureWeight?n.featureWeight:null,r.maxWeight=null,r.minWeight=null,r.maxWidth=null,r.maxHeight=null,r.rootCanvas=document.createElement("canvas");var s=r.map.getSize();return r.rootCanvas.width=r.maxWidth=parseInt(s[0]),r.rootCanvas.height=r.maxHeight=parseInt(s[1]),ae.modifyDOMElement(r.rootCanvas,null,null,null,null,null,null,r.opacity),r.canvasContext=r.rootCanvas.getContext("2d"),r}return t=i,(r=[{key:"addFeatures",value:function(e){this.features=this.toiClientFeature(e),this.changed()}},{key:"setOpacity",value:function(e){if(e!==this.opacity){this.opacity=e;var t=this.rootCanvas;ae.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.changed()}}},{key:"updateHeatPoints",value:function(e){this.features&&this.features.length>0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)}},{key:"convertFastToPixelPoints",value:function(e){var t,r,n,o,i,a,s=[];this.useRadius=this.useGeoUnit?parseInt(this.radius/e):this.radius;for(var l=0;l0&&this.maxWidth>0))return!1;var r=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var n=0;n1?(u=h,f=new t.geom.MultiPolygon(null)):f=new t.geom.Polygon(null)}else f=c===t.geom.GeometryType.POINT?new t.geom.Point(null):c===t.geom.GeometryType.LINE_STRING?new t.geom.LineString(null):c===t.geom.GeometryType.POLYGON?new t.geom.Polygon(null):c===t.geom.GeometryType.MULTI_POINT?new t.geom.MultiPoint(null):c===t.geom.GeometryType.MULTI_LINE_STRING?new t.geom.MultiLineString(null):null;if(f){f.setFlatCoordinates(t.geom.GeometryLayout.XY,l,u),o=new this.featureClass_,this.geometryName_&&o.setGeometryName(this.geometryName_);var b=t.format.Feature.transformWithOptions(f,!1,this.adaptOptions(n));o.setGeometry(b),o.setId(a),o.setProperties(s)}}return o},t.geom.flat.textpath.lineString=function(e,r,n,o,i,a,s,l){for(var u=[],c=Math.atan2(e[n-o+1]-e[r+1],e[n-o]-e[r]),f=c<-.785||c>2.356,h=c<-.785&&c>-2.356||c>.785&&c<2.356,p=i.length,y=e[r],d=e[r+1],v=e[r+=o],m=e[r+1],b=0,g=Math.sqrt(Math.pow(v-y,2)+Math.pow(m-d,2));r=19968&&M<=40907,j=a(T=f?R+T:T+R)-E;for(E+=j;r1?F:F<0||F>1?D:D1?F:F<0||F>1?D:D0?-Math.PI:Math.PI),A&&h&&(H+=H>0?-Math.PI/2:Math.PI/2),void 0!==O){var J=H-O;if(J+=J>Math.PI?-2*Math.PI:J<-Math.PI?2*Math.PI:0,A===_?Math.abs(J)>l:Math.abs(J)>l+Math.PI/2)return null}O!=H||h?(E=j,S=[G,B,j/2,H,T=R],f?u.unshift(S):u.push(S),O=H,_=A):(f&&(S[0]=G,S[1]=B,S[2]=j/2),S[4]=T),P=U,C=V,s+=j}return u},t.layer.VectorTile.prototype.setFastRender=function(e){return this.fastRender=e},t.renderer.canvas.VectorTileLayer.prototype.postCompose=function(e,r,n){var o,i,a=this.getLayer(),s=a.getDeclutter()?{}:null,l=a.getSource(),u=a.getRenderMode(),c=t.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS[u],f=r.pixelRatio,h=r.viewState.rotation,p=r.size;h&&(o=Math.round(f*p[0]/2),i=Math.round(f*p[1]/2),t.render.canvas.rotateAtOffset(e,-h,o,i)),s&&this.declutterTree_.clear();for(var y=this.renderedTiles,d=l.getTileGridForProjection(r.viewState.projection),v=[],m=[],b=y.length-1;b>=0;--b){var g=y[b];if(g.getState()!=t.TileState.ABORT)for(var S=g.tileCoord,w=d.getTileCoordExtent(S)[0]-d.getTileCoordExtent(g.wrappedTileCoord)[0],O=void 0,_=0,x=g.tileKeys.length;_e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length)break;if(t[o.id]){var i=JSON.parse(JSON.stringify(t[o.id]));i.paint&&(i.paint=Object.assign({},o.paint,i.paint)),i.layout&&(i.layout=Object.assign({},o.layout,i.layout)),Object.assign(o,i),r++}}this._createStyleFunction()}},{key:"setStyle",value:function(e){this.layersBySourceLayer={},this._loadStyle(e)}},{key:"_loadStyle",value:function(e){var t=this;"[object Object]"==Object.prototype.toString.call(e)?(this._mbStyle=e,this._resolve()):Jr.get(e,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){t._mbStyle=e,t._resolve()})}},{key:"_resolve",value:function(){var e=this;if(this.source||(this.source=Object.keys(this._mbStyle.sources)[0]),this._mbStyle.sprite){var t=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"";this._mbStyle.sprite=this._mbStyle.sprite.replace("@2x","");var r=this._toSpriteUrl(this._mbStyle.sprite,this.path,t+".json");Jr.get(r,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(r){e._spriteData=r,e._spriteImageUrl=e._toSpriteUrl(e._mbStyle.sprite,e.path,t+".png"),e._spriteImage=null;var n=new Image;n.crossOrigin=e.withCredentials?"use-credentials":"anonymous",n.onload=function(){e._spriteImage=n,e._initStyleFunction()},n.onerror=function(){e._spriteImage=null,e._initStyleFunction()},n.src=e._spriteImageUrl})}else this._initStyleFunction()}},{key:"_initStyleFunction",value:function(){if(!this.resolutions&&this._mbStyle.metadata&&this._mbStyle.metadata.indexbounds){for(var e=this._mbStyle.metadata.indexbounds,t=Math.max(e[2]-e[0],e[3]-e[1]),r=[],n=0;n<30;n++)r.push(t/512/Math.pow(2,n));this.resolutions=r}this._createStyleFunction(),this.dispatchEvent("styleloaded")}},{key:"_createStyleFunction",value:function(){this.map&&window.olms.applyBackground(this.map,this._mbStyle),this.featureStyleFuntion=this._getStyleFunction()}},{key:"_getStyleFunction",value:function(){var e=this;return this.fun=window.olms.stylefunction({setStyle:function(){},set:function(){},changed:function(){}},this._mbStyle,this.source,this.resolutions,this._spriteData,"",this._spriteImage),function(t,r){var n=e.fun(t,r);if(e.selectedObjects.length>0&&e.selectedObjects.find(function(e){return e.id===t.getId()&&e.sourceLayer===t.get("layer")})){var o=n&&n[0]?n[0].getZIndex():99999,i=e.selectedStyle(t,r);Array.isArray(i)||(i=[i]);for(var a=0;a2?n[2]:""):e+r}}])&&YB(r.prototype,n),o&&YB(r,o),a}();function $B(e){"@babel/helpers - typeof";return($B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eU(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1){var o=this.server.split(n);o.length>1&&(t=o[0]+n+this.server+"web/maps/"+this.mapId+"/map.json")}}this.getMapInfo(t)}},{key:"getMapInfo",value:function(e){var t=this,r=e;-1===e.indexOf(".json")&&(r="".concat(e,".json")),Jr.get(t.getRequestUrl(r),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)})}},{key:"getMapInfoSuccess",value:function(){var e=ZV(_L().mark(function e(t){var r,n;return _L().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this,!1!==t.succeed){e.next=4;break}return r.errorCallback&&r.errorCallback(t.error,"getMapFaild",r.map),e.abrupt("return");case 4:return e.next=6,r.handleCRS(t.projection,t.baseLayer.url);case 6:if(n=e.sent,r.mapParams={title:t.title,description:t.description},"BrowseMap"!==n.action){e.next=12;break}r.createSpecLayer(t),e.next=29;break;case 12:if("OpenMap"!==n.action){e.next=27;break}if(r.baseProjection=n.newCrs||t.projection,r.webMapVersion=t.version,r.baseLayer=t.baseLayer,r.isHaveGraticule=t.grid&&t.grid.graticule,!t.baseLayer||"MAPBOXSTYLE"!==t.baseLayer.layerType){e.next=21;break}r.addMVTMapLayer(t,t.baseLayer,0).then(function(){r.createView(t),t.layers&&0!==t.layers.length?r.addLayers(t):r.sendMapToUser(0),r.addGraticule(t)}),e.next=25;break;case 21:return e.next=23,r.addBaseMap(t);case 23:t.layers&&0!==t.layers.length?r.addLayers(t):r.sendMapToUser(0),r.addGraticule(t);case 25:e.next=29;break;case 27:return r.errorCallback&&r.errorCallback({type:"Not support CS",errorMsg:"Not support CS: ".concat(t.projection)},"getMapFaild",r.map),e.abrupt("return");case 29:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"handleCRS",value:function(){var e=ZV(_L().mark(function e(t,r){var n,o,i,a;return _L().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this,o={},i=t,a="OpenMap","EPSG:-1"!==t){e.next=7;break}return e.next=5,Jr.get(n.getRequestUrl("".concat(r,"/prjCoordSys.wkt")),null,{withCredentials:n.withCredentials,withoutFormatSuffix:!0}).then(function(e){return e.text()}).then(function(){var e=ZV(_L().mark(function e(t){return _L().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==t.indexOf("")){e.next=5;break}n.addProjctionFromWKT(t,"EPSG:-1"),o={action:a,newCrs:i},e.next=6;break;case 5:throw"ERROR";case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(){o={action:a="BrowseMap",newCrs:i}});case 5:e.next=9;break;case 7:0===t.indexOf("EPSG")&&t.split(":")[1]<=0?a="BrowseMap":"EPSG:910111"===t||"EPSG:910112"===t?i="EPSG:3857":"EPSG:910101"===t||"EPSG:910102"===t?i="EPSG:4326":0!==t.indexOf("EPSG")&&(n.addProjctionFromWKT(i),i=n.getEpsgInfoFromWKT(t)),o={action:a,newCrs:i};case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getScales",value:function(e){var t,r,n=this,o=[],i={},a=[],s=e.coordUnit||sA.get(e.projection).getUnits();if(s||(s="EPSG:3857"===this.baseProjection?"m":"degree"),e.visibleScales&&e.visibleScales.length>0)e.visibleScales.forEach(function(e){var r=1/e;t=n.getResFromScale(r,s),e="1:".concat(r.toLocaleString()),i[n.formatScale(e)]=t,a.push(t),o.push(e)},this);else if("WMTS"===e.layerType)e.scales.forEach(function(e){t=n.getResFromScale(e,s,90.7),e="1:".concat(e.toLocaleString()),i[n.formatScale(e)]=t,a.push(t),o.push(e)},this);else for(var l=e.minZoom,u=void 0===l?0:l,c=e.maxZoom,f=void 0===c?22:c,h=this.map.getView(),p=u;p<=f;p++)if(t=h.getResolutionForZoom(p),r=this.getScaleFromRes(t,s),-1===o.indexOf(r)){o.push(r);var y=r.replace(/,/g,"");i[y]=t,a.push(t)}this.scales=o,this.resolutions=i,this.resolutionArray=a}},{key:"getResFromScale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DEGREE";return.0254*e/(arguments.length>2&&void 0!==arguments[2]?arguments[2]:96)/iH[t.toUpperCase()]}},{key:"getScaleFromRes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DEGREE";return"1:"+(e*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:96)*iH[t.toUpperCase()]/.0254).toLocaleString()}},{key:"formatScale",value:function(e){return e.replace(/,/g,"")}},{key:"createSpecLayer",value:function(e){var t=this,r=e.baseLayer,n=r.url,o=r.layerType,i=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],a=new sA.Projection({extent:i,units:"m",code:"EPSG:0"});sA.addProjection(a);var s={center:e.center,level:0};t.baseProjection=a;var l={center:s.center?[s.center.x,s.center.y]:[0,0],zoom:0,projection:a};["4","5"].indexOf(ij.getOlVersion())<0&&(l.multiWorld=!0);var u,c=new(jV())(l);t.map.setView(c),t.mapParams&&(t.mapParams.extent=i,t.mapParams.projection=e.projection),n&&n.indexOf("?token=")>-1&&(t.credentialKey="token",t.credentialValue=e.baseLayer.credential=n.split("?token=")[1],n=n.split("?token=")[0]),"TILE"===o?Jr.get(t.getRequestUrl("".concat(n,".json")),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){r.originResult=e;var o="IPORTAL",i=r.credential,a="Token",s=r.url;(r.url.indexOf("www.supermapol.com")>-1||r.url.indexOf("itest.supermapol.com")>-1)&&(a="Key",s=[s],o="ONLINE"),i&&qr["register".concat(a)](s,i);var l={serverType:o,url:n,tileGrid:wL.optionsFromMapJSON(n,e).tileGrid};n&&!t.isSameDomain(n)&&(l.tileProxy=t.server+"apps/viewer/getUrlResource.png?url="),u=new wL(l),t.addSpecToMap(u)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):"WMS"===o?(u=t.createWMSSource(r),t.addSpecToMap(u)):"WMTS"===o?Jr.get(t.getRequestUrl(n,!0),null,{withCredentials:this.withCredentials}).then(function(e){return e.text()}).then(function(n){r.extent=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],r.scales=t.getWMTSScales(r.tileMatrixSet,n),r.dpi=sH,u=t.createWMTSSource(r),t.addSpecToMap(u)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):t.errorCallback&&t.errorCallback({type:"Not support CS",errorMsg:"Not support CS: ".concat(o)},"getMapFaild",t.map),c&&c.fit(i)}},{key:"addSpecToMap",value:function(e){var t=new DV.Tile({source:e,zIndex:0});this.map.addLayer(t),this.sendMapToUser(0)}},{key:"getWMTSScales",value:function(e,t){for(var r=(new(GV())).read(t).Contents.TileMatrixSet,n=[],o=0;o0||u.scales&&u.scales.length>0)this.getScales(u);else if(e.baseLayer&&t&&4===t.length){var c=(t[2]-t[0])/512,f=(t[3]-t[1])/512;l=Math.max(c,f)}var h={};if(u.scales&&u.scales.length>0&&"WMTS"===u.layerType||this.resolutionArray&&this.resolutionArray.length>0?h={zoom:n,center:a,projection:i,resolutions:this.resolutionArray,maxZoom:o}:"WMTS"===u.layerType?(h={zoom:n,center:a,projection:i,maxZoom:o},this.getScales(u)):(h={zoom:n,center:a,projection:i,maxResolution:l,maxZoom:o},this.getScales(u)),["4","5"].indexOf(ij.getOlVersion())<0&&(h.multiWorld=!0,h.showFullExtent=!0,h.enableRotation=!1,h.constrainResolution=!0),this.map.setView(new(jV())(h)),e.visibleExtent){var p=this.map.getView(),y=p.getResolutionForExtent(e.visibleExtent,this.map.getSize());p.setResolution(y),p.setCenter((0,QF.getCenter)(e.visibleExtent))}}},{key:"createBaseLayer",value:function(e,t,r,n,o){var i,a=this;n&&(a=n);var s=e.layerType;switch((s.indexOf("TIANDITU_VEC")>-1||s.indexOf("TIANDITU_IMG")>-1||s.indexOf("TIANDITU_TER")>-1)&&(s=s.substr(0,12)),s){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":i=this.createTiandituSource(s,e.projection);break;case"BAIDU":i=this.createBaiduSource();break;case"BING":i=this.createBingSource(e,e.projection);break;case"WMS":i=this.createWMSSource(e);break;case"WMTS":i=a.createWMTSSource(e);break;case"TILE":case"SUPERMAP_REST":i=a.createDynamicTiledSource(e,o);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":i=this.createXYZSource(e)}var l=new DV.Tile({source:i,zIndex:e.zIndex||1,visible:e.visible}),u=ij.newGuid(8);e.name&&l.setProperties({name:e.name,layerID:u}),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=u;var c,f,h=e.visibleScale,p=e.autoUpdateTime;return h&&(f=this.resolutions[h.minScale],c=this.resolutions[h.maxScale],f>1?l.setMaxResolution(Math.ceil(f)):l.setMaxResolution(1.1*f),l.setMinResolution(c)),p&&!e.autoUpdateInterval&&(e.autoUpdateInterval=setInterval(function(){a.updateTileToMap(e,t)},p)),r&&(l.setZIndex(0),a.map.addLayer(l)),l}},{key:"updateTileToMap",value:function(e,t){this.map.removeLayer(e.layer),this.map.addLayer(this.createBaseLayer(e,t))}},{key:"getInternetMapInfo",value:function(e){var t=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],r=[-20037508.34,-20037508.34,20037508.34,20037508.34];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=[-180,-90,180,90],"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=[12555667.53929,1281852.98656,17525908.86651,7484870.70596];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=[-19741117.14519,-10003921.36848,19981677.71404,19660983.56089]}}},{key:"createDynamicTiledSource",value:function(e,t){var r="IPORTAL",n=e.credential?e.credential.token:void 0,o="Token",i=e.url;(e.url.indexOf("www.supermapol.com")>-1||e.url.indexOf("itest.supermapol.com")>-1)&&(o="Key",i=[i],r="ONLINE"),n&&qr["register".concat(o)](i,n);var a={transparent:!0,url:e.url,wrapX:!1,serverType:r,format:e.format};if(t||"EPSG:-1"===this.baseProjection||(a.prjCoordSys={epsgCode:this.baseProjection.split(":")[1]}),e.visibleScales&&e.visibleScales.length>0){var s=[];for(var l in e.visibleScales){var u=ij.scaleToResolution(e.visibleScales[l],aH,e.coordUnit);s.push(u)}e.visibleResolutions=s;var c=new(Mj())({extent:e.extent,resolutions:s});a.tileGrid=c}else{a.extent=this.baseLayerExtent;var f=new(Mj())({extent:e.extent,resolutions:this.getResolutionsFromBounds(e.extent)});a.tileGrid=f}e.url&&!this.isSameDomain(e.url)&&"webp"!==e.format&&(a.tileProxy=this.server+"apps/viewer/getUrlResource.png?url=");var h=new wL(a);return qr["register".concat(o)](e.url),h}},{key:"getResolutionsFromBounds",value:function(e){for(var t=[],r=Math.abs(e[0]-e[2])/512,n=0;n<22;n++)0!==n?(r/=2,t[n]=r):t[n]=r;return t}},{key:"createTiandituSource",value:function(e,t,r){var n={layerType:e.split("_")[1].toLowerCase(),isLabel:r||!1,projection:t,url:"https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?tk=".concat(this.tiandituKey)};return new pL(n)}},{key:"createBaiduSource",value:function(){return new Fj}},{key:"createBingSource",value:function(e,t){return new UV.XYZ({wrapX:!1,projection:t,crossOrigin:"anonymous",tileUrlFunction:function(e){var t=YV(e),r=t[0],n=t[1],o=t[2];o=o>0?o-1:-o-1;for(var i="",a=r;a>0;a--){var s=0,l=1<1&&void 0!==arguments[1])||arguments[1],n=this,o=e.url.trim(),i=e.credential,a={withCredentials:this.withCredentials,withoutFormatSuffix:!0};if(r){var s={epsgCode:n.baseProjection.split(":")[1]};"EPSG:-1"!==n.baseProjection&&(o+=".json?prjCoordSys="+encodeURI(JSON.stringify(s)))}return i&&(o="".concat(o,"&token=").concat(encodeURI(i.token)),t=i.token),Jr.get(n.getRequestUrl("".concat(o,".json")),null,a).then(function(e){return e.json()}).then(function(){var r=ZV(_L().mark(function r(o){var i,a;return _L().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!1!==o.succeed){r.next=2;break}return r.abrupt("return",o);case 2:if(i="png","webp"!==n.tileFormat){r.next=8;break}return r.next=6,n.isSupportWebp(e.url,t);case 6:a=r.sent,i=a?"webp":"png";case 8:return r.abrupt("return",{units:o.coordUnit&&o.coordUnit.toLowerCase(),coordUnit:o.coordUnit,visibleScales:o.visibleScales,extent:[o.bounds.left,o.bounds.bottom,o.bounds.right,o.bounds.top],projection:"EPSG:".concat(o.prjCoordSys.epsgCode),format:i});case 9:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){return{succeed:!1,error:e}})}},{key:"getTileInfo",value:function(e,t,r){var n=this,o={withCredentials:this.withCredentials,withoutFormatSuffix:!0};return e.url.indexOf("?token=")>-1&&(n.credentialKey="token",n.credentialValue=e.credential=e.url.split("?token=")[1],e.url=e.url.split("?token=")[0]),Jr.get(n.getRequestUrl("".concat(e.url,".json")),null,o).then(function(e){return e.json()}).then(function(){var o=ZV(_L().mark(function o(i){var a,s;return _L().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!i||!i.code||200===i.code){o.next=2;break}throw i;case 2:if(i.visibleScales&&(e.visibleScales=i.visibleScales,e.coordUnit=i.coordUnit),e.maxZoom=i.maxZoom,e.maxZoom=i.minZoom,a=e.credential?e.credential.token:void 0,e.format="png","webp"!==n.tileFormat||"https://maptiles.supermapol.com/iserver/services/map_China/rest/maps/China_Dark"===e.url){o.next=12;break}return o.next=10,n.isSupportWebp(e.url,a);case 10:s=o.sent,e.format=s?"webp":"png";case 12:r?t&&t(r,null,!0,n):t&&t(e);case 13:case"end":return o.stop()}},o)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){n.errorCallback&&n.errorCallback(e,"getTileInfo",n.map)})}},{key:"getWMTSUrl",value:function(e,t){var r="?";return e.indexOf("?")>-1&&(r="&"),e+=t?r+"SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities":r+"/1.0.0/WMTSCapabilities.xml",this.getRequestUrl(e,!0)}},{key:"getWmtsInfo",value:function(e,t){var r=this,n={withCredentials:r.withCredentials,withoutFormatSuffix:!0},o=!e.requestEncoding||"KVP"===e.requestEncoding;return Jr.get(r.getWMTSUrl(e.url,o),null,n).then(function(e){return e.text()}).then(function(n){var i=(new(GV())).read(n);if(r.isValidResponse(i)){for(var a,s,l=i.Contents,u=l.TileMatrixSet,c=l.Layer,f="default",h=0;h-1?[g[1],g[0]]:g;break}var S,w=e.name;S=p?sA.transformExtent(p,"EPSG:4326",r.baseProjection):sA.get(r.baseProjection).getExtent(),e.tileUrl=r.getTileUrl(i.OperationsMetadata.GetTile.DCP.HTTP.Get,a,s,o),e.extent=S,e.name=w,e.orginEpsgCode=e.projection,e.overLayer=!0,e.scales=y,e.style=f,e.title=w,e.unit="m",e.layerFormat=s,e.matrixIds=d,t&&t(e)}}).catch(function(e){r.errorCallback&&r.errorCallback(e,"getWmtsFaild",r.map)})}},{key:"getTileUrl",value:function(e,t,r,n){var o;if(n)e.forEach(function(e){"KVP"===e.Constraint[0].AllowedValues.Value[0].toUpperCase()&&(o=e.href)});else{var i=t.ResourceURL.filter(function(e){return e.format===r});o=i[0].template}return o}},{key:"createWMTSSource",value:function(e){var t=e.extent||sA.get(e.projection).getExtent(),r=sA.get(this.baseProjection).getUnits();return new UV.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,r,e.dpi,e.origin,e.matrixIds),tileLoadFunction:function(e,t){e.getImage().src=t}})}},{key:"getWMTSTileGrid",value:function(e,t,r,n,o,i){var a=this.getReslutionsFromScales(t,n||sH,r);return new(aL())({origin:o,extent:e,resolutions:a.res,matrixIds:i||a.matrixIds})}},{key:"getReslutionsFromScales",value:function(e,t,r,n){r=r&&r.toLowerCase()||"degrees",t=t||sH,n=n||6378137;var o=[],i=[];if(ij.isArray(e))e&&e.forEach(function(e,a){e>1&&(i.push(a),o.push(this.getResolutionFromScale(e,t,r,n)))},this);else{var a=e.TileMatrix;a&&a.forEach(function(e){i.push(e.Identifier),o.push(this.getResolutionFromScale(e.ScaleDenominator,t,r,n))},this)}return{res:o,matrixIds:i}}},{key:"getResolutionFromScale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aH,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return e=(e=+e)>1?1/e:e,"degrees"===r||"dd"===r||"degree"===r?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4}},{key:"isValidResponse",value:function(e){for(var t=["Contents","OperationsMetadata"],r=!0,n=0;n0&&(this.layers=t,t.forEach(function(t,i){var a=i+1,s=t.dataSource,l=s&&"SAMPLE_DATA"===s.type&&!!s.name;if("MAPBOXSTYLE"===t.layerType)r.addMVTMapLayer(e,t,a).then(function(){r.layerAdded++,r.sendMapToUser(o)});else if(s&&s.serverId||"MARKER"===t.layerType||"HOSTED_TILE"===t.layerType||l){var u=t.dataSource,c=u?u.serverId:t.serverId;if(!c&&!l)return r.addLayer(t,null,a),r.layerAdded++,void r.sendMapToUser(o);if("MARKER"===t.layerType||u&&(!u.accessType||"DIRECT"===u.accessType)||l){var f=l?"".concat(r.server,"apps/dataviz/libs/sample-datas/").concat(u.name,".json"):"".concat(r.server,"web/datas/").concat(c,"/content.json?pageSize=9999999¤tPage=1");f=r.getRequestUrl(f),Jr.get(f,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(){var e=ZV(_L().mark(function e(i){var s,l,u,c,f;return _L().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==i.succeed){e.next=5;break}return r.layerAdded++,r.sendMapToUser(o),r.errorCallback&&r.errorCallback(i.error,"getLayerFaild",r.map),e.abrupt("return");case 5:if(!i||!i.type){e.next=28;break}if("JSON"!==i.type&&"GEOJSON"!==i.type){e.next=11;break}i.content=i.content.type?i.content:JSON.parse(i.content),n=r.geojsonToFeature(i.content,t),e.next=25;break;case 11:if("EXCEL"!==i.type&&"CSV"!==i.type){e.next=24;break}if(!t.dataSource||!t.dataSource.administrativeInfo){e.next=19;break}i.content.rows.unshift(i.content.colTitles),s=t.dataSource.administrativeInfo,l=s.divisionType,u=s.divisionField,c=r.excelData2FeatureByDivision(i.content,l,u),n=r._parseGeoJsonData2Feature({allDatas:{features:c.features},fileCode:t.projection}),e.next=22;break;case 19:return e.next=21,r.excelData2Feature(i.content,t);case 21:n=e.sent;case 22:e.next=25;break;case 24:"SHP"===i.type&&(f=JSON.parse(i.content),i.content=f.layers[0],n=r.geojsonToFeature(i.content,t));case 25:r.addLayer(t,n,a),r.layerAdded++,r.sendMapToUser(o);case 28:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){r.layerAdded++,r.sendMapToUser(o),r.errorCallback&&r.errorCallback(e,"getLayerFaild",r.map)})}else{var h="HOSTED_TILE"===t.layerType,p=u?u.serverId:t.serverId;r.checkUploadToRelationship(p).then(function(e){if(e&&e.length>0){var n=e[0].name,i=e[0].type.toUpperCase();r.getDataService(p,n).then(function(e){var s=e.dataItemServices;if(0===s.length)return r.layerAdded++,r.sendMapToUser(o),void(r.errorCallback&&r.errorCallback(null,"getLayerFaild",r.map));if(h){var l=r.getService(s,"RESTDATA");r.isMvt(l.address,n).then(function(e){r.getServiceInfoFromLayer(a,o,t,s,n,i,e)}).catch(function(){r.getServiceInfoFromLayer(a,o,t,s,n,i)})}else r.getServiceInfoFromLayer(a,o,t,s,n,i)})}else r.layerAdded++,r.sendMapToUser(o),r.errorCallback&&r.errorCallback(null,"getLayerFaild",r.map)}).catch(function(e){r.layerAdded++,r.sendMapToUser(o),r.errorCallback&&r.errorCallback(e,"getLayerFaild",r.map)})}}else s&&"USER_DATA"===s.type?r.addGeojsonFromUrl(t,o,a,!1):"TILE"===t.layerType?r.getTileLayerExtent(t,function(e){r.map.addLayer(r.createBaseLayer(e,a)),r.layerAdded++,r.sendMapToUser(o)},function(e){r.layerAdded++,r.sendMapToUser(o),r.errorCallback&&r.errorCallback(e,"getLayerFaild",r.map)}):"SUPERMAP_REST"===t.layerType||"WMS"===t.layerType||"WMTS"===t.layerType?"WMTS"===t.layerType?r.getWmtsInfo(t,function(e){r.map.addLayer(r.createBaseLayer(e,a)),r.layerAdded++,r.sendMapToUser(o)}):(t.projection=r.baseProjection,r.map.addLayer(r.createBaseLayer(t,a)),r.layerAdded++,r.sendMapToUser(o)):s&&"REST_DATA"===s.type?r.getFeaturesFromRestData(t,a,o):s&&"REST_MAP"===s.type&&s.url?ij.queryFeatureBySQL(s.url,s.layerName,"smid=1",null,null,function(e){var n=e&&e.result.recordsets,i=n&&n[0],s=i.fields;if(i&&s){var l=[];for(var u in s){var c=s[u];0===c.indexOf("Sm")&&"SmID"!==c||l.push(c)}r.getFeatures(l,t,function(e){r.addLayer(t,e,a),r.layerAdded++,r.sendMapToUser(o)},function(e){r.layerAdded++,r.errorCallback&&r.errorCallback(e,"getFeatureFaild",r.map)})}},function(e){r.errorCallback&&r.errorCallback(e,"getFeatureFaild",r.map)}):"DATAFLOW_POINT_TRACK"!==t.layerType&&"DATAFLOW_HEAT"!==t.layerType||r.getDataflowInfo(t,function(){r.addLayer(t,n,a),r.layerAdded++,r.sendMapToUser(o)},function(e){r.layerAdded++,r.errorCallback&&r.errorCallback(e,"getFeatureFaild",r.map)})},this))}},{key:"addGeojsonFromUrl",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.withCredentials,o=e.dataSource.url,i=this;Jr.get(o,null,{withCredentials:n,withoutFormatSuffix:!0}).then(function(e){return e.json()}).then(function(){var n=ZV(_L().mark(function n(o){var a,s,l,u,c,f;return _L().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o&&!1!==o.succeed){n.next=3;break}return t?i.errorCallback&&i.errorCallback(o.error,"autoUpdateFaild",i.map):(i.layerAdded++,i.sendMapToUser(t),i.errorCallback&&i.errorCallback(o.error,"getLayerFaild",i.map)),n.abrupt("return");case 3:if("CSV"!==o.type&&"EXCEL"!==o.type){n.next=16;break}if(!e.dataSource||!e.dataSource.administrativeInfo){n.next=11;break}o.content.rows.unshift(o.content.colTitles),s=e.dataSource.administrativeInfo,l=s.divisionType,u=s.divisionField,c=i.excelData2FeatureByDivision(o.content,l,u),a=i._parseGeoJsonData2Feature({allDatas:{features:c.features},fileCode:e.projection}),n.next=14;break;case 11:return n.next=13,i.excelData2Feature(o.content,e);case 13:a=n.sent;case 14:n.next=18;break;case 16:f=o.content?JSON.parse(o.content):o,a=i.geojsonToFeature(f,e);case 18:t?(i.addLayer(e,a,r),i.layerAdded++,i.sendMapToUser(t)):(i.map.removeLayer(e.layer),e.labelLayer&&i.map.removeLayer(e.labelLayer),i.addLayer(e,a,r));case 19:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){i.layerAdded++,i.sendMapToUser(t),i.errorCallback&&i.errorCallback(e,"getLayerFaild",i.map)})}},{key:"getServiceInfoFromLayer",value:function(e,t,r,n,o,i,a){var s=this,l=a?!a.isMvt:"HOSTED_TILE"===r.layerType,u=!1;n.forEach(function(n){if(!u)if(n&&l&&"RESTMAP"===n.serviceType)u=!0,s.getTileLayerInfo(n.address).then(function(n){n.forEach(function(n){var o=n.bounds;r.layerType="TILE",r.orginEpsgCode=s.baseProjection,r.units=n.coordUnit&&n.coordUnit.toLowerCase(),r.extent=[o.left,o.bottom,o.right,o.top],r.visibleScales=n.visibleScales,r.url=n.url,r.sourceType="TILE",s.map.addLayer(s.createBaseLayer(r,e)),s.layerAdded++,s.sendMapToUser(t)})});else if(n&&!l&&"RESTDATA"===n.serviceType)if(u=!0,a&&a.isMvt){var c=a.bounds;r=Object.assign(r,{layerType:"VECTOR_TILE",epsgCode:a.epsgCode,projection:"EPSG:".concat(a.epsgCode),bounds:c,extent:[c.left,c.bottom,c.right,c.top],name:r.name,url:a.url,visible:r.visible,featureType:i,serverId:r.serverId.toString()}),s.map.addLayer(s.addVectorTileLayer(r,e,"RESTDATA")),s.layerAdded++,s.sendMapToUser(t)}else u=!0,s.getDatasources(n.address).then(function(i){r.dataSource.dataSourceName=i+":"+o,r.dataSource.url="".concat(n.address,"/data"),s.getFeaturesFromRestData(r,e,t)})}),u||(s.layerAdded++,s.sendMapToUser(t),s.errorCallback&&s.errorCallback(null,"getLayerFaild",s.map))}},{key:"getDataflowInfo",value:function(e,t,r){var n,o=e.url,i=this.getRequestUrl("".concat(o,".json"),!1);e.credential&&e.credential.token&&(n=e.credential.token,i+="?token=".concat(n)),Jr.get(i,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(r){e.featureType="POINT",r&&r.featureMetaData&&(e.featureType=r.featureMetaData.featureType.toUpperCase()),e.wsUrl=r.urls[0].url,t()}).catch(function(){r()})}},{key:"getFeaturesFromRestData",value:function(e,t,r){var n=this,o=e.dataSource,i=e.dataSource.url,a=o.dataSourceName||e.name,s=n.formatUrlWithCredential(i),l={};if(l.withCredentials=this.withCredentials,this.excludePortalProxyUrl||ae.isInTheSameDomain(s)||(l.proxy=this.getProxy()),["EPSG:-1","EPSG:0","EPSG:-1000"].includes(e.projection))return n.layerAdded++,n.sendMapToUser(r),void(n.errorCallback&&n.errorCallback({},"getFeatureFaild",n.map));ij.getFeatureBySQL(s,[a],l,function(o){var i=n.parseGeoJsonData2Feature({allDatas:{features:o.result.features.features},fileCode:n.baseProjection,featureProjection:n.baseProjection});n.addLayer(e,i,t),n.layerAdded++,n.sendMapToUser(r)},function(e){n.layerAdded++,n.sendMapToUser(r),n.errorCallback&&n.errorCallback(e,"getFeatureFaild",n.map)},n.baseProjection.split("EPSG:")[1])}},{key:"getFeatures",value:function(e,t,r,n){var o=this,i=t.dataSource,a=t.projection;ij.queryFeatureBySQL(i.url,i.layerName,null,e,null,function(e){var t=e.result.recordsets[0].features.features,n=o.parseGeoJsonData2Feature({allDatas:{features:t},fileCode:a,featureProjection:o.baseProjection},"JSON");r(n)},function(e){n(e)})}},{key:"sendMapToUser",value:function(e){var t=this.isHaveGraticule?e+1:e;this.layerAdded===t&&this.successCallback&&this.successCallback(this.map,this.mapParams,this.layers,this.baseLayer)}},{key:"excelData2Feature",value:function(){var e=ZV(_L().mark(function e(t,r){var n,o,i,a,s,l,u,c,f,h,p,y,d,v,m,b,g,S,w,O,_,x,P,C,T;return _L().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(i in n=t.rows,o=t.colTitles)ij.isString(o[i])&&(o[i]=ij.trim(o[i]));if(a=r.projection,s=r.dataSource,l=this.baseProjection,u=[],c=ij.trim(r.xyField&&r.xyField.xField||r.from&&r.from.xField),f=ij.trim(r.xyField&&r.xyField.yField||r.from&&r.from.yField),h=o.indexOf(c),p=o.indexOf(f),"MIGRATION"!==r.layerType){e.next=20;break}if(e.prev=4,"PORTAL_DATA"!==s.type){e.next=14;break}return e.next=8,Jr.get("".concat(this.server,"web/datas/").concat(s.serverId,".json"),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()});case 8:y=e.sent,d=y.dataMetaInfo,r.xyField={xField:d.xField,yField:d.yField},d.xIndex?(h=d.xIndex,p=d.yIndex):(h=o.indexOf(d.xField),p=o.indexOf(d.yField)),e.next=15;break;case 14:"SAMPLE_DATA"===s.type&&(v=MV.find(function(e){return e.id===s.name})||{},c=v.xField,f=v.yField,r.xyField={xField:c,yField:f},h=o.findIndex(function(e){return e===c}),p=o.findIndex(function(e){return e===f}));case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(4),console.error(e.t0);case 20:m=0,b=n.length;case 21:if(!(m-1?S[C+"_1"]=g[x]:S[C]=g[x];case 33:x++,e.next=27;break;case 36:T=new(nj())({geometry:_,attributes:S}),u.push(T);case 38:m++,e.next=21;break;case 41:return e.abrupt("return",Promise.resolve(u));case 42:case"end":return e.stop()}},e,this,[[4,17]])}));return function(t,r){return e.apply(this,arguments)}}()},{key:"excelData2FeatureByDivision",value:function(e,t,r){var n;if("Province"===t?n=window.ProvinceData:"City"===t?n=window.MunicipalData:"GB-T_2260"===t&&(n=window.AdministrativeArea),n)return this.changeExcel2Geojson(n.features,e.rows,t,r)}},{key:"_parseGeoJsonData2Feature",value:function(e){for(var t=e.allDatas.features,r=[],n=0,o=t.length;n-1||y._smiportal_imgLinkUrl.indexOf("https://")>-1?d=y._smiportal_imgLinkUrl:void 0!==y._smiportal_imgLinkUrl&&null!==y._smiportal_imgLinkUrl&&""!==y._smiportal_imgLinkUrl&&(d="".concat(ij.getIPortalUrl(),"resources/markerIcon/").concat(y._smiportal_imgLinkUrl)),c={dataViz_description:y._smiportal_description,dataViz_imgUrl:d,dataViz_title:y._smiportal_title,dataViz_url:y._smiportal_otherLinkUrl},p.anchor=[.5,1],p.src=p.externalGraphic,f=p,h=Object.assign({},{attributes:c},{useStyle:f}),delete y._smiportal_description,delete y._smiportal_imgLinkUrl,delete y._smiportal_title,delete y._smiportal_otherLinkUrl}else h={attributes:a};s.setProperties(h),n.push(s)}return n}},{key:"parseGeoJsonData2Feature",value:function(e){for(var t=e.allDatas.features,r=[],n=0,o=t.length;n-1?(t.strokeColor="#4CC8A3",t.strokeWidth=2):["REGION","POLYGON","MULTIPOLYGON"].indexOf(e)>-1&&(t.fillColor="#826DBA"),t}},{key:"getFiterFeatures",value:function(e,t){for(var r="select * from json where ("+this.parseFilterCondition(e)+")",n=[],o=0;o0&&n.push(i)}return n}},{key:"parseFilterCondition",value:function(e){return e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=").replace(/\(?[^\(]+?\s*in\s*\([^\)]+?\)\)?/gi,function(e){var t=e.match(/([^(]+?)\s*in\s*\(([^)]+?)\)/i);return 3===t.length?"(".concat(t[2].split(",").map(function(e){return"".concat(t[1]," == ").concat(e.trim())}).join(" || "),")"):e})}},{key:"createGraphicLayer",value:function(e,t){t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t;var r=this.getGraphicsFromFeatures(t,e.style,e.featureType),n=new uG({graphics:r,render:"canvas",map:this.map,isHighLight:!1});return new DV.Image({source:n})}},{key:"getGraphicsFromFeatures",value:function(e,t,r){var n=Oj.getOpenlayersStyle(t,r).getImage(),o=[];for(var i in e){var a=new XF(e[i].getGeometry());a.setStyle(n),a.setProperties({attributes:e[i].get("attributes")}),o.push(a)}return o}},{key:"createSymbolLayer",value:function(e,t){var r=Oj.getSymbolStyle(e.style);return new DV.Vector({style:r,source:new UV.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1}),renderMode:"image"})}},{key:"addLabelLayer",value:function(e,t){var r=e.labelStyle,n=this.getLabelStyle(r,e),o=e.labelLayer=new DV.Vector({declutter:!0,styleOL:n,labelField:r.labelField,source:new UV.Vector({features:t,wrapX:!1})});o.setStyle(function(e){var t=r.labelField,n=e.get("attributes")[t.trim()]+"";if("undefined"===n)return null;var i=o.get("styleOL"),a=i.getText();return a&&a.setText&&a.setText(n),i}),this.map.addLayer(o),o.setVisible(e.visible),o.setZIndex(1e3);var i=e.visibleScale;return i&&this.setVisibleScales(o,i),o}},{key:"setVisibleScales",value:function(e,t){var r=this.resolutions[t.minScale],n=this.resolutions[t.maxScale];r>1?e.setMaxResolution(Math.ceil(r)):e.setMaxResolution(1.1*r),e.setMinResolution(n)}},{key:"getLabelStyle",value:function(e,t){var r=t.style||t.pointStyle,n=r.radius,o=void 0===n?0:n,i=r.strokeWidth,a=-(o+(void 0===i?0:i)),s=e.fontSize,l=void 0===s?"14px":s,u=e.fontFamily,c=e.fill,f=e.backgroundFill,h=e.offsetX,p=void 0===h?0:h,y=e.offsetY,d=void 0===y?a:y,v=e.placement,m=void 0===v?"point":v,b=e.textBaseline,g=void 0===b?"bottom":b,S=e.textAlign,w=void 0===S?"center":S,O=e.outlineColor,_=void 0===O?"#000000":O,x=e.outlineWidth,P=void 0===x?0:x,C={font:"".concat(l," ").concat(u),placement:m,textBaseline:g,fill:new(dj())({color:c}),backgroundFill:new(dj())({color:f}),padding:[3,3,3,3],offsetX:"POINT"===t.featureType?p:0,offsetY:"POINT"===t.featureType?d:0,overflow:!0,maxAngle:0};return"POINT"===t.featureType&&(C.textAlign=w),P>0&&(C.stroke=new(mj())({color:_,width:P})),new(uj())({text:new(gj())(C)})}},{key:"createVectorLayer",value:function(e,t){var r,n=e.featureType,o=e.style;if("LINE"===n&&ij.isArray(o)){var i=WV(o,2),a=i[0],s=i[1];r="solid"===s.lineDash?Oj.getRoadPath(s,a):Oj.getPathway(s,a)}else r=Oj.toOpenLayersStyle(e.style,e.featureType);return new DV.Vector({style:r,source:new UV.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})})}},{key:"createHeatLayer",value:function(e,t){t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t;var r={source:new UV.Vector({features:t,wrapX:!1})},n=e.themeSetting;r.gradient=n.colors.slice(),r.radius=parseInt(n.radius);var o=n.customSettings;for(var i in o)r.gradient[i]=o[i];return n.weight&&this.changeWeight(t,n.weight),new DV.Heatmap(r)}},{key:"changeWeight",value:function(e,t){var r=this;this.fieldMaxValue={},this.getMaxValue(e,t);var n=this.fieldMaxValue[t];e.forEach(function(e){var o=e.get("attributes");try{var i=o[t];e.set("weight",i/n)}catch(e){r.errorCallback&&r.errorCallback(e)}})}},{key:"getMaxValue",value:function(e,t){var r,n=[],o=this,i=t;this.fieldMaxValue[i]||(e.forEach(function(e){r=e.get("attributes");try{n.push(parseFloat(r[i]))}catch(e){o.errorCallback&&o.errorCallback(e)}}),this.fieldMaxValue[i]=yP.getArrayStatistic(n,"Maximum"))}},{key:"createUniqueLayer",value:function(e,t){var r=this.createUniqueSource(e,t),n=new DV.Vector({styleSource:r,source:new UV.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})});return n.setStyle(function(e){var t=n.get("styleSource"),r=t.themeField,o=e.get("attributes")[r];return t.styleGroups.find(function(e){return e.value===o}).olStyle}),n}},{key:"createUniqueSource",value:function(e,t){var r=this.getUniqueStyleGroup(e,t);return{map:this.map,style:e.style,isHoverAble:e.isHoverAble,highlightStyle:e.highlightStyle,themeField:e.themeSetting.themeField,styleGroups:r}}},{key:"getUniqueStyleGroup",value:function(e,t){var r=e.featureType,n=e.style,o=e.themeSetting,i=o.themeField,a=[],s=o.customSettings;for(var l in t){var u=t[l].get("attributes")[i],c=!1;for(var f in a)if(a[f]===u){c=!0;break}c||a.push(u)}var h=[];return a.forEach(function(e,t){var o="1.0"===this.webMapVersion?t:e,i=s[o];ij.isString(i)&&(i=this.getCustomSetting(n,i,r),s[o]=i);var a,l=i.type;a="SYMBOL_POINT"===l?Oj.getSymbolStyle(i):"SVG_POINT"===l?Oj.getSVGStyle(i):"IMAGE_POINT"===l?Oj.getImageStyle(i):Oj.toOpenLayersStyle(i,r),h.push({olStyle:a,style:s[o],value:e})},this),h}},{key:"getCustomSetting",value:function(e,t,r){var n={};return"LINE"===r?n.strokeColor=t:n.fillColor=t,Object.assign(e,n)}},{key:"createRangeLayer",value:function(e,t){var r=this.createRangeSource(e,t),n=new DV.Vector({styleSource:r,source:new UV.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1})});return n.setStyle(function(e){var t=n.get("styleSource");if(t)for(var r=t.themeField,o=Number(e.get("attributes")[r.trim()]),i=t.styleGroups,a=0;a=i[a].start&&o<=i[a].end)return i[a].olStyle}else if(o>i[a].start&&o<=i[a].end)return i[a].olStyle}),n}},{key:"createRangeSource",value:function(e,t){var r=this.getRangeStyleGroup(e,t);return!!r&&{style:e.style,themeField:e.themeSetting.themeField,styleGroups:r}}},{key:"getRangeStyleGroup",value:function(e,t){var r,n,o=e.featureType,i=e.themeSetting,a=e.style,s=i.segmentCount,l=i.segmentMethod,u=i.colors,c=i.customSettings,f=i.themeField,h=[],p=s,y=l,d=this;t.forEach(function(e){r=e.get("attributes");try{if(r){var t=r[f.trim()];void 0!==t&&null!==t&&ij.isNumber(t)&&h.push(parseFloat(t))}else e.get(f)&&ij.isNumber(e.get(f))&&e.get(f)&&h.push(parseFloat(e.get(f)))}catch(e){d.errorCallback&&d.errorCallback(e)}});try{n=yP.getArraySegments(h,y,p)}catch(e){d.errorCallback&&d.errorCallback(e)}if(n){var v=p;for(var m in r&&n[0]===n[r.length-1]&&(v=1,n.length=2),n){var b=n[m];b=0===Number(m)?Math.floor(100*b)/100:Math.ceil(100*b)/100+.1,n[m]=Number(b.toFixed(2))}var g=u;g=hP.getGradientColors(g,v,"RANGE");for(var S=0;S0&&f.addDataflowFeature(o,e.identifyField,{dataflowSource:l,featureCache:t,labelSource:i,labelFeatureCache:r,pathSource:s,pathFeatureCache:n,maxPointCount:e.maxPointCount})}else f.addDataflowFeature(o,e.identifyField,{dataflowSource:l,featureCache:t,labelSource:i,labelFeatureCache:r,pathSource:s,pathFeatureCache:n,maxPointCount:e.maxPointCount})}}({},{},{})),this.setFeatureStyle(u,e.directionField,n.type),u}},{key:"addDataflowFeature",value:function(e,t,r){r.dataflowSource&&this.addFeatureFromDataflowService(r.dataflowSource,e,t,r.featureCache),r.labelSource&&this.addFeatureFromDataflowService(r.labelSource,e,t,r.labelFeatureCache),r.pathSource&&this.addPathFeature(r.pathSource,e,t,r.pathFeatureCache,r.maxPointCount)}},{key:"addPathFeature",value:function(e,t,r,n,o){var i=[],a=t.get(r);n[a]?((i=n[a].getGeometry().getCoordinates()).push(t.getGeometry().getCoordinates()),o&&i.length>o&&i.splice(0,i.length-o),n[a].getGeometry().setCoordinates(i)):(i.push(t.getGeometry().getCoordinates()),n[a]=new(nj())({geometry:new BV.LineString(i)}),e.addFeature(n[a]))}},{key:"setFeatureStyle",value:function(e,t,r){var n=e.get("styleOL");e.setStyle(function(e){var o,i;if((o=void 0!==t&&"未设置"!==t&&"None"!==t?e.get("attributes")[t]:0)>360||o<0)return null;i="SYMBOL_POINT"===r?n.getText():n.getImage();var a=Math.PI*o/180;return i&&i.setRotation(a),n})}},{key:"createDataflowHeatLayer",value:function(e){var t={source:this.createDataflowHeatSource(e)};if(t.gradient=e.themeSetting.colors.slice(),t.radius=parseInt(e.themeSetting.radius),e.themeSetting.customSettings){var r=e.themeSetting.customSettings;for(var n in r)t.gradient[n]=r[n]}return new DV.Heatmap(t)}},{key:"createDataflowHeatSource",value:function(e){var t=this,r=new UV.Vector({wrapX:!1});return this.createDataflowService(e,function(n){return function(o){if(e.filterCondition){var i="select * from json where ("+t.parseFilterCondition(e.filterCondition)+")",a=window.jsonsql.query(i,{attributes:o.get("attributes")});a&&a.length>0&&t.addDataflowFeature(o,e.identifyField,{dataflowSource:r,featureCache:n})}else t.addDataflowFeature(o,e.identifyField,{dataflowSource:r,featureCache:n});e.themeSetting.weight&&t.changeWeight(r.getFeatures(),e.themeSetting.weight)}}({})),r}},{key:"addFeatureFromDataflowService",value:function(e,t,r,n){var o=t.get(r);void 0!==o&&n[o]?(n[o].setGeometry(t.getGeometry()),n[o].setProperties(t.getProperties()),e.changed()):(e.addFeature(t),n[o]=t)}},{key:"createDataflowService",value:function(e,t){var r=this,n=new UD(e.wsUrl).initSubscribe();n.on("messageSucceeded",function(n){var o=JSON.parse(n.value.data),i=oH.readFeature(o,{dataProjection:e.projection||"EPSG:4326",featureProjection:r.baseProjection||"EPSG:4326"});i.setProperties({attributes:o.properties}),t(i)}),e.dataflowService=n}},{key:"setEachFeatureDefaultStyle",value:function(e){var t=this;(e=ij.isArray(e)||e instanceof zV()?e:[e]).forEach(function(e){var r=e.getGeometry().getType().toUpperCase(),n=e.getProperties().useStyle;if(n){"POINT"===r&&n.text&&(r="TEXT");var o=t.setFeatureInfo(e);e.setProperties({useStyle:n,attributes:o}),"POINT"===r&&n.src&&-1===n.src.indexOf("http://")&&-1===n.src.indexOf("https://")&&(n.src=t.server+n.src)}else n=Oj.getMarkerDefaultStyle(r,t.server);e.setStyle(Oj.toOpenLayersStyle(n,r))},this)}},{key:"setFeatureInfo",value:function(e){var t=e.get("attributes"),r=Object.assign({dataViz_title:"",dataViz_description:"",dataViz_imgUrl:"",dataViz_url:""},t),n=e.getProperties();for(var o in r)n[o]&&(r[o]=n[o],delete n[o]);return r}},{key:"createRankSymbolLayer",value:function(e,t){var r=this.createRankStyleSource(e,t,e.featureType),n=new DV.Vector({styleSource:r,source:new UV.Vector({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1}),renderMode:"image"});return n.setStyle(function(e){for(var t=n.get("styleSource"),r=t.parameters.themeSetting.themeField,o=Number(e.get("attributes")[r]),i=t.styleGroups,a=0,s=i.length;a=i[a].start&&o0&&r>0&&"EPSG:".concat(e.substring(t,r).split(",")[1].substr(1))}},{key:"createMigrationLayer",value:function(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){var t=this.get("options");t&&(this.setChartOptions(t),this.unset("options"))}else{var r=this.getChartOptions();this.set("options",r),this.clear(),this.setChartOptions({})}}),window.EChartsLayer.prototype.setZIndex||(window.EChartsLayer.prototype.setZIndex=function(e){var t=this.getContainer();t&&(t.style.zIndex=e)}),window.EChartsLayer.prototype.setCursor||(window.EChartsLayer.prototype.setCursor=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=this.getContainer();t&&"default"===e&&t.classList.add("cursor-default")});var r=ij.getFeatureProperties(t),n=this.createLinesData(e,r),o=this.createPointsData(n,e,r),i=this.createOptions(e,n,o),a=new window.EChartsLayer(i,{hideOnMoving:!1,hideOnZooming:!1,forcedPrecomposeRerender:!0});return a.type="ECHARTS",a}},{key:"createOptions",value:function(e,t,r){var n,o=this.createLineSeries(e,t);if(r&&r.length){var i=this.createPointSeries(e,r);n=o.concat(i)}else n=o.slice();return{series:n}}},{key:"createLineSeries",value:function(e,t){var r=e.lineSetting,n=e.animationSetting,o=[{name:"line-series",type:"lines",zlevel:1,silent:!0,effect:{show:n.show,constantSpeed:n.constantSpeed,trailLength:0,symbol:n.symbol,symbolSize:n.symbolSize},lineStyle:{normal:{color:r.color,type:r.type,width:r.width,opacity:r.opacity,curveness:r.curveness}},data:t}];return t.length>1e3&&(o[0].blendMode="lighter"),o}},{key:"createPointSeries",value:function(e,t){var r=e.lineSetting,n=e.animationSetting,o=e.labelSetting,i=[{name:"point-series",coordinateSystem:"geo",zlevel:2,silent:!0,label:{normal:{show:o.show,position:"right",formatter:"{b}",color:o.color,fontFamily:o.fontFamily}},itemStyle:{normal:{color:r.color||o.color}},data:t}];return n.show?(i[0].type="effectScatter",i[0].rippleEffect={brushType:"stroke"}):i[0].type="scatter",i}},{key:"createPointsData",value:function(e,t,r){var n=[],o=t.labelSetting;if(!o.show||!e.length)return n;var i=[],a=[];return e.forEach(function(e,t){var n=e.coords,s=n[0],l=n[1],u=r[t][o.from],c=r[t][o.to];!i.find(function(e){return e.value[0]===s[0]&&e.value[1]===s[1]})&&i.push({name:u,value:s}),!a.find(function(e){return e.value[0]===l[0]&&e.value[1]===l[1]})&&a.push({name:c,value:l})}),n=i.concat(a)}},{key:"createLinesData",value:function(e,t){var r=[];if(t&&t.length){var n,o,i=e.from,a=e.to;if("XY_FIELD"===i.type&&i.xField&&i.yField&&a.xField&&a.yField)t.forEach(function(e){var t=e[i.xField],s=e[i.yField],l=e[a.xField],u=e[a.yField];t&&s&&l&&u&&(n=[e[i.xField],e[i.yField]],o=[e[a.xField],e[a.yField]],r.push({coords:[n,o]}))});else if("PLACE_FIELD"===i.type&&i.field&&a.field){var s=kV.concat(RV);t.forEach(function(e){var t=e[i.field],l=e[a.field];n=s.find(function(e){return ij.isMatchAdministrativeName(e.name,t)}),o=s.find(function(e){return ij.isMatchAdministrativeName(e.name,l)}),n&&o&&r.push({coords:[n.coord,o.coord]})})}}return r}},{key:"getService",value:function(e,t){return e.filter(function(e){return e&&e.serviceType===t})[0]}},{key:"isMvt",value:function(e,t){var r=this;return this.getDatasetsInfo(e,t).then(function(e){return e.epsgCode==r.baseProjection.split("EPSG:")[1]?Jr.get(r.getRequestUrl("".concat(e.url,"/tilefeature.mvt")),null,{withCredentials:r.withCredentials}).then(function(e){return e.json()}).then(function(t){return e.isMvt=t.error&&400===t.error.code,e}).catch(function(){return e}):e})}},{key:"getDatasetsInfo",value:function(e,t){var r=this;return r.getDatasources(e).then(function(n){var o="".concat(e,"/data/datasources/").concat(n,"/datasets/").concat(t,".json");return Jr.get(r.getRequestUrl(o),null,{withCredentials:r.withCredentials}).then(function(e){return e.json()}).then(function(e){return{epsgCode:e.datasetInfo.prjCoordSys.epsgCode,bounds:e.datasetInfo.bounds,url:o}})})}},{key:"isRestMapMapboxStyle",value:function(e){var t=e.dataSource,r=e.layerType;return!(!(t&&"EXTERNAL"===t.type&&t.url.indexOf("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY")>-1)||"MAPBOXSTYLE"!==r&&"VECTOR_TILE"!==r)}},{key:"getMapboxStyleLayerInfo",value:function(e,t){var r=this;return new Promise(function(n,o){return r.getMapLayerExtent(t).then(function(t){return r.getMapboxStyle(e,t).then(function(e){Object.assign(t,e),n(t)}).catch(function(e){o(e)})}).catch(function(e){o(e)})})}},{key:"getMapLayerExtent",value:function(e){var 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");var r,n,o=e.credential;return o&&(r=o[n=Object.keys(o)[0]],t="".concat(t,"?").concat(n,"=").concat(r)),Jr.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(function(t){return e.visibleScales=t.visibleScales,e.coordUnit=t.coordUnit,e.scale=t.scale,e.epsgCode=t.prjCoordSys.epsgCode,e.bounds=t.bounds,e}).catch(function(e){return e})}},{key:"getMapboxStyle",value:function(e,t){var r=this,n=t.url||t.dataSource.url,o=n;o.indexOf("/restjsr/")>-1&&(o="".concat(o,"/style.json")),o=this.getRequestUrl(o);var i,a,s=t.credential;return s&&(a=Object.keys(s)[0],i=s[a],o="".concat(o,"?").concat(a,"=").concat(i)),Jr.get(o,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(function(o){r._matchStyleObject(o);var s=t.bounds;if(i){o.sprite="".concat(o.sprite,"?").concat(a,"=").concat(i);var l=o.sources;Object.keys(l).forEach(function(e){o.sources[e].tiles.forEach(function(t,r){o.sources[e].tiles[r]="".concat(t,"?").concat(a,"=").concat(i)})})}var u={url:n,sourceType:"VECTOR_TILE",layerType:"VECTOR_TILE",styles:o,extent:s&&[s.left,s.bottom,s.right,s.top],bounds:t.bounds,projection:"EPSG:"+t.epsgCode,epsgCode:t.epsgCode,name:t.name};return Object.assign(t,u),t.zIndex>0&&r.modifyMapboxstyleLayer(e,t),t}).catch(function(e){return e})}},{key:"modifyMapboxstyleLayer",value:function(e,t){var r=this;if(!e.layers||0!==e.layers.length){var n=t.styles.layers;if(n){n=n.filter(function(e){return"background"!==e.type}),t.styles.layers=n;var o=e.layers.filter(function(e){return"VECTOR_TILE"===e.layerType&&e.zIndex!==t.zIndex}).map(function(e){return e.styles&&e.styles.layers});!o||o&&0===o.length||o.forEach(function(e){n.forEach(function(t){r.renameLayerId(e,t)})})}}}},{key:"renameLayerId",value:function(e,t){if(e.find(function(e){return e.id===t.id})){var r=t.id.match(/(.+)\((\w)\)$/);r?t.id="".concat(r[1],"(").concat(+r[2]+1,")"):t.id+="(1)",e.find(function(e){return e.id===t.id})&&this.renameLayerId(e,t)}}},{key:"_matchStyleObject",value:function(e){var t=e.sprite,r=e.glyphs;t&&"object"===qV(t)&&(e.sprite=Object.values(t)[0]),r&&"object"===qV(r)&&(e.glyphs=Object.values(r)[0])}},{key:"isIportalProxyServiceUrl",value:function(e){if(this.serviceProxy&&this.serviceProxy.enable&&e){var t="";return this.serviceProxy.proxyServerRootUrl?t="".concat(this.serviceProxy.proxyServerRootUrl,"/"):this.serviceProxy.rootUrlPostfix?t="".concat(this.serviceProxy.port,"/").concat(this.serviceProxy.rootUrlPostfix,"/"):this.serviceProxy.rootUrlPostfix||(t="".concat(this.serviceProxy.port,"/")),80!==this.serviceProxy.port?e.indexOf(t)>=0:e.indexOf(t)>=0||e.indexOf(t.replace(":80",""))>=0}return!1}},{key:"getStyleResolutions",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:22,n=[],o=Math.abs(e.left-e.right)/512,i=t;i<=r;i++)0!==i?(o/=2,n[i]=o):n[i]=o;return n}},{key:"createVisibleResolution",value:function(e,t,r,n){var o=this,i=[];if(e&&e.length>0)i=e.map(function(e){var t=1/e;return o.getResFromScale(t,n)});else{var a=this.getEnvelope(t,r);i=this.getStyleResolutions(a)}return i}},{key:"getEnvelope",value:function(e,t){var r={};return e&&4===e.length?(r.left=e[0],r.bottom=e[1],r.right=e[2],r.top=e[3]):r=t,r}},{key:"createMVTLayer",value:function(e){var t=e.styles,r=t&&t.metadata&&t.metadata.indexbounds,n=this.createVisibleResolution(e.visibleScales,r,e.bounds,e.coordUnit),o=this.getEnvelope(r,e.bounds),i=this.getStyleResolutions(o),a=this.isIportalProxyServiceUrl(t.sprite),s=new ZB({style:t,source:t.name,resolutions:i,map:this.map,withCredentials:a});return new Promise(function(r){s.on("styleloaded",function(){var o=n[n.length-1],i=n[0],l=new DV.VectorTile({declutter:!0,source:new jB({style:t,withCredentials:a,projection:e.projection,format:new(xB())({featureClass:HV()}),wrapX:!1}),style:s.featureStyleFuntion,visible:e.visible,zIndex:e.zIndex,opacity:e.opacity,minResolution:o,maxResolution:i>1?Math.ceil(i):1.1*i});r(l)})})}},{key:"isSameDomain",value:function(e){var t=e.split("://")[1],r=t.indexOf("/"),n=t.substring(0,r),o=document.location.toString().split("://")[1],i=o.indexOf("/"),a=o.substring(0,i);if(n.indexOf(":")>-1||""!==window.location.port)return n===a;var s=n.split("."),l=a.split(".");return s[1]===l[1]&&s[2]===l[2]}},{key:"isSupportWebp",value:function(e,t){var r;return!(this.isIE()||this.isFirefox()&&this.getFirefoxVersion()<65||this.isChrome()&&this.getChromeVersion()<32)&&(e=t?"".concat(e,"/tileImage.webp?token=").concat(t):"".concat(e,"/tileImage.webp"),r=!(ae.isInTheSameDomain(e)&&!t),e=this.getRequestUrl(e,r),Jr.get(e,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0}).then(function(e){if(200!==e.status)throw e.status;return e}).then(function(){return!0}).catch(function(){return!1}))}},{key:"isIE",value:function(){return!!(window.ActiveXObject||"ActiveXObject"in window)}},{key:"isFirefox",value:function(){return navigator.userAgent.indexOf("Firefox")>-1}},{key:"isChrome",value:function(){return navigator.userAgent.indexOf("Chrome")>-1}},{key:"getFirefoxVersion",value:function(){return+navigator.userAgent.toLowerCase().match(/firefox\/([\d.]+)/)[1]}},{key:"getChromeVersion",value:function(){return+navigator.userAgent.toLowerCase().match(/chrome\/([\d.]+)/)[1]}},{key:"addGraticule",value:function(e){if(this.isHaveGraticule){this.createGraticuleLayer(e.grid.graticule),this.layerAdded++;var t=e.layers?e.layers.length:0;this.sendMapToUser(t)}}},{key:"createGraticuleLayer",value:function(e){var t=e.strokeColor,r=e.strokeWidth,n=e.lineDash,o=e.extent,i=e.visible,a=e.interval,s=e.lonLabelStyle,l=e.latLabelStyle,u=this.baseProjection,c=new sA.get(u);c.setExtent(o),c.setWorldExtent(sA.transformExtent(o,u,"EPSG:4326"));var f={layerID:"graticule_layer",strokeStyle:new(mj())({color:t,width:r,lineDash:n}),extent:o,visible:i,intervals:a,showLabels:!0,zIndex:9999,wrapX:!1,targetSize:0};s&&(f.lonLabelStyle=new(gj())({font:"".concat(s.fontSize," ").concat(s.fontFamily),textBaseline:s.textBaseline,fill:new(dj())({color:s.fill}),stroke:new(mj())({color:s.outlineColor,width:s.outlineWidth})})),l&&(f.latLabelStyle=new(gj())({font:"".concat(l.fontSize," ").concat(l.fontFamily),textBaseline:l.textBaseline,fill:new(dj())({color:l.fill}),stroke:new(mj())({color:l.outlineColor,width:l.outlineWidth})}));var h=new DV.Graticule(f);this.map.addLayer(h)}}])&&$V(r.prototype,n),o&&$V(r,o),a}(); /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ if(window&&window.ol){var uH=window.ol;uH.supermap=window.ol.supermap||{},uH.supermap.control=window.ol.supermap.control||{},uH.supermap.control.ChangeTileVersion=oA,uH.supermap.control.Logo=OA,uH.supermap.control.ScaleLine=dA,uH.supermap.StyleUtils=Oj,uH.supermap.Util=ij,uH.source.BaiduMap=Fj,uH.source.ImageSuperMapRest=Yj,uH.source.SuperMapCloud=rL,uH.source.Tianditu=pL,uH.source.TileSuperMapRest=wL,uH.supermap.WebMap=lH,uH.style.CloverShape=gF,uH.Graphic=XF,uH.style.HitCloverShape=PF,uH.source.GeoFeature=dG,uH.source.Theme=oF,uH.supermap.ThemeFeature=QD,uH.supermap.MapboxStyles=ZB,uH.supermap.VectorTileStyles=SB,uH.source.DataFlow=YD,uH.source.Graph=fF,uH.source.Graphic=uG,uH.source.HeatMap=GB,uH.source.Label=OG,uH.source.Mapv=VG,uH.source.Range=YG,uH.source.RankSymbol=eB,uH.source.Turf=sB,uH.source.Unique=pB,uH.source.VectorTileSuperMapRest=jB,uH.supermap.AddressMatchService=oU,uH.supermap.ChartService=cU,uH.supermap.DataFlowService=UD,uH.supermap.FeatureService=qA,uH.supermap.FieldService=vU,uH.supermap.GridCellInfosService=OU,uH.supermap.GeoprocessingService=EU,uH.supermap.LayerInfoService=LU,uH.supermap.MapService=XM,uH.supermap.MeasureService=BU,uH.supermap.NetworkAnalyst3DService=qU,uH.supermap.NetworkAnalystService=ZU,uH.supermap.ProcessingService=oV,uH.supermap.QueryService=BA,uH.supermap.ServiceBase=l,uH.supermap.SpatialAnalystService=cV,uH.supermap.ThemeService=vV,uH.supermap.TrafficTransferAnalystService=OV,uH.supermap.WebPrintingJobService=EV}}(),function(){"use strict"; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/}()}();