/*! * * iclient-mapboxgl.(https://iclient.supermap.io) * Copyright© 2000 - 2021 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v10.1.1 * */!function(){var e={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"];p.prototype.clone=function(){return new p(this)},f.call(p.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=p,t.Response=y,t.fetch=function(e,t){return new Promise(function(n,o){var i;i=p.prototype.isPrototypeOf(e)&&!t?e:new p(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(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(e,t){var r,o,i=(t=t||{}).body;if(p.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 h(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 p=document.createElement("script");p.setAttribute("src",""+i+s+"="+c),t.charset&&p.setAttribute("charset",t.charset),p.id=f,document.getElementsByTagName("head")[0].appendChild(p),l=setTimeout(function(){u(new Error("JSONP request to "+e+" timed out")),n(c),o(f),window[c]=function(){n(c)}},a),p.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)},820: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)}var o=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object GeneratorFunction]",l="[object Map]",u="[object Set]",c=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,p="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g,h="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,y=p||h||Function("return this")();function d(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r-1&&e%1==0&&e-1&&e%1==0&&e<=o}(e.length)&&!Y(e)}function Y(e){var t=X(e)?C.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 q(e)?B(e):U(e)},function(e){var t,r,n,o=J(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;t0&&(r=parseFloat(e.toPrecision(t))),r},format:function(t,r,n,o){r=void 0!==r?r:0,n=void 0!==n?n:e.Number.thousandsSeparator,o=void 0!==o?o:e.Number.decimalSeparator,null!=r&&(t=parseFloat(t.toFixed(r)));var i=t.toString().split(".");1===i.length&&null==r&&(r=0);var a,s=i[0];if(n)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(s);)s=s.replace(l,"$1"+n+"$2");if(0==r)a=s;else{var u=i.length>1?i[1]:"0";null!=r&&(u+=new Array(r-u.length+1).join("0")),a=s+o+u}return a}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return V.limitSigDigs(this,e)});var q=e.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(){}};e.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},e.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="")},e.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},e.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("&")},e.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},e.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]):"")},e.Util.DEFAULT_PRECISION=14,e.Util.toFloat=function(t,r){return null==r&&(r=e.Util.DEFAULT_PRECISION),"number"!=typeof t&&(t=parseFloat(t)),0===r?t:parseFloat(t.toPrecision(r))},e.Util.rad=function(e){return e*Math.PI/180},e.Util.getParameters=function(t){t=null===t||void 0===t?window.location.href:t;var r="";if(e.String.contains(t,"?")){var n=t.indexOf("?")+1,o=e.String.contains(t,"#")?t.indexOf("#"):t.length;r=t.substring(n,o)}for(var i={},a=r.split(/[&;]/),s=0,l=a.length;s1?1/e:e},e.Util.getResolutionFromScale=function(t,r){var n;t&&(null==r&&(r="degrees"),n=1/(e.Util.normalizeScale(t)*e.INCHES_PER_UNIT[r]*e.DOTS_PER_INCH));return n},e.Util.getScaleFromResolution=function(t,r){return null==r&&(r="degrees"),t*e.INCHES_PER_UNIT[r]*e.DOTS_PER_INCH},e.IS_GECKO=-1===(X=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==X.indexOf("gecko"),e.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}}(),e.Util.getBrowser=function(){return e.Browser},e.Util.isSupportCanvas=(Q=!0,K=e.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===K.name&&parseFloat(K.version)<5&&(Q=!1),"safari"===K.name&&parseFloat(K.version)<4&&(Q=!1),"opera"===K.name&&parseFloat(K.version)<10&&(Q=!1),"msie"===K.name&&parseFloat(K.version)<9&&(Q=!1)):Q=!1,Q),e.Util.supportCanvas=function(){return e.Util.isSupportCanvas},e.INCHES_PER_UNIT.degree=e.INCHES_PER_UNIT.dd,e.INCHES_PER_UNIT.meter=e.INCHES_PER_UNIT.m,e.INCHES_PER_UNIT.foot=e.INCHES_PER_UNIT.ft,e.INCHES_PER_UNIT.inch=e.INCHES_PER_UNIT.inches,e.INCHES_PER_UNIT.mile=e.INCHES_PER_UNIT.mi,e.INCHES_PER_UNIT.kilometer=e.INCHES_PER_UNIT.km,e.INCHES_PER_UNIT.yard=e.INCHES_PER_UNIT.yd,e.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,p=i.substring(0,t);return-1!==c?f=i.substring(0,c):(f=i.substring(0,t),p+=":"+("http:"===o.toLowerCase()?80:443)),f===document.domain&&p===l},e.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}},e.Util.toJSON=function(t){var r=t;if(null==r)return null;switch(r.constructor){case String:return r=(r=(r=(r=(r=(r=(r='"'+r.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var n=[],o=0,i=r.length;o0?"{"+u.join(",")+"}":"{}"}return r.toString()}},e.Util.getResolutionFromScaleDpi=function(t,r,n,o){return o=o||6378137,n=n||"",t>0&&r>0?(t=e.Util.normalizeScale(t),"degree"===n.toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()?254/r/t/(2*Math.PI*o/360)/1e4:254/r/t/1e4):-1},e.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},e.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},e.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},e.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&&a<=1&&i<=1&&a>=0?new e.Geometry.Point(t.x+i*(r.x-t.x),t.y+i*(r.y-t.y)):"No Intersection";else if(0==l&&0==u){var f=Math.max(t.y,r.y),p=Math.min(t.y,r.y),h=Math.max(t.x,r.x),y=Math.min(t.x,r.x);s=(n.y>=p&&n.y<=f||o.y>=p&&o.y<=f)&&n.x>=y&&n.x<=h||o.x>=y&&o.x<=h?"Coincident":"Parallel"}else s="Parallel";return s},e.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 ee=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Z.isArray(t)&&(r=t[1],t=t[0]),this.lon=t?Z.toFloat(t):0,this.lat=r?Z.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=Z.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+Z.toFloat(t),this.lat+Z.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}}])&&$(t.prototype,r),n&&$(t,n),e}();function te(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),p=!u.containsBounds(e);f&&!p?(e=e.add(-c,0),n=r.intersectsBounds(e,{inclusive:t.inclusive})):p&&!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}}])&&te(t.prototype,r),n&&te(t,n),e}();function ne(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 Z.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.xp*t.x+h&&n.y>p*n.x+h||t.yr.y?n.xr.x&&(s=!1):o.xp*n.x+h&&(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),P=t.y+i*Math.sin(u);f.push(new Te(_,P))}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&&je(Me(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 re(o,i,s,a)}},{key:"getLabelPxBoundsByText",value:function(e,t){var r,n,o,i,a=this.getLabelPxSize(t),s=Z.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 re(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}}])&&Fe(t.prototype,r),n&&Fe(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 We(e,t){for(var r=0;r3;if(t){this.components.pop(),Ve(Xe(i.prototype),"removeComponent",this).apply(this,arguments);var r=this.components[0];Ve(Xe(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(t,r){for(var n=e.Event.element(t);n.parentNode&&(!n.tagName||n.tagName.toUpperCase()!=r.toUpperCase());)n=n.parentNode;return n},observe:function(e,t,r,n){var o=Z.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=Z.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(t){var r=Z.getElement(t)._eventCacheID;this._removeElementObservers(e.Event.observers[r])},_removeElementObservers:function(t){if(t)for(var r=t.length-1;r>=0;r--){var n=t[r],o=new Array(n.element,n.name,n.observer,n.useCapture);e.Event.stopObserving.apply(this,o)}},stopObserving:function(t,r,n,o){o=o||!1;var i=Z.getElement(t),a=i._eventCacheID;"keypress"===r&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.detachEvent)&&(r="keydown");var s=!1,l=e.Event.observers[a];if(l)for(var u=0;!s&&u0&&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=Dt(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 o.POINT:return e.toGeoPoint();case o.LINE:return e.toGeoLine();case o.LINEM:return e.toGeoLinem();case o.REGION:return e.toGeoRegion();case o.POINTEPS:return e.toGeoPoint();case o.LINEEPS:return e.toGeoLineEPS();case o.REGIONEPS:return e.toGeoRegionEPS();case o.GEOCOMPOUND:return e.transformGeoCompound()}}},{key:"toGeoPoint",value:function(){var e=this.parts||[],t=this.points||[],r=e.length;if(r>0){if(1===r)return new Te(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])){p[b]=-1*p[g],p[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,P=l.length;_=0;S--)if(b[g]=-1,p[S].containsBounds(p[g])){h[g]=-1*h[S],h[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 P=0,C=u.length;P-1||(t[n]=e[n]);return t}}])&&ur(t.prototype,r),n&&ur(t,n),i}();function dr(e){"@babel/helpers - typeof";return(dr="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 vr(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}}])&&vr(t.prototype,r),n&&vr(t,n),i}();function wr(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 Pt(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(){}}])&&wr(t.prototype,r),n&&wr(t,n),e}();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 Pr(e,t){for(var r=0;r=e.endTime&&(e.currentTime=e.endTime)}}}])&&Pr(t.prototype,r),n&&Pr(t,n),i}();e.TimeFlowControl=Rr; /* 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 Ar=r(238),jr=r.n(Ar),Lr=window.fetch,Nr=(e.setCORS=function(t){e.CORS=t},e.isCORS=function(){return void 0!=e.CORS?e.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest}),Mr=(e.setRequestTimeout=function(t){return e.RequestTimeout=t},e.getRequestTimeout=function(){return e.RequestTimeout||45e3}),Dr=e.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!!Z.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Nr()||t.proxy)},get:function(t,r,n){n=n||{};if(t=Z.urlAppend(t,this._getParameterString(r||{})),t=this._processUrl(t,n),!this.supportDirectRequest(t,n)){var o={url:t=t.replace(".json",".jsonp"),data:r};return e.Util.RequestJSONPPromise.GET(o)}return this.urlIsLong(t)?this._postSimulatie("GET",t.substring(0,t.indexOf("?")-1),r,n):this._fetch(t,r,n,"GET")},delete:function(t,r,n){n=n||{};if(t=Z.urlAppend(t,this._getParameterString(r||{})),t=this._processUrl(t,n),!this.supportDirectRequest(t,n)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=DELETE",data:r};return e.Util.RequestJSONPPromise.DELETE(o)}return this.urlIsLong(t)?this._postSimulatie("DELETE",t.substring(0,t.indexOf("?")-1),r,n):this._fetch(t,r,n,"DELETE")},post:function(t,r,n){if(n=n||{},!this.supportDirectRequest(t,n)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=POST",data:r};return e.Util.RequestJSONPPromise.POST(o)}return this._fetch(this._processUrl(t,n),r,n,"POST")},put:function(t,r,n){if(n=n||{},t=this._processUrl(t,n),!this.supportDirectRequest(t,n)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=PUT",data:r};return e.Util.RequestJSONPPromise.PUT(o)}return this._fetch(t,r,n,"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,Lr(e,{method:n,headers:r.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:Mr()}).then(function(e){return e})):Lr(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:Mr()}).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||{},jr()(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 Ir(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 p=c.substring(0,f);"%"===p.substring(f-1,f)?(f-=1,p=c.substring(0,f)):"%"===p.substring(f-2,f-1)&&(f-=2,p=c.substring(0,f)),a+=t.queryKeys[u]+"="+p,c=c.substring(f),p.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)),jr()(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 Fr=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 Dr.post(r.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}},{key:"registerServers",value:function(e){this.servers=this.servers||{},Z.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),Dr.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=Fr.getToken(this.serviceUrl);return(e=t?new St(t,"token"):null)||(e=(t=this.getKey())?new St(t,"key"):null),e}},{key:"getKey",value:function(){}}])&&Yr(t.prototype,r),o&&Yr(t,o),e}();e.iPortalServiceBase=Xr; /* 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 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=[],Z.extend(this,t)};e.iPortalQueryParam=Qr; /* 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 Kr=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,Z.extend(this,t)};function Zr(e){"@babel/helpers - typeof";return(Zr="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 $r(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=Z.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=Z.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}},{key:"serviceProcessFailed",value:function(e){var t=(e=Z.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=Z.urlAppend(e.url,Z.getParameterString(e.params||{}))),e.params=e.data),Dr.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 Ut).read(t)),(!r||r.error||r.code>=300&&304!==r.code)&&(r=r&&r.error?{error:r.error}:{error:r}),r.error)?(e.scope?q.bind(e.failure,e.scope):e.failure)(r):(r.succeed=void 0==r.succeed||r.succeed,(e.scope?q.bind(e.success,e.scope):e.success)(r))}).catch(function(t){(e.scope?q.bind(e.failure,e.scope):e.failure)(t)})}}])&&Cn(t.prototype,r),o&&Cn(t,o),e}();function En(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}}])&&qo(t.prototype,r),n&&qo(t,n),e}();function Xo(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+="]"}}])&&ia(t.prototype,r),n&&ia(t,n),i}();function fa(e){"@babel/helpers - typeof";return(fa="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 pa(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=Fr.getToken(e);return t&&(e=Z.urlAppend(e,"token="+t)),e}}])&&pa(t.prototype,r),n&&pa(t,n),i}();function ba(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 yr;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}}])&&gu(t.prototype,r),n&&gu(t,n),i}();function Cu(e,t){for(var r=0;r0&&(t+=","),t+=Z.toJSON(e[n]);return t+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e)return null;var t=new yr;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}])&&ku(t.prototype,r),n&&ku(t,n),i}();function Nu(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 yr;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}}])&&Iu(t.prototype,r),n&&Iu(t,n),i}();function Ju(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 yr;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}}])&&Vu(t.prototype,r),n&&Vu(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.serviceAreaList)return e;var t=new yr;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}}])&&tc(t.prototype,r),n&&tc(t,n),i}();function sc(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 yr;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}}])&&cc(r.prototype,n),o&&cc(r,o),a}();function vc(e,t){for(var r=0;r=0;e--)this.points[e].destroy();this.points=null}}}])&&of(t.prototype,r),n&&of(t,n),i}();function pf(e){"@babel/helpers - typeof";return(pf="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 hf(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&Rf(t.prototype,r),n&&Rf(t,n),i}();function If(e){"@babel/helpers - typeof";return(If="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 Ff(e,t){for(var r=0;r=0&&r.toIndex>=0&&!n&&(r.url=Z.urlAppend(r.url,"fromIndex=".concat(r.fromIndex,"&toIndex=").concat(r.toIndex))),e.returnCountOnly&&(r.url=Z.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=Z.transformResult(e),this.format===t.GEOJSON&&e.features){var r=new yr;e.features=r.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}])&&Ff(r.prototype,n),o&&Ff(r,o),a}();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 Vf(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}}])&&$f(t.prototype,r),n&&$f(t,n),i}();function ap(e){"@babel/helpers - typeof";return(ap="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 sp(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&yp(t.prototype,r),n&&yp(t,n),i}();function wp(e){"@babel/helpers - typeof";return(wp="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 Op(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}}}])&&Tp(t.prototype,r),n&&Tp(t,n),i}();function Dp(e){"@babel/helpers - typeof";return(Dp="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 Ip(e,t){for(var r=0;r0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}])&&Oh(t.prototype,r),n&&Oh(t,n),e}();function Ph(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=Z.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}}])&&Hy(t.prototype,r),n&&Hy(t,n),i}();function Xy(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 gd).fromJson(t[n]),t[n]=r;break;case"GRID":(r=new xd).fromJson(t[n]),t[n]=r;break;case"IMAGE":(r=new Ld).fromJson(t[n]),t[n]=r;break;case"VECTOR":(r=new Gd).fromJson(t[n]),t[n]=r}}}}])&&Hd(t.prototype,r),n&&Hd(t,n),i}();function Xd(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})}}])&&mm(t.prototype,r),n&&mm(t,n),i}();function Pm(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=Z.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=Z.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}])&&yS(t.prototype,r),n&&yS(t,n),i}();function wS(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}}])&&Nw(t.prototype,r),n&&Nw(t,n),i}();function Uw(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=Z.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':"+Z.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[a]&&(r+="'joinItems':["+Z.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]+"'}]"}}])&&rO(r.prototype,n),o&&rO(r,o),a}();function uO(e){"@babel/helpers - typeof";return(uO="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 cO(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,Dr.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(){}}])&&TP(t.prototype,r),o&&TP(t,o),e}();function AP(e){"@babel/helpers - typeof";return(AP="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 jP(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}}])&&YP(t.prototype,r),n&&YP(t,n),e}();function QP(e){"@babel/helpers - typeof";return(QP="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 KP(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))),p=0,h=0,y=0;0===l?(p=a,h=f,y=u):1===l?(p=c,h=a,y=u):2===l?(p=u,h=a,y=f):3===l?(p=u,h=c,y=a):4===l?(p=f,h=u,y=a):(p=a,h=u,y=c),t=255*p,r=255*h,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,p=((s-i)/6+l/2)/l;n===s?t=p-f:o===s?t=1/3+c-p: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,p=((s-i)/6+l/2)/l;n===s?t=p-f:o===s?t=1/3+c-p:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,u*=100]}}])&&$P(t.prototype,r),n&&$P(t,n),e}();function tC(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)&&oC(t.prototype,r),n&&oC(t,n),e}();e.ArrayStatistic=iC;function aC(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[-180,180],o=n[1],i=n[0],a=o-i;return e===o&&t?e:e===i&&r?e:0===((e-i)%a+a)%a&&t?o:((e-i)%a+a)%a+i}function sC(e){var t=parseInt(e),r=parseInt(60*(e-t)),n=parseInt(60*(60*(e-t)-r));return r=0===parseInt(r/10)?"0".concat(r):r,n=0===parseInt(n/10)?"0".concat(n):n,"".concat(t,"°").concat(r,"'").concat(n)} /* 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 lC=r(820),uC=r.n(lC);function cC(e){"@babel/helpers - typeof";return(cC="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 fC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pC(e,t){for(var r=0;ru&&(l[o]=l[o].slice(n-u),u=n)}function d(e){var t,i,a,s;if(e instanceof Function)return e.call(c.parsers);if("string"==typeof e)t=r.charAt(n)===e?e:null,i=1,y();else{if(y(),!(t=e.exec(l[o])))return null;i=t[0].length}if(t){var f=n+=i;for(s=n+l[o].length-i;n=0&&"\n"!==n.charAt(a);a--)e.column++;return new Error([e.filename,e.line,e.column,e.message].join(";"))}return this.env=t=t||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},c={parse:function(i){var a,c=null;if(n=o=u=s=0,l=[],r=i.replace(/\r\n/g,"\n"),t.filename&&(f.env.inputs[t.filename]=r),l=function(e){for(var t,n,o,i,a=0,s=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,u=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,f=0,p=e[0],h=0;h0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),c)throw v(c);var p=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(a=new e.CartoCSS.Tree.Ruleset([],d(this.parsers.primary))).root=!0,a.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(p),t},a},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 t=d(/^[^;\n]*[;\n]/);if(t)return new e.CartoCSS.Tree.Invalid(t,a)},comment:function(){var t;if("/"===r.charAt(n))return"/"===r.charAt(n+1)?new e.CartoCSS.Tree.Comment(d(/^\/\/.*/),!0):(t=d(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new e.CartoCSS.Tree.Comment(t):void 0},entities:{quoted:function(){if('"'===r.charAt(n)||"'"===r.charAt(n)){var t=d(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return t?new e.CartoCSS.Tree.Quoted(t[1]||t[2]):void 0}},field:function(){if(d("[")){var t=d(/(^[^\]]+)/);if(d("]"))return t?new e.CartoCSS.Tree.Field(t[1]):void 0}},comparison:function(){var e=d(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var t=d(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(t)return new e.CartoCSS.Tree.Keyword(t)},call:function(){var t,r;if(t=/^([\w\-]+|%)\(/.exec(l[o])){if("url"===(t=t[1]))return null;n+=t.length;if(d("("),r=d(this.entities.arguments),d(")"))return t?new e.CartoCSS.Tree.Call(t,r,n):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 t;if("u"===r.charAt(n)&&d(/^url\(/)){t=d(this.entities.quoted)||d(this.entities.variable)||d(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return d(")")?new e.CartoCSS.Tree.URL(void 0!==t.value||t instanceof e.CartoCSS.Tree.Variable?t:new e.CartoCSS.Tree.Quoted(t)):new e.CartoCSS.Tree.Invalid(t,a,"Missing closing ) in URL.")}},variable:function(){var o,i=n;if("@"===r.charAt(n)&&(o=d(/^@[\w-]+/)))return new e.CartoCSS.Tree.Variable(o,i,t.filename)},hexcolor:function(){var t;if("#"===r.charAt(n)&&(t=d(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.CartoCSS.Tree.Color(t[1])},keywordcolor:function(){var t=l[o].match(/^[a-z]+/);if(t&&t[0]in e.CartoCSS.Tree.Reference.data.colors)return new e.CartoCSS.Tree.Color(e.CartoCSS.Tree.Reference.data.colors[d(/^[a-z]+/)])},dimension:function(){var t=r.charCodeAt(n);if(!(t>57||t<45||47===t)){var o=d(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return o?new e.CartoCSS.Tree.Dimension(o[1],o[2],a):void 0}}},variable:function(){var e;if("@"===r.charAt(n)&&(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="}")?r.charAt(n)===e:!!e.test(l[o]))},element:function(){var t=d(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(t)return new e.CartoCSS.Tree.Element(t)},attachment:function(){var e=d(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var t,o,i,s,l,u=[],c=new e.CartoCSS.Tree.Filterset,f=[],p=0,h=0;(i=d(this.element))||(l=d(this.zoom))||(s=d(this.filter))||(t=d(this.attachment));){if(p++,i)u.push(i);else if(l)f.push(l),h++;else if(s){var y=c.add(s);if(y)throw v({message:y,index:n-1});h++}else{if(o)throw v({message:"Encountered second attachment name.",index:n-1});o=t}var m=r.charAt(n);if("{"===m||"}"===m||";"===m||","===m)break}if(p)return new e.CartoCSS.Tree.Selector(c,f,u,o,h,a)},filter:function(){p();var r,n,o;if(d("[")&&(r=d(/^[a-zA-Z0-9\-_]+/)||d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.keyword)||d(this.entities.field))&&(r instanceof e.CartoCSS.Tree.Quoted&&(r=new e.CartoCSS.Tree.Field(r.toString())),(n=d(this.entities.comparison))&&(o=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:a-1});return r.is||(r=new e.CartoCSS.Tree.Field(r)),new e.CartoCSS.Tree.Filter(r,n,o,a,t.filename)}},zoom:function(){p();var t,r;if(d(/^\[\s*zoom/g)&&(t=d(this.entities.comparison))&&(r=d(this.entities.variable)||d(this.entities.dimension))&&d("]"))return new e.CartoCSS.Tree.Zoom(t,r,a);h()},block:function(){var e;if(d("{")&&(e=d(this.primary))&&d("}"))return e},ruleset:function(){var t,r,n=[];for(p();t=d(this.selector);){for(n.push(t);d(this.comment););if(!d(","))break;for(;d(this.comment););}if(t)for(;d(this.comment););if(n.length>0&&(r=d(this.block))){if(1===n.length&&n[0].elements.length&&"Map"===n[0].elements[0].value){var o=new e.CartoCSS.Tree.Ruleset(n,r);return o.isMap=!0,o}return new e.CartoCSS.Tree.Ruleset(n,r)}h()},rule:function(){var o,i,l=r.charAt(n);if(p(),"."!==l&&"#"!==l&&(o=d(this.variable)||d(this.property))){if((i=d(this.value))&&d(this.end))return new e.CartoCSS.Tree.Rule(o,i,a,t.filename);s=n,h()}},font:function(){for(var t,r=[],n=[];t=d(this.entity);)n.push(t);if(r.push(new e.CartoCSS.Tree.Expression(n)),d(","))for(;(t=d(this.expression))&&(r.push(t),d(",")););return new e.CartoCSS.Tree.Value(r)},value:function(){for(var t,r=[];(t=d(this.expression))&&(r.push(t),d(",")););return r.length>1?new e.CartoCSS.Tree.Value(r.map(function(e){return e.value[0]})):1===r.length?new e.CartoCSS.Tree.Value(r):void 0},sub:function(){var e;if(d("(")&&(e=d(this.expression))&&d(")"))return e},multiplication:function(){var t,r,n,o;if(t=d(this.operand)){for(;(n=d("/")||d("*")||d("%"))&&(r=d(this.operand));)o=new e.CartoCSS.Tree.Operation(n,[o||t,r],a);return o||t}},addition:function(){var t,o,i,s;if(t=d(this.multiplication)){for(;(i=d(/^[-+]\s+/)||" "!=r.charAt(n-1)&&(d("+")||d("-")))&&(o=d(this.multiplication));)s=new e.CartoCSS.Tree.Operation(i,[s||t,o],a);return s||t}},operand:function(){return d(this.sub)||d(this.entity)},expression:function(){for(var t,r=[];t=d(this.addition)||d(this.entity);)r.push(t);if(r.length>0)return new e.CartoCSS.Tree.Expression(r)},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:h,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+r+";} return _value; ")}}return{property:h,getValue:Function("attributes","zoom","var _value = null;"+r+"; return _value; ")}}(c[h],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(t,r,n){for(var o=0,i=n.length;o= 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"]}},yC.mapnik_reference={version:{latest:e._mapnik_reference_latest,"2.1.1":e._mapnik_reference_latest}},e.CartoCSS=yC,e.CartoCSS.Tree={},e.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}},e.CartoCSS.Tree.functions={rgb:function(e,t,r){return this.rgba(e,t,r,1)},rgba:function(t,r,n,o){var i=this,a=[t,r,n].map(function(e){return i.number(e)});return o=i.number(o),a.some(isNaN)||isNaN(o)?null:new e.CartoCSS.Tree.Color(a,o)},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(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(t.toHSL().h)):null},saturation:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(100*t.toHSL().s),"%"):null},lightness:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(100*t.toHSL().l),"%"):null},alpha:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(t.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(t,r,n){var o=n.value/100,i=2*o-1,a=t.toHSL().a-r.toHSL().a,s=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,l=1-s,u=[t.rgb[0]*s+r.rgb[0]*l,t.rgb[1]*s+r.rgb[1]*l,t.rgb[2]*s+r.rgb[2]*l],c=t.alpha*o+r.alpha*(1-o);return new e.CartoCSS.Tree.Color(u,c)},greyscale:function(t){return this.desaturate(t,new e.CartoCSS.Tree.Dimension(100))},"%":function(t){for(var r=Array.prototype.slice.call(arguments,1),n=t.value,o=0;o.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 e.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(t,r,n){return"%"===this.unit&&"%"!==n.unit?(t.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===n.unit?"*"===r||"/"===r||"%"===r?(t.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new e.CartoCSS.Tree.Dimension(e.CartoCSS.Tree.operate(r,this.value,this.value*n.value*.01),this.unit):new e.CartoCSS.Tree.Dimension(e.CartoCSS.Tree.operate(r,this.value,n.value),this.unit||n.unit)}}]),t}(),e.CartoCSS.Tree.Element=function(){function e(t){fC(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 hC(e,[{key:"specificity",value:function(){return["id"===this.type?1:0,"class"===this.type?1:0]}},{key:"toString",value:function(){return this.value}}]),e}(),e.CartoCSS.Tree.Expression=function(){function t(e){fC(this,t),this.is="expression",this.value=e}return hC(t,[{key:"ev",value:function(t){return this.value.length>1?new e.CartoCSS.Tree.Expression(this.value.map(function(e){return e.ev(t)})):this.value[0].ev(t)}},{key:"toString",value:function(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}}]),t}(),e.CartoCSS.Tree.Field=function(){function e(t){fC(this,e),this.is="field",this.value=t||""}return hC(e,[{key:"toString",value:function(){return'["'+this.value.toUpperCase()+'"]'}},{key:"ev",value:function(){return this}}]),e}(),e.CartoCSS.Tree.Filter=function(){function e(t,r,n,o,i){fC(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 hC(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}(),e.CartoCSS.Tree.Filterset=function(){function t(){fC(this,t),this.filters={}}return hC(t,[{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"!==cC(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 t=new e.CartoCSS.Tree.Filterset;for(var r in this.filters)t.filters[r]=this.filters[r];return t}},{key:"cloneWith",value:function(t){var r=[];for(var n in t.filters){var o=this.addable(t.filters[n]);if(!1===o)return!1;!0===o&&r.push(t.filters[n])}if(!r.length)return null;var i=new e.CartoCSS.Tree.Filterset;for(n in this.filters)i.filters[n]=this.filters[n];for(;n=r.shift();)i.add(n);return i}},{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}}}]),t}(),e.CartoCSS.Tree.Fontset=function e(t,r){fC(this,e),this.fonts=r,this.name="fontset-"+t.effects.length},e.CartoCSS.Tree.Invalid=function(){function e(t,r,n){fC(this,e),this.is="invalid",this.chunk=t,this.index=r,this.type="syntax",this.message=n||"Invalid code: "+this.chunk}return hC(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}(),e.CartoCSS.Tree.Keyword=function(){function e(t){fC(this,e),this.value=t;var r={transparent:"color",true:"boolean",false:"boolean"};this.is=r[t]?r[t]:"keyword"}return hC(e,[{key:"ev",value:function(){return this}}]),hC(e,[{key:"toString",value:function(){return this.value}}]),e}(),e.CartoCSS.Tree.Literal=function(){function e(t){fC(this,e),this.value=t||"",this.is="field"}return hC(e,[{key:"toString",value:function(){return this.value}},{key:"ev",value:function(){return this}}]),e}(),e.CartoCSS.Tree.Operation=function(){function t(e,r,n){fC(this,t),this.is="operation",this.op=e.trim(),this.operands=r,this.index=n}return hC(t,[{key:"ev",value:function(t){var r,n=this.operands[0].ev(t),o=this.operands[1].ev(t);return"undefined"===n.is||"undefined"===o.is?{is:"undefined",value:"undefined"}:(n instanceof e.CartoCSS.Tree.Dimension&&o instanceof e.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(r=o,o=n,n=r):t.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),n instanceof e.CartoCSS.Tree.Quoted&&o instanceof e.CartoCSS.Tree.Quoted&&"+"!==this.op?(t.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):n instanceof e.CartoCSS.Tree.Field||o instanceof e.CartoCSS.Tree.Field||n instanceof e.CartoCSS.Tree.Literal||o instanceof e.CartoCSS.Tree.Literal?"color"===n.is||"color"===o.is?(t.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new e.CartoCSS.Tree.Literal(n.ev(t).toString(!0)+this.op+o.ev(t).toString(!0)):void 0===n.operate?(t.error({message:"Cannot do math with type "+n.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):n.operate(t,this.op,o))}}]),t}(),e.CartoCSS.Tree.Quoted=function(){function t(e){fC(this,t),this.is="string",this.value=e||""}return hC(t,[{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(t,r,n){return new e.CartoCSS.Tree.Quoted(e.CartoCSS.Tree.operate(r,this.toString(),n.toString(this.contains_field)))}}]),t}(),e.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(n,o.find(new e.CartoCSS.Tree.Selector(null,null,t.elements.slice(1)),r)):n.push(o);break}}),this._lookups[o]=n)}},{key:"evZooms",value:function(t){for(var r=0;re.CartoCSS.Tree.Zoom.maxZoom||r<0)&&t.error({message:"Only zoom levels between 0 and "+e.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+r,this;case">":this.zoom="zoom && zoom > "+r;break;case">=":this.zoom="zoom && zoom >= "+r;break;case"<":this.zoom="zoom && zoom < "+r;break;case"<=":this.zoom="zoom && zoom <= "+r;break;default:return this}return this}},{key:"toString",value:function(){for(var t="",r=0;r<=e.CartoCSS.Tree.Zoom.maxZoom;r++)t+=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,p=l*l-3*s*u,h=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[h++]=y)}else{var d=f*f-4*c*p;if(this.isAroundZero(d)){var v=f/c,m=-s/a+v,b=-v/2;m>=0&&m<=1&&(i[h++]=m),b>=0&&b<=1&&(i[h++]=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[h++]=O)}else{var _=(2*c*s-3*a*f)/(2*Math.sqrt(c*c*c)),P=Math.acos(_)/3,C=Math.sqrt(c),x=Math.cos(P),E=(-s-2*C*x)/(3*a),k=(-s+C*(x+this.THREE_SQRT*Math.sin(P)))/(3*a),T=(-s+C*(x-this.THREE_SQRT*Math.sin(P)))/(3*a);E>=0&&E<=1&&(i[h++]=E),k>=0&&k<=1&&(i[h++]=k),T>=0&&T<=1&&(i[h++]=T)}}return h}},{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),p=(-i+f)/(2*a),h=(-i-f)/(2*a);p>=0&&p<=1&&(o[l++]=p),h>=0&&h<=1&&(o[l++]=h)}}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,p=this.vector.create(),h=this.vector.create(),y=this.vector.create(),d=.005,v=1/0;p[0]=l,p[1]=u;for(var m=0;m<1;m+=.05){h[0]=this.cubicAt(e,r,o,a,m),h[1]=this.cubicAt(t,n,i,s,m);var b=this.vector.distSquare(p,h);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 p=Math.sqrt(c),h=(-a+p)/(2*i),y=(-a-p)/(2*i);h>=0&&h<=1&&(o[l++]=h),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(),p=this.vector.create(),h=.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 p=n;n=this.normalizeRadian(o),o=this.normalizeRadian(p)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=u);var h=Math.atan2(l,s);return h<0&&(h+=u),h>=n&&h<=o||h+u>=n&&h+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,p[0]),m>1&&(d=c.cubicAt(t,n,i,s,p[1]))),2==m?gt&&s>n&&s>i||s=0&&f<=1){for(var p=0,h=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 p=n;n=this.normalizeRadian(o),o=this.normalizeRadian(p)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=u);for(var h=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),h+=m)}}return h}},{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,p="stroke"===(r=r||"fill")||"both"===r,h="fill"===r||"both"===r,y=0;y0&&(h&&(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(p&&this.isInsideLine(a,s,v[0],v[1],t,n,o))return!0;h&&(i+=this.windingLine(a,s,v[0],v[1],n,o)),a=v[0],s=v[1];break;case"C":if(p&&this.isInsideCubicStroke(a,s,v[0],v[1],v[2],v[3],v[4],v[5],t,n,o))return!0;h&&(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(p&&this.isInsideQuadraticStroke(a,s,v[0],v[1],v[2],v[3],t,n,o))return!0;h&&(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,P=Math.sin(w)*S+b;f?(f=!1,l=_,u=P):i+=this.windingLine(a,s,_,P);var C=(n-m)*S/g+m;if(p&&this.isInsideArcStroke(m,b,S,w,w+O,1-v[7],t,C,o))return!0;h&&(i+=this.windingArc(m,b,S,w,w+O,1-v[7],C,o)),a=Math.cos(w+O)*g+m,s=Math.sin(w+O)*S+b;break;case"z":if(p&&this.isInsideLine(a,s,l,u,t,n,o))return!0;c=!0}}return h&&(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}}])&&Cx(t.prototype,r),n&&Cx(t,n),e}();function Ex(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 Px,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(h)*r+e,f[1]=Math.sin(h)*r+t,l.min(a,f,a),l.max(s,f,s))}}])&&Ex(t.prototype,r),n&&Ex(t,n),e}();function Tx(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)}}])&&Nx(t.prototype,r),n&&Nx(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 Dx=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function Ix(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}}])&&Ix(t.prototype,r),n&&Ix(t,n),e}();function Bx(e,t){for(var r=0;ra-2?a-1:h+1][0]+i[0],t[h>a-2?a-1:h+1][1]+i[1]],b=[t[h>a-3?a-1:h+2][0]+i[0],t[h>a-3?a-1:h+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,p=0;p-5e-5&&e<5e-5}zx.Util_vector.sub(t,e,this.position),n(t[0])&&n(t[1])||(zx.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||zx.Util_matrix.create();if(zx.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&&zx.Util_matrix.translate(t,t,e),zx.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],zx.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&&zx.Util_matrix.translate(t,t,e),zx.Util_matrix.rotate(t,t,this.rotation[0]),n&&(e[0]=-e[0],e[1]=-e[1],zx.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&zx.Util_matrix.rotate(t,t,this.rotation);(o(this.position[0])||o(this.position[1]))&&zx.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?zx.Util_matrix.mul(this.transform,this.parent.transform,this.transform):zx.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}}}])&&Wx(t.prototype,r),n&&Wx(t,n),e}();function qx(e){"@babel/helpers - typeof";return(qx="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 Yx(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&&zx.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,i,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 p=(r||t).__rect||this.getRect(r||t);switch(c){case"inside":s=p.x+p.width/2,l=p.y+p.height/2,o="center",i="middle","stroke"!=t.brushType&&n==t.color&&(e.fillStyle="#fff");break;case"left":s=p.x-u,l=p.y+p.height/2,o="end",i="middle";break;case"right":s=p.x+p.width+u,l=p.y+p.height/2,o="start",i="middle";break;case"top":s=p.x+p.width/2,l=p.y-u,o="center",i="bottom";break;case"bottom":s=p.x+p.width/2,l=p.y+p.height+u,o="center",i="top"}}break;case"start":case"end":var h=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":h=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":h=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 h=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=hn&&(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=zx.Util_area.getTextHeight("ZH",e.textFont),o=zx.Util_area.getTextWidth(e.text,e.textFont),i=zx.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 p=[n.x,n.y],h=[n.x+n.width,n.y],y=[n.x+n.width,n.y+n.height],d=[n.x,n.y+n.height];a.push(p),a.push(h),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}}])&&uE(t.prototype,r),n&&uE(t,n),i}();function dE(e){"@babel/helpers - typeof";return(dE="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 vE(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=Z.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=zx.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}}])&&_E(t.prototype,r),n&&_E(t,n),i}();function TE(e){"@babel/helpers - typeof";return(TE="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 RE(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)}}])&&zE(t.prototype,r),n&&zE(t,n),i}();function QE(e){"@babel/helpers - typeof";return(QE="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;r1?zx.Util_computeBoundingBox.arc(a,s,l,c,f,!p,r,o):(r[0]=o[0]=a,r[1]=o[1]=s),zx.Util_computeBoundingBox.arc(a,s,u,c,f,!p,n,i),zx.Util_vector.min(r,r,n),zx.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}}])&&KE(t.prototype,r),n&&KE(t,n),i}();function nk(e,t){for(var r=0;r=15){var p=parseInt(i.axis3DParameter),h=[o[0]-p,o[1]+p];i.axisUseArrow?(c.push([h[0]+1.5,h[1]-7.5]),c.push([h[0]-1,h[1]+1]),c.push([h[0]+7.5,h[1]-1.5]),f.push([h[0],h[1]])):f.push([h[0],h[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 IC(S);O.style={fillColor:"#008acd"},Z.copyAttributesWithClip(O.style,i.axisStyle),s.push(e.createShape(O));var _=new IC(w);if(_.style={fillColor:"#008acd"},Z.copyAttributesWithClip(_.style,i.axisStyle),s.push(e.createShape(_)),i.axis3DParameter&&!isNaN(i.axis3DParameter)&&i.axis3DParameter>=15){var P=new IC(c);P.style={fillColor:"#008acd"},Z.copyAttributesWithClip(P.style,i.axisStyle),s.push(e.createShape(P))}}var C=new RC(f);C.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},i.axisStyle&&Z.copyAttributesWithClip(C.style,i.axisStyle),C.clickable=!1,C.hoverable=!1;var x=[e.createShape(C)],E=[];if(i.axisYLabels&&i.axisYLabels.length&&i.axisYLabels.length>0){var k=i.axisYLabels,T=k.length,R=[0,0];if(i.axisYLabelsOffset&&i.axisYLabelsOffset.length&&(R=i.axisYLabelsOffset),1==T){var A=new ox(o[0]-5+R[0],o[3]+R[1],k[0]);A.style={labelAlign:"right"},i.axisYLabelsStyle&&Z.copyAttributesWithClip(A.style,i.axisYLabelsStyle),A.clickable=!1,A.hoverable=!1,E.push(e.createShape(A))}else for(var j=o[3],L=Math.abs(o[1]-o[3])/(T-1),N=0;N0){var I=i.axisXLabels,F=I.length,B=[0,0];if(i.axisXLabelsOffset&&i.axisXLabelsOffset.length&&(B=i.axisXLabelsOffset),n&&n.xPositions&&n.xPositions.length&&n.xPositions.length==F)for(var G=n.xPositions,U=0;U=0&&r[o]&&Z.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 re(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},e.Feature.Theme.Graph=hk;var Sk=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&&mk(e,t)}(i,hk);var t,r,n,o=bk(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(){vk(gk(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(ok.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(ok.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 eC).getLinearGradient(a,0,s,0,[[0,l],[1,u]]);o.style.color=c}}}}])&&dk(t.prototype,r),n&&dk(t,n),i}();function wk(e){"@babel/helpers - typeof";return(wk="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 Ok(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(ok.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(ok.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)}}])&&Tk(t.prototype,r),n&&Tk(t,n),i}();function Mk(e){"@babel/helpers - typeof";return(Mk="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 Dk(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 bx(s[0],s[1],a);l.style=ok.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=ok.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()}}}])&&Dk(t.prototype,r),n&&Dk(t,n),i}();function Hk(e){"@babel/helpers - typeof";return(Hk="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 Jk(e,t){for(var r=0;rr[1])return null;a=l[f],s=t[1]-(o[f]-r[0])/n;var h=new _C(a,s);h.style=ok.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,f,o[f]),h.highlightStyle=ok.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(h.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(h.clickable=e.pointClickAble),h.refDataID=this.data.id,h.dataInfo={field:this.fields[f],value:o[f]},c.push(this.shapeFactory.createShape(h));var y=[a,s];u.push(y)}var d=new RC(u);d.style=ok.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 KC(l[0],l[1],p,u,c);if(void 0===e.sectorStyleByFields){var v=h%t.length;d.style=ok.ShapeStyleTool(null,e.sectorStyle,t,null,v)}else d.style=ok.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,h,r[h]);d.highlightStyle=ok.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[h],value:r[h]},this.shapes.push(this.shapeFactory.createShape(d)),u=c}this.shapesConvertToRelativeCoordinate()}}}}])&&Qk(t.prototype,r),n&&Qk(t,n),i}();function rT(e){"@babel/helpers - typeof";return(rT="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 nT(e,t){for(var r=0;rr[1])return null;a=l[u],s=t[1]-(o[u]-r[0])/n;var f=new _C(a,s);f.style=ok.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,u,o[u]),f.highlightStyle=ok.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=Z.copyAttributesWithClip(c,this.style,["pointList"])).pointList=i;var f=new ME({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&&Z.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=Z.copyAttributesWithClip(c,this.style)).x=n[0],c.y=n[1];var f=new sE({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&&Z.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}}},{key:"multiLineStringToTF",value:function(e){for(var t=e.components,r=0;r0){var p=i[i.length-1];if(Math.abs(p[0]-n[0])<=l&&Math.abs(p[1]-n[1])<=l)continue}i.push(n)}}else{a=[];for(var h=0;h0){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=Z.copyAttributesWithClip(d,this.style,["pointList"])).pointList=i;var v=new kE({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&&Z.copyAttributesWithClip(v,this.shapeOptions),this.shapes.push(v)}}},{key:"rectangleToTF",value:function(e){var t=this.location,r=new ee(e.x,e.y),n=this.layer.map.getResolution(),o=this.getLocalXY(r),i=new Object;i.r=6,(i=Z.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 XE({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&&Z.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=Z.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 yE({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&&Z.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 jT&&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 jT&&i.delChildrenFromStorage(this))}}},{key:"addToMap",value:function(e){return e instanceof jT&&(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 jT&&(t._storage=null)),this}},{key:"dispose",value:function(){this._elements=null,this._roots=null,this._hoverElements=null}}])&<(t.prototype,r),n&<(t,n),e}();function MT(e){"@babel/helpers - typeof";return(MT="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){return(DT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IT(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=FT(e);if(t){var o=FT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===MT(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 FT(e){return(FT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function BT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GT(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 JT(Z.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 ZP).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,Dx.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=zx.Util_event.getX(e),this._mouseY=zx.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,Dx.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(Dx.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,Dx.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,Dx.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&&zx.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&&(zx.Util_matrix.invert(t,e.transform),zx.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=x;Sa);S++);S=Math.min(S-1,u-2)}x=S,E=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],P=v[S>u-2?u-1:S+1],C=v[S>u-3?u-1:S+2],f?uR._catmullRomInterpolateArray(O,_,P,C,w,w*w,w*w*w,n(e,l),h):(c=p?uR.rgba2String(k):uR._catmullRomInterpolate(O,_,P,C,w,w*w,w*w*w),r(e,l,c))):f?uR._interpolateArray(v[S],v[S+1],w,n(e,l),h):(p?(uR._interpolateArray(v[S],v[S+1],w,k,1),y=uR.rgba2String(k)):y=uR._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}}])&&gR(t.prototype,r),n&&gR(t,n),e}();e.Components.MessageBox=SR;var wR=function(){try{return echarts}catch(e){return{}}}(),OR=r.n(wR),_R={code:null,defaultCode:"en-US",getCode:function(){return e.Lang.code||e.Lang.setCode(),e.Lang.code},setCode:function(){var t=this.getLanguageFromCookie();t?e.Lang.code=t:(t=e.Lang.defaultCode,0===(t="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(t="zh-CN"),0===t.indexOf("en")&&(t="en-US"),e.Lang.code=t)},getLanguageFromCookie:function(){for(var e=document.cookie.split(";"),t=0;t0){var a=i.SheetNames[0],s=CR().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,_R.i18n("msg_dataInWrongGeoJSONFormat")),r&&r.call(o,i)}else n&&n.call(o,_R.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",Dr.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(_R.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");Dr.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"),Dr.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");Dr.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"),Dr.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 So(s),a=new Qp({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),new nh(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,a,s,l,u,c){var f,p,h={name:t};Object.assign(h,r),f=new So(h),n&&(f.fields=n);var y={queryParams:[f]};c&&(y.queryOption=i.ATTRIBUTE),l&&(y.startRecord=l),u&&(y.expectCount=u),o&&(y.prjCoordSys={epsgCode:o}),p=new mg(y),this._queryBySQL(e,p,function(e){"processCompleted"===e.type?a(e):s(e)})}},{key:"_queryBySQL",value:function(e,t,r,n){new Pg(e,{eventListeners:{scope:this,processCompleted:r,processFailed:r},format:this._processFormat(n)}).processAsync(t)}},{key:"_processFormat",value:function(e){return e||t.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 RR(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 kR(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],p=c.properties[f];l.push(p)}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)}}])&&jA(t.prototype,r),n&&jA(t,n),i}();e.Components.PaginationContainer=DA;e.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!"};e.Lang["zh-CN"]={title_dataFlowService:"数据流服务",title_distributedAnalysis:"分布式分析",title_clientComputing:"客户端计算",title_dataServiceQuery:"数据服务查询",title_searchCity:"搜索城市",title_searchLayer:"搜索图层",text_input_value_inputDataFlowUrl:"请输入数据流服务地址如:ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"显示要素信息",text_subscribe:"订阅",text_cancelSubscribe:"取消订阅",text_densityAnalysis:"密度分析",text_CalculateTheValuePerUnitArea:"计算点指定邻域形状内的每单位面积量值",text_option_selectDataset:"请选择数据集",text_label_dataset:"数据集",text_option_simplePointDensityAnalysis:"简单点密度分析",text_option_nuclearDensityAnalysis:"核密度分析",text_label_analyticalMethod:"分析方法",text_option_quadrilateral:"四边形",text_option_hexagon:"六边形",text_label_meshType:"网格面类型",text_option_notSet:"未设置",text_label_weightField:"权重字段",text_label_gridSizeInMeters:"网格大小",text_label_searchRadius:"搜索半径",text_label_queryRange:"分析范围",text_label_areaUnit:"面积单位",text_option_equidistantSegmentation:"等距离分段",text_option_logarithm:"对数",text_option_equalCountingSegment:"等计数分段",text_option_squareRootSegmentation:"平方根分段",text_label_thematicMapSegmentationMode:"专题图分段模式",text_label_thematicMapSegmentationParameters:"专题图分段参数",text_option_greenOrangePurpleGradient:"绿橙紫渐变",text_option_greenOrangeRedGradient:"绿橙红渐变",text_option_rainbowGradient:"彩虹渐变",text_option_spectralGradient:"光谱渐变",text_option_terrainGradient:"地形渐变",text_label_thematicMapColorGradientMode:"专题图颜色渐变模式",text_label_resultLayerName:"结果图层名称",text_chooseFile:"选择文件",text_isoline:"等值线",text_extractDiscreteValue:"提取离散值生成曲线",text_buffer:"缓冲区",text_specifyTheDistance:"指定距离创建周边区域",text_label_analysisLayer:"分析图层",text_label_extractField:"提取字段",text_label_extractedValue:"提取值",text_label_distanceAttenuation:"距离衰减",text_label_gridSize:"栅格大小",text_label_bufferRadius:"缓冲半径",text_label_defaultkilometers:"默认10千米",text_option_kilometer:"千米",text_label_unit:"单位",text_retainOriginal:"保留原对象字段属性",text_mergeBuffer:"合并缓冲区",text_label_color:"颜色",text_label_buffer:"[缓冲区]",text_label_isolines:"[等值线]",text_label_queryRangeTips:"默认为输入数据的全幅范围。范例:-74.050,40.650,-73.850,40.850",text_label_IDArrayOfFeatures:"要素 ID 数组",text_label_maxFeatures:"最多可返回的要素数量",text_label_bufferDistance:"缓冲区距离",text_label_queryRange1:"查询范围",text_label_spatialQueryMode:"空间查询模式",text_label_featureFilter:"要素过滤器",text_label_geometricObject:"几何对象",text_label_queryMode:"查询模式",text_label_searchTips:"搜索城市地点或图层要素",text_label_chooseSearchLayers:"选择查询图层",text_loadSearchCriteria:"加载搜索条件",text_saveSearchCriteria:"保存搜索条件",btn_analyze:"分析",btn_analyzing:"分析中",btn_emptyTheAnalysisLayer:"清空分析图层",btn_cancelAnalysis:"取消",btn_query:"查询",btn_querying:"查询中",btn_emptyTheRresultLayer:"清除所有结果图层",msg_dataFlowServiceHasBeenSubscribed:"已订阅该数据流服务。",msg_inputDataFlowUrlFirst:"请先输入数据流服务地址。",msg_datasetOrMethodUnsupport:"该数据集不支持本分析类型,请重新选择数据集",msg_selectDataset:"请选择数据集!",msg_setTheWeightField:"请设置权重字段!",msg_theFieldNotSupportAnalysis:"您当前选择的字段不支持分析!",msg_resultIsEmpty:"分析的结果为空!",msg_dataReturnedIsEmpty:"请求成功,查询返回的数据为空。",msg_openFileFail:"打开文件失败!",msg_fileTypeUnsupported:"不支持该文件格式!",msg_fileSizeExceeded:"文件大小超限!文件大小不得超过 10M!",msg_dataInWrongGeoJSONFormat:"数据格式错误!非标准的 GEOJSON 格式数据!",msg_dataInWrongFormat:"数据格式错误!非标准的 EXCEL, CSV 或 GEOJSON 格式数据!",msg_searchKeywords:"搜索关键字不能为空,请输入搜索条件。",msg_searchGeocodeField:"未匹配到地址匹配服务数据!",msg_cityGeocodeField:"未配置当前城市的地址匹配服务。",msg_getFeatureField:"未查找到相关矢量要素!",msg_dataflowservicesubscribed:"已订阅该数据流服务。",msg_subscribesucceeded:"数据流服务订阅成功。",msg_crsunsupport:"不支持当前地图的坐标系",msg_tilematrixsetunsupport:"不支持传入的TileMatrixSet",msg_jsonResolveFiled:"json格式解析失败!",msg_requestContentFiled:"通过iportal请求数据失败!",msg_getdatafailed:"获取数据失败!"};var IA=mapboxgl,FA=r.n(IA);!function(){FA().Map.prototype.overlayLayersManager={},void 0===FA().Map.prototype.addLayerBak&&(FA().Map.prototype.addLayerBak=FA().Map.prototype.addLayer,FA().Map.prototype.addLayer=function(e,t){return e.source||"custom"===e.type||"background"===e.type?(this.addLayerBak(e,t),this):this.overlayLayersManager[e.id]||this.style._layers[e.id]?void this.fire("error",{error:new Error("A layer with this id already exists.")}):(function(e,t){e.onAdd&&e.onAdd(t)}(e,this),this.overlayLayersManager[e.id]=e,this)}),FA().Map.prototype.getLayer=function(e){return this.overlayLayersManager[e]?this.overlayLayersManager[e]:this.style.getLayer(e)},FA().Map.prototype.moveLayer=function(e,t){return this.overlayLayersManager[e]?(function(e,t){var r=document.getElementById(e);if(t){var n=document.getElementById(t);n||FA().Evented.prototype.fire("error",{error:new Error('Layer with id "'.concat(t,'" does not exist on this document.'))})}r&&n?n.parentNode.insertBefore(r,n):r.parentNode.appendChild(r)}(e,t),this):this.style._layers[e]?(this.style.moveLayer(e,t),this._update(!0),this):void 0},FA().Map.prototype.removeLayer=function(e){return this.overlayLayersManager[e]?((t=this.overlayLayersManager[e]).removeFromMap&&t.removeFromMap(),delete this.overlayLayersManager[e],this):(this.style.removeLayer(e),this._update(!0),this);var t},FA().Map.prototype.setLayoutProperty=function(e,t,r){return this.overlayLayersManager[e]?("visibility"===t&&(r="visible"===r,n=this.overlayLayersManager[e],o=r,n.setVisibility&&n.setVisibility(o),this.style.fire("data",{dataType:"style"})),this):(this.style.setLayoutProperty(e,t,r),this._update(!0),this);var n,o},FA().Map.prototype.updateTransform=function(e,t,r,n,o,i,a){this.transform.units=e;var s=this.mercatorZfromAltitude;FA().MercatorCoordinate.fromLngLat=function(e,n){n=n||0;var o=FA().LngLat.convert(e);return new(FA().MercatorCoordinate)((o.lng-t)/i,(r-o.lat)/a,s(n,o.lat))},FA().MercatorCoordinate.prototype.toLngLat=function(){return new(FA().LngLat)(this.x*i+t,r-this.y*a)},this.customConvertPoint=window.URL.createObjectURL(new Blob(["customConvertPoint = {projectX:function(x){return (x - "+n+") / "+i+" + 0.5},projectY:function(y){y = 0.5 - ((y - "+o+") / "+a+");return y < 0 ? 0 : y > 1 ? 1 : y;},toY:function(y){return (0.5-y)*"+a+"+"+o+";}}"],{type:"text/javascript"}))}}(); /* 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.*/ FA().supermap=FA().supermap||{};function BA(e,t){for(var r=0;r"+r+"",this._createStyleSheet(),this._container}},{key:"_createStyleSheet",value:function(){var e=document.createElement("style");e.type="text/css",e.innerHTML=".iclient-logo{margin:0 !important;}.iclient-logo a{border: none;display: block;height:31px;}.iclient-logo img{border: none;white-space: nowrap}",document.getElementsByTagName("head")[0].appendChild(e)}},{key:"_extend",value:function(e){for(var t=0;t1&&(e=new Te(t[0],t[1])),new Lt(e,this.attributes)}}])&&JA(t.prototype,r),n&&JA(t,n),e}();function WA(e,t){for(var r=0;r=0;t--)e[t].destroy()}}},{key:"setVisibility",value:function(e){e!==this.visibility&&(this.visibility=e,this.display(e),this.redrawThematicFeatures(this.map.getBounds()))}},{key:"display",value:function(e){this.div.style.display=e?"block":"none"}},{key:"setOpacity",value:function(e){if(e!==this.opacity){this.opacity=e;var t=this.div;Z.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&FA().Evented.prototype.fire("changelayer",{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();Z.isArray(e)||(e=[e]);for(var t=[],r=e.length-1;r>=0;r--){var n=e[r],o=Z.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(),XA(ZA(i.prototype),"removeFeatures",this).call(this,e)}},{key:"removeAllFeatures",value:function(){this.clearCache(),XA(ZA(i.prototype),"removeAllFeatures",this).call(this)}},{key:"redraw",value:function(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getBounds()),!0)}},{key:"clear",value:function(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}}])&&YA(t.prototype,r),n&&YA(t,n),i}();function ej(e){"@babel/helpers - typeof";return(ej="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 tj(e,t){for(var r=0;rs){var p=i[0];i.splice(0,1),delete o[p]}}}if(this.renderer.render(),r&&this.isHoverAble&&this.isMultiHover){var h=this.getShapesByFeatureID(r);this.renderer.updateHoverShapes(h)}}},{key:"createThematicFeature",value:function(e){var t=Z.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=Z.copyAttributesWithClip(e.style));var r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=ok.transformStyle(this.highlightStyle);for(var n=new PT(e,this,ok.transformStyle(t),r),o=0;o0&&0==this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),r=0,n=t.length;r=0&&y.x<=f.x&&y.y>=0&&y.y<=f.y){if(r.style.minZoomLevel>-1&&u<=r.style.minZoomLevel)continue;if(r.style.maxZoomLevel>-1&&u>r.style.maxZoomLevel)continue;var d=null;r.isStyleChange?(r.isStyleChange=null,d=this.calculateLabelBounds(r,y)):d=r.geometry.bsInfo.w&&r.geometry.bsInfo.h?this.calculateLabelBounds2(r,y):this.calculateLabelBounds(r,y);var v=new re(0,f.y,f.x,0),m=d.length;if(this.isAvoid){var b=this.getAvoidInfo(v,d);if(b){if("left"===b.aspectW){r.style.labelXOffset+=b.offsetX;for(var g=0;g=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;ir.options.maxZoom)){var a=t.getBounds(),s=a.getEast()-a.getWest(),u=a.getNorth()-a.getSouth(),c=s/this.canvasLayer.canvas.width,f=u/this.canvasLayer.canvas.height,p=function(e){var t;if(e===l.METER)t=1;else if(e===l.DEGREE)t=2*Math.PI*6378137/360;else if(e===l.KILOMETER)t=.001;else if(e===l.INCH)t=1/.025399999918;else{if(e!==l.FOOT)return t;t=.3048}return t}("DEGREE")*c,h=t.getCenter(),y=t.project(h),d={transferCoordinate:function(e){if(t.transform.rotationMatrix||"2d"===r.context){var n=t.project(new(FA().LngLat)(e[0],e[1]));return[n.x,n.y]}var o=[(e[0]-h.lng)/c,(h.lat-e[1])/f];return[o[0]+y.x,o[1]+y.y]}};void 0!==e&&(d.filter=function(t){var r=n.trails||10;return e&&t.time>e-r&&t.time",a="
"+(t._createLegendElement.call(t)||"")+"
";this._container.innerHTML=i+a}return t._appendLegendCSSStyle(),this._container},r.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},new r}},{key:"_createLegendElement",value:function(){}},{key:"_addLayer",value:function(){var e=this.getLayerStyleOptions(),t=this.id?this.id:"theme3DLayer",r=this.sourceId=t+"Source";this.map.getSource(r)?(this.map.removeSource(r),this.map.addSource(r,{type:"geojson",data:this.data})):this.map.addSource(r,{type:"geojson",data:this.data}),this.map.addLayer({id:t,type:"fill-extrusion",source:r,paint:e}),this.map.moveLayer(t)}},{key:"_addHighLightLayer",value:function(){if(this.map){var e=this.map;e.addLayer({id:this._highlightLayerId,type:"fill-extrusion",source:this.sourceId,paint:this.getHighlightStyleOptions(),filter:["in","$id",""]}),this._selectFeatureId=null,e.on("mousemove",this.id,this._onMouseMove.bind(this)),e.on("mouseout",this.id,this._onMouseMove.bind(this))}}},{key:"_onMouseMove",value:function(e){var t=this,r=this.map,n=r.queryRenderedFeatures(e.point,{layers:[t.id]});if(t.highlight&&t.highlight.callback&&t.highlight.callback(n,e),!n||n.length<1)return t._clearHighlight.call(t),void(t._selectFeatureId=null);var o=n[0].id;t._selectFeatureId!==o&&(t._selectFeatureId=o,r.setFilter(t._highlightLayerId,["==","$id",t._selectFeatureId]))}},{key:"_clearHighlight",value:function(){this.map&&this.map.setFilter(this._highlightLayerId,["in","$id",""])}},{key:"_appendLegendCSSStyle",value:function(){var e=document.createElement("style");e.type="text/css";e.innerHTML="\n .legend {\n display: inline-block;\n border-radius: 2px;\n -moz-border-radius: 2px;\n -webkit-border-radius: 2px;\n font-size: 12px;\n color: rgba(0, 0, 0, 0.8);\n background-color: rgb(255, 255, 255);\n }\n .legend-light {\n color: rgba(0, 0, 0, 0.8);\n background-color: rgb(255, 255, 255);\n box-shadow: 0px 0px 6px #bbbbbb;\n -moz-box-shadow: 0px 6px 10px #bbbbbb;\n -webkit-box-shadow: 0px 0px 6px #bbbbbb;\n }\n .legend-dark {\n color: rgba(255, 255, 255, 0.8);\n background-color: rgb(64, 64, 64);\n }\n .legend .legend-title {\n min-height: 14px;\n max-width: 500px;\n padding:6px 10px;\n }\n .legend-light .legend-title {\n color: rgba(0, 0, 0, 0.8);\n }\n .legend-dark .legend-title {\n color: rgba(255, 255, 255, 0.8);\n }\n .legend-content{\n padding:6px 10px;\n }\n "+this._legendCSSStyle(),document.getElementsByTagName("head")[0].appendChild(e)}},{key:"_legendCSSStyle",value:function(){return"\n .legend ul {\n padding: 0;\n margin: 0 16px;\n height: 100%;\n display: block;\n list-style: none;\n }\n\n .legend li {\n vertical-align: middle;\n }\n\n .legend li span:first-child {\n vertical-align: middle;\n }\n\n .legend li span:last-child {\n line-height: 28px;\n max-width: 200px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n -ms-text-overflow: ellipsis;\n }\n\n .legend-vertical li {\n height: 28px;\n }\n\n .legend-vertical li span:first-child {\n display: inline-block;\n width: 60px;\n height: 100%;\n }\n\n .legend-vertical li span:last-child {\n display: inline-block;\n margin-left: 16px;\n height: 100%;\n }\n\n .legend-horizontal li {\n height: 56px;\n float: left;\n }\n\n .legend-horizontal li span:first-child {\n display: block;\n width: 100%;\n height: 50%;\n }\n\n .legend-horizontal li span:last-child {\n display: block;\n vertical-align: middle;\n width: 60px;\n height: 50%;\n text-align: center;\n }\n "}},{key:"_extend",value:function(e){for(var t=0;t";for(e=0;e "+o;else o=o+"-"+this._getWrapperText(this.colorStops[e+1][0]);r+="
  • "+o+"
  • "}return r+=""}},{key:"_getWrapperText",value:function(e){var t=e*(null==this.legendRatio?1:parseFloat(this.legendRatio)),r=parseFloat(t);return r%1e6<=1e6?r.toString():parseInt(r/1e3)+"k"}}])&&Aj(t.prototype,r),n&&Aj(t,n),i}();function Ij(e){"@babel/helpers - typeof";return(Ij="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 Fj(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"+n+""}return e+=""}}])&&Qj(t.prototype,r),n&&Qj(t,n),i}();function rL(e){"@babel/helpers - typeof";return(rL="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 nL(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;u0&&void 0!==arguments[0]?arguments[0]:null;if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,this.layer.props.data&&(this.layer.props.data.length=0),void this.update();Z.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--){var r=e[t],n=Z.indexOf(this.graphics,r);-1!==n&&this.graphics.splice(n,1)}this.update()}},{key:"update",value:function(){if("Awaiting state"!==this.layer.lifecycle){this.layer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0});var e=this.getState();this.layer.setState(e)}}},{key:"clear",value:function(){this.removeGraphics(),this.deckGL.finalize()}},{key:"remove",value:function(){this.map.off("render",this._moveEvent.bind(this)),this.map.off("resize",this._resizeEvent.bind(this)),this.map.getCanvasContainer().removeChild(this.canvas)}},{key:"removeFromMap",value:function(){this.remove(),this.clear()}},{key:"moveTo",value:function(e,t){var r=document.getElementById(this.id);if(t=void 0===t||t){var n=document.getElementById(e);r&&n&&n.parentNode.insertBefore(r,n)}else{var o=document.getElementById(e);if(r){if(o.nextSibling)return void o.parentNode.insertBefore(r,o.nextSibling);o.parentNode.appendChild(r)}}}},{key:"setVisibility",value:function(e){this.canvas&&e!==this.visibility&&(this.visibility=e,this.canvas.style.display=e?"block":"none")}},{key:"getState",value:function(){var e=this.map,t=parseInt(this.canvas.style.width),r=parseInt(this.canvas.style.height),n=e.getCenter(),o={longitude:n.lng,latitude:n.lat,zoom:e.getZoom(),maxZoom:e.getMaxZoom(),pitch:e.getPitch(),bearing:e.getBearing()},i={};for(var a in o)i[a]=o[a];return i.width=t,i.height=r,i.data=this.graphics,i.color=this.color,i.radius=this.radius,i.opacity=this.opacity,i.highlightColor=this.highlightColor,i.radiusScale=this.radiusScale,i.radiusMinPixels=this.radiusMinPixels,i.radiusMaxPixels=this.radiusMaxPixels,i.strokeWidth=this.strokeWidth,i.outline=this.outline,e.getCRS&&e.getCRS()!==FA().CRS.EPSG3857&&(i.coordinateSystem=this.coordinateSystem,i.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem),i}},{key:"draw",value:function(){var e=this.getState(),t={};for(var r in e)t[r]=e[r];t.layers=[this.layer],t.canvas=this.canvas,this.deckGL.setProps(t)}},{key:"_moveEvent",value:function(){this.draw()}},{key:"_resizeEvent",value:function(){var e=this.canvas,t=this.map;e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,this.draw()}},{key:"_initContainer",value:function(){this.canvas=this._createCanvas(),this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}},{key:"_createCanvas",value:function(){var e=document.createElement("canvas");this.id&&(e.id=this.id),e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.cursor="";var t=this.map;return e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,e}}])&&cL(t.prototype,r),n&&cL(t,n),e}();FA().supermap.GraphicLayer=pL;var hL=function(){try{return THREE}catch(e){return{}}}(); /* 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.*/ function yL(e,t,r){if(e===r||e===t)return e;var n=r-t;return((e-t)%n+n)%n+t}function dL(e){return e*Math.PI/180}var vL={matrix:[1,-1,0,0],projection:{R:6378137,minZoom:0,maxZoom:22,nativeMaxZoom:19,RAD:Math.PI/180,METERS_PER_DEGREE:6378137*Math.PI/180,MAX_LATITUDE:85.0511287798,project:function(e){var t=this.RAD,r=this.METERS_PER_DEGREE,n=this.MAX_LATITUDE,o=e instanceof Array?{lng:e[0],lat:e[1]}:{lng:e.lng,lat:e.lat},i=o.lng,a=Math.max(Math.min(n,o.lat),-n);return{x:i*r,y:(0===a?0:Math.log(Math.tan((90+a)*t/2))/t)*r}},unproject:function(e){var t,r=e.x,n=e.y,o=this.RAD,i=this.METERS_PER_DEGREE;return 0===n?t=0:(t=n/i,t=(2*Math.atan(Math.exp(t*o))-Math.PI/2)/o),{lng:yL(r/i,-180,180),lat:yL(t,-this.MAX_LATITUDE,this.MAX_LATITUDE)}},locate:function(e,t,r){if(!e)return null;if(t=t||0,r=r||0,!t&&!r)return e;var n=e.lng;if(0!==t){var o=Math.abs(t),i=dL(e.lng);n=yL(180*(i+=2*Math.sqrt(Math.pow(Math.sin(o/(2*this.R)),2)/Math.pow(Math.cos(i),2))*(o>0?1:-1))/Math.PI,-180,180)}var a=e.lat;if(0!==r){var s=Math.abs(r),l=dL(e.lat);a=yL(180*(l+=2*Math.sin(s/(2*this.R))*(s>0?1:-1))/Math.PI,-90,90)}return{lng:n,lat:a}},getResolution:function(e){if(!this.resolutions){for(var t=[],r=12756274*Math.PI,n=0;n<=this.maxZoom;n++)t[n]=r/(256*Math.pow(2,n));this.resolutions=t}var o=0|e,i=this.resolutions.length;o=o<0?0:o>i-1?i-1:o;var a=this.resolutions[o];return(0|e)!==e&&o!==i-1?a+(this.resolutions[o+1]-a)*(e-o):a}},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},lngLatToPoint:function(e,t){var r=this.project(e);return this.transform(r,this.projection.getResolution(t))},locate:function(e,t,r){return this.projection.locate(e,t,r)},transform:function(e,t){return{x:this.matrix[0]*(e.x-this.matrix[2])/t,y:this.matrix[1]*(e.y-this.matrix[3])/t}}};function mL(e,t){for(var r=0;r=0;t--)e.children[t]instanceof hL.Mesh&&e.remove(e.children[t]);return this}},{key:"clearAll",value:function(e){var t=this.renderer.scene;if(!t)return this;for(var r=t.children.length-1;r>=0;r--)!e&&t.children[r]instanceof hL.Camera||t.remove(t.children[r]);return this}},{key:"setPosition",value:function(e,t){if(!e||!t)return this;var r=this.lngLatToPosition(t);return e.position.set(r.x,r.y,r.z),this}},{key:"lngLatToPosition",value:function(e){var t=vL.projection.nativeMaxZoom,r=vL.lngLatToPoint(e,t);return new NL(r.x,r.y,-0)}},{key:"distanceToThreeVector3",value:function(e,t,r){var n=this._map,o=r||n.getCenter(),i=vL.projection.nativeMaxZoom,a=vL.locate(o,e,t),s=vL.lngLatToPoint(o,i),l=vL.lngLatToPoint(a,i),u=Math.abs(l.x-s.x)*Math.sign(e),c=Math.abs(l.y-s.y)*Math.sign(t);return new NL(u,c,0)}},{key:"removeDuplicatedCoordinates",value:function(e){function t(e,t){return e[0]===t[0]&&e[1]===t[1]}for(var r=[].concat(e),n=r.length-1;n>=1;n--)t(r[n],r[n-1])&&r.splice(n,1);return t(r[0],r[r.length-1])&&r.splice(r.length-1,1),r}},{key:"getCoordinatesCenter",value:function(e){for(var t=0,r=0,n=0,o=0,i=e.length;o0?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,l=[],u=e.getEast()-e.getWest(),c=e.getNorth()-e.getSouth(),f=this.map.getCanvas();o=u/f.width>c/f.height?u/f.width:c/f.height,this.useRadius=this.useGeoUnit?parseInt(this.radius/o):this.radius;for(var p=0;p0&&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;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:this.map;this.map=e,this._initialize(),this._createCanvas(),this._bindEvent(),this._drawCanvas(),this._addGraticuleLayer(),this.setVisibility()}},{key:"removeFromMap",value:function(){this.mapContainer.removeChild(this.canvas),this.canvas=null,this._unbindEvent()}},{key:"setVisibility",value:function(e){var t=this.map&&this.map.getZoom();this.options.visible="boolean"==typeof e?e:this.options.visible,this.visible="boolean"==typeof e?e:this.options.visible&&t>=this.options.minZoom&&t<=this.options.maxZoom,this.map.getLayer(this.sourceId)&&this.map.setLayoutProperty(this.sourceId,"visibility",this.visible?"visible":"none"),this._drawLabel()}},{key:"setMinZoom",value:function(e){this.options.minZoom=e,this.setVisibility()}},{key:"setMaxZoom",value:function(e){this.options.maxZoom=e,this.setVisibility()}},{key:"setShowLabel",value:function(e){this.options.showLabel=e,this._drawLabel()}},{key:"setExtent",value:function(e){this.options.extent=this._getDefaultExtent(e,this.map),this.features=this._getGraticuleFeatures(),this._updateGraticuleLayer(),this._drawLabel()}},{key:"setStrokeStyle",value:function(e){if(this.map&&this.map.getLayer(this.sourceId)){this.options.strokeStyle=e;var t=this._transformStrokeStyle(e),r=t.layout,n=t.paint;for(var o in r)this.map.setLayoutProperty(this.sourceId,o,r[o]);for(var i in n)this.map.setPaintProperty(this.sourceId,i,n[i])}}},{key:"setLngLabelStyle",value:function(e){this.options.lngLabelStyle=e,this._drawLabel()}},{key:"setLatLabelStyle",value:function(e){this.options.latLabelStyle=e,this._drawLabel()}},{key:"setIntervals",value:function(e){this.options.interval=e,this._calcInterval(),this.features=this._getGraticuleFeatures(),this._updateGraticuleLayer(),this._drawLabel()}},{key:"_bindEvent",value:function(){this.map.on("move",this.resetEvent),this.map.on("moveend",this.resetEvent),this.map.on("styledata",this.styleDataEevent),this.map.on("resize",this.resizeEvent),this.map.on("zoomend",this.zoomendEvent)}},{key:"_unbindEvent",value:function(){this.map.off("move",this.resetEvent),this.map.off("moveend",this.resetEvent),this.map.off("styledata",this.styleDataEevent),this.map.off("resize",this.resizeEvent),this.map.off("zoomend",this.zoomendEvent)}},{key:"_initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.map,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options;(t=t||{}).strokeStyle=KL(KL({},tN),t.strokeStyle||{}),t.lngLabelStyle=KL(KL({},eN),t.lngLabelStyle||{}),t.latLabelStyle=KL(KL({},eN),t.latLabelStyle||{}),this.options=KL(KL(KL({},rN),t),{},{extent:this._getDefaultExtent(t.extent,e),wrapX:"boolean"==typeof t.wrapX?t.wrapX:e.getRenderWorldCopies()}),this.oldExtent=this.options.extent,this._calcInterval(),this.isRotate=!1,this.visible=!0,this.features=this._getGraticuleFeatures()}},{key:"_createCanvas",value:function(){if(!this.canvas){this.canvas=document.createElement("canvas"),this.canvas.id=this.canvasId,this.canvas.style.position="absolute",this.canvas.style.top="0px",this.canvas.style.left="0px";var e=("undefined"==typeof window?{}:window).devicePixelRatio||1;this.canvas.width=parseInt(this.map.getCanvas().style.width)*e,this.canvas.height=parseInt(this.map.getCanvas().style.height)*e,this.canvas.style.width=this.map.getCanvas().style.width,this.canvas.style.height=this.map.getCanvas().style.height,this.canvas.globalAlpha=this.options.opacity,this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}}},{key:"_drawCanvas",value:function(){this.canvas||this._createCanvas(),this.setVisibility(),this._reset()}},{key:"_resizeCallback",value:function(){this.mapContainer&&this.mapContainer.removeChild(this.canvas),this.canvas=null,this._drawCanvas()}},{key:"_reset",value:function(){this._updateRotate(),this._updateExtent(),this._calcInterval(),this._drawLabel()}},{key:"_setLayerTop",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.map;if(t){var r=t.getStyle&&t.getStyle().layers;r&&r.length&&r.findIndex(function(t){return t.id===e.sourceId})!==r.length-1&&t.getLayer(this.sourceId)&&(t.removeLayer(this.sourceId),this._addGraticuleLayer())}}},{key:"_getDefaultExtent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.map,r=(t.getCRS&&t.getCRS()||{}).extent;if(r||(r=[-180,-85.05119,180,85.05119]),!e||0===e.length)return r;var n=FA().LngLatBounds.convert(e),o=n._sw,i=n._ne;return e=[o.lng,o.lat,i.lng,i.lat],e=[Math.max(r[0],e[0]),Math.max(r[1],e[1]),Math.min(r[2],e[2]),Math.min(r[3],e[3])]}},{key:"_updateRotate",value:function(){var e=this.map.getBearing();this.isRotate=e>-180&&e<=-90||e>=90&&e<180}},{key:"_updateExtent",value:function(){if(this.options.wrapX&&!this.oldExtent){var e=this.map.getBounds(),t=e._ne,r=e._sw;this.options.extent=[r.lng,r.lat,t.lng,t.lat]}}},{key:"_calcInterval",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.interval;"function"==typeof e?(e=e(this.map),this._currLngInterval=e,this._currLatInterval=e):(this._currLngInterval=e,this._currLatInterval=e)}},{key:"_formatLat",value:function(e){return this.options.latFormatTickLabel?this.options.latLabelFormatter(e):e<0?sC(-1*e)+"S":e>0?sC(e)+"N":""+sC(e)}},{key:"_formatLng",value:function(e){return this.options.lngLabelFormatter?this.options.lngLabelFormatter(e):(e=aC(e))>0&&e<=180?sC(e)+"E":e<0&&e>=-180?sC(-1*e)+"W":""+sC(e)}},{key:"_parsePxToInt",value:function(e){e.length>2&&"p"===e.charAt(e.length-2)&&(e=e.substr(0,e.length-2));try{return parseInt(e,10)}catch(e){console.log(e)}return 0}},{key:"_drawLabel",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.visible,r=this.canvas,n=r.getContext("2d");if(t&&this.options.showLabel){if(this.map){this._currLngInterval&&this._currLatInterval||this._calcInterval(),n.clearRect(0,0,r.width,r.height);var o=this.options,i=o.lngLabelStyle,a=o.latLabelStyle,s=this._getGridiculePoints(),l=s.lngPoints,u=s.latPonits;l.forEach(function(t){e._drawLng(n,t[0],t[1],t[2],i)}),u.forEach(function(t){e._drawLat(n,t[0],t[1],t[2],a)})}}else n.clearRect(0,0,r.width,r.height)}},{key:"_drawLat",value:function(e,t,r,n,o){e=this._setLabelStyle(e,o);var i=this.canvas.width,a=12;try{var s=e.font.split(" ")[0];a=this._parsePxToInt(s)}catch(e){console.log(e)}if(!n){var l=t;t=r,r=this.map.project([l,t])}var u=this._formatLat(t),c=e.measureText(u).width;e.strokeText(u,(n?i:r.x)-c,(n?r:r.y)+a/2),e.fillText(u,(n?i:r.x)-c,(n?r:r.y)+a/2)}},{key:"_drawLng",value:function(e,t,r,n,o){e=this._setLabelStyle(e,o);var i=this.canvas.height;if(!n){var a=r;r=this.map.project([t,a])}var s=this._formatLng(t),l=e.measureText(s).width;e.strokeText(s,(n?r:r.x)-l/2,n?i:r.y),e.fillText(s,(n?r:r.x)-l/2,n?i:r.y)}},{key:"_getLatPoints",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-180,180],r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.features;if(o){if(this.options.wrapX&&-180===t[0]&&180===t[1])return[];var i=[];return o.forEach(function(o){var a=o.geometry.coordinates[0][1];if(o.geometry.coordinates[1][1]===a){var s="number"==typeof n?n:t[1];e.isRotate&&(s="number"==typeof r?r:t[0]),e.options.wrapX&&(i=i.concat(e._getWrapPoints(s,a,[s,s]))),i.push([s,a])}}),i}}},{key:"_getLngPoints",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-90,90],r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.features;if(o){var i="number"==typeof r?r:t[0];this.isRotate&&(i="number"==typeof n?n:t[1]);var a=[];return o.forEach(function(t){var r=t.geometry.coordinates[0][0];t.geometry.coordinates[1][0]===r&&(a.push([r,i]),e.options.wrapX&&(a=a.concat(e._getWrapPoints(r,i))))}),a}}},{key:"_getWrapPoints",value:function(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.oldExtent,n=[],o=this.map.getBounds(),i=o._ne,a=o._sw,s=r.length>2?r[2]:r[1];e>=a.lng;){var l=aC(e,180===s,-180===r[0]);(!r||l>=r[0]&&l<=s)&&n.push([e,t]),e-=360}for(;e<=i.lng;){var u=aC(e,180===s,-180===r[0]);(!r||u>=r[0]&&u<=s)&&n.push([e,t]),e+=360}return n}},{key:"_getGridiculePoints",value:function(){var e=this._getEdgeLat(),t=this._getEdgeLng(),r=this._getRange(),n=r.latRange,o=r.lngRange,i=r.firstLat,a=r.firstLng,s=r.lastLat,l=r.lastLng;return{latPonits:this._getUniquePoint(this._getLatPoints(o,a,l),e,1),lngPoints:this._getUniquePoint(this._getLngPoints(n,i,s),t,0)}}},{key:"_getEdgeLat",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currLatInterval,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.map,n=[],o=[],i=this.canvas.width,a=this.canvas.height,s=this._getRange().extent,l=this.map.getBounds()._ne;if(this.options.wrapX&&aC(l.lng)>s[2])return[];for(var u=this._countDecimals(t),c=0;c<=a;c++){var f=r.unproject([i,c]),p=aC(f.lng);(this.options.wrapX?p>=s[0]&&p<=s[2]:f.lng>=s[0]&&f.lng<=s[2])&&f.lat>=s[1]&&f.lat<=s[3]&&(n.push([f.lat,c]),o.push(f.lat),void 0===e&&f.lat.toFixed(u)%t==0&&(e=Number(f.lat.toFixed(u))))}var h=this._getIntersectRange(e,o,n,t),y=h.first,d=h.last,v=h.coordinates,m=h.points;e=Math.min(Math.max(y,-90),90);var b=Math.max(Math.min(Math.round(d),90),-90);return-90!==e||-90!==b?this._getClosestCoordinate(e,b,v,m,t):[]}},{key:"_getEdgeLng",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._currLngInterval,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.map,n=[],o=[],i=this.canvas.width,a=this.canvas.height,s=this.options.extent,l=this._countDecimals(t),u=this.map.getBounds()._sw;if(this.options.wrapX&&aC(u.lat)>s[3])return[];for(var c=0;c<=i;c++){var f=r.unproject([c,a]),p=aC(f.lng);(this.options.wrapX?p>=s[0]&&p<=s[2]:f.lng>=s[0]&&f.lng<=s[2])&&f.lat>=s[1]&&f.lat<=s[3]&&(n.push([f.lng,c]),o.push(f.lng),void 0===e&&f.lng.toFixed(l)%t==0&&(e=Number(f.lng.toFixed(l))))}var h=this._getIntersectRange(e,o,n,t),y=h.first,d=h.last,v=h.coordinates,m=h.points;return e=y,this._getClosestCoordinate(e,d,v,m,t)}},{key:"_getIntersectRange",value:function(e,t,r,n){var o=t[t.length-1];if(e>o){o=e,t.reverse(),r.reverse();for(var i=this._countDecimals(n),a=0;a<=t.length;a++){var s=t[a];if(s.toFixed(i)%n==0){e=Number(s.toFixed(i));break}}}return{first:e,last:o,coordinates:t,points:r}}},{key:"_getClosestCoordinate",value:function(e,t,r,n,o){for(var i=[],a=e;a<=t;){var s=this._getClosestNumberIndex(a,r),l=n[s];i.push([Math.round(l[0]),l[1],!0]),a+=o,r=r.slice(s),n=n.slice(s)}return i}},{key:"_getClosestNumberIndex",value:function(e,t){for(var r=0,n=Number.MAX_VALUE,o=0;o2&&void 0!==arguments[2]?arguments[2]:0;if(this.options.wrapX)return e.concat(t);if(!t||0===t.length)return e;var n=t,o=this.canvas.width,i=this.canvas.height;for(var a in e){var s=this.map.project(e[a]),l=n.findIndex(function(t){return t[0]===e[a][r]});l<=-1?n.push(e[a]):s&&s.x>=0&&s.x<=o&&s.y>=0&&s.y<=i&&(n[l]=e[a])}return n}},{key:"_countDecimals",value:function(e){return Math.floor(e)!==e&&e.toString().split(".")[1].length||0}},{key:"_addGraticuleLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.features;if(!this.map.getSource(this.sourceId)){var t={type:"geojson",data:{type:"FeatureCollection",features:e}};this.map.addSource(this.sourceId,t)}this.map.getLayer(this.sourceId)||this.map.addLayer(KL({id:this.sourceId,type:"line",source:this.sourceId},this._transformStrokeStyle()))}},{key:"_updateGraticuleLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.features;if(this.map.getSource(this.sourceId)){var t={type:"FeatureCollection",features:e};this.map.getSource(this.sourceId).setData(t)}this._addGraticuleLayer()}},{key:"_getGraticuleFeatures",value:function(){var e=this._currLngInterval||10,t=this._currLatInterval||10,r=[],n=this._getRange(),o=n.latRange,i=n.lngRange,a=n.firstLat,s=n.firstLng,l=n.lastLat,u=n.lastLng;this.options.wrapX&&!this.oldExtent&&(o=[-90,90],i=[-180,180],a=s=l=u=null),"number"==typeof s&&r.unshift(this._makeLineFeature(this._makeLineCoords(s,o,a,l))),"number"==typeof u&&r.unshift(this._makeLineFeature(this._makeLineCoords(u,o,a,l)));for(var c=i[0];c<=i[1];c+=e)r.unshift(this._makeLineFeature(this._makeLineCoords(c,o,a,l)));"number"==typeof a&&r.unshift(this._makeLineFeature(this._makeLineCoords(a,i,s,u,"lat"))),"number"==typeof l&&r.unshift(this._makeLineFeature(this._makeLineCoords(l,i,s,u,"lat")));for(var f=o[0];f<=o[1];f+=t)r.unshift(this._makeLineFeature(this._makeLineCoords(f,i,s,u,"lat")));return r}},{key:"_getRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.extent&&YL(this.options.extent);e&&0!==e.length||(e=this._getDefaultExtent());var t={};if((e=e.map(function(e){return Number(e.toFixed(6))}))[1]%this._currLatInterval!=0){t.firstLat=e[1];var r=Math.ceil(e[1]/this._currLatInterval);e[1]=r*this._currLatInterval}if(e[3]%this._currLatInterval!=0){t.lastLat=e[3];var n=Math.floor(e[3]/this._currLatInterval);e[3]=n*this._currLatInterval}if(e[0]%this._currLngInterval!=0){t.firstLng=e[0];var o=Math.ceil(e[0]/this._currLngInterval);e[0]=o*this._currLngInterval}if(e[2]%this._currLngInterval!=0){t.lastLng=e[2];var i=Math.floor(e[2]/this._currLngInterval);e[2]=i*this._currLngInterval}return KL({latRange:[e[1],e[3]],lngRange:[e[0],e[2]],extent:e},t)}},{key:"_makeLineCoords",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[-90,90],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"lng";e="lng"===o?this._lngFix(e):e,r="number"==typeof r?r:t[0],n="number"==typeof n?n:t[1];for(var i=Math.abs(r-n),a=[],s=r;s<=n;s+=i)"lng"===o?a.push([e,s]):a.push([s,e]);return a}},{key:"_makeLineFeature",value:function(e){return{type:"Feature",geometry:{type:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"LineString",coordinates:e}}}},{key:"_lngFix",value:function(e){return e>=180?180:e<=-180?-180:e}},{key:"_transformStrokeStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.strokeStyle;if(!e||"string"==typeof e)return{paint:{"line-color":e||"rgba(0,0,0,0.2)"}};var t={visibility:this.visible?"visible":"none","line-join":e.lineJoin||"round","line-cap":e.lineCap||"round"},r={"line-color":e.lineColor||"rgba(0,0,0,0.2)","line-width":e.lineWidth||1,"line-offset":e.lineDashOffset||0,"line-translate-anchor":"viewport"};return e.lineWidth&&("function"==typeof e.lineWidth?r["line-width"]=e.lineWidth(this.map):r["line-width"]=e.lineWidth),e.lindDasharray&&("function"==typeof e.lindDasharray?r["line-dasharray"]=e.lindDasharray(this.map):r["line-dasharray"]=e.lindDasharray),{layout:t,paint:r}}},{key:"_setLabelStyle",value:function(e,t){return t.textColor&&(e.fillStyle=t.textColor),t.textSize&&(e.font=t.textSize+" "+(t.textFont||["Calibri","sans-serif"]).join(",")),t.textHaloColor&&(e.strokeStyle=t.textHaloColor,e.lineWidth=t.textHaloWidth||1),t.textAnchor&&(e.textBaseline=this._getTxetBaseline(t.textAnchor),e.textAligin=this._getTxetAlign(t.textAligin)),e}},{key:"_getTxetBaseline",value:function(e){if(!e)return"bottom";var t=e.split("-");return t.includes("bottom")?"bottom":t.includes("top")?"top":t.includes("center")?"middle":void 0}},{key:"_getTxetAlign",value:function(e){if(!e)return"center";var t=e.split("-");return t.includes("left")?"left":t.includes("right")?"right":t.includes("center")?"center":void 0}}])&&$L(t.prototype,r),n&&$L(t,n),e}();FA().supermap.GraticuleLayer=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={getPoint:function(e){if(e&&e instanceof Array)return new dj.DataSet([{geometry:{type:"Point",coordinates:e}}])},getPoints:function(e){if(e&&e instanceof Array){var t=[];return e.map(function(e){return t.push({geometry:{type:"Point",coordinates:e.geometry.coordinates}}),e}),new dj.DataSet(t)}},getCurveLines:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var r=[];return t.map(function(t){var n=t.geometry&&t.geometry.coordinates,o={lng:n[0],lat:n[1]},i={lng:e[0],lat:e[1]},a=dj.utilCurve.getPoints([i,o]);return r.push({geometry:{type:"LineString",coordinates:a}}),t}),new dj.DataSet(r)}},getCurveDynamicPoints:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var r=[];return t.map(function(t){for(var n=t.geometry&&t.geometry.coordinates,o={lng:n[0],lat:n[1]},i={lng:e[0],lat:e[1]},a=dj.utilCurve.getPoints([i,o]),s=0;s-1){var n=this.server.split(r);n.length>1&&(t=n[0]+r+this.server+"web/maps/"+this.mapId+"/map.json")}this._getMapInfo(t)}},{key:"_createMap",value:function(e){var t=[],r=e.layers;r&&r.length>0&&r.forEach(function(e){e.labelStyle&&t.push(e.labelStyle.fontFamily)},this),t.push("'supermapol-icons'");var n,o=t.join(","),i=e.center,a=e.level||0,s=0;if(e.minScale&&e.maxScale)s=this._transformScaleToZoom(e.minScale,FA().CRS?FA().CRS.get(this.baseProjection):"EPSG:3857");else{var l=this._getResolution(FA().CRS?FA().CRS.get(this.baseProjection).getExtent():[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892])/this._getResolution(e.extent);s=+Math.log(l)/Math.LN2.toFixed(2)}a+=s,n=i?this._unproject([i.x,i.y]):new(FA().LngLat)(0,0),this.map=new(FA().Map)({container:this.target,center:n,zoom:a,style:{version:8,sources:{},layers:[]},crs:this.baseProjection,localIdeographFontFamily:o||""}),this.fire("mapinitialized")}},{key:"_getMapInfo",value:function(e){var t=this,r=-1===e.indexOf(".json")?"".concat(e,".json"):e;Dr.get(r,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){t.baseProjection=e.projection,t.mapParams={title:e.title,description:e.description};if(!(t.baseProjection in{"EPSG:4490":"EPSG:4490","EPSG:4214":"EPSG:4214","EPSG:4610":"EPSG:4610","EPSG:3857":"EPSG:3857","EPSG:4326":"EPSG:4326"}))throw Error(_R.i18n("msg_crsunsupport"));t._createMap(e,t.mapSetting);var r=e.layers;t.map.on("load",function(){t._addBaseMap(e),r&&0!==r.length?t._addLayers(r):t._sendMapToUser(0,0)})}).catch(function(e){t.fire("getmapfailed",{error:e})})}},{key:"_addBaseMap",value:function(e){this._createBaseLayer(e)}},{key:"_createBaseLayer",value:function(e){var t=e.baseLayer||e,r=t.layerType;(r.indexOf("TIANDITU_VEC")>-1||r.indexOf("TIANDITU_IMG")>-1||r.indexOf("TIANDITU_TER")>-1)&&(r=r.substr(0,12));var n;switch(r){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":this._createTiandituLayer(e);break;case"BING":this._createBingLayer(t.name);break;case"WMS":this._createWMSLayer(t);break;case"WMTS":this._createWMTSLayer(t);break;case"TILE":case"SUPERMAP_REST":this._createDynamicTiledLayer(t);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":n={CLOUD:"http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",CLOUD_BLACK:"http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",OSM:"http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",GOOGLE:"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",GOOGLE_CN:"https://mt{0-3}.google.cn/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}",JAPAN_STD:"https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",JAPAN_PALE:"https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",JAPAN_RELIEF:"https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",JAPAN_ORT:"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg"}[r],this._createXYZLayer(t,n);break;case"MAPBOXSTYLE":this._createMapboxStyle(t)}}},{key:"_createMapboxStyle",value:function(e){var t,r=this,n=e.dataSource,o=void 0===n?{}:n,i=o.serverId,a=o.url;t=void 0!==i?"".concat(this.server,"web/datas/").concat(i,"/download"):a,Dr.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(function(e){r._matchStyleObject(e),r.map.setStyle(e)})}},{key:"_matchStyleObject",value:function(e){var t=e.sprite,r=e.glyphs;t&&"object"===mD(t)&&(e.sprite=Object.values(t)[0]),r&&"object"===mD(r)&&(e.glyphs=Object.values(r)[0])}},{key:"_createTiandituLayer",value:function(e){var t=this._getTiandituUrl(e),r=e.baseLayer.layerType,n=Boolean(e.baseLayer.labelLayerVisible),o=t.labelUrl,i=t.tiandituUrl;this._addBaselayer(i,"tianditu-layers-"+r),n&&this._addBaselayer(o,"tianditu-label-layers-"+r)}},{key:"_createWMTSLayer",value:function(e){var t=this,r=this._getWMTSUrl(e);this._filterWMTSIsMatched(e,function(n,o){n&&t._addBaselayer([r],"wmts-layers"+e.name,0,o)})}},{key:"_filterWMTSIsMatched",value:function(e,t){var r=this,n=!1,o=22,i=e.url;Dr.get(i,null,{withCredentials:!1,withoutFormatSuffix:!0}).then(function(e){return e.text()}).then(function(i){var a=yD()?yD():window.convert,s=JSON.parse(a.xml2json(i,{compact:!0,spaces:4})).Capabilities.Contents.TileMatrixSet;Array.isArray(s)||(s=[s]);for(var l=0;l-1)n=!0;else{if(!s[l].WellKnownScaleSet||"Custom"!==s[l].WellKnownScaleSet._text)throw Error(_R.i18n("msg_tilematrixsetunsupport"));for(var u=[],c="EPSG:3857"===r.map.crs?OD:_D,f=0,p=c.length;f-1&&(r.svgDiv||(r.svgDiv=document.createElement("div"),document.body.appendChild(r.svgDiv)),r._getCanvasFromSVG(o.src,r.svgDiv,function(t){var n=t.toDataURL("img/png");n&&r.map.loadImage(n,function(t,n){t&&console.log(t),r.map.addImage(s+"",n),r.map.addLayer({id:l,type:"symbol",source:a,layout:{"icon-image":s+"","icon-size":o.scale,visibility:e.visible}})},r)})),!o.src){var u={layout:{}};"LINESTRING"===n&&o.lineCap&&(n="LINE",u.layout={"line-cap":o.lineCap});var c=e.visible;u.layout.visibility=c,u.style=r._transformStyleToMapBoxGl(o,n),r._addOverlayToMap(n,a,l,u),"POLYGON"===n&&o.strokeColor&&r._addStrokeLineForPoly(o,a,l+"-strokeLine",c)}},this)}},{key:"setFeatureInfo",value:function(e){var t,r=e.dv_v5_markerInfo;if(!r||!r.dataViz_title)return r;t=r;var n=e.properties;for(var o in t)n[o]&&(t[o]=n[o],delete n[o]);return t}},{key:"_createHeatLayer",value:function(e,t){var r=e.themeSetting,n={};n.gradient=r.colors.slice(),n.radius=parseInt(r.radius);var o=r.customSettings;for(var i in o)n.gradient[i]=o[i];r.weight&&this._changeWeight(t,r.weight);var a=["interpolate",["linear"],["heatmap-density"]],s=(1/n.gradient.length).toFixed(2);n.gradient.forEach(function(e,t){a.push(t*s),0===t&&(e=HA.hexToRgba(e,0)),a.push(e)});var l={"heatmap-color":a,"heatmap-radius":r.radius+15,"heatmap-intensity":{base:1,stops:[[0,.8],[22,1]]}};if(t[0].weight&&t.length>=4){var u=[];t.forEach(function(e){u.push(e.weight)});var c=iC.getMax(u),f=iC.getMin(u);l["heatmap-weight"]=["interpolate",["linear"],["get","weight"],f,0,c,1]}this.map.addLayer({id:e.layerID,type:"heatmap",source:{type:"geojson",data:{type:"FeatureCollection",features:t}},paint:l})}},{key:"_changeWeight",value:function(e,t){this.fieldMaxValue={},this._getMaxValue(e,t);var r=this.fieldMaxValue[t];e.forEach(function(e){var n=e.properties[t];e.weight=n/r})}},{key:"_getMaxValue",value:function(e,t){var r,n=[],o=t;this.fieldMaxValue[o]||(e.forEach(function(e){(r=e.properties)&&parseFloat(r[o])&&n.push(parseFloat(r[o]))}),this.fieldMaxValue[o]=iC.getArrayStatistic(n,"Maximum"))}},{key:"_createRangeLayer",value:function(e,t){var r=e.themeSetting.themeField,n=e.style,o=e.featureType,i=this._getRangeStyleGroup(e,t),a={type:"geojson",data:{type:"FeatureCollection",features:t=this._getFiterFeatures(e.filterCondition,t)}},s=["match",["get","index"]];t.forEach(function(e){for(var t=parseFloat(e.properties[r]),n=0;n0&&n.push(i)}return n}},{key:"_replaceFilterCharacter",value:function(e){return e=e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=")}},{key:"_getRangeStyleGroup",value:function(e,t){var r,n=e.featureType,o=e.style,i=[],a=e.themeSetting,s=a.customSettings,l=a.themeField,u=a.segmentCount;t.forEach(function(e){(r=e.properties||e.get("Properties"))?r[l]&&HA.isNumber(r[l])&&i.push(parseFloat(r[l])):e.get(l)&&HA.isNumber(e.get(l))&&e.get(l)&&i.push(parseFloat(e.get(l)))},this);var c=iC.getArraySegments(i,a.segmentMethod,u);if(c){var f=u;for(var p in r&&c[0]===c[r.length-1]&&(f=1,c.length=2),c){var h=c[p];h=0==p?Math.floor(100*h)/100:Math.ceil(100*h)/100+.1,c[p]=Number(h.toFixed(2))}for(var y=a.colors,d=0;d1e-7;a++)t=1,i+=s=Math.PI/2-2*Math.atan(o*t)-i;return new(FA().LngLat)(e[0]*r/n,i*r)}},{key:"_getParamString",value:function(e,t,r){var n=[];for(var o in e)n.push((r?o.toUpperCase():o)+"="+e[o]);return(t&&-1!==t.indexOf("?")?"&":"?")+n.join("&")}},{key:"_isXField",value:function(e){var t=e.toLowerCase();return"x"===t||"smx"===t||"jd"===t||"经度"===t||"东经"===t||"longitude"===t||"lot"===t||"lon"===t||"lng"===t}},{key:"_isYField",value:function(e){var t=e.toLowerCase();return"y"===t||"smy"===t||"wd"===t||"纬度"===t||"北纬"===t||"latitude"===t||"lat"===t}},{key:"_transformStyleToMapBoxGl",value:function(e,t,r){var n={};"POINT"!==e.type&&"BASIC_POINT"!==e.type&&"POINT"!==t||"LINE"===t?"LINE"===t?n={strokeWidth:"line-width",strokeColor:"line-color",strokeOpacity:"line-opacity"}:"POLYGON"===t&&(n={fillColor:"fill-color",fillOpacity:"fill-opacity",strokeColor:"fill-outline-color"}):n={fillColor:"circle-color",strokeWidth:"circle-stroke-width",fillOpacity:"circle-opacity",radius:"circle-radius",strokeColor:"circle-stroke-color",strokeOpacity:"circle-stroke-opacity"};var o={};for(var i in e)n[i]&&(o[n[i]]=e[i]);return r&&(o["circle-color"]?o["circle-color"]=r:o["line-color"]?o["line-color"]=r:o["fill-color"]=r),e.lineDash&&"solid"!==e.lineDash&&"LINE"===t&&(o["line-dasharray"]=this._dashStyle(e)),o}},{key:"_dashStyle",value:function(e){if(!e)return[];var t=e.strokeDashstyle||e.lineDash;switch(t){case"solid":return[];case"dot":return[1,4];case"dash":return[4,4];case"dashdot":return[4,4,1,4];case"longdash":return[8,4];case"longdashdot":return[8,4,1,4];default:return t?Z.isArray(t)?t:(t=W.trim(t).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}},{key:"_getCanvasFromSVG",value:function(e,t,r){var n=document.createElement("canvas");n.id="dataviz-canvas-"+HA.newGuid(8),n.style.display="none",t.appendChild(n),(window.canvg?window.canvg:vD())(n.id,e,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:function(){n.width>300||n.height>300||r(n)},forceRedraw:function(){return!1}})}},{key:"_addOverlayToMap",value:function(e,t,r,n){"circle"!==(e={POINT:"circle",LINE:"line",POLYGON:"fill"}[e])&&"line"!==e&&"fill"!==e||this.map.addLayer({id:r,type:e,source:t,paint:n.style,layout:n.layout||{}})}},{key:"_addBaselayer",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:22,o=arguments.length>4?arguments[4]:void 0;this.map.addLayer({id:t,type:"raster",source:{type:"raster",tiles:e,tileSize:256,rasterSource:o?"iserver":"",prjCoordSys:o?{epsgCode:this.baseProjection.split(":")[1]}:""},minzoom:r,maxzoom:n})}},{key:"_addStrokeLineForPoly",value:function(e,t,r,n){var o={};o.style=this._transformStyleToMapBoxGl(e,"LINE"),o.layout={visibility:n},this._addOverlayToMap("LINE",t,r,o)}},{key:"_parseGeoJsonData2Feature",value:function(e){for(var t=e.allDatas.features,r=[],n=0,o=t.length;n 0"}),i=new Qp({queryParameter:o,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),new nh(e,{eventListeners:{processCompleted:function(e){r&&r(e)},processFailed:function(e){n&&n(e)}}}).processAsync(i)}},{key:"_queryFeatureBySQL",value:function(e,t,r,n,o,a,s,l,u,c){var f,p;f=new So({name:t,attributeFilter:r}),n&&(f.fields=n);var h={queryParams:[f]};c&&(h.queryOption=i.ATTRIBUTE),l&&(h.startRecord=l),u&&(h.expectCount=u),o&&(h.prjCoordSys={epsgCode:o}),p=new mg(h),new(FA().supermap.QueryService)(e).queryBySQL(p,function(e){"processCompleted"===e.type?a(e):s(e)})}},{key:"_handleMultyPolygon",value:function(e){return e.forEach(function(e){if("Polygon"===e.geometry.type){var t=e.geometry.coordinates;if(t.length>1){var r=[];t.forEach(function(e){r.push([e])}),e.geometry.coordinates=r,e.geometry.type="MultiPolygon"}}}),e}},{key:"_transformScaleToZoom",value:function(e,t){var r=295829515.2024169;"EPSG:3857"!==(t||this.map.getCRS()).epsgCode&&(r=295295895);var n=e.split(":")[1];return Math.min(24,+Math.log2(r/+n).toFixed(2))}},{key:"_getResolution",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512;return e.leftBottom&&e.rightTop?Math.max(e.rightTop.x-e.leftBottom.x,e.rightTop.y-e.leftBottom.y)/t:Math.max(e[2]-e[0],e[3]-e[1])/t}}])&&bD(t.prototype,r),n&&bD(t,n),a}();FA().supermap.WebMap=CD}(),function(){"use strict"}()}();