/*! * * iclient-leaflet.(https://iclient.supermap.io) * Copyright© 2000 - 2022 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v11.0.1 * */(()=>{var e={550:e=>{"use strict";function t(e,t){this.x=e,this.y=t}e.exports=t,t.prototype={clone:function(){return new t(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,s=e.y-this.y;return t*t+s*s},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,s=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=s,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),s=Math.sin(e),i=t*this.x-s*this.y,r=s*this.x+t*this.y;return this.x=i,this.y=r,this},_rotateAround:function(e,t){var s=Math.cos(e),i=Math.sin(e),r=t.x+s*(this.x-t.x)-i*(this.y-t.y),n=t.y+i*(this.x-t.x)+s*(this.y-t.y);return this.x=r,this.y=n,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},t.convert=function(e){return e instanceof t?e:Array.isArray(e)?new t(e[0],e[1]):e}},929:(e,t,s)=>{e.exports.VectorTile=s(779),s(24),s(701)},779:(e,t,s)=>{"use strict";var i=s(701);function r(e,t,s){if(3===e){var r=new i(s,s.readVarint()+s.pos);r.length&&(t[r.name]=r)}}e.exports=function(e,t){this.layers=e.readFields(r,{},t)}},24:(e,t,s)=>{"use strict";var i=s(550);function r(e,t,s,i,r){this.properties={},this.extent=s,this.type=0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=r,e.readFields(n,this,t)}function n(e,t,s){1==e?t.id=s.readVarint():2==e?function(e,t){var s=e.readVarint()+e.pos;for(;e.pos>3}if(n--,1===r||2===r)a+=e.readSVarint(),o+=e.readSVarint(),1===r&&(t&&l.push(t),t=[]),t.push(new i(a,o));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&l.push(t),l},r.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,s=1,i=0,r=0,n=0,a=1/0,o=-1/0,l=1/0,h=-1/0;e.pos>3}if(i--,1===s||2===s)r+=e.readSVarint(),n+=e.readSVarint(),ro&&(o=r),nh&&(h=n);else if(7!==s)throw new Error("unknown command "+s)}return[a,l,o,h]},r.prototype.toGeoJSON=function(e,t,s){var i,n,o=this.extent*Math.pow(2,s),l=this.extent*e,h=this.extent*t,u=this.loadGeometry(),c=r.types[this.type];function p(e){for(var t=0;t{"use strict";var i=s(24);function r(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(n,this,t),this.length=this._features.length}function n(e,t,s){15===e?t.version=s.readVarint():1===e?t.name=s.readString():5===e?t.extent=s.readVarint():2===e?t._features.push(s.pos):3===e?t._keys.push(s.readString()):4===e&&t._values.push(function(e){var t=null,s=e.readVarint()+e.pos;for(;e.pos>3;t=1===i?e.readString():2===i?e.readFloat():3===i?e.readDouble():4===i?e.readVarint64():5===i?e.readVarint():6===i?e.readSVarint():7===i?e.readBoolean():null}return t}(s))}e.exports=r,r.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new i(this._pbf,t,this.extent,this._keys,this._values)}},693:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){o.prototype.append=function(e,t){e=n(e),t=a(t);var s=this.map[e];s||(s=[],this.map[e]=s),s.push(t)},o.prototype.delete=function(e){delete this.map[n(e)]},o.prototype.get=function(e){var t=this.map[n(e)];return t?t[0]:null},o.prototype.getAll=function(e){return this.map[n(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(n(e))},o.prototype.set=function(e,t){this.map[n(e)]=[a(t)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(s){this.map[s].forEach(function(i){e.call(t,i,s,this)},this)},this)};var s={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this)},c.call(p.prototype),c.call(f.prototype),f.prototype.clone=function(){return new f(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},f.error=function(){var e=new f(null,{status:0,statusText:""});return e.type="error",e};var r=[301,302,303,307,308];f.redirect=function(e,t){if(-1===r.indexOf(t))throw new RangeError("Invalid status code");return new f(null,{status:t,headers:{location:e}})},t.Headers=o,t.Request=p,t.Response=f,t.fetch=function(e,t){return new Promise(function(i,r){var n;n=p.prototype.isPrototypeOf(e)&&!t?e:new p(e,t);var a=new XMLHttpRequest;var l=!1;function h(){if(4===a.readyState){var e=1223===a.status?204:a.status;if(e<100||e>599){if(l)return;return l=!0,void r(new TypeError("Network request failed"))}var t={status:e,statusText:a.statusText,headers:function(e){var t=new o;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var s=e.trim().split(":"),i=s.shift().trim(),r=s.join(":").trim();t.append(i,r)}),t}(a),url:"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0},s="response"in a?a.response:a.responseText;l||(l=!0,i(new f(s,t)))}}a.onreadystatechange=h,a.onload=h,a.onerror=function(){l||(l=!0,r(new TypeError("Network request failed")))},a.open(n.method,n.url,!0);try{"include"===n.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&&s.blob&&(a.responseType="blob"),n.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===n._bodyInit?null:n._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function n(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 o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,s){e.onload=function(){t(e.result)},e.onerror=function(){s(e.error)}})}function u(e){var t=new FileReader;return t.readAsArrayBuffer(e),h(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(s.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(s.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!s.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},s.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(u)},this.text=function(){var e,t,s,i,r,n,a,o=l(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,s=new FileReader,i=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",r=/charset\=[0-9a-zA-Z\-\_]*;?/,n=e.type.match(r)||i.match(r),a=[e],n&&a.push(n[0].replace(/^charset\=/,"").replace(/;$/,"")),s.readAsText.apply(s,a),h(s);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(e,t){var s,r,n=(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 o(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=(s=t.method||this.method||"GET",r=s.toUpperCase(),i.indexOf(r)>-1?r:s),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n,t)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var s=e.split("="),i=s.shift().replace(/\+/g," "),r=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function f(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},144:function(e,t){var s,i,r;i=[t,e],void 0===(r="function"==typeof(s=function(e,t){"use strict";var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function i(e){try{delete window[e]}catch(t){window[e]=void 0}}function r(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],n=e,a=t.timeout||s.timeout,o=t.jsonpCallback||s.jsonpCallback,l=void 0;return new Promise(function(s,h){var u=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=o+"_"+u;window[u]=function(e){s({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),r(c),i(u)},n+=-1===n.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",""+n+o+"="+u),t.charset&&p.setAttribute("charset",t.charset),p.id=c,document.getElementsByTagName("head")[0].appendChild(p),l=setTimeout(function(){h(new Error("JSONP request to "+e+" timed out")),i(u),r(c),window[u]=function(){i(u)}},a),p.onerror=function(){h(new Error("JSONP request to "+e+" failed")),i(u),r(c),l&&clearTimeout(l)}})}})?s.apply(t,i):s)||(e.exports=r)},645:(e,t)=>{t.read=function(e,t,s,i,r){var n,a,o=8*r-i-1,l=(1<>1,u=-7,c=s?r-1:0,p=s?-1:1,d=e[t+c];for(c+=p,n=d&(1<<-u)-1,d>>=-u,u+=o;u>0;n=256*n+e[t+c],c+=p,u-=8);for(a=n&(1<<-u)-1,n>>=-u,u+=i;u>0;a=256*a+e[t+c],c+=p,u-=8);if(0===n)n=1-h;else{if(n===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),n-=h}return(d?-1:1)*a*Math.pow(2,n-i)},t.write=function(e,t,s,i,r,n){var a,o,l,h=8*n-r-1,u=(1<>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:n-1,f=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+c>=1?p/l:p*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(t*l-1)*Math.pow(2,r),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,r),a=0));r>=8;e[s+d]=255&o,d+=f,o/=256,r-=8);for(a=a<0;e[s+d]=255&a,d+=f,a/=256,h-=8);e[s+d-f]|=128*m}},545:(e,t,s)=>{var i=s(820),r="&&",n="||",a="and",o="or",l="=",h="~",u="!"+l,c="!"+h,p=">",d=">=",f="<",m="<=",y="*",g=",",v=".",S="(",b=")",x="where",_={pathway:[],groups:{}},C={},w={},M=console.log;function A(e){var t=E(e,x),s=t[0],i=t[1];_.pathway=E(s,g);for(var a=0,o=_.pathway.length;aw&&-1!==w){var O="gr_"+(new Date).getTime();_.groups[O]=i.substring(w+1,M),i=i.replace(S+_.groups[O]+b,O),A=-1}A+=1}!function e(t,s){var i=T(s,r),a=T(s,n);if(i!==Number.MAX_VALUE||a!==Number.MAX_VALUE)if(i-1}function O(e,t){var s=E(t,v),r=e;for(var n in s){if(!r.hasOwnProperty(s[n]))return"";r=r[s[n]]}return r=i.isDate(r)?r.valueOf():i.isDateString(r)?i.parseDateFromString(r):r.toString()}function P(e,t){var s=!1;for(var i in e){if(s=s||(i===a?N:i===o?P:I)(e[i],t),w.trace&&M(_.step,"======((( or",e[i],s),s)return s}return s}function N(e,t){var s=!0;for(var i in e){if(s=s&&(i===a?N:i===o?P:I)(e[i],t),w.trace&&M(_.step,"======((( and",e[i],s),!s)return s}return s}function I(e,t){if(_.step+=1,e.or){var s=P(e.or,t);return w.trace&&M(_.step,"OR",e,s),s}if(e.and){s=N(e.and,t);return w.trace&&M(_.step,"AND",e,s),s}if("object"==typeof e)return e.eq?O(t,e.eq[0])===e.eq[1]:e.ne?O(t,e.ne[0])!==e.ne[1]:e.req?L(O(t,e.req[0]),e.req[1]):e.nreq?!L(O(t,e.nreq[0]),e.nreq[1]):e.gt?O(t,e.gt[0])>e.gt[1]:e.ge?O(t,e.ge[0])>=e.ge[1]:e.lt?O(t,e.lt[0])0?i.map(function(e){for(var t={},s=0,i=_.pathway.length;s{function t(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===t(e)}e.exports={getObjectType:t,isDate:function(e){return"[object Date]"===t(e)},isString:s,isDateString:function(e){return s(e)&&!isNaN(Date.parse(e))},parseDateFromString:function(e){return Date.parse(e)},isNumber:function(e){return"number"==typeof e}}},52:(e,t,s)=>{var i=9007199254740991,r="[object Arguments]",n="[object Function]",a="[object GeneratorFunction]",o="[object Map]",l="[object Set]",h=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,p="object"==typeof self&&self&&self.Object===Object&&self,d=c||p||Function("return this")();function f(e,t){return function(e,t){for(var s=-1,i=e?e.length:0,r=Array(i);++s-1&&e%1==0&&e-1&&e%1==0&&e<=i}(e.length)&&!J(e)}function J(e){var t=q(e)?x.call(e):"";return t==n||t==a}function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var H=function(e){return function(t){var s,i,r,n=G(t);return n==o?(s=t,i=-1,r=Array(s.size),s.forEach(function(e,t){r[++i]=[t,e]}),r):n==l?function(e){var t=-1,s=Array(e.size);return e.forEach(function(e){s[++t]=[e,e]}),s}(t):f(t,e(t))}}(function(e){return V(e)?D(e):k(e)});e.exports=H},614:(e,t,s)=>{"use strict";e.exports=r;var i=s(645);function r(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var n="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(e){return e.type===r.Bytes?e.readVarint()+e.pos:e.pos+1}function o(e,t,s){return s?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function l(e,t,s){var i=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));s.realloc(i);for(var r=s.pos-1;r>=e;r--)s.buf[r+i]=s.buf[r]}function h(e,t){for(var s=0;s>>8,e[s+2]=t>>>16,e[s+3]=t>>>24}function b(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(e,t,s){for(s=s||this.length;this.pos>3,n=this.pos;this.type=7&i,e(r,t,this),this.pos===n&&this.skip(i)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=v(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=b(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=v(this.buf,this.pos)+4294967296*v(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=v(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=i.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,s,i=this.buf;return t=127&(s=i[this.pos++]),s<128?t:(t|=(127&(s=i[this.pos++]))<<7,s<128?t:(t|=(127&(s=i[this.pos++]))<<14,s<128?t:(t|=(127&(s=i[this.pos++]))<<21,s<128?t:function(e,t,s){var i,r,n=s.buf;if(r=n[s.pos++],i=(112&r)>>4,r<128)return o(e,i,t);if(r=n[s.pos++],i|=(127&r)<<3,r<128)return o(e,i,t);if(r=n[s.pos++],i|=(127&r)<<10,r<128)return o(e,i,t);if(r=n[s.pos++],i|=(127&r)<<17,r<128)return o(e,i,t);if(r=n[s.pos++],i|=(127&r)<<24,r<128)return o(e,i,t);if(r=n[s.pos++],i|=(1&r)<<31,r<128)return o(e,i,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(s=i[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&n?function(e,t,s){return n.decode(e.subarray(t,s))}(this.buf,t,e):function(e,t,s){var i="",r=t;for(;r239?4:l>223?3:l>191?2:1;if(r+u>s)break;1===u?l<128&&(h=l):2===u?128==(192&(n=e[r+1]))&&(h=(31&l)<<6|63&n)<=127&&(h=null):3===u?(n=e[r+1],a=e[r+2],128==(192&n)&&128==(192&a)&&((h=(15&l)<<12|(63&n)<<6|63&a)<=2047||h>=55296&&h<=57343)&&(h=null)):4===u&&(n=e[r+1],a=e[r+2],o=e[r+3],128==(192&n)&&128==(192&a)&&128==(192&o)&&((h=(15&l)<<18|(63&n)<<12|(63&a)<<6|63&o)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,u=1):h>65535&&(h-=65536,i+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),i+=String.fromCharCode(h),r+=u}return i}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==r.Bytes)return e.push(this.readVarint(t));var s=a(this);for(e=e||[];this.pos127;);else if(t===r.Bytes)this.pos=this.readVarint()+this.pos;else if(t===r.Fixed32)this.pos+=4;else{if(t!==r.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var s,i;e>=0?(s=e%4294967296|0,i=e/4294967296|0):(i=~(-e/4294967296),4294967295^(s=~(-e%4294967296))?s=s+1|0:(s=0,i=i+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,s){s.buf[s.pos++]=127&e|128,e>>>=7,s.buf[s.pos++]=127&e|128,e>>>=7,s.buf[s.pos++]=127&e|128,e>>>=7,s.buf[s.pos++]=127&e|128,e>>>=7,s.buf[s.pos]=127&e}(s,0,t),function(e,t){var s=(7&e)<<4;if(t.buf[t.pos++]|=s|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(i,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,s){for(var i,r,n=0;n55295&&i<57344){if(!r){i>56319||n+1===t.length?(e[s++]=239,e[s++]=191,e[s++]=189):r=i;continue}if(i<56320){e[s++]=239,e[s++]=191,e[s++]=189,r=i;continue}i=r-55296<<10|i-56320|65536,r=null}else r&&(e[s++]=239,e[s++]=191,e[s++]=189,r=null);i<128?e[s++]=i:(i<2048?e[s++]=i>>6|192:(i<65536?e[s++]=i>>12|224:(e[s++]=i>>18|240,e[s++]=i>>12&63|128),e[s++]=i>>6&63|128),e[s++]=63&i|128)}return s}(this.buf,e,this.pos);var s=this.pos-t;s>=128&&l(t,s,this),this.pos=t-1,this.writeVarint(s),this.pos+=s},writeFloat:function(e){this.realloc(4),i.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),i.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var s=0;s=128&&l(s,i,this),this.pos=s-1,this.writeVarint(i),this.pos+=i},writeMessage:function(e,t,s){this.writeTag(e,r.Bytes),this.writeRawMessage(t,s)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,u,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,m,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,y,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,g,t)},writeBytesField:function(e,t){this.writeTag(e,r.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,r.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,r.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,r.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,r.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,r.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,r.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,r.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,r.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,r.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}},107:function(e,t,s){!function(){"use strict";function e(e){var t=this.constructor;return this.then(function(s){return t.resolve(e()).then(function(){return s})},function(s){return t.resolve(e()).then(function(){return t.reject(s)})})}function t(e){return new this(function(t,s){if(!e||void 0===e.length)return s(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);var r=i.length;function n(e,s){if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(t){n(e,t)},function(s){i[e]={status:"rejected",reason:s},0==--r&&t(i)})}i[e]={status:"fulfilled",value:s},0==--r&&t(i)}for(var a=0;a{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}),s.d=((e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}),s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),(()=>{"use strict"; /* Copyright© 2000 - 2022 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 e=window.SuperMap=window.SuperMap||{};e.Components=window.SuperMap.Components||{}; /* Copyright© 2000 - 2022 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 t={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},i={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},r={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"},n={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},a={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"},o={DISTANCE:"DISTANCE",AREA:"AREA"},l={METER:"METER",KILOMETER:"KILOMETER",MILE:"MILE",YARD:"YARD",DEGREE:"DEGREE",MILLIMETER:"MILLIMETER",CENTIMETER:"CENTIMETER",INCH:"INCH",DECIMETER:"DECIMETER",FOOT:"FOOT",SECOND:"SECOND",MINUTE:"MINUTE",RADIAN:"RADIAN"},h={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},u={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"},c={AREA:"AREA",BAR:"BAR",BAR3D:"BAR3D",LINE:"LINE",PIE:"PIE",PIE3D:"PIE3D",POINT:"POINT",RING:"RING",ROSE:"ROSE",ROSE3D:"ROSE3D",STACK_BAR:"STACK_BAR",STACK_BAR3D:"STACK_BAR3D",STEP:"STEP"},p={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},d={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},f={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},m={BLACK_WHITE:"BLACKWHITE",BLUE_BLACK:"BLUEBLACK",BLUE_RED:"BLUERED",BLUE_WHITE:"BLUEWHITE",CYAN_BLACK:"CYANBLACK",CYAN_BLUE:"CYANBLUE",CYAN_GREEN:"CYANGREEN",CYAN_WHITE:"CYANWHITE",GREEN_BLACK:"GREENBLACK",GREEN_BLUE:"GREENBLUE",GREEN_ORANGE_VIOLET:"GREENORANGEVIOLET",GREEN_RED:"GREENRED",GREEN_WHITE:"GREENWHITE",PINK_BLACK:"PINKBLACK",PINK_BLUE:"PINKBLUE",PINK_RED:"PINKRED",PINK_WHITE:"PINKWHITE",RAIN_BOW:"RAINBOW",RED_BLACK:"REDBLACK",RED_WHITE:"REDWHITE",SPECTRUM:"SPECTRUM",TERRAIN:"TERRAIN",YELLOW_BLACK:"YELLOWBLACK",YELLOW_BLUE:"YELLOWBLUE",YELLOW_GREEN:"YELLOWGREEN",YELLOW_RED:"YELLOWRED",YELLOW_WHITE:"YELLOWWHITE"},y={TOPLEFT:"TOPLEFT",TOPCENTER:"TOPCENTER",TOPRIGHT:"TOPRIGHT",BASELINELEFT:"BASELINELEFT",BASELINECENTER:"BASELINECENTER",BASELINERIGHT:"BASELINERIGHT",BOTTOMLEFT:"BOTTOMLEFT",BOTTOMCENTER:"BOTTOMCENTER",BOTTOMRIGHT:"BOTTOMRIGHT",MIDDLELEFT:"MIDDLELEFT",MIDDLECENTER:"MIDDLECENTER",MIDDLERIGHT:"MIDDLERIGHT"},g={NORMAL:"ALONG_LINE_NORMAL",LB_TO_RT:"LEFT_BOTTOM_TO_RIGHT_TOP",LT_TO_RB:"LEFT_TOP_TO_RIGHT_BOTTOM",RB_TO_LT:"RIGHT_BOTTOM_TO_LEFT_TOP",RT_TO_LB:"RIGHT_TOP_TO_LEFT_BOTTOM"},v={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},S={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},b={FLAT:"FLAT",ROUND:"ROUND"},x={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},_={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},C={BSPLINE:"BSPLINE",POLISH:"POLISH"},w={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},M={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},A={ADD:"add",UPDATE:"update",DELETE:"delete"},T={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},E={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},O={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"},P={EXP1:"EXP1",EXP2:"EXP2"},N={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},I={CLIP:"clip",INTERSECT:"intersect"},F={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},D={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},R={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},k={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},B={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},G={GEOHASH_GRID:"geohash_grid"},U={AVG:"avg",MAX:"max",MIN:"min",SUM:"sum"},j={NDVI:"NDVI",HILLSHADE:"HILLSHADE"}; /* Copyright© 2000 - 2022 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.*/ class z{constructor(e,t){this.w=e?parseFloat(e):0,this.h=e?parseFloat(t):0,this.CLASS_NAME="SuperMap.Size"}toString(){return"w="+this.w+",h="+this.h}clone(){return new z(this.w,this.h)}equals(e){var t=!1;return null!=e&&(t=this.w===e.w&&this.h===e.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(e.w)&&isNaN(e.h)),t}destroy(){this.w=null,this.h=null}} /* Copyright© 2000 - 2022 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.*/ class V{constructor(e,t,s){this.x=e?parseFloat(e):0,this.y=t?parseFloat(t):0,this.mode=s,this.CLASS_NAME="SuperMap.Pixel"}toString(){return"x="+this.x+",y="+this.y}clone(){return new V(this.x,this.y,this.mode)}equals(e){var t=!1;return null!=e&&(t=this.x==e.x&&this.y==e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}add(e,t){if(null==e||null==t)throw new TypeError("Pixel.add cannot receive null values");return new V(this.x+e,this.y+t)}offset(e){var t=this.clone();return e&&(t=this.add(e.x,e.y)),t}destroy(){this.x=null,this.y=null,this.mode=null}}V.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}; /* Copyright© 2000 - 2022 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 J=function(...e){class t{constructor(t){for(var s=0;s0&&(s=parseFloat(e.toPrecision(t))),s},format:function(e,t,s,i){t=void 0!==t?t:0,s=void 0!==s?s:H.thousandsSeparator,i=void 0!==i?i:H.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var r=e.toString().split(".");1===r.length&&null==t&&(t=0);var n,a=r[0];if(s)for(var o=/(-?[0-9]+)([0-9]{3})/;o.test(a);)a=a.replace(o,"$1"+s+"$2");if(0==t)n=a;else{var l=r.length>1?r[1]:"0";null!=t&&(l+=new Array(t-l.length+1).join("0")),n=a+i+l}return n}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return H.limitSigDigs(this,e)});var W={bind:function(e,t){var s=Array.prototype.slice.apply(arguments,[2]);return function(){var i=s.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,i)}},bindAsEventListener:function(e,t){return function(s){return e.call(t,s||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},Y={filter:function(e,t,s){var i=[];if(Array.prototype.filter)i=e.filter(t,s);else{var r=e.length;if("function"!=typeof t)throw new TypeError;for(var n=0;n-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),s=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?i="apple":r.indexOf("android")>-1&&(s=(e=r.match(/version\/([\d.]+)/))?e[1]:"",i="android"),{name:t,version:s,device:i}}(),K=function(){var e=!0,t=X;return document.createElement("canvas").getContext?("firefox"===t.name&&parseFloat(t.version)<5&&(e=!1),"safari"===t.name&&parseFloat(t.version)<4&&(e=!1),"opera"===t.name&&parseFloat(t.version)<10&&(e=!1),"msie"===t.name&&parseFloat(t.version)<9&&(e=!1)):e=!1,e}(),Z=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("webkit")&&-1!==e.indexOf("gecko")}(),$=96,ee={extend:function(e,t){if(e=e||{},t){for(var s in t){var i=t[s];void 0!==i&&(e[s]=i)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},copy:function(e,t){var s;if(e=e||{},t)for(var i in e)void 0!==(s=t[i])&&(e[i]=s)},reset:function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var s in e[t])e[t][s].destroy&&e[t][s].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},getElement:function(){for(var e=[],t=0,s=arguments.length;t=0;s--)e[s]===t&&e.splice(s,1);return e},indexOf:function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var s=0,i=e.length;s=0&&parseFloat(o)<1?(e.style.filter="alpha(opacity="+100*o+")",e.style.opacity=o):1===parseFloat(o)&&(e.style.filter="",e.style.opacity="")},applyDefaults:function(e,t){e=e||{};var s="function"==typeof window.Event&&t instanceof window.Event;for(var i in t)(void 0===e[i]||!s&&t.hasOwnProperty&&t.hasOwnProperty(i)&&!e.hasOwnProperty(i))&&(e[i]=t[i]);return!s&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},getParameterString:function(e){var t=[];for(var s in e){var i,r=e[s];if(null!=r&&"function"!=typeof r)i=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(s)+"="+i)}return t.join("&")},urlAppend:function(e,t){var s=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var i=(e+" ").split(/[?&]/);s+=" "===i.pop()?t:i.length?"&"+t:"?"+t}return s},urlPathAppend:function(e,t){let s=e;if(!t)return s;0===t.indexOf("/")&&(t=t.substring(1));const i=e.split("?");return i[0].indexOf("/",i[0].length-1)<0&&(i[0]+="/"),s=`${i[0]}${t}${i.length>1?`?${i[1]}`:""}`},DEFAULT_PRECISION:14,toFloat:function(e,t){return null==t&&(t=ee.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},rad:function(e){return e*Math.PI/180},getParameters:function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(q.contains(e,"?")){var s=e.indexOf("?")+1,i=q.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(s,i)}for(var r={},n=t.split(/[&;]/),a=0,o=n.length;a1?1/e:e},getResolutionFromScale:function(e,t){var s;e&&(null==t&&(t="degrees"),s=1/(ee.normalizeScale(e)*te[t]*$));return s},getScaleFromResolution:function(e,t){return null==t&&(t="degrees"),e*te[t]*$},getBrowser:function(){return X},isSupportCanvas:K,supportCanvas:function(){return ee.isSupportCanvas},isInTheSameDomain:function(e){if(!e)return!0;var t=e.indexOf("//"),s=document.location.toString(),i=s.indexOf("//");if(-1===t)return!0;var r,n=r=e.substring(0,t),a=s.substring(i+2);i=a.indexOf("/");var o=a.indexOf(":"),l=a.substring(0,i),h=document.location.protocol;if(-1!==o||(l+=":"+("http:"===h.toLowerCase()?80:443)),h.toLowerCase()!==n.toLowerCase())return!1;var u=(n=e.substring(t+2)).indexOf(":");t=n.indexOf("/");var c,p=n.substring(0,t);return-1!==u?c=n.substring(0,u):(c=n.substring(0,t),p+=":"+("http:"===r.toLowerCase()?80:443)),c===document.domain&&p===l},calculateDpi:function(e,t,s,i,r){if(e&&t&&s){var n,a=e.getWidth(),o=e.getHeight(),l=t.w,h=t.h;if(r=r||6378137,"degree"===(i=i||"degrees").toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()){let e=a/l,t=o/h;n=254/(e>t?e:t)/s/(2*Math.PI*r/360)/1e4}else{n=254/(a/l)/s/1e4}return n}},toJSON:function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var s="",i=0,r=t.length;i0?"{"+e.join(",")+"}":"{}"}return t.toString()}},getResolutionFromScaleDpi:function(e,t,s,i){return i=i||6378137,s=s||"",e>0&&t>0?(e=ee.normalizeScale(e),"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*i/360)/1e4:254/t/e/1e4):-1},getScaleFromResolutionDpi:function(e,t,s,i){return i=i||6378137,s=s||"",e>0&&t>0?"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*i/360)/1e4:254/t/e/1e4:-1},transformResult:function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},copyAttributes:function(e,t){if(e=e||{},t)for(var s in t){var i=t[s];void 0!==i&&"CLASS_NAME"!==s&&"function"!=typeof i&&(e[s]=i)}return e},copyAttributesWithClip:function(e,t,s){if(e=e||{},t)for(var i in t){var r=!1;if(s&&s.length)for(var n=0,a=s.length;n=0&&n<=1&&r<=1&&n>=0?new Q.Point(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y)):"No Intersection";else if(0==o&&0==l){var u=Math.max(e.y,t.y),c=Math.min(e.y,t.y),p=Math.max(e.x,t.x),d=Math.min(e.x,t.x);a=(s.y>=c&&s.y<=u||i.y>=c&&i.y<=u)&&s.x>=d&&s.x<=p||i.x>=d&&i.x<=p?"Coincident":"Parallel"}else a="Parallel";return a},getTextBounds:function(e,t,s){document.body.appendChild(s),s.style.width="auto",s.style.height="auto",e.fontSize&&(s.style.fontSize=e.fontSize),e.fontFamily&&(s.style.fontFamily=e.fontFamily),e.fontWeight&&(s.style.fontWeight=e.fontWeight),s.style.position="relative",s.style.visibility="hidden",s.style.display="inline-block",s.innerHTML=t;var i=s.clientWidth,r=s.clientHeight;return document.body.removeChild(s),{textWidth:i,textHeight:r}},convertPath:function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,(e,s)=>{var i;return i=t.hasOwnProperty(s)?function(e){if(void 0==e||null==e)return"";if(e instanceof Date)return e.toJSON();if(function(e){if("string"!=typeof e&&"object"!=typeof e)return!1;try{const t=e.toString();return"[object Object]"===t||"[object Array]"===t}catch(e){return!1}}(e))return JSON.stringify(e);return e.toString()}(t[s]):e,encodeURIComponent(i)}):e}},te={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};te.in=te.inches,te.degrees=te.dd,te.nmi=1852*te.m;const se=.0254000508001016;ee.extend(te,{Inch:te.inches,Meter:39.37,Foot:12,IFoot:11.999976,ClarkeFoot:11.999868327581488,SearsFoot:11.999955194477684,GoldCoastFoot:11.999964589846002,IInch:.9999979999999999,MicroInch:999998e-9,Mil:9.99998e-7,Centimeter:.3937,Kilometer:39370,Yard:36,SearsYard:35.99986558343306,IndianYard:35.99987015540864,IndianYd37:35.999740205100004,IndianYd62:35.999880755999996,IndianYd75:35.999868945,IndianFoot:11.9999567087,IndianFt37:11.9999134017,IndianFt62:11.999960252000001,IndianFt75:11.999956315,Mile:63360,IYard:35.999928,IMile:63359.87328,NautM:72913.24,"Lat-66":4367838.370169282,"Lat-83":4367954.152606599,Decimeter:3.9370000000000003,Millimeter:.03937,Dekameter:393.7,Decameter:393.7,Hectometer:3937,GermanMeter:39.370535294205006,CaGrid:39.359685060000004,ClarkeChain:791.991309620512,GunterChain:792.0000000000001,BenoitChain:791.9977268035781,SearsChain:791.9970428354235,ClarkeLink:7.91991309620512,GunterLink:7.920000000000001,BenoitLink:7.919977268035781,SearsLink:7.919970428354236,Rod:198.00000000000014,IntnlChain:791.998416,IntnlLink:7.91998416,Perch:198.00000000000014,Pole:198.00000000000014,Furlong:7919.999999999997,Rood:148.75036777426,CapeFoot:11.999868185255002,Brealey:14763.75,ModAmFt:12.000458400000001,Fathom:71.999856,"NautM-UK":72959.85408,"50kilometers":1968500,"150kilometers":5905500}),ee.extend(te,{mm:te.Meter/1e3,cm:te.Meter/100,dm:100*te.Meter,km:1e3*te.Meter,kmi:te.nmi,fath:te.Fathom,ch:te.IntnlChain,link:te.IntnlLink,"us-in":te.inches,"us-ft":te.Foot,"us-yd":te.Yard,"us-ch":te.GunterChain,"us-mi":te.Mile,"ind-yd":te.IndianYd37,"ind-ft":te.IndianFt37,"ind-ch":791.9942845122}),te.degree=te.dd,te.meter=te.m,te.foot=te.ft,te.inch=te.inches,te.mile=te.mi,te.kilometer=te.km,te.yard=te.yd; /* Copyright© 2000 - 2022 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.*/ class ie{constructor(e,t){ee.isArray(e)&&(t=e[1],e=e[0]),this.lon=e?ee.toFloat(e):0,this.lat=t?ee.toFloat(t):0,this.CLASS_NAME="SuperMap.LonLat"}toString(){return"lon="+this.lon+",lat="+this.lat}toShortString(){return this.lon+","+this.lat}clone(){return new ie(this.lon,this.lat)}add(e,t){if(null==e||null==t)throw new TypeError("LonLat.add cannot receive null values");return new ie(this.lon+ee.toFloat(e),this.lat+ee.toFloat(t))}equals(e){var t=!1;return null!=e&&(t=this.lon===e.lon&&this.lat===e.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(e.lon)&&isNaN(e.lat)),t}wrapDateLine(e){var t=this.clone();if(e){for(;t.lone.right;)t.lon-=e.getWidth()}return t}destroy(){this.lon=null,this.lat=null}static fromString(e){var t=e.split(",");return new ie(t[0],t[1])}static fromArray(e){var t=ee.isArray(e),s=t&&e[0],i=t&&e[1];return new ie(s,i)}} /* Copyright© 2000 - 2022 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.*/ class re{constructor(e,t,s,i){ee.isArray(e)&&(i=e[3],s=e[2],t=e[1],e=e[0]),this.left=null!=e?ee.toFloat(e):this.left,this.bottom=null!=t?ee.toFloat(t):this.bottom,this.right=null!=s?ee.toFloat(s):this.right,this.top=null!=i?ee.toFloat(i):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new re(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var s=Math.pow(10,e),i=Math.round(this.left*s)/s,r=Math.round(this.bottom*s)/s,n=Math.round(this.right*s)/s,a=Math.round(this.top*s)/s;return!0===t?r+","+i+","+a+","+n:i+","+r+","+n+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new z(this.getWidth(),this.getHeight())}getCenterPixel(){return new V((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new ie((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var s,i;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(s=t.lon,i=t.lat):(s=t.x,i=t.y);var r=(this.left-s)*e+s,n=(this.bottom-i)*e+i,a=(this.right-s)*e+s,o=(this.top-i)*e+i;return new re(r,n,a,o)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new re(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new re(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new re(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.leftthis.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var s=this.contains(e.lon,e.lat,t.inclusive),i=t.worldBounds;if(i&&!s){var r=i.getWidth(),n=(i.left+i.right)/2,a=Math.round((e.lon-n)/r);s=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return s}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,s){if(null==s&&(s=!0),null==e||null==t)return!1;return s?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&ethis.bottom&&t=s.bottom&&e.bottom<=s.top||s.bottom>=e.bottom&&s.bottom<=e.top,a=e.top>=s.bottom&&e.top<=s.top||s.top>e.bottom&&s.top=s.left&&e.left<=s.right||s.left>=e.left&&s.left<=e.right,l=e.right>=s.left&&e.right<=s.right||s.right>=e.left&&s.right<=e.right;i=(n||a)&&(o||l)}if(t.worldBounds&&!i){var h=t.worldBounds,u=h.getWidth(),c=!h.containsBounds(s),p=!h.containsBounds(e);c&&!p?(e=e.add(-u,0),i=s.intersectsBounds(e,{inclusive:t.inclusive})):p&&!c&&(s=s.add(-u,0),i=e.intersectsBounds(s,{inclusive:t.inclusive}))}return i}containsBounds(e,t,s){null==t&&(t=!1),null==s&&(s=!0);var i=this.contains(e.left,e.bottom,s),r=this.contains(e.right,e.bottom,s),n=this.contains(e.left,e.top,s),a=this.contains(e.right,e.top,s);return t?i||r||n||a:i&&r&&n&&a}determineQuadrant(e){var t="",s=this.getCenterLonLat();return t+=e.lat=e.right&&r.right>e.right;)r=r.add(-n,0);var a=r.left+s;ae.left&&r.right-i>e.right&&(r=r.add(-n,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var s=e.split(",");return re.fromArray(s,t)}static fromArray(e,t){return!0===t?new re(e[1],e[0],e[3],e[2]):new re(e[0],e[1],e[2],e[3])}static fromSize(e){return new re(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}} /* Copyright© 2000 - 2022 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.*/ class ne extends Q{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new ne,t=0,s=this.components.length;t-1)){if(null!=t&&t=0;--s)t=this.removeComponent(e[s])||t;return t}removeComponent(e){return ee.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,s=this.components.length;t2;return t&&super.removeComponent.apply(this,arguments),t}getSortedSegments(){for(var e,t,s=this.components.length-1,i=new Array(s),r=0;r=1?1:g)<=-1?-1:g,u=180*Math.acos(g)/Math.PI,a=(u=r.x==s.x?t.x>s.x&&i.x>s.x||t.xp*t.x+d&&i.y>p*i.x+d||t.ys.y?i.xs.x&&(o=!1):r.xp*i.x+d&&(o=!1):r.x>s.x?i.y>s.y&&(o=!1):i.y=0?180*Math.atan(v)/Math.PI:Math.abs(180*Math.atan(v)/Math.PI)+90,b=Math.abs(t.y);s.y==b&&b==r.y&&s.x=0?v>=0?h+=l:h=180-(h-90)+l:h=v>0?h-180+l:90-h+l:x>=0?v>=0?h-=l:h=180-(h-90)-l:h=v>=0?h-180-l:90-h-l,h=h*Math.PI/180;var C=t.x+n*Math.cos(h),w=t.y+n*Math.sin(h);c.push(new le(C,w))}c.push(r)}return c}static createLineEPS(e){var t=[],s=e.length;if(s<2)return e;for(var i=0;i1&&(s=parseFloat(s)*h),i.labelAlign&&"cm"!==i.labelAlign)switch(i.labelAlign){case"lt":l.x+=t/2,l.y+=s/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=s/2;break;case"ct":l.y+=s/2;break;case"cb":l.y-=s/2;break;case"rt":l.x-=t/2,l.y+=s/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=s/2}return this.bsInfo.h=s,this.bsInfo.w=t,r=l.x-parseFloat(t)/2,n=l.y+parseFloat(s)/2,o=l.x+parseFloat(t)/2,a=l.y-parseFloat(s)/2,new re(r,n,o,a)}getLabelPxBoundsByText(e,t){var s,i,r,n,a=this.getLabelPxSize(t),o=ee.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":o.x+=a.w/2,o.y+=a.h/2;break;case"lm":o.x+=a.w/2;break;case"lb":o.x+=a.w/2,o.y-=a.h/2;break;case"ct":o.y+=a.h/2;break;case"cb":o.y-=a.h/2;break;case"rt":o.x-=a.w/2,o.y+=a.h/2;break;case"rm":o.x-=a.w/2;break;case"rb":o.x-=a.w/2,o.y-=a.h/2}return this.bsInfo.h=a.h,this.bsInfo.w=a.w,s=o.x-a.w/2,i=o.y+a.h/2,n=t.fontStyle&&"italic"===t.fontStyle?o.x+a.w/2+parseInt(parseFloat(t.fontSize)/2):o.x+a.w/2,r=o.y-a.h/2,new re(s,i,n,r)}getLabelPxSize(e){var t,s,i,r,n=parseFloat(e.strokeWidth);t=e.label||this.text,s=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var a=t.split("\n"),o=a.length;r=o>1?s*o+o+n+.2*s:s+n+.2*s+1,i=0,this.labelWTmp&&i255?s++:i++;return t.cnC=s,t.enC=i,t.textC=e.length,t}} /* Copyright© 2000 - 2022 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.*/ class ce extends he{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var s=!1,i=this.components.pop();null==t&&e.equals(i)||(s=super.addComponent.apply(this,arguments));var r=this.components[0];return super.addComponent.apply(this,[r]),s}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),super.removeComponent.apply(this,arguments);var s=this.components[0];super.addComponent.apply(this,[s])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,s=0,i=this.components.length;s0){e+=Math.abs(this.components[0].getArea());for(var t=1,s=this.components.length;t1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var s=ve.element(e);s.parentNode&&(!s.tagName||s.tagName.toUpperCase()!=t.toUpperCase());)s=s.parentNode;return s},observe:function(e,t,s,i){var r=ee.getElement(e);if(i=i||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||r.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!r._eventCacheID){var n="eventCacheID_";r.id&&(n=r.id+"_"+n),r._eventCacheID=ee.createUniqueID(n)}var a=r._eventCacheID;this.observers[a]||(this.observers[a]=[]),this.observers[a].push({element:r,name:t,observer:s,useCapture:i}),r.addEventListener?"mousewheel"===t?r.addEventListener(t,s,{useCapture:i,passive:!1}):r.addEventListener(t,s,i):r.attachEvent&&r.attachEvent("on"+t,s)},stopObservingElement:function(e){var t=ee.getElement(e)._eventCacheID;this._removeElementObservers(ve.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var s=e[t],i=new Array(s.element,s.name,s.observer,s.useCapture);ve.stopObserving.apply(this,i)}},stopObserving:function(e,t,s,i){i=i||!1;var r=ee.getElement(e),n=r._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||r.detachEvent)&&(t="keydown");var a=!1,o=ve.observers[n];if(o)for(var l=0;!a&&l0&&s.push(","),s.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,s.push(this.writeNewline(),this.writeIndent(),"]"),s.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,s){var i=t[s];return i||(i=s.charCodeAt(),"\\u00"+Math.floor(i/16).toString(16)+(i%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var s;if(this.nativeJSON)try{s=JSON.parse(e,t)}catch(t){return{data:e}}return this.keepData&&(this.data=s),s}write(e,t){this.pretty=!!t;var s=null,i=typeof e;if(this.serialize[i])try{s=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[i].apply(this,[e])}catch(e){}return s}writeIndent(){var e=[];if(this.pretty)for(var t=0;t0){e+='"points":[';for(var s=0,i=this.components.length;s0))return null;for(var n=0,a=0,o=[];n0){if(1===s)return new le(t[0].x,t[0].y);var i=[];for(let e=0;e0){if(1===s){let s=[];for(let i=0;i0){if(1===o){for(e=0,s=[];e=0;t--)if(p[e]=-1,h[t].containsBounds(h[e])){u[e]=-1*u[t],u[e]<0&&(p[e]=t);break}for(let e=0;e0?r.push(l[e]):(r[p[e]].components=r[p[e]].components.concat(l[e].components),r.push(""))}else{r=new Array;for(let e=0;e0&&r.length>0&&(r[r.length-1].components=r[r.length-1].components.concat(a),a=[]),r.push(l[e])),e==i-1){var d=r.length;if(d)r[d-1].components=r[d-1].components.concat(a);else for(let e=0,t=a.length;e=0;t--)if(f[e]=-1,c[t].containsBounds(c[e])){p[e]=-1*p[t],p[e]<0&&(f[e]=t);break}for(let e=0;e0?n.push(u[e]):(n[f[e]].components=n[f[e]].components.concat(u[e].components),n.push(""))}else{n=new Array;for(let e=0;e0&&n.length>0&&(n[n.length-1].components=n[n.length-1].components.concat(l),l=[]),n.push(u[e])),e==i-1){var m=n.length;if(m)n[m-1].components=n[m-1].components.concat(l);else for(let e=0,t=l.length;ee[n]){var a=e[n];e[n]=e[r],e[r]=a;var o=t[n];if(t[n]=t[r],t[r]=o,s&&s.length>0){var l=s[n];s[n]=s[r],s[r]=l}if(i&&i.length>0){var h=i[n];i[n]=i[r],i[r]=h}}}} /* Copyright© 2000 - 2022 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.*/ class Oe extends we{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new le(e[0],e[1])},multipoint:function(e){for(var t=[],s=null,i=0,r=e.length;ithis._toiSevrerFeature(e)):this._toiSevrerFeature(i)}toGeoJSON(e){var t={type:null};if(ee.isArray(e)){t.type="FeatureCollection";var s=e.length;t.features=new Array(s);for(var i=0;i-1||(t[i]=e[i]);return t}} /* Copyright© 2000 - 2022 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.*/ class Pe{constructor(e){var t=this;e=e||{},this.speed=e.speed&&e.speed>=0?e.speed:1,this.frequency=e.speed&&e.frequency>=0?e.frequency:1e3,this.startTime=e.startTime&&null!=e.startTime?e.startTime:0,this.endTime=e.endTime&&null!=e.endTime&&e.endTime>=t.startTime?e.endTime:+new Date,this.repeat=void 0===e.repeat||e.repeat,this.reverse=void 0!==e.reverse&&e.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],t.events=new Se(this,null,this.EVENT_TYPES),t.speed=Number(t.speed),t.frequency=Number(t.frequency),t.startTime=Number(t.startTime),t.endTime=Number(t.endTime),t.startTime=Date.parse(new Date(t.startTime)),t.endTime=Date.parse(new Date(t.endTime)),t.currentTime=t.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}updateOptions(e){var t=this;(e=e||{}).speed&&e.speed>=0&&(t.speed=e.speed,t.speed=Number(t.speed)),e.speed&&e.frequency>=0&&(t.frequency=e.frequency,t.frequency=Number(t.frequency)),e.startTime&&null!=e.startTime&&(t.startTime=e.startTime,t.startTime=Date.parse(new Date(t.startTime))),e.endTime&&null!=e.endTime&&e.endTime>=t.startTime&&(t.endTime=e.endTime,t.endTime=Date.parse(new Date(t.endTime))),null!=e.repeat&&(t.repeat=e.repeat),null!=e.reverse&&(t.reverse=e.reverse)}start(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}pause(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}stop(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}toggle(){this.running?this.pause():this.start()}setSpeed(e){return e>=0&&(this.speed=e,!0)}getSpeed(){return this.speed}setFrequency(e){return e>=0&&(this.frequency=e,!0)}getFrequency(){return this.frequency}setStartTime(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}getEndTime(){return this.endTime}setCurrentTime(e){var t=this;return t.currentTime=Date.parse(new Date(t.currentTime)),e>=t.startTime&&e<=t.endTime&&(t.currentTime=e,t.startTime=t.currentTime,t.tick(),!0)}getCurrentTime(){return this.currentTime}setRepeat(e){this.repeat=e}getRepeat(){return this.repeat}setReverse(e){this.reverse=e}getReverse(){return this.reverse}getRunning(){return this.running}destroy(){var e=this;e.speed=null,e.frequency=null,e.startTime=null,e.endTime=null,e.currentTime=null,e.repeat=null,e.running=!1,e.reverse=null}tick(){}} /* Copyright© 2000 - 2022 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.*/ s(107),s(693);var Ne=s(144),Ie=s.n(Ne); /* Copyright© 2000 - 2022 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.*/ let Fe=window.fetch;var De,Re,ke={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=ee.toJSON(e[t]));var s=encodeURIComponent(e[t]);this.queryValues.push(s)}},issue:function(e){for(var t=this,s=t.getUid(),i=e.url,r=[],n=new Promise(function(e){t.supermap_callbacks[s]=function(i){delete t.supermap_callbacks[s],e(i)}}),a=i,o=0,l=t.queryKeys?t.queryKeys.length:0,h=0;h=t.limitLength){if(0==o)return!1;r.push(a),a=i,o=0,h--}else if(a.length+t.queryKeys[h].length+2+t.queryValues[h].length>t.limitLength)for(var u=t.queryValues[h];u.length>0;){var c=t.limitLength-a.length-t.queryKeys[h].length-2;a.indexOf("?")>-1?a+="&":a+="?";var p=u.substring(0,c);"%"===p.substring(c-1,c)?(c-=1,p=u.substring(0,c)):"%"===p.substring(c-2,c-1)&&(c-=2,p=u.substring(0,c)),a+=t.queryKeys[h]+"="+p,u=u.substring(c),p.length>0&&(r.push(a),a=i,o=0)}else o++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[h]+"="+t.queryValues[h];return r.push(a),t.send(r,"RequestJSONPPromise.supermap_callbacks["+s+"]",e&&e.proxy),n},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,s){var i=e.length;if(i>0)for(var r=(new Date).getTime(),n=0;n-1?a+="&":a+="?",a+="sectionCount="+i,a+="§ionIndex="+n,a+="&jsonpUserID="+r,s&&(a=decodeURIComponent(a),a=s+encodeURIComponent(a)),Ie()(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)}},Be=function(){return void 0!=De?De:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},Ge=function(){return Re||45e3},Ue={commit:function(e,t,s,i){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,s,i);case"POST":return this.post(t,s,i);case"PUT":return this.put(t,s,i);case"DELETE":return this.delete(t,s,i);default:return this.get(t,s,i)}},supportDirectRequest:function(e,t){return!!ee.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Be()||t.proxy)},get:function(e,t,s){s=s||{};if(e=ee.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){var i={url:e=e.replace(".json",".jsonp"),data:t};return ke.GET(i)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")),ee.getParameters(e),s):this._fetch(e,t,s,"GET")},delete:function(e,t,s){s=s||{};if(e=ee.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=DELETE",data:t};return ke.DELETE(i)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")),ee.getParameters(e),s):this._fetch(e,t,s,"DELETE")},post:function(e,t,s){if(s=s||{},!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=POST",data:t};return ke.POST(i)}return this._fetch(this._processUrl(e,s),t,s,"POST")},put:function(e,t,s){if(s=s||{},e=this._processUrl(e,s),!this.supportDirectRequest(e,s)){e=e.replace(".json",".jsonp");var i={url:e+="&_method=PUT",data:t};return ke.PUT(i)}return this._fetch(e,t,s,"PUT")},urlIsLong:function(e){for(var t=0,s=null,i=0,r=e.length;i-1?"&":"?")+"_method="+e,"string"!=typeof s&&(s=JSON.stringify(s)),this.post(t,s,i)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var s=e.split("?");2===s.length&&(e=s[0]+".json?"+s[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,s,i){return(s=s||{}).headers=s.headers||{},s.headers["Content-Type"]||FormData.prototype.isPrototypeOf(t)||(s.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),s.timeout?this._timeout(s.timeout,Fe(e,{method:i,headers:s.headers,body:"PUT"===i||"POST"===i?t:void 0,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ge()}).then(function(e){return e})):Fe(e,{method:i,body:"PUT"===i||"POST"===i?t:void 0,headers:s.headers,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ge()}).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||{},Ie()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(s,i){setTimeout(function(){i(new Error("timeout"))},e),t.then(s,i)})},_getParameterString:function(e){var t=[];for(var s in e){var i,r=e[s];if(null!=r&&"function"!=typeof r)i=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(s)+"="+i)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}}; /* Copyright© 2000 - 2022 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.*/ class je{static generateToken(e,t){var s=this.servers[e];if(s)return Ue.post(s.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},ee.isArray(e)||(e=[e]);for(var t=0;t0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){let e=this,t=e.options.url,s=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(s,s.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=ee.isInTheSameDomain(t),e._commit(e.options)}calculatePollingTimes(){let e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.timese.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=ee.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=ee.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=ee.urlAppend(e.url,ee.getParameterString(e.params||{}))),"object"==typeof e.data)try{e.params=ee.toJSON(e.data)}catch(e){console.log("不是json对象")}else e.params=e.data;Ue.commit(e.method,e.url,e.params,{headers:e.headers,withoutFormatSuffix:e.withoutFormatSuffix,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(e){let t=e;return"string"==typeof e&&(t=(new we).read(e)),(!t||t.error||t.code>=300&&304!==t.code)&&(t=t&&t.error?{error:t.error}:{error:t}),t}).catch(function(e){return{error:e}}).then(t=>{t.error?(e.scope?W.bind(e.failure,e.scope):e.failure)(t):(t.succeed=void 0==t.succeed||t.succeed,(e.scope?W.bind(e.success,e.scope):e.success)(t))})}} /* Copyright© 2000 - 2022 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.*/ class st{constructor(e){e.filters&&"string"==typeof e.filters&&(e.filters=e.filters.split(",")),this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,ee.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}} /* Copyright© 2000 - 2022 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.*/ class it{constructor(e){e.filters&&(e.filters=e.filters.split(",")),this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null,ee.extend(this,e)}destroy(){this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null}} /* Copyright© 2000 - 2022 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.*/ class rt extends tt{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof st&&this.processAsync(e,t)}decode(e,t){t instanceof it&&this.processAsync(e,t)}processAsync(e,t){this.request({method:"GET",url:e,params:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){e.succeed&&delete e.succeed,super.serviceProcessCompleted(e)}serviceProcessFailed(e){super.serviceProcessFailed(e)}} /* Copyright© 2000 - 2022 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.*/ class nt{constructor(e){this.aggName=null,this.aggFieldName=null,this.CLASS_NAME="SuperMap.AggregationParameter",ee.extend(this,e)}destroy(){this.aggName=null,this.aggFieldName=null,this.aggType=null}} /* Copyright© 2000 - 2022 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.*/ class at extends nt{constructor(e){super(),this.subAggs=null,this.aggType=null,this.CLASS_NAME="SuperMap.BucketAggParameter",ee.extend(this,e)}destroy(){this.subAggs&&(this.subAggs=null)}} /* Copyright© 2000 - 2022 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.*/ class ot{constructor(e){this.dataset=null,this.targetDatasourceName=null,this.totalGridName=null,this.diffuseDatasetGridName=null,this.durationDatasetGridName=null,this.directDatasetGridName=null,this.latitude=null,this.timeMode="MULTIDAYS",this.dayStart=null,this.dayEnd=null,this.hourStart=null,this.hourEnd=null,this.transmittance=null,this.hourInterval=null,this.dayInterval=null,this.deleteExistResultDataset=!1,ee.extend(this,e),this.CLASS_NAME="SuperMap.AreaSolarRadiationParameters"}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){var s={};for(var i in e){if("dataset"!==i)"latitude"===i||"timeMode"===i||"dayStart"===i||("dayEnd"===i||"hourStart"===i||"hourEnd"===i)||("transmittance"===i||"hourInterval"===i||"dayInterval"===i)?s[i]=e[i]:t[i]=e[i]}t.parameter=s}} /* Copyright© 2000 - 2022 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.*/ class lt extends tt{constructor(e,s){super(e,s),this.format=t.GEOJSON,this.CLASS_NAME="SuperMap.SpatialAnalystBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var s,i=this;if((e=ee.transformResult(e))&&i.format===t.GEOJSON&&"function"==typeof i.toGeoJSONResult)if(ee.isArray(e)){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}} /* Copyright© 2000 - 2022 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.*/ class xt{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=D.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;ee.extend(this,e),this.CLASS_NAME="SuperMap.BuffersAnalystJobsParameter"}destroy(){this.datasetName=null,this.bounds=null,this.distance=null,this.distanceField=null,this.distanceUnit=null,this.dissolveField=null,this.output instanceof St&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"bounds"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}} /* Copyright© 2000 - 2022 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.*/ class _t extends tt{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.ProcessingServiceBase"}destroy(){super.destroy()}getJobs(e){var t=this;Ue.get(je.appendCredential(e),null,{proxy:t.proxy}).then(function(e){return e.json()}).then(function(e){t.events.triggerEvent("processCompleted",{result:e})}).catch(function(e){t.eventListeners.processFailed({error:e})})}addJob(e,t,s,i){var r=this,n=null;t&&t instanceof s&&(n=new Object,s.toObject(t,n));let a=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},r.headers||{});var o={proxy:r.proxy,headers:a,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,isInTheSameDomain:r.isInTheSameDomain};Ue.post(je.appendCredential(e),JSON.stringify(n),o).then(function(e){return e.json()}).then(function(e){e.succeed?r.serviceProcessCompleted(e,i):r.serviceProcessFailed(e)}).catch(function(e){r.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=ee.transformResult(e),t=t||1e3;var s=this;if(e)var i=setInterval(function(){Ue.get(je.appendCredential(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){s.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(i),s.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(i),s.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(i),s.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}} /* Copyright© 2000 - 2022 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.*/ class Ct extends _t{constructor(e,t){super(e,t),this.url=ee.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(ee.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,xt,t)}} /* Copyright© 2000 - 2022 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.*/ class wt{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,ee.extend(this,e),this.CLASS_NAME="SuperMap.BurstPipelineAnalystParameters"}destroy(){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=null}} /* Copyright© 2000 - 2022 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.*/ class Mt extends tt{constructor(e,s){super(e,s),this.format=t.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var s;(e=ee.transformResult(e))&&this.format===t.GEOJSON&&"function"==typeof this.toGeoJSONResult&&(s=this.toGeoJSONResult(e)),s||(s=e),this.events.triggerEvent("processCompleted",{result:s})}toGeoJSONResult(e){return null}} /* Copyright© 2000 - 2022 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.*/ class At extends Mt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof wt))return null;var t,s=this;if(s.url=ee.urlPathAppend(s.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class Tt extends tt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ChartFeatureInfoSpecsService"}destroy(){super.destroy(),ee.reset(this)}processAsync(){var e=this;e.isTempLayers||ee.urlPathAppend(e.url,"chartFeatureInfoSpecs"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class Et{constructor(e){this.isQueryPoint=null,this.isQueryLine=null,this.isQueryRegion=null,this.attributeFilter=null,this.chartFeatureInfoSpecCode=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryFilterParameter"}destroy(){var e=this;e.isQueryPoint=null,e.isQueryLine=null,e.isQueryRegion=null,e.attributeFilter=null,e.chartFeatureInfoSpecCode=null}toJson(){var e="";return e+='"isQueryPoint":'+this.isQueryPoint+",",e+='"isQueryLine":'+this.isQueryLine+",",e+='"isQueryRegion":'+this.isQueryRegion+",",this.attributeFilter&&(e+='"attributeFilter": "'+this.attributeFilter+'",'),e="{"+(e+='"chartFeatureInfoSpecCode":'+this.chartFeatureInfoSpecCode)+"}"}} /* Copyright© 2000 - 2022 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.*/ class Lt{constructor(e){this.queryMode=null,this.bounds=null,this.chartLayerNames=null,this.chartQueryFilterParameters=null,this.returnContent=!0,this.startRecord=0,this.expectCount=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryParameters"}destroy(){var e=this;e.queryMode=null,e.bounds=null,e.chartLayerNames=null,e.chartQueryFilterParameters=null,e.returnContent=!0,e.startRecord=0,e.expectCount=null}getVariablesJson(){var e="";if(e+='"queryMode":"'+this.queryMode+'",',this.chartLayerNames&&this.chartLayerNames.length){for(var t=[],s=this.chartLayerNames.length,i=0;i0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}} /* Copyright© 2000 - 2022 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.*/ class kt extends tt{constructor(e,t){(t=t||{}).EVENT_TYPES=["broadcastSocketConnected","broadcastSocketClosed","broadcastSocketError","broadcastFailed","broadcastSucceeded","subscribeSocketConnected","subscribeSocketClosed","subscribeSocketError","messageSucceeded","setFilterParamSucceeded"],super(e,t),this.geometry=null,this.prjCoordSys=null,this.excludeField=null,ee.extend(this,t),this.CLASS_NAME="SuperMap.DataFlowService"}initBroadcast(){var e=this;return this.broadcastWebSocket=this._connect(ee.urlPathAppend(e.url,"broadcast")),this.broadcastWebSocket.onopen=function(t){e.broadcastWebSocket.isOpen=!0,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onclose=function(t){e.broadcastWebSocket&&(e.broadcastWebSocket.isOpen=!1),t.eventType="broadcastSocketClosed",e.events.triggerEvent("broadcastSocketClosed",t)},this.broadcastWebSocket.onerror=function(t){t.eventType="broadcastSocketError",e.events.triggerEvent("broadcastSocketError",t)},this}broadcast(e){this.broadcastWebSocket&&this.broadcastWebSocket.isOpen?(this.broadcastWebSocket.send(JSON.stringify(e)),this.events.triggerEvent("broadcastSucceeded")):this.events.triggerEvent("broadcastFailed")}initSubscribe(){var e=this;return this.subscribeWebSocket=this._connect(ee.urlPathAppend(e.url,"subscribe")),this.subscribeWebSocket.onopen=function(t){e.subscribeWebSocket.send(e._getFilterParams()),t.eventType="subscribeSocketConnected",e.events.triggerEvent("subscribeSocketConnected",t)},this.subscribeWebSocket.onclose=function(t){t.eventType="subscribeWebSocketClosed",e.events.triggerEvent("subscribeWebSocketClosed",t)},this.subscribeWebSocket.onerror=function(t){t.eventType="subscribeSocketError",e.events.triggerEvent("subscribeSocketError",t)},this.subscribeWebSocket.onmessage=function(t){e._onMessage(t)},this}setExcludeField(e){return this.excludeField=e,this.subscribeWebSocket.send(this._getFilterParams()),this}setGeometry(e){return this.geometry=e,this.subscribeWebSocket.send(this._getFilterParams()),this}unSubscribe(){this.subscribeWebSocket&&(this.subscribeWebSocket.close(),this.subscribeWebSocket=null)}unBroadcast(){this.broadcastWebSocket&&(this.broadcastWebSocket.close(),this.broadcastWebSocket=null)}destroy(){tt.prototype.destroy.apply(this,arguments);this.geometry=null,this.prjCoordSys=null,this.excludeField=null,this.unBroadcast(),this.unSubscribe()}_getFilterParams(){var e={filterParam:{prjCoordSys:this.prjCoordSys,excludeField:this.excludeField,geometry:this.geometry}};return ee.toJSON(e)}_onMessage(e){if(e.data&&e.data.indexOf("filterParam")>=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var s=JSON.parse(e.data);e.featureResult=s,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}_connect(e){return e=je.appendCredential(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}} /* Copyright© 2000 - 2022 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.*/ class Bt{constructor(e){e=e||{},this.bounds=null,this.dataSourceName=null,this.description=null,this.encodeType=null,this.isReadOnly=null,this.name=null,this.prjCoordSys=null,this.tableName=null,this.type=null,ee.extend(this,e);var t=this.bounds;t&&(this.bounds=new re(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y)),this.CLASS_NAME="SuperMap.DatasetInfo"}destroy(){ee.reset(this)}toServerJSONObject(){var e={};return(e=ee.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}} /* Copyright© 2000 - 2022 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.*/ class Gt{constructor(e){this.operation=x.UNION,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.OverlayAnalystParameters"}destroy(){this.operation=null}} /* Copyright© 2000 - 2022 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.*/ class Ut extends Gt{constructor(e){super(e),this.operateDataset=null,this.operateDatasetFields=[],this.operateDatasetFilter=new ft,this.operateRegions=[],this.sourceDataset=null,this.sourceDatasetFields=[],this.sourceDatasetFilter=new ft,this.tolerance=0,this.resultSetting=new dt,ee.extend(this,e),this.CLASS_NAME="SuperMap.DatasetOverlayAnalystParameters"}destroy(){super.destroy();var e=this;if(e.operateDataset=null,e.operateDatasetFields=null,e.operateDatasetFilter&&(e.operateDatasetFilter.destroy(),e.operateDatasetFilter=null),e.operateRegions){for(var t=0,s=e.operateRegions,i=s.length;t0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new Oe;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}} /* Copyright© 2000 - 2022 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.*/ class ms{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,s=e.supplyCenters,i=s.length;t0&&(t+=","),t+=ee.toJSON(e[i]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new Oe;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}} /* Copyright© 2000 - 2022 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.*/ class gs{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new Ft,ee.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}} /* Copyright© 2000 - 2022 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.*/ class vs extends Mt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof gs){var t,s=this,i=s.getJson(e.isAnalyzeById,e.centers),r=s.getJson(e.isAnalyzeById,e.nodes);s.url=ee.urlPathAppend(s.url,"mtsppath"),t={centers:i,nodes:r,parameter:ee.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",i=t?t.length:0;if(!1===e)for(let e=0;e0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new Oe;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}} /* Copyright© 2000 - 2022 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.*/ class Ss{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new Ft,ee.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}} /* Copyright© 2000 - 2022 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.*/ class bs extends Mt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ss){var t,s=this;s.url=ee.urlPathAppend(s.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:ee.toJSON(e.parameter),nodes:s.getJson(e.isAnalyzeById,e.nodes)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",i=t?t.length:0;if(!1===e)for(let e=0;e0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new Oe;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}} /* Copyright© 2000 - 2022 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.*/ class xs{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new Ft,ee.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}} /* Copyright© 2000 - 2022 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.*/ class _s extends Mt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){super.destroy()}processAsync(e){if(e instanceof xs){var t,s=this;s.url=ee.urlPathAppend(s.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:ee.toJSON(e.parameter),centers:s.getJson(e.isAnalyzeById,e.centers),weights:s.getJson(!0,e.weights)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",i=t?t.length:0;if(!1===e)for(let e=0;e0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new Oe;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}} /* Copyright© 2000 - 2022 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.*/ class Cs{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new Ft,ee.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}} /* Copyright© 2000 - 2022 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.*/ class ws extends Mt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Cs){var t,s=this;s.url=ee.urlPathAppend(s.url,"tsppath"),t={parameter:ee.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:s.getNodesJson(e)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getNodesJson(e){var t,s,i,r,n="";if(!1===e.isAnalyzeById){for(t="[",s=0,i=(r=e.nodes).length;s0&&(t+=","),t+='{"x":'+r[s].x+',"y":'+r[s].y+"}";n+=t+="]"}else if(!0===e.isAnalyzeById){let t="[",s=e.nodes,i=s.length;for(let e=0;e0&&(t+=","),t+=s[e];n+=t+="]"}return n}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new Oe;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}} /* Copyright© 2000 - 2022 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.*/ class Ms{constructor(e){this.routeTable=null,this.routeIDField=null,this.attributeFilter=null,this.eventTable=null,this.eventRouteIDField=null,this.measureField=null,this.measureStartField=null,this.measureEndField=null,this.measureOffsetField=null,this.errorInfoField=null,this.retainedFields=null,this.dataReturnOption=null,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.GenerateSpatialDataParameters"}destroy(){var e=this;e.routeTable&&(e.routeTable=null),e.routeIDField=null,e.attributeFilter=null,e.eventTable=null,e.eventRouteIDField=null,e.measureField=null,e.measureStartField=null,e.measureEndField=null,e.measureOffsetField=null,e.errorInfoField=null,e.dataReturnOption&&(e.dataReturnOption.destroy(),e.dataReturnOption=null)}} /* Copyright© 2000 - 2022 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.*/ class As extends lt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GenerateSpatialDataService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ms){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata";return this.url=ee.urlPathAppend(this.url,t),this.url=ee.urlAppend(this.url,"returnContent=true"),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class Ts extends Gt{constructor(e){super(e),e&&e.operateGeometry&&(this.operateGeometry=e.operateGeometry),e&&e.sourceGeometry&&(this.sourceGeometry=e.sourceGeometry),e&&e.operateGeometries&&(this.operateGeometries=e.operateGeometries),e&&e.sourceGeometries&&(this.sourceGeometries=e.sourceGeometries),e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.GeometryOverlayAnalystParameters"}destroy(){super.destroy();var e=this;e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.sourceGeometries&&(e.sourceGeometries.destroy(),e.sourceGeometries=null),e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.operateGeometries&&(e.operateGeometries.destroy(),e.operateGeometries=null)}static toObject(e,t){for(var s in e)if("sourceGeometry"===s)t.sourceGeometry=Le.fromGeometry(e.sourceGeometry);else if("sourceGeometries"===s){for(var i=[],r=0;r=0;e--)this.points[e].destroy();this.points=null}}static toObject(e,t){for(var s in e)"clipRegion"===s?t.clipRegion=Le.fromGeometry(e.clipRegion):t[s]=e[s]}}class Os extends tt{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.GeoprocessingService",this.headers={},this.crossOrigin=!0}getTools(){this._get(`${this.url}/list`)}getTool(e){this._get(`${this.url}/${e}`)}execute(e,t,s){const i={parameter:t=t||null,environment:s=s||null};this._get(`${this.url}/${e}/execute`,i)}submitJob(e,t,s){const i={parameter:t=t||null,environments:s=s||null};this.request({url:`${this.url}/${e}/jobs`,headers:{"Content-type":"application/json"},method:"POST",data:JSON.stringify(i),scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}waitForJobCompletion(e,t,s){const i=this,r=setInterval(function(){i._get(`${i.url}/${t}/jobs/${e}`,null,function(e){const t=e.state.runState;switch(s.statusCallback&&s.statusCallback(t),t){case"FINISHED":clearInterval(r),i.events.triggerEvent("processCompleted",{result:e});break;case"FAILED":case"CANCELED":clearInterval(r),i.events.triggerEvent("processFailed",{result:e})}})},s.interval)}getJobInfo(e,t){this._get(`${this.url}/${e}/jobs/${t}`)}cancelJob(e,t){this._get(`${this.url}/${e}/jobs/${t}/cancel`)}getJobs(e){let t=`${this.url}/jobs`;e&&(t=`${this.url}/${e}/jobs`),this._get(t)}getResults(e,t,s){let i=`${this.url}/${e}/jobs/${t}/results`;s&&(i=`${i}/${s}`),this._get(i)}_get(e,t,s,i){this.request({url:e,method:"GET",params:t,headers:{"Content-type":"application/json"},scope:this,success:s||this.serviceProcessCompleted,failure:i||this.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class Ps{constructor(e){this.dataset=null,this.sourceFilter=null,this.referenceFilter=null,this.spatialRelationType=null,this.isBorderInside=null,this.returnFeature=null,this.returnGeoRelatedOnly=null,this.startRecord=0,this.expectCount=500,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.GeoRelationAnalystParameters"}destroy(){var e=this;e.sourceFilter&&e.sourceFilter.destroy(),e.sourceFilter=null,e.referenceFilter&&e.referenceFilter.destroy(),e.referenceFilter=null,e.dataset=null,e.spatialRelationType=null,e.isBorderInside=null,e.returnFeature=null,e.returnGeoRelatedOnly=null,e.startRecord=null,e.expectCount=null}} /* Copyright© 2000 - 2022 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.*/ class Ns extends lt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GeoRelationAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ps){var t=this;t.url=ee.urlPathAppend(t.url,"datasets/"+e.dataset+"/georelation");var s=ee.toJSON(e);t.url=ee.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}} /* Copyright© 2000 - 2022 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.*/ class Is extends tt{constructor(e,t){super(e,t),t&&(this.datasource=null,this.dataset=null,t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.DatasetService")}destroy(){super.destroy();this.datasource=null,this.dataset=null}getDatasetsService(e){var t=this;t.url=ee.urlPathAppend(t.url,`datasources/name/${e}/datasets`),t.request({method:"GET",data:null,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}getDatasetService(e,t){var s=this;s.url=ee.urlPathAppend(s.url,`datasources/name/${e}/datasets/name/${t}`),s.request({method:"GET",data:null,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}setDatasetService(e){if(e){var t=ee.toJSON(e);this.request({method:"PUT",data:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}}deleteDatasetService(){this.request({method:"DELETE",data:null,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class Fs{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.hasGeometry=!0,this.aggregations=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.hasGeometry=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}} /* Copyright© 2000 - 2022 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.*/ class Ds extends Fs{constructor(e){super(e),this.getFeatureMode=Ds.getFeatureMode.BOUNDS,this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=a.CONTAIN,ee.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,s,i;return s={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},i={datasetNames:e.datasetNames,getFeatureMode:Ds.getFeatureMode.BOUNDS,bounds:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new ft).name=e.datasetNames,t.fields=e.fields,i.queryParameter=t),e.attributeFilter&&(i.attributeFilter=e.attributeFilter,i.getFeatureMode=Ds.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),e.maxFeatures&&!isNaN(e.maxFeatures)&&(i.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(i.hasGeometry=e.hasGeometry),e.targetEpsgCode&&(i.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(i.targetPrj=e.targetPrj),e.aggregations&&(i.aggregations=e.aggregations),ee.toJSON(i)}}Ds.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"}; /* Copyright© 2000 - 2022 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.*/ class Rs extends tt{constructor(e,s){super(e,s),s=s||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.hasGeometry=!0,this.maxFeatures=null,this.format=t.GEOJSON,ee.extend(this,s),this.url=ee.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null,e.hasGeometry=null}processAsync(e){if(e){var t,s=this,i=!0;s.returnContent=e.returnContent,s.fromIndex=e.fromIndex,s.toIndex=e.toIndex,s.maxFeatures=e.maxFeatures,s.hasGeometry=e.hasGeometry,s.returnContent&&(s.url=ee.urlAppend(s.url,"returnContent="+s.returnContent),i=!1),null!=s.fromIndex&&null!=s.toIndex&&!isNaN(s.fromIndex)&&!isNaN(s.toIndex)&&s.fromIndex>=0&&s.toIndex>=0&&!i&&(s.url=ee.urlAppend(s.url,`fromIndex=${s.fromIndex}&toIndex=${s.toIndex}`)),e.returnCountOnly&&(s.url=ee.urlAppend(s.url,"&returnCountOnly="+e.returnContent)),t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){if(e=ee.transformResult(e),this.format===t.GEOJSON&&e.features){var s=new Oe;e.features=s.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}} /* Copyright© 2000 - 2022 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.*/ class ks extends Rs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return Ds.toJsonParameters(e)}} /* Copyright© 2000 - 2022 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.*/ class Bs extends Fs{constructor(e){super(e),this.bufferDistance=null,this.attributeFilter=null,this.geometry=null,this.fields=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBufferParameters"}destroy(){super.destroy();var e=this;if(e.bufferDistance=null,e.attributeFilter=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}static toJsonParameters(e){var t,s,i;return i=Le.fromGeometry(e.geometry),s={datasetNames:e.datasetNames,getFeatureMode:"BUFFER",bufferDistance:e.bufferDistance,geometry:i},e.fields&&((t=new ft).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode="BUFFER_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(s.hasGeometry=e.hasGeometry),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),ee.toJSON(s)}} /* Copyright© 2000 - 2022 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.*/ class Gs extends Rs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBufferService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Bs)return Bs.toJsonParameters(e)}} /* Copyright© 2000 - 2022 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.*/ class Us extends Fs{constructor(e){super(e),this.getFeatureMode="SPATIAL",this.geometry=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=a.CONTAIN,ee.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryParameters"}destroy(){super.destroy();var e=this;if(e.geometry&&(e.geometry.destroy(),e.geometry=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,s,i;return s=Le.fromGeometry(e.geometry),i={datasetNames:e.datasetNames,getFeatureMode:"SPATIAL",geometry:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new ft).name=e.datasetNames,t.fields=e.fields,i.queryParameter=t),e.attributeFilter&&(i.attributeFilter=e.attributeFilter,i.getFeatureMode="SPATIAL_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(i.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(i.hasGeometry=e.hasGeometry),e.targetEpsgCode&&(i.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(i.targetPrj=e.targetPrj),e.aggregations&&(i.aggregations=e.aggregations),ee.toJSON(i)}} /* Copyright© 2000 - 2022 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.*/ class js extends Rs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){return Us.toJsonParameters(e)}} /* Copyright© 2000 - 2022 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.*/ class zs extends Fs{constructor(e){super(e),this.getFeatureMode="ID",this.IDs=null,this.fields=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByIDsParameters"}destroy(){super.destroy();var e=this;if(e.IDs=null,e.getFeatureMode=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}}static toJsonParameters(e){var t,s;return t={datasetNames:e.datasetNames,getFeatureMode:"ID",ids:e.IDs},e.fields&&((s=new ft).name=e.datasetNames,s.fields=e.fields,t.queryParameter=s),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),"boolean"==typeof e.hasGeometry&&(t.hasGeometry=e.hasGeometry),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),e.aggregations&&(t.aggregations=e.aggregations),ee.toJSON(t)}} /* Copyright© 2000 - 2022 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.*/ class Vs extends Rs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByIDsService"}destroy(){super.destroy()}getJsonParameters(e){return zs.toJsonParameters(e)}} /* Copyright© 2000 - 2022 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.*/ class Js extends Fs{constructor(e){super(e),this.getFeatureMode="SQL",this.queryParameter=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesBySQLParameters"}destroy(){super.destroy();this.getFeatureMode=null,this.queryParameter&&(this.queryParameter.destroy(),this.queryParameter=null)}static toJsonParameters(e){var t={datasetNames:e.datasetNames,getFeatureMode:"SQL",queryParameter:e.queryParameter};return e.maxFeatures&&!isNaN(e.maxFeatures)&&(t.maxFeatures=e.maxFeatures),"boolean"==typeof e.hasGeometry&&(t.hasGeometry=e.hasGeometry),e.aggregations&&(t.aggregations=e.aggregations),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),e.aggregations&&(t.aggregations=e.aggregations),ee.toJSON(t)}} /* Copyright© 2000 - 2022 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.*/ class qs extends Rs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesBySQLService"}destroy(){super.destroy()}getJsonParameters(e){return Js.toJsonParameters(e)}} /* Copyright© 2000 - 2022 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.*/ class Hs extends tt{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.GetFieldsService"}destroy(){super.destroy();this.datasource=null,this.dataset=null}processAsync(){var e=this;e.url=ee.urlPathAppend(e.url,`datasources/${e.datasource}/datasets/${e.dataset}/fields`),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class Ws{constructor(e){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.GetGridCellInfosParameters"}destroy(){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null}} /* Copyright© 2000 - 2022 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.*/ class Ys extends tt{constructor(e,t){super(e,t),this.datasetName=null,this.dataSourceName=null,this.datasetType=null,this.X=null,this.Y=null,t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.GetGridCellInfosService"}destroy(){super.destroy();var e=this;e.X=null,e.Y=null,e.datasetName=null,e.dataSourceName=null,e.datasetType=null}processAsync(e){if(e instanceof Ws){ee.extend(this,e);var t=this;t.url=ee.urlPathAppend(t.url,`datasources/${t.dataSourceName}/datasets/${t.datasetName}`),t.queryRequest(t.getDatasetInfoCompleted,t.getDatasetInfoFailed)}}queryRequest(e,t){this.request({method:"GET",data:null,scope:this,success:e,failure:t})}getDatasetInfoCompleted(e){e=ee.transformResult(e),this.datasetType=e.datasetInfo.type,this.queryGridInfos()}queryGridInfos(){var e=this;e.url=ee.urlPathAppend(e.url,"GRID"==e.datasetType?"gridValue":"imageValue"),null!=e.X&&null!=e.Y&&(e.url=ee.urlAppend(e.url,`x=${e.X}&y=${e.Y}`)),e.queryRequest(e.serviceProcessCompleted,e.serviceProcessFailed)}getDatasetInfoFailed(e){this.serviceProcessFailed(e)}} /* Copyright© 2000 - 2022 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.*/ class Qs{constructor(e,t){if(!e)return this;this.memoryData=null,this.type=e,t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.Theme"}destroy(){this.memoryData&&(this.memoryData.destroy(),this.memoryData=null),this.type=null}toServerJSONObject(){}} /* Copyright© 2000 - 2022 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.*/ class Xs{constructor(e){this.align=y.BASELINECENTER,this.backColor=new Me(255,255,255),this.foreColor=new Me(0,0,0),this.backOpaque=!1,this.sizeFixed=!0,this.fontHeight=6,this.fontWidth=0,this.fontWeight=400,this.fontName="Times New Roman",this.bold=!1,this.italic=!1,this.italicAngle=0,this.shadow=!1,this.strikeout=!1,this.outline=!1,this.opaqueRate=0,this.underline=!1,this.rotation=0,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.ServerTextStyle"}destroy(){var e=this;e.align=null,e.backColor&&(e.backColor.destroy(),e.backColor=null),e.foreColor&&(e.foreColor.destroy(),e.foreColor=null),e.backOpaque=null,e.sizeFixed=null,e.fontHeight=null,e.fontWidth=null,e.fontWeight=null,e.fontName=null,e.bold=null,e.italic=null,e.italicAngle=null,e.shadow=null,e.strikeout=null,e.outline=null,e.opaqueRate=null,e.underline=null,e.rotation=null}static fromObj(e){var t=new Xs(e);return ee.copy(t,e),t.backColor=Me.fromJson(e.backColor),t.foreColor=Me.fromJson(e.foreColor),t}} /* Copyright© 2000 - 2022 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.*/ class Ks{constructor(e){this.caption=null,this.end=0,this.start=0,this.visible=!0,this.style=new Xs,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new Ks;return ee.copy(t,e),t}}} /* Copyright© 2000 - 2022 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.*/ class Zs{constructor(e){this.caption=null,this.style=new Ae,this.unique=null,this.visible=!0,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=ee.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){var t=new Zs;return ee.copy(t,e),t.style=Ae.fromJson(e.style),t}} /* Copyright© 2000 - 2022 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.*/ class $s{constructor(e){this.offsetFixed=!1,this.offsetX="0.0",this.offsetY="0.0",e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.ThemeOffset"}destroy(){this.offsetFixed=null,this.offsetX=null,this.offsetY=null}static fromObj(e){if(e){var t=new $s;return ee.copy(t,e),t}}} /* Copyright© 2000 - 2022 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.*/ class ei{constructor(e){this.defaultStyle=null,this.separator=null,this.separatorEnabled=!1,this.splitIndexes=null,this.styles=new Xs,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.LabelMixedTextStyle"}destroy(){var e=this;if(e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null),e.separator=null,e.separatorEnabled=null,e.splitIndexes&&(e.splitIndexes=null),e.styles){for(var t=0,s=e.styles,i=s.length;t0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null)}toServerJSONObject(){var e={};if((e=ee.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,i=0;i0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.rangeExpression=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new mi;ee.copy(t,e);var s=e.items,i=s?s.length:0;t.items=[];for(var r=0;r0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(s,t),this.events.triggerEvent("processCompleted",{result:e[0]})}handleLayers(e,t){var s;if(e)for(var i=0;i0)this.handleLayers(t[i].subLayers.layers.length,t[i].subLayers.layers);else switch(t[i].ugcLayerType){case"THEME":(s=new bi).fromJson(t[i]),t[i]=s;break;case"GRID":(s=new xi).fromJson(t[i]),t[i]=s;break;case"IMAGE":(s=new _i).fromJson(t[i]),t[i]=s;break;case"VECTOR":(s=new Ci).fromJson(t[i]),t[i]=s}}}} /* Copyright© 2000 - 2022 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.*/ class Mi{constructor(e){e&&(this.bounds=null,this.searchRadius=0,this.zValueFieldName=null,this.zValueScale=1,this.resolution=null,this.filterQueryParameter=null,this.outputDatasetName=null,this.outputDatasourceName=null,this.pixelFormat=null,this.dataset=null,this.inputPoints=null,this.InterpolationAnalystType="dataset",this.clipParam=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationAnalystParameters")}destroy(){var e=this;e.bounds=null,e.searchRadius=null,e.zValueFieldName=null,e.zValueScale=null,e.resolution=null,e.filterQueryParameter=null,e.outputDatasetName=null,e.pixelFormat=null}static toObject(e,t){for(var s in e)if("inputPoints"===s&&"geometry"===e.InterpolationAnalystType){for(var i=[],r=0;r=200&&e.code<300||0==e.code||304===e.code,s=e.code&&t;!e.code||s?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}} /* Copyright© 2000 - 2022 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.*/ class Di{constructor(e){e&&(this.dataset=null,this.extractRegion=null,this.expression=null,this.isZip=!1,this.ignoreNoValue=!1,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,ee.extend(this,e),this.CLASS_NAME="SuperMap.MathExpressionAnalysisParameters")}destroy(){var e=this;e.dataset=null,e.bounds=null,e.expression=null,e.isZip=!0,e.ignoreNoValue=!0,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var s in e)if("dataset"!==s&&(t[s]=e[s]),"extractRegion"===s&&e[s]){for(var i=e[s].components[0].components,r={},n=[],a=i.length,o=0;o(e.fieldNames=r[i].fieldCaptions,e)),this.format===t.GEOJSON&&(r[i].features=s.toGeoJSON(r[i].features)));this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new Ot({customParams:e.customParams,expectCount:e.expectCount,networkType:e.networkType,queryOption:e.queryOption,queryParams:e.queryParams,startRecord:e.startRecord,prjCoordSys:e.prjCoordSys,holdTime:e.holdTime})}} /* Copyright© 2000 - 2022 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.*/ class Ji extends Vi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){if(!(e instanceof zi))return null;var t,s="",i=e.bounds;return t=this.getQueryParameters(e),s+="'queryMode':'BoundsQuery','queryParameters':",s+=ee.toJSON(t),s="{"+(s+=",'bounds': {'rightTop':{'y':"+i.top+",'x':"+i.right+"},'leftBottom':{'y':"+i.bottom+",'x':"+i.left+"}}")+"}"}} /* Copyright© 2000 - 2022 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.*/ class qi extends Ot{constructor(e){super(e=e||{}),this.geometry=null,this.isNearest=null,this.returnContent=!0,ee.extend(this,e),this.CLASS_NAME="SuperMap.QueryByDistanceParameters"}destroy(){super.destroy();var e=this;e.returnContent=null,e.distance=null,e.isNearest=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}} /* Copyright© 2000 - 2022 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.*/ class Hi extends Vi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByDistanceService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof qi){var t="",s=this.getQueryParameters(e),i=Le.fromGeometry(e.geometry);return t+=e.isNearest?"'queryMode':'FindNearest','queryParameters':":"'queryMode':'DistanceQuery','queryParameters':",t+=ee.toJSON(s),t="{"+(t+=",'geometry':"+ee.toJSON(i)+",'distance':"+e.distance)+"}"}}} /* Copyright© 2000 - 2022 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.*/ class Wi extends Ot{constructor(e){super(e=e||{}),this.returnContent=!0,this.geometry=null,this.spatialQueryMode=a.INTERSECT,ee.extend(this,e),this.CLASS_NAME="SuperMap.QueryByGeometryParameters"}destroy(){super.destroy();this.returnContent=null,this.geometry=null,this.spatialQueryMode=null}} /* Copyright© 2000 - 2022 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.*/ class Yi extends Vi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Wi){var t,s="",i=e.geometry,r=Le.fromGeometry(i);return t=this.getQueryParameters(e),s+="'queryMode':'SpatialQuery','queryParameters':",s="{"+(s+=ee.toJSON(t)+",'geometry':"+ee.toJSON(r)+",'spatialQueryMode':"+ee.toJSON(e.spatialQueryMode))+"}"}}} /* Copyright© 2000 - 2022 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.*/ class Qi extends Ot{constructor(e){super(e=e||{}),this.returnContent=!0,ee.extend(this,e),this.CLASS_NAME="SuperMap.QueryBySQLParameters"}destroy(){super.destroy();this.returnContent=null}} /* Copyright© 2000 - 2022 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.*/ class Xi extends Vi{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryBySQLService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Qi){var t,s="";return t=this.getQueryParameters(e),s+="'queryMode':'SqlQuery','queryParameters':",s="{"+(s+=ee.toJSON(t))+"}"}}} /* Copyright© 2000 - 2022 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.*/ class Ki{constructor(e){if(!e)return this;this.sourceRoute=null,this.point=null,this.tolerance=null,this.isIgnoreGap=!1,ee.extend(this,e),this.CLASS_NAME="SuperMap.RouteCalculateMeasureParameters"}destroy(){var e=this;e.sourceRoute=null,e.point=null,e.tolerance&&(e.tolerance=null),e.isIgnoreGap&&(e.isIgnoreGap=!1)}} /* Copyright© 2000 - 2022 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.*/ class Zi extends lt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteCalculateMeasureService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ki){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){return this.url=ee.urlPathAppend(this.url,"geometry/calculatemeasure"),this.url=ee.urlAppend(this.url,"returnContent=true"),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class $i{constructor(e){if(!e)return this;this.sourceRoute=null,this.dataset=null,this.routeIDField=null,this.routeID=null,this.type=null,this.measure=null,this.offset=0,this.isIgnoreGap=!1,this.startMeasure=null,this.endMeasure=null;var t=e.sourceRoute,s={};if(t&&t instanceof Q&&t.components){s.type=t.type,s.parts=t.parts;for(var i=[],r=0,n=t.components.length;r0&&(s+='"subLayers":'+e.toJSON()),s+=',"visible":true,',s+='"name":"'+this.getMapName(this.mapUrl)+'"',s+="}]",t.request({method:"PUT",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}createTempLayerComplete(e){(e=ee.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}getMapName(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var s=t.lastIndexOf("/");return t.substring(s+1,t.length)}serviceProcessCompleted(e){null!=(e=ee.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}} /* Copyright© 2000 - 2022 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.*/ class hr{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=a.CONTAIN,this.output=null,this.mappingParameters=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof St&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}} /* Copyright© 2000 - 2022 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.*/ class ur extends _t{constructor(e,t){super(e,t),this.url=ee.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(ee.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,hr,t)}} /* Copyright© 2000 - 2022 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.*/ class cr{constructor(e){e=e||{},this.keyWord=null,this.returnPosition=!1,ee.extend(this,e),this.CLASS_NAME="SuperMap.StopQueryParameters"}destroy(){ee.reset(this)}} /* Copyright© 2000 - 2022 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.*/ class pr extends tt{constructor(e,t){super(e,t),t=t||{},ee.extend(this,t),this.CLASS_NAME="SuperMap.StopQueryService"}destroy(){super.destroy(),ee.reset(this)}processAsync(e){if(e instanceof cr){var t=this;t.url=ee.urlPathAppend(t.url,"stops/keyword/"+e.keyWord),t.request({method:"GET",params:{returnPosition:e.returnPosition},scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}} /* Copyright© 2000 - 2022 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.*/ class dr{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof St&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}} /* Copyright© 2000 - 2022 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.*/ class fr extends _t{constructor(e,t){super(e,t),this.url=ee.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(ee.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,dr,t)}} /* Copyright© 2000 - 2022 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.*/ class mr{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=R.AVERAGE,this.fields="",this.type=k.SUMMARYMESH,this.output=null,this.mappingParameters=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.SummaryMeshJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.statisticModes=null,this.meshType=null,this.fields=null,this.regionDataset=null,this.type=null,this.output instanceof St&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s?"output"!==s?("SUMMARYMESH"===e.type&&"regionDataset"!==s||"SUMMARYREGION"===e.type&&!i(["meshType","resolution","query"],s))&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s]);function i(e,t){for(var s=e.length;s--;)if(e[s]===t)return!0;return!1}}} /* Copyright© 2000 - 2022 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.*/ class yr extends _t{constructor(e,t){super(e,t),this.url=ee.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(ee.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,mr,t)}} /* Copyright© 2000 - 2022 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.*/ class gr{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.sumShape=!0,this.query="",this.standardSummaryFields=!1,this.standardFields="",this.standardStatisticModes="",this.weightedSummaryFields=!1,this.weightedFields="",this.weightedStatisticModes="",this.meshType=0,this.resolution=100,this.meshSizeUnit=D.METER,this.type=k.SUMMARYMESH,this.output=null,this.mappingParameters=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.SummaryRegionJobParameter")}destroy(){this.datasetName=null,this.sumShape=null,this.regionDataset=null,this.query=null,this.standardSummaryFields=null,this.standardFields=null,this.standardStatisticModes=null,this.weightedSummaryFields=null,this.weightedFields=null,this.weightedStatisticModes=null,this.meshType=null,this.resolution=null,this.meshSizeUnit=null,this.type=null,this.output instanceof St&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s&&"type"!==s?"output"!==s?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==s)&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s])}} /* Copyright© 2000 - 2022 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.*/ class vr extends _t{constructor(e,t){super(e,t),this.url=ee.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(ee.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,gr,t)}} /* Copyright© 2000 - 2022 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.*/ class Sr{constructor(e){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.SupplyCenter"}destroy(){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null}static fromJson(e){if(e)return new Sr({maxWeight:e.maxWeight,nodeID:e.nodeID,resourceValue:e.resourceValue,type:e.type})}} /* Copyright© 2000 - 2022 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.*/ class br extends lt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.SurfaceAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof zt){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="",s={},i=this;if(e instanceof Vt)i.url=ee.urlPathAppend(i.url,"datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()),Vt.toObject(e,s),t=ee.toJSON(s);else{if(!(e instanceof Es))return;i.url=ee.urlPathAppend(i.url,"geometry/"+e.surfaceAnalystMethod.toLowerCase()),t=ee.toJSON(e)}return i.url=ee.urlAppend(i.url,"returnContent=true"),t}} /* Copyright© 2000 - 2022 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.*/ class xr{constructor(e){e&&(this.dataset=null,this.zFactor=1,this.averageCurvatureName=null,this.profileCurvatureName="",this.planCurvatureName="",this.deleteExistResultDataset=!1,ee.extend(this,e),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationParameters")}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){for(var s in e)"dataset"!==s&&(t[s]=e[s])}} /* Copyright© 2000 - 2022 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.*/ class _r extends lt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationService"}destroy(){super.destroy()}processAsync(e){var t=this,s={};e instanceof xr&&(t.url=ee.urlPathAppend(t.url,"datasets/"+e.dataset+"/terraincalculation/curvature")),xr.toObject(e,s);var i=ee.toJSON(s);t.url=ee.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:i,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class Cr{constructor(e){this.flowEnabled=!1,this.leaderLineDisplayed=!1,this.leaderLineStyle=new Ae,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.ThemeFlow"}destroy(){var e=this;e.flowEnabled=null,e.leaderLineDisplayed=null,e.leaderLineStyle&&(e.leaderLineStyle.destroy(),e.leaderLineStyle=null)}static fromObj(e){if(e){var t=new Cr;return ee.copy(t,e),t.leaderLineStyle=Ae.fromJson(e.leaderLineStyle),t}}} /* Copyright© 2000 - 2022 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.*/ class wr{constructor(e){this.caption=null,this.color=new Me,this.end=0,this.start=0,this.visible=!0,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=ee.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){if(e){var t=new wr;return ee.copy(t,e),t.color=Me.fromJson(e.color),t}}} /* Copyright© 2000 - 2022 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.*/ class Mr extends Qs{constructor(e){super("GRIDRANGE",e),this.items=null,this.rangeMode=f.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=m.YELLOW_RED,this.reverseColor=!1,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.reverseColor=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new Mr;ee.copy(t,e);var s=e.items,i=s?s.length:0;t.items=[];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)}toServerJSONObject(){var e={};if((e=ee.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,i=0;i0&&(1===r.length?s+="'displayFilter':\""+r[0]+'",':s+="'displayFilter':\""+r[a]+'",'),(n=e.displayOrderBy)&&n.length>0&&(1===n.length?s+="'displayOrderBy':'"+n[0]+"',":s+="'displayOrderBy':'"+n[a]+"',"),(t=e.fieldValuesDisplayFilter)&&(s+="'fieldValuesDisplayFilter':"+ee.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[a]&&(s+="'joinItems':["+ee.toJSON(e.joinItems[a])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[a]?a:e.datasetNames.length-1,h=e.dataSourceNames[a]?a:e.dataSourceNames.length-1;s+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[h]+"'}},"}else s+="},"}e.themes&&e.themes.length>0&&(s=s.substring(0,s.length-1)),s+="]},";var u=this.url.split("/");return s+="'name': '"+u[u.length-2]+"'}]"}} /* Copyright© 2000 - 2022 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.*/ class Pr extends lt{constructor(e,t){super(e,t),this.mode=null,t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.ThiessenAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof qt?(s.mode="datasets",s.url=ee.urlPathAppend(s.url,"datasets/"+e.dataset+"/thiessenpolygon"),qt.toObject(e,t)):e instanceof Ls&&(s.mode="geometry",s.url=ee.urlPathAppend(s.url,"geometry/thiessenpolygon"),Ls.toObject(e,t));var i=ee.toJSON(t);s.url=ee.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:i,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class Nr extends lt{constructor(e,t){super(e,t),t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.GeometryBatchAnalystService"}processAsync(e){var t=this;t.url=ee.urlPathAppend(t.url,"geometry/batchanalyst"),t.url=ee.urlAppend(t.url,"returnContent=true&ignoreAnalystParam=true");var s=t._processParams(e),i=ee.toJSON(s);t.request({method:"POST",data:i,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}_processParams(e){var t=this;if(ee.isArray(e)){var s=[];return e.map(function(e){return s.push(t._toJSON(e)),e}),s}}_toJSON(e){var t={};if("buffer"===e.analystName)t.analystName="buffer",t.param={},yt.toObject(e.param,t.param);else if("overlay"===e.analystName)t.analystName="overlay",t.param={},Ts.toObject(e.param,t.param);else if("interpolationDensity"===e.analystName)t.analystName="interpolationDensity",t.param={},Mi.toObject(e.param,t.param);else if("interpolationidw"===e.analystName)t.analystName="interpolationidw",t.param={},Mi.toObject(e.param,t.param);else if("interpolationRBF"===e.analystName)t.analystName="interpolationRBF",t.param={},Mi.toObject(e.param,t.param);else if("interpolationKriging"===e.analystName)t.analystName="interpolationKriging",t.param={},Mi.toObject(e.param,t.param);else{if("thiessenpolygon"!==e.analystName)return e;t.analystName="thiessenpolygon",t.param={},Ls.toObject(e.param,t.param)}return t}destroy(){super.destroy()}} /* Copyright© 2000 - 2022 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.*/ class Ir extends tt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TilesetsService"}destroy(){super.destroy()}processAsync(){if(this.url){var e=this;e.url=ee.urlPathAppend(e.url,"tilesets"),e.request({method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}} /* Copyright© 2000 - 2022 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.*/ class Fr{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=B.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof St&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}} /* Copyright© 2000 - 2022 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.*/ class Dr extends _t{constructor(e,t){super(e,t),this.url=ee.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(ee.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,Fr,t)}} /* Copyright© 2000 - 2022 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.*/ class Rr{constructor(e){e=e||{},this.lineID=null,this.lineName=null,this.lineAliasName=null,this.startStopIndex=null,this.startStopName=null,this.startStopAliasName=null,this.endStopIndex=null,this.endStopName=null,this.endStopAliasName=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.TransferLine"}destroy(){ee.reset(this)}static fromJson(e){if(e)return new Rr({lineID:e.lineID,lineName:e.lineName,lineAliasName:e.lineAliasName,startStopIndex:e.startStopIndex,startStopName:e.startStopName,startStopAliasName:e.startStopAliasName,endStopIndex:e.endStopIndex,endStopName:e.endStopName,endStopAliasName:e.endStopAliasName})}} /* Copyright© 2000 - 2022 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.*/ class kr{constructor(e){e=e||{},this.transferLines=null,this.points=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.TransferPathParameters"}destroy(){ee.reset(this)}static toJson(e){if(e)return ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class Br extends tt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof kr){var t,s=this;s.url=ee.urlPathAppend(s.url,"path"),t={points:ee.toJSON(e.points),transferLines:ee.toJSON(e.transferLines)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}} /* Copyright© 2000 - 2022 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.*/ class Gr{constructor(e){e=e||{},this.solutionCount=6,this.transferPreference=E.NONE,this.transferTactic=T.LESS_TIME,this.walkingRatio=null,this.points=!1,this.evadeLines=null,this.evadeStops=null,this.priorLines=null,this.priorStops=null,this.travelTime=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.TransferSolutionParameters"}destroy(){ee.reset(this)}static toJson(e){if(e)return ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class Ur extends tt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferSolutionService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Gr){var t,s=this;s.url=ee.urlPathAppend(s.url,"solutions"),t={points:ee.toJSON(e.points),walkingRatio:e.walkingRatio,transferTactic:e.transferTactic,solutionCount:e.solutionCount,transferPreference:e.transferPreference},e.evadeLines&&(t.evadeLines=ee.toJSON(e.evadeLines)),e.evadeStops&&(t.evadeStops=ee.toJSON(e.evadeStops)),e.priorLines&&(t.priorLines=ee.toJSON(e.priorLines)),e.priorStops&&(t.priorStops=ee.toJSON(e.priorStops)),e.travelTime&&(t.travelTime=e.travelTime),s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}} /* Copyright© 2000 - 2022 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.*/ class jr{constructor(e){e&&(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",ee.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}} /* Copyright© 2000 - 2022 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.*/ class zr{constructor(e){e&&(this.datasourceName=null,this.datasetName=null,this.datasetType=null,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.CreateDatasetParameters")}destroy(){this.datasourceName=null,this.datasetName=null,this.datasetType=null}} /* Copyright© 2000 - 2022 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.*/ class Vr extends Mt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof jr){var t=this,s=t.parse(e);t.url=ee.urlPathAppend(t.url,s);var i=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:i,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"edgeWeight"!==e[s])switch(s){case"edgeId":t+="/edgeweight/"+e[s];break;case"fromNodeId":t+="/fromnode/"+e[s];break;case"toNodeId":t+="/tonode/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}} /* Copyright© 2000 - 2022 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.*/ class Jr{constructor(e){e&&(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",ee.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}} /* Copyright© 2000 - 2022 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.*/ class qr extends Mt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Jr){var t=this,s=t.parse(e);t.url=ee.urlPathAppend(t.url,s);var i=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:i,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"turnNodeWeight"!==e[s])switch(s){case"nodeId":t+="/turnnodeweight/"+e[s];break;case"fromEdgeId":t+="/fromedge/"+e[s];break;case"toEdgeId":t+="/toedge/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}} /* Copyright© 2000 - 2022 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.*/ class Hr{constructor(e){e&&(this.datasourceName=null,this.datasetName=null,this.isFileCache=null,this.description=null,this.prjCoordSys=null,this.charset=null,this.palette=null,this.noValue=null,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.UpdateDatasetParameters")}destroy(){var e=this;e.datasourceName=null,e.datasetName=null,e.isFileCache=null,e.prjCoordSys=null,e.charset=null,e.palette=null,e.noValue=null}} /* Copyright© 2000 - 2022 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.*/ class Wr{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=I.CLIP,this.output=null,this.mappingParameters=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof St&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof bt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}} /* Copyright© 2000 - 2022 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.*/ class Yr extends _t{constructor(e,t){super(e,t),this.url=ee.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(ee.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,Wr,t)}} /* Copyright© 2000 - 2022 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.*/ class Qr{constructor(e){e=e||{},this.type=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.RasterFunctionParameter"}destroy(){this.type=null}} /* Copyright© 2000 - 2022 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.*/ class Xr{constructor(e){this.name=null,this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobCustomItems",ee.extend(this,e)}destroy(){this.name=null,this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={name:this.name};return this.title&&(e.title=this.title),this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class Kr{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobImage",ee.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl&&(e.picAsUrl=this.picAsUrl),this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class Zr{constructor(e){this.name=null,this.layerType=null,this.url=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayers",ee.extend(this,e)}destroy(){this.name=null,this.layerType=null,this.url=null}} /* Copyright© 2000 - 2022 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.*/ class $r{constructor(e){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers=null,this.customItems=null,this.CLASS_NAME="SuperMap.WebPrintingJobLegendOptions",ee.extend(this,e)}destroy(){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers instanceof Zr&&(this.layers.destroy(),this.layers=null),this.customItems instanceof Xr&&(this.customItems.destroy(),this.customItems=null)}toJSON(){var e={title:this.title||""};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64?e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,""):this.customItems&&(e.customItems=this.customItems),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class en{constructor(e){this.center=null,this.scale=null,this.layerNames=null,this.image=null,this.layers=null,this.CLASS_NAME="SuperMap.WebPrintingJobLittleMapOptions",ee.extend(this,e)}destroy(){this.center=null,this.scale=null,this.layerNames=null,this.image instanceof Kr&&(this.image.destroy(),this.image=null),this.layers instanceof Zr&&(this.layers.destroy(),this.layers=null)}toJSON(){var e={scale:this.scale,center:this.center};return this.layerNames?e.layerNames=this.layerNames:this.layers&&(e.layers=this.layers),this.image&&(e.image=this.image),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class tn{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobNorthArrowOptions",ee.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class sn{constructor(e){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null,this.CLASS_NAME="SuperMap.WebPrintingJobScaleBarOptions",ee.extend(this,e)}destroy(){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null}toJSON(){var e={scaleText:this.scaleText||"",type:this.type||"BAR",intervals:this.intervals||"",unit:this.unit||"METER"};return this.orientation&&(e.orientation=this.orientation),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class rn{constructor(e){this.type=null,this.url=null,this.token=null,this.value=null,this.CLASS_NAME="SuperMap.WebPrintingJobContent",ee.extend(this,e)}destroy(){this.type="WEBMAP",this.url=null,this.token=null,this.value=null}toJSON(){var e={type:this.type};return this.token&&(e.token=this.token),this.url?e.url=this.url:this.value&&(e.value=this.value),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class nn{constructor(e){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions=null,this.northArrowOptions=null,this.littleMapOptions=null,this.legendOptions=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayoutOptions",ee.extend(this,e)}destroy(){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions instanceof sn&&(this.scaleBarOptions.destroy(),this.scaleBarOptions=null),this.northArrowOptions instanceof tn&&(this.northArrowOptions.destroy(),this.northArrowOptions=null),this.littleMapOptions instanceof en&&(this.littleMapOptions.destroy(),this.littleMapOptions=null),this.legendOptions instanceof $r&&(this.legendOptions.destroy(),this.legendOptions=null)}toJSON(){var e={templateName:this.templateName,title:this.title,subTitle:this.subTitle,author:this.author,copyright:this.copyright};return this.scaleBarOptions&&(e.scaleBarOptions=this.scaleBarOptions),this.northArrowOptions&&(e.northArrowOptions=this.northArrowOptions),this.littleMapOptions&&(e.littleMapOptions=this.littleMapOptions),this.legendOptions&&(e.legendOptions=this.legendOptions),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class an{constructor(e){this.format=null,this.dpi=96,this.scale=null,this.rotation=null,this.center=null,this.CLASS_NAME="SuperMap.WebPrintingJobExportOptions",ee.extend(this,e)}destroy(){this.format=null,this.dpi=null,this.scale=null,this.rotation=null,this.center=null,this.outputSize=null}toJSON(){var e={format:this.format||"PDF",dpi:this.dpi,scale:this.scale,center:this.center};return this.rotation&&(e.rotation=this.rotation),this.outputSize&&(e.outputSize=this.outputSize),ee.toJSON(e)}} /* Copyright© 2000 - 2022 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.*/ class on extends tt{constructor(e,t){super(e,t),t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.WebPrintingService",this.url}destroy(){super.destroy()}createWebPrintingJob(e){if(e){e.layoutOptions&&e.layoutOptions.legendOptions&&(!e.layoutOptions.legendOptions.title&&(e.layoutOptions.legendOptions.title=""),e.layoutOptions.legendOptions.picAsBase64=e.layoutOptions.legendOptions.picAsBase64&&e.layoutOptions.legendOptions.picAsBase64.replace(/^data:.+;base64,/,""),e.layoutOptions.legendOptions.customItems&&e.layoutOptions.legendOptions.customItems.hasOwnProperty("picAsBase64")&&(e.layoutOptions.legendOptions.customItems.picAsBase64=e.layoutOptions.legendOptions.customItems.picAsBase64.replace(/^data:.+;base64,/,"")));var t=this;t.request({url:t._processUrl("jobs"),method:"POST",data:ee.toJSON(e),scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}getPrintingJob(e){var t=this,s=t._processUrl(`jobs/${e}`);t.request({url:s,method:"GET",scope:t,success:function(e){t.rollingProcess(e,s)},failure:t.serviceProcessFailed})}getPrintingJobResult(e){var t=this;t.request({url:t._processUrl(`jobs/${e}/result`),method:"GET",scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}getLayoutTemplates(){var e=this;e.request({url:e._processUrl("layouts"),method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}rollingProcess(e,t){var s=this;if(e)var i=setInterval(function(){s.request({url:t,method:"GET",scope:s,success:function(e){switch(e.status){case"FINISHED":clearInterval(i),s.serviceProcessCompleted(e);break;case"ERROR":clearInterval(i),s.serviceProcessFailed(e);break;case"RUNNING":s.events.triggerEvent("processRunning",e)}},failure:s.serviceProcessFailed})},1e3)}_processUrl(e){return e?ee.urlPathAppend(this.url,e):this.url}} /* Copyright© 2000 - 2022 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.*/ class ln extends tt{constructor(e,t){super(e,t),this.options=t||{},t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.ImageCollectionService"}destroy(){super.destroy()}getLegend(e){var t={collectionId:this.options.collectionId},s=ee.convertPath("/collections/{collectionId}/legend",t),i=ee.urlPathAppend(this.url,s);this.request({method:"GET",url:i,params:e,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}getStatistics(){var e={collectionId:this.options.collectionId},t=ee.convertPath("/collections/{collectionId}/statistics",e),s=ee.urlPathAppend(this.url,t);this.request({method:"GET",url:s,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}getTileInfo(){var e={collectionId:this.options.collectionId},t=ee.convertPath("/collections/{collectionId}/tileInfo",e),s=ee.urlPathAppend(this.url,t);this.request({method:"GET",url:s,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}deleteItemByID(e){var t={collectionId:this.options.collectionId,featureId:e},s=ee.convertPath("/collections/{collectionId}/items/{featureId}",t),i=ee.urlPathAppend(this.url,s);this.request({method:"DELETE",url:i,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}getItemByID(e){var t={collectionId:this.options.collectionId,featureId:e},s=ee.convertPath("/collections/{collectionId}/items/{featureId}",t),i=ee.urlPathAppend(this.url,s);this.request({method:"GET",url:i,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class hn extends tt{constructor(e,t){super(e,t),this.options=t||{},t&&ee.extend(this,t),this.CLASS_NAME="SuperMap.ImageService"}destroy(){super.destroy()}getCollections(){var e=ee.convertPath("/collections"),t=ee.urlPathAppend(this.url,e);this.request({method:"GET",url:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}getCollectionByID(e){var t={collectionId:e},s=ee.convertPath("/collections/{collectionId}",t),i=ee.urlPathAppend(this.url,s);this.request({method:"GET",url:i,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}search(e){var t={...e||{}},s=ee.convertPath("/search"),i=ee.urlPathAppend(this.url,s);this.request({method:"POST",url:i,data:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}} /* Copyright© 2000 - 2022 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.*/ class un{constructor(e){this.include=void 0,this.exclude=void 0,this.CLASS_NAME="SuperMap.FieldsFilter",ee.extend(this,e)}destroy(){this.include=void 0,this.exclude=void 0}static constructFromObject(e,t){return e&&(t=t||new un,e.hasOwnProperty("include")&&(t.include=e.include),e.hasOwnProperty("exclude")&&(t.exclude=e.exclude)),t}} /* Copyright© 2000 - 2022 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.*/ class cn{constructor(e){this.field=void 0,this.direction=cn.Direction.ASC,this.CLASS_NAME="SuperMap.Sortby",ee.extend(this,e)}destroy(){this.field=void 0,this.direction="ASC"}static constructFromObject(e,t){return e&&(t=t||new cn,e.hasOwnProperty("field")&&(t.field=e.field),e.hasOwnProperty("direction")&&(t.direction=e.direction)),t}}cn.Direction={ASC:"ASC",DESC:"DESC"}; /* Copyright© 2000 - 2022 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.*/ class pn{constructor(e){this.bbox=void 0,this.collections=void 0,this.ids=void 0,this.limit=void 0,this.fields=void 0,this.query=void 0,this.sortby=void 0,this.CLASS_NAME="SuperMap.ImageSearchParameter",ee.extend(this,e)}destroy(){var e=this;e.bbox=void 0,e.collections=void 0,e.ids=void 0,e.limit=void 0,e.fields=void 0,e.query=void 0,e.sortby=void 0}static constructFromObject(e,t){return e&&(t=t||new pn,e.hasOwnProperty("bbox")&&(t.bbox=e.bbox),e.hasOwnProperty("collections")&&(t.collections=e.collections),e.hasOwnProperty("ids")&&(t.ids=e.ids),e.hasOwnProperty("limit")&&(t.limit=e.limit),e.hasOwnProperty("fields")&&(t.fields=un.constructFromObject&&un.constructFromObject(e.fields,{})||e.fields),e.hasOwnProperty("query")&&(t.query=e.query),e.hasOwnProperty("sortby")&&(t.sortby=e.sortby,e.sortby&&(t.sortby=e.sortby.map(e=>cn.constructFromObject&&cn.constructFromObject(e,{})||e)))),t}} /* Copyright© 2000 - 2022 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.*/ class dn{constructor(e){this.stretchType=void 0,this.stdevCoefficient=void 0,this.gaussianCoefficient=void 0,this.useMedianValue=void 0,this.minPercent=void 0,this.maxPercent=void 0,this.CLASS_NAME="SuperMap.ImageStretchOption",ee.extend(this,e)}destroy(){var e=this;e.stretchType=void 0,e.stdevCoefficient=void 0,e.gaussianCoefficient=void 0,e.useMedianValue=void 0,e.minPercent=void 0,e.maxPercent=void 0}static constructFromObject(e,t){return e&&(t=t||new dn,e.hasOwnProperty("stretchType")&&(t.stretchType=e.stretchType),e.hasOwnProperty("stdevCoefficient")&&(t.stdevCoefficient=e.stdevCoefficient),e.hasOwnProperty("gaussianCoefficient")&&(t.gaussianCoefficient=e.gaussianCoefficient),e.hasOwnProperty("useMedianValue")&&(t.useMedianValue=e.useMedianValue),e.hasOwnProperty("minPercent")&&(t.minPercent=e.minPercent),e.hasOwnProperty("maxPercent")&&(t.maxPercent=e.maxPercent)),t}}dn.StretchType={NONE:"NONE",GAUSSIAN:"GAUSSIAN",PERCENTCLIP:"PERCENTCLIP",MINIMUMMAXIMUM:"MINIMUMMAXIMUM",STANDARDDEVIATION:"STANDARDDEVIATION"}; /* Copyright© 2000 - 2022 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.*/ class fn{constructor(e){this.displayMode=void 0,this.displayBands=void 0,this.stretchOption=void 0,this.interpolationMode=void 0,this.colorScheme=void 0,this.colorTable=void 0,this.brightness=void 0,this.contrast=void 0,this.noData=void 0,this.noDataColor=void 0,this.noDataTransparent=void 0,this.backgroundValue=void 0,this.backgroundColor=void 0,this.backgroundTransparent=void 0,this.gridFunctions=void 0,this.CLASS_NAME="SuperMap.ImageRenderingRule",ee.extend(this,e)}destroy(){var e=this;e.displayMode=void 0,e.displayBands=void 0,e.stretchOption=void 0,e.interpolationMode=void 0,e.colorScheme=void 0,e.colorTable=void 0,e.brightness=void 0,e.contrast=void 0,e.noData=void 0,e.noDataColor=void 0,e.noDataTransparent=void 0,e.backgroundValue=void 0,e.backgroundColor=void 0,e.backgroundTransparent=void 0,e.gridFuncOptions=void 0}static constructFromObject(e,t){return e&&(t=t||new fn,e.hasOwnProperty("displayMode")&&(t.displayMode=e.displayMode),e.hasOwnProperty("displayBands")&&(t.displayBands=e.displayBands),e.hasOwnProperty("stretchOption")&&(t.stretchOption=dn.constructFromObject&&dn.constructFromObject(e.stretchOption,{})||e.stretchOption),e.hasOwnProperty("interpolationMode")&&(t.interpolationMode=e.interpolationMode),e.hasOwnProperty("colorScheme")&&(t.colorScheme=e.colorScheme),e.hasOwnProperty("colorTable")&&(t.colorTable=e.colorTable),e.hasOwnProperty("brightness")&&(t.brightness=e.brightness),e.hasOwnProperty("contrast")&&(t.contrast=e.contrast),e.hasOwnProperty("noData")&&(t.noData=e.noData),e.hasOwnProperty("noDataColor")&&(t.noDataColor=e.noDataColor),e.hasOwnProperty("backgroundValue")&&(t.backgroundValue=e.backgroundValue),e.hasOwnProperty("noDataTransparent")&&(t.noDataTransparent=e.noDataTransparent),e.hasOwnProperty("backgroundColor")&&(t.backgroundColor=e.backgroundColor),e.hasOwnProperty("backgroundTransparent")&&(t.backgroundTransparent=e.backgroundTransparent),e.hasOwnProperty("gridFunctions")&&(t.gridFunctions=e.gridFunctions)),t}}fn.DisplayMode={COMPOSITE:"COMPOSITE",STRETCHED:"Stretched"},fn.InterpolationMode={NEARESTNEIGHBOR:"NEARESTNEIGHBOR",HIGHQUALITYBILINEAR:"HIGHQUALITYBILINEAR",DEFAULT:"DEFAULT"}; /* Copyright© 2000 - 2022 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.*/ class mn{constructor(e){this.girdFuncName="GFHillShade",this.Azimuth=315,this.Altitude=45,this.ZFactor=1,this.CLASS_NAME="SuperMap.ImageGFHillShade",ee.extend(this,e)}destroy(){this.girdFuncName="GFHillShade",this.Azimuth=315,this.Altitude=45,this.ZFactor=1}static constructFromObject(e,t){return e&&(t=t||new mn,e.hasOwnProperty("girdFuncName")&&(t.girdFuncName=e.girdFuncName),e.hasOwnProperty("Azimuth")&&(t.Azimuth=e.Azimuth),e.hasOwnProperty("Altitude")&&(t.Altitude=e.Altitude),e.hasOwnProperty("ZFactor")&&(t.ZFactor=e.ZFactor)),t}} /* Copyright© 2000 - 2022 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.*/ class yn{constructor(e){this.girdFuncName="GFAspect",this.Azimuth=void 0,this.CLASS_NAME="SuperMap.ImageGFAspect",ee.extend(this,e)}destroy(){this.girdFuncName="GFAspect",this.Azimuth=void 0}static constructFromObject(e,t){return e&&(t=t||new yn,e.hasOwnProperty("girdFuncName")&&(t.girdFuncName=e.girdFuncName),e.hasOwnProperty("Azimuth")&&(t.Azimuth=e.Azimuth)),t}} /* Copyright© 2000 - 2022 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.*/ class gn{constructor(e){this.girdFuncName="GFOrtho",this.CLASS_NAME="SuperMap.ImageGFOrtho",ee.extend(this,e)}destroy(){this.girdFuncName="GFOrtho"}static constructFromObject(e,t){return e&&(t=t||new gn,e.hasOwnProperty("girdFuncName")&&(t.girdFuncName=e.girdFuncName)),t}} /* Copyright© 2000 - 2022 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.*/ class vn{constructor(e){this.girdFuncName="GFSlope",this.Altitude=45,this.ZFactor=1,this.CLASS_NAME="SuperMap.ImageGFSlope",ee.extend(this,e)}destroy(){this.girdFuncName="GFSlope",this.Altitude=45,this.ZFactor=1}static constructFromObject(e,t){return e&&(t=t||new vn,e.hasOwnProperty("girdFuncName")&&(t.girdFuncName=e.girdFuncName),e.hasOwnProperty("Altitude")&&(t.Altitude=e.Altitude),e.hasOwnProperty("ZFactor")&&(t.ZFactor=e.ZFactor)),t}} /* Copyright© 2000 - 2022 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.*/ class Sn{constructor(e){e=e||{},ee.extend(this,e),this.CLASS_NAME="SuperMap.OnlineServiceBase"}request(e,t,s,i={}){return t=je.appendCredential(t),i.crossOrigin=this.options.crossOrigin,i.headers=this.options.headers,Ue.commit(e,t,s,i).then(function(e){return e.json()})}} /* Copyright© 2000 - 2022 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.*/ class bn extends Sn{constructor(e,t){super(e),t=t||{},this.MD5=null,this.type=null,this.userName=null,this.fileName=null,this.size=null,this.serviceStatus=null,this.serviceId=null,this.id=null,this.lastModfiedTime=null,this.status=null,this.storageId=null,this.publishInfo=null,this.authorizeSetting=null,this.nickname=null,this.tags=[],this.description=null,this.dataItemServices=null,this.coordType=null,this.dataCheckResult=null,this.dataMetaInfo=null,this.thumbnail=null,ee.extend(this,t),this.id&&(this.serviceUrl=e+"/"+this.id),this.CLASS_NAME="SuperMap.OnlineData"}load(){if(this.serviceUrl){var e=this;return e.request("GET",this.serviceUrl).then(function(t){ee.extend(e,t)})}}getPublishedServices(){return this.dataItemServices}getAuthorizeSetting(){return this.authorizeSetting}}const xn=function(){try{return elasticsearch}catch(e){return{}}}();var _n=s.n(xn); /* Copyright© 2000 - 2022 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.*/ class Cn{constructor(){this.BUILTIN_OBJECT={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},this._ctx=null,this._canvas=null,this._pixelCtx=null,this._width=null,this._height=null,this._offsetX=0,this._offsetY=0,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Util"}clone(e){var t=this.BUILTIN_OBJECT;if("object"==typeof e&&null!==e){var s=e;if(e instanceof Array){s=[];for(var i=0,r=e.length;in&&(n=e+o+100,i.width=n,s=!0),t+l>a&&(a=t+l+100,i.height=a,s=!0),e<-o&&(n+=o=100*Math.ceil(-e/100),i.width=n,s=!0),t<-l&&(a+=l=100*Math.ceil(-t/100),i.height=a,s=!0),s&&r.translate(o,l)}getPixelOffset(){return{x:this._offsetX,y:this._offsetY}}indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,i=e.length;s1)for(var r=0,n=i-1;r1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var s=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=s[0],e[2]=s[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}toArray(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],s=0;return e.replace(/[\d.]+/g,function(e){s<3?e|=0:e=+e,t[s++]=e}),t}convert(e,t){if(!this.isCalculableColor(e))return e;var s=this.getData(e),i=s[3];return void 0===i&&(i=1),e.indexOf("hsb")>-1?s=this._HSV_2_RGB(s):e.indexOf("hsl")>-1&&(s=this._HSL_2_RGB(s)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?s=this._RGB_2_HSB(s):t.indexOf("hsl")>-1&&(s=this._RGB_2_HSL(s)),s[3]=i,this.toColor(s,t)}toRGBA(e){return this.convert(e,"rgba")}toRGB(e){return this.convert(e,"rgb")}toHex(e){return this.convert(e,"hex")}toHSVA(e){return this.convert(e,"hsva")}toHSV(e){return this.convert(e,"hsv")}toHSBA(e){return this.convert(e,"hsba")}toHSB(e){return this.convert(e,"hsb")}toHSLA(e){return this.convert(e,"hsla")}toHSL(e){return this.convert(e,"hsl")}toName(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}trim(e){return String(e).replace(/\s+/g,"")}normalize(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,s=(240&e)<<4,i=15&e;e="#"+((1<<24)+(t<<4)+t+(s<<4)+s+(i<<4)+i).toString(16).slice(1)}return e}lift(e,t){if(!this.isCalculableColor(e))return e;var s=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var i=this.getData(e),r=0;r<3;r++)i[r]=1===s?i[r]*(1-t)|0:(255-i[r])*t+i[r]|0;return"rgb("+i.join(",")+")"}reverse(e){if(!this.isCalculableColor(e))return e;var t=this.getData(this.toRGBA(e));return t=this.map(t,function(e){return 255-e}),this.toColor(t,"rgb")}mix(e,t,s){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===s&&(s=.5);for(var i=2*(s=1-this.adjust(s,[0,1]))-1,r=this.getData(this.toRGBA(e)),n=this.getData(this.toRGBA(t)),a=r[3]-n[3],o=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,l=1-o,h=[],u=0;u<3;u++)h[u]=r[u]*o+n[u]*l;var c=r[3]*s+n[3]*(1-s);return c=Math.max(0,Math.min(1,c)),1===r[3]&&1===n[3]?this.toColor(h,"rgb"):(h[3]=c,this.toColor(h,"rgba"))}random(){return"#"+Math.random().toString(16).slice(2,8)}getData(e){var t,s,i=(e=this.normalize(e)).match(this.colorRegExp);if(null===i)throw new Error("The color format error");var r,n=[];if(i[2])r=[(t=i[2].replace("#","").split(""))[0]+t[1],t[2]+t[3],t[4]+t[5]],n=this.map(r,function(e){return wn.prototype.adjust.call(this,parseInt(e,16),[0,255])});else if(i[4]){var a=i[4].split(",");s=a[3],r=a.slice(0,3),n=this.map(r,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),wn.prototype.adjust.call(this,e,[0,255])}),void 0!==s&&n.push(this.adjust(parseFloat(s),[0,1]))}else if(i[5]||i[6]){var o=(i[5]||i[6]).split(","),l=parseInt(o[0],0)/360,h=o[1],u=o[2];s=o[3],(n=this.map([h,u],function(e){return wn.prototype.adjust.call(this,parseFloat(e)/100,[0,1])})).unshift(l),void 0!==s&&n.push(this.adjust(parseFloat(s),[0,1]))}return n}alpha(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var s=this.getData(this.toRGBA(e));return s[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(s,"rgba")}map(e,t){if("function"!=typeof t)throw new TypeError;for(var s=e?e.length:0,i=0;i=t[1]&&(e=t[1]),e}isCalculableColor(e){return e instanceof Array||"string"==typeof e}_HSV_2_RGB(e){var t,s,i,r=e[0],n=e[1],a=e[2];if(0===n)t=255*a,s=255*a,i=255*a;else{var o=6*r;6===o&&(o=0);var l=0|o,h=a*(1-n),u=a*(1-n*(o-l)),c=a*(1-n*(1-(o-l))),p=0,d=0,f=0;0===l?(p=a,d=c,f=h):1===l?(p=u,d=a,f=h):2===l?(p=h,d=a,f=c):3===l?(p=h,d=u,f=a):4===l?(p=c,d=h,f=a):(p=a,d=h,f=u),t=255*p,s=255*d,i=255*f}return[t,s,i]}_HSL_2_RGB(e){var t,s,i,r=e[0],n=e[1],a=e[2];if(0===n)t=255*a,s=255*a,i=255*a;else{var o,l=2*a-(o=a<.5?a*(1+n):a+n-n*a);t=255*this._HUE_2_RGB(l,o,r+1/3),s=255*this._HUE_2_RGB(l,o,r),i=255*this._HUE_2_RGB(l,o,r-1/3)}return[t,s,i]}_HUE_2_RGB(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),6*s<1?e+6*(t-e)*s:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}_RGB_2_HSB(e){var t,s,i=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(i,r,n),o=Math.max(i,r,n),l=o-a,h=o;if(0===l)t=0,s=0;else{s=l/o;var u=((o-i)/6+l/2)/l,c=((o-r)/6+l/2)/l,p=((o-n)/6+l/2)/l;i===o?t=p-c:r===o?t=1/3+u-p:n===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}_RGB_2_HSL(e){var t,s,i=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(i,r,n),o=Math.max(i,r,n),l=o-a,h=(o+a)/2;if(0===l)t=0,s=0;else{s=h<.5?l/(o+a):l/(2-o-a);var u=((o-i)/6+l/2)/l,c=((o-r)/6+l/2)/l,p=((o-n)/6+l/2)/l;i===o?t=p-c:r===o?t=1/3+u-p:n===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}}var Mn=new wn;var An=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};function Tn(e,t,s,i,r=22){var n=[];if(e&&e.length>0)for(let t=0;tl&&(o[i]=o[i].slice(s-l),l=s)}function f(e){var r,n,a,u;if(e instanceof Function)return e.call(h.parsers);if("string"==typeof e)r=t.charAt(s)===e?e:null,n=1,d();else{if(d(),!(r=e.exec(o[i])))return null;n=r[0].length}if(r){var c=s+=n;for(u=s+o[i].length-n;s=0&&"\n"!==i.charAt(o);o--)s.column++;return new Error([s.filename,s.line,s.column,s.message].join(";"))}return this.env=e=e||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},h={parse:function(r){var n,h=null;if(s=i=l=a=0,o=[],t=r.replace(/\r\n/g,"\n"),e.filename&&(u.env.inputs[e.filename]=t),o=function(e){for(var s,i,r,n,a=0,o=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,u=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,c=0,p=e[0],d=0;d0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),h)throw m(h);var c=function(e,t){var s=e.specificity,i=t.specificity;return s[0]!=i[0]?i[0]-s[0]:s[1]!=i[1]?i[1]-s[1]:s[2]!=i[2]?i[2]-s[2]:i[3]-s[3]};return(n=new Pn.Tree.Ruleset([],f(this.parsers.primary))).root=!0,n.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+m(t).message:e.errors.message=m(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(c),t},n},parsers:{primary:function(){for(var e,t=[];(e=f(this.rule)||f(this.ruleset)||f(this.comment))||f(/^[\s\n]+/)||(e=f(this.invalid));)e&&t.push(e);return t},invalid:function(){var e=f(/^[^;\n]*[;\n]/);if(e)return new Pn.Tree.Invalid(e,n)},comment:function(){var e;if("/"===t.charAt(s))return"/"===t.charAt(s+1)?new Pn.Tree.Comment(f(/^\/\/.*/),!0):(e=f(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new Pn.Tree.Comment(e):void 0},entities:{quoted:function(){if('"'===t.charAt(s)||"'"===t.charAt(s)){var e=f(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return e?new Pn.Tree.Quoted(e[1]||e[2]):void 0}},field:function(){if(f("[")){var e=f(/(^[^\]]+)/);if(f("]"))return e?new Pn.Tree.Field(e[1]):void 0}},comparison:function(){var e=f(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var e=f(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(e)return new Pn.Tree.Keyword(e)},call:function(){var e,t;if(e=/^([\w\-]+|%)\(/.exec(o[i])){if("url"===(e=e[1]))return null;s+=e.length;if(f("("),t=f(this.entities.arguments),f(")"))return e?new Pn.Tree.Call(e,t,s):void 0}},arguments:function(){for(var e,t=[];e=f(this.expression);){t.push(e);if(!f(","))break}return t},literal:function(){return f(this.entities.dimension)||f(this.entities.keywordcolor)||f(this.entities.hexcolor)||f(this.entities.quoted)},url:function(){var e;if("u"===t.charAt(s)&&f(/^url\(/)){e=f(this.entities.quoted)||f(this.entities.variable)||f(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return f(")")?new Pn.Tree.URL(void 0!==e.value||e instanceof Pn.Tree.Variable?e:new Pn.Tree.Quoted(e)):new Pn.Tree.Invalid(e,n,"Missing closing ) in URL.")}},variable:function(){var i,r=s;if("@"===t.charAt(s)&&(i=f(/^@[\w-]+/)))return new Pn.Tree.Variable(i,r,e.filename)},hexcolor:function(){var e;if("#"===t.charAt(s)&&(e=f(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new Pn.Tree.Color(e[1])},keywordcolor:function(){var e=o[i].match(/^[a-z]+/);if(e&&e[0]in Pn.Tree.Reference.data.colors)return new Pn.Tree.Color(Pn.Tree.Reference.data.colors[f(/^[a-z]+/)])},dimension:function(){var e=t.charCodeAt(s);if(!(e>57||e<45||47===e)){var i=f(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return i?new Pn.Tree.Dimension(i[1],i[2],n):void 0}}},variable:function(){var e;if("@"===t.charAt(s)&&(e=f(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=f(this.entities.call)||f(this.entities.literal),t=f(this.entities.field)||f(this.entities.variable),s=f(this.entities.url)||f(this.entities.keyword);return e||t||s},end:function(){var e;return f(";")||("string"==typeof(e="}")?t.charAt(s)===e:!!e.test(o[i]))},element:function(){var e=f(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(e)return new Pn.Tree.Element(e)},attachment:function(){var e=f(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var e,i,r,a,o,l=[],h=new Pn.Tree.Filterset,u=[],c=0,p=0;(r=f(this.element))||(o=f(this.zoom))||(a=f(this.filter))||(e=f(this.attachment));){if(c++,r)l.push(r);else if(o)u.push(o),p++;else if(a){var d=h.add(a);if(d)throw m({message:d,index:s-1});p++}else{if(i)throw m({message:"Encountered second attachment name.",index:s-1});i=e}var y=t.charAt(s);if("{"===y||"}"===y||";"===y||","===y)break}if(c)return new Pn.Tree.Selector(h,u,l,i,p,n)},filter:function(){c();var t,s,i;if(f("[")&&(t=f(/^[a-zA-Z0-9\-_]+/)||f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.keyword)||f(this.entities.field))&&(t instanceof Pn.Tree.Quoted&&(t=new Pn.Tree.Field(t.toString())),(s=f(this.entities.comparison))&&(i=f(this.entities.quoted)||f(this.entities.variable)||f(this.entities.dimension)||f(this.entities.keyword)||f(this.entities.field)))){if(!f("]"))throw m({message:"Missing closing ] of filter.",index:n-1});return t.is||(t=new Pn.Tree.Field(t)),new Pn.Tree.Filter(t,s,i,n,e.filename)}},zoom:function(){c();var e,t;if(f(/^\[\s*zoom/g)&&(e=f(this.entities.comparison))&&(t=f(this.entities.variable)||f(this.entities.dimension))&&f("]"))return new Pn.Tree.Zoom(e,t,n);p()},block:function(){var e;if(f("{")&&(e=f(this.primary))&&f("}"))return e},ruleset:function(){var e,t,s=[];for(c();e=f(this.selector);){for(s.push(e);f(this.comment););if(!f(","))break;for(;f(this.comment););}if(e)for(;f(this.comment););if(s.length>0&&(t=f(this.block))){if(1===s.length&&s[0].elements.length&&"Map"===s[0].elements[0].value){var i=new Pn.Tree.Ruleset(s,t);return i.isMap=!0,i}return new Pn.Tree.Ruleset(s,t)}p()},rule:function(){var i,r,o=t.charAt(s);if(c(),"."!==o&&"#"!==o&&(i=f(this.variable)||f(this.property))){if((r=f(this.value))&&f(this.end))return new Pn.Tree.Rule(i,r,n,e.filename);a=s,p()}},font:function(){for(var e,t=[],s=[];e=f(this.entity);)s.push(e);if(t.push(new Pn.Tree.Expression(s)),f(","))for(;(e=f(this.expression))&&(t.push(e),f(",")););return new Pn.Tree.Value(t)},value:function(){for(var e,t=[];(e=f(this.expression))&&(t.push(e),f(",")););return t.length>1?new Pn.Tree.Value(t.map(function(e){return e.value[0]})):1===t.length?new Pn.Tree.Value(t):void 0},sub:function(){var e;if(f("(")&&(e=f(this.expression))&&f(")"))return e},multiplication:function(){var e,t,s,i;if(e=f(this.operand)){for(;(s=f("/")||f("*")||f("%"))&&(t=f(this.operand));)i=new Pn.Tree.Operation(s,[i||e,t],n);return i||e}},addition:function(){var e,i,r,a;if(e=f(this.multiplication)){for(;(r=f(/^[-+]\s+/)||" "!=t.charAt(s-1)&&(f("+")||f("-")))&&(i=f(this.multiplication));)a=new Pn.Tree.Operation(r,[a||e,i],n);return a||e}},operand:function(){return f(this.sub)||f(this.entity)},expression:function(){for(var e,t=[];e=f(this.addition)||f(this.entity);)t.push(e);if(t.length>0)return new Pn.Tree.Expression(t)},property:function(){var e=f(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}parse(e){var t=this.parser;return this.ruleSet=t.parse(e)}toShaders(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var s={},i=[];this._toShaders(s,i,t);for(var r=[],n={},a=0,o=t.length;a=0){if(!t.featureFilter){var n=r+i.length,a=s.indexOf(")",n+1),o="featureId&&(featureId"+s.substring(n,a)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!o}})}return{property:d,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+s+";} return _value; ")}}return{property:d,getValue:Function("attributes","zoom","var _value = null;"+s+"; return _value; ")}}(u[d],c);Object.defineProperty(c,"attachment",{configurable:!0,enumerable:!1,value:h}),Object.defineProperty(c,"elements",{configurable:!0,enumerable:!1,value:l.elements}),r.push(c),n[i[a]]=!0}Object.defineProperty(c,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return r}}return null}_toShaders(e,t,s){for(let i=0,r=s.length;i= 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"]}};Pn.mapnik_reference={version:{latest:Nn,"2.1.1":Nn}},Pn.Tree={},Pn.Tree.operate=function(e,t,s){switch(e){case"+":return t+s;case"-":return t-s;case"*":return t*s;case"%":return t%s;case"/":return t/s}},Pn.Tree.functions={rgb:function(e,t,s){return this.rgba(e,t,s,1)},rgba:function(e,t,s,i){var r=this,n=[e,t,s].map(function(e){return r.number(e)});return i=r.number(i),n.some(isNaN)||isNaN(i)?null:new Pn.Tree.Color(n,i)},stop:function(e){var t,s;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(s=arguments[2]),{is:"tag",val:e,color:t,mode:s,toString:i=>'\n\t"}},hsl:function(e,t,s){return this.hsla(e,t,s,1)},hsla:function(e,t,s,i){if([e=this.number(e)%360/360,t=this.number(t),s=this.number(s),i=this.number(i)].some(isNaN))return null;var r=s<=.5?s*(t+1):s+t-s*t,n=2*s-r;return this.rgba(255*a(e+1/3),255*a(e),255*a(e-1/3),i);function a(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?n+(r-n)*e*6:2*e<1?r:3*e<2?n+(r-n)*(2/3-e)*6:n}},hue:function(e){return"toHSL"in e?new Pn.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new Pn.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new Pn.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new Pn.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s+=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},desaturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s-=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},lighten:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l+=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},darken:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l-=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},fadein:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a+=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},fadeout:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a-=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},spin:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL(),i=(s.h+t.value)%360;return s.h=i<0?360+i:i,this.hsla_simple(s)},replace:function(e,t,s){return"field"===e.is?e.toString+".replace("+t.toString()+", "+s.toString()+")":e.replace(t,s)},mix:function(e,t,s){var i=s.value/100,r=2*i-1,n=e.toHSL().a-t.toHSL().a,a=((r*n==-1?r:(r+n)/(1+r*n))+1)/2,o=1-a,l=[e.rgb[0]*a+t.rgb[0]*o,e.rgb[1]*a+t.rgb[1]*o,e.rgb[2]*a+t.rgb[2]*o],h=e.alpha*i+t.alpha*(1-i);return new Pn.Tree.Color(l,h)},greyscale:function(e){return this.desaturate(e,new Pn.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),s=e.value,i=0;i.5?h/(2-a-o):h/(a+o),a){case s:e=(i-r)/h+(i=0){if(!e.ppi)return e.error({message:"ppi is not set, so metric units can't be used",index:this.index}),{is:"undefined",value:"undefined"};this.value=this.value/this.densities[this.unit]*e.ppi,this.unit="px"}return this}toColor(){return new Pn.Tree.Color([this.value,this.value,this.value])}round(){return this.value=Math.round(this.value),this}toString(){return this.value.toString()}operate(e,t,s){return"%"===this.unit&&"%"!==s.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===s.unit?"*"===t||"/"===t||"%"===t?(e.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new Pn.Tree.Dimension(Pn.Tree.operate(t,this.value,this.value*s.value*.01),this.unit):new Pn.Tree.Dimension(Pn.Tree.operate(t,this.value,s.value),this.unit||s.unit)}},Pn.Tree.Element=class{constructor(e){this.value=e.trim(),"#"===this.value[0]&&(this.type="id",this.clean=this.value.replace(/^#/,"")),"."===this.value[0]&&(this.type="class",this.clean=this.value.replace(/^\./,"")),-1!==this.value.indexOf("*")&&(this.type="wildcard")}specificity(){return["id"===this.type?1:0,"class"===this.type?1:0]}toString(){return this.value}},Pn.Tree.Expression=class{constructor(e){this.is="expression",this.value=e}ev(e){return this.value.length>1?new Pn.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}toString(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}},Pn.Tree.Field=class{constructor(e){this.is="field",this.value=e||""}toString(){return'["'+this.value.toUpperCase()+'"]'}ev(){return this}},Pn.Tree.Filter=class{constructor(e,t,s,i,r){this.ops={"<":[" < ","numeric"],">":[" > ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" <= ","numeric"],">=":[" >= ","numeric"],"=~":[".match(","string",")"]},this.key=e,this.op=t,this.val=s,this.index=i,this.filename=r,this.id=this.key+this.op+this.val}ev(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}toString(){return"["+this.id+"]"}},Pn.Tree.Filterset=class{constructor(){this.filters={}}toJS(e){function t(e){var t=e.op;"="===t&&(t="==");var s=e.val;void 0!==e._val&&(s=e._val.toString(!0)),e.key&&"scale"===e.key.value?s=+s:"string"!=typeof s&&"object"!=typeof s||(s="'"+s+"'");var i="attributes";return i+"&&"+i+e.key+"&&"+i+e.key+" "+t+s}var s=[];for(var i in this.filters)s.push(t(this.filters[i]));return s.join(" && ")}toString(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}ev(e){for(var t in this.filters)this.filters[t].ev(e);return this}clone(){var e=new Pn.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}cloneWith(e){var t=[];for(var s in e.filters){var i=this.addable(e.filters[s]);if(!1===i)return!1;!0===i&&t.push(e.filters[s])}if(!t.length)return null;var r=new Pn.Tree.Filterset;for(s in this.filters)r.filters[s]=this.filters[s];for(;s=t.shift();)r.add(s);return r}addable(e){var t=e.key.toString(),s=e.val.toString();switch(s.match(/^[0-9]+(\.[0-9]*)?_match/)&&(s=parseFloat(s)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==s&&null:void 0===this.filters[t+"!="+s]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val"]&&this.filters[t+">"].val>=s?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val":return t+"="in this.filters?!(this.filters[t+"="].val<=s)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=s)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].vals)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)||null))}}conflict(e){var t=e.key.toString(),s=e.val.toString();return isNaN(parseFloat(s))||(s=parseFloat(s)),("="===e.op&&void 0!==this.filters[t+"="]&&s!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&s==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&s===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}add(e,t){var s,i=e.key.toString(),r=e.op,n=this.conflict(e);if(n)return n;if("="===r){for(var a in this.filters)this.filters[a].key===i&&delete this.filters[a];this.filters[i+"="]=e}else if("!="===r)this.filters[i+"!="+e.val]=e;else if("=~"===r)this.filters[i+"=~"+e.val]=e;else if(">"===r){for(var o in this.filters)this.filters[o].key===i&&this.filters[o].val<=e.val&&delete this.filters[o];this.filters[i+">"]=e}else if(">="===r){for(var l in this.filters)s=+this.filters[l].val.toString(),this.filters[l].key===i&&s",this.filters[i+">"]=e):this.filters[i+">="]=e}else if("<"===r){for(var h in this.filters)s=+this.filters[h].val.toString(),this.filters[h].key===i&&s>=e.val&&delete this.filters[h];this.filters[i+"<"]=e}else if("<="===r){for(var u in this.filters)s=+this.filters[u].val.toString(),this.filters[u].key===i&&s>e.val&&delete this.filters[u];void 0!==this.filters[i+"!="+e.val]?(delete this.filters[i+"!="+e.val],e.op="<",this.filters[i+"<"]=e):this.filters[i+"<="]=e}}},Pn.Tree.Fontset=class{constructor(e,t){this.fonts=t,this.name="fontset-"+e.effects.length}},Pn.Tree.Invalid=class{constructor(e,t,s){this.is="invalid",this.chunk=e,this.index=t,this.type="syntax",this.message=s||"Invalid code: "+this.chunk}ev(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}},Pn.Tree.Keyword=class{ev(){return this}constructor(e){this.value=e;var t={transparent:"color",true:"boolean",false:"boolean"};this.is=t[e]?t[e]:"keyword"}toString(){return this.value}},Pn.Tree.Literal=class{constructor(e){this.value=e||"",this.is="field"}toString(){return this.value}ev(){return this}},Pn.Tree.Operation=class{constructor(e,t,s){this.is="operation",this.op=e.trim(),this.operands=t,this.index=s}ev(e){var t,s=this.operands[0].ev(e),i=this.operands[1].ev(e);return"undefined"===s.is||"undefined"===i.is?{is:"undefined",value:"undefined"}:(s instanceof Pn.Tree.Dimension&&i instanceof Pn.Tree.Color&&("*"===this.op||"+"===this.op?(t=i,i=s,s=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),s instanceof Pn.Tree.Quoted&&i instanceof Pn.Tree.Quoted&&"+"!==this.op?(e.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):s instanceof Pn.Tree.Field||i instanceof Pn.Tree.Field||s instanceof Pn.Tree.Literal||i instanceof Pn.Tree.Literal?"color"===s.is||"color"===i.is?(e.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new Pn.Tree.Literal(s.ev(e).toString(!0)+this.op+i.ev(e).toString(!0)):void 0===s.operate?(e.error({message:"Cannot do math with type "+s.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):s.operate(e,this.op,i))}},Pn.Tree.Quoted=class{constructor(e){this.is="string",this.value=e||""}toString(e){var t=this.value.replace(/&/g,"&"),s=t.replace(/\'/g,"\\'").replace(/\"/g,""").replace(//g,">");return!0===e?"'"+s+"'":t}ev(){return this}operate(e,t,s){return new Pn.Tree.Quoted(Pn.Tree.operate(t,this.toString(),s.toString(this.contains_field)))}},Pn.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var s in e.symbolizers)for(var i in e.symbolizers[s])e.symbolizers[s][i].hasOwnProperty("css")&&(t[e.symbolizers[s][i].css]=[e.symbolizers[s][i],s,i]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var s in e.symbolizers)for(var i in e.symbolizers[s])if("functions"===e.symbolizers[s][i].type)for(var r=0;r1?Array.prototype.push.apply(s,i.find(new Pn.Tree.Selector(null,null,e.elements.slice(1)),t)):s.push(i);break}}),this._lookups[i]=s)}evZooms(e){for(var t=0;tPn.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+Pn.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+t,this;case">":this.zoom="zoom && zoom > "+t;break;case">=":this.zoom="zoom && zoom >= "+t;break;case"<":this.zoom="zoom && zoom < "+t;break;case"<=":this.zoom="zoom && zoom <= "+t}return this}toString(){for(var e="",t=0;t<=Pn.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<3&&(t=Array.prototype.slice.call(t,1));for(var i=this._handlers[e],r=i.length,n=0;n4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var i=t[t.length-1],r=this._handlers[e],n=r.length,a=0;a-this.EPSILON&&ethis.EPSILON||e<-this.EPSILON}cubicAt(e,t,s,i,r){var n=1-r;return n*n*(n*e+3*r*t)+r*r*(r*i+3*n*s)}cubicDerivativeAt(e,t,s,i,r){var n=1-r;return 3*(((t-e)*n+2*(s-t)*r)*n+(i-s)*r*r)}cubicRootAt(e,t,s,i,r,n){var a=i+3*(t-s)-e,o=3*(s-2*t+e),l=3*(t-e),h=e-r,u=o*o-3*a*l,c=o*l-9*a*h,p=l*l-3*o*h,d=0;if(this.isAroundZero(u)&&this.isAroundZero(c))if(this.isAroundZero(o))n[0]=0;else{let e=-l/o;e>=0&&e<=1&&(n[d++]=e)}else{var f=c*c-4*u*p;if(this.isAroundZero(f)){var m=c/u;let e=-o/a+m,t=-m/2;e>=0&&e<=1&&(n[d++]=e),t>=0&&t<=1&&(n[d++]=t)}else if(f>0){let e=Math.sqrt(f),t=u*o+1.5*a*(-c+e),s=u*o+1.5*a*(-c-e),i=(-o-((t=t<0?-Math.pow(-t,this.ONE_THIRD):Math.pow(t,this.ONE_THIRD))+(s=s<0?-Math.pow(-s,this.ONE_THIRD):Math.pow(s,this.ONE_THIRD))))/(3*a);i>=0&&i<=1&&(n[d++]=i)}else{var y=(2*u*o-3*a*c)/(2*Math.sqrt(u*u*u)),g=Math.acos(y)/3,v=Math.sqrt(u),S=Math.cos(g);let e=(-o-2*v*S)/(3*a),t=(-o+v*(S+this.THREE_SQRT*Math.sin(g)))/(3*a),s=(-o+v*(S-this.THREE_SQRT*Math.sin(g)))/(3*a);e>=0&&e<=1&&(n[d++]=e),t>=0&&t<=1&&(n[d++]=t),s>=0&&s<=1&&(n[d++]=s)}}return d}cubicExtrema(e,t,s,i,r){var n=6*s-12*t+6*e,a=9*t+3*i-3*e-9*s,o=3*t-3*e,l=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(n)){let e=-o/n;e>=0&&e<=1&&(r[l++]=e)}}else{var h=n*n-4*a*o;if(this.isAroundZero(h))r[0]=-n/(2*a);else if(h>0){let e=Math.sqrt(h),t=(-n+e)/(2*a),s=(-n-e)/(2*a);t>=0&&t<=1&&(r[l++]=t),s>=0&&s<=1&&(r[l++]=s)}}return l}cubicSubdivide(e,t,s,i,r,n){var a=(t-e)*r+e,o=(s-t)*r+t,l=(i-s)*r+s,h=(o-a)*r+a,u=(l-o)*r+o,c=(u-h)*r+h;n[0]=e,n[1]=a,n[2]=h,n[3]=c,n[4]=c,n[5]=u,n[6]=l,n[7]=i}cubicProjectPoint(e,t,s,i,r,n,a,o,l,h,u){var c,p=this.vector.create(),d=this.vector.create(),f=this.vector.create(),m=.005,y=1/0;p[0]=l,p[1]=h;for(let l=0;l<1;l+=.05){d[0]=this.cubicAt(e,s,r,a,l),d[1]=this.cubicAt(t,i,n,o,l);let h=this.vector.distSquare(p,d);h=0&&u=0&&h<=1&&(r[l++]=h)}}else{var u=a*a-4*n*o;if(this.isAroundZero(u)){let e=-a/(2*n);e>=0&&e<=1&&(r[l++]=e)}else if(u>0){let e=Math.sqrt(u),t=(-a+e)/(2*n),s=(-a-e)/(2*n);t>=0&&t<=1&&(r[l++]=t),s>=0&&s<=1&&(r[l++]=s)}}return l}quadraticExtremum(e,t,s){var i=e+s-2*t;return 0===i?.5:(e-t)/i}quadraticProjectPoint(e,t,s,i,r,n,a,o,l){var h,u=this.vector.create(),c=this.vector.create(),p=this.vector.create(),d=.005,f=1/0;u[0]=a,u[1]=o;for(let a=0;a<1;a+=.05){c[0]=this.quadraticAt(e,s,r,a),c[1]=this.quadraticAt(t,i,n,a);let o=this.vector.distSquare(u,c);o=0&&ln-2?n-1:p+1][0]+r[0],e[p>n-2?n-1:p+1][1]+r[1]],u=[e[p>n-3?n-1:p+2][0]+r[0],e[p>n-3?n-1:p+2][1]+r[1]]);let m=d*d,y=d*m;a.push([h(i[0],f[0],o[0],u[0],d,m,y),h(i[1],f[1],o[1],u[1],d,m,y)])}return a;function h(e,t,s,i,r,n,a){var o=.5*(s-e),l=.5*(i-t);return(2*(t-s)+o+l)*a+(-3*(t-s)-2*o-l)*n+o*r+t}}static SUtil_dashedLineTo(e,t,s,i,r,n,a){var o=[5,5];if(n="number"!=typeof n?5:n,e.setLineDash)return o[0]=n,o[1]=n,a&&a instanceof Array?e.setLineDash(a):e.setLineDash(o),e.moveTo(t,s),void e.lineTo(i,r);var l=i-t,h=r-s,u=Math.floor(Math.sqrt(l*l+h*h)/n);l/=u,h/=u;for(var c=!0,p=0;p0){for(var r=this.isInsidePolygon(t.pointList,u,c),n=e.holePolygonPointLists,a=!1,o=0,l=n.length;ot+o&&a>i+o||ae+o&&n>s+o||nt+c&&u>i+c&&u>n+c&&u>o+c||ue+c&&h>s+c&&h>r+c&&h>a+c||ht+h&&l>i+h&&l>n+h||le+h&&o>s+h&&o>r+h||os||c+u=h)return!0;if(n){var p=i;i=this.normalizeRadian(r),r=this.normalizeRadian(p)}else i=this.normalizeRadian(i),r=this.normalizeRadian(r);i>r&&(r+=h);var d=Math.atan2(l,o);return d<0&&(d+=h),d>=i&&d<=r||d+h>=i&&d+h<=r}isInsideBrokenLine(e,t,s,i){for(var r=Math.max(t,10),n=0,a=e.length-1;ns*s}isInsideRect(e,t,s,i,r,n){return r>=e&&r<=e+s&&n>=t&&n<=t+i}isInsideCircle(e,t,s,i,r){return(i-e)*(i-e)+(r-t)*(r-t)t&&n>i||nr?it&&h>i&&h>n&&h>o||h1&&this.swapExtrema(),f=u.cubicAt(t,i,n,o,p[0]),g>1&&(m=u.cubicAt(t,i,n,o,p[1]))),2==g?St&&o>i&&o>n||o=0&&c<=1){var p=0,d=l.quadraticAt(t,i,n,c);for(let i=0;ia||(h[i]a?0:ns||o<-s)return 0;let u=Math.sqrt(s*s-o*o);if(l[0]=-u,l[1]=u,Math.abs(i-r)>=h){i=0,r=h;var c=n?1:-1;return a>=l[0]+e&&a<=l[1]+e?c:0}if(n){let e=i;i=this.normalizeRadian(r),r=this.normalizeRadian(e)}else i=this.normalizeRadian(i),r=this.normalizeRadian(r);i>r&&(r+=h);var p=0;for(let t=0;t<2;t++){var d=l[t];if(d+e>a){let e=Math.atan2(o,d),t=n?1:-1;e<0&&(e=h+e),(e>=i&&e<=r||e+h>=i&&e+h<=r)&&(e>Math.PI/2&&e<1.5*Math.PI&&(t=-t),p+=t)}}return p}isInsidePath(e,t,s,i,r){for(var n=0,a=0,o=0,l=0,h=0,u=!0,c=!0,p="stroke"===(s=s||"fill")||"both"===s,d="fill"===s||"both"===s,f=0;f0&&(d&&(n+=this.windingLine(a,o,l,h,i,r)),0!==n))return!0;l=y[y.length-2],h=y[y.length-1],u=!1,c&&"A"!==m.command&&(c=!1,a=l,o=h)}switch(m.command){case"M":a=y[0],o=y[1];break;case"L":if(p&&this.isInsideLine(a,o,y[0],y[1],t,i,r))return!0;d&&(n+=this.windingLine(a,o,y[0],y[1],i,r)),a=y[0],o=y[1];break;case"C":if(p&&this.isInsideCubicStroke(a,o,y[0],y[1],y[2],y[3],y[4],y[5],t,i,r))return!0;d&&(n+=this.windingCubic(a,o,y[0],y[1],y[2],y[3],y[4],y[5],i,r)),a=y[4],o=y[5];break;case"Q":if(p&&this.isInsideQuadraticStroke(a,o,y[0],y[1],y[2],y[3],t,i,r))return!0;d&&(n+=this.windingQuadratic(a,o,y[0],y[1],y[2],y[3],i,r)),a=y[2],o=y[3];break;case"A":var g=y[0],v=y[1],S=y[2],b=y[3],x=y[4],_=y[5],C=Math.cos(x)*S+g,w=Math.sin(x)*b+v;c?(c=!1,l=C,h=w):n+=this.windingLine(a,o,C,w);var M=(i-g)*b/S+g;if(p&&this.isInsideArcStroke(g,v,b,x,x+_,1-y[7],t,M,r))return!0;d&&(n+=this.windingArc(g,v,b,x,x+_,1-y[7],M,r)),a=Math.cos(x+_)*S+g,o=Math.sin(x+_)*b+v;break;case"z":if(p&&this.isInsideLine(a,o,l,h,t,i,r))return!0;u=!0}}return d&&(n+=this.windingLine(a,o,l,h,i,r)),0!==n}getTextWidth(e,t){var s=e+":"+t;if(this._textWidthCache[s])return this._textWidthCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var i=0,r=0,n=(e=(e+"").split("\n")).length;rthis.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),i}getTextHeight(e,t){var s=e+":"+t;if(this._textHeightCache[s])return this._textHeightCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var i=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[s]=i,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),i}},Wn.Util_color=new wn,Wn.Util_computeBoundingBox=new /* Copyright© 2000 - 2022 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.*/ class{constructor(){3===arguments.length&&this.computeBoundingBox(arguments),this.CLASS_NAME="SuperMap.LevelRenderer.Tool.ComputeBoundingBox"}computeBoundingBox(e,t,s){if(0!==e.length){for(var i=e[0][0],r=e[0][0],n=e[0][1],a=e[0][1],o=1;or&&(r=l[0]),l[1]a&&(a=l[1])}t[0]=i,t[1]=n,s[0]=r,s[1]=a}}cubeBezier(e,t,s,i,r,n){var a=new qn,o=[];a.cubicExtrema(e[0],t[0],s[0],i[0],o);for(let r=0;rr&&!n?r+=2*Math.PI:ii&&(c[0]=Math.cos(d)*s+e,c[1]=Math.sin(d)*s+t,l.min(a,c,a),l.max(o,c,o))}},Wn.Util_curve=new qn,Wn.Util_env=new /* Copyright© 2000 - 2022 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.*/ class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Env";var e,t,s,i,r,n,a,o,l,h,u,c,p,d,f,m,y,g,v,S,b,x=this;return e=navigator.userAgent,t=x.os={},s=x.browser={},i=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),r=e.match(/(Android);?[\s\/]+([\d.]+)?/),n=e.match(/(iPad).*OS\s([\d_]+)/),a=e.match(/(iPod)(.*OS\s([\d_]+))?/),o=!n&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),u=e.match(/Kindle\/([\d.]+)/),c=e.match(/Silk\/([\d._]+)/),p=e.match(/(BlackBerry).*Version\/([\d.]+)/),d=e.match(/(BB10).*Version\/([\d.]+)/),f=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),m=e.match(/PlayBook/),y=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),v=e.match(/MSIE ([\d.]+)/),S=i&&e.match(/Mobile\//)&&!y,b=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!y,(s.webkit=!!i)&&(s.version=i[1]),r&&(t.android=!0,t.version=r[2]),o&&!a&&(t.ios=t.iphone=!0,t.version=o[2].replace(/_/g,".")),n&&(t.ios=t.ipad=!0,t.version=n[2].replace(/_/g,".")),a&&(t.ios=t.ipod=!0,t.version=a[3]?a[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),p&&(t.blackberry=!0,t.version=p[2]),d&&(t.bb10=!0,t.version=d[2]),f&&(t.rimtabletos=!0,t.version=f[2]),m&&(s.playbook=!0),u&&(t.kindle=!0,t.version=u[1]),c&&(s.silk=!0,s.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(s.silk=!0),y&&(s.chrome=!0,s.version=y[1]),g&&(s.firefox=!0,s.version=g[1]),v&&(s.ie=!0,s.version=v[1]),S&&(e.match(/Safari/)||t.ios)&&(s.safari=!0),b&&(s.webview=!0),v&&(s.ie=!0,s.version=v[1]),t.tablet=!!(n||m||r&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||v&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(r||o||l||p||d||y&&e.match(/Android/)||y&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||v&&e.match(/Touch/))),{browser:s,os:t,canvasSupported:!!document.createElement("canvas").getContext}}destory(){return!0}},Wn.Util_event=new /* Copyright© 2000 - 2022 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.*/ class{constructor(){this.stop="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Event"}getX(e){return void 0!==e.zrenderX&&e.zrenderX||void 0!==e.offsetX&&e.offsetX||void 0!==e.layerX&&e.layerX||void 0!==e.clientX&&e.clientX}getY(e){return void 0!==e.zrenderY&&e.zrenderY||void 0!==e.offsetY&&e.offsetY||void 0!==e.layerY&&e.layerY||void 0!==e.clientY&&e.clientY}getDelta(e){return void 0!==e.zrenderDelta&&e.zrenderDelta||void 0!==e.wheelDelta&&e.wheelDelta||void 0!==e.detail&&-e.detail}},Wn.Util_http=new /* Copyright© 2000 - 2022 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.*/ class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Http"}get(e,t,s){if("object"==typeof e){var i=e;e=i.url,t=i.onsuccess,s=i.onerror}var r=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status>=200&&r.status<300||304===r.status?t&&t(r.responseText):s&&s(),r.onreadystatechange=new Function,r=null)},r.send(null)}},Wn.Util_log=new /* Copyright© 2000 - 2022 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.*/ class{constructor(){return this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Log",function(){if(0!=+Hn.debugMode)if(1==+Hn.debugMode)for(let e in arguments)throw new Error(arguments[e]);else if(+Hn.debugMode>1)for(let e in arguments)console.log(arguments[e])}}destory(){return!0}},Wn.Util_math=new /* Copyright© 2000 - 2022 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.*/ class{constructor(){this._radians=window.Math.PI/180,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Math"}sin(e,t){return window.Math.sin(t?e*this._radians:e)}cos(e,t){return window.Math.cos(t?e*this._radians:e)}degreeToRadian(e){return e*this._radians}radianToDegree(e){return e/this._radians}},Wn.Util_matrix=new /* Copyright© 2000 - 2022 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.*/ class{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Matrix"}create(){var e=new(0,this.ArrayCtor)(6);return this.identity(e),e}identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}copy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}mul(e,t,s){return e[0]=t[0]*s[0]+t[2]*s[1],e[1]=t[1]*s[0]+t[3]*s[1],e[2]=t[0]*s[2]+t[2]*s[3],e[3]=t[1]*s[2]+t[3]*s[3],e[4]=t[0]*s[4]+t[2]*s[5]+t[4],e[5]=t[1]*s[4]+t[3]*s[5]+t[5],e}translate(e,t,s){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+s[0],e[5]=t[5]+s[1],e}rotate(e,t,s){var i=t[0],r=t[2],n=t[4],a=t[1],o=t[3],l=t[5],h=Math.sin(s),u=Math.cos(s);return e[0]=i*u+a*h,e[1]=-i*h+a*u,e[2]=r*u+o*h,e[3]=-r*h+u*o,e[4]=u*n+h*l,e[5]=u*l-h*n,e}scale(e,t,s){var i=s[0],r=s[1];return e[0]=t[0]*i,e[1]=t[1]*r,e[2]=t[2]*i,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*r,e}invert(e,t){var s=t[0],i=t[2],r=t[4],n=t[1],a=t[3],o=t[5],l=s*a-n*i;return l?(l=1/l,e[0]=a*l,e[1]=-n*l,e[2]=-i*l,e[3]=s*l,e[4]=(i*o-a*r)*l,e[5]=(n*r-s*o)*l,e):null}mulVector(e,t,s){var i=t[0],r=t[2],n=t[4],a=t[1],o=t[3],l=t[5];return e[0]=s[0]*i+s[1]*r+n,e[1]=s[0]*a+s[1]*o+l,e}},Wn.Util=new Cn,Wn.Util_vector=new Jn; /* Copyright© 2000 - 2022 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.*/ class Yn{constructor(){var e;this.position=[0,0],this.rotation=[0,0,0],this.scale=[1,1,0,0],this.needLocalTransform=!1,this.needTransform=!1,this.CLASS_NAME="SuperMap.LevelRenderer.Transformable",this.lookAt=(e=Wn.Util_vector.create(),function(t){this.transform||(this.transform=Wn.Util_matrix.create());var s=this.transform;function i(e){return e>-5e-5&&e<5e-5}Wn.Util_vector.sub(e,t,this.position),i(e[0])&&i(e[1])||(Wn.Util_vector.normalize(e,e),s[2]=e[0]*this.scale[1],s[3]=e[1]*this.scale[1],s[0]=e[1]*this.scale[0],s[1]=-e[0]*this.scale[0],s[4]=this.position[0],s[5]=this.position[1],this.decomposeTransform())})}destroy(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}updateNeedTransform(){function e(e){return e>5e-5||e<-5e-5}this.needLocalTransform=e(this.rotation[0])||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)}updateTransform(){if(this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform,this.needTransform){var e=[0,0],t=this.transform||Wn.Util_matrix.create();if(Wn.Util_matrix.identity(t),this.needLocalTransform){if(s(this.scale[0])||s(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;let i=s(e[0])||s(e[1]);i&&Wn.Util_matrix.translate(t,t,e),Wn.Util_matrix.scale(t,t,this.scale),i&&(e[0]=-e[0],e[1]=-e[1],Wn.Util_matrix.translate(t,t,e))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){e[0]=-this.rotation[1]||0,e[1]=-this.rotation[2]||0;let i=s(e[0])||s(e[1]);i&&Wn.Util_matrix.translate(t,t,e),Wn.Util_matrix.rotate(t,t,this.rotation[0]),i&&(e[0]=-e[0],e[1]=-e[1],Wn.Util_matrix.translate(t,t,e))}}else 0!=+this.rotation&&Wn.Util_matrix.rotate(t,t,this.rotation);(s(this.position[0])||s(this.position[1]))&&Wn.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?Wn.Util_matrix.mul(this.transform,this.parent.transform,this.transform):Wn.Util_matrix.copy(this.transform,this.parent.transform))}function s(e){return e>5e-5||e<-5e-5}}setTransform(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}decomposeTransform(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],s=this.position,i=this.scale,r=this.rotation;a(t-1)&&(t=Math.sqrt(t));var n=e[2]*e[2]+e[3]*e[3];a(n-1)&&(n=Math.sqrt(n)),s[0]=e[4],s[1]=e[5],i[0]=t,i[1]=n,i[2]=i[3]=0,r[0]=Math.atan2(-e[1]/n,e[0]/t),r[1]=r[2]=0}function a(e){return e>5e-5||e<-5e-5}}} /* Copyright© 2000 - 2022 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.*/ class Qn extends(J(Vn,Yn)){constructor(e){var t;super(e),e=e||{},this.id=null,this.style={},this.highlightStyle=null,this.parent=null,this.__dirty=!0,this.__clipShapes=[],this.invisible=!1,this.ignore=!1,this.zlevel=0,this.draggable=!1,this.clickable=!1,this.hoverable=!0,this.z=0,this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,ee.extend(this,e),this.id=this.id||ee.createUniqueID("smShape_"),this.CLASS_NAME="SuperMap.LevelRenderer.Shape",this.getTansform=(t=[],function(e,s){var i=[e,s];return this.needTransform&&this.transform&&(Wn.Util_matrix.invert(t,this.transform),Wn.Util_matrix.mulVector(i,t,[e,s,1]),e==i[0]&&s==i[1]&&this.updateNeedTransform()),i})}destroy(){this.id=null,this.style=null,this.highlightStyle=null,this.parent=null,this.__dirty=null,this.__clipShapes=null,this.invisible=null,this.ignore=null,this.zlevel=null,this.draggable=null,this.clickable=null,this.hoverable=null,this.z=null,this.refOriginalPosition=null,this.refDataID=null,this.refDataHoverGroup=null,this.isHoverByRefDataID=null,this.dataInfo=null,super.destroy()}brush(e,t){var s=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,s),s.brushType){case"both":this.setCtxGlobalAlpha(e,"fill",s),e.fill(),s.lineWidth>0&&(this.setCtxGlobalAlpha(e,"stroke",s),e.stroke()),this.setCtxGlobalAlpha(e,"reset",s);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",s),s.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",s);break;default:this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)}this.drawText(e,s,this.style),this.afterBrush(e)}beforeBrush(e,t){var s=this.style;return this.brushTypeOnly&&(s.brushType=this.brushTypeOnly),t&&(s=this.getHighlightStyle(s,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(s.strokeColor=s.strokeColor||s.color),e.save(),this.doClip(e),this.setContext(e,s),this.setTransform(e),s}afterBrush(e){e.restore()}setContext(e,t){for(var s=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],i=0,r=s.length;i=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height&&Wn.Util_area.isInside(this,this.style,e,t)}drawText(e,t,s){if(void 0!==t.text&&!1!==t.text){var i=t.textColor||t.color||t.strokeColor;e.fillStyle=i;var r,n,a,o,l=10,h=t.textPosition||this.textPosition||"top",u=[];switch(u=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],h){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var c=(s||t).__rect||this.getRect(s||t);switch(h){case"inside":a=c.x+c.width/2,o=c.y+c.height/2,r="center",n="middle","stroke"!=t.brushType&&i==t.color&&(e.fillStyle="#fff");break;case"left":a=c.x-l,o=c.y+c.height/2,r="end",n="middle";break;case"right":a=c.x+c.width+l,o=c.y+c.height/2,r="start",n="middle";break;case"top":a=c.x+c.width/2,o=c.y-l,r="center",n="bottom";break;case"bottom":a=c.x+c.width/2,o=c.y+c.height+l,r="center",n="top"}}break;case"start":case"end":var p=0,d=0,f=0,m=0;if(void 0!==t.pointList){var y=t.pointList;if(y.length<2)return;var g=y.length;switch(h){case"start":p=y[0][0]+u[0],d=y[1][0]+u[0],f=y[0][1]+u[1],m=y[1][1]+u[1];break;case"end":p=y[g-2][0]+u[0],d=y[g-1][0]+u[0],f=y[g-2][1]+u[1],m=y[g-1][1]+u[1]}}else p=t.xStart+u[0]||0,d=t.xEnd+u[0]||0,f=t.yStart+u[1]||0,m=t.yEnd+u[1]||0;switch(h){case"start":r=pi&&(i=l[0]),l[1]r&&(r=l[1]))}return e.__rect={x:t,y:s,width:i-t,height:r-s},e.__rect}getRectNoRotation(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition,i=Wn.Util_area.getTextHeight("ZH",e.textFont),r=Wn.Util_area.getTextWidth(e.text,e.textFont),n=Wn.Util_area.getTextHeight(e.text,e.textFont),a=e.x+s[0];"end"==e.textAlign||"right"==e.textAlign?a-=r:"center"==e.textAlign&&(a-=r/2),t="top"==e.textBaseline?e.y+s[1]:"bottom"==e.textBaseline?e.y+s[1]-n:e.y+s[1]-n/2;var o,l=!1;if(e.maxWidth){var h=parseInt(e.maxWidth);h-1&&(r+=!0===l?i/3*(r/o):i/3));return{x:a,y:t,width:r,height:n}}getTextBackground(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var i=this.getRectNoRotation(e),r=e.x+s[0],n=e.y+s[1],a=[];if(e.textRotation&&0!==e.textRotation){let t=e.textRotation,s=this.getRotatedLocation(i.x,i.y,r,n,t),o=this.getRotatedLocation(i.x+i.width,i.y,r,n,t),l=this.getRotatedLocation(i.x+i.width,i.y+i.height,r,n,t),h=this.getRotatedLocation(i.x,i.y+i.height,r,n,t);a.push(s),a.push(o),a.push(l),a.push(h)}else{let e=[i.x,i.y],t=[i.x+i.width,i.y],s=[i.x+i.width,i.y+i.height],r=[i.x,i.y+i.height];a.push(e),a.push(t),a.push(s),a.push(r)}return e.__textBackground=a,e.__textBackground}getRotatedLocation(e,t,s,i,r){var n,a,o=new Array;return t=-t,i=-i,r=-r,n=(e-s)*Math.cos(r/180*Math.PI)-(t-i)*Math.sin(r/180*Math.PI)+s,a=(e-s)*Math.sin(r/180*Math.PI)+(t-i)*Math.cos(r/180*Math.PI)+i,o[0]=n,o[1]=-a,o}} /* Copyright© 2000 - 2022 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.*/ class Zn extends Qn{constructor(e){super(e),this.type="smiccircle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicCircle"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,i=t.x+s[0],r=t.y+s[1];return e.moveTo(i+t.r,r),e.arc(i,r,t.r,0,2*Math.PI,!0),!0}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition,i=e.x+s[0],r=e.y+s[1],n=e.r;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(i-n-t/2),y:Math.round(r-n-t/2),width:2*n+t,height:2*n+t},e.__rect}} /* Copyright© 2000 - 2022 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.*/ class $n extends Qn{constructor(e){super(e),this.type="smicpolygon",this.holePolygonPointLists=null,this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPolygon"}destroy(){this.type=null,this.holePolygonPointLists=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.style;t&&(s=this.getHighlightStyle(s,this.highlightStyle||{})),e.save(),this.setContext(e,s),this.setTransform(e);var i=!1;"fill"!=s.brushType&&"both"!=s.brushType&&void 0!==s.brushType||(e.beginPath(),"dashed"==s.lineType||"dotted"==s.lineType||"dot"==s.lineType||"dash"==s.lineType||"dashdot"==s.lineType||"longdash"==s.lineType||"longdashdot"==s.lineType?this.buildPath(e,{lineType:"solid",lineWidth:s.lineWidth,pointList:s.pointList}):(this.buildPath(e,s),i=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)),s.lineWidth>0&&("stroke"==s.brushType||"both"==s.brushType)&&(i||(e.beginPath(),this.buildPath(e,s)),this.setCtxGlobalAlpha(e,"stroke",s),e.stroke(),this.setCtxGlobalAlpha(e,"reset",s)),this.drawText(e,s,this.style);var r=ee.cloneObject(s);if(r.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var n=this.holePolygonPointLists,a=n.length,o=0;o0&&("stroke"==r.brushType||"both"==r.brushType)?(i||(e.beginPath(),this.buildPath(e,r)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",r),e.stroke(),this.setCtxGlobalAlpha(e,"reset",r)):e.globalCompositeOperation="source-over"}e.restore()}buildPath(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,i=t.pointList;if(!(i.length<2))if(t.smooth&&"spline"!==t.smooth){var r,n,a,o=Wn.SUtil_smoothBezier(i,t.smooth,!0,t.smoothConstraint,s);e.moveTo(i[0][0]+s[0],i[0][1]+s[1]);for(var l=i.length,h=0;hn&&(n=l[h][0]+s[0]),l[h][1]+s[1]o&&(o=l[h][1]+s[1]);return i="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(r-i/2),y:Math.round(a-i/2),width:n-r+i,height:o-a+i},e.__rect}} /* Copyright© 2000 - 2022 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.*/ class ea extends Qn{constructor(e){super(e),this.brushTypeOnly="stroke",this.textPosition="end",this.type="smicbroken-line",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicBrokenLine"}destroy(){this.brushTypeOnly=null,this.textPosition=null,this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,i=t.pointList;if(!(i.length<2)){var r=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&"spline"!==t.smooth){var n,a,o,l=Wn.SUtil_smoothBezier(i,t.smooth,!1,t.smoothConstraint,s);e.moveTo(i[0][0]+s[0],i[0][1]+s[1]);for(let t=0;tu&&(s*=u/(a=s+i),i*=u/a),r+n>u&&(r*=u/(a=r+n),n*=u/a),i+r>c&&(i*=c/(a=i+r),r*=c/a),s+n>c&&(s*=c/(a=s+n),n*=c/a),e.moveTo(l+s,h),e.lineTo(l+u-i,h),0!==i&&e.quadraticCurveTo(l+u,h,l+u,h+i),e.lineTo(l+u,h+c-r),0!==r&&e.quadraticCurveTo(l+u,h+c,l+u-r,h+c),e.lineTo(l+n,h+c),0!==n&&e.quadraticCurveTo(l,h+c,l,h+c-n),e.lineTo(l,h+s),0!==s&&e.quadraticCurveTo(l,h,l+s,h)}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+s[0],t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1])),e.closePath()}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+s[0]-t/2),y:Math.round(e.y+s[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}} /* Copyright© 2000 - 2022 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.*/ class ia extends Qn{constructor(e){super(e),this.type="smicsector",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicSector"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,i=t.x+s[0],r=t.y+s[1],n=t.r0||0,a=t.r,o=t.startAngle,l=t.endAngle,h=t.clockWise||!1;o=Wn.Util_math.degreeToRadian(o),l=Wn.Util_math.degreeToRadian(l),h||(o=-o,l=-l);var u=Wn.Util_math.cos(o),c=Wn.Util_math.sin(o);e.moveTo(u*n+i,c*n+r),e.lineTo(u*a+i,c*a+r),e.arc(i,r,a,o,l,!h),e.lineTo(Wn.Util_math.cos(l)*n+i,Wn.Util_math.sin(l)*n+r),0!==n&&e.arc(i,r,n,l,o,h),e.closePath()}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition,s=Wn.Util_vector.create(),i=Wn.Util_vector.create(),r=Wn.Util_vector.create(),n=Wn.Util_vector.create(),a=e.x+t[0],o=e.y+t[1],l=e.r0||0,h=e.r,u=Wn.Util_math.degreeToRadian(e.startAngle),c=Wn.Util_math.degreeToRadian(e.endAngle),p=e.clockWise;return p||(u=-u,c=-c),l>1?Wn.Util_computeBoundingBox.arc(a,o,l,u,c,!p,s,r):(s[0]=r[0]=a,s[1]=r[1]=o),Wn.Util_computeBoundingBox.arc(a,o,h,u,c,!p,i,n),Wn.Util_vector.min(s,s,i),Wn.Util_vector.max(r,r,n),e.__rect={x:s[0],y:s[1],width:r[0]-s[0],height:r[1]-s[1]},e.__rect}} /* Copyright© 2000 - 2022 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.*/ class ra{constructor(e){this.shapeParameters=e,this.CLASS_NAME="SuperMap.Feature.ShapeFactory"}destroy(){this.shapeParameters=null}createShape(e){if(e&&(this.shapeParameters=e),!this.shapeParameters)return null;var t=this.shapeParameters;if(t instanceof Dn){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e=ee.copyAttributesWithClip(e,t.style,["x","y"]);let s=new Xn;return s.style=ra.transformStyle(e),s.highlightStyle=ra.transformStyle(t.highlightStyle),ee.copyAttributesWithClip(s,t,["x","y","style","highlightStyle"]),s}if(t instanceof Rn){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=ee.copyAttributesWithClip(e,t.style,["pointList"]);let s=new ea;return s.style=ra.transformStyle(e),s.highlightStyle=ra.transformStyle(t.highlightStyle),ee.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof kn){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=ee.copyAttributesWithClip(e,t.style,["pointList"]);let s=new $n;return s.style=ra.transformStyle(e),s.highlightStyle=ra.transformStyle(t.highlightStyle),ee.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof Bn){if(!t.x&&!t.y&!t.width&!t.height)return null;let e=new Object;e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e=ee.copyAttributesWithClip(e,t.style,["x","y","width","height"]);let s=new sa;return s.style=ra.transformStyle(e),s.highlightStyle=ra.transformStyle(t.highlightStyle),ee.copyAttributesWithClip(s,t,["x","y","width","height","style","highlightStyle"]),s}if(t instanceof Gn){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e.startAngle=t.startAngle,e.endAngle=t.endAngle,t.r0&&(e.r0=t.r0),t.clockWise&&(e.clockWise=t.clockWise),e=ee.copyAttributesWithClip(e,t.style,["x","y","r","startAngle","endAngle","r0","endAngle"]);let s=new ia;return s.style=ra.transformStyle(e),s.highlightStyle=ra.transformStyle(t.highlightStyle),ee.copyAttributesWithClip(s,t,["x","y","r","startAngle","endAngle","r0","endAngle","style","highlightStyle"]),s}if(t instanceof Un){let e=new Object;e.x=t.x,e.y=t.y,e.text=t.text,e=ee.copyAttributesWithClip(e,t.style,["x","y","text"]);let s=new Kn;return s.style=ra.transformStyle(e),s.highlightStyle=ra.transformStyle(t.highlightStyle),ee.copyAttributesWithClip(s,t,["x","y","text","style","highlightStyle"]),s}if(t instanceof jn){let e=new Object;e.x=t.x,e.y=t.y,t.image&&(e.image=t.image),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sx&&(e.sx=t.sx),t.sy&&(e.sy=t.sy),t.sWidth&&(e.sWidth=t.sWidth),t.sHeight&&(e.sHeight=t.sHeight),e=ee.copyAttributesWithClip(e,t.style,["x","y","image","width","height","sx","sy","sWidth","sHeight"]);let s=new ta;return s.style=ra.transformStyle(e),s.highlightStyle=ra.transformStyle(t.highlightStyle),ee.copyAttributesWithClip(s,t,["x","y","image","width","height","style","highlightStyle"]),s}if(t instanceof zn){let e=new Object;e.x=t.x,e.r=t.r,e.y=t.y,e=ee.copyAttributesWithClip(e,t.style,["x","y","r"]);let s=new Zn;return s.style=ra.transformStyle(e),s.highlightStyle=ra.transformStyle(t.highlightStyle),ee.copyAttributesWithClip(s,t,["x","y","r","style","highlightStyle","lineWidth","text","textPosition"]),s}return null}static transformStyle(e){var t={},s=["normal","normal","normal","12","arial,sans-serif"],i=[!0,!1];for(var r in e)switch(r){case"fill":i[0]=e[r];break;case"fillColor":t.color=e[r];break;case"stroke":i[1]=e[r];break;case"strokeWidth":t.lineWidth=e[r];break;case"strokeLinecap":t.lineCap=e[r];break;case"strokeLineJoin":t.lineJoin=e[r];break;case"strokeDashstyle":t.lineType=e[r];break;case"pointRadius":t.r=e[r];break;case"label":t.text=e[r];break;case"labelRect":t.labelRect=e[r];break;case"fontColor":t.textColor=e[r];break;case"fontStyle":s[0]=e[r];break;case"fontVariant":s[1]=e[r];break;case"fontWeight":s[2]=e[r];break;case"fontSize":var n="";e[r]&&e[r].toString().indexOf("px")<0&&(n="px"),s[3]=e[r]+n;break;case"fontFamily":s[4]=e[r];break;case"fontOpacity":t.opacity=e[r];break;case"labelPosition":t.textPosition=e[r];break;case"labelAlign":t.textAlign=e[r];break;case"labelBaseline":t.textBaseline=e[r];break;case"labelRotation":t.textRotation=e[r];break;default:t[r]=e[r]}return t.textFont=s.join(" "),!0===i[0]&&!1===i[1]?t.brushType="fill":!1===i[0]&&!0===i[1]?t.brushType="stroke":!0===i[0]&&!0===i[1]?t.brushType="both":t.brushType="fill",null==t.lineWidth&&(t.lineWidth=1),t}static Background(e,t,s){var i=s||{},r=new Bn(t[0],t[3],Math.abs(t[2]-t[0]),Math.abs(t[3]-t[1]));return r.style={fillColor:"#f3f3f3"},i.backgroundStyle&&ee.copyAttributesWithClip(r.style,i.backgroundStyle),i.backgroundRadius&&(r.style.radius=i.backgroundRadius),r.clickable=!1,r.hoverable=!1,e.createShape(r)}static GraphAxis(e,t,s,i){var r=t,n=s||{},a=[],o=[],l=!!n.useXReferenceLine&&n.useXReferenceLine,h=n.axisYTick&&!isNaN(n.axisYTick)?n.axisYTick:0,u=[],c=[];if(0==h){if(c.push([r[0],r[3]-5]),c.push([r[0],r[1]]),n.axis3DParameter&&!isNaN(n.axis3DParameter)&&n.axis3DParameter>=15){let e=parseInt(n.axis3DParameter),t=[r[0]-e,r[1]+e];n.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([r[0],r[1]])}c.push([r[2]+5,r[1]])}else{var p=Math.abs(r[1]-r[3])/h,d=r[3];c.push([r[0],d-5]);for(var f=0;f=15){let e=parseInt(n.axis3DParameter),t=[r[0]-e,r[1]+e];n.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([r[0],r[1]])}c.push([r[2]+5,r[1]])}if(n.axisUseArrow){var y=[[r[2]+5,r[1]+4],[r[2]+13,r[1]],[r[2]+5,r[1]-4]],g=[[r[0]-4,r[3]-5],[r[0],r[3]-13],[r[0]+4,r[3]-5]],v=new kn(y);v.style={fillColor:"#008acd"},ee.copyAttributesWithClip(v.style,n.axisStyle),o.push(e.createShape(v));var S=new kn(g);if(S.style={fillColor:"#008acd"},ee.copyAttributesWithClip(S.style,n.axisStyle),o.push(e.createShape(S)),n.axis3DParameter&&!isNaN(n.axis3DParameter)&&n.axis3DParameter>=15){var b=new kn(u);b.style={fillColor:"#008acd"},ee.copyAttributesWithClip(b.style,n.axisStyle),o.push(e.createShape(b))}}var x=new Rn(c);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},n.axisStyle&&ee.copyAttributesWithClip(x.style,n.axisStyle),x.clickable=!1,x.hoverable=!1;var _=[e.createShape(x)],C=[];if(n.axisYLabels&&n.axisYLabels.length&&n.axisYLabels.length>0){var w=n.axisYLabels;let t=w.length;var M=[0,0];if(n.axisYLabelsOffset&&n.axisYLabelsOffset.length&&(M=n.axisYLabelsOffset),1==t){let t=new Un(r[0]-5+M[0],r[3]+M[1],w[0]);t.style={labelAlign:"right"},n.axisYLabelsStyle&&ee.copyAttributesWithClip(t.style,n.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,C.push(e.createShape(t))}else for(var A=r[3],T=Math.abs(r[1]-r[3])/(t-1),E=0;E0){let t=n.axisXLabels,s=t.length,a=[0,0];if(n.axisXLabelsOffset&&n.axisXLabelsOffset.length&&(a=n.axisXLabelsOffset),i&&i.xPositions&&i.xPositions.length&&i.xPositions.length==s){let o=i.xPositions;for(let i=0;i=0&&s[r]&&ee.copyAttributesWithClip(a,s[r]),i&&i.length&&void 0!==n)for(var o=i,l=o.length,h=parseFloat(n),u=0;u=h[2]||h[1]<=h[3])&&(this.DVBOrigonPoint=[h[0],h[3]],this.DVBWidth=Math.abs(h[2]-h[0]),this.DVBHeight=Math.abs(h[1]-h[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-a[0],this.DVBOrigonPoint[1]-a[1]],!0)}resetLocation(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var s=this.width,i=this.height,r=this.location;return this.chartBounds=new re(r[0]-s/2,r[1]+i/2,r[0]+s/2,r[1]-i/2),this.resetLinearGradient(),r}resetLinearGradient(){}shapesConvertToRelativeCoordinate(){for(var e=this.shapes,t=this.location,s=0,i=e.length;s=0?i.push(parseFloat(r[a].toString()).toFixed(s)):i.push(parseFloat(r[a].toString()))}catch(e){throw new Error("not a number")}return i.length===t.length&&i}; /* Copyright© 2000 - 2022 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.*/ class oa extends aa{constructor(e,t,s,i,r,n){super(e,t,s,i,r,n),this.setting=null,i&&i.codomain&&(this.setting=i,this.DVBCodomain=this.setting.codomain),this.CLASS_NAME="SuperMap.Feature.Theme.RankSymbol"}destroy(){this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;e.XOffset&&(this.XOffset=e.XOffset),e.YOffset&&(this.YOffset=e.YOffset),this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var t=this.width,s=this.height,i=this.location;this.origonPoint=[i[0]-t/2,i[1]-s/2];var r=this.origonPoint;this.chartBox=[r[0],r[1]+s,r[0]+t,r[1]];var n=this.chartBox,a=this.DVBParameter;this.dataViewBox=[n[0]+a[0],n[1]-a[1],n[2]-a[2],n[3]+a[3]];var o=this.dataViewBox;return!(o[0]>=o[2]||o[1]<=o[3])&&(this.DVBOrigonPoint=[o[0],o[3]],this.DVBWidth=Math.abs(o[2]-o[0]),this.DVBHeight=Math.abs(o[1]-o[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-r[0],this.DVBOrigonPoint[1]-r[1]],!0)}} /* Copyright© 2000 - 2022 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.*/ class la extends na{constructor(e,t,s,i,r){if(super(e,t),e.geometry&&e.geometry instanceof Q){this.dataBounds=e.geometry.getBounds(),this.nodesClipPixel=2,this.isHoverAble=!0,this.isMultiHover=!0,this.isClickAble=!0,this.highlightStyle=null,this.shapeOptions={},this.style=s||{},this.CLASS_NAME="SuperMap.Feature.Theme.Vector",this.style=s||{},i&&ee.copyAttributesWithClip(this,i,["shapeOptions","dataBounds"]),r&&ee.copyAttributesWithClip(this.shapeOptions,r);var n=e.geometry;this.lonlat=this.dataBounds.getCenterLonLat(),this.location=this.getLocalXY(this.lonlat),n instanceof ce?this.lineToTF(n):n instanceof he?this.lineToTF(n):n instanceof oe||(n instanceof ae?this.multiPointToTF(n):n instanceof pe?this.multiLineStringToTF(n):n instanceof de?this.multiPolygonToTF(n):n instanceof fe?this.polygonToTF(n):n instanceof ne||(n instanceof le?this.pointToTF(n):n instanceof me?this.rectangleToTF(n):n instanceof ue&&this.geoTextToTF(n)))}}destroy(){this.style=null,this.dataBounds=null,this.nodesClipPixel=null,this.isHoverAble=null,this.isMultiHover=null,this.isClickAble=null,this.highlightStyle=null,this.shapeOptions=null,super.destroy()}lineToTF(e){for(var t=e.components,s=[],i=[],r=this.location,n=[],a=this.nodesClipPixel,o=0;o0){var h=n[n.length-1];if(Math.abs(h[0]-i[0])<=a&&Math.abs(h[1]-i[1])<=a)continue}n.push(i)}if(n.length<2)return null;var u=new Object;(u=ee.copyAttributesWithClip(u,this.style,["pointList"])).pointList=n;var c=new ea({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=this.location,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ee.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}multiPointToTF(e){for(var t=e.components,s=[],i=[],r=this.location,n=[],a=this.nodesClipPixel,o=0;o0){var h=n[n.length-1];if(Math.abs(h[0]-i[0])<=a&&Math.abs(h[1]-i[1])<=a)continue}n.push(i);var u=new Object;u.r=6,(u=ee.copyAttributesWithClip(u,this.style)).x=i[0],u.y=i[1];var c=new Xn({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=r,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ee.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}}multiLineStringToTF(e){for(var t=e.components,s=0;s0){var p=n[n.length-1];if(Math.abs(p[0]-i[0])<=l&&Math.abs(p[1]-i[1])<=l)continue}n.push(i)}}else{a=[];for(var d=0;d0){var f=a[a.length-1];if(Math.abs(f[0]-i[0])<=l&&Math.abs(f[1]-i[1])<=l)continue}a.push(i)}}a.length<2||o.push(a)}if(!(n.length<2)){var m={};(m=ee.copyAttributesWithClip(m,this.style,["pointList"])).pointList=n;var y=new $n({style:m,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(y.highlightStyle=this.highlightStyle),y.refOriginalPosition=this.location,y.refDataID=this.data.id,y.isHoverByRefDataID=this.isMultiHover,o.length>0&&(y.holePolygonPointLists=o),this.shapeOptions&&ee.copyAttributesWithClip(y,this.shapeOptions),this.shapes.push(y)}}rectangleToTF(e){var t=this.location,s=new ie(e.x,e.y),i=this.layer.map.getResolution(),r=this.getLocalXY(s),n=new Object;n.r=6,(n=ee.copyAttributesWithClip(n,this.style)).x=r[0]-t[0],n.y=r[1]-t[1]-2*e.width/i,n.width=e.width/i,n.height=e.height/i;var a=new sa({style:n,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&&ee.copyAttributesWithClip(a,this.shapeOptions),this.shapes.push(a)}geoTextToTF(e){var t=this.location,s=this.getLocalXY(e),i=new Object;i.r=6,(i=ee.copyAttributesWithClip(i,this.style,["x","y","text"])).x=s[0]-t[0],i.y=s[1]-t[1],i.text=e.text;var r=new Kn({style:i,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(r.highlightStyle=this.highlightStyle),r.refOriginalPosition=t,r.refDataID=this.data.id,r.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ee.copyAttributesWithClip(r,this.shapeOptions),this.shapes.push(r)}updateAndAddShapes(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,s=0,i=this.shapes.length;s0}addRoot(e){e instanceof ha&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}delRoot(e){if(void 0===e){for(var t=0;t=0&&(this.delFromMap(r.id),this._roots.splice(n,1),r instanceof ha&&r.delChildrenFromStorage(this))}}addToMap(e){return e instanceof ha&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}get(e){return this._elements[e]}delFromMap(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof ha&&(t._storage=null)),this}dispose(){this._elements=null,this._roots=null,this._hoverElements=null}static shapeCompareFunc(e,t){return e.zlevel==t.zlevel?e.z==t.z?e.__renderidx-t.__renderidx:e.z-t.z:e.zlevel-t.zlevel}} /* Copyright© 2000 - 2022 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.*/ class ca{constructor(e,t){this.root=e,this.storage=t,this._domRoot=null,this._layers={},this._zlevelList=[],this._layerConfig={},this._bgDom=null,this.shapeToImage=null,ca.devicePixelRatio=Math.max(window.devicePixelRatio||1,1),this.CLASS_NAME="SuperMap.LevelRenderer.Painter",this.root.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var s=document.createElement("div");this._domRoot=s,s.style.position="relative",s.style.overflow="hidden",s.style.width=this._width+"px",s.style.height=this._height+"px",this.root.appendChild(s),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=ca.createDom(ee.createUniqueID("SuperMap.Theme_background_"),"div",this),s.appendChild(this._bgDom),this._bgDom.onselectstart=n,this._bgDom.style["-webkit-user-select"]="none",this._bgDom.style["user-select"]="none",this._bgDom.style["-webkit-touch-callout"]="none";var i=new pa(ee.createUniqueID("_highLightLayer_"),this);this._layers.hover=i,s.appendChild(i.dom),i.initContext(),i.dom.onselectstart=n,i.dom.style["-webkit-user-select"]="none",i.dom.style["user-select"]="none",i.dom.style["-webkit-touch-callout"]="none";var r=this;function n(){return!1}this.updatePainter=function(e,t){r.refreshShapes(e,t)}}destroy(){this.dispose(),this._zlevelList=null,this._layerConfig=null,this._bgDom=null,this.shapeToImage=null}render(e){return this.refresh(e,!0),this}refresh(e,t){var s=this.storage.getShapeList(!0);return this._paintList(s,t),"function"==typeof e&&e(),this}_paintList(e,t){var s,i,r;for(var n in void 0===t&&(t=!1),this._updateLayerStatus(e),this._layers)"hover"!==n&&(this._layers[n].unusedCount++,this._layers[n].updateTransform());for(var a=[],o=0,l=e.length;o0&&e>this._zlevelList[0]){for(r=0;re);r++);i=this._layers[this._zlevelList[r]]}this._zlevelList.splice(r+1,0,e),t=new pa(ee.createUniqueID("_levelLayer_"+e),this);var n=i?i.dom:this._bgDom;n.nextSibling?n.parentNode.insertBefore(t.dom,n.nextSibling):n.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new Cn).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}getLayers(){return this._layers}_updateLayerStatus(e){var t=this._layers,s={};for(let e in t)"hover"!==e&&(s[e]=t[e].elCount,t[e].elCount=0);for(let s=0;s0?1.1:1/1.1,s=this.painter.getLayers(),i=!1;for(var r in s)if("hover"!==r){var n=s[r],a=n.position;if(n.zoomable){n.__zoom=n.__zoom||1;var o=n.__zoom;o*=t,t=(o=Math.max(Math.min(n.maxZoom,o),n.minZoom))/n.__zoom,n.__zoom=o,a[0]-=(this._mouseX-a[0])*(t-1),a[1]-=(this._mouseY-a[1])*(t-1),n.scale[0]*=t,n.scale[1]*=t,n.dirty=!0,i=!0}}i&&this.painter.refresh(),this._dispatchAgency(this._lastHover,Hn.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=Wn.Util_event.getX(e),this._mouseY=Wn.Util_event.getY(e);var t=this._mouseX-this._lastX,s=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var i="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,s),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var r=this.painter.getLayers(),n=!1;for(var a in r)if("hover"!==a){var o=r[a];o.panable&&(i="move",o.position[0]+=t,o.position[1]+=s,n=!0,o.dirty=!0)}n&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?i="move":this._hasfound&&this._lastHover.clickable&&(i="pointer"),this.root.style.cursor=i,this._dispatchAgency(this._lastHover,Hn.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(Hn.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,Hn.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,Hn.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&&Wn.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment=0;r--){var n=s[r];if(void 0!==n.zlevel&&(e=this.painter.getLayer(n.zlevel,e),i[0]=this._mouseX,i[1]=this._mouseY,e.needTransform&&(Wn.Util_matrix.invert(t,e.transform),Wn.Util_vector.applyTransform(i,i,t))),this._findHover(n,i[0],i[1]))break}}_mobildFindFixed(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var s=0;!this._lastHover&&s=0&&this._clips.splice(t,1)}_update(){var e=(new Date).getTime(),t=e-this._time,s=this._clips,i=s.length,r=[],n=[];for(let t=0;t=0&&!(m[S]<=a);S--);S=Math.min(S,h-2)}else{for(S=M;Sa);S++);S=Math.min(S-1,h-2)}M=S,A=a;var o=m[S+1]-m[S];if(0!==o){if(b=(a-m[S])/o,n)if(_=y[S],x=y[0===S?S:S-1],C=y[S>h-2?h-1:S+1],w=y[S>h-3?h-1:S+2],c)ya._catmullRomInterpolateArray(x,_,C,w,b,b*b,b*b*b,i(e,l),d);else{let t;t=p?ya.rgba2String(T):ya._catmullRomInterpolate(x,_,C,w,b,b*b,b*b*b),s(e,l,t)}else if(c)ya._interpolateArray(y[S],y[S+1],b,i(e,l),d);else{let t;p?(ya._interpolateArray(y[S],y[S+1],b,T,1),t=ya.rgba2String(T)):t=ya._interpolateNumber(y[S],y[S+1],b),s(e,l,t)}for(S=0;S0){let e=n.SheetNames[0],s=Aa.utils.sheet_to_csv(n.Sheets[e]);t&&t.call(i,s)}}catch(e){s&&s.call(i,e)}},r.onerror=function(e){s&&s.call(i,e)},this.rABF&&r.readAsArrayBuffer(e.file)},processDataToGeoJson(e,t,s,i,r){let n=null;if("EXCEL"===e||"CSV"===e)n=this.processExcelDataToGeoJson(t),s&&s.call(r,n);else if("JSON"===e||"GEOJSON"===e){let e=t;"string"==typeof e&&(e=JSON.parse(e)),"ISERVER"===e.type?n=e.data.recordsets[0].features:"FeatureCollection"===e.type?n=e:i&&i.call(r,Ma.i18n("msg_dataInWrongGeoJSONFormat")),s&&s.call(r,n)}else i&&i.call(r,Ma.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson(e){let t=this.string2Csv(e),s=t.colTitles,i=-1,r=-1;for(let e=0,t=s.length;ee.json()).then(i=>{if(!1!==i.succeed)if(i.dataItemServices&&i.dataItemServices.length>0){let r;i.dataItemServices.forEach(i=>{if("RESTDATA"===i.serviceType&&"PUBLISHED"===i.serviceStatus)r=i;else{if("RESTMAP"!==i.serviceType||"PUBLISHED"!==i.serviceStatus)return void s.getDatafromContent(e,t);r=i}}),r&&s.getDatafromRest(r.serviceType,r.address,t)}else s.getDatafromContent(e,t);else s._fireFailedEvent(i)}).catch(e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromContent(e,t){let s={result:{}},i=this;e+="/content.json?pageSize=9999999¤tPage=1",Ue.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(e=>{if(!1!==e.succeed){if(e.type){if("JSON"===e.type||"GEOJSON"===e.type){if(e.content=JSON.parse(e.content.trim()),!e.content.features)return void console.log(Ma.i18n("msg_jsonResolveFiled"));let t=this._formatGeoJSON(e.content);s.result.features={type:e.content.type,features:t}}else if("EXCEL"===e.type||"CSV"===e.type){let t=this._excelData2Feature(e.content);s.result.features={type:"FeatureCollection",features:t}}t(s,"content")}}else i._fireFailedEvent(e)},this).catch(e=>{console.log(e),i._fireFailedEvent(e)})}getDatafromRest(e,t,s){let i=this,r=this.datasets.withCredentials;if("RESTDATA"===e){let e,n,a=`${t}/data/datasources`;Ue.get(a,null,{withCredentials:r}).then(e=>e.json()).then(o=>{e=o.datasourceNames[0],a=`${t}/data/datasources/${e}/datasets`,Ue.get(a,null,{withCredentials:r}).then(e=>e.json()).then(r=>(n=r.datasetNames[0],i.getDatafromRestData(`${t}/data`,[e+":"+n],s),[e+":"+n])).catch(function(e){i._fireFailedEvent(e)})}).catch(function(e){i._fireFailedEvent(e)})}else{let e,n,a,o=`${t}/maps`;Ue.get(o,null,{withCredentials:r}).then(e=>e.json()).then(l=>{e=l[0].name,a=l[0].path,o=o=`${t}/maps/${e}/layers`,Ue.get(o,null,{withCredentials:r}).then(e=>e.json()).then(e=>(n=e[0].subLayers.layers[0].caption,i.getDatafromRestMap(n,a,s),n)).catch(function(e){i._fireFailedEvent(e)})}).catch(function(e){i._fireFailedEvent(e)})}}getDatafromRestData(e,t,s){let i=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,e=>{s(e,"RESTDATA")},e=>{console.log(e),i._fireFailedEvent(e)})}getDatafromRestMap(e,t,s){let i=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,e=>{s(e,"RESTMAP")},e=>{console.log(e),i._fireFailedEvent(e)})}_getFeatureBySQL(e,t,s,i,r){let n,a,o,l={name:t.join().replace(":","@")};Object.assign(l,s),n=new ft(l),o=new Js({queryParameter:n,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(a=new qs(e,{eventListeners:{processCompleted:e=>{i&&i(e)},processFailed:e=>{r&&r(e)}}})).processAsync(o)}_queryFeatureBySQL(e,t,s,i,r,a,o,l,h,u){var c,p,d={name:t};Object.assign(d,s),c=new ft(d),i&&(c.fields=i);var f={queryParams:[c]};u&&(f.queryOption=n.ATTRIBUTE),l&&(f.startRecord=l),h&&(f.expectCount=h),r&&(f.prjCoordSys={epsgCode:r}),p=new Qi(f),this._queryBySQL(e,p,e=>{"processCompleted"===e.type?a(e):o(e)})}_queryBySQL(e,t,s,i){new Xi(e,{eventListeners:{scope:this,processCompleted:s,processFailed:s},format:this._processFormat(i)}).processAsync(t)}_processFormat(e){return e||t.GEOJSON}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,s=-1,i=-1;for(let e=0,r=t.length;e0&&e.forEach(function(e){e.xAxis&&t.xField.push({field:e.xAxis.field,name:e.xAxis.name}),e.yAxis&&t.yField.push({field:e.yAxis.field,name:e.yAxis.name})})}getDatasetInfo(e){this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new Ea(this.datasets),"iServer"===this.datasets.type?this.chartModel.getDatasetInfo(this._getDatasetInfoSuccess.bind(this)):"iPortal"===this.datasets.type&&this.chartModel.getDataInfoByIptl(this._getDataInfoSuccess.bind(this)),this.chartModel.events.on({getdatafailed:e=>{this.events.triggerEvent("getdatafailed",e)}}))}_getDatasetInfoSuccess(e){let t=this.datasets.url,s=t.indexOf("rest");if(s>0){let i=t.indexOf("/",s+5),r=t.substring(s+5,i),n=t.substring(0,s+4)+"/data";if("maps"===r){let r=t.indexOf("/",i+1),a=t.substring(i+1,r);n=t.substring(0,s+4)+"/maps/"+a,e.result.dataUrl=n,this._getLayerFeatures(e)}else"data"===r&&(e.result.dataUrl=n,this._getDataFeatures(e))}}_getDataInfoSuccess(e,t){let s=this;"RESTMAP"===t?s._getChartDatasFromLayer(e):s._getChartDatas(e)}_getDataFeatures(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}_getLayerFeatures(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}_getChartDatas(e){if(e){this.features=e.result.features;let t=this.features.features,s={};if(t.length){let e=t[0],i=[],r=[];for(let t in e.properties)i.push(t),r.push(this._getDataType(e.properties[t]));s={features:t,fieldCaptions:i,fieldTypes:r,fieldValues:[]};for(let e in r){let i=[];for(let r in t){let n=t[r],a=s.fieldCaptions[e],o=n.properties[a];i.push(o)}s.fieldValues.push(i)}this.createChart(s)}}}_getChartDatasFromLayer(e){if(e.result.recordsets){let t=e.result.recordsets[0],s=t.features.features;this.features=t.features;let i={};if(s.length){i={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]};for(let e in i.fieldCaptions){let t=[];for(let r in s){let n=s[r],a=i.fieldCaptions[e],o=n.properties[a];t.push(o)}i.fieldValues.push(t)}this.createChart(i)}}}_createChartOptions(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}changeType(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}updateData(e,t,s){this.updateChart=s,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}_updateDataSuccess(e){let t=this._createChartOptions(e);this.updateChart(t)}updateChartOptions(e,t){if(this.calculatedData){let s=this.grid,i=this._createChartSeries(this.calculatedData,e),r=[];for(let e in this.calculatedData.XData)r.push({value:this.calculatedData.XData[e].fieldsData});let n={type:"category",name:this.xField[0].name||"X",data:r,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},a={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},o={formatter:"{b0}: {c0}"},l="#404a59";return t&&(t.grid&&(s=t.grid),t.tooltip&&(o=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:s,series:i,xAxis:n,yAxis:a,tooltip:o}}}_createChartDatas(e){let t=0,s=[],i=e.fieldCaptions,r=this;i.forEach(function(e,s){r.xField[0]&&e===r.xField[0].field&&(t=s)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(r.yFieldName=r.yFieldName+","),r.yFieldName=r.yFieldName+e.name,i.forEach(function(t,i){t===e.field&&s.push(i)})});let n=this._getAttrData(e,t),a=[];if(s.length>0)s.forEach(function(t){let s=[];for(let i in e.fieldValues[t])s.push({value:e.fieldValues[t][i]});a.push(s)});else{let e=[],t=[],s=n.length;for(let i=0;i0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e{for(let e=0;e0;e--)this.content.removeChild(this.content.children[e-1]);const t=this.config[e];for(let e in t)this._createCityItem(e,t[e])}_createCityItem(e,t){const s=document.createElement("div"),i=document.createElement("div");i.setAttribute("class","component-citytabpag__py-key"),i.innerHTML=e,s.appendChild(i);const r=document.createElement("div");r.setAttribute("class","component-citytabpag__content");for(let e=0;e0&&this.appendTabs(e),this.rootContainer=t}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e=0;e--)this.content.removeChild(this.content.children[e])}setPageLink(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}_createPageLi(e){for(let t=0;t1;e--)this.link.removeChild(this.link.children[e])}_createLink(e){for(let t=0;t<4;t++){const s=document.createElement("li");s.setAttribute("class","disable");const i=document.createElement("span");s.appendChild(i),0===t?(i.id="first",i.setAttribute("class","supermapol-icons-first")):1===t?(i.id="prev",i.setAttribute("class","supermapol-icons-prev")):2===t?(i.id="next",i.setAttribute("class","supermapol-icons-next")):3===t&&(i.id="last",i.setAttribute("class","supermapol-icons-last")),e.appendChild(s)}}_changePageEvent(e){const t=e.target;if("disable"===t.parentElement.classList[0])return;let s;if(t.id)s=t.id;else{if(!Number(t.innerHTML))return;s=Number(t.innerHTML)}this._prePageNum(s),this.clearPageLink(),this._appendPageLink()}_changeDisableState(){this.link.children[0].setAttribute("class",""),this.link.children[1].setAttribute("class",""),this.link.children[this.link.children.length-1].setAttribute("class",""),this.link.children[this.link.children.length-2].setAttribute("class",""),1===this.currentPage&&(this.link.children[0].setAttribute("class","disable"),this.link.children[1].setAttribute("class","disable")),this.currentPage===this.pageNumberLis.length&&(this.link.children[this.link.children.length-1].setAttribute("class","disable"),this.link.children[this.link.children.length-2].setAttribute("class","disable"))}_prePageNum(e){const t=[];if(this.currentPage="first"===e?1:"last"===e?this.pageNumberLis.length:"prev"===e?this.currentPage-1:"next"===e?this.currentPage+1:e,this.pageNumberLis.length<=5)for(let e=0;e=this.pageNumberLis.length-3)for(let e=this.pageNumberLis.length-5;e0&&(this.currentPageNumberLis=t)}} /* Copyright© 2000 - 2022 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.*/ let Ua={getFileType:e=>/^.*\.(?:xls|xlsx)$/i.test(e)?ba.EXCEL:/^.*\.(?:csv)$/i.test(e)?ba.CSV:/^.*\.(?:geojson|json)$/i.test(e)?ba.GEOJSON:null}; /* 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.*/ /* 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.*/ e.Lang=Ma,e.i18n=e.Lang.i18n,e.Util={...e.Util,...ee},e.Browser=X,e.INCHES_PER_UNIT=te,e.METERS_PER_INCH=se,e.DOTS_PER_INCH=$,e.IS_GECKO=Z,e.setCORS=function(e){De=e},e.isCORS=Be,e.setRequestTimeout=function(e){return Re=e},e.getRequestTimeout=Ge,e.FetchRequest=Ue,e.inherit=function(e,t){var s,i,r,n=function(){};for(n.prototype=t.prototype,e.prototype=new n,s=2,i=arguments.length;s{e.showView(t.message)}})}getStyle(){return this.viewModel.getStyle()}getFeatures(){return this.viewModel.getFeatures()}setStyle(e){let t=this.viewModel.setStyle(e);this._updateChart(t)}changeType(e){if(this.chartType!==e){this.chartType=e;let t=this.viewModel.changeType(e);this._updateChart(t)}}updateData(e,t){let s=this;this.viewModel.updateData(e,t,function(e){s._updateChart(e),s.addChart&&s.addChart()})}_createChart(e){this.echart=wa().init(document.getElementById(this.domID),null,{renderer:"canvas"});let t=this.viewModel._createChartOptions(e);this.echart.setOption(t),this.addChart&&this.addChart()}_updateChart(e){this.echart&&(this.echart.clear(),this.echart.setOption(e))}},e.Components.ChartViewModel=La,e.Components.MessageBox=_a,e.Components.AttributesPopContainer=Da,e.Components.CityTabsPage=ka,e.Components.CommonContainer=Pa,e.Components.DropDownBox=Ia,e.Components.IndexTabsPageContainer=Ra,e.Components.NavTabsPage=Ba,e.Components.PaginationContainer=Ga,e.Components.PopContainer=Fa,e.Components.Select=Na,e.Components.TemplateBase=Oa,e.Components.FileReaderUtil=Ta,e.TimeControlBase=Pe,e.TimeFlowControl= /* Copyright© 2000 - 2022 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.*/ class extends Pe{constructor(e,t){super(t);var s=this;s.callback=e,Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),s=this,i=function(){},r=function(){return s.apply(this instanceof i&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return i.prototype=this.prototype,r.prototype=new i,r}),s.update=s.update.bind(s),s.oldTime=s.currentTime,s.CLASS_NAME="SuperMap.TimeFlowControl"}updateOptions(e){e=e||{},super.updateOptions(e)}start(){var e=this;e.running||(e.running=!0,e.reverse?e.currentTime===e.startTime&&(e.oldTime=e.endTime,e.currentTime=e.oldTime):e.oldTime===e.endTime&&(e.currentTime=e.startTime,e.oldTime=e.currentTime),e.tick())}stop(){super.stop();var e=this;e.oldTime=e.currentTime,e.running&&(e.running=!1),e.intervalId&&window.clearTimeout(e.intervalId)}destroy(){super.destroy(),this.oldTime=null,this.callback=null}tick(){var e=this;e.intervalId&&window.clearInterval(e.intervalId),e.intervalId=null,e.update(),e.intervalId=window.setInterval(e.update,e.frequency)}update(){var e=this;if(e.running)if(e.callback&&e.callback(e.currentTime),e.reverse){if(e.currentTime===e.startTime){if(!e.repeat)return e.running=!1,null;e.oldTime=e.endTime,e.currentTime=e.oldTime}else e.currentTime=e.oldTime,e.oldTime-=e.speed;e.oldTime<=e.startTime&&(e.oldTime=e.startTime)}else{if(e.currentTime===e.endTime){if(!e.repeat)return e.running=!1,e.stop(),null;e.stop(),e.currentTime=e.startTime,e.oldTime=e.currentTime,e.start()}else e.oldTime=e.currentTime,e.currentTime+=e.speed;e.currentTime>=e.endTime&&(e.currentTime=e.endTime)}}},e.Format=e.Format||Ce,e.Format.GeoJSON=Oe,e.Format.JSON=we,e.Format.WKT= /* Copyright© 2000 - 2022 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.*/ class extends Ce{constructor(e){super(e),this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},this.CLASS_NAME="SuperMap.Format.WKT",this.extract={point:function(e){return e.x+" "+e.y},multipoint(e){for(var t=[],s=0,i=e.components.length;s0&&r.push(","),s=t[n].geometry,r.push(this.extractGeometry(s));return i&&r.push(")"),r.join("")}extractGeometry(e){var t=e.CLASS_NAME.split(".")[2].toLowerCase();return this.extract[t]?("collection"===t?"GEOMETRYCOLLECTION":t.toUpperCase())+"("+this.extract[t].apply(this,[e])+")":null}},e.iManager= /* Copyright© 2000 - 2022 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.*/ class extends ze{constructor(e){super(e)}load(){return this.request("GET",this.serviceUrl+"/web/api/service.json")}createIServer(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/server.json",new Ve(e))}createIPortal(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/portal.json",new Ve(e))}iServerList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/server.json")}iPortalList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/portal.json")}startNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/started.json",e)}stopNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/stopped.json",e)}},e.iManagerCreateNodeParam=Ve,e.iManagerServiceBase=ze,e.iPortal= /* Copyright© 2000 - 2022 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.*/ class extends Je{constructor(e,t){super(e,t),this.iportalUrl=e,t=t||{},this.withCredentials=t.withCredentials||!1}load(){return Ue.get(this.iportalUrl+"/web")}queryResources(e){if(!(e instanceof qe))return new Promise(function(e){e("queryParams is not instanceof iPortalQueryParam !")});var t=this,s=this.iportalUrl+"/gateway/catalog/resource/search.json";return e.t=(new Date).getTime(),this.request("GET",s,e).then(function(e){var s=[];e.content.forEach(function(e){s.push(new We(t.iportalUrl,e))});let i=new He;return i.content=s,i.total=e.total,i.currentPage=e.currentPage,i.pageSize=e.pageSize,i.aggregations=e.aggregations,i})}updateResourcesShareSetting(e){if(!(e instanceof Ye))return new Promise(function(e){e("shareParams is not instanceof iPortalShareParam !")});var t=e.resourceType.replace("_","").toLowerCase()+"s";"datas"===t&&(t="mycontent/"+t);var s={ids:e.ids,entities:e.entities},i=this.iportalUrl+"/web/"+t+"/sharesetting.json";return this.request("PUT",i,JSON.stringify(s)).then(function(e){return e})}},e.iPortalAddDataParam=Ke,e.iPortalAddResourceParam=Qe,e.iPortalDataConnectionInfoParam=et,e.iPortalDataMetaInfoParam=Ze,e.iPortalDataStoreInfoParam=$e,e.iPortalQueryParam=qe,e.iPortalQueryResult=He,e.iPortalRegisterServiceParam=Xe,e.iPortalResource=We,e.iPortalServiceBase=Je,e.iPortalShareEntity= /* Copyright© 2000 - 2022 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.*/ class{constructor(e){e=e||{},this.permissionType="",this.entityType="",this.entityName="GUEST",this.entityId=null,ee.extend(this,e)}},e.iPortalShareParam=Ye,e.iPortalUser= /* Copyright© 2000 - 2022 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.*/ class extends Je{constructor(e){super(e),this.iportalUrl=e}deleteResources(e){var t=e.resourceType.replace("_","").toLowerCase(),s=this.iportalUrl+"/web/"+t+"s.json?ids="+encodeURI(JSON.stringify(e.ids));return"data"===t?(s=this.iportalUrl+"/web/mycontent/datas/delete.json",this.request("POST",s,JSON.stringify(e.ids))):this.request("DELETE",s)}addMap(e){if(!(e instanceof Qe))return this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/maps/batchaddmaps.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}addScene(e){if(!(e instanceof Qe))return this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/scenes/batchaddscenes.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}registerService(e){if(!(e instanceof Xe))return this.getErrMsgPromise("registerParams is not instanceof IPortalRegisterServiceParam !");let t={type:e.type,tags:e.tags,authorizeSetting:e.entities,metadata:e.metadata,addedMapNames:e.addedMapNames,addedSceneNames:e.addedSceneNames},s=this.iportalUrl+"/web/services.json";return this.request("POST",s,JSON.stringify(t)).then(e=>e)}getErrMsgPromise(e){return new Promise(t=>{t(e)})}uploadDataRequest(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/upload.json";return this.request("POST",s,t)}addData(e,t){if(!(e instanceof Ke))return this.getErrMsgPromise("params is not instanceof iPortalAddDataParam !");var s,i=this.iportalUrl+"/web/mycontent/datas.json",r={fileName:e.fileName,tags:e.tags,type:e.type},n=e.type.toLowerCase();if("excel"===n||"csv"===n){if(!(e.dataMetaInfo instanceof Ze))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");s={xField:e.dataMetaInfo.xField,yField:e.dataMetaInfo.yField},"csv"===n&&(s.fileEncoding=e.dataMetaInfo.fileEncoding),r.coordType="WGS84",r.dataMetaInfo=s}else if("hdfs"===n||"hbase"===n){if(!(e.dataMetaInfo instanceof Ze))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");if(!(e.dataMetaInfo.dataStoreInfo instanceof $e))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo is not instanceof iPortalDataStoreInfoParam !");var a={type:e.dataMetaInfo.dataStoreInfo.type};switch(n){case"hdfs":a.url=e.dataMetaInfo.dataStoreInfo.url,s={url:e.dataMetaInfo.url,dataStoreInfo:a};break;case"hbase":if(!(e.dataMetaInfo.dataStoreInfo.connectionInfo instanceof et))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo.connectionInfo is not instanceof iPortalDataConnectionInfoParam !");a.connectionInfo={dataBase:e.dataMetaInfo.dataStoreInfo.connectionInfo.dataBase,server:e.dataMetaInfo.dataStoreInfo.connectionInfo.server,engineType:"HBASE"},a.datastoreType="SPATIAL",s={dataStoreInfo:a}}r.dataMetaInfo=s}return this.request("POST",i,JSON.stringify(r)).then(e=>"hdfs"===n||"hbase"===n?e:e.childID?this.uploadDataRequest(e.childID,t):e.customResult)}publishOrUnpublish(e,t){if(!e.dataId||!e.serviceType)return this.getErrMsgPromise("option.dataID and option.serviceType are Required!");var s=e.dataId,i=e.dataServiceId,r=e.serviceType,n=this.iportalUrl+"/web/mycontent/datas/"+s+"/publishstatus.json?serviceType="+r;return i&&(n+="&dataServiceId="+i),this.request("PUT",n,JSON.stringify(t)).then(e=>t?(i||(i=e.customResult),i):e)}getDataPublishedStatus(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/publishstatus.json?dataServiceId="+t+"&forPublish=true";return this.request("GET",s)}unPublishDataService(e){return this.publishOrUnpublish(e,!1)}publishDataService(e){return this.publishOrUnpublish(e,!0)}},e.AddressMatchService=rt,e.AggregationParameter=nt,e.AreaSolarRadiationParameters=ot,e.AreaSolarRadiationService=ht,e.BucketAggParameter=at,e.BufferAnalystParameters=pt,e.BufferAnalystService=gt,e.BufferDistance=ut,e.BuffersAnalystJobsParameter=xt,e.BuffersAnalystJobsService=Ct,e.BufferSetting=ct,e.BurstPipelineAnalystParameters=wt,e.BurstPipelineAnalystService=At,e.ChartFeatureInfoSpecsService=Tt,e.ChartQueryFilterParameter=Et,e.ChartQueryParameters=Lt,e.ChartQueryService=Pt,e.ClipParameter= /* Copyright© 2000 - 2022 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.*/ class{constructor(e){this.clipDatasetName=null,this.clipDatasourceName=null,this.clipRegion=null,this.isClipInRegion=!0,this.isExactClip=null,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.ClipParameter"}destroy(){var e=this;e.clipDatasetName=null,e.clipDatasourceName=null,e.clipRegion=null,e.isClipInRegion=null,e.isExactClip=null}toJSON(){return ee.toJSON({isClipInRegion:this.isClipInRegion,clipDatasetName:this.clipDatasetName,clipDatasourceName:this.clipDatasourceName,isExactClip:this.isExactClip,clipRegion:Le.fromGeometry(this.clipRegion)})}},e.ColorDictionary=Nt,e.CommonServiceBase=tt,e.ComputeWeightMatrixParameters=Dt,e.ComputeWeightMatrixService=Rt,e.CreateDatasetParameters=zr,e.DataFlowService=kt,e.DataReturnOption=dt,e.DatasetBufferAnalystParameters=mt,e.DatasetInfo=Bt,e.DatasetOverlayAnalystParameters=Ut,e.DatasetService=Is,e.DatasetSurfaceAnalystParameters=Vt,e.DatasetThiessenAnalystParameters=qt,e.DatasourceConnectionInfo=vt,e.DatasourceService=Ht,e.DensityAnalystService=Yt,e.DensityKernelAnalystParameters=Wt,e.EditFeaturesParameters=Qt,e.EditFeaturesService=Xt,e.FacilityAnalyst3DParameters=Kt,e.FacilityAnalystSinks3DParameters=Zt,e.FacilityAnalystSinks3DService=$t,e.FacilityAnalystSources3DParameters=es,e.FacilityAnalystSources3DService=ts,e.FacilityAnalystStreamParameters=ss,e.FacilityAnalystStreamService=is,e.FacilityAnalystTracedown3DParameters=rs,e.FacilityAnalystTracedown3DService=ns,e.FacilityAnalystTraceup3DParameters=as,e.FacilityAnalystTraceup3DService=os,e.FacilityAnalystUpstream3DParameters=ls,e.FacilityAnalystUpstream3DService=hs,e.FieldParameters=us,e.FieldsFilter=un,e.FieldStatisticService=ps,e.FieldStatisticsParameters=cs,e.FilterParameter=ft,e.FindClosestFacilitiesParameters=ds,e.FindClosestFacilitiesService=fs,e.FindLocationParameters=ms,e.FindLocationService=ys,e.FindMTSPPathsParameters=gs,e.FindMTSPPathsService=vs,e.FindPathParameters=Ss,e.FindPathService=bs,e.FindServiceAreasParameters=xs,e.FindServiceAreasService=_s,e.FindTSPPathsParameters=Cs,e.FindTSPPathsService=ws,e.GenerateSpatialDataParameters=Ms,e.GenerateSpatialDataService=As,e.GeoCodingParameter=st,e.GeoDecodingParameter=it,e.GeoHashGridAggParameter= /* Copyright© 2000 - 2022 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.*/ class extends at{constructor(e){super(),this.precision=5,ee.extend(this,e),this.aggType=G.GEOHASH_GRID,this.CLASS_NAME="SuperMap.GeoHashGridAggParameter"}destroy(){super.destroy(),this.aggType=null,this.precision=null}static toJsonParameters(e){var t={aggName:e.aggName,aggFieldName:e.aggFieldName,aggType:e.aggType,precision:e.precision};return ee.toJson(t)}},e.GeometryBatchAnalystService=Nr,e.GeometryBufferAnalystParameters=yt,e.GeometryOverlayAnalystParameters=Ts,e.GeometrySurfaceAnalystParameters=Es,e.GeometryThiessenAnalystParameters=Ls,e.GeoprocessingService=Os,e.GeoRelationAnalystParameters=Ps,e.GeoRelationAnalystService=Ns,e.GetFeaturesByBoundsParameters=Ds,e.GetFeaturesByBoundsService=ks,e.GetFeaturesByBufferParameters=Bs,e.GetFeaturesByBufferService=Gs,e.GetFeaturesByGeometryParameters=Us,e.GetFeaturesByGeometryService=js,e.GetFeaturesByIDsParameters=zs,e.GetFeaturesByIDsService=Vs,e.GetFeaturesBySQLParameters=Js,e.GetFeaturesBySQLService=qs,e.GetFeaturesParametersBase=Fs,e.GetFeaturesServiceBase=Rs,e.GetFieldsService=Hs,e.GetGridCellInfosParameters=Ws,e.GetGridCellInfosService=Ys,e.GetLayersInfoService=wi,e.Grid=xi,e.HillshadeParameter= /* Copyright© 2000 - 2022 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.*/ class extends Qr{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.zFactor=1,this.type=j.HILLSHADE,ee.extend(this,e),this.CLASS_NAME="SuperMap.HillshadeParameter"}destroy(){super.destroy(),this.altitude=null,this.azimuth=null,this.zFactor=null}toJSON(){return{altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,type:this.type}}},e.Image=_i,e.ImageCollectionService=ln,e.ImageGFAspect=yn,e.ImageGFHillShade=mn,e.ImageGFOrtho=gn,e.ImageGFSlope=vn,e.ImageRenderingRule=fn,e.ImageSearchParameter=pn,e.ImageService=hn,e.ImageStretchOption=dn,e.InterpolationAnalystParameters=Mi,e.InterpolationAnalystService=Oi,e.InterpolationDensityAnalystParameters=Ti,e.InterpolationIDWAnalystParameters=Ei,e.InterpolationKrigingAnalystParameters=Li,e.InterpolationRBFAnalystParameters=Ai,e.JoinItem=vi,e.KernelDensityJobParameter=Pi,e.KernelDensityJobsService=Ni,e.LabelImageCell= /* Copyright© 2000 - 2022 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.*/ class extends Ii{constructor(e){super(e),this.height=0,this.pathField=null,this.rotation=0,this.width=0,this.sizeFixed=!1,this.type="IMAGE",e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.LabelImageCell"}destroy(){var e=this;e.height=null,e.pathField=null,e.rotation=null,e.width=null,e.sizeFixed=null}},e.LabelMatrixCell=Ii,e.LabelMixedTextStyle=ei,e.LabelSymbolCell= /* Copyright© 2000 - 2022 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.*/ class extends Ii{constructor(e){super(e),this.style=new Ae,this.symbolIDField=null,this.type="SYMBOL",e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.LabelSymbolCell"}destroy(){this.style&&(this.style.destroy(),this.style=null),this.symbolIDField=null}},e.LabelThemeCell= /* Copyright© 2000 - 2022 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.*/ class extends Ii{constructor(e){super(e),this.themeLabel=new ri,this.type="THEME",e&&ee.extend(this,e),this.CLASS_NAME=" SuperMap.LabelThemeCell"}destroy(){this.themeLabel&&(this.themeLabel.destroy(),this.themeLabel=null)}},e.LayerStatus= /* Copyright© 2000 - 2022 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.*/ class{constructor(e){this.layerName=null,this.isVisible=null,this.displayFilter=null,this.fieldValuesDisplayFilter=null,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.LayerStatus"}destroy(){this.layerName=null,this.isVisible=null,this.displayFilter=null}toJSON(){var e="{";e+='"type":"UGC",';var t=[];return this.layerName&&(t.push('"name":"'+this.layerName+'"'),t.push('"visible":'+this.isVisible)),this.displayFilter&&t.push('"displayFilter":"'+this.displayFilter+'"'),(this.minScale||0==this.minScale)&&t.push('"minScale":'+this.minScale),(this.maxScale||0==this.maxScale)&&t.push('"maxScale":'+this.maxScale),this.fieldValuesDisplayFilter&&t.push('"fieldValuesDisplayFilter":'+ee.toJSON(this.fieldValuesDisplayFilter)),e+=t,e+="}"}},e.LinkItem= /* Copyright© 2000 - 2022 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.*/ class{constructor(e){this.datasourceConnectionInfo=null,this.foreignKeys=null,this.foreignTable=null,this.linkFields=null,this.linkFilter=null,this.name=null,this.primaryKeys=null,e&&ee.extend(this,e),this.CLASS_NAME="SuperMap.LinkItem"}destroy(){var e=this;e.datasourceConnectionInfo instanceof vt&&(e.datasourceConnectionInfo.destroy(),e.datasourceConnectionInfo=null),e.foreignKeys=null,e.foreignTable=null,e.linkFields=null,e.linkFilter=null,e.name=null,e.primaryKeys=null}},e.MappingParameters=bt,e.MapService=Fi,e.MathExpressionAnalysisParameters=Di,e.MathExpressionAnalysisService=Ri,e.MeasureParameters=ki,e.MeasureService=Bi,e.MetricsAggParameter= /* Copyright© 2000 - 2022 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.*/ class extends nt{constructor(e){super(),this.aggType=U.AVG,ee.extend(this,e),this.CLASS_NAME="SuperMap.MetricsAggParameter"}destroy(){super.destroy(),this.aggType=null}},e.NDVIParameter= /* Copyright© 2000 - 2022 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.*/ class extends Qr{constructor(e){super(e),this.redIndex=0,this.nirIndex=1,this.colorMap="0:ffffe5ff;0.1:f7fcb9ff;0.2:d9f0a3ff;0.3:addd8eff;0.4:78c679ff;0.5:41ab5dff;0.6:238443ff;0.7:006837ff;1:004529ff",this.type=j.NDVI,ee.extend(this,e),this.CLASS_NAME="SuperMap.NDVIParameter"}destroy(){super.destroy(),this.redIndex=null,this.nirIndex=null,this.colorMap=null}toJSON(){return{redIndex:this.redIndex,nirIndex:this.nirIndex,colorMap:this.colorMap,type:this.type}}},e.NetworkAnalystServiceBase=Mt,e.OutputSetting=St,e.OverlapDisplayedOptions= /* Copyright© 2000 - 2022 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.*/ class{constructor(e){e=e||{},this.allowPointOverlap=!0,this.allowPointWithTextDisplay=!0,this.allowTextOverlap=!1,this.allowTextAndPointOverlap=!0,this.allowThemeGraduatedSymbolOverlap=!1,this.allowThemeGraphOverlap=!1,this.horizontalOverlappedSpaceSize=0,this.verticalOverlappedSpaceSize=0,ee.extend(this,e),this.ugcLayer=new yi(e),this.CLASS_NAME="SuperMap.OverlapDisplayedOptions"}destroy(){ee.reset(this)}fromJson(e){this.ugcLayer.fromJson.apply(this,[e])}toServerJSONObject(){return this.ugcLayer.toServerJSONObject.apply(this,arguments)}toString(){var e=this.ugcLayer.toServerJSONObject.apply(this,arguments),t="{";for(var s in e)e.hasOwnProperty(s)&&(t+="'"+s+"':"+e[s]+",");return t=t.substr(0,t.length-1),t+="}"}},e.OverlayAnalystParameters=Gt,e.OverlayAnalystService=Gi,e.OverlayGeoJobParameter=Ui,e.OverlayGeoJobsService=ji,e.PointWithMeasure=Te,e.ProcessingServiceBase=_t,e.QueryByBoundsParameters=zi,e.QueryByBoundsService=Ji,e.QueryByDistanceParameters=qi,e.QueryByDistanceService=Hi,e.QueryByGeometryParameters=Wi,e.QueryByGeometryService=Yi,e.QueryBySQLParameters=Qi,e.QueryBySQLService=Xi,e.QueryParameters=Ot,e.QueryService=Vi,e.RasterFunctionParameter=Qr,e.Route=Ee,e.RouteCalculateMeasureParameters=Ki,e.RouteCalculateMeasureService=Zi,e.RouteLocatorParameters=$i,e.RouteLocatorService=er,e.ServerColor=Me,e.ServerFeature=tr,e.ServerGeometry=Le,e.ServerStyle=Ae,e.ServerTextStyle=Xs,e.ServerTheme=bi,e.SetDatasourceParameters=sr,e.SetLayerInfoParameters=ir,e.SetLayerInfoService=rr,e.SetLayersInfoParameters=nr,e.SetLayersInfoService=ar,e.SetLayerStatusParameters=or,e.SetLayerStatusService=lr,e.SingleObjectQueryJobsParameter=hr,e.SingleObjectQueryJobsService=ur,e.Sortby=cn,e.SpatialAnalystBase=lt,e.StopQueryParameters=cr,e.StopQueryService=pr,e.SummaryAttributesJobsParameter=dr,e.SummaryAttributesJobsService=fr,e.SummaryMeshJobParameter=mr,e.SummaryMeshJobsService=yr,e.SummaryRegionJobParameter=gr,e.SummaryRegionJobsService=vr,e.SupplyCenter=Sr,e.SurfaceAnalystParameters=zt,e.SurfaceAnalystParametersSetting=jt,e.SurfaceAnalystService=br,e.TerrainCurvatureCalculationParameters=xr,e.TerrainCurvatureCalculationService=_r,e.Theme=Qs,e.ThemeDotDensity=ci,e.ThemeFlow=Cr,e.ThemeGraduatedSymbol=di,e.ThemeGraduatedSymbolStyle=pi,e.ThemeGraph=ui,e.ThemeGraphAxes=ai,e.ThemeGraphItem=hi,e.ThemeGraphSize=oi,e.ThemeGraphText=li,e.ThemeGridRange=Mr,e.ThemeGridRangeItem=wr,e.ThemeGridUnique=Tr,e.ThemeGridUniqueItem=Ar,e.ThemeLabel=ri,e.ThemeLabelAlongLine=si,e.ThemeLabelBackground=ii,e.ThemeLabelItem=Ks,e.ThemeLabelText=ti,e.ThemeLabelUniqueItem=Er,e.ThemeMemoryData= /* Copyright© 2000 - 2022 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.*/ class{constructor(e,t){this.srcData=e,this.targetData=t,this.CLASS_NAME="SuperMap.ThemeMemoryData"}destroy(){this.srcData=null,this.targetData=null}toJSON(){if(this.srcData&&this.targetData){for(var e="",t=Math.min(this.srcData.length,this.targetData.length),s=0;s0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}},e.ThemeOffset=$s,e.ThemeParameters=Lr,e.ThemeRange=mi,e.ThemeRangeItem=fi,e.ThemeService=Or,e.ThemeUnique=ni,e.ThemeUniqueItem=Zs,e.ThiessenAnalystParameters=Jt,e.ThiessenAnalystService=Pr,e.TilesetsService=Ir,e.TopologyValidatorJobsParameter=Fr,e.TopologyValidatorJobsService=Dr,e.TransferLine=Rr,e.TransferPathParameters=kr,e.TransferPathService=Br,e.TransferSolutionParameters=Gr,e.TransferSolutionService=Ur,e.TransportationAnalystParameter=Ft,e.TransportationAnalystResultSetting=It,e.UGCLayer=yi,e.UGCMapLayer=gi,e.UGCSubLayer=Si,e.UpdateDatasetParameters=Hr,e.UpdateEdgeWeightParameters=jr,e.UpdateEdgeWeightService=Vr,e.UpdateTurnNodeWeightParameters=Jr,e.UpdateTurnNodeWeightService=qr,e.Vector=Ci,e.VectorClipJobsParameter=Wr,e.VectorClipJobsService=Yr,e.WebPrintingJobContent=rn,e.WebPrintingJobCustomItems=Xr,e.WebPrintingJobExportOptions=an,e.WebPrintingJobImage=Kr,e.WebPrintingJobLayers=Zr,e.WebPrintingJobLayoutOptions=nn,e.WebPrintingJobLegendOptions=$r,e.WebPrintingJobLittleMapOptions=en,e.WebPrintingJobNorthArrowOptions=tn,e.WebPrintingJobParameters= /* Copyright© 2000 - 2022 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.*/ class{constructor(e){e&&(this.content=null,this.layoutOptions=null,this.exportOptions=null,ee.extend(this,e),this.CLASS_NAME="SuperMap.WebPrintingJobParameters")}destroy(){this.content instanceof rn&&(this.content.destroy(),this.content=null),this.layoutOptions instanceof nn&&(this.layoutOptions.destroy(),this.layoutOptions=null),this.exportOptions instanceof an&&(this.exportOptions.destroy(),this.exportOptions=null)}},e.WebPrintingJobScaleBarOptions=sn,e.WebPrintingService=on,e.Online= /* Copyright© 2000 - 2022 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.*/ class{constructor(){this.rootUrl="https://www.supermapol.com",this.webUrl=this.rootUrl+"/web";var e=this.webUrl+"/mycontent";this.mDatasUrl=e+"/datas",this.CLASS_NAME="SuperMap.Online"}load(){return Ue.get(this.rootUrl).then(function(e){return e})}login(){je.loginOnline(this.rootUrl,!0)}queryDatas(e){var t=this,s=t.mDatasUrl;return e&&(e=e.toJSON()),Ue.get(s,e).then(function(e){if(e&&e.content&&!(e.content.length<1)){for(var s=[],i=e.content,r=i.length,n=0;ns[1])return;var n=this.calculateXShapeInfo();if(n){var a=n.xPositions,o=n.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(ra.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(ra.GraphAxis(this.shapeFactory,i,t,n)));for(var l=0;l=t.length&&(s%=t.length);var l=t[s][0],h=t[s][1],u=(new wn).getLinearGradient(a,0,o,0,[[0,l],[1,h]]);r.style.color=u}}}},e.Feature.Theme.Bar3D= /* Copyright© 2000 - 2022 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.*/ class extends aa{constructor(e,t,s,i,r){super(e,t,s,i,r),this.CLASS_NAME="SuperMap.Feature.Theme.Bar3D"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,25,20,20]:e.dataViewBoxParameter=[5,5,5,5]),e.axisUseArrow=void 0===e.axisUseArrow||e.axisUseArrow,e.axisXLabelsOffset=void 0!==e.axisXLabelsOffset?e.axisXLabelsOffset:[-10,10],this.initBaseParameter()){var t=this.DVBCodomain;this.DVBUnitValue=(t[1]-t[0])/this.DVBHeight;var s=this.dataViewBox,i=this.dataValues;if(!(i.length<1)){for(let e=0,s=i.length;et[1])return;var r=this.calculateXShapeInfo();if(r){var n=r.xPositions,a=r.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(ra.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(ra.GraphAxis(this.shapeFactory,s,e,r)));var o=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10;for(let r=0;r0?this.DVBUnitValue=e.maxR/(r[1]-r[0]):this.DVBUnitValue=e.maxR;var n=this.DVBUnitValue,a=i[0]*n+e.minR;if(this.width=2*a,this.height=2*a,this.initBaseParameter()&&(!r||!(i[0]r[1]))){var o=this.DVBCenterPoint,l=new zn(o[0],o[1],a);l.style=ra.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=ra.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:i[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}},e.Feature.Theme.Graph=aa,e.Feature.Theme.Line= /* Copyright© 2000 - 2022 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.*/ class extends aa{constructor(e,t,s,i,r,n){super(e,t,s,i,r,n),this.CLASS_NAME="SuperMap.Feature.Theme.Line"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var i=this.DVBUnitValue,r=this.dataValues;if(!(r.length<1)){var n=this.calculateXShapeInfo();if(n){var a,o,l=n.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(ra.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(ra.GraphAxis(this.shapeFactory,t,e,n));for(var h=[],u=[],c=0,p=r.length;cs[1])return null;a=l[c],o=t[1]-(r[c]-s[0])/i;var d=new Dn(a,o);d.style=ra.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,c,r[c]),d.highlightStyle=ra.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(d.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(d.clickable=e.pointClickAble),d.refDataID=this.data.id,d.dataInfo={field:this.fields[c],value:r[c]},u.push(this.shapeFactory.createShape(d));var f=[a,o];h.push(f)}var m=new Rn(h);m.style=ra.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),m.clickable=!1,m.hoverable=!1;var y=this.shapeFactory.createShape(m);this.shapes.push(y),this.shapes=this.shapes.concat(u),this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,i=this.dataValues.length;if(i<1)return null;var r=[],n=this.DVBWidth,a=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=n-((e=s.xShapeBlank)[0]+e[1]);if(o<=i)return null;a=o/(i-1)}else e=[a=n/(i+1),a,a];for(var l=0,h=0;hi[1])return;var r=0;for(let e=0;e=360&&(l=359.9999999);var d=new Gn(a[0],a[1],u,o,l);if(void 0===e.sectorStyleByFields){var f=c%t.length;d.style=ra.ShapeStyleTool(null,e.sectorStyle,t,null,f)}else d.style=ra.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,c,s[c]);d.highlightStyle=ra.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[c],value:s[c]},this.shapes.push(this.shapeFactory.createShape(d)),o=l}this.shapesConvertToRelativeCoordinate()}}}},e.Feature.Theme.Point= /* Copyright© 2000 - 2022 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.*/ class extends aa{constructor(e,t,s,i,r,n){super(e,t,s,i,r,n),this.CLASS_NAME="SuperMap.Feature.Theme.Point"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var i=this.DVBUnitValue,r=this.dataValues,n=this.calculateXShapeInfo();if(n){var a,o,l=n.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(ra.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(ra.GraphAxis(this.shapeFactory,t,e,n));for(var h=0,u=r.length;hs[1])return null;a=l[h],o=t[1]-(r[h]-s[0])/i;var c=new Dn(a,o);c.style=ra.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,h,r[h]),c.highlightStyle=ra.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(c.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(c.clickable=e.pointClickAble),c.refDataID=this.data.id,c.dataInfo={field:this.fields[h],value:r[h]},this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,i=this.dataValues.length;if(i<1)return null;var r=[],n=this.DVBWidth,a=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=n-((e=s.xShapeBlank)[0]+e[1]);if(o<=i)return null;a=o/(i-1)}else e=[a=n/(i+1),a,a];for(var l=0,h=0;hi[1])return;var r=0;for(let e=0;e=0&&t.innerRingRadiust.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),s})}_distance(e,t,s,i){return Math.sqrt((e-s)*(e-s)+(t-i)*(t-i))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}},e.ArrayStatistic=class{static newInstance(){return this.geostatsInstance||(this.geostatsInstance=new window.geostats),this.geostatsInstance}static getInstance(e){let t=this.newInstance();return t.setSerie(e),t}static getArrayStatistic(e,t){return e.length?"Sum"===t||"求和"===t?this.getSum(e):"Maximum"===t||"最大值"===t?this.getMax(e):"Minimum"===t||"最小值"===t?this.getMin(e):"Average"===t||"平均值"===t?this.getMean(e):"Median"===t||"中位数"===t?this.getMedian(e):"times"===t||"计数"===t?this.getTimes(e):void 0:0}static getArraySegments(e,t,s){return"offset"===t?this.getEqInterval(e,s):"jenks"===t?this.getJenks(e,s):"square"===t?this.getMin(e)>=0&&this.getSqrtInterval(e,s):"logarithm"===t?this.getMin(e)>0&&this.getGeometricProgression(e,s):void 0}static getSum(e){return this.getInstance(e).sum()}static getMax(e){return this.getInstance(e).max()}static getMin(e){return this.getInstance(e).min()}static getMean(e){return this.getInstance(e).mean()}static getMedian(e){return this.getInstance(e).median()}static getTimes(e){return e.length}static getEqInterval(e,t){return this.getInstance(e).getClassEqInterval(t)}static getJenks(e,t){return this.getInstance(e).getClassJenks(t)}static getSqrtInterval(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}static getGeometricProgression(e,t){return this.getInstance(e).getClassGeometricProgression(t)}},e.ColorsPickerUtil=class{static createCanvas(e,t){var s=document.createElement("canvas");return s.height=e,s.width=t,s.getContext("2d")}static getLinearGradient(e,t,s,i,r){this._ctx||(this._ctx=this.getContext());for(var n=this._ctx.createLinearGradient(e,t,s,i),a=r.length,o=1/(a-1),l=0,h=0;h=t)if("RANGE"===s)for(r=0;r=this.text.length)return;e=this.text[this.place++]}switch(this.state){case mo:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},xo.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(So.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},xo.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=mo)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=mo,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},xo.prototype.number=function(e){if(!bo.test(e)){if(So.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},xo.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},xo.prototype.keyword=function(e){if(vo.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=mo)}if(!So.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},xo.prototype.neutral=function(e){if(go.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(bo.test(e))return this.word=e,void(this.state=3);if(!So.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},xo.prototype.output=function(){for(;this.place0?90:-90),e.lat_ts=e.lat1)}(r),r}function To(e){var t=this;if(2===arguments.length){var s=arguments[1];"string"==typeof s?"+"===s.charAt(0)?To[e]=po(arguments[1]):To[e]=Ao(arguments[1]):To[e]=s}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?To.apply(t,e):To(e)});if("string"==typeof e){if(e in To)return To[e]}else"EPSG"in e?To["EPSG:"+e.EPSG]=e:"ESRI"in e?To["ESRI:"+e.ESRI]=e:"IAU2000"in e?To["IAU2000:"+e.IAU2000]=e:console.log(e);return}}!function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}(To);const Eo=To;var Lo=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var Oo=["3857","900913","3785","102113"];const Po=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in Eo}(e))return Eo[e];if(function(e){return Lo.some(function(t){return e.indexOf(t)>-1})}(e)){var t=Ao(e);if(function(e){var t=co(e,"authority");if(t){var s=co(t,"epsg");return s&&Oo.indexOf(s)>-1}}(t))return Eo["EPSG:3857"];var s=function(e){var t=co(e,"extension");if(t)return co(t,"proj4")}(t);return s?po(s):t}return function(e){return"+"===e[0]}(e)?po(e):void 0};function No(e,t){var s,i;if(e=e||{},!t)return e;for(i in t)void 0!==(s=t[i])&&(e[i]=s);return e}function Io(e,t,s){var i=e*t;return s/Math.sqrt(1-i*i)}function Fo(e){return e<0?-1:1}function Do(e){return Math.abs(e)<=oo?e:e-Fo(e)*ao}function Ro(e,t,s){var i=e*s,r=.5*e;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(Za-t))/i}function ko(e,t){for(var s,i,r=.5*e,n=Za-2*Math.atan(t),a=0;a<=15;a++)if(s=e*Math.sin(n),n+=i=Za-2*Math.atan(t*Math.pow((1-s)/(1+s),r))-n,Math.abs(i)<=1e-10)return n;return-9999}function Bo(e){return e}var Go=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Io(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var t,s,i=e.x,r=e.y;if(r*ro>90&&r*ro<-90&&i*ro>180&&i*ro<-180)return null;if(Math.abs(Math.abs(r)-Za)<=so)return null;if(this.sphere)t=this.x0+this.a*this.k0*Do(i-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(no+.5*r));else{var n=Math.sin(r),a=Ro(this.e,r,n);t=this.x0+this.a*this.k0*Do(i-this.long0),s=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=s,e},inverse:function(e){var t,s,i=e.x-this.x0,r=e.y-this.y0;if(this.sphere)s=Za-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var n=Math.exp(-r/(this.a*this.k0));if(-9999===(s=ko(this.e,n)))return null}return t=Do(this.long0+i/(this.a*this.k0)),e.x=t,e.y=s,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:Bo,inverse:Bo,names:["longlat","identity"]}],Uo={},jo=[];function zo(e,t){var s=jo.length;return e.names?(jo[s]=e,e.names.forEach(function(e){Uo[e.toLowerCase()]=s}),this):(console.log(t),!0)}const Vo={start:function(){Go.forEach(zo)},add:zo,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==Uo[t]&&jo[Uo[t]]?jo[Uo[t]]:void 0}};var Jo={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},qo=Jo.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Jo.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Ho={};Ho.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},Ho.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},Ho.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},Ho.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},Ho.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},Ho.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},Ho.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},Ho.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},Ho.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},Ho.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},Ho.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},Ho.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},Ho.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},Ho.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},Ho.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},Ho.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},Ho.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};const Wo=function(e,t,s,i,r,n,a){var o={};return o.datum_type=void 0===e||"none"===e?Wa:Ha,t&&(o.datum_params=t.map(parseFloat),0===o.datum_params[0]&&0===o.datum_params[1]&&0===o.datum_params[2]||(o.datum_type=Va),o.datum_params.length>3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=Ja,o.datum_params[3]*=Ka,o.datum_params[4]*=Ka,o.datum_params[5]*=Ka,o.datum_params[6]=o.datum_params[6]/1e6+1))),a&&(o.datum_type=qa,o.grids=a),o.a=s,o.b=i,o.es=r,o.ep2=n,o};var Yo={};function Qo(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:Yo[e]||null,isNull:!1}}function Xo(e){return e/3600*Math.PI/180}function Ko(e,t,s){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,s)))}function Zo(e){return e.map(function(e){return[Xo(e.longitudeShift),Xo(e.latitudeShift)]})}function $o(e,t,s){return{name:Ko(e,t+8,t+16).trim(),parent:Ko(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,s),upperLatitude:e.getFloat64(t+88,s),lowerLongitude:e.getFloat64(t+104,s),upperLongitude:e.getFloat64(t+120,s),latitudeInterval:e.getFloat64(t+136,s),longitudeInterval:e.getFloat64(t+152,s),gridNodeCount:e.getInt32(t+168,s)}}function el(e,t,s,i){for(var r=t+176,n=[],a=0;a-1.001*Za)l=-Za;else if(l>Za&&l<1.001*Za)l=Za;else{if(l<-Za)return{x:-1/0,y:-1/0,z:e.z};if(l>Za)return{x:1/0,y:1/0,z:e.z}}return o>Math.PI&&(o-=2*Math.PI),r=Math.sin(l),a=Math.cos(l),n=r*r,{x:((i=s/Math.sqrt(1-t*n))+h)*a*Math.cos(o),y:(i+h)*a*Math.sin(o),z:(i*(1-t)+h)*r}}function rl(e,t,s,i){var r,n,a,o,l,h,u,c,p,d,f,m,y,g,v,S=e.x,b=e.y,x=e.z?e.z:0;if(r=Math.sqrt(S*S+b*b),n=Math.sqrt(S*S+b*b+x*x),r/s<1e-12){if(g=0,n/s<1e-12)return Za,v=-i,{x:e.x,y:e.y,z:e.z}}else g=Math.atan2(b,S);a=x/n,c=(o=r/n)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*o*o)),p=a*l,y=0;do{y++,h=t*(u=s/Math.sqrt(1-t*p*p))/(u+(v=r*c+x*p-u*(1-t*p*p))),m=(f=a*(l=1/Math.sqrt(1-h*(2-h)*o*o)))*c-(d=o*(1-h)*l)*p,c=d,p=f}while(m*m>1e-24&&y<30);return{x:g,y:Math.atan(f/Math.abs(d)),z:v}}function nl(e){return e===Va||e===Ja}function al(e,t,s){if(function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===Va?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==Ja||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t))return s;if(e.datum_type===Wa||t.datum_type===Wa)return s;var i=e.a,r=e.es;if(e.datum_type===qa){if(0!==ol(e,!1,s))return;i=Ya,r=Xa}var n=t.a,a=t.b,o=t.es;if(t.datum_type===qa&&(n=Ya,a=Qa,o=Xa),r===o&&i===n&&!nl(e.datum_type)&&!nl(t.datum_type))return s;if((s=il(s,r,i),nl(e.datum_type)&&(s=function(e,t,s){if(t===Va)return{x:e.x+s[0],y:e.y+s[1],z:e.z+s[2]};if(t===Ja){var i=s[0],r=s[1],n=s[2],a=s[3],o=s[4],l=s[5],h=s[6];return{x:h*(e.x-l*e.y+o*e.z)+i,y:h*(l*e.x+e.y-a*e.z)+r,z:h*(-o*e.x+a*e.y+e.z)+n}}}(s,e.datum_type,e.datum_params)),nl(t.datum_type)&&(s=function(e,t,s){if(t===Va)return{x:e.x-s[0],y:e.y-s[1],z:e.z-s[2]};if(t===Ja){var i=s[0],r=s[1],n=s[2],a=s[3],o=s[4],l=s[5],h=s[6],u=(e.x-i)/h,c=(e.y-r)/h,p=(e.z-n)/h;return{x:u+l*c-o*p,y:-l*u+c+a*p,z:o*u-a*c+p}}}(s,t.datum_type,t.datum_params)),s=rl(s,o,n,a),t.datum_type===qa)&&0!==ol(t,!0,s))return;return s}function ol(e,t,s){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;for(var i={x:-s.x,y:s.y},r={x:Number.NaN,y:Number.NaN},n=[],a=0;ai.y||u>i.x||d1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=Do(n.x+s.ll[0]),i.y=n.y+s.ll[1]}else isNaN(n.x)||(i.x=e.x+n.x,i.y=e.y+n.y);return i}function hl(e,t){var s,i={x:e.x/t.del[0],y:e.y/t.del[1]},r=Math.floor(i.x),n=Math.floor(i.y),a=i.x-1*r,o=i.y-1*n,l={x:Number.NaN,y:Number.NaN};if(r<0||r>=t.lim[0])return l;if(n<0||n>=t.lim[1])return l;s=n*t.lim[0]+r;var h=t.cvs[s][0],u=t.cvs[s][1];s++;var c=t.cvs[s][0],p=t.cvs[s][1];s+=t.lim[0];var d=t.cvs[s][0],f=t.cvs[s][1];s--;var m=t.cvs[s][0],y=t.cvs[s][1],g=a*o,v=a*(1-o),S=(1-a)*(1-o),b=(1-a)*o;return l.x=S*h+v*c+b*m+g*d,l.y=S*u+v*p+b*y+g*f,l}function ul(e,t,s){var i,r,n,a=s.x,o=s.y,l=s.z||0,h={};for(n=0;n<3;n++)if(!t||2!==n||void 0!==s.z)switch(0===n?(i=a,r=-1!=="ew".indexOf(e.axis[n])?"x":"y"):1===n?(i=o,r=-1!=="ns".indexOf(e.axis[n])?"y":"x"):(i=l,r="z"),e.axis[n]){case"e":h[r]=i;break;case"w":h[r]=-i;break;case"n":h[r]=i;break;case"s":h[r]=-i;break;case"u":void 0!==s[r]&&(h.z=i);break;case"d":void 0!==s[r]&&(h.z=-i);break;default:return null}return h}function cl(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function pl(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function dl(e,t,s,i){var r;if(Array.isArray(s)&&(s=cl(s)),function(e){pl(e.x),pl(e.y)}(s),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===Va||e.datum.datum_type===Ja)&&"WGS84"!==t.datumCode||(t.datum.datum_type===Va||t.datum.datum_type===Ja)&&"WGS84"!==e.datumCode}(e,t)&&(s=dl(e,r=new sl("WGS84"),s,i),e=r),i&&"enu"!==e.axis&&(s=ul(e,!1,s)),"longlat"===e.projName)s={x:s.x*io,y:s.y*io,z:s.z||0};else if(e.to_meter&&(s={x:s.x*e.to_meter,y:s.y*e.to_meter,z:s.z||0}),!(s=e.inverse(s)))return;if(e.from_greenwich&&(s.x+=e.from_greenwich),s=al(e.datum,t.datum,s))return t.from_greenwich&&(s={x:s.x-t.from_greenwich,y:s.y,z:s.z||0}),"longlat"===t.projName?s={x:s.x*ro,y:s.y*ro,z:s.z||0}:(s=t.forward(s),t.to_meter&&(s={x:s.x/t.to_meter,y:s.y/t.to_meter,z:s.z||0})),i&&"enu"!==t.axis?ul(t,!0,s):s}var fl=sl("WGS84");function ml(e,t,s,i){var r,n,a;return Array.isArray(s)?(r=dl(e,t,s,i)||{x:NaN,y:NaN},s.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(s.splice(3)):[r.x,r.y,s[2]].concat(s.splice(3)):[r.x,r.y].concat(s.splice(2)):[r.x,r.y]):(n=dl(e,t,s,i),2===(a=Object.keys(s)).length?n:(a.forEach(function(i){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===i||"y"===i||"z"===i)return}else if("x"===i||"y"===i)return;n[i]=s[i]}),n))}function yl(e){return e instanceof sl?e:e.oProj?e.oProj:sl(e)}const gl=function(e,t,s){e=yl(e);var i,r=!1;return void 0===t?(t=e,e=fl,r=!0):(void 0!==t.x||Array.isArray(t))&&(s=t,t=e,e=fl,r=!0),t=yl(t),s?ml(e,t,s):(i={forward:function(s,i){return ml(e,t,s,i)},inverse:function(s,i){return ml(t,e,s,i)}},r&&(i.oProj=t),i)};var vl=6,Sl="AJSAJS",bl="AFAFAF",xl=65,_l=73,Cl=79,wl=86,Ml=90;const Al={forward:Tl,inverse:function(e){var t=Pl(Il(e.toUpperCase()));if(t.lat&&t.lon)return[t.lon,t.lat,t.lon,t.lat];return[t.left,t.bottom,t.right,t.top]},toPoint:El};function Tl(e,t){return t=t||5,function(e,t){var s="00000"+e.easting,i="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(d=e.easting,f=e.northing,m=e.zoneNumber,y=Nl(m),g=Math.floor(d/1e5),v=Math.floor(f/1e5)%20,r=g,n=v,a=y,o=a-1,l=Sl.charCodeAt(o),h=bl.charCodeAt(o),u=l+r-1,c=h+n,p=!1,u>Ml&&(u=u-Ml+xl-1,p=!0),(u===_l||l<_l&&u>_l||(u>_l||l<_l)&&p)&&u++,(u===Cl||lCl||(u>Cl||lMl&&(u=u-Ml+xl-1),c>wl?(c=c-wl+xl-1,p=!0):p=!1,(c===_l||h<_l&&c>_l||(c>_l||h<_l)&&p)&&c++,(c===Cl||hCl||(c>Cl||hwl&&(c=c-wl+xl-1),String.fromCharCode(u)+String.fromCharCode(c))+s.substr(s.length-5,t)+i.substr(i.length-5,t);var r,n,a,o,l,h,u,c,p;var d,f,m,y,g,v}(function(e){var t,s,i,r,n,a,o,l=e.lat,h=e.lon,u=6378137,c=Ll(l),p=Ll(h);o=Math.floor((h+180)/6)+1,180===h&&(o=60);l>=56&&l<64&&h>=3&&h<12&&(o=32);l>=72&&l<84&&(h>=0&&h<9?o=31:h>=9&&h<21?o=33:h>=21&&h<33?o=35:h>=33&&h<42&&(o=37));a=Ll(6*(o-1)-180+3),.006739496752268451,t=u/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),s=Math.tan(c)*Math.tan(c),i=.006739496752268451*Math.cos(c)*Math.cos(c),r=Math.cos(c)*(p-a),n=u*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c));var d=.9996*t*(r+(1-s+i)*r*r*r/6+(5-18*s+s*s+72*i-.39089081163157013)*r*r*r*r*r/120)+5e5,f=.9996*(n+t*Math.tan(c)*(r*r/2+(5-s+9*i+4*i*i)*r*r*r*r/24+(61-58*s+s*s+600*i-2.2240339282485886)*r*r*r*r*r*r/720));l<0&&(f+=1e7);return{northing:Math.round(f),easting:Math.round(d),zoneNumber:o,zoneLetter:function(e){var t="Z";84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C");return t}(l)}}({lat:e[1],lon:e[0]}),t)}function El(e){var t=Pl(Il(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Ll(e){return e*(Math.PI/180)}function Ol(e){return e/Math.PI*180}function Pl(e){var t=e.northing,s=e.easting,i=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var n,a,o,l,h,u,c,p,d=6378137,f=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),m=s-5e5,y=t;i<"N"&&(y-=1e7),u=6*(r-1)-180+3,p=(c=y/.9996/6367449.145945056)+(3*f/2-27*f*f*f/32)*Math.sin(2*c)+(21*f*f/16-55*f*f*f*f/32)*Math.sin(4*c)+151*f*f*f/96*Math.sin(6*c),n=d/Math.sqrt(1-.00669438*Math.sin(p)*Math.sin(p)),a=Math.tan(p)*Math.tan(p),o=.006739496752268451*Math.cos(p)*Math.cos(p),l=.99330562*d/Math.pow(1-.00669438*Math.sin(p)*Math.sin(p),1.5),h=m/(.9996*n);var g=p-n*Math.tan(p)/l*(h*h/2-(5+3*a+10*o-4*o*o-.06065547077041606)*h*h*h*h/24+(61+90*a+298*o+45*a*a-1.6983531815716497-3*o*o)*h*h*h*h*h*h/720);g=Ol(g);var v,S=(h-(1+2*a+o)*h*h*h/6+(5-2*o+28*a-3*o*o+.05391597401814761+24*a*a)*h*h*h*h*h/120)/Math.cos(p);if(S=u+Ol(S),e.accuracy){var b=Pl({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});v={top:b.lat,right:b.lon,bottom:g,left:S}}else v={lat:g,lon:S};return v}function Nl(e){var t=e%vl;return 0===t&&(t=vl),t}function Il(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,s=e.length,i=null,r="",n=0;!/[A-Z]/.test(t=e.charAt(n));){if(n>=2)throw"MGRSPoint bad conversion from: "+e;r+=t,n++}var a=parseInt(r,10);if(0===n||n+3>s)throw"MGRSPoint bad conversion from: "+e;var o=e.charAt(n++);if(o<="A"||"B"===o||"Y"===o||o>="Z"||"I"===o||"O"===o)throw"MGRSPoint zone letter "+o+" not handled: "+e;i=e.substring(n,n+=2);for(var l=Nl(a),h=function(e,t){var s=Sl.charCodeAt(t-1),i=1e5,r=!1;for(;s!==e.charCodeAt(0);){if(++s===_l&&s++,s===Cl&&s++,s>Ml){if(r)throw"Bad character: "+e;s=xl,r=!0}i+=1e5}return i}(i.charAt(0),l),u=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var s=bl.charCodeAt(t-1),i=0,r=!1;for(;s!==e.charCodeAt(0);){if(++s===_l&&s++,s===Cl&&s++,s>wl){if(r)throw"Bad character: "+e;s=xl,r=!0}i+=1e5}return i}(i.charAt(1),l);u0&&(p=1e5/Math.pow(10,m),d=e.substring(n,n+m),y=parseFloat(d)*p,f=e.substring(n+m),g=parseFloat(f)*p),{easting:y+h,northing:g+u,zoneLetter:o,zoneNumber:a,accuracy:p}}function Fl(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function Dl(e,t,s){if(!(this instanceof Dl))return new Dl(e,t,s);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var i=e.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=e,this.y=t,this.z=s||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Dl.fromMGRS=function(e){return new Dl(El(e))},Dl.prototype.toMGRS=function(e){return Tl([this.x,this.y],e)};const Rl=Dl;var kl=1,Bl=.25,Gl=.046875,Ul=.01953125,jl=.01068115234375,zl=.75,Vl=.46875,Jl=.013020833333333334,ql=.007120768229166667,Hl=.3645833333333333,Wl=.005696614583333333,Yl=.3076171875;function Ql(e){var t=[];t[0]=kl-e*(Bl+e*(Gl+e*(Ul+e*jl))),t[1]=e*(zl-e*(Gl+e*(Ul+e*jl)));var s=e*e;return t[2]=s*(Vl-e*(Jl+e*ql)),s*=e,t[3]=s*(Hl-e*Wl),t[4]=s*e*Yl,t}function Xl(e,t,s,i){return s*=t,t*=t,i[0]*e-s*(i[1]+t*(i[2]+t*(i[3]+t*i[4])))}var Kl=20;function Zl(e,t,s){for(var i=1/(1-t),r=e,n=Kl;n;--n){var a=Math.sin(r),o=1-t*a*a;if(r-=o=(Xl(r,a,Math.cos(r),s)-e)*(o*Math.sqrt(o))*i,Math.abs(o)so?Math.tan(n):0,f=Math.pow(d,2),m=Math.pow(f,2);t=1-this.es*Math.pow(o,2),h/=Math.sqrt(t);var y=Xl(n,o,l,this.en);s=this.a*(this.k0*h*(1+u/6*(1-f+c+u/20*(5-18*f+m+14*c-58*f*c+u/42*(61+179*m-m*f-479*f)))))+this.x0,i=this.a*(this.k0*(y-this.ml0+o*a*h/2*(1+u/12*(5-f+9*c+4*p+u/30*(61+m-58*f+270*c-330*f*c+u/56*(1385+543*m-m*f-3111*f))))))+this.y0}else{var g=l*Math.sin(a);if(Math.abs(Math.abs(g)-1)=1){if(g-1>so)return 93;i=0}else i=Math.acos(i);n<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return e.x=s,e.y=i,e},inverse:function(e){var t,s,i,r,n=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(s=Zl(t=this.ml0+a/this.k0,this.es,this.en),Math.abs(s)so?Math.tan(s):0,u=this.ep2*Math.pow(l,2),c=Math.pow(u,2),p=Math.pow(h,2),d=Math.pow(p,2);t=1-this.es*Math.pow(o,2);var f=n*Math.sqrt(t)/this.k0,m=Math.pow(f,2);i=s-(t*=h)*m/(1-this.es)*.5*(1-m/12*(5+3*p-9*u*p+u-4*c-m/30*(61+90*p-252*u*p+45*d+46*u-m/56*(1385+3633*p+4095*d+1574*d*p)))),r=Do(this.long0+f*(1-m/6*(1+2*p+u-m/20*(5+28*p+24*d+8*u*p+6*u-m/42*(61+662*p+1320*d+720*d*p))))/l)}else i=Za*Fo(a),r=0;else{var y=Math.exp(n/this.k0),g=.5*(y-1/y),v=this.lat0+a/this.k0,S=Math.cos(v);t=Math.sqrt((1-Math.pow(S,2))/(1+Math.pow(g,2))),i=Math.asin(t),a<0&&(i=-i),r=0===g&&0===S?0:Do(Math.atan2(g,S)+this.long0)}return e.x=r,e.y=i,e},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function eh(e){var t=Math.exp(e);return t=(t-1/t)/2}function th(e,t){e=Math.abs(e),t=Math.abs(t);var s=Math.max(e,t),i=Math.min(e,t)/(s||1);return s*Math.sqrt(1+Math.pow(i,2))}function sh(e){var t=Math.abs(e);return t=function(e){var t=1+e,s=t-1;return 0===s?e:e*Math.log(t)/s}(t*(1+t/(th(1,t)+1))),e<0?-t:t}function ih(e,t){for(var s,i=2*Math.cos(2*t),r=e.length-1,n=e[r],a=0;--r>=0;)s=i*n-a+e[r],a=n,n=s;return t+s*Math.sin(2*t)}function rh(e,t,s){for(var i,r,n=Math.sin(t),a=Math.cos(t),o=eh(s),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(s),h=2*a*l,u=-2*n*o,c=e.length-1,p=e[c],d=0,f=0,m=0;--c>=0;)i=f,r=d,p=h*(f=p)-i-u*(d=m)+e[c],m=u*f-r+h*d;return[(h=n*l)*p-(u=a*o)*m,h*m+u*p]}const nh={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&($l.init.apply(this),this.forward=$l.forward,this.inverse=$l.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),s=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),s*=t,this.cgb[1]=s*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=s*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),s*=t,this.cgb[2]=s*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=s*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),s*=t,this.cgb[3]=s*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=s*(1237/630+t*(t*(-24832/14175)-2.4)),s*=t,this.cgb[4]=s*(4174/315+t*(-144838/6237)),this.cbg[4]=s*(-734/315+t*(109598/31185)),s*=t,this.cgb[5]=s*(601676/22275),this.cbg[5]=s*(444337/155925),s=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+s*(.25+s*(1/64+s/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=s*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=s*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),s*=t,this.utg[2]=s*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=s*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),s*=t,this.utg[3]=s*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=s*(49561/161280+t*(-179/168+t*(6601661/7257600))),s*=t,this.utg[4]=s*(-4583/161280+t*(108847/3991680)),this.gtu[4]=s*(34729/80640+t*(-3418889/1995840)),s*=t,this.utg[5]=-.03233083094085698*s,this.gtu[5]=.6650675310896665*s;var i=ih(this.cbg,this.lat0);this.Zb=-this.Qn*(i+function(e,t){for(var s,i=2*Math.cos(t),r=e.length-1,n=e[r],a=0;--r>=0;)s=i*n-a+e[r],a=n,n=s;return Math.sin(t)*s}(this.gtu,2*i))},forward:function(e){var t=Do(e.x-this.long0),s=e.y;s=ih(this.cbg,s);var i=Math.sin(s),r=Math.cos(s),n=Math.sin(t),a=Math.cos(t);s=Math.atan2(i,a*r),t=Math.atan2(n*r,th(i,r*a)),t=sh(Math.tan(t));var o,l,h=rh(this.gtu,2*s,2*t);return s+=h[0],t+=h[1],Math.abs(t)<=2.623395162778?(o=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*s+this.Zb)+this.y0):(o=1/0,l=1/0),e.x=o,e.y=l,e},inverse:function(e){var t,s,i=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,i/=this.Qn,Math.abs(i)<=2.623395162778){var n=rh(this.utg,2*r,2*i);r+=n[0],i+=n[1],i=Math.atan(eh(i));var a=Math.sin(r),o=Math.cos(r),l=Math.sin(i),h=Math.cos(i);r=Math.atan2(a*h,th(l,h*o)),t=Do((i=Math.atan2(l,h*o))+this.long0),s=ih(this.cgb,r)}else t=1/0,s=1/0;return e.x=t,e.y=s,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]};const ah={init:function(){var e=function(e,t){if(void 0===e){if((e=Math.floor(30*(Do(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e}(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*io,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,nh.init.apply(this),this.forward=nh.forward,this.inverse=nh.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function oh(e,t){return Math.pow((1-e)/(1+e),t)}var lh=20;const hh={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+no)/(Math.pow(Math.tan(.5*this.lat0+no),this.C)*oh(this.e*e,this.ratexp))},forward:function(e){var t=e.x,s=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+no),this.C)*oh(this.e*Math.sin(s),this.ratexp))-Za,e.x=this.C*t,e},inverse:function(e){for(var t=e.x/this.C,s=e.y,i=Math.pow(Math.tan(.5*s+no)/this.K,1/this.C),r=lh;r>0&&(s=2*Math.atan(i*oh(this.e*Math.sin(e.y),-.5*this.e))-Za,!(Math.abs(s-e.y)<1e-14));--r)e.y=s;return r?(e.x=t,e.y=s,e):null},names:["gauss"]};const uh={init:function(){hh.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,s,i,r;return e.x=Do(e.x-this.long0),hh.forward.apply(this,[e]),t=Math.sin(e.y),s=Math.cos(e.y),i=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*s*i),e.x=r*s*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*s*i),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,s,i,r,n;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,n=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(n,this.R2);t=Math.sin(a),s=Math.cos(a),r=Math.asin(s*this.sinc0+e.y*t*this.cosc0/n),i=Math.atan2(e.x*t,n*this.cosc0*s-e.y*this.sinc0*t)}else r=this.phic0,i=0;return e.x=i,e.y=r,hh.inverse.apply(this,[e]),e.x=Do(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};const ch={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=so&&(this.k0=.5*(1+Fo(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=so&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=so&&(this.k0=.5*this.cons*Io(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ro(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Io(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Za,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,s,i,r,n,a,o=e.x,l=e.y,h=Math.sin(l),u=Math.cos(l),c=Do(o-this.long0);return Math.abs(Math.abs(o-this.long0)-Math.PI)<=so&&Math.abs(l+this.lat0)<=so?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*h+this.coslat0*u*Math.cos(c)),e.x=this.a*t*u*Math.sin(c)+this.x0,e.y=this.a*t*(this.coslat0*h-this.sinlat0*u*Math.cos(c))+this.y0,e):(s=2*Math.atan(this.ssfn_(l,h,this.e))-Za,r=Math.cos(s),i=Math.sin(s),Math.abs(this.coslat0)<=so?(n=Ro(this.e,l*this.con,this.con*h),a=2*this.a*this.k0*n/this.cons,e.x=this.x0+a*Math.sin(o-this.long0),e.y=this.y0-this.con*a*Math.cos(o-this.long0),e):(Math.abs(this.sinlat0)0?Do(this.long0+Math.atan2(e.x,-1*e.y)):Do(this.long0+Math.atan2(e.x,e.y)):Do(this.long0+Math.atan2(e.x*Math.sin(o),a*this.coslat0*Math.cos(o)-e.y*this.sinlat0*Math.sin(o))),e.x=t,e.y=s,e)}if(Math.abs(this.coslat0)<=so){if(a<=so)return s=this.lat0,t=this.long0,e.x=t,e.y=s,e;e.x*=this.con,e.y*=this.con,i=a*this.cons/(2*this.a*this.k0),s=this.con*ko(this.e,i),t=this.con*Do(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=so?n=this.X0:(n=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/a),t=Do(this.long0+Math.atan2(e.x*Math.sin(r),a*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),s=-1*ko(this.e,Math.tan(.5*(Za+n)));return e.x=t,e.y=s,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,t,s){return t*=s,Math.tan(.5*(Za+e))*Math.pow((1-t)/(1+t),.5*s)}};const ph={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),s=this.a,i=1/this.rf,r=2*i-Math.pow(i,2),n=this.e=Math.sqrt(r);this.R=this.k0*s*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+n*t)/(1-n*t));this.K=a-this.alpha*o+this.alpha*n/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),s=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),i=-this.alpha*(t+s)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),n=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(n)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(n))),o=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(n));return e.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,e.x=this.R*a+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,s=e.y-this.y0,i=t/this.R,r=2*(Math.atan(Math.exp(s/this.R))-Math.PI/4),n=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),o=this.lambda0+a/this.alpha,l=0,h=n,u=-1e3,c=0;Math.abs(h-u)>1e-7;){if(++c>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+n/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=o,e.y=h,e},names:["somerc"]};var dh=1e-7;const fh={init:function(){var e,t,s,i,r,n,a,o,l,h,u,c,p,d=0,f=0,m=0,y=0,g=0,v=0,S=0;this.no_off=(p="object"==typeof(c=this).PROJECTION?Object.keys(c.PROJECTION)[0]:c.PROJECTION,"no_uoff"in c||"no_off"in c||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(p)),this.no_rot="no_rot"in this;var b=!1;"alpha"in this&&(b=!0);var x=!1;if("rectified_grid_angle"in this&&(x=!0),b&&(S=this.alpha),x&&(d=this.rectified_grid_angle*io),b||x)f=this.longc;else if(m=this.long1,g=this.lat1,y=this.long2,v=this.lat2,Math.abs(g-v)<=dh||(e=Math.abs(g))<=dh||Math.abs(e-Za)<=dh||Math.abs(Math.abs(this.lat0)-Za)<=dh||Math.abs(Math.abs(v)-Za)<=dh)throw new Error;var _=1-this.es;t=Math.sqrt(_),Math.abs(this.lat0)>so?(o=Math.sin(this.lat0),s=Math.cos(this.lat0),e=1-this.es*o*o,this.B=s*s,this.B=Math.sqrt(1+this.es*this.B*this.B/_),this.A=this.B*this.k0*t/e,(r=(i=this.B*t/(s*Math.sqrt(e)))*i-1)<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=i,this.E*=Math.pow(Ro(this.e,this.lat0,o),this.B)):(this.B=1/t,this.A=this.k0,this.E=i=r=1),b||x?(b?(u=Math.asin(Math.sin(S)/i),x||(d=S)):(u=d,S=Math.asin(i*Math.sin(u))),this.lam0=f-Math.asin(.5*(r-1/r)*Math.tan(u))/this.B):(n=Math.pow(Ro(this.e,g,Math.sin(g)),this.B),a=Math.pow(Ro(this.e,v,Math.sin(v)),this.B),r=this.E/n,l=(a-n)/(a+n),h=((h=this.E*this.E)-a*n)/(h+a*n),(e=m-y)<-Math.pi?y-=ao:e>Math.pi&&(y+=ao),this.lam0=Do(.5*(m+y)-Math.atan(h*Math.tan(.5*this.B*(m-y))/l)/this.B),u=Math.atan(2*Math.sin(this.B*Do(m-this.lam0))/(r-1/r)),d=S=Math.asin(i*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(d),this.cosrot=Math.cos(d),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(S))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(no-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(no+r))},forward:function(e){var t,s,i,r,n,a,o,l,h={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-Za)>so){if(t=.5*((n=this.E/Math.pow(Ro(this.e,e.y,Math.sin(e.y)),this.B))-(a=1/n)),s=.5*(n+a),r=Math.sin(this.B*e.x),i=(t*this.singam-r*this.cosgam)/s,Math.abs(Math.abs(i)-1)0?this.v_pole_n:this.v_pole_s,o=this.ArB*e.y;return this.no_rot?(h.x=o,h.y=l):(o-=this.u_0,h.x=l*this.cosrot+o*this.sinrot,h.y=o*this.cosrot-l*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h},inverse:function(e){var t,s,i,r,n,a,o,l={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(s=e.y,t=e.x):(s=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),r=.5*((i=Math.exp(-this.BrA*s))-1/i),n=.5*(i+1/i),o=((a=Math.sin(this.BrA*t))*this.cosgam+r*this.singam)/n,Math.abs(Math.abs(o)-1)so?this.ns=Math.log(i/o)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=i/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,s=e.y;Math.abs(2*Math.abs(s)-Math.PI)<=so&&(s=Fo(s)*(Za-2*so));var i,r,n=Math.abs(Math.abs(s)-Za);if(n>so)i=Ro(this.e,s,Math.sin(s)),r=this.a*this.f0*Math.pow(i,this.ns);else{if((n=s*this.ns)<=0)return null;r=0}var a=this.ns*Do(t-this.long0);return e.x=this.k0*(r*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,e},inverse:function(e){var t,s,i,r,n,a=(e.x-this.x0)/this.k0,o=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),s=1):(t=-Math.sqrt(a*a+o*o),s=-1);var l=0;if(0!==t&&(l=Math.atan2(s*a,s*o)),0!==t||this.ns>0){if(s=1/this.ns,i=Math.pow(t/(this.a*this.f0),s),-9999===(r=ko(this.e,i)))return null}else r=-Za;return n=Do(l/this.ns+this.long0),e.x=n,e.y=r,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};const yh={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,s,i,r,n,a,o,l=e.x,h=e.y,u=Do(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),s=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),i=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(i)),n=Math.asin(Math.cos(s)*Math.sin(i)/Math.cos(r)),a=this.n*n,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=o*Math.cos(a)/1,e.x=o*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,s,i,r,n,a,o,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),n=Math.sqrt(e.x*e.x+e.y*e.y),r=Math.atan2(e.y,e.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/n,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),s=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(t)),e.x=this.long0-s/this.alfa,a=t,o=0;var h=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(o=1),a=e.y,h+=1}while(0===o&&h<15);return h>=15?null:e},names:["Krovak","krovak"]};function gh(e,t,s,i,r){return e*r-t*Math.sin(2*r)+s*Math.sin(4*r)-i*Math.sin(6*r)}function vh(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function Sh(e){return.375*e*(1+.25*e*(1+.46875*e))}function bh(e){return.05859375*e*e*(1+.75*e)}function xh(e){return e*e*e*(35/3072)}function _h(e,t,s){var i=t*s;return e/Math.sqrt(1-i*i)}function Ch(e){return Math.abs(e)1e-7?(1-e*e)*(t/(1-(s=e*t)*s)-.5/e*Math.log((1-s)/(1+s))):2*t}var Th=.3333333333333333,Eh=.17222222222222222,Lh=.10257936507936508,Oh=.06388888888888888,Ph=.0664021164021164,Nh=.016415012942191543;const Ih={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-Za)0)switch(this.qp=Ah(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,s=[];return s[0]=e*Th,t=e*e,s[0]+=t*Eh,s[1]=t*Oh,t*=e,s[0]+=t*Lh,s[1]+=t*Ph,s[2]=t*Nh,s}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Ah(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var t,s,i,r,n,a,o,l,h,u,c=e.x,p=e.y;if(c=Do(c-this.long0),this.sphere){if(n=Math.sin(p),u=Math.cos(p),i=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((s=this.mode===this.EQUIT?1+u*i:1+this.sinph0*n+this.cosph0*u*i)<=so)return null;t=(s=Math.sqrt(2/s))*u*Math.sin(c),s*=this.mode===this.EQUIT?n:this.cosph0*n-this.sinph0*u*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(p+this.lat0)=0?(t=(h=Math.sqrt(a))*r,s=i*(this.mode===this.S_POLE?h:-h)):t=s=0}}return e.x=this.a*t+this.x0,e.y=this.a*s+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,s,i,r,n,a,o,l,h,u,c=e.x/this.a,p=e.y/this.a;if(this.sphere){var d,f=0,m=0;if((s=.5*(d=Math.sqrt(c*c+p*p)))>1)return null;switch(s=2*Math.asin(s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=Math.sin(s),f=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(d)<=so?0:Math.asin(p*m/d),c*=m,p=f*d;break;case this.OBLIQ:s=Math.abs(d)<=so?this.lat0:Math.asin(f*this.sinph0+p*m*this.cosph0/d),c*=m*this.cosph0,p=(f-Math.sin(s)*this.sinph0)*d;break;case this.N_POLE:p=-p,s=Za-s;break;case this.S_POLE:s-=Za}t=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(c,p):0}else{if(o=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c/=this.dd,p*=this.dd,(a=Math.sqrt(c*c+p*p))1&&(e=e>1?1:-1),Math.asin(e)}const Dh={init:function(){Math.abs(this.lat1+this.lat2)so?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,s=e.y;this.sin_phi=Math.sin(s),this.cos_phi=Math.cos(s);var i=Ah(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,n=this.ns0*Do(t-this.long0),a=r*Math.sin(n)+this.x0,o=this.rh-r*Math.cos(n)+this.y0;return e.x=a,e.y=o,e},inverse:function(e){var t,s,i,r,n,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),i=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),i=-1),r=0,0!==t&&(r=Math.atan2(i*e.x,i*e.y)),i=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-i*i)/(2*this.ns0)):(s=(this.c-i*i)/this.ns0,a=this.phi1z(this.e3,s)),n=Do(r/this.ns0+this.long0),e.x=n,e.y=a,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var s,i,r,n,a,o=Fh(.5*t);if(e0||Math.abs(n)<=so?(a=this.x0+1*this.a*s*Math.sin(i)/n,o=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*s*r)/n):(a=this.x0+this.infinity_dist*s*Math.sin(i),o=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*s*r)),e.x=a,e.y=o,e},inverse:function(e){var t,s,i,r,n,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),s=Math.sin(r),a=Fh((i=Math.cos(r))*this.sin_p14+e.y*s*this.cos_p14/t),n=Math.atan2(e.x*s,t*this.cos_p14*i-e.y*this.sin_p14*s),n=Do(this.long0+n)):(a=this.phic0,n=0),e.x=n,e.y=a,e},names:["gnom"]};const kh={init:function(){this.sphere||(this.k0=Io(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,s,i=e.x,r=e.y,n=Do(i-this.long0);if(this.sphere)t=this.x0+this.a*n*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=Ah(this.e,Math.sin(r));t=this.x0+this.a*this.k0*n,s=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=s,e},inverse:function(e){var t,s;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Do(this.long0+e.x/this.a/Math.cos(this.lat_ts)),s=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(s=function(e,t){var s=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-s)<1e-6)return t<0?-1*Za:Za;for(var i,r,n,a,o=Math.asin(.5*t),l=0;l<30;l++)if(r=Math.sin(o),n=Math.cos(o),a=e*r,o+=i=Math.pow(1-a*a,2)/(2*n)*(t/(1-e*e)-r/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(i)<=1e-10)return o;return NaN}(this.e,2*e.y*this.k0/this.a),t=Do(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=s,e},names:["cea"]};const Bh={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,s=e.y,i=Do(t-this.long0),r=Ch(s-this.lat0);return e.x=this.x0+this.a*i*this.rc,e.y=this.y0+this.a*r,e},inverse:function(e){var t=e.x,s=e.y;return e.x=Do(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=Ch(this.lat0+(s-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var Gh=20;const Uh={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=vh(this.es),this.e1=Sh(this.es),this.e2=bh(this.es),this.e3=xh(this.es),this.ml0=this.a*gh(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,s,i,r=e.x,n=e.y,a=Do(r-this.long0);if(i=a*Math.sin(n),this.sphere)Math.abs(n)<=so?(t=this.a*a,s=-1*this.a*this.lat0):(t=this.a*Math.sin(i)/Math.tan(n),s=this.a*(Ch(n-this.lat0)+(1-Math.cos(i))/Math.tan(n)));else if(Math.abs(n)<=so)t=this.a*a,s=-1*this.ml0;else{var o=_h(this.a,this.e,Math.sin(n))/Math.tan(n);t=o*Math.sin(i),s=this.a*gh(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+o*(1-Math.cos(i))}return e.x=t+this.x0,e.y=s+this.y0,e},inverse:function(e){var t,s,i,r,n,a,o,l,h;if(i=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=so)t=Do(i/this.a+this.long0),s=0;else{var u;for(a=this.lat0+r/this.a,o=i*i/this.a/this.a+a*a,l=a,n=Gh;n;--n)if(l+=h=-1*(a*(l*(u=Math.tan(l))+1)-l-.5*(l*l+o)*u)/((l-a)/u-1),Math.abs(h)<=so){s=l;break}t=Do(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(s))}else if(Math.abs(r+this.ml0)<=so)s=0,t=Do(this.long0+i/this.a);else{var c,p,d,f,m;for(a=(this.ml0+r)/this.a,o=i*i/this.a/this.a+a*a,l=a,n=Gh;n;--n)if(m=this.e*Math.sin(l),c=Math.sqrt(1-m*m)*Math.tan(l),p=this.a*gh(this.e0,this.e1,this.e2,this.e3,l),d=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=h=(a*(c*(f=p/this.a)+1)-f-.5*c*(f*f+o))/(this.es*Math.sin(2*l)*(f*f+o-2*a*f)/(4*c)+(a-f)*(c*d-2/Math.sin(2*l))-d),Math.abs(h)<=so){s=l;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(s),2))*Math.tan(s),t=Do(this.long0+Math.asin(i*c/this.a)/Math.sin(s))}return e.x=t,e.y=s,e},names:["Polyconic","poly"]};const jh={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var t,s=e.x,i=e.y-this.lat0,r=s-this.long0,n=i/Ka*1e-5,a=r,o=1,l=0;for(t=1;t<=10;t++)o*=n,l+=this.A[t]*o;var h,u=l,c=a,p=1,d=0,f=0,m=0;for(t=1;t<=6;t++)h=d*u+p*c,p=p*u-d*c,d=h,f=f+this.B_re[t]*p-this.B_im[t]*d,m=m+this.B_im[t]*p+this.B_re[t]*d;return e.x=m*this.a+this.x0,e.y=f*this.a+this.y0,e},inverse:function(e){var t,s,i=e.x,r=e.y,n=i-this.x0,a=(r-this.y0)/this.a,o=n/this.a,l=1,h=0,u=0,c=0;for(t=1;t<=6;t++)s=h*a+l*o,l=l*a-h*o,h=s,u=u+this.C_re[t]*l-this.C_im[t]*h,c=c+this.C_im[t]*l+this.C_re[t]*h;for(var p=0;p.999999999999&&(s=.999999999999),t=Math.asin(s);var i=Do(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),s=(2*t+Math.sin(2*t))/Math.PI,Math.abs(s)>1&&(s=1);var r=Math.asin(s);return e.x=i,e.y=r,e},names:["Mollweide","moll"]};const Hh={init:function(){Math.abs(this.lat1+this.lat2)=0?(s=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(s=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var n=0;return 0!==s&&(n=Math.atan2(t*e.x,t*e.y)),this.sphere?(r=Do(this.long0+n/this.ns),i=Ch(this.g-s/this.a),e.x=r,e.y=i,e):(i=wh(this.g-s/this.a,this.e0,this.e1,this.e2,this.e3),r=Do(this.long0+n/this.ns),e.x=r,e.y=i,e)},names:["Equidistant_Conic","eqdc"]};const Wh={init:function(){this.R=this.a},forward:function(e){var t,s,i=e.x,r=e.y,n=Do(i-this.long0);Math.abs(r)<=so&&(t=this.x0+this.R*n,s=this.y0);var a=Fh(2*Math.abs(r/Math.PI));(Math.abs(n)<=so||Math.abs(Math.abs(r)-Za)<=so)&&(t=this.x0,s=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var o=.5*Math.abs(Math.PI/n-n/Math.PI),l=o*o,h=Math.sin(a),u=Math.cos(a),c=u/(h+u-1),p=c*c,d=c*(2/h-1),f=d*d,m=Math.PI*this.R*(o*(c-f)+Math.sqrt(l*(c-f)*(c-f)-(f+l)*(p-f)))/(f+l);n<0&&(m=-m),t=this.x0+m;var y=l+c;return m=Math.PI*this.R*(d*y-o*Math.sqrt((f+l)*(l+1)-y*y))/(f+l),s=r>=0?this.y0+m:this.y0-m,e.x=t,e.y=s,e},inverse:function(e){var t,s,i,r,n,a,o,l,h,u,c,p;return e.x-=this.x0,e.y-=this.y0,c=Math.PI*this.R,n=(i=e.x/c)*i+(r=e.y/c)*r,c=3*(r*r/(l=-2*(a=-Math.abs(r)*(1+n))+1+2*r*r+n*n)+(2*(o=a-2*r*r+i*i)*o*o/l/l/l-9*a*o/l/l)/27)/(h=(a-o*o/3/l)/l)/(u=2*Math.sqrt(-h/3)),Math.abs(c)>1&&(c=c>=0?1:-1),p=Math.acos(c)/3,s=e.y>=0?(-u*Math.cos(p+Math.PI/3)-o/3/l)*Math.PI:-(-u*Math.cos(p+Math.PI/3)-o/3/l)*Math.PI,t=Math.abs(i)2*Za*this.a)return;return s=t/this.a,i=Math.sin(s),r=Math.cos(s),n=this.long0,Math.abs(t)<=so?a=this.lat0:(a=Fh(r*this.sin_p12+e.y*i*this.cos_p12/t),o=Math.abs(this.lat0)-Za,n=Math.abs(o)<=so?this.lat0>=0?Do(this.long0+Math.atan2(e.x,-e.y)):Do(this.long0-Math.atan2(-e.x,e.y)):Do(this.long0+Math.atan2(e.x*i,t*this.cos_p12*r-e.y*this.sin_p12*i))),e.x=n,e.y=a,e}return l=vh(this.es),h=Sh(this.es),u=bh(this.es),c=xh(this.es),Math.abs(this.sin_p12-1)<=so?(a=wh(((p=this.a*gh(l,h,u,c,Za))-(t=Math.sqrt(e.x*e.x+e.y*e.y)))/this.a,l,h,u,c),n=Do(this.long0+Math.atan2(e.x,-1*e.y)),e.x=n,e.y=a,e):Math.abs(this.sin_p12+1)<=so?(p=this.a*gh(l,h,u,c,Za),a=wh(((t=Math.sqrt(e.x*e.x+e.y*e.y))-p)/this.a,l,h,u,c),n=Do(this.long0+Math.atan2(e.x,e.y)),e.x=n,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),m=Math.atan2(e.x,e.y),d=_h(this.a,this.e,this.sin_p12),y=Math.cos(m),v=-(g=this.e*this.cos_p12*y)*g/(1-this.es),S=3*this.es*(1-v)*this.sin_p12*this.cos_p12*y/(1-this.es),_=1-v*(x=(b=t/d)-v*(1+v)*Math.pow(b,3)/6-S*(1+3*v)*Math.pow(b,4)/24)*x/2-b*x*x*x/6,f=Math.asin(this.sin_p12*Math.cos(x)+this.cos_p12*Math.sin(x)*y),n=Do(this.long0+Math.asin(Math.sin(m)*Math.sin(x)/Math.cos(f))),C=Math.sin(f),a=Math.atan2((C-this.es*_*this.sin_p12)*Math.tan(f),C*(1-this.es)),e.x=n,e.y=a,e)},names:["Azimuthal_Equidistant","aeqd"]};const Qh={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,s,i,r,n,a,o,l=e.x,h=e.y;return i=Do(l-this.long0),t=Math.sin(h),s=Math.cos(h),r=Math.cos(i),((n=this.sin_p14*t+this.cos_p14*s*r)>0||Math.abs(n)<=so)&&(a=1*this.a*s*Math.sin(i),o=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*s*r)),e.x=a,e.y=o,e},inverse:function(e){var t,s,i,r,n,a,o;return e.x-=this.x0,e.y-=this.y0,s=Fh((t=Math.sqrt(e.x*e.x+e.y*e.y))/this.a),i=Math.sin(s),r=Math.cos(s),a=this.long0,Math.abs(t)<=so?(o=this.lat0,e.x=a,e.y=o,e):(o=Fh(r*this.sin_p14+e.y*i*this.cos_p14/t),n=Math.abs(this.lat0)-Za,Math.abs(n)<=so?(a=this.lat0>=0?Do(this.long0+Math.atan2(e.x,-e.y)):Do(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=o,e):(a=Do(this.long0+Math.atan2(e.x*i,t*this.cos_p14*r-e.y*this.sin_p14*i)),e.x=a,e.y=o,e))},names:["ortho"]};var Xh={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Kh={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Zh(e,t,s,i){var r;return eno&&r<=Za+no?(i.value=Kh.AREA_1,r-=Za):r>Za+no||r<=-(Za+no)?(i.value=Kh.AREA_2,r=r>=0?r-oo:r+oo):(i.value=Kh.AREA_3,r+=Za)),r}function $h(e,t){var s=e+t;return s<-oo?s+=ao:s>+oo&&(s-=ao),s}const eu={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Za-no/2?this.face=Xh.TOP:this.lat0<=-(Za-no/2)?this.face=Xh.BOTTOM:Math.abs(this.long0)<=no?this.face=Xh.FRONT:Math.abs(this.long0)<=Za+no?this.face=this.long0>0?Xh.RIGHT:Xh.LEFT:this.face=Xh.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var t,s,i,r,n,a,o={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,s=e.x,this.face===Xh.TOP)r=Za-t,s>=no&&s<=Za+no?(l.value=Kh.AREA_0,i=s-Za):s>Za+no||s<=-(Za+no)?(l.value=Kh.AREA_1,i=s>0?s-oo:s+oo):s>-(Za+no)&&s<=-no?(l.value=Kh.AREA_2,i=s+Za):(l.value=Kh.AREA_3,i=s);else if(this.face===Xh.BOTTOM)r=Za+t,s>=no&&s<=Za+no?(l.value=Kh.AREA_0,i=-s+Za):s=-no?(l.value=Kh.AREA_1,i=-s):s<-no&&s>=-(Za+no)?(l.value=Kh.AREA_2,i=-s-Za):(l.value=Kh.AREA_3,i=s>0?-s+oo:-s-oo);else{var h,u,c,p,d,f;this.face===Xh.RIGHT?s=$h(s,+Za):this.face===Xh.BACK?s=$h(s,+oo):this.face===Xh.LEFT&&(s=$h(s,-Za)),p=Math.sin(t),d=Math.cos(t),f=Math.sin(s),h=d*Math.cos(s),u=d*f,c=p,this.face===Xh.FRONT?i=Zh(r=Math.acos(h),c,u,l):this.face===Xh.RIGHT?i=Zh(r=Math.acos(u),c,-h,l):this.face===Xh.BACK?i=Zh(r=Math.acos(-h),c,-u,l):this.face===Xh.LEFT?i=Zh(r=Math.acos(-u),c,h,l):(r=i=0,l.value=Kh.AREA_0)}return a=Math.atan(12/oo*(i+Math.acos(Math.sin(i)*Math.cos(no))-Za)),n=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(i))))),l.value===Kh.AREA_1?a+=Za:l.value===Kh.AREA_2?a+=oo:l.value===Kh.AREA_3&&(a+=1.5*oo),o.x=n*Math.cos(a),o.y=n*Math.sin(a),o.x=o.x*this.a+this.x0,o.y=o.y*this.a+this.y0,e.x=o.x,e.y=o.y,e},inverse:function(e){var t,s,i,r,n,a,o,l,h,u,c,p,d={lam:0,phi:0},f={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,s=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?f.value=Kh.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(f.value=Kh.AREA_1,t-=Za):e.x<0&&-e.x>=Math.abs(e.y)?(f.value=Kh.AREA_2,t=t<0?t+oo:t-oo):(f.value=Kh.AREA_3,t+=Za),h=oo/12*Math.tan(t),n=Math.sin(h)/(Math.cos(h)-1/Math.sqrt(2)),a=Math.atan(n),(o=1-(i=Math.cos(t))*i*(r=Math.tan(s))*r*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?o=-1:o>1&&(o=1),this.face===Xh.TOP)l=Math.acos(o),d.phi=Za-l,f.value===Kh.AREA_0?d.lam=a+Za:f.value===Kh.AREA_1?d.lam=a<0?a+oo:a-oo:f.value===Kh.AREA_2?d.lam=a-Za:d.lam=a;else if(this.face===Xh.BOTTOM)l=Math.acos(o),d.phi=l-Za,f.value===Kh.AREA_0?d.lam=-a+Za:f.value===Kh.AREA_1?d.lam=-a:f.value===Kh.AREA_2?d.lam=-a-Za:d.lam=a<0?-a-oo:-a+oo;else{var m,y,g;h=(m=o)*m,y=(h+=(g=h>=1?0:Math.sqrt(1-h)*Math.sin(a))*g)>=1?0:Math.sqrt(1-h),f.value===Kh.AREA_1?(h=y,y=-g,g=h):f.value===Kh.AREA_2?(y=-y,g=-g):f.value===Kh.AREA_3&&(h=y,y=g,g=-h),this.face===Xh.RIGHT?(h=m,m=-y,y=h):this.face===Xh.BACK?(m=-m,y=-y):this.face===Xh.LEFT&&(h=m,m=y,y=-h),d.phi=Math.acos(-g)-Za,d.lam=Math.atan2(y,m),this.face===Xh.RIGHT?d.lam=$h(d.lam,-Za):this.face===Xh.BACK?d.lam=$h(d.lam,-oo):this.face===Xh.LEFT&&(d.lam=$h(d.lam,+Za))}return 0!==this.es&&(u=d.phi<0?1:0,c=Math.tan(d.phi),p=this.b/Math.sqrt(c*c+this.one_minus_f_squared),d.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),u&&(d.phi=-d.phi)),d.lam+=this.long0,e.x=d.lam,e.y=d.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var tu=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],su=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],iu=.8487,ru=1.3523,nu=ro/5,au=1/nu,ou=18,lu=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},hu=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};const uu={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=Do(e.x-this.long0),s=Math.abs(e.y),i=Math.floor(s*nu);i<0?i=0:i>=ou&&(i=ou-1),s=ro*(s-au*i);var r={x:lu(tu[i],s)*t,y:lu(su[i],s)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*iu+this.x0,r.y=r.y*this.a*ru+this.y0,r},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*iu),y:Math.abs(e.y-this.y0)/(this.a*ru)};if(t.y>=1)t.x/=tu[ou][0],t.y=e.y<0?-Za:Za;else{var s=Math.floor(t.y*ou);for(s<0?s=0:s>=ou&&(s=ou-1);;)if(su[s][0]>t.y)--s;else{if(!(su[s+1][0]<=t.y))break;++s}var i=su[s],r=5*(t.y-i[0])/(su[s+1][0]-i[0]);r=function(e,t,s,i){for(var r=t;i;--i){var n=e(r);if(r-=n,Math.abs(n)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(e){var t,s,i,r,n=e.x,a=e.y;if(n-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var o=this.radius_p/th(this.radius_p*Math.cos(a),Math.sin(a));if(s=o*Math.cos(n)*Math.cos(a),i=o*Math.sin(n)*Math.cos(a),r=o*Math.sin(a),(this.radius_g-s)*s-i*i-r*r*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;t=this.radius_g-s,this.flip_axis?(e.x=this.radius_g_1*Math.atan(i/th(r,t)),e.y=this.radius_g_1*Math.atan(r/t)):(e.x=this.radius_g_1*Math.atan(i/t),e.y=this.radius_g_1*Math.atan(r/th(i,t)))}else"sphere"===this.shape&&(t=Math.cos(a),s=Math.cos(n)*t,i=Math.sin(n)*t,r=Math.sin(a),t=this.radius_g-s,this.flip_axis?(e.x=this.radius_g_1*Math.atan(i/th(r,t)),e.y=this.radius_g_1*Math.atan(r/t)):(e.x=this.radius_g_1*Math.atan(i/t),e.y=this.radius_g_1*Math.atan(r/th(i,t))));return e.x=e.x*this.a,e.y=e.y*this.a,e},inverse:function(e){var t,s,i,r,n=-1,a=0,o=0;if(e.x=e.x/this.a,e.y=e.y/this.a,"ellipse"===this.shape){this.flip_axis?(o=Math.tan(e.y/this.radius_g_1),a=Math.tan(e.x/this.radius_g_1)*th(1,o)):(a=Math.tan(e.x/this.radius_g_1),o=Math.tan(e.y/this.radius_g_1)*th(1,a));var l=o/this.radius_p;if(t=a*a+l*l+n*n,(i=(s=2*this.radius_g*n)*s-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;r=(-s-Math.sqrt(i))/(2*t),n=this.radius_g+r*n,a*=r,o*=r,e.x=Math.atan2(a,n),e.y=Math.atan(o*Math.cos(e.x)/n),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if("sphere"===this.shape){if(this.flip_axis?(o=Math.tan(e.y/this.radius_g_1),a=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+o*o)):(a=Math.tan(e.x/this.radius_g_1),o=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+a*a)),t=a*a+o*o+n*n,(i=(s=2*this.radius_g*n)*s-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;r=(-s-Math.sqrt(i))/(2*t),n=this.radius_g+r*n,a*=r,o*=r,e.x=Math.atan2(a,n),e.y=Math.atan(o*Math.cos(e.x)/n)}return e.x=e.x+this.long0,e},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};gl.defaultDatum="WGS84",gl.Proj=sl,gl.WGS84=new gl.Proj("WGS84"),gl.Point=Rl,gl.toPoint=cl,gl.defs=Eo,gl.nadgrid=function(e,t){var s=new DataView(t),i=function(e){var t=e.getInt32(8,!1);return 11!==t&&(11!==(t=e.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(s),r=function(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:Ko(e,56,64).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}(s,i);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var n={header:r,subgrids:function(e,t,s){for(var i=[],r=0;rthis.bounds.max.x?this.bounds.max.x:e.x,e.y=e.ythis.bounds.max.y?this.bounds.max.y:e.y);var s=this._proj.inverse([e.x,e.y]);return new(za().LatLng)(s[1],s[0],t)},_projFromCodeDef:function(e,t){if(t)yu.defs(e,t);else if(void 0===yu.defs[e]){var s=e.split(":");if(s.length>3&&(e=s[s.length-3]+":"+s[s.length-1]),void 0===yu.defs[e])throw"No projection definition for code "+e}return yu(e)},getUnits:function(){return this._proj.oProj.units||"degrees"}});var gu=za().Class.extend({includes:za().CRS,options:{transformation:new(za().Transformation)(1,0,-1,0)},initialize:function(e,t){var s,i,r;if(za().Proj._isProj4Obj(e)?(s=(i=e).srsCode,t=t||{},this.projection=new(za().Proj.Projection)(i,t.bounds,t.wrapLng)):(s=e,r=(t=t||{}).def||"",this.projection=new(za().Proj.Projection)(s,r,t.bounds,t.wrapLng)),za().Util.setOptions(this,t),this.options.wrapLng&&(this.wrapLng=this.options.wrapLng),this.code=s,this.transformation=this.options.transformation,this.options.dpi=this.options.dpi||96,this.options.bounds&&(this.options.bounds=za().bounds(this.options.bounds)),!this.options.origin&&this.options.bounds&&(this.options.origin=[this.options.bounds.min.x,this.options.bounds.max.y]),this.options.origin&&(this.options.origin instanceof za().Point&&(this.options.origin=[this.options.origin.x,this.options.origin.y]),this.transformation=new(za().Transformation)(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales&&this.options.scales.length>0)this.scales=this.options.scales,this._scales=this._toProj4Scales(this.options.scales,this.options.dpi);else if(this.options.scaleDenominators&&this.options.scaleDenominators.length>0){this.scales=[];for(let e=0;e0){this._scales=[];for(let e=this.options.resolutions.length-1;e>=0;e--)this.options.resolutions[e]&&(this._scales[e]=1/this.options.resolutions[e])}else this.options.bounds&&(this._scales=this._getDefaultProj4ScalesByBounds(this.options.bounds));this._rectify(),this.infinite=!this.options.bounds},_rectify:function(){if(this._scales&&(this.resolutions||(this.resolutions=[],this.resolutions=this._proj4ScalesToResolutions(this._scales)),!this.scales)){this.scales=[];for(let t=0;t© SuperMap iClient",Common:{attribution:"Map Data © SuperMap iServer"},Online:{attribution:"Map Data © SuperMap Online"},ECharts:{attribution:"© 2018 百度 ECharts"},MapV:{attribution:"© 2018 百度 MapV "},Turf:{attribution:"© turfjs"},Baidu:{attribution:"Map Data © 2018 Baidu - GS(2016)2089号 - Data © 长地万方"},Cloud:{attribution:"Map Data ©2014 SuperMap - GS(2014)6070号-data©Navinfo"},Tianditu:{attribution:"Map Data "}}; /* Copyright© 2000 - 2022 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.*/ za().Control.Attribution.include({options:{position:"bottomright",prefix:Su.Prefix}}),za().Map.include({latLngToAccurateContainerPoint:function(e){var t=this.project(za().latLng(e))._subtract(this.getPixelOrigin());return za().point(t).add(this._getMapPanePos())}}),function(e){e.map(e=>(e.defaultFunction=e.prototype.toGeoJSON,e.include({toGeoJSON:function(t){return e.defaultFunction.call(this,t||10)}}),e))}([za().Polyline,za().Polygon,za().Marker,za().CircleMarker,za().Circle,za().LayerGroup]); /* Copyright© 2000 - 2022 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 bu=za().Evented.extend({options:{url:null,proxy:null,withCredentials:!1,crossOrigin:null},initialize:function(e,t){e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,za().setOptions(this,t),this.fire("initialized",this)},destroy:function(){this.fire("destroy",this)}}),xu=bu.extend({options:{projection:null},initialize:function(e,t){t=t||{},za().setOptions(this,t),t.projection&&(this.options.projection=t.projection),bu.prototype.initialize.call(this,e,t)},getMapInfo:function(e){var t=this;new Fi(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()},getWkt(e){var t=this;new Fi(`${t.url}/prjCoordSys.wkt`,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,withoutFormatSuffix:!0,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()},getTilesets:function(e){var t=this;new Ir(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}}),_u=za().Control.extend({options:{layer:null,position:"topleft",title:"switch tile version",tooltip:"top",collapsed:!0,nextText:"+",lastText:"-",ico:"V",orientation:"horizontal",switch:!0},onAdd:function(){"vertical"!==this.options.orientation&&(this.options.orientation="horizontal");var e=this._initLayout();return this.options.layer&&this.setLayer(this.options.layer),e},setContent:function(e){var t=za().Util.extend({},e);this.setVersionName(t.desc).setToolTip(t.desc)},setVersionName:function(e){var t=e;return e||(t=this.getValue()),this._sliderValue.innerHTML=t,this},setToolTip:function(e){return this.tooltip.innerHTML=e,this},updateLength:function(e){e>0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))},setLayer:function(e){e&&(this.options.layer=e);var t=this,s=t.options.layer;s.on("tilesetsinfoloaded",function(e){var s=e&&e.tileVersions;t.update(s)}),s.on("tileversionschanged",function(e){var s=e&&e.tileVersion;t.setContent(s)}),t.getTileSetsInfo()},update:function(e){this.tileVersions=e||[],this.updateLength(this.tileVersions.length)},getTileSetsInfo:function(){var e=this;e.options.layer&&new xu(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})},removeLayer:function(){this.options.layer=null},nextTilesVersion:function(){return this.firstLoad?(this.options.layer.nextTilesVersion(),this.firstLoad=!1,this):parseInt(this.slider.value)>this.max-1?this:(this.slider.value=parseInt(this.slider.value)+1,this.options.layer.nextTilesVersion(),this)},lastTilesVersion:function(){return parseInt(this.slider.value)"+s+"",e}});za().Map.mergeOptions({logoControl:!0}),za().Map.addInitHook(function(){!this._logoAdded&&this.options.logoControl&&(!0===this.options.logoControl?this.logoControl=new Cu:this.options.logoControl instanceof za().Control&&(this.logoControl=this.options.logoControl),this.logoControl&&(this.addControl(this.logoControl),this._logoAdded=!0))}); /* Copyright© 2000 - 2022 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.*/ const wu=function(e){return"[object Array]"==Object.prototype.toString.call(e)},Mu={toSuperMapBounds:e=>(e&&-1!==["FeatureCollection","Feature"].indexOf(e.type)&&(e=za().geoJSON(e).getBounds()),e instanceof za().LatLngBounds?new re(e.getSouthWest().lng,e.getSouthWest().lat,e.getNorthEast().lng,e.getNorthEast().lat):e instanceof za().Bounds?new re(e.min.x,e.min.y,e.max.x,e.max.y):wu(e)?new re(e[0],e[1],e[2],e[3]):new re),isArray:wu,toProcessingParam(e){var t={};if(e.length<1)t="";else{for(var s=[],i=0;i-1?s:Math.log(e/(1/this.resolutions[0]))/Math.LN2},distance:function(e,t){var s=t.lng-e.lng,i=t.lat-e.lat;return Math.sqrt(s*s+i*i)},infinite:!1}),Ru=function(e){return new Du(e)},ku=function(e){return e?(new Oe).toGeoJSON(e):e},Bu=function(e){if(!e)return e;var t,s=new Oe;if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e.type))t=s.read(e,e.type);else if("function"==typeof e.toGeoJSON){var i=e.toGeoJSON();t=i?s.read(i,i.type):e}var r=t||e;return za().Util.isArray(t)&&(1===t.length?r=t[0]:t.length>1&&(r=[],t.map(function(e){return r.push(e.geometry),e}))),r&&r.geometry?r.geometry:r},Gu=An,Uu=function(e,t,s){var i=e*t*(1/.0254)*Gu(s);return i=1/i},ju=function(e,t,s){var i=e*t*(1/.0254)*Gu(s);return i=1/i},zu=function(e){return e>1?1/e:e},Vu=function(e,t,s,i){return i=i||6378137,s=s||"",e>0&&t>0?(e=zu(e),"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*i/360)/1e4:254/t/e/1e4):-1},Ju=function(e,t=za().CRS.EPSG4326,s){let i=null,r=null;if(-1===["FeatureCollection","Feature","Geometry"].indexOf(e.type))if(e.toGeoJSON)e=e.toGeoJSON();else if(e instanceof za().LatLngBounds)e=za().rectangle(e).toGeoJSON();else{if(!(e instanceof za().Bounds))throw new Error("This tool only supports data conversion in geojson format or Vector Layers of Leaflet.");e=za().rectangle([[e.getTopLeft().x,e.getTopLeft().y],[e.getBottomRight().x,e.getBottomRight().y]]).toGeoJSON()}const n={point:function(e){return r(e)},multipoint:function(e){return n.linestring.apply(this,[e])},linestring:function(e){let t=[],s=null;for(let i=0,r=e.length;i(this._map.options.maxZoom||18)||e<(this._map.options.minZoom||0))this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null);else{var s=this._getImageParams();s?this._requestImage(s,t):this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null)}}},_calculateBounds:function(){var e=this._map.getPixelBounds(),t=this._map.unproject(e.getBottomLeft()),s=this._map.unproject(e.getTopRight()),i=this._map.options.crs.project(s),r=this._map.options.crs.project(t);return za().bounds(i,r)},_compriseBounds:function(e){var t={leftBottom:{x:e.getBottomLeft().x,y:e.getTopRight().y},rightTop:{x:e.getTopRight().x,y:e.getBottomLeft().y}};return JSON.stringify(t)},_calculateImageSize:function(){var e=this._map,t=e.getPixelBounds(),s=e.getSize(),i=e.unproject(t.getBottomLeft()),r=e.unproject(t.getTopRight()),n=e.latLngToLayerPoint(r).y,a=e.latLngToLayerPoint(i).y;return(n>0||a-1?this._url.substring(0,this._url.indexOf("?")):this._url,n=i>-1?this._url.substring(this._url.indexOf("?")):"";r=za().Util.template(r,{s:this._getSubdomain(e)});var a={service:"WMTS",request:"GetTile",version:this.options.version,style:this.options.style,tilematrixSet:this.options.tilematrixSet,format:this.options.format,width:this.options.tileSize,height:this.options.tileSize,layer:this.options.layer,tilematrix:s,tilerow:e.y,tilecol:e.x};if(this.options.tileProxy&&(r=this.options.tileProxy+r),"KVP"===this.options.requestEncoding)r+=za().Util.getParamString(a,r);else if("REST"===this.options.requestEncoding){r+="/"+a.layer+"/"+a.style+"/"+a.tilematrixSet+"/"+a.tilematrix+"/"+a.tilerow+"/"+a.tilecol+this.formatSuffix}return r=ee.urlAppend(r,n),r=je.appendCredential(r)}}),Ku=function(e,t){return new Xu(e,t)},Zu=Xu.extend({layerLabelMap:{vec:"cva",ter:"cta",img:"cia"},layerZoomMap:{vec:18,ter:14,img:18},options:{layerType:"vec",isLabel:!1,attribution:Su.Tianditu.attribution,url:"https://t{s}.tianditu.gov.cn/{layer}_{proj}/wmts?",zoomOffset:1,key:"",dpi:96,style:"default",format:"tiles",subdomains:[0,1,2,3,4,5,6,7],bounds:[[-90,-180],[90,180]],noWrap:!0},initialize:function(e){e=e||{},za().setOptions(this,e),this.options.layer=this.options.isLabel?this.layerLabelMap[this.options.layerType]:this.options.layerType,this.options.maxZoom=this.layerZoomMap[this.options.layerType]-1,Xu.prototype.initialize.call(this,this.options.url,this.options),za().stamp(this),this.options.key&&(this._url=`${this._url}tk=${this.options.key}`)},onAdd:function(e){this.options.tilematrixSet="EPSG:4326"===e.options.crs.code?"c":"w",this._url=this._url.replace("{layer}",this.options.layer).replace("{proj}",this.options.tilematrixSet),Xu.prototype.onAdd.call(this,e)},_isValidTile:function(e){const t=this._map.options.crs;if(!t.infinite){const s=this._globalTileRange;if((!t.wrapLng||this.options.noWrap)&&(e.xs.max.x)||!t.wrapLat&&(e.ys.max.y))return!1}if(!this.options.bounds)return!0;const s=this._tileCoordsToBounds(e);return za().latLngBounds(this.options.bounds).overlaps(s)}}),$u=za().TileLayer.extend({options:{layersID:null,redirect:!1,transparent:!0,cacheEnabled:!0,clipRegionEnabled:!1,clipRegion:null,prjCoordSys:null,overlapDisplayed:!1,overlapDisplayedOptions:null,tileversion:null,crs:null,format:"png",tileProxy:null,attribution:Su.Common.attribution,subdomains:null},initialize:function(e,t){this._url=e,za().TileLayer.prototype.initialize.apply(this,arguments),za().setOptions(this,t),za().stamp(this),this.tileSetsIndex=-1,this.tempIndex=-1},onAdd:function(e){this._crs=this.options.crs||e.options.crs,za().TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this.getScaleFromCoords(e),s=this._getLayerUrl()+"&scale="+t+"&x="+e.x+"&y="+e.y;return this.options.tileProxy&&(s=this.options.tileProxy+encodeURIComponent(s)),this.options.cacheEnabled||(s+="&_t="+(new Date).getTime()),this.options.subdomains&&(s=za().Util.template(s,{s:this._getSubdomain(e)})),s},getScale:function(e){var t=e||this._map.getZoom();return this.scales[t]},getScaleFromCoords:function(e){var t,s=this;return s.scales&&s.scales[e.z]?s.scales[e.z]:(s.scales=s.scales||{},t=s.getDefaultScale(e),s.scales[e.z]=t,t)},getDefaultScale:function(e){var t=this._crs;if(t.scales)return t.scales[e.z];var s=this._tileCoordsToBounds(e),i=t.project(s.getNorthEast()),r=t.project(s.getSouthWest()),n=this.options.tileSize,a=Math.max(Math.abs(i.x-r.x)/n,Math.abs(i.y-r.y)/n),o=l.METER;if(t.code){var h=t.code.split(":");if(h&&h.length>1){var u=parseInt(h[1]);o=u&&u>=4e3&&u<=5e3?l.DEGREE:l.METER}}return Uu(a,96,o)},setTileSetsInfo:function(e){this.tileSets=e,za().Util.isArray(this.tileSets)&&(this.tileSets=this.tileSets[0]),this.tileSets&&(this.fire("tilesetsinfoloaded",{tileVersions:this.tileSets.tileVersions}),this.changeTilesVersion())},lastTilesVersion:function(){this.tempIndex=this.tileSetsIndex-1,this.changeTilesVersion()},nextTilesVersion:function(){this.tempIndex=this.tileSetsIndex+1,this.changeTilesVersion()},changeTilesVersion:function(){var e=this;if(null!=e.tileSets&&!(e.tempIndex===e.tileSetsIndex||this.tempIndex<0)){var t=e.tileSets.tileVersions;if(t&&e.tempIndex=0){var s=t[e.tempIndex].name;e.mergeTileVersionParam(s)&&(e.tileSetsIndex=e.tempIndex,e.fire("tileversionschanged",{tileVersion:t[e.tempIndex]}))}}},updateCurrentTileSetsIndex:function(e){this.tempIndex=e},mergeTileVersionParam:function(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.redraw(),this._paramsChanged=!1,!0)},_getLayerUrl:function(){return this._paramsChanged&&(this._layerUrl=this._createLayerUrl()),this._layerUrl||this._createLayerUrl()},_createLayerUrl:function(){let e=ee.urlPathAppend(this._url,`tileImage.${this.options.format}`);return this.requestParams=this.requestParams||this._getAllRequestParams(),e=ee.urlAppend(e,ja.Util.getParamString(this.requestParams)),e=je.appendCredential(e),this._layerUrl=e,e},_getAllRequestParams:function(){var e=this.options||{},t={},s=this.options.tileSize;s instanceof za().Point||(s=za().point(s,s)),t.width=s.x,t.height=s.y,t.redirect=!0===e.redirect,t.transparent=!0===e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID.toString()),e.clipRegionEnabled&&e.clipRegion&&(e.clipRegion=Le.fromGeometry(Bu(e.clipRegion)),t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(e.clipRegion));var i=this._crs;if(i.options&&i.options.origin)t.origin=JSON.stringify({x:i.options.origin[0],y:i.options.origin[1]});else if(i.projection&&i.projection.bounds){var r=i.projection.bounds,n=za().point(r.min.x,r.max.y);t.origin=JSON.stringify({x:n.x,y:n.y})}return!1===e.overlapDisplayed?(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=e.overlapDisplayedOptions)):t.overlapDisplayed=!0,!0===t.cacheEnabled&&e.tileversion&&(t.tileversion=e.tileversion.toString()),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),t}}),ec=function(e,t){return new $u(e,t)},tc=s(545),sc=s.n(tc),ic={TEXT:{fontSize:"14px",fontFamily:"Arial Unicode MS Regular,Microsoft YaHei",textAlign:"left",color:"rgba(255,255,255,0)",fillColor:"rgba(80,80,80,1)",weight:1,globalAlpha:1},POINT:{fillColor:"#ffcc00",color:"#cc3333",weight:1,radius:3,opacity:1},LINE:{color:"rgba(0,0,0,0)",weight:1,lineCap:"butt",lineJoin:"round",dashOffset:0,dashArray:[],opacity:1},REGION:{color:"rgba(0,0,0,0)",fillColor:"rgba(0,0,0,0)",weight:1,lineCap:"butt",lineJoin:"round",dashOffset:0,opacity:1,fillOpacity:1,dashArray:[]}},rc={TEXT:{"text-size":"fontSize","text-face-name":"fontFamily","text-align":"textAlign","text-name":"textName","text-weight":"fontWeight","text-halo-color":"color","text-fill":"fillColor","text-comp-op":"globalCompositeOperation"},POINT:{"point-file":"iconUrl","point-fill":"fillColor","point-radius":"radius","point-halo-color":"color","point-comp-op":"globalCompositeOperation"},LINE:{"line-color":"color","line-width":"weight","line-cap":"lineCap","line-join":"lineJoin","line-dash-offset":"dashOffset","line-opacity":"opacity","line-dasharray":"dashArray","line-comp-op":"globalCompositeOperation"},REGION:{"line-color":"color","line-width":"weight","line-cap":"lineCap","line-join":"lineJoin","line-dash-offset":"dashOffset","line-opacity":"opacity","line-dasharray":"dashArray","polygon-fill":"fillColor","polygon-opacity":"fillOpacity","polygon-comp-op":"globalCompositeOperation"}},nc={lineWidth:{leafletStyle:"weight",type:"number",unit:"mm",defaultValue:.1},fillForeColor:{leafletStyle:"fillColor",type:"color",defaultValue:"rgba(0,0,0,0)"},foreColor:{leafletStyle:"color",type:"color",defaultValue:"rgba(0,0,0,0)"},markerSize:{leafletStyle:"markerSize",type:"number",unit:"mm",defaultValue:2.4},lineColor:{leafletStyle:"color",type:"color",defaultValue:"#000000"}},ac={clear:"",src:"",dst:"","src-over":"source-over","dst-over":"destination-over","src-in":"source-in","dst-in":"destination-in","src-out":"source-out","dst-out":"destination-out","src-atop":"source-atop","dst-atop":"destination-atop",xor:"xor",plus:"lighter",minus:"",multiply:"",screen:"",overlay:"",darken:"",lighten:"lighter","color-dodge":"","color-burn":"","hard-light":"","soft-light":"",difference:"",exclusion:"",contrast:"",invert:"","invert-rgb":"","grain-merge":"","grain-extract":"",hue:"",saturation:"",color:"",value:""}; /* Copyright© 2000 - 2022 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.*/ class oc{constructor(e){this.cartoCSS=null,this.mapUrl=e}pretreatedCartoCSS(e,t){t&&(e=this.processCharacters(e)),this.cartoCSS=this.cartoCSS||{};var s=new Pn(e).getShaders();if(s)for(var i=0;i-1;t--)if(e.indexOf(n[t])>-1){r=e.replace(n[t],s[n[t]]);break}r=r.replace(/[#]/gi,"#"),s[e]=i,t=t.replace(new RegExp(r,"g"),i)}),t=(t=t.replace(/[#]/gi,"\n#")).replace(/\[zoom/gi,"[scale")}}pickShader(e){if(!this.cartoCSS)return null;var t=e.replace(/[@#\s]/gi,"___");return this.cartoCSS[t]}getDefaultStyle(e){var t={},s=ic[e];for(var i in s){var r=s[i];t[i]=r}return t}getStyleFromiPortalMarker(e){return 0==e.indexOf("./")?null:(0==e.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(e=e.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),za().icon({iconUrl:e,iconSize:za().point(48,43),iconAnchor:za().point(24,43),popupAnchor:za().point(0,-43)}))}getStyleFromiPortalStyle(e,t,s){var i=s?JSON.parse(s):null,r={};if("Point"===t||"MultiPoint"===t){var n=i||e.pointStyle;return n.externalGraphic?0==n.externalGraphic.indexOf("./")?null:(0==n.externalGraphic.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(n.externalGraphic=n.externalGraphic.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),za().icon({iconUrl:n.externalGraphic,iconSize:za().point(n.graphicWidth,n.graphicHeight),iconAnchor:za().point(-n.graphicXOffset,-n.graphicYOffset),popupAnchor:za().point(0,-n.graphicHeight)})):(r.radius=n.pointRadius,r.color=n.strokeColor,r.opacity=n.strokeOpacity,r.lineCap=n.strokeLineCap,r.weight=n.strokeWidth,r.fillColor=n.fillColor,r.fillOpacity=n.fillOpacity,r.dashArray=this.dashStyle(n,1),r)}if("LineString"===t||"MultiLineString"===t||"Box"===t){var a=i||e.lineStyle;return r.color=a.strokeColor,r.opacity=a.strokeOpacity,r.fillOpacity=a.fillOpacity,r.lineCap=a.strokeLineCap,r.weight=a.strokeWidth,r.dashArray=this.dashStyle(a,1),r}if("Polygon"===t||"MultiPolygon"===t){var o=i||e.polygonStyle;return r.color=o.strokeColor,r.opacity=o.strokeOpacity,r.lineCap=o.strokeLineCap,r.weight=o.strokeWidth,r.fillColor=o.fillColor,r.fillOpacity=o.fillOpacity,r.dashArray=this.dashStyle(o,1),r}}dashStyle(e,t){if(!e)return[];var s=e.strokeWidth*t,i=e.strokeDashstyle;switch(i){case"solid":return[];case"dot":return[1,4*s];case"dash":return[4*s,4*s];case"dashdot":return[4*s,4*s,1,4*s];case"longdash":return[8*s,4*s];case"longdashdot":return[8*s,4*s,1,4*s];default:return i?ee.isArray(i)?i:(i=q.trim(i).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}getValidStyleFromCarto(e,t,s,i,r){if(!s)return null;var n=i.type,a=i.properties.attributes||{},o=this.getDefaultStyle(n);r=void 0===r||r,a.FEATUREID=i.properties.id,a.SCALE=t;for(var l,h,u=rc[n],c=0,p=s.length;c7?0:r.fillSymbolID,u=r.lineSymbolID>5?0:r.lineSymbolID;for(var c in r){var p=nc[c];if(p){var d=p.leafletStyle;switch(p.type){case"number":{let e=r[c];p.unit&&(e=e*$*te[p.unit]*2.5),i[d]=e;break}case"color":{var f=r[c];let e,t=1;if("fillColor"===d)0!==h&&1!==h||(t=1-h,e="rgba("+f.red+","+f.green+","+f.blue+","+t+")");else if("color"===d){if(0===u||5===u)t=0===u?1:0;else{var m=[1,0];switch(u){case 1:m=[9.7,3.7];break;case 2:m=[3.7,3.7];break;case 3:m=[9.7,3.7,2.3,3.7];break;case 4:m=[9.7,3.7,2.3,3.7,2.3,3.7]}i.lineDasharray=m}e="rgba("+f.red+","+f.green+","+f.blue+","+t+")"}i[d]=e;break}}}}return t.textField&&(i.textAlign="LEFT"),i}} /* Copyright© 2000 - 2022 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=za().Class.extend({initialize:function(e){var t=(e=e||{}).latLng||e._latLng;this._latLng=za().latLng(t.lat,t.lng),this._style=e.style||e._canvas,this.attributes=e.attributes,this.id=e.id?e.id:null},getId(){return this.id},setId(e){this.id=e},setLatLng:function(e){this._latLng=e},setCanvas:function(e){this._style=e},setAttributes:function(e){this.attributes=e},getLatLng:function(){return this._latLng},getCanvas:function(){return this._style},getAttributes:function(){return this.attributes},setStyle:function(e){this._style=e},getStyle:function(){return this._style}}),hc=za().Class.extend({initialize:function(e,t){this.geometry=e,this.attributes=t},toFeature:function(){let e=this.geometry;if(e.toGeoJSON){const t=e.toGeoJSON();return t.properties=this.attributes,(new Oe).read(t)[0]}if(3===e.length)e=new ue(e[1],e[0],e[2]);else if(2===e.length)e=new le(e[0],e[1]);else if(e instanceof za().LatLng)e=new le(e.lng,e.lat);else if(e instanceof za().Point)e=new le(e.x,e.y);else if(e instanceof za().CircleMarker){var t=e.getLatLng();e=new le(t.lng,t.lat)}return new _e(e,this.attributes)},reverseLatLngs:function(e){za().Util.isArray(e)||(e=[e]);for(var t=0;t0&&t._reset(),t.addTFEvents(),t.mouseMoveHandler=function(e){var s=e.layerPoint;t.currentMousePosition=za().point(s.x+t.movingOffset[0],s.y+t.movingOffset[1])},e.on("mousemove",t.mouseMoveHandler),t.update(e.getBounds())}else e.removeLayer(t)},addFeatures:function(e){},redrawThematicFeatures:function(e){},destroyFeatures:function(e){if(void 0===e&&(e=this.features),e){this.removeFeatures(e),Array.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--)e[t].destroy()}},removeFeatures:function(e){var t=this;if(e){if(e===t.features)return t.removeAllFeatures();za().Util.isArray(e)||"function"==typeof e||(e=[e]);for(var s=[],i=0;ih)){var y=o[0];o.splice(0,1),delete a[y]}}}}if(t.renderer.render(),i&&t.options.isHoverAble&&t.options.isMultiHover){var g=this.getShapesByFeatureID(i);this.renderer.updateHoverShapes(g)}},createThematicFeature:function(e){var t=this,s=t.getStyleByData(e);e.style&&t.isAllowFeatureStyle&&(s=ee.copyAttributesWithClip(e.style));var i={};i.nodesClipPixel=t.options.nodesClipPixel,i.isHoverAble=t.options.isHoverAble,i.isMultiHover=t.options.isMultiHover,i.isClickAble=t.options.isClickAble,i.highlightStyle=ra.transformStyle(t.highlightStyle);for(var r=new la(e,t,ra.transformStyle(s),i),n=0;n0;if(t.themeField&&o&&s.attributes){var l=t.themeField,h=s.attributes;for(var u in h)if(l===u){n=!0,a=h[u];break}}if(n)for(var c=0,p=r.length;c0;if(t.themeField&&o&&s.attributes){var l=t.themeField,h=s.attributes;for(var u in h)if(l===u){n=!0,a=h[u];break}}if(n)for(var c=0,p=r.length;c=r[c].start&&a<=r[c].end:a>=r[c].start&&a0&&0==this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),s=0,i=t.length;s=0&&d.x<=h.x&&d.y>=0&&d.y<=h.y){if(s.style.minZoomLevel>-1&&u<=s.style.minZoomLevel)continue;if(s.style.maxZoomLevel>-1&&u>s.style.maxZoomLevel)continue;var f=null;s.isStyleChange?(s.isStyleChange=null,f=this.calculateLabelBounds(s,d)):f=s.geometry.bsInfo.w&&s.geometry.bsInfo.h?this.calculateLabelBounds2(s,d):this.calculateLabelBounds(s,d);var m=new re(0,h.y,h.x,0),y=f.length;if(this.options.isAvoid){var g=this.getAvoidInfo(m,f);if(g){if("left"===g.aspectW){s.style.labelXOffset+=g.offsetX;for(let e=0;e=r[l].start&&a=r[l].start&&ao&&(o=s,l="top")}if(t.y>e.bottom){let s=Math.abs(t.y-e.bottom);s>o&&(o=s,l="bottom")}if(t.xa&&(a=s,h="left")}if(t.x>e.right){let s=Math.abs(t.x-e.right);s>a&&(a=s,h="right")}}}},isQuadrilateralOverLap:function(e,t){var s=e.length,i=t.length;if(5!==s||5!==i)return null;var r=!1;for(let i=0;i=0&&e.options.fontOpacity<1&&(s.globalAlpha=e.options.fontOpacity),s.fillText){s.font=i,s.textAlign=e.options.textAlign,s.textBaseline=e.options.textBaseline;let r=e.options.vfactor,o=s.measureText("Mg").height||s.measureText("xx").width;t.y+=o*r*(a-1);for(let i=0;i0;){var r=t.pop(),n=r.type,a=r.layerType=r.layerType||"BASE_LAYER";"OVERLAY_LAYER"!==a&&(n=a),this.createLayer(n,r)}this.fire("maploaded",{map:this._map})}},createCRS:function(e,t,s,i,r){return e<0?new Du({bounds:r,origin:i,resolutions:s}):910112===e||910102===e?Au:(910111===e&&(e=3857),910101===e&&(e=4326),vu("EPSG:"+e,{origin:i,resolutions:s,bounds:r}))},createMap:function(e){var t=e.crs||za().CRS.EPSG3857,s=za().latLngBounds(t.unproject(e.bounds.min),t.unproject(e.bounds.max));this._map=za().map(this.options.map,{center:s.getCenter(),maxZoom:e.maxZoom||22,minZoom:e.minZoom||0,zoom:e.zoom||0,crs:t,renderer:za().canvas()}),t instanceof Du?this._map.setZoom(e.zoom?e.zoom+2:2,{maxZoom:e.maxZoom||22}):this._map.fitBounds(s,{maxZoom:e.maxZoom||22})},getResolutionsFromScales:function(e,t,s,i){for(var r=[],n=0;n{var t=za().geoJSON(e.result,{pointToLayer:function(e,t){var s=new(za().Marker)(t);return s.setStyle=function(e){e&&s.setIcon(e)},s},coordsToLatLng:a,style:function(e){return this.cartoCSSToLeaflet.getStyleFromiPortalStyle(i||{},e.geometry.type,e.properties.style)},opacity:r});this.options.featureLayerPopupEnable&&t.bindPopup(n.options.featureLayerPopup||n.defaultFeatureLayerPopup),this.addLayer(t)})}},getFeaturesBySQL:function(e,t,s,i,r,n){var a=new Js({queryParameter:{name:s+"@"+t,attributeFilter:i=i||"SMID > 0"},datasetNames:[t+":"+s],fromIndex:0,toIndex:1e5});yc(e).getFeaturesBySQL(a,n,r)},createThemeLayer:function(e){var t,s=e.themeSettings&&JSON.parse(e.themeSettings),i=s.type;if(e.themeSettings=s,(t="HEAT"===i?this.createHeatLayer(e,s):"UNIQUE"===i?this.createUniqueLayer(e,s):"RANGE"===i?this.createRangeLayer(e,s):this.createBaseThemeLayer(e,s))&&(this.addFeature2ThemeLayer(e,t),t.on("add",e=>{this.registerThemeEvent(e.target)})),s&&s.labelField){var r=this.createLabelLayer(e,s);r.on("add",e=>{this.registerThemeEvent(e.target)}),t.labelLayer=r}return t},createBaseThemeLayer:function(e,t){let s=e.style,i=e.opacity,r=t.vectorType,n=s.pointStyle;n.fill="LINE"!==r;var a={};a.radius=n.pointRadius,a.color=n.strokeColor,a.opacity=n.strokeOpacity,a.lineCap=n.strokeLineCap,a.weight=n.strokeWidth,a.fillColor=n.fillColor,a.fillOpacity=n.fillOpacity;var o=(e,t)=>za().circleMarker(t,a);return n.unicode&&(o=((e,t)=>new gc(t,n))),za().geoJSON({type:"GeometryCollection",geometries:[]},{pointToLayer:o,opacity:i})},createUniqueLayer:function(e,t){for(var s=e.title,i=t.field,r=[],n=t.settings,a=e.isVisible,o=e.opacity,l=t.vectorType,h=0;h0?{fillColor:"#ffffff"}:n[0].style;var o=za().Util.extend(new In,s);o.fontWeight="bold",o.fontSize="14px",o.labelRect=!0,o.strokeColor=o.fillColor,o.fontColor=t.labelColor,t.labelFont&&(o.fontFamily=t.labelFont);var l=new fc(i,{visibility:a,opacity:.7});return this.registerThemeEvent(l),l.style=o,l.themeField=r,l.styleGroups=[],l},createHeatLayer:function(e,t){let s,i=t.colors||["blue","cyan","lime","yellow","red"],r={};for(let e=0,t=i.length,s=1;e0&&n.push(r[o]);else for(var h=0,u=(r=i.parseFeatureFromJson(t.content)).length;h0&&n.push(r[h]);var c=e.prjCoordSys&&e.prjCoordSys.epsgCode;a?i.changeFeatureLayerEpsgCode(c,"4326",s,n,function(e){E(e)}):E(n)},function(){});else{for(var g=[],v=e.features,S=0,b=v.length;S0){var _=x.geometry.points[0].x,C=x.geometry.points[0].y,w=new le(_,C),M=new _e(w,x.attributes,x.style);g.push(M)}}E(g)}}else if(r){var A=e.datasourceName;u=(h=(l=e.subLayers&&JSON.parse(e.subLayers)).length&&l.length>0?l[0]:l)&&h.name,this.getFeaturesBySQL(e.url,A,u,d.filter,t.ISERVER,t=>{var i,r,n=t.result,o=[];if(n&&n.features){for(var l=0,h=(i=n.features).length;l0?l[0]:l)&&h.name;var T=e.prjCoordSys&&e.prjCoordSys.epsgCode;this.getFeaturesBySQL(c,p,u,f,t.ISERVER,function(e){a?i.changeFeatureLayerEpsgCode(T,"4326",s,e,function(e){E(e)}):E(e)})}}function E(t){if(s&&s.labelLayer instanceof fc&&i.addFeature2LabelLayer(s.labelLayer,t,e),za().HeatLayer&&s instanceof za().HeatLayer){var r=[];for(let e=0,i=t.length;e0){for(n=0,a=i.length;ne.json()).then(e=>{var i=e;t||void 0===t.length||(i=i[0]),this.fire("coordconvertsuccess",{newCoors:i}),s.call(this,i)}).catch(e=>{this.actived&&this.fire("coordconvertfailed",{err:e})})},getSQLFromFilter:function(e){return e?" * where ("+(e=e.replace(/=/g,"==").replace(/and|AND/g,"&&").replace(/or|OR/g,"||").replace(/>==/g,">=").replace(/<==/g,"<="))+")":" * where (1==1||1>=0)"},getAttributesObjFromTable:function(e,t){if(0!==e.length&&0!==t.length){for(var s=[],i=0;ie.json()).then(e=>{t&&t(e)}).catch(e=>s&&s(e))},getCartoCSS2Obj:function(e){var t,s=!1;return e.indexOf("}")>-1?(s=(e=JSON.parse(e)).needTransform,t=e.isAddFile):"needTransform"===e?(s=!0,t=!1):t="true"===e,{isAddFile:t,needTransform:s}},registerThemeEvent:function(e){e.on("click",t=>{if(!e.map)return;let s;this.selectedFeature&&(this.fire("featureunselected",{feature:this.selectedFeature}),this.selectedFeature=null),t.target&&t.target.refDataID&&(s=e.getFeatureById(t.target.refDataID)),s&&(this.selectedFeature=s,this.fire("featureselected",{feature:s}))}),e.on("mousemove",t=>{if(e.map&&t.target&&t.target.refDataID){let s;t.target&&t.target.refDataID&&(s=e.getFeatureById(t.target.refDataID)),s&&this.fire("featuremousemove",{feature:s})}})},SERVER_TYPE_MAP:{"EPSG:4326":"WGS84","EPSG:3857":"MERCATOR","EPSG:900913":"MERCATOR","EPSG:102113":"MERCATOR","EPSG:910101":"GCJ02","EPSG:910111":"GCJ02MERCATOR","EPSG:910102":"BD","EPSG:910112":"BDMERCATOR"}}),Sc=za().TileLayer.extend({options:{collectionId:null,sqlFilter:null,ids:null,names:null,renderingRule:null,format:"png",zoomOffset:1,transparent:!0,cacheEnabled:!0,tileProxy:null,attribution:Su.Common.attribution,subdomains:null},initialize:function(e,t){this._url=e,za().TileLayer.prototype.initialize.apply(this,arguments),za().setOptions(this,t),za().stamp(this)},onAdd:function(e){za().TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._getLayerUrl()+"&z="+this._getZoomForUrl()+"&x="+e.x+"&y="+e.y;return this.options.tileProxy&&(t=this.options.tileProxy+encodeURIComponent(t)),this.options.cacheEnabled||(t+="&_t="+(new Date).getTime()),this.options.subdomains&&(t=za().Util.template(t,{s:this._getSubdomain(e)})),t},_getLayerUrl:function(){return this._layerUrl||this._createLayerUrl()},_createLayerUrl:function(){let e=ee.urlPathAppend(this._url,`/collections/${this.options.collectionId}/tile.${this.options.format}`);return this.requestParams=this.requestParams||this._getAllRequestParams(),e=ee.urlAppend(e,ja.Util.getParamString(this.requestParams)),e=je.appendCredential(e),this._layerUrl=e,e},_getAllRequestParams:function(){var e=this.options||{},t={};return t.transparent=!0===e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),e.sqlFilter&&(t.sqlFilter=e.sqlFilter),e.renderingRule&&(t.renderingRule=JSON.stringify(e.renderingRule)),e.ids&&(t.ids=e.ids.join(",")),e.names&&(t.names=e.names.join(",")),t}});function bc(e,t){const{maxZoom:s=22}=t||{},{bounds:i,prjCoordSys:r,dpi:n,visibleScales:a,coordUnit:o}=e,l=Tn(a,i,n,o,s);if(xc(r))return function(e){let t={bounds:za().bounds([e.left,e.bottom],[e.right,e.top]),origin:za().point(e.left,e.top)};return new Du(t)}(i);const h=Cc(r);return _c(h)?function(e,{bounds:t,dpi:s,resolutions:i}){const r=yu(e,"EPSG:4326").forward([t.left,0],!0),n=yu(e,"EPSG:4326").forward([t.right,0],!0);let a={wrapLng:[parseInt(r[0]),parseInt(n[0])],bounds:za().bounds([t.left,t.bottom],[t.right,t.top]),origin:[t.left,t.top],dpi:s};i&&i.length>0&&(a.resolutions=i);return new gu(e,a)}(h,{bounds:i,dpi:n,resolutions:l}):void 0}function xc(e){return"PCS_NON_EARTH"===e.type}function _c(e,t=!0){try{yu(e)}catch(s){return t&&console.error(`The projection of ${e} is missing, please register the projection of ${e} first, refer to the documentation: https://iclient.supermap.io/web/introduction/leafletDevelop.html#multiProjection`),!1}return!0}function Cc(e){const{type:t,epsgCode:s}=e;return"PCS_NON_EARTH"==t?"":"EPSG:"+s} /* Copyright© 2000 - 2022 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 wc=bu.extend({options:{geometry:null,prjCoordSys:null,excludeField:null},initialize:function(e,t){t=t||{},za().setOptions(this,t),t.projection&&(this.options.prjCoordSys=t.projection),bu.prototype.initialize.call(this,e,t),this.dataFlow=new kt(e,t),this.dataFlow.events.on({broadcastSocketConnected:this._defaultEvent,broadcastSocketError:this._defaultEvent,broadcastFailed:this._defaultEvent,broadcastSucceeded:this._defaultEvent,subscribeSocketConnected:this._defaultEvent,subscribeSocketError:this._defaultEvent,messageSucceeded:this._defaultEvent,setFilterParamSucceeded:this._defaultEvent,scope:this})},initBroadcast:function(){return this.dataFlow.initBroadcast(),this},broadcast:function(e){this.dataFlow.broadcast(e)},initSubscribe:function(){return this.dataFlow.initSubscribe(),this},setExcludeField:function(e){return this.dataFlow.setExcludeField(e),this.options.excludeField=e,this},setGeometry:function(e){return this.dataFlow.setGeometry(e),this.options.geometry=e,this},unSubscribe:function(){this.dataFlow.unSubscribe()},unBroadcast:function(){this.dataFlow.unBroadcast()},_defaultEvent:function(e){this.fire(e.eventType||e.type,e)}});const Mc=function(){try{return mapv}catch(e){return{}}}(); /* Copyright© 2000 - 2022 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 Ac=Mc.baiduMapLayer?Mc.baiduMapLayer.__proto__:Function; /* Copyright© 2000 - 2022 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 Tc=za().Layer.extend({options:{attributionPrefix:null,attribution:Su.MapV.attribution},initialize:function(e,t,s){s=s||{},this.dataSet=e||{},this.mapVOptions=t||{},this.render=this.render.bind(this),za().Util.setOptions(this,s),this.options.attributionPrefix&&(this.options.attribution=this.options.attributionPrefix+this.options.attribution),this.canvas=this._createCanvas(),za().stamp(this)},onAdd:function(e){this._map=e;var t=this.getPane(),s=this.container=za().DomUtil.create("div","leaflet-layer leaflet-zoom-animated",t);s.appendChild(this.canvas);var i=e.getSize();s.style.width=i.x+"px",s.style.height=i.y+"px",this.renderer=new class extends Ac{constructor(e,t,s,i){super(e,s,i),Ac&&(i=i||{},this.init(i),this.argCheck(i),this.canvasLayer=t,this.clickEvent=this.clickEvent.bind(this),this.mousemoveEvent=this.mousemoveEvent.bind(this),this._moveStartEvent=this.moveStartEvent.bind(this),this._moveEndEvent=this.moveEndEvent.bind(this),this._zoomStartEvent=this.zoomStartEvent.bind(this),this.bindEvent())}clickEvent(e){var t=this.map.containerPointToLayerPoint([0,0]),s=this.devicePixelRatio=this.canvasLayer.devicePixelRatio=window.devicePixelRatio||1,i=e.layerPoint;super.clickEvent(za().point((i.x-t.x)/s,(i.y-t.y)/s),e)}mousemoveEvent(e){var t=e.layerPoint;super.mousemoveEvent(t,e)}bindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.on("click",this.clickEvent),this.options.methods.mousemove&&e.on("mousemove",this.mousemoveEvent)),this.map.on("movestart",this._moveStartEvent),this.map.on("moveend",this._moveEndEvent),this.map.on("zoomstart",this._zoomStartEvent)}destroy(){this.unbindEvent(),this.clearData(),this.animator&&this.animator.stop(),this.animator=null,this.canvasLayer=null}unbindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.off("click",this.clickEvent),this.options.methods.mousemove&&e.off("mousemove",this.mousemoveEvent)),this.map.off("movestart",this._moveStartEvent),this.map.off("moveend",this._moveEndEvent),this.map.off("zoomstart",this._zoomStartEvent)}getContext(){return this.canvasLayer.getCanvas().getContext(this.context)}addData(e,t){var s=e;e&&e.get&&(s=e.get()),this.dataSet.add(s),this.update({options:t})}update(e){var t=e||{},s=t.data;s&&s.get&&(s=s.get()),void 0!=s&&this.dataSet.set(s),super.update({options:t.options})}getData(){return this.dataSet}removeData(e){if(this.dataSet){var t=this.dataSet.get({filter:function(t){return null==e||"function"!=typeof e||!e(t)}});this.dataSet.set(t),this.update({options:null})}}clearData(){this.dataSet&&this.dataSet.clear(),this.update({options:null})}_canvasUpdate(e){if(this.canvasLayer){var t=this,s=t.options.animation,i=this.getContext(),r=this.map;if(t.isEnabledTime()){if(void 0===e)return void this.clear(i);"2d"===this.context&&(i.save(),i.globalCompositeOperation="destination-out",i.fillStyle="rgba(0, 0, 0, .1)",i.fillRect(0,0,i.canvas.width,i.canvas.height),i.restore())}else this.clear(i);if("2d"===this.context)for(var n in t.options)i[n]=t.options[n];else i.clear(i.COLOR_BUFFER_BIT);if(!(t.options.minZoom&&r.getZoom()t.options.maxZoom)){var a=r.getBounds(),o=a.getEast()-a.getWest(),l=a.getNorth()-a.getSouth(),h=r.getSize(),u=o/h.x,c=l/h.y,p=Gu("DEGREE")*u,d=this.canvasLayer.getTopLeft(),f=r.latLngToAccurateContainerPoint(d),m={transferCoordinate:function(e){var s,i={x:(s="2d"===t.context?r.latLngToAccurateContainerPoint(za().latLng(e[1],e[0])):{x:(e[0]-d.lng)/u,y:(d.lat-e[1])/c}).x-f.x,y:s.y-f.y};return[i.x,i.y]}};void 0!==e&&(m.filter=function(t){var i=s.trails||10;return e&&t.time>e-i&&t.time{this.update({data:this.data,options:this.mapVOptions})})),i.icon=o,(n.options.iconSize||o.style.height)&&(this.mapVOptions.offset={x:0,y:-(n.options.iconSize[1]||o.style.height)/2}),this.options.deg&&(i.deg=this.options.deg,"function"==typeof i.deg&&this.idCache[t]&&this.data[this.idCache[t]]&&(i.deg=i.deg(e.featureResult,za().latLng(s.coordinates[1],s.coordinates[0]),this.data[this.idCache[t]])))}if(r instanceof za().CircleMarker){this.mapVOptions.draw="simple";const e=this._toMapvStyle(r);for(const t in e)e.hasOwnProperty(t)&&(i[t]=e[t])}}else if(this.options.style){const t=this._toMapvStyle(this.options.style(e.featureResult));for(const e in t)t.hasOwnProperty(e)&&(i[e]=t[e])}void 0==this.idCache[t]?(this.data.push(i),this.idCache[t]=this.data.length-1):this.data[this.idCache[t]]=i,new Date-this._last>200&&(this._last=new Date,this.update({data:this.data,options:this.mapVOptions}))},_toMapvStyle:function(e){const t={draw:"simple"};return t.strokeStyle=e.color,t.lineWidth=e.width,t.globalAlpha=e.fillOpacity||e.opacity,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.fillStyle=e.fillColor,t.size=e.radius,t}}),Lc=za().GeoJSON.extend({initialize:function(e,t){(t=t||{}).style&&!t.pointToLayer&&(t.pointToLayer=function(e,s){return za().circleMarker(s,t.style())}),za().Util.setOptions(this,t),this._layers={},za().stamp(this),this.url=e,this.idCache={}},onMessageSuccessed:function(e){const t=e.featureResult,s=e.featureResult.properties[this.options.idField];let i=null;void 0!==s&&this.idCache[s]?(i=this.getLayer(this.idCache[s]),this._updateLayerData(i,t)):((i=za().GeoJSON.geometryToLayer(t,this.options)).feature=za().GeoJSON.asFeature(t),this.addLayer(i),void 0!==s&&(this.idCache[s]=this.getLayerId(i))),this.options.onEachFeature&&this.options.onEachFeature(t,i)},_updateLayerData:function(e,t){t.properties&&(e.feature.properties=t.properties);var s=[];switch(t.geometry.type){case"Point":s=za().GeoJSON.coordsToLatLng(t.geometry.coordinates),e.setLatLng(s);break;case"LineString":s=za().GeoJSON.coordsToLatLngs(t.geometry.coordinates,0),e.setLatLngs(s);break;case"MultiLineString":case"Polygon":s=za().GeoJSON.coordsToLatLngs(t.geometry.coordinates,1),e.setLatLngs(s);break;case"MultiPolygon":s=za().GeoJSON.coordsToLatLngs(t.geometry.coordinates,2),e.setLatLngs(s)}}}),Oc=za().LayerGroup.extend({options:{geometry:null,prjCoordSys:null,excludeField:null,idField:"id",render:"normal"},initialize:function(e,t){t=t||{},za().Util.setOptions(this,t),this.url=e,this._layers={},this.dataService=new wc(this.url,{geometry:this.options.geometry,prjCoordSys:this.options.prjCoordSys,excludeField:this.options.excludeField})},onAdd:function(e){this.dataService.initSubscribe(),this.dataService.on("subscribeSocketConnected",e=>this.fire("subscribesucceeded",e)),this.dataService.on("subscribeSocketError",e=>this.fire("subscribefailed",e)),this.dataService.on("messageSucceeded",e=>this._onMessageSuccessed(e)),this.dataService.on("setFilterParamSucceeded",e=>this.fire("setfilterparamsucceeded",e)),"mapv"===this.options.render?this.addLayer(new Ec(this.url,this.options)):this.addLayer(new Lc(this.url,this.options)),za().LayerGroup.prototype.onAdd.call(this,e)},onRemove:function(e){za().LayerGroup.prototype.onRemove.call(this,e),this.dataService&&this.dataService.unSubscribe()},setExcludeField:function(e){return this.dataService.setExcludeField(e),this.options.excludeField=e,this},setGeometry:function(e){return this.dataService.setGeometry(e),this.options.geometry=e,this},_onMessageSuccessed:function(e){this.getLayers().map(t=>(t.onMessageSuccessed&&(t.onMessageSuccessed(e),this.fire("dataupdated",{layer:t,data:e.featureResult})),t))}}); /* Copyright© 2000 - 2022 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.*/ const Pc=za().Layer.extend({includes:[],_echartsContainer:null,_map:null,_ec:null,_echartsOptions:null,options:{attribution:Su.ECharts.attribution,loadWhileAnimating:!1},initialize:function(e,t){za().Util.setOptions(this,t),this.setOption(e)},setOption:function(e,t,s){const i=e.baseOption||e;i.LeafletMap=i.LeafletMap||{roam:!0},i.animation=!0===i.animation,this._echartsOptions=e,this._ec&&this._ec.setOption(e,t,s)},getEcharts:function(){return this._ec},_disableEchartsContainer:function(){this._echartsContainer.style.visibility="hidden"},_enableEchartsContainer:function(){this._echartsContainer.style.visibility="visible"},onAdd:function(e){this._map=e,this._initEchartsContainer(),this._ec=wa().init(this._echartsContainer),this._ec.leafletMap=e;const t=this;e.on("zoomstart",function(){t._disableEchartsContainer()}),!t.options.loadWhileAnimating&&e.on("movestart",function(){t._disableEchartsContainer()}),wa().registerAction({type:"LeafletMapLayout",event:"LeafletMapLayout",update:"updateLayout"},function(e){}),wa().registerCoordinateSystem("leaflet",Nc),wa().extendComponentModel({type:"LeafletMap",getBMap:function(){return this.__LeafletMap},defaultOption:{roam:!1}}),wa().extendComponentView({type:"LeafletMap",render:function(e,s,i){let r=!0,n=s.scheduler.ecInstance.leafletMap;const a=i.getZr().painter.getViewportRoot(),o=n.options.zoomAnimation&&za().Browser.any3d;a.className=" leaflet-layer leaflet-zoom-"+(o?"animated":"hide")+" echarts-layer";const l=za().DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);a.style[l]="50% 50%";const h=e.coordinateSystem,u=i.getZr().painter.getLayers();Fc(t._map,a);const c=function(){if(r)return;const s=Fc(t._map,a);if(!t.options.loadWhileAnimating){for(let e in u)u.hasOwnProperty(e)&&u[e]&&(n=u[e].ctx)&&n.clearRect&&n.clearRect(0,0,n.canvas.width,n.canvas.height);t._enableEchartsContainer()}var n;h.setMapOffset(s),e.__mapOffset=s,i.dispatchAction({type:"LeafletMapLayout"})};function p(){r||(i.dispatchAction({type:"LeafletMapLayout"}),t._enableEchartsContainer())}t._oldMoveHandler&&n.off(t.options.loadWhileAnimating?"move":"moveend",t._oldMoveHandler),t._oldZoomEndHandler&&n.off("zoomend",t._oldZoomEndHandler),n.on(t.options.loadWhileAnimating?"move":"moveend",c),n.on("zoomend",p),t._oldMoveHandler=c,t._oldZoomEndHandler=p,r=!1}}),this._ec.setOption(this._echartsOptions)},onRemove:function(){this._ec.clear(),this._ec.dispose(),delete this._ec,za().DomUtil.remove(this._echartsContainer),this._oldZoomEndHandler&&(this._map.off("zoomend",this._oldZoomEndHandler),this._oldZoomEndHandler=null),this._oldMoveHandler&&(this._map.off(this.options.loadWhileAnimating?"move":"moveend",this._oldMoveHandler),this._oldMoveHandler=null),this._resizeHandler&&(this._map.off("resize",this._resizeHandler),this._resizeHandler=null),delete this._map},_initEchartsContainer:function(){const e=this._map.getSize(),t=document.createElement("div");t.style.position="absolute",t.style.height=e.y+"px",t.style.width=e.x+"px",t.style.zIndex=10,this._echartsContainer=t,this.getPane().appendChild(this._echartsContainer);const s=this;function i(e){let t=e.newSize;s._echartsContainer.style.width=t.x+"px",s._echartsContainer.style.height=t.y+"px",s._ec.resize()}this._map.on("resize",i),this._resizeHandler=i}});function Nc(e){this._LeafletMap=e,this.dimensions=["lng","lat"],this._mapOffset=Ic(e)}function Ic(e){const t=e.containerPointToLayerPoint([0,0]);return[t.x||0,t.y||0]}function Fc(e,t){const s=Ic(e);return t.style.left=s[0]+"px",t.style.top=s[1]+"px",s}Nc.prototype.dimensions=["lng","lat"],Nc.prototype.setMapOffset=function(e){this._mapOffset=e},Nc.prototype.getBMap=function(){return this._LeafletMap},Nc.prototype.prepareCustoms=function(){const e=wa().util,t=this.getViewRect();return{coordSys:{type:"leaflet",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:e.bind(this.dataToPoint,this),size:e.bind(function(t,s){return s=s||[0,0],e.map([0,1],function(e){const i=s[e],r=t[e]/2,n=[],a=[];return n[e]=i-r,a[e]=i+r,n[1-e]=a[1-e]=s[1-e],Math.abs(this.dataToPoint(n)[e]-this.dataToPoint(a)[e])},this)},this)}}},Nc.prototype.dataToPoint=function(e){null===e[1]&&(e[1]=za().CRS.EPSG3857.projection.MAX_LATITUDE);const t=this._LeafletMap.latLngToLayerPoint([e[1],e[0]]),s=this._mapOffset;return[t.x-s[0],t.y-s[1]]},Nc.prototype.fixLat=function(e){return e>=90?89.99999999999999:e<=-90?-89.99999999999999:e},Nc.prototype.pointToData=function(e){let t=this._mapOffset,s=this._LeafletMap.layerPointToLatLng([e[0]+t[0],e[1]+t[1]]);return[s.lng,s.lat]},Nc.prototype.getViewRect=function(){const e=this._LeafletMap.getSize();return new(wa().graphic.BoundingRect)(0,0,e.x,e.y)},Nc.prototype.getRoamTransform=function(){return wa().matrix.create()},Nc.dimensions=Nc.prototype.dimensions,Nc.create=function(e){let t,s=e.scheduler.ecInstance.leafletMap;e.eachComponent("LeafletMap",function(e){t||(t=new Nc(s)),e.coordinateSystem=t,e.coordinateSystem.setMapOffset(e.__mapOffset||Ic(s))}),e.eachSeries(function(e){e.get("coordinateSystem")&&"leaflet"!==e.get("coordinateSystem")||(t||(t=new Nc(s)),e.coordinateSystem=t,e.animation=!0===e.animation)})};function Dc(e){var t=document.createElement("canvas");return t&&t.getContext(e)} /* Copyright© 2000 - 2022 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 Rc=za().Class.extend({options:{radius:10,angele:60,spaceAngle:0,count:3,fill:!1,stroke:!0,color:"#3388ff",weight:1,lineCap:"round",lineJoin:"round",fillColor:"#66ccff",fillOpacity:.2,fillRule:"evenodd",opacity:1,strokeWidth:1},initialize:function(e){e=e||{},za().Util.setOptions(this,e),this._canvas=document.createElement("canvas"),this._canvas.width=2*(this.options.radius+this.options.weight),this._canvas.height=2*(this.options.radius+this.options.weight),this._ctx=this._canvas.getContext("2d");var t=void 0===this.options.strokeWidth?1:this.options.strokeWidth;this.options.width=2*(this.options.radius+t)+1,this._initStyle()},getStyle:function(){return this._canvas},drawSector:function(e,t,s,i,r,n){r=r/180*Math.PI,n=n/180*Math.PI,e.moveTo(t,s),e.lineTo(t+i*Math.cos(r),s+i*Math.sin(r)),e.arc(t,s,i,r,n),e.lineTo(t,s)},_initStyle:function(){var e=0,t=this.options,s=t.angle;if(t.spaceAngle=360/t.count-t.angle,!(t.spaceAngle<0)){this._ctx.beginPath(),this.anchor=[t.width/2,t.width/2];for(var i=0;i=0;t--){let r,n,a;const o=s.latLngToLayerPoint(i[t].getLatLng());let l=i[t].getStyle();if(!l&&this.defaultStyle&&(l=this.defaultStyle),l.img){let e=l.img.width,t=l.img.height;l.size&&l.size[0]&&l.size[1]&&(e=l.size[0],t=l.size[1]);const s=l.anchor||[e/2,t/2];r=za().point(o.x-s[0],o.y-s[1]),n=za().point(r.x+e,r.y+t)}else r=za().point(o.x-l.width/2,o.y-l.height/2),n=za().point(o.x+l.width/2,o.y+l.height/2);if((a=za().bounds(r,n)).contains(e))return i[t]}return null},containsPoint:function(e){return!!this._getGraphicAtPoint(e)},_handleClick:function(e){e.target=null;const t=this.layer,s=t._map,i=this._getGraphicAtPoint(s.latLngToLayerPoint(e.latlng));if(i)return this.layer._renderer._ctx.canvas.style.cursor="pointer",e.target=i,void("click"===e.type&&t.options.onClick&&t.options.onClick.call(t,i,e));this.layer._renderer._ctx.canvas.style.cursor="auto"},_clearBuffer:Gc});za().Canvas.include({drawGraphics:function(e,t){var s=this;s._drawing&&e.forEach(function(e){var i=e.getStyle();!i&&t&&(i=t),i.img?s._drawImage.call(s,s._ctx,i,e.getLatLng()):s._drawCanvas.call(s,s._ctx,i,e.getLatLng())})},_drawCanvas:function(e,t,s){var i=t,r=this._map.latLngToLayerPoint(s),n=r.x-i.width/2,a=r.y-i.height/2,o=i.width,l=i.height;e.drawImage(i,n,a,o,l)},_drawImage:function(e,t,s){var i,r;if(t.size){var n=t.size;i=n[0],r=n[1]}else i=t.img.width,r=t.img.height;var a=this._coordinateToPoint(s),o=za().point(a),l=za().point(t.anchor||[i/2,r/2]);a=[o.x-l.x,o.y-l.y],e.drawImage(t.img,a[0],a[1],i,r)},_coordinateToPoint:function(e){if(!this._map)return e;var t=e;za().Util.isArray(e)?t=za().latLng(e[0],e[1]):e instanceof za().LatLng&&(t=za().latLng(e.lat,e.lng));var s=this._map.latLngToLayerPoint(t);return[s.x,s.y]}}); /* Copyright© 2000 - 2022 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.*/ const jc=za().Util.falseFn,zc=function(){let e=document.createElement("div"),t=["transform","WebkitTransform","MozTransform","OTransform","msTransform"];for(let s=0;s-1&&(this._data=e),this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();let t=this._getLayerState();t.data=this._data||[],this._layerDefaultStyleCache=null,this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)},drawGraphics:function(e){this._clearBuffer();let t=this.layer._map.getSize();this._container.width!==t.x&&(this._container.width=t.x),this._container.height!==t.y&&(this._container.height=t.y);let s=this.layer._map.getPanes().mapPane._leaflet_pos;this._container.style[zc]="translate("+-Math.round(s.x)+"px,"+-Math.round(s.y)+"px)",this._data=e||[],this._renderLayer||this._createInnerRender(),this._draw()},_initContainer:function(){this._container=this._createCanvas(this.options.width,this.options.height),this._layerContainer=this.options.container,this._wrapper=za().DomUtil.create("div","deck-wrapper",this._layerContainer),this._wrapper.appendChild(this._container)},_createCanvas:function(e,t){let s=za().DomUtil.create("canvas","graphicLayer leaflet-layer leaflet-zoom-hide");return s.oncontextmenu=za().Util.falseFn,s.width=e,s.height=t,s.style.width=e+"px",s.style.height=t+"px",s},_pixelToMeter:function(e){const t=this.layer._map.getBounds();return e*((t.getEast()-t.getWest())/this.layer._map.getSize().x*(6378137*Math.PI/180))},_createInnerRender:function(){let e=this,t=this._getLayerState(),{color:s,radius:i,opacity:r,highlightColor:n,radiusScale:a,radiusMinPixels:o,radiusMaxPixels:l,strokeWidth:h,outline:u}=t,c={id:"scatter-plot",data:e._data,pickable:Boolean(this.options.onClick)||Boolean(this.options.onHover),autoHighlight:!0,color:s,opacity:r,radius:i,radiusScale:a,highlightColor:n,radiusMinPixels:o,radiusMaxPixels:l,strokeWidth:h,coordinateSystem:this._isWGS84()?window.DeckGL.COORDINATE_SYSTEM.LNGLAT_OFFSETS:window.DeckGL.COORDINATE_SYSTEM.LNGLAT,isGeographicCoordinateSystem:this._isWGS84(),outline:u,getPosition:function(e){if(!e)return[0,0,0];let t=e.getLatLng();return t&&[t.lng,t.lat,0]},getColor:function(t){let s=e._getLayerDefaultStyle(),i=t&&t.options;return i&&i.color||s.color},getRadius:function(t){let s=e._getLayerDefaultStyle(),i=t&&t.getStyle();return i&&i.radius||s.radius},updateTriggers:{getColor:[s],getRadius:[i]}},p=this;this.options.onClick&&(c.onClick=function(){p._container.style.cursor="pointer",p.options.onClick.apply(p,arguments)}),this.options.onHover&&(c.onHover=function(){p._container.style.cursor="pointer",p.options.onHover.apply(p,arguments)}),e._renderLayer=new window.DeckGL.ScatterplotLayer(c)},_getLayerDefaultStyle:function(){if(this._layerDefaultStyleCache)return this._layerDefaultStyleCache;let{color:e,opacity:t,radius:s,radiusScale:i,radiusMinPixels:r,radiusMaxPixels:n,strokeWidth:a,outline:o}=this.layer.options;return s=this._pixelToMeter(s),this._layerDefaultStyleCache={color:e,opacity:t,radius:s,radiusScale:i,radiusMinPixels:r,radiusMaxPixels:n,strokeWidth:a,outline:o},this._layerDefaultStyleCache},_getLayerState:function(){let e=this.layer.getState();return e.zoom=e.zoom-1,e},_draw:function(){let e=this._getLayerState();this._refreshData(),e.data=this._data||[];let t={};for(let s in e)t[s]=e[s];this._layerDefaultStyleCache=null,this._renderLayer.setNeedsRedraw(!0),t.layers=[this._renderLayer],t.canvas=this._container,t.onBeforeRender=this._onBeforeRender.bind(this),t.onAfterRender=this._onAfterRender.bind(this),t.coordinateSystem=this._isWGS84()?window.DeckGL.COORDINATE_SYSTEM.LNGLAT_OFFSETS:window.DeckGL.COORDINATE_SYSTEM.LNGLAT,t.isGeographicCoordinateSystem=this._isWGS84(),this.deckGL?this.deckGL.setProps(t):this.deckGL=new window.DeckGL.experimental.DeckGLJS(t)},_clearBuffer:function(){if(this.deckGL){let e=this.deckGL.layerManager;e&&e.context.gl.clear(e.context.gl.COLOR_BUFFER_BIT)}return this},_refreshData:function(){let e=this._data||[],t=za().Util.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(let e=0;e=0;t--){let s=e[t],i=ee.indexOf(this.graphics,s);-1!==i&&this.graphics.splice(i,1)}this.update()},setStyle:function(e){let t=this.options,s={color:t.color,radius:t.radius,opacity:t.opacity,highlightColor:t.highlightColor,radiusScale:t.radiusScale,radiusMinPixels:t.radiusMinPixels,radiusMaxPixels:t.radiusMaxPixels,strokeWidth:t.strokeWidth,outline:t.outline};this.options=za().Util.extend(this.options,s,e),this.defaultStyle=this._getDefaultStyle(this.options),this.update()},update:function(){this._layerRenderer.update(this.graphics)},clear:function(){this.removeGraphics()},getRenderer:function(){return this._renderer},getState:function(){let e=this._map,t=e.getSize().x,s=e.getSize().y,i=e.getCenter(),r=i.lng,n=i.lat,a=Wc[this._crs.code]||0;Hc[this._crs.code]&&this._crs.resolutions&&this._crs.resolutions.length>0&&(a=Math.round(Math.log2(Hc[this._crs.code]/this._crs.resolutions[0])));let o={longitude:r,latitude:n,zoom:e.getZoom()+a,maxZoom:e.getMaxZoom()+a,pitch:0,bearing:0},l={};for(let e in o)l[e]=o[e];l.width=t,l.height=s;let h=this.options;return l.color=h.color,l.radius=h.radius,l.opacity=h.opacity,l.highlightColor=h.highlightColor,l.radiusScale=h.radiusScale,l.radiusMinPixels=h.radiusMinPixels,l.radiusMaxPixels=h.radiusMaxPixels,l.strokeWidth=h.strokeWidth,l.outline=h.outline,l},_resize:function(){let e=this._map.getSize();this._container.width=e.x,this._container.height=e.y,this._container.style.width=e.x+"px",this._container.style.height=e.y+"px";let t=this._map.containerPointToLayerPoint([0,0]);za().DomUtil.setPosition(this._container,t),this._update()},_moveEnd:function(){this._layerRenderer instanceof Vc&&this._update()},_createRenderer:function(){let e,t=this._map,s=t.getSize().x,i=t.getSize().y;if(this.options.render===Jc[0])e=new Uc(this,{width:s,height:i,renderer:t.getRenderer(this)});else{let r=za().Util.setOptions({},qc),n=za().Util.setOptions({options:r},this.options);(n=za().Util.setOptions(this,n)).container=t.getPane("overlayPane"),n.width=s,n.height=i,e=new Vc(this,n)}return e.defaultStyle=this.defaultStyle,this._layerRenderer=e,this._layerRenderer.getRenderer()},_update:function(){this._map&&this._updatePath()},_updatePath:function(){let e=this._getGraphicsInBounds();this._renderer.drawGraphics(e,this.defaultStyle)},_project:function(){let e=this;e._getGraphicsInBounds().map(function(t){let s=e._map.latLngToLayerPoint(t.getLatLng()),i=e._clickTolerance(),r=[t._anchor+i,t._anchor+i];return t._pxBounds=new(za().Bounds)(s.subtract(r),s.add(r)),t}),e._pxBounds=za().bounds(za().point(0,0),za().point(this._container.width,this._container.height))},_getDefaultStyle:function(e){const t={};if(e.color){t.fill=!0;const s=this.toRGBA(e.color);t.color=s,t.fillColor=s}return e.opacity&&(t.opacity=e.opacity,t.fillOpacity=e.opacity),e.radius&&(t.radius=e.radius),e.strokeWidth&&(t.weight=e.strokeWidth),e.outline&&(t.stroke=e.outline),new kc(t).getStyle()},toRGBA:e=>`rgba(${e[0]},${e[1]},${e[2]},${(e[3]||255)/255})`,_getGraphicsInBounds:function(){let e=[],t=this._map.getBounds();return this.graphics.map(function(s){return t.contains(s.getLatLng())&&e.push(s),s}),e},_handleClick:function(e){this._layerRenderer._handleClick(e)},beforeAdd:za().Util.falseFn,_containsPoint:function(e){return this._layerRenderer.containsPoint(e)}}); /* Copyright© 2000 - 2022 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 Qc=uc.extend({options:{isOverLay:!0},initialize:function(e,t,s){var i=[];i.push(e),i.push(s),uc.prototype.initialize.apply(this,i),this.chartsType=t,this.themeFields=s&&s.themeFields?s.themeFields:null,this.charts=s&&s.charts?s.charts:[],this.cache=s&&s.cache?s.cache:{},this.chartsSetting=s&&s.chartsSetting?s.chartsSetting:{}},setChartsType:function(e){this.chartsType=e,this.redraw()},addFeatures:function(e){var t=this;t.fire("beforefeaturesadded",{features:e}),this.features=this.toiClientFeature(e),t.renderer&&(t._map?t.redrawThematicFeatures(t._map.getBounds()):t.redrawThematicFeatures())},redrawThematicFeatures:function(e){var t=this;t.renderer.clearAll();var s=t.features;if(this.options.alwaysMapCRS&&e&&e instanceof za().LatLngBounds){var i=this._map.options.crs;e=za().bounds(i.project(e.getSouthWest()),i.project(e.getNorthEast()))}e=Mu.toSuperMapBounds(e);for(var r=0,n=s.length;r=s.left&&a.x<=s.right&&a.y>=s.top&&a.y<=s.bottom){i=!0;break}}return i},clearCache:function(){this.cache={},this.charts=[]},removeFeatures:function(e){this.clearCache(),uc.prototype.removeFeatures.call(this,e)},removeAllFeatures:function(){this.clearCache(),uc.prototype.removeAllFeatures.apply(this,arguments)},redraw:function(){return this.clearCache(),uc.prototype.redraw.apply(this,arguments)},clear:function(){var e=this;e.renderer&&(e.renderer.clearAll(),e.renderer.refresh()),e.removeAllFeatures(),e.clearCache()},getWeightFieldValue:function(e,t,s){if((void 0===s||isNaN(s))&&(s=0),!e.attributes)return s;var i=e.attributes[t];return(void 0===i||isNaN(i))&&(i=s),i},_sortChart:function(){this.charts&&this.charts.sort(function(e,t){return void 0===e.__overlayWeight&&void 0===t.__overlayWeight?0:void 0!==e.__overlayWeight&&void 0===t.__overlayWeight?-1:void 0===e.__overlayWeight&&void 0!==t.__overlayWeight?1:void 0!==e.__overlayWeight&&void 0!==t.__overlayWeight?parseFloat(e.__overlayWeight)1?s.weight/10:s.weight)):t.setAttribute("stroke","none"),s.fill?(t.setAttribute("fill",s.fillColor||s.color),t.setAttribute("fill-opacity",s.fillOpacity)):t.setAttribute("fill","none")}}); /* Copyright© 2000 - 2022 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 ap=za().CircleMarker.extend({includes:rp.prototype,statics:{iconCache:{}},initialize:function(e,t){rp.prototype.initialize.call(this,e),this._makeFeatureParts(e,t)},getLatLng:void 0,render:function(e,t){rp.prototype.render.call(this,e,t),this._radius=t.radius||za().CircleMarker.prototype.options.radius,this._updatePath()},_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var s=e.geometry[0];"object"==typeof s[0]&&"x"in s[0]?(this._point=za().point(s[0]).scaleBy(t),this._empty=za().Util.falseFn):(this._point=za().point(s).scaleBy(t),this._empty=za().Util.falseFn)},makeInteractive:function(){this._updateBounds()},updateStyle:function(e,t){return this._radius=t.radius||this._radius,this._updateBounds(),rp.prototype.updateStyle.call(this,e,t)},_updateBounds:function(){if(this.options.iconUrl&&this.options.iconSize){var e=za().point(this.options.iconSize),t=e&&e.divideBy(2,!0),s=this._point.subtract(t);this._pxBounds=new(za().Bounds)(s,s.add(e))}else za().CircleMarker.prototype._updateBounds.call(this)},_updatePath:function(){this.options.iconUrl?this._renderer._updateIcon(this):za().CircleMarker.prototype._updatePath.call(this)},_getImage:function(){if(!this.options.iconUrl)return null;var e=this.options.iconUrl,t=ap.iconCache[e];if(!t){var s=this.options.iconSize||[50,50];t=ap.iconCache[e]=this._createIcon(e,s)}return t},_createIcon:function(e,t){var s=e;if(!s)throw new Error("iconUrl not set in Icon options (see the docs).");var i=document.createElement("img");i.src=s,i.className="leaflet-marker-icon "+(this.layerName||"");var r=t;if("number"==typeof r&&(r=[r,r]),r){var n=za().point(r),a=za().point(n&&n.divideBy(2,!0));n&&(i.style.width=n.x+"px",i.style.height=n.y+"px"),a&&(i.style.marginLeft=-a.x+"px",i.style.marginTop=-a.y+"px")}return i.onload=function(){r||(i.style.width=this.width+"px",i.style.height=this.height+"px")},i},_containsPoint:function(e){return this.options.iconUrl?this._pxBounds.contains(e):za().CircleMarker.prototype._containsPoint.call(this,e)}}),op={_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var s,i=e.geometry;this._parts=[];for(var r=0;r-1?new dp(i):new fp(i)).getTile().then(function(t){e.render(t,s)})},render:function(e,t){if(e){for(var s=this,i=s.renderer,r=s.layer,n=0;n0&&a[a.length-1]}t.properties.textField=n}s.vectorTileLayerStyles=s.vectorTileLayerStyles||{};var o=s.vectorTileLayerStyles[i];if(o)return t=this._mergeFeatureTextField(t,o),o;var l=this.getScaleFromCoords(e),h=this.cartoCSSToLeaflet.pickShader(i)||[];for(var u in o=[],h)for(var c=h[u],p=0;p1){var u=parseInt(h[1]);o=u&&u>=4e3&&u<=5e3?l.DEGREE:l.METER}}return Uu(a,96,o)},_mergeFeatureTextField:function(e,t){if(!this.options.serverCartoCSSStyle||!t||"TEXT"!==e.type)return e;var s=t;za().Util.isArray(t)||(s=[t]);for(var i=0;i0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)},convertFastToPixelPoints:function(e){var t,s,i,r,n,a,o,l=[],h=e.getEast()-e.getWest(),u=e.getNorth()-e.getSouth(),c=this._map.getSize();r=h/c.x>u/c.y?h/c.x:u/c.y,this.useRadius=this.useGeoUnit?parseInt(this.radius/r):this.radius;for(var p=0;p0&&this.maxWidth>0))return!1;var s=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var i=0;i{s.currentStatisticResult[t]=null,s._fieldStatisticRequest(e.datasource,e.dataset,i,t)})}},_fieldStatisticRequest:function(e,t,s,i){var r=this;new ps(r.url,{eventListeners:{scope:r,processCompleted:r._processCompleted,processFailed:r._statisticsCallback},datasource:e,dataset:t,field:s,statisticMode:i,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers}).processAsync()},_processCompleted:function(e){var t=this,s=!0,i=e.result;for(var r in this.currentStatisticResult&&null==t.currentStatisticResult[i.mode]&&(this.currentStatisticResult[i.mode]=i.result),t.currentStatisticResult)if(null==t.currentStatisticResult[r]){s=!1;break}s&&t._statisticsCallback({result:t.currentStatisticResult})}}),Ep=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},getGridCellInfos:function(e,t){if(e instanceof Ws){var s=this;new Ys(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}}});const Lp=bu.extend({initialize:function(e,t){t=t||{},za().setOptions(this,t),bu.prototype.initialize.call(this,e,t),this.headers={},this.crossOrigin=!0,this.withCredentials=!0,this.proxy=!0},getTools:function(e){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:e,processFailed:e}}).getTools()},getTool:function(e,t){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getTool(e)},execute:function(e,t,s,i){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:i,processFailed:i}}).execute(e,t,s)},submitJob:function(e,t,s,i){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:i,processFailed:i}}).submitJob(e,t,s)},waitForJobCompletion:function(e,t,s,i){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:i,processFailed:i}}).waitForJobCompletion(e,t,s)},getJobInfo:function(e,t,s){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).getJobInfo(e,t)},cancelJob:function(e,t,s){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).cancelJob(e,t)},getJobs:function(e,t){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getJobs(e)},getResults:function(e,t,s,i){new Os(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,eventListeners:{scope:this,processCompleted:i,processFailed:i}}).getResults(e,t,s)}}); /* Copyright© 2000 - 2022 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 Op=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},getLayersInfo:function(e){var t=this;new wi(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{processCompleted:e,processFailed:e}}).processAsync()},setLayerInfo:function(e,t){if(e instanceof ir){var s=this,i=e.resourceID,r=e.tempLayerName,n=e.layerInfo;if(i&&r){var a=ee.urlPathAppend(s.url,`tempLayersSet/${i}/${r}`);new rr(a,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(n)}}},setLayersInfo:function(e,t){if(e instanceof nr){var s=this,i=e.resourceID,r=!!e.isTempLayers&&e.isTempLayers,n=e.layersInfo;if((!r||i)&&n)new ar(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{processCompleted:t,processFailed:t},resourceID:i,isTempLayers:r}).processAsync(n)}},setLayerStatus:function(e,t){if(e instanceof or){var s=this;new lr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(e)}}}),Pp=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},measureDistance:function(e,t){return this.measure(o.DISTANCE,e,t),this},measureArea:function(e,t){return this.measure(o.AREA,e,t),this},measure:function(e,t,s){if(t instanceof ki){var i=this;t.geometry&&(t.geometry=Bu(t.geometry)),new Bi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,measureMode:e,eventListeners:{scope:i,processCompleted:s,processFailed:s}}).processAsync(t)}}}),Np=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},sinksFacilityAnalyst:function(e,t){var s=this;new $t(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)},sourcesFacilityAnalyst:function(e,t){var s=this;new ts(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)},traceUpFacilityAnalyst:function(e,t){var s=this;new os(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)},traceDownFacilityAnalyst:function(e,t){var s=this;new ns(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)},upstreamFacilityAnalyst:function(e,t){var s=this;new hs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)}}),Ip=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},burstPipelineAnalyst:function(e,t){var s=this;new At(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))},computeWeightMatrix:function(e,t){var s=this;new Rt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(s._processParams(e))},findClosestFacilities:function(e,t,s){var i=this;new fs(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},streamFacilityAnalyst:function(e,t,s){var i=this;new is(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},findLocation:function(e,t,s){var i=this;new ys(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},findPath:function(e,t,s){var i=this;new bs(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},findTSPPaths:function(e,t,s){var i=this;new ws(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},findMTSPPaths:function(e,t,s){var i=this;new vs(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},findServiceAreas:function(e,t,s){var i=this;new _s(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},updateEdgeWeight:function(e,t){var s=this;new Vr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)},updateTurnNodeWeight:function(e,t){var s=this;new qr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).processAsync(e)},_processParams:function(e){if(!e)return{};if(e.centers&&za().Util.isArray(e.centers)&&e.centers.map(function(t,s){return e.centers[s]=t instanceof za().LatLng?{x:t.lng,y:t.lat}:t,e.centers[s]}),e.nodes&&za().Util.isArray(e.nodes)&&e.nodes.map(function(t,s){return e.nodes[s]=t instanceof za().LatLng?{x:t.lng,y:t.lat}:t,e.nodes[s]}),e.event&&e.event instanceof za().LatLng&&(e.event={x:e.event.lng,y:e.event.lat}),e.facilities&&za().Util.isArray(e.facilities)&&e.facilities.map(function(t,s){return e.facilities[s]=t instanceof za().LatLng?{x:t.lng,y:t.lat}:t,e.facilities[s]}),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;za().Util.isArray(t)?t.map(function(t,s){return e.parameter.barrierPoints[s]=t instanceof za().LatLng?{x:t.lng,y:t.lat}:t,e.parameter.barrierPoints[s]}):e.parameter.barrierPoints=[t instanceof za().LatLng?{x:t.lng,y:t.lat}:t]}return e},_processFormat:function(e){return e||t.GEOJSON}}),Fp=bu.extend({initialize:function(e,t){t=t||{},za().setOptions(this,t),bu.prototype.initialize.call(this,e,t),this.kernelDensityJobs={},this.summaryMeshJobs={},this.queryJobs={},this.summaryRegionJobs={},this.vectorClipJobs={},this.overlayGeoJobs={},this.buffersJobs={},this.topologyValidatorJobs={},this.summaryAttributesJobs={}},getKernelDensityJobs:function(e,t){var s=this,i=s._processFormat(t);new Ni(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getKernelDensityJobs()},getKernelDensityJob:function(e,t,s){var i=this,r=i._processFormat(s);new Ni(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getKernelDensityJob(e)},addKernelDensityJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new Ni(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.kernelDensityJobs[e.id]=e.state}},format:a}).addKernelDensityJob(n,s)},getKernelDensityJobState:function(e){return this.kernelDensityJobs[e]},getSummaryMeshJobs:function(e,t){var s=this,i=s._processFormat(t);new yr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getSummaryMeshJobs()},getSummaryMeshJob:function(e,t,s){var i=this,r=i._processFormat(s);new yr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getSummaryMeshJob(e)},addSummaryMeshJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new yr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.summaryMeshJobs[e.id]=e.state}},format:a}).addSummaryMeshJob(n,s)},getSummaryMeshJobState:function(e){return this.summaryMeshJobs[e]},getQueryJobs:function(e,t){var s=this,i=s._processFormat(t);new ur(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getQueryJobs()},getQueryJob:function(e,t,s){var i=this,r=i._processFormat(s);new ur(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getQueryJob(e)},addQueryJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new ur(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.queryJobs[e.id]=e.state}},format:a}).addQueryJob(n,s)},getQueryJobState:function(e){return this.queryJobs[e]},getSummaryRegionJobs:function(e,t){var s=this,i=s._processFormat(t);new vr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getSummaryRegionJobs()},getSummaryRegionJob:function(e,t,s){var i=this,r=i._processFormat(s);new vr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getSummaryRegionJob(e)},addSummaryRegionJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new vr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.summaryRegionJobs[e.id]=e.state}},format:a}).addSummaryRegionJob(n,s)},getSummaryRegionJobState:function(e){return this.summaryRegionJobs[e]},getVectorClipJobs:function(e,t){var s=this,i=s._processFormat(t);new Yr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getVectorClipJobs()},getVectorClipJob:function(e,t,s){var i=this,r=i._processFormat(s);new Yr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getVectorClipJob(e)},addVectorClipJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new Yr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.vectorClipJobs[e.id]=e.state}},format:a}).addVectorClipJob(n,s)},getVectorClipJobState:function(e){return this.vectorClipJobs[e]},getOverlayGeoJobs:function(e,t){var s=this,i=s._processFormat(t);new ji(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getOverlayGeoJobs()},getOverlayGeoJob:function(e,t,s){var i=this,r=i._processFormat(s);new ji(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getOverlayGeoJob(e)},addOverlayGeoJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new ji(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.overlayGeoJobs[e.id]=e.state}},format:a}).addOverlayGeoJob(n,s)},getoverlayGeoJobState:function(e){return this.overlayGeoJobs[e]},getBuffersJobs:function(e,t){var s=this,i=s._processFormat(t);new Ct(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getBuffersJobs()},getBuffersJob:function(e,t,s){var i=this,r=i._processFormat(s);new Ct(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getBuffersJob(e)},addBuffersJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new Ct(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.buffersJobs[e.id]=e.state}},format:a}).addBuffersJob(n,s)},getBuffersJobState:function(e){return this.buffersJobs[e]},getTopologyValidatorJobs:function(e,t){var s=this,i=s._processFormat(t);new Dr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getTopologyValidatorJobs()},getTopologyValidatorJob:function(e,t,s){var i=this,r=i._processFormat(s);new Dr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getTopologyValidatorJob(e)},addTopologyValidatorJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new Dr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.topologyValidatorJobs[e.id]=e.state}},format:a}).addTopologyValidatorJob(n,s)},getTopologyValidatorJobState:function(e){return this.topologyValidatorJobs[e]},getSummaryAttributesJobs:function(e,t){var s=this,i=s._processFormat(t);new fr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:i}).getSummaryAttributesJobs()},getSummaryAttributesJob:function(e,t,s){var i=this,r=i._processFormat(s);new fr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:r}).getSummaryAttributesJob(e)},addSummaryAttributesJob:function(e,t,s,i){var r=this,n=r._processParams(e),a=r._processFormat(i);new fr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.summaryAttributesJobs[e.id]=e.state}},format:a}).addSummaryAttributesJob(n,s)},getSummaryAttributesJobState:function(e){return this.summaryAttributesJobs[e]},_processFormat:function(e){return e||t.GEOJSON},_processParams:function(e){return e?(e.bounds&&(e.bounds=Mu.toSuperMapBounds(e.bounds)),e.query&&(e.query=Mu.toSuperMapBounds(e.query)),e.geometryQuery&&(e.geometryQuery=Mu.toProcessingParam(e.geometryQuery)),e.geometryClip&&(e.geometryClip=Mu.toProcessingParam(e.geometryClip)),e):{}}}),Dp=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},queryByBounds:function(e,t,s){var i=this;new Ji(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},queryByDistance:function(e,t,s){var i=this;new Hi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},queryBySQL:function(e,t,s){var i=this;new Xi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},queryByGeometry:function(e,t,s){var i=this;new Yi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},_processParams:function(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.queryParams&&!za().Util.isArray(e.queryParams)&&(e.queryParams=[e.queryParams]),e.bounds&&(e.bounds=Mu.toSuperMapBounds(e.bounds)),e.geometry&&(e.geometry instanceof za().Point?e.geometry=new le(e.geometry.x,e.geometry.y):e.geometry=Bu(e.geometry)),e):{}},_processFormat:function(e){return e||t.GEOJSON}}),Rp=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},getAreaSolarRadiationResult:function(e,t,s){var i=this;new ht(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(e)},bufferAnalysis:function(e,t,s){var i=this;new gt(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},densityAnalysis:function(e,t,s){var i=this;new Yt(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},generateSpatialData:function(e,t,s){var i=this;new As(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(e)},geoRelationAnalysis:function(e,t,s){var i=this;new Ns(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(e)},interpolationAnalysis:function(e,t,s){var i=this;new Oi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},mathExpressionAnalysis:function(e,t,s){var i=this;new Ri(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},overlayAnalysis:function(e,t,s){var i=this;new Gi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},routeCalculateMeasure:function(e,t,s){var i=this;new Zi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},routeLocate:function(e,t,s){var i=this;new er(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},surfaceAnalysis:function(e,t,s){var i=this;new br(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},terrainCurvatureCalculate:function(e,t,s){var i=this;new _r(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(e)},thiessenAnalysis:function(e,t,s){var i=this;new Pr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t},format:i._processFormat(s)}).processAsync(i._processParams(e))},geometrybatchAnalysis:function(e,t,s){for(var i=new Nr(this.url,{eventListeners:{scope:this,processCompleted:t,processFailed:t},format:this._processFormat(s)}),r=[],n=0;nza().Util.isArray(e)?{x:e[0],y:e[1]}:e instanceof le||e instanceof za().Point?{x:e.x,y:e.y}:e instanceof za().LatLng?{x:e.lng,y:e.lat}:e}),Up=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},getCollections:function(e){var t=this;new hn(this.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).getCollections()},getCollectionByID:function(e,t){var s=this;new hn(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).getCollectionByID(e)},search:function(e,t){var s=this;new hn(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).search(e)}}),jp=bu.extend({initialize:function(e,t){bu.prototype.initialize.call(this,e,t)},getLegend:function(e,t){var s=this;new ln(this.url,{collectionId:s.options.collectionId,proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).getLegend(e)},getStatistics:function(e){var t=this;new ln(t.url,{collectionId:t.options.collectionId,proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).getStatistics()},getTileInfo:function(e){var t=this;new ln(t.url,{collectionId:t.options.collectionId,proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).getTileInfo()},deleteItemByID(e,t){var s=this;new ln(this.url,{collectionId:s.options.collectionId,proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).deleteItemByID(e)},getItemByID(e,t){var s=this;new ln(s.url,{collectionId:s.options.collectionId,proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:t,processFailed:t}}).getItemByID(e)}}),zp=za().Control.extend({options:{position:"topright",style:(e,t)=>t?za().circleMarker(t,{fillColor:"blue",weight:1,opacity:1,color:"blue",fillOpacity:.6}):{fillColor:"blue",weight:1,opacity:1,color:"blue",fillOpacity:.6},onEachFeature:null},initialize(e){za().setOptions(this,e),this._event=new(za().Evented),this.rootContainer=null},onAdd(e){return this.map=e,this.rootContainer=this._initView(),this.rootContainer},on(e,t){this._event.on(e,t)},off(e,t){this._event.off(e,t)},_initView(){},_preventMapEvent(e,t){e&&t&&(e.addEventListener("mouseover",function(){t.dragging.disable(),t.scrollWheelZoom.disable(),t.doubleClickZoom.disable()}),e.addEventListener("mouseout",function(){t.dragging.enable(),t.scrollWheelZoom.enable(),t.doubleClickZoom.enable()}))}}),Vp=za().Evented.extend({initialize(){this.fileModel=new /* Copyright© 2000 - 2022 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.*/ class{constructor(e){this.FileTypes=ba,this.FileConfig=xa,this.loadFileObject=e&&e.loadFileObject?e.loadFileObject:[]}set(e,t){this[e]=t}get(e){return this[e]}}},readFile(e){let t=e.target,s=t.files[0];if(s.size>this.fileModel.FileConfig.fileMaxSize)return this.fire("filesizeexceed",{messageType:"warring",message:Ma.i18n("msg_fileSizeExceeded")}),!1;let i=t.value,r=s.name,n=Ua.getFileType(r);if(!n)return this.fire("errorfileformat",{messageType:"failure",message:Ma.i18n("msg_fileTypeUnsupported")}),!1;""!==r&&(this.fileModel.set("loadFileObject",{file:s,filePath:i,fileName:r,fileType:n}),this._readData())},_readData(){const e=this,t=this.fileModel.loadFileObject.fileType;Ta.readFile(t,{file:this.fileModel.loadFileObject.file,path:this.fileModel.loadFileObject.filePath},s=>{Ta.processDataToGeoJson(t,s,e=>{e&&this.fire("openfilesucceeded",{result:e,layerName:this.fileModel.loadFileObject.fileName.split(".")[0]})},t=>{e.fire("openfilefailed",{messageType:"failure",message:t})},this)},()=>{e.fire("openfilefailed",{messageType:"failure",message:Ma.i18n("msg_openFileFail")})},this)}}),Jp=zp.extend({options:{layer:null},initialize(e){zp.prototype.initialize.apply(this,[e]),this.viewModel=new Vp},setViewStyle(e,t){this.rootContainer.style[e]=t},_initView(){const e=za().DomUtil.create("div","component-openfile");return e.id="openFile",this.fileSelect=za().DomUtil.create("div","",e),this.label=za().DomUtil.create("label","component-openfile__span--select",this.fileSelect),this.label.htmlFor="input_file",za().DomUtil.create("div","supermapol-icons-upload",this.label),za().DomUtil.create("span","component-openfile__span",this.label).appendChild(document.createTextNode(Ma.i18n("text_chooseFile"))),this.fileInput=za().DomUtil.create("input","component-openfile__input",this.fileSelect),this.fileInput.id="input_file",this.fileInput.type="file",this.fileInput.accept=".json,.geojson,.csv,.xls,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",this.fileInput.onchange=(e=>{this.messageBox.closeView(),this.viewModel.readFile(e)}),this.messageBox=new _a,this.viewModel.on("filesizeexceed",e=>{this.messageBox.showView(e.message,e.messageType)}),this.viewModel.on("errorfileformat",e=>{this.messageBox.showView(e.message,e.messageType)}),this.viewModel.on("openfilefailed",e=>{this.messageBox.showView(e.message,e.messageType),this._event.fire("openfilefailed",e)}),this.viewModel.on("readdatafail",e=>{this.messageBox.showView(e.message,e.messageType)}),this.viewModel.on("openfilesucceeded",e=>{this._event.fire("openfilesucceeded",e)}),this._preventMapEvent(e,this.map),e}}); /* Copyright© 2000 - 2022 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.*/ class qp{constructor(e){this.layers=[],e&&e.length>0&&this.addLayers(e),this.currentLayerDataModel=null}addLayers(e,t,s,i){for(let r=0;r0?i.operatingAttributeNames:i.attributeNames).length;a0?this.fire("searchlayersucceeded",{result:s}):this.fire("searchfailed",{searchType:"searchLayersField"})}},searchFromCityLocalSearchService(e){if(this.searchCache[e])this.fire("geocodesucceeded",{result:this.searchCache[e]});else{this.geoCodeParam.keyWords=e||this.geoCodeParam.city;const t=this;let s=this._getSearchUrl(this.geoCodeParam);Ue.get(s).then(e=>e.json()).then(e=>{if(e.error||0===e.poiInfos.length)t.fire("searchfailed",{searchType:"searchGeocodeField"});else if(e.poiInfos){const s=t._dataToGeoJson(e.poiInfos,t.geoCodeParam);t.fire("geocodesucceeded",{result:s})}})}},addSearchLayers(e){this.dataModel.addLayers(e,e=>{this.fire("newlayeradded",{layerName:e.layerName})},null,this)},panToLayer(e){this.dataModel.layers[e]&&this.map.flyToBounds(this.dataModel.layers[e].layer.getBounds())},panToCity(e){this.geoCodeParam.keyWords=e,this.geoCodeParam.city=e;const t=this;let s=this._getSearchUrl(this.geoCodeParam);Ue.get(s).then(e=>e.json()).then(e=>{if(e.poiInfos.length>0){const s=za().latLng(e.poiInfos[0].location.y,e.poiInfos[0].location.x);t.map.setView(s,8)}else t.fire("searchfailed",{searchType:"cityGeocodeField"})})},_dataToGeoJson(e,t){let s=[];for(let i=0;i{"SPAN"===e.target.nodeName&&e.target.innerText&&(this.viewModel.panToCity(e.target.innerHTML),this.messageBox.closeView(),r.removeChild(r.firstChild),r.insertBefore(document.createTextNode(e.target.innerHTML),r.firstChild),this.isSearchLayer=!1)}),r.appendChild(document.createTextNode(e.content.getElementsByTagName("span")[0].innerText))}const o=function(){const t=document.createElement("div");t.setAttribute("class","component-search__layers");const s=document.createElement("div");s.setAttribute("class","component-search-layers-content"),t.appendChild(s);const i=document.createElement("div");i.setAttribute("class","component-search__layers__header");const n=document.createElement("div");n.setAttribute("class","load-btn"),i.appendChild(n);const a=document.createElement("span");a.setAttribute("class","supermapol-icons-poi-load"),n.appendChild(a);const o=document.createElement("span");o.appendChild(document.createTextNode(Ma.i18n("text_loadSearchCriteria"))),n.appendChild(o);const l=document.createElement("div");l.setAttribute("class","save-btn"),i.appendChild(l);const h=document.createElement("span");h.setAttribute("class","supermapol-icons-poi-save"),l.appendChild(h);const u=document.createElement("span");u.appendChild(document.createTextNode(Ma.i18n("text_saveSearchCriteria"))),l.appendChild(u);const c=document.createElement("div");return c.setAttribute("class","component-search__layers__body"),c.onclick=(t=>{e.clearSearchResult();let s=null;if("component-search__layers__itme__singleselect"===t.target.classList[0])s=t.target;else{if("component-single-default-img"!==t.target.classList[0]&&"single-label"!==t.target.classList[0])return;s=t.target.parentNode}document.getElementsByClassName("component-single-checked-img").length>0&&document.getElementsByClassName("component-single-checked-img")[0].setAttribute("class","component-single-default-img"),s.firstChild.setAttribute("class","component-single-checked-img"),e.currentSearchLayerName=s.lastChild.innerText,e.isSearchLayer=!0,r.removeChild(r.firstChild),r.insertBefore(document.createTextNode(e.currentSearchLayerName),r.firstChild),e.viewModel.panToLayer(e.currentSearchLayerName),e.messageBox.closeView()}),s.appendChild(c),t}();let l=[];a&&l.push({title:Ma.i18n("title_searchCity"),content:a}),l.push({title:Ma.i18n("title_searchLayer"),content:o});const h=new Ba({tabs:l}),u=h.getElement();h.closeView(),s.appendChild(u),i.onclick=(()=>{u.hidden?h.showView():h.closeView()}),s.appendChild(i),r.innerText||r.appendChild(document.createTextNode(Ma.i18n("text_label_chooseSearchLayers")));const c=document.createElement("div");c.setAttribute("class","component-search__input");const p=document.createElement("input");p.type="text",p.placeholder=Ma.i18n("text_label_searchTips"),c.appendChild(p),this.poiInput=p;const d=document.createElement("span");d.setAttribute("class","supermapol-icons-close"),d.hidden=!0,c.appendChild(d),s.appendChild(c);const f=document.createElement("div");f.setAttribute("class","component-search-icon supermapol-icons-search");const m=new Ga;this._resultDomObj=m,f.onclick=(()=>{m.closeView(),this.clearSearchResult(),this.messageBox.closeView(),h.closeView();const e=this.poiInput.value.trim();""!==e?this.isSearchLayer?this.viewModel.search(e,this.currentSearchLayerName):this.viewModel.search(e):this.messageBox.showView(Ma.i18n("msg_searchKeywords"))}),p.onkeypress=(e=>{if(13==e.which){var t=document.createEvent("HTMLEvents");t.initEvent("click",!1,!0),f.dispatchEvent(t)}}),s.appendChild(f);const y=function(){const t=m.getElement();return t.style.position="absolute",t.style.top="44px",t.style.right="0",m.closeView(),m.content.onclick=(t=>{let s=null;if("component-search-result-info"===t.target.parentNode.className)s=t.target.parentNode.parentNode;else if("component-search__resultitme"===t.target.parentNode.className)s=t.target.parentNode;else{if("component-search__resultitme"!==t.target.className)return;s=t.target}document.getElementsByClassName("component-search__resultitme-selected").length>0&&document.getElementsByClassName("component-search__resultitme-selected")[0].classList.remove("component-search__resultitme-selected"),s.firstChild.classList.add("component-search__resultitme-selected");let i=s.children[1].firstChild.innerText;e._linkageFeature(i)}),t}();return s.appendChild(y),d.onclick=(e=>{this.clearSearchResult(),p.value="",e.target.hidden=!0,m.closeView()}),p.oninput=(()=>{d.hidden=!1}),this.messageBox=new _a,this._addViewModelListener(),t.appendChild(s),this._preventMapEvent(t,this.map),t},_createSearchLayerItem(e){const t=document.createElement("div");t.setAttribute("class","component-search__layers__itme");const s=document.createElement("div");s.setAttribute("class","component-search__layers__itme__singleselect");const i=document.createElement("div");i.setAttribute("class","component-single-default-img"),s.appendChild(i);const r=document.createElement("span");r.setAttribute("class","single-label"),r.innerHTML=e,s.appendChild(r),t.appendChild(s),document.getElementsByClassName("component-search__layers__body")[0].appendChild(t)},_createResultItem(e,t){const s=document.createElement("div");s.setAttribute("class","component-search__resultitme");let i=document.createElement("div");"Point"===e||"MultiPoint"===e?i.setAttribute("class","supermapol-icons-marker-layer component-search-result-icon"):"LineString"===e||"MultiLineString "===e?i.setAttribute("class","supermapol-icons-line-layer component-search-result-icon"):"Polygon"===e||"MultiPolygon"===e?i.setAttribute("class","supermapol-icons-polygon-layer component-search-result-icon"):i.setAttribute("class","supermapol-icons-point-layer component-search-result-icon"),s.appendChild(i);const r=document.createElement("div");r.setAttribute("class","component-search-result-info");const n=document.createElement("div");r.appendChild(n);const a=document.createElement("div");return t.name?(n.innerHTML=t.name,a.innerHTML=t.address,r.appendChild(a)):n.innerHTML=t.filterAttributeName+": "+t.filterAttributeValue,s.appendChild(r),document.createElement("div").setAttribute("class","component-checkbox component-checkbox-default-img"),s},_addViewModelListener(){this.viewModel.on("searchlayerschanged",e=>{for(let t=0;t{this._createSearchLayerItem(e.layerName)}),this.viewModel.on("searchlayersucceeded",e=>{const t=e.result;this.clearSearchResult(),this.searchResultLayer=za().featureGroup(t,{pointToLayer:this.options.style,style:this.options.style}).bindPopup(function(e){if(e.feature.properties)return new Da({attributes:e.feature.properties}).getElement()}).addTo(this.map),this.searchResultLayer.eachLayer(e=>{this.options.onEachFeature?this.options.onEachFeature(e.toGeoJSON(),e):this._featureOnclickEvent.bind(this)(e.toGeoJSON(),e)}),this.searchLayersData=t,this._prepareResultData(t),this._event.fire("searchlayersucceeded",{result:this.searchResultLayer.toGeoJSON()})}),this.viewModel.on("geocodesucceeded",e=>{const t=e.result;this.clearSearchResult(),this.searchResultLayer=za().geoJSON(t,{pointToLayer:this.options.style,style:this.options.style,onEachFeature:this.options.onEachFeature||this._featureOnclickEvent.bind(this)}).bindPopup(function(e){if(e.feature.properties)return new Da({attributes:e.feature.properties}).getElement()}).addTo(this.map),this.searchLayersData=t,this._prepareResultData(t),this._event.fire("geocodesucceeded",{result:t})}),this.viewModel.on("searchfailed",e=>{let t="";t="searchGeocodeField"===e.searchType?Ma.i18n("msg_searchGeocodeField"):"cityGeocodeField"===e.searchType?Ma.i18n("msg_cityGeocodeField"):Ma.i18n("msg_getFeatureField"),this.messageBox.showView(t),this._event.fire("searchfailed",{message:t})})},_prepareResultData(e){this.currentResult=e;let t=Math.ceil(e.length/this.perPageDataNum);this._resultDomObj.setPageLink(t),this._createResultListByPageNum(1,e),this._resultDomObj.showView(),this._resultDomObj.setLinkageEvent(function(e){s._createResultListByPageNum(e,s.currentResult)});const s=this},_createResultListByPageNum(e,t){let s,i=0;1===e&&t.lengtht.length?(i=this.perPageDataNum*(e-1),s=t.length-1):(i=this.perPageDataNum*(e-1),s=e*this.perPageDataNum-1);const r=document.createElement("div");for(let e=i;e<=s;e++){let s,i="Point";t[e].filterAttribute?(i=t[e].feature.geometry.type,s=t[e].filterAttribute):s=t[e].properties,r.appendChild(this._createResultItem(i,s))}this._resultDomObj.setContent(r),this._resultDomObj.showView(),r.firstChild.getElementsByClassName("component-search-result-icon")[0].classList.add("component-search__resultitme-selected");const n=r.firstChild.getElementsByClassName("component-search-result-info")[0].firstChild.innerText;!this._selectMarkerFeature&&this._linkageFeature(n)},_flyToBounds(e){const t=e.getSouthWest(),s=e.getNorthEast();t.lat===s.lat&&t.lng===s.lng?this.map.flyTo(t):this.map.fitBounds(e)},_linkageFeature(e){let t="";t=this.isSearchLayer?e.split(":")[1].trim():e,this._selectFeature&&this._selectFeature.addTo(this.map),this.searchResultLayer.eachLayer(e=>{(!t||e.filterAttribute&&e.filterAttribute.filterAttributeValue===t||e.feature.properties&&e.feature.properties.name===t)&&(e.remove(),this._setSelectedLayerStyle(e))})},clearSearchResult(){this.searchResultLayer&&(this.map.closePopup(),!this.isSearchLayer&&this.map.removeLayer(this.searchResultLayer),this._selectMarkerFeature&&this.map.removeLayer(this._selectMarkerFeature),this._selectFeaturethis&&this.map.removeLayer(this._selectFeature),this._selectMarkerFeature=null,this._selectFeature=null,this.searchResultLayer=null,this.currentResult=null)},_featureOnclickEvent(e,t){t.on("click",()=>{let s,i,r=document.getElementsByClassName("component-pagination__link")[0];this._resultDomObj._changePageEvent({target:r.children[0].children[0]}),this._selectFeature&&this._selectFeature.addTo(this.map),t.remove();for(let r=0;r1)for(let e=1;e0&&document.getElementsByClassName("component-search__resultitme-selected")[0].classList.remove("component-search__resultitme-selected"),e.firstChild.classList.add("component-search__resultitme-selected"),this._setSelectedLayerStyle(t)}},this)},_setSelectedLayerStyle(e){let t;this._selectMarkerFeature&&this._selectMarkerFeature.remove(),this._selectMarkerFeature=null,this._selectFeature=e,this._selectMarkerFeature=za().geoJSON(e.toGeoJSON(),{pointToLayer:(e,t)=>za().marker(t,{icon:za().divIcon({className:"component-select-marker-icon",iconAnchor:[15,0]})}),style:{fillColor:"red",weight:1,opacity:1,color:"red",fillOpacity:.2}}).addTo(this.map),this._selectMarkerFeature.bindPopup(function(){return new Da({attributes:e.feature.properties}).getElement()},{closeOnClick:!1}).openPopup().addTo(this.map),this._flyToBounds(this.searchResultLayer.getBounds()),e.getLatLng?t=e.getLatLng():e.getCenter&&(t=e.getCenter()),this.map.setView(t)}}),Qp=za().Evented.extend({options:{_defaultLayerOptions:{style:null,onEachFeature:function(e,t){let s="属性信息如下:
";for(let t in e.properties)s+=t+": "+e.properties[t]+"
";t.bindPopup(s)}}},initialize(e,t=null){if(!e)return new Error("Cannot find map, fileModel.map cannot be null.");this.map=e,za().Util.extend(this.options._defaultLayerOptions,t),this.options._defaultLayerOptions.pointToLayer=this.options._defaultLayerOptions.style,this.popupsStatus=!0,this.dataFlowStatus=!1,this.dataFlowUrl="",this.currentFeatures=[],this.dataFlowLayer=null},subscribe(e){if(this.dataFlowUrl===e){if(this.dataFlowStatus)return void this.fire("dataflowservicesubscribed")}else this.dataFlowUrl=e;this.dataFlowStatus=!0,this.dataFlowLayer&&(this.dataFlowLayer.remove(),this.dataFlowLayer=null);const t=new Oc(e,this.options._defaultLayerOptions);t.on("subscribesucceeded",e=>{this.fire("subscribesucceeded",{result:e})}),t.on("subscribefailed",e=>{this.fire("subscribefailed",{result:e})}),t.on("dataupdated",e=>{this.fire("dataupdated",{result:e});let t=e.layer.getBounds(),s=Mu.toSuperMapBounds(this.map.getBounds()),i=Mu.toSuperMapBounds(t);s.intersectsBounds(i)||(i.left===i.right&&i.top===i.bottom?this.map.setView(t.getCenter()):this.map.flyToBounds(t)),this.popupsStatus&&this.openPopups()}),t.addTo(this.map),this.dataFlowLayer=t},cancelSubscribe(){this.dataFlowLayer&&(this.dataFlowStatus=!1,this.dataFlowLayer.dataService.unSubscribe(),this.dataFlowLayer.remove(),this.dataFlowLayer=null)},openPopups(){if(this.popupsStatus=!0,this.dataFlowLayer){const e=this.dataFlowLayer.getLayers();for(let t=0;t{n.value="",e.target.hidden=!0}),n.oninput=(()=>{a.hidden=!1}),r.appendChild(a),i.appendChild(r),s.appendChild(i);const o=document.createElement("div");o.setAttribute("class","component-dataflow__container");const l=document.createElement("div");l.setAttribute("class","component-checkbox-container");const h=document.createElement("div");h.setAttribute("class","component-checkbox-default component-checkbox-selected-img"),h.checked=!0,l.appendChild(h);const u=document.createElement("div");u.setAttribute("class","component-label component-label-selected"),u.innerHTML=Ma.i18n("text_displayFeaturesInfo"),l.appendChild(u),h.onclick=(e=>{e.target.checked=!e.target.checked,e.target.checked?(u.setAttribute("class","component-label component-label-selected"),e.target.setAttribute("class","component-checkbox-default component-checkbox-selected-img"),this.viewModel.openPopups()):(u.setAttribute("class","component-label"),e.target.setAttribute("class","component-checkbox-default component-checkbox-default-img"),this.viewModel.closePopups())}),o.appendChild(l),s.appendChild(o);const c=document.createElement("div");c.setAttribute("class","component-dataflow__container component-init-center");const p=document.createElement("button");p.setAttribute("class","component-button-default"),p.innerHTML=Ma.i18n("text_subscribe"),p.onclick=(()=>{const e=n.value;""!==e?this.viewModel.subscribe(e):this.messageBox.showView(Ma.i18n("msg_inputDataFlowUrlFirst"))}),c.appendChild(p);const d=document.createElement("button");return d.setAttribute("class","component-button-default"),d.innerHTML=Ma.i18n("text_cancelSubscribe"),d.onclick=(()=>{this.viewModel.cancelSubscribe()}),c.appendChild(d),s.appendChild(c),this.messageBox=new _a,this.viewModel.on("dataflowservicesubscribed",()=>{this.messageBox.showView(Ma.i18n("msg_dataflowservicesubscribed"))}),this.viewModel.on("subscribesucceeded",()=>{this.messageBox.showView(Ma.i18n("msg_subscribesucceeded"))}),this.viewModel.on("dataupdated",e=>{this.messageBox.closeView(),this._event.fire("dataupdated",e)}),this._preventMapEvent(t,this.map),t}}); /* Copyright© 2000 - 2022 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.*/ class Kp{constructor(e,t){this.layerName=e,this.layer=t}} /* Copyright© 2000 - 2022 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.*/ class Zp extends za().Evented{initialize(e){this.workerUrl=e,this.turfLayers=[]}getLayersData(e){let t={},s={},i={},r={};for(let t=0;t{if(0===s.data.features.length)n.fire("analysisfailed");else{n.fire("analysissucceeded",{data:s.data});let i=za().geoJSON(s.data,{style:{color:"#1060C2",weight:3},onEachFeature:function(e,t){e.properties&&t.bindPopup(new Da(e.properties).getElement()),t.on({mouseover:function(){t.setStyle({color:"#ffffff",weight:5})},mouseout:function(){t.setStyle({color:"#1060C2",weight:3})},click:function(){t.setStyle({color:"#ffffff",weight:5})}})}}).addTo(t);n.turfLayers.push(i),n.fire("layerloaded",{layer:i,name:e.resultLayersName}),n.worker.terminate()}})}else if("buffer"===e.analysisMethod){let i=this,r={analysisMethod:"buffer",radius:e.radius,unit:e.unit,isSave:e.isSaveStatus,isUnion:e.isUnion,geoJson:s};this.worker.postMessage(r),this.worker.onmessage=(s=>{let r=za().geoJSON(s.data,{style:{color:"#ffffff",fillColor:"#1060C2",fillOpacity:.5,weight:1.5},onEachFeature:function(e,t){e.properties&&t.bindPopup(new Da(e.properties).getElement()),t.on({mouseover:function(){t.setStyle({color:"#ffffff",fillColor:"rgb(46,40,79)",fillOpacity:.5,weight:5})},mouseout:function(){t.setStyle({color:"#ffffff",fillColor:"#1060C2",fillOpacity:.5,weight:1.5})},click:function(){t.setStyle({color:"#ffffff",fillColor:"rgb(46,40,79)",fillOpacity:.5,weight:2})}})}}).addTo(t);i.turfLayers.push(r),i.fire("layerloaded",{layer:r,name:e.resultLayersName}),i.worker.terminate()})}}clearLayers(){for(let e in this.turfLayers)this.turfLayers[e].clearLayers();this.fire("layersremoved",{layers:this.turfLayers})}cancelAnalysis(){this.worker.terminate()}}var $p=zp.extend({initialize:function(e,t){if(!e)throw new Error("workerUrl is required");this.workerUrl=e,zp.prototype.initialize.apply(this,[t])},onAdd:function(e){return this.map=e,zp.prototype.onAdd.apply(this,[e])},addLayer:function(e){this.layers=this.layers||[],this.layers.push(e);let t=this.viewModel.getLayersData(this.layers);this.fillDataToView(t)},fillDataToView:function(e){if(!e)return;this.fillData=e;let t={};switch(document.getElementById("dropDownTop").getAttribute("data-value")){case"isolines":case"buffer":t=e.point}if("{}"==JSON.stringify(t))return;let s=[];for(let e in t)s.push(e);let i=document.getElementById("layersSelect"),r=document.getElementById("layerSelectName");i.innerHTML="",r.title=s[0],r.innerHTML=s[0],this._createOptions(i,s),this.layerSelectObj.optionClickEvent(i,r,this.layersSelectOnchange);let n=t[r.title],a=n.fields,o=n.fieldsValue;this.currentData=n,this.currentFillData=t;let l=document.getElementById("fieldsSelect");l.innerHTML="";let h=document.getElementById("fieldsSelectName");h.innerHTML=a[0],h.title=a[0],this._createOptions(l,a),this.fieldsSelectObj.optionClickEvent(l,h,this.fieldsSelectOnchange);let u=h.title,c=document.getElementById("getValueTextArea");c.value=o[u].toString().replace(/,/g,",\r\n"),c.setAttribute("data-value",o[u]);let p=document.getElementById("resultLayersName");switch(document.getElementById("dropDownTop").getAttribute("data-value")){case"isolines":p.value=Ma.i18n("text_label_isolines")+r.title;break;case"buffer":p.value=Ma.i18n("text_label_buffer")+r.title}},_initView:function(){this.workerUrl&&(this.viewModel=new Zp(this.workerUrl));let e=new Pa({title:Ma.i18n("title_clientComputing")}).getElement();e.classList.add("component-analysis"),e.children[0].style.fontSize="12px";let t=[{title:Ma.i18n("text_isoline"),dataValue:"isolines",remark:Ma.i18n("text_extractDiscreteValue"),icon:{className:"component-analyst-isoline-img"}},{title:Ma.i18n("text_buffer"),dataValue:"buffer",remark:Ma.i18n("text_specifyTheDistance"),icon:{className:"component-analyst-buffer-img"}}],s=e.children[1];s.classList.add("component-content--scroll"),s.classList.add("component-content--analysis");let i=new Ia(t).getElement();s.appendChild(i);let r=i.children[0].children[0],n=i.children[0].children[2].children[0];r.children[0].id="dropDownTop";let a=za().DomUtil.create("div","component-analysis__container",s),o=za().DomUtil.create("div","component-analysis__container__analysisLayer",a),l=za().DomUtil.create("div","component-analysis__selecttool",o);l.id="layerSelectControl";let h={optionsArr:[""],labelName:Ma.i18n("text_label_analysisLayer")},u=new Na(h),c=u.getElement();this.layerSelectObj=u,l.appendChild(c);let p=c.children[1].children[0];p.id="layerSelectName",c.children[1].children[2].children[0].children[0].id="layersSelect";let d=za().DomUtil.create("div","component-analysis__container__analysistype",a),f=za().DomUtil.create("div","component-clientcomputation__isoline",d),m={optionsArr:[""],labelName:Ma.i18n("text_label_extractField"),optionsClickCb:this.fieldsSelectOnchange},y=za().DomUtil.create("div","component-analysis__selecttool",f),g=new Na(m),v=g.getElement();this.fieldsSelectObj=g;let S=v.children[1].children[0];S.id="fieldsSelectName";let b=v.children[1].children[2].children[0].children[0];b.id="fieldsSelect",y.appendChild(v);let x=za().DomUtil.create("div","component-analysis__container",f);za().DomUtil.create("span","component-textarea__name",x).innerHTML=Ma.i18n("text_label_extractedValue");let _=za().DomUtil.create("div","component-textarea",x);_.id="getValueText";let C=za().DomUtil.create("div","",_),w=za().DomUtil.create("div","component-scrollarea-content",C);w.setAttribute("tabindex","1");let M=za().DomUtil.create("textarea","component-textarea__content",w);M.id="getValueTextArea",M.setAttribute("rows","20");let A=za().DomUtil.create("div","",f);za().DomUtil.create("span","",A).innerHTML=Ma.i18n("text_label_distanceAttenuation");let T=za().DomUtil.create("input","",A);T.value="3";let E=za().DomUtil.create("div","",f);za().DomUtil.create("span","",E).innerHTML=Ma.i18n("text_label_gridSize");let L=za().DomUtil.create("input","",E);L.value="30";let O=za().DomUtil.create("div","component-clientcomputation__buffer hidden",d),P=za().DomUtil.create("div","component-clientcomputation__buffer--radius",O);za().DomUtil.create("span","",P).innerHTML=Ma.i18n("text_label_bufferRadius");let N=za().DomUtil.create("div","",P),I=za().DomUtil.create("input","buffer-radius-input",N);I.id="bufferRadiusInput",I.value="10",I.setAttribute("placeholder",Ma.i18n("text_label_defaultkilometers"));let F=za().DomUtil.create("div","component-clientcomputation__buffer--unit",N);F.id="bufferUnit";let D={optionsArr:[Ma.i18n("text_option_kilometer")],labelName:Ma.i18n("text_label_unit")},R=new Na(D).getElement(),k=R.children[1].children[0];k.id="bufferUnitSelectName",R.children[1].children[2].children[0].children[0].id="bufferUnitSelect",R.children[0].style.display="none",F.appendChild(R);let B=za().DomUtil.create("div","",P),G=za().DomUtil.create("div","component-clientcomputation__buffer--issaveattrs",B);G.id="saveAttrsContainer";let U=za().DomUtil.create("div","checkbox checkbox-fault",G);U.id="saveAttrsCheckbox";let j=za().DomUtil.create("div","lable",G);j.id="saveAttrsLabel",j.innerHTML=Ma.i18n("text_retainOriginal");let z=za().DomUtil.create("div","component-clientcomputation__buffer--isunion",B);z.id="isUnionContainer";let V=za().DomUtil.create("div","checkbox checkbox-fault",z);V.id="isUnionCheckbox";let J=za().DomUtil.create("div","lable",z);J.innerHTML=Ma.i18n("text_mergeBuffer"),J.id="isUnionLabel";let q=za().DomUtil.create("div","component-analysis__container__resultLayersName",a);za().DomUtil.create("span","",q).innerHTML=Ma.i18n("text_label_resultLayerName");let H=za().DomUtil.create("input","",q);H.id="resultLayersName";let W=za().DomUtil.create("div","component-analysis__container__analysisbtn",a),Y=za().DomUtil.create("div","component-analysis__analysisbtn",W),Q=za().DomUtil.create("button","component-analysis__analysisbtn--analysis",Y);Q.innerHTML=Ma.i18n("btn_analyze");let X=za().DomUtil.create("div","component-analysis__analysisbtn--analysing-container hidden",Y),K=za().DomUtil.create("div","component-analysis__analysisbtn--analysising",X),Z=za().DomUtil.create("div","component-analysis__svg-container",K);Z.id="analyse_background",Z.innerHTML='\n \n \n \n \n ',za().DomUtil.create("span","",K).innerHTML=Ma.i18n("btn_analyzing");let $=za().DomUtil.create("button","component-analysis__analysisbtn--cancel",X);$.innerHTML=Ma.i18n("btn_cancelAnalysis");let ee=za().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",Y);ee.innerHTML=Ma.i18n("btn_emptyTheAnalysisLayer");for(let e=0;e{r.innerHTML=n.children[e].outerHTML,r.children[0].id="dropDownTop";let t=document.getElementById("layersSelect"),i=document.getElementById("layerSelectName"),a=n.children[e].getAttribute("data-value"),o={};switch(a){case"buffer":f.classList.add("hidden"),O.classList.remove("hidden"),s.style.height="422px",H.value=Ma.i18n("text_label_buffer")+i.title,o=this.fillData.point;break;case"isolines":f.classList.remove("hidden"),O.classList.add("hidden"),s.style.height="712px",H.value=Ma.i18n("text_label_isolines")+i.title,o=this.fillData.point}if(this.currentFillData===o)return;if(t.innerHTML="","{}"==JSON.stringify(o))return H.value="",i.title="",void(i.innerHTML="");let l=[];for(let e in o)l.push(e);i.title=l[0],i.innerHTML=l[0],this._createOptions(t,l),this.layerSelectObj.optionClickEvent(t,i,this.layersSelectOnchange),"buffer"===a?H.value=Ma.i18n("text_label_buffer")+l[0]:"isolines"===a&&(H.value=Ma.i18n("text_label_isolines")+l[0]),this.currentData=o[i.title],this.currentFillData=o});this.fieldsSelectOnchange=function(e){if(this.currentData){let t=this.currentData,s=e.title;M.value=t.fieldsValue[s].toString().replace(/,/g,",\r\n"),M.setAttribute("data-value",t.fieldsValue[s])}}.bind(this),this.layersSelectOnchange=function(e){if(this.currentData){let t=e.title,s=this.currentFillData[t];this.currentData=s,b.innerHTML="",this._createOptions(b,s.fields);let i=document.getElementById("fieldsSelectName"),r=s.fields[0];i.title=r,i.innerHTML=r;let n=r;this.fieldsSelectObj.optionClickEvent(b,i,this.fieldsSelectOnchange),M.value=s.fieldsValue[n].toString().replace(/,/g,",\r\n"),M.setAttribute("data-value",s.fieldsValue[n]);let a=document.getElementById("dropDownTop").getAttribute("data-value");switch(a){case"buffer":H.value=Ma.i18n("text_label_buffer")+t;break;case"isolines":H.value=Ma.i18n("text_label_isolines")+t}}}.bind(this);let te=!0,se=!1;return j.classList.add("selected"),U.classList.add("checkbox-active"),G.onclick=(()=>{te?(U.classList.add("checkbox-fault"),U.classList.remove("checkbox-active"),j.classList.remove("selected"),te=!1):(U.classList.add("checkbox-active"),U.classList.remove("checkbox-fault"),j.classList.add("selected"),te=!0,se&&(V.classList.add("checkbox-fault"),V.classList.remove("checkbox-active"),se=!1))}),z.onclick=(()=>{se?(V.classList.add("checkbox-fault"),V.classList.remove("checkbox-active"),J.classList.remove("selected"),se=!1):(V.classList.add("checkbox-active"),V.classList.remove("checkbox-fault"),J.classList.add("selected"),se=!0,te&&(U.classList.add("checkbox-fault"),U.classList.remove("checkbox-active"),te=!1))}),this.messageBox=new _a,Q.onclick=(()=>{let e;switch(X.style.display="block",Q.style.display="none",document.getElementById("dropDownTop").getAttribute("data-value")){case"isolines":e=function(){let e=document.getElementById("dropDownTop").getAttribute("data-value"),t=document.getElementById("resultLayersName").value,s=p.title,i=S.title,r=M.value.replace(/[\r\n]/g,"").split(",").toString(),n=T.value,a=L.value;return{analysisMethod:e,analysisLayers:s,analysisFields:i,analysisFieldsValue:r,analysisBreaks:n,analysisCellSize:a,resultLayersName:t}}();break;case"buffer":e=function(){let e=document.getElementById("dropDownTop"),t=document.getElementById("resultLayersName").value,s=p.title,i=e.getAttribute("data-value"),r=I.value,n=k.title;return{analysisMethod:i,analysisLayers:s,radius:r,unit:n,resultLayersName:t,isSaveStatus:te,isUnion:se}}()}this.viewModel.analysis(e,this.map),this.viewModel.on("layerloaded",e=>{X.style.display="none",Q.style.display="block",this._event.fire("analysissucceeded",{layer:e.layer,name:e.name})}),this.viewModel.on("analysisfailed",()=>{X.style.display="none",Q.style.display="block",this.messageBox.showView(Ma.i18n("msg_resultIsEmpty"),"failure"),this._event.fire("analysisfailed")})}),$.onclick=(()=>{X.style.display="none",Q.style.display="block",this.viewModel.cancelAnalysis()}),ee.onclick=(()=>{this.viewModel.on("layersremoved",e=>{this._event.fire("layersremoved",{layers:e.layers})}),this.viewModel.clearLayers()}),this._preventMapEvent(e,this.map),e},_createOptions(e,t){for(let s in t){let i=document.createElement("div"),r=t[s];i.className="component-selecttool__option",i.title=r,i.innerHTML=r,i.setAttribute("data-value",r),e.appendChild(i)}}}); /* Copyright© 2000 - 2022 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.*/ class ed{constructor(e){this.layerName=e.layerName,this.layer=e.layer,this.fields=e.fields||null}} /* Copyright© 2000 - 2022 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.*/ class td extends za().Evented{initialize(e){this.processingUrl=e}getDatasetsName(){let e=this.processingUrl;this.dataset=[],this.dataset.datasetNames=[],this.dataset.childUrl=[];let t="http://"+e.split("/")[2],s=t+"/iserver/services/datacatalog/rest/datacatalog/sharefile.json",i=t+"/iserver/services/datacatalog/rest/datacatalog/relationship/datasets.json",r=this;Ue.get(s).then(function(e){return e.json()}).then(function(e){r.dataset.datasetNames=r.dataset.datasetNames.concat(e.datasetNames),r.dataset.childUrl=r.dataset.childUrl.concat(e.childUriList);let t=r;Ue.get(i).then(function(e){return e.json()}).then(function(e){t.dataset.datasetNames=t.dataset.datasetNames.concat(e.datasetNames),t.dataset.childUrl=t.dataset.childUrl.concat(e.childUriList);let s=[];for(let e in t.dataset.datasetNames)s[t.dataset.datasetNames[e]]=t.dataset.childUrl[e];t.fire("datasetsloaded",{result:{dataset:t.dataset,datasetHash:s}})})})}getDatasetInfo(e){let t,s=this;Ue.get(e).then(function(e){return e.json()}).then(function(e){let i=e.datasetInfo;"LINE"===i.datasetType||"LINE"===i.type?t="LINE":"POINT"===i.datasetType||"POINT"===i.type||"CSV"===i.type?t="POINT":"REGION"!==i.datasetType&&"REGION"!==i.type||(t="REGION");let r=[],n=i.fieldInfos||i.fieldInfo||null;if(n){for(let e in n)r.push(n[e].name);s.fire("datasetinfoloaded",{result:{type:t,fields:r}})}else{let i=e.childUriList[0].replace("//fields","/fields");Ue.get(i).then(function(e){return e.json()}).then(function(e){let i=e.fieldNames,r=[];for(let e in i)r.push(i[e]);s.fire("datasetinfoloaded",{result:{type:t,fields:r}})})}})}} /* Copyright© 2000 - 2022 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.*/ class sd extends za().Evented{initialize(e){this.processingUrl=e}getDatasetsName(){let e=this.processingUrl;this.resultLayers=[],this.datasetNames=[],this.distributedAnalysisModel=new td(e),this.distributedAnalysisModel.getDatasetsName();let t=this;this.distributedAnalysisModel.on("datasetsloaded",function(e){t.fire("datasetsloaded",{result:e.result})})}getDatasetInfo(e){this.distributedAnalysisModel.getDatasetInfo(e);let t=this;this.distributedAnalysisModel.on("datasetinfoloaded",function(e){let s=e.result.type,i=e.result.fields;t.fire("datasetinfoloaded",{result:{type:s,fields:i}})})}analysis(e,t){let s=new Fp(this.processingUrl);if(e.analysisParam instanceof Pi){let i=e.analysisParam,r=this;s.addKernelDensityJob(i,function(s){s.error?r.fire("analysisfailed",{error:s.error}):s.result.setting.serviceInfo.targetServiceInfos.map(function(s){return"RESTMAP"===s.serviceType&&Ue.get(s.serviceAddress+"/maps").then(function(e){return e.json()}).then(function(s){let i=s[0].path;r.fire("analysissucceed",{result:s});let n=ec(i,{noWrap:!0,transparent:!0});r.resultLayers.push(n),n.addTo(t);let a=new Date,o=e.resultLayerName||a.getTime();r.fire("layerloaded",{layer:n,name:o})}),s})})}}clearLayers(){for(let e in this.resultLayers)this.resultLayers[e].remove();this.fire("layersremoved",{layers:this.resultLayers}),this.resultLayers=[]}}var id=zp.extend({initialize:function(e,t){zp.prototype.initialize.apply(this,[t]),this.viewModel=new sd(e)},onAdd:function(e){return this._fillDataToView(),zp.prototype.onAdd.apply(this,[e])},_fillDataToView:function(){this.viewModel.on("datasetsloaded",e=>{let t=e.result.dataset.datasetNames;this.datasetSelect.innerHTML="",this._createOptions(this.datasetSelect,t),this.datasetSelectObj.optionClickEvent(this.datasetSelect,this.datasetSelectName,this.datasetSelectOnchange),this.dataHash=e.result.datasetHash}),this.viewModel.getDatasetsName()},_initView:function(){let e=new Pa({title:Ma.i18n("title_distributedAnalysis")}).getElement();e.classList.add("component-analysis"),e.children[0].style.fontSize="12px";let t=za().DomUtil.create("div","component-content component-content--scroll component-content--analysis",e),s=[{title:Ma.i18n("text_densityAnalysis"),dataValue:"density",remark:Ma.i18n("text_CalculateTheValuePerUnitArea"),icon:{className:"component-analyst-density-img"}}],i=new Ia(s).getElement();t.appendChild(i);let r=i.children[0].children[0].children[0],n=za().DomUtil.create("div","component-analysis__container",t),a=za().DomUtil.create("div","analysistype",n),o=za().DomUtil.create("div","component-analysis__container__analysisLayer",a),l=za().DomUtil.create("div","component-analysis__selecttool",o),h={optionsArr:[Ma.i18n("text_option_selectDataset")],labelName:Ma.i18n("text_label_dataset"),optionsClickCb:te.bind(this)},u=new Na(h),c=u.getElement();this.datasetSelectObj=u,l.appendChild(c);let p=c.children[1].children[0];this.datasetSelectName=p;let d=c.children[1].children[2].children[0].children[0];d.children[0].style.display="none",this.datasetSelect=d;let f=za().DomUtil.create("div","component-analysis__idw",o),m=[{optionsArr:[Ma.i18n("text_option_simplePointDensityAnalysis"),Ma.i18n("text_option_nuclearDensityAnalysis")],labelName:Ma.i18n("text_label_analyticalMethod")},{optionsArr:[Ma.i18n("text_option_quadrilateral"),Ma.i18n("text_option_hexagon")],labelName:Ma.i18n("text_label_meshType")}],y=za().DomUtil.create("div","component-analysis__idw__selecttool",f);for(let e in m){let t=new Na(m[e]).getElement();y.appendChild(t)}let g={optionsArr:[Ma.i18n("text_option_notSet")],labelName:Ma.i18n("text_label_weightField")},v=new Na(g),S=v.getElement();y.appendChild(S),this.weightFieldsSelectObj=v;let b=y.children[0].children[1].children[0];b.setAttribute("data-value","0");let x=y.children[0].children[1].children[2].children[0].children[0];this._setEleAtribute(["0","1"],"data-value",x.children);let _=y.children[1].children[1].children[0];_.setAttribute("data-value","0");let C=y.children[1].children[1].children[2].children[0].children[0];this._setEleAtribute(["0","1"],"data-value",C.children);let w=y.children[2].children[1].children[0],M=y.children[2].children[1].children[2].children[0].children[0],A=[{spanName:Ma.i18n("text_label_queryRange"),value:""}];for(let e in A)this._creatInputBox(A[e],y);let T=y.children[3].children[1];T.setAttribute("placeholder",Ma.i18n("text_label_queryRangeTips")),T.title=Ma.i18n("text_label_queryRangeTips");let E={labelName:Ma.i18n("text_label_gridSizeInMeters"),selectOptions:{optionsArr:["Meter","Kilometer","Yard","Foot","Mile"]}},L=this._creatUnitSelectBox(E,y),O=L.children[1].children[0];O.value="1000";let P=L.children[1].children[1].children[0].children[0].children[0],N={labelName:Ma.i18n("text_label_searchRadius"),selectOptions:{optionsArr:["Meter","Kilometer","Yard","Foot","Mile"]}},I=this._creatUnitSelectBox(N,y),F=I.children[1].children[0];F.value="300";let D=I.children[1].children[1].children[0].children[0].children[0],R={labelName:Ma.i18n("text_label_areaUnit"),optionsArr:["SquareMile","SquareMeter","Hectare","Acre","SquareFoot","SquareYard"]},k=new Na(R).getElement();y.appendChild(k);let B=k.children[1].children[0],G=za().DomUtil.create("div","range-content",a),U={optionsArr:[Ma.i18n("text_option_notSet"),Ma.i18n("text_option_equidistantSegmentation"),Ma.i18n("text_option_logarithm"),Ma.i18n("text_option_equalCountingSegment"),Ma.i18n("text_option_squareRootSegmentation")],labelName:Ma.i18n("text_label_thematicMapSegmentationMode"),optionsClickCb:function(e){"NOTSET"!==e.getAttribute("data-value")?(V.classList.remove("hidden"),J.classList.remove("hidden")):(V.classList.add("hidden"),J.classList.add("hidden"))}};G.appendChild(new Na(U).getElement());let j=G.children[0].children[1].children[0];j.setAttribute("data-value","NOTSET");let z=G.children[0].children[1].children[2].children[0].children[0];this._setEleAtribute(["NOTSET","EQUALINTERVAL","LOGARITHM","QUANTILE","SQUAREROOT"],"data-value",z.children);let V=this._creatInputBox({spanName:Ma.i18n("text_label_thematicMapSegmentationParameters"),value:"20"},G);V.classList.add("hidden");let J=new Na({optionsArr:[Ma.i18n("text_option_greenOrangePurpleGradient"),Ma.i18n("text_option_greenOrangeRedGradient"),Ma.i18n("text_option_rainbowGradient"),Ma.i18n("text_option_spectralGradient"),Ma.i18n("text_option_terrainGradient")],labelName:Ma.i18n("text_label_thematicMapColorGradientMode")}).getElement();G.appendChild(J),J.classList.add("hidden");let q=J.children[1].children[2].children[0].children[0],H=J.children[1].children[0];H.setAttribute("data-value","GREENORANGEVIOLET");this._setEleAtribute(["GREENORANGEVIOLET","GREENORANGERED","RAINBOW","SPECTRUM","TERRAIN"],"data-value",q.children);let W=za().DomUtil.create("div","",a);za().DomUtil.create("span","",W).innerHTML=Ma.i18n("text_label_resultLayerName");let Y=za().DomUtil.create("input","component-distributeanalysis__input",W),Q=za().DomUtil.create("div","component-analysis__container__analysisbtn",n),X=za().DomUtil.create("div","component-analysis__analysisbtn",Q),K=za().DomUtil.create("button","component-analysis__analysisbtn--analysis",X);K.innerHTML=Ma.i18n("btn_analyze");let Z=za().DomUtil.create("div","component-analysis__analysisbtn--analysing-container hidden",X),$=za().DomUtil.create("div","component-analysis__analysisbtn--analysising",Z);$.style.width="200px",za().DomUtil.create("div","component-analysis__svg-container",$).innerHTML='\n \n \n \n \n ',za().DomUtil.create("span","",$).innerHTML=Ma.i18n("btn_analyzing");let ee=za().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",X);function te(e){if(this.messageBox.closeView(),this.dataHash){M.innerHTML="";let t=this.dataHash[e.title],s=this;this.viewModel.on("datasetinfoloaded",function(e){w.title=Ma.i18n("text_option_notSet"),w.innerHTML=Ma.i18n("text_option_notSet"),M.innerHTML="";let t=r.getAttribute("data-value"),i=e.result.type,n=e.result.fields;"density"===t&&("REGION"===i||"LINE"===i?s.messageBox.showView(Ma.i18n("msg_datasetOrMethodUnsupport"),"failure"):(s.messageBox.closeView(),s._createOptions(M,n),s.weightFieldsSelectObj.optionClickEvent(M,w)))}),this.viewModel.getDatasetInfo(t)}}return ee.id="deleteLayersBtn",ee.innerHTML=Ma.i18n("btn_emptyTheAnalysisLayer"),this.messageBox=new _a,this.datasetSelectOnchange=te.bind(this),K.onclick=(()=>{this.messageBox.closeView();let e=function(){let e,t,s=r.getAttribute("data-value"),i=b.getAttribute("data-value"),n=_.getAttribute("data-value"),a=T.value,o=P.title,l=D.title,h=B.title,u=H.getAttribute("data-value"),c=j.getAttribute("data-value"),d=new Date,f=Y.value||d.getTime();e="NOTSET"===c?"":{rangeMode:c,rangeCount:V.value,colorGradientType:u};"density"===s&&(t=new Pi({datasetName:p.title,method:i,meshType:n,resolution:O.value,fields:w.title,radius:F.value,meshSizeUnit:o,radiusUnit:l,areaUnit:h,query:a,mappingParameters:new bt({rangeMode:e.rangeMode,rangeCount:e.rangeCount,colorGradientType:e.colorGradientType})}));return{analysisParam:t,resultLayerName:f}}();p.title===Ma.i18n("text_option_selectDataset")?this.messageBox.showView(Ma.i18n("msg_selectDataset"),"failure"):w.title===Ma.i18n("text_option_notSet")?this.messageBox.showView(Ma.i18n("msg_setTheWeightField"),"failure"):(this.messageBox.closeView(),Z.style.display="block",K.style.display="none",this.viewModel.on("layerloaded",e=>{Z.style.display="none",K.style.display="block",this._event.fire("analysissucceeded",{layer:e.layer,name:e.name})}),this.viewModel.on("analysisfailed",e=>{this.messageBox.showView(Ma.i18n("msg_theFieldNotSupportAnalysis"),"failure"),Z.style.display="none",K.style.display="block",this._event.fire("analysisfailed",{error:e.error})}),this.viewModel.analysis(e,this.map))}),ee.onclick=(()=>{this.viewModel.on("layersremoved",e=>{this._event.fire("layersremoved",{layers:e.layers})}),this.viewModel.clearLayers()}),this._preventMapEvent(e,this.map),e},_createOptions(e,t){for(let s in t){let i=document.createElement("div");i.className="component-selecttool__option",i.title=t[s],i.innerHTML=t[s],i.setAttribute("data-value",t[s]),e.appendChild(i)}},_creatInputBox(e,t){let s=za().DomUtil.create("div","",t);za().DomUtil.create("span","",s).innerHTML=e.spanName;let i=za().DomUtil.create("input","",s);return i.value=e.value,i.className="component-distributeanalysis__input",s},_creatUnitSelectBox(e,t){let s=za().DomUtil.create("div","component-clientcomputation__buffer--radius",t);za().DomUtil.create("span","",s).innerHTML=e.labelName;let i=za().DomUtil.create("div","",s);za().DomUtil.create("input","buffer-radius-input",i);let r=za().DomUtil.create("div","component-clientcomputation__buffer--unit",i),n=e.selectOptions,a=new Na(n).getElement();return r.appendChild(a),s},_setEleAtribute(e,t,s){for(let i=0;i1){let i={optionsArr:e,labelName:Ma.i18n("text_label_queryMode"),optionsClickCb:this.queryModeltOnchange},r=new Na(i).getElement();t.appendChild(r),s=r.children[1].children[0],r.children[1].classList.add("dataservice-select");let n=r.children[1];n.classList.add("dataservice-select"),n.classList.add("querymodel-select")}else{let t=za().DomUtil.create("span","",o);t.innerHTML=Ma.i18n("text_label_queryMode"),s=za().DomUtil.create("div","component-servicequery__querymode-selectname",o);let i=za().DomUtil.create("span","",s);e instanceof Array?i.innerHTML=e[0]:i.innerHTML=e,s.title=i.innerHTML,this.queryModeltOnchange(s)}return s.id="queryModelSelectName",s}.bind(this),this.queryModeltOnchange=H.bind(this),this.creatQueryModeSelect(s,l);let h=za().DomUtil.create("div","component-analysis__container component-textarea--dataservice__container",n),u=za().DomUtil.create("span","textarea-name",h);u.innerHTML=Ma.i18n("text_label_IDArrayOfFeatures");let c=za().DomUtil.create("div","component-textarea component-textarea--dataservice",h);c.id="getfeaturesIdArr";let p=za().DomUtil.create("div","scrollarea",c),d=za().DomUtil.create("div","component-scrollarea-content",p);d.setAttribute("tabindex","1");let f=za().DomUtil.create("textarea","component-textarea__content",d);f.value="[1,2,3]",f.id="getValueTextArea";let m=za().DomUtil.create("div","component-servicequery__maxfeatures-container hidden",n),y={spanName:Ma.i18n("text_label_maxFeatures"),value:"1000"},g=this._creatInputBox(y,m).children[1];g.classList.add("max-features-input");let v=za().DomUtil.create("div","component-servicequery__distance-container hidden",n),S={spanName:Ma.i18n("text_label_bufferDistance"),value:"10"},b=this._creatInputBox(S,v).children[1],x=za().DomUtil.create("div","component-analysis__container component-textarea--dataservice__container hidden",n),_=za().DomUtil.create("span","textarea-name",x),C=za().DomUtil.create("div","",x),w=za().DomUtil.create("div","component-servicequery__rangeicon-container",C);_.innerHTML=Ma.i18n("text_label_queryRange1");let M=za().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-polygon-layer bounds",w),A=za().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-line-layer hidden",w),T=za().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-point-layer hidden",w),E=za().DomUtil.create("div","component-textarea component-textarea--rangequery",C);E.id="getfeaturesIdArr";let L=za().DomUtil.create("div","",E),O=za().DomUtil.create("div","component-scrollarea-content",L);O.setAttribute("tabindex","1");let P=za().DomUtil.create("textarea","component-textarea__content component-textarea--rangequery__content",O);P.value='{"leftBottom":{"x":-5,"y":-5},"rightTop":{"x":5,"y":5}}';let N=za().DomUtil.create("div","component-servicequery__spatialquerymode-container hidden",n),I={optionsArr:["CONTAIN","CROSS","DISJOINT","IDENTITY","INTERSECT","NONE","OVERLAP","TOUCH","WITHIN"],labelName:Ma.i18n("text_label_spatialQueryMode")},F=za().DomUtil.create("div","component-analysis__selecttool",N),D=new Na(I).getElement();D.children[1].classList.add("dataservice-select"),F.appendChild(D);let R=D.children[1].children[0];R.id="spatialQueryModeSelectName",D.children[1].children[2].classList.add("component-servicequery__spatialquerymode__selectcontent");let k=za().DomUtil.create("div","component-analysis__container__analysisbtn",n),B=za().DomUtil.create("div","component-analysis__analysisbtn",k),G=za().DomUtil.create("button","component-analysis__analysisbtn--analysis",B);G.innerHTML=Ma.i18n("btn_query");let U=za().DomUtil.create("div","component-analysis__analysisbtn--analysing-container hidden",B),j=za().DomUtil.create("div","component-analysis__analysisbtn--analysising component-servicequery__querybtn--querying",U);za().DomUtil.create("div","component-analysis__svg-container",j).innerHTML='\n \n \n \n \n ',za().DomUtil.create("span","",j).innerHTML=Ma.i18n("btn_querying");let z=za().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",B);z.innerHTML=Ma.i18n("btn_emptyTheRresultLayer"),H(s[0]);let V,J,q=this;function H(e){let t;switch(t=e.title?e.title:e,m.classList.add("hidden"),x.classList.add("hidden"),v.classList.add("hidden"),A.classList.add("hidden"),T.classList.add("hidden"),M.classList.remove("bounds"),N.classList.add("hidden"),u.innerHTML=Ma.i18n("text_label_featureFilter"),f.value="SMID<10","BUFFER"!==t&&"SPATIAL"!==t||(x.classList.remove("hidden"),_.innerHTML=Ma.i18n("text_label_geometricObject"),P.value='{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[84.90234375,40.25390625]}}',A.classList.remove("hidden"),T.classList.remove("hidden")),t){case"ID":u.innerHTML=Ma.i18n("text_label_IDArrayOfFeatures"),f.value="[1,2,3]";break;case"SQL":m.classList.remove("hidden");break;case"BOUNDS":x.classList.remove("hidden"),_.innerHTML=Ma.i18n("text_label_queryRange"),P.value='{"leftBottom":{"x":-5,"y":-5},"rightTop":{"x":5,"y":5}}',M.classList.add("bounds");break;case"BUFFER":v.classList.remove("hidden");break;case"SPATIAL":N.classList.remove("hidden")}}return G.onclick=(()=>{this.messageBox.closeView(),U.style.display="block",G.style.display="none";let e=function(){let e,t=q.dataSetNames,s=document.getElementById("queryModelSelectName").title,i=f.value;if("ID"===s){let s=f.value,i=s.substring(1,s.length-1).split(",");e=new zs({IDs:i,datasetNames:t})}else if("SQL"===s){let s=g.value;e=new Js({queryParameter:{attributeFilter:i},datasetNames:t,maxFeatures:s})}else if("BOUNDS"===s){if(!V){let e=JSON.parse(P.value);V=za().bounds([e.leftBottom.x,e.leftBottom.y],[e.rightTop.x,e.rightTop.y])}e=new Ds({attributeFilter:i,datasetNames:t,bounds:V})}else if("BUFFER"===s){let s=b.value,r=JSON.parse(P.value),n=J||r;e=new Bs({attributeFilter:i,datasetNames:t,bufferDistance:s,geometry:n})}else if("SPATIAL"===s){let s=R.title,r=JSON.parse(P.value),n=J||r;e=new Us({attributeFilter:i,datasetNames:t,spatialQueryMode:s,geometry:n})}return e}();this.viewModel.on("getfeaturessucceeded",e=>{U.style.display="none",G.style.display="block",0===e.result.features.length&&this.messageBox.showView(Ma.i18n("msg_dataReturnedIsEmpty"),"success"),this._event.fire("getfeaturessucceeded",{result:e.result})}),this.viewModel.on("getfeaturesfailed",e=>{U.style.display="none",G.style.display="block",this.messageBox.showView(e.error.errorMsg,"failure"),this._event.fire("getfeaturesfailed",{error:e.error})}),this.viewModel.getFeatures(e,this.map)}),M.onclick=(e=>{let t=document.getElementById("queryModelSelectName").title;J&&J.remove(),"BOUNDS"===t?this.map.pm.enableDraw("Rectangle"):this.map.pm.enableDraw("Poly"),e.stopPropagation(),e.preventDefault()}),A.onclick=(e=>{J&&J.remove(),this.map.pm.enableDraw("Line"),e.stopPropagation(),e.preventDefault()}),T.onclick=(e=>{J&&J.remove(),this.map.pm.enableDraw("Marker"),e.stopPropagation(),e.preventDefault()}),this.map.on("pm:create",e=>{if("Rectangle"===e.shape){let t=(J=e.layer).getBounds();V=za().bounds([t._southWest.lng,t._southWest.lat],[t._northEast.lng,t._northEast.lat]);let s={leftBottom:{x:t._southWest.lng,y:t._southWest.lat},rightTop:{x:t._northEast.lng,y:t._northEast.lat}};P.value=JSON.stringify(s)}"Marker"===e.shape&&(J=e.layer,P.value=JSON.stringify(e.layer.toGeoJSON()),this.map.pm.disableDraw("Marker")),"Line"===e.shape&&(J=e.layer,P.value=JSON.stringify(e.layer.toGeoJSON())),"Polygon"===e.shape&&(J=e.layer,P.value=JSON.stringify(e.layer.toGeoJSON()))}),z.onclick=(()=>{this.viewModel.clearLayers()}),this._preventMapEvent(e,this.map),e},_creatInputBox(e,t){let s=za().DomUtil.create("div","",t);return za().DomUtil.create("span","",s).innerHTML=e.spanName,za().DomUtil.create("input","",s).value=e.value,s}}); /* 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.*/ za().supermap={...e,Components:{...e.Components},...za().supermap},za().supermap.components=za().supermap.components||{},za().supermap.Components=za().supermap.Components||{},za().supermap.control=za().supermap.control||{},za().supermap.Util={},za().Util.toGeoJSON=ku,za().supermap.Util.toGeoJSON=ku,za().Util.toSuperMapGeometry=Bu,za().supermap.Util.toSuperMapGeometry=Bu,za().Util.resolutionToScale=Uu,za().supermap.Util.resolutionToScale=Uu,za().Util.scaleToResolution=ju,za().supermap.Util.scaleToResolution=ju,za().Util.getMeterPerMapUnit=Gu,za().supermap.Util.getMeterPerMapUnit=Gu,za().Util.GetResolutionFromScaleDpi=Vu,za().supermap.Util.getResolutionFromScaleDpi=Vu,za().supermap.Util.GetResolutionFromScaleDpi=Vu,za().Util.NormalizeScale=zu,za().supermap.Util.normalizeScale=zu,za().supermap.Util.NormalizeScale=zu,za().Util.transform=Ju,za().supermap.Util.transform=Ju,za().Proj=za().Proj||{},za().supermap.Proj=za().supermap.Proj||{},za().Proj.CRS=vu,za().supermap.Proj.crs=vu,za().supermap.Proj.CRS=gu,za().Projection={},za().supermap.Projection=za().supermap.Projection||{},za().Projection.NonProjection=Fu,za().supermap.Projection.nonProjection=Fu,za().supermap.Projection.NonProjection=Iu,za().supermap.CRS=za().supermap.CRS||{},za().CRS.NonEarthCRS=Ru,za().supermap.CRS.NonEarthCRS=Du,za().supermap.CRS.nonEarthCRS=Ru,za().CRS.BaiduCRS=Au,za().supermap.CRS.BaiduCRS=Au,za().CRS.TianDiTu_WGS84CRS=Eu,za().supermap.CRS.TianDiTu_WGS84CRS=Eu,za().CRS.TianDiTu_MercatorCRS=Nu,za().supermap.CRS.TianDiTu_MercatorCRS=Nu,za().CRS.TianDiTu_Mercator=Nu,za().supermap.CRS.TianDiTu_Mercator=Nu,za().CRS.TianDiTu_WGS84=Eu,za().supermap.CRS.TianDiTu_WGS84=Eu,za().CRS.Baidu=Au,za().supermap.CRS.Baidu=Au,za().supermap.CommontypesConversion=Mu,za().supermap.components.clientComputationLayer=function(e){return new ed(e)},za().supermap.Components.ClientComputationLayer=ed,za().supermap.components.clientComputation=function(e){return new $p(e)},za().supermap.Components.ClientComputation=$p,za().supermap.components.clientComputationViewModel=function(e){return new Zp(e)},za().supermap.Components.ClientComputationViewModel=Zp,za().supermap.components.geoJSONLayerWithName=function(e,t){return new Kp(e,t)},za().supermap.Components.GeoJSONLayerWithName=Kp,za().supermap.components.GeoJsonLayersDataModel=qp,za().supermap.Components.GeoJsonLayersDataModel=qp,za().supermap.components.dataFlow=function(e){return new Xp(e)},za().supermap.Components.DataFlow=Xp,za().supermap.components.dataFlowViewModel=function(e){return new Qp(e)},za().supermap.Components.DataFlowViewModel=Qp,za().supermap.components.dataServiceQuery=function(e,t,s){return new ad(e,t,s)},za().supermap.Components.DataServiceQuery=ad,za().supermap.components.dataServiceQueryViewModel=nd,za().supermap.Components.DataServiceQueryViewModel=rd,za().supermap.components.DistributedAnalysisModel=td,za().supermap.Components.DistributedAnalysisModel=td,za().supermap.components.distributedAnalysis=function(e){return new id(e)},za().supermap.Components.DistributedAnalysis=id,za().supermap.components.distributedAnalysisViewModel=function(e){return new sd(e)},za().supermap.Components.DistributedAnalysisViewModel=sd,za().supermap.components.openFile=function(e){return new Jp(e)},za().supermap.Components.OpenFile=Jp,za().supermap.components.openFileViewModel=function(e){return new Vp(e)},za().supermap.Components.OpenFileViewModel=Vp,za().supermap.components.search=function(e){return new Yp(e)},za().supermap.Components.Search=Yp,za().supermap.components.searchViewModel=function(e){return new Wp(e)},za().supermap.Components.SearchViewModel=Wp,za().supermap.components.componentsViewBase=function(e){return new zp(e)},za().supermap.Components.ComponentsViewBase=zp,za().supermap.control.changeTileVersion=function(e){return new _u(e)},za().supermap.control.ChangeTileVersion=_u,za().supermap.control.logo=function(e){return new Cu(e)},za().supermap.control.Logo=Cu,za().supermap.baiduTileLayer=Hu,za().supermap.BaiduTileLayer=qu,za().supermap.cloudTileLayer=Yu,za().supermap.CloudTileLayer=Wu,za().supermap.imageMapLayer=function(e,t){return new Qu(e,t)},za().supermap.ImageMapLayer=Qu,za().supermap.imageTileLayer=function(e,t){return new Sc(e,t)},za().supermap.ImageTileLayer=Sc,za().supermap.tiandituTileLayer=function(e){return new Zu(e)},za().supermap.TiandituTileLayer=Zu,za().supermap.tiledMapLayer=ec,za().supermap.TiledMapLayer=$u,za().supermap.wmtsLayer=Ku,za().supermap.WMTSLayer=Xu,za().supermap.webmap=function(e,t){return new vc(e,t)},za().supermap.WebMap=vc,za().supermap.initMap= /* Copyright© 2000 - 2022 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(e,t){const s=(t=t||{}).mapOptions||{},i=t.layerOptions||{};return new Promise((t,r)=>{new xu(e).getMapInfo(async n=>{if("processCompleted"===n.type){const{prjCoordSys:r}=n.result,a=Cc(r);xc(r)||await async function(e,t){if(!_c(t,!1)){const s=await async function(e){return new Promise((t,s)=>{new xu(e,{withoutFormatSuffix:!0}).getWkt(e=>{if("processCompleted"!==e.type)s();else{const s=e.result.data;t(s)}})})}(e);s&&yu.defs(t,s)}}(e,a);const o=function(e,t){const{bounds:s,center:i,scale:r,visibleScales:n,prjCoordSys:a,dpi:o,coordUnit:l}=e,{maxZoom:h=22}=t,u=Tn(n,s,o,l,h),c=bc({prjCoordSys:a,bounds:s,dpi:o,visibleScales:n,coordUnit:l},{maxZoom:h}),p=c.resolutions||u;return{crs:c,center:function(e,{center:t,bounds:s}){const i="string"==typeof e?e:e.code;return"number"!=typeof t.x&&"number"!=typeof t.y&&(t={lat:(s.bottom+s.top)/2,lng:(s.left+s.right)/2}),"EPSG:4326"===i?{lat:t.y,lng:t.x}:e.unproject(za().point(t.x,t.y))}(c,{center:i,bounds:s}),zoom:function({scale:e,dpi:t,coordUnit:s},i){return function(e,t){let s,i=0;for(let r=0;rMath.abs(e-t[r])&&(s=Math.abs(e-t[r]),i=r);return i}(ju(e,t,s),i)}({scale:r,dpi:o,coordUnit:l},p),maxZoom:(d=u,d.length>0?d.length-1:22)};var d}(n.result,s),l=za().map("map",{...o,...s}),h=new $u(e,{...{noWrap:!0},...i});return h.addTo(l),void t({map:l,layer:h})}r()})})},za().supermap.crsFromMapJSON=bc,za().supermap.CartoCSSToLeaflet=oc,za().supermap.DefaultStyle=ic,za().supermap.CartoStyleMap=rc,za().supermap.ServerStyleMap=nc,za().supermap.CompOpMap=ac,za().supermap.circleStyle=function(e){return new kc(e)},za().supermap.CircleStyle=kc,za().supermap.cloverStyle=function(e){return new Rc(e)},za().supermap.CloverStyle=Rc,za().supermap.graphic=function(e){return new lc(e)},za().supermap.Graphic=lc,za().supermap.imageStyle=function(e){return new Bc(e)},za().supermap.ImageStyle=Bc,za().supermap.themeFeature=function(e,t){return new hc(e,t)},za().supermap.ThemeFeature=hc,za().supermap.dataFlowLayer=function(e,t){return new Oc(e,t)},za().supermap.DataFlowLayer=Oc,za().supermap.echartsLayer=function(e,t){return new Pc(e,t)},za().supermap.EchartsLayer=Pc,za().supermap.graphicLayer=function(e,t){return new Yc(e,t)},za().supermap.GraphicLayer=Yc,za().supermap.graphThemeLayer=function(e,t,s){return new Qc(e,t,s)},za().supermap.GraphThemeLayer=Qc,za().supermap.heatMapFeature=function(e,t){return new xp(e,t)},za().supermap.HeatMapFeature=xp,za().supermap.heatMapLayer=function(e,t){return new _p(e,t)},za().supermap.HeatMapLayer=_p,za().supermap.labelThemeLayer=function(e,t){return new fc(e,t)},za().supermap.LabelThemeLayer=fc,za().supermap.mapVLayer=function(e,t,s){return new Tc(e,t,s)},za().supermap.MapVLayer=Tc,za().supermap.rangeThemeLayer=function(e,t){return new dc(e,t)},za().supermap.RangeThemeLayer=dc,za().supermap.rankSymbolThemeLayer=function(e,t,s){return new Xc(e,t,s)},za().supermap.RankSymbolThemeLayer=Xc,za().supermap.tiledVectorLayer=function(e,t){return new vp(e,t)},za().supermap.TileVectorLayer=vp,za().supermap.TiledVectorLayer=vp,za().supermap.turfLayer=function(e){return new bp(e)},za().supermap.TurfLayer=bp,za().supermap.unicodeMarker=function(e,t){return new gc(e,t)},za().supermap.UnicodeMarker=gc,za().supermap.uniqueThemeLayer=function(e,t){return new pc(e,t)},za().supermap.UniqueThemeLayer=pc,za().supermap.VectorTileFormat=mp,za().supermap.addressMatchService=function(e,t){return new Cp(e,t)},za().supermap.AddressMatchService=Cp,za().supermap.chartService=function(e,t){return new wp(e,t)},za().supermap.ChartService=wp,za().supermap.dataFlowService=function(e,t){return new wc(e,t)},za().supermap.DataFlowService=wc,za().supermap.datasetService=function(e,t){return new Mp(e,t)},za().supermap.DatasetService=Mp,za().supermap.datasourceService=function(e,t){return new Ap(e,t)},za().supermap.DatasourceService=Ap,za().supermap.featureService=yc,za().supermap.FeatureService=mc,za().supermap.fieldService=function(e,t){return new Tp(e,t)},za().supermap.FieldService=Tp,za().supermap.geoprocessingService=function(e,t){return new Lp(e,t)},za().supermap.GeoprocessingService=Lp,za().supermap.gridCellInfosService=function(e,t){return new Ep(e,t)},za().supermap.GridCellInfosService=Ep,za().supermap.imageCollectionService=function(e,t){return new jp(e,t)},za().supermap.ImageCollectionService=jp,za().supermap.imageService=function(e,t){return new Up(e,t)},za().supermap.ImageService=Up,za().supermap.layerInfoService=function(e,t){return new Op(e,t)},za().supermap.LayerInfoService=Op,za().supermap.mapService=function(e,t){return new xu(e,t)},za().supermap.MapService=xu,za().supermap.measureService=function(e,t){return new Pp(e,t)},za().supermap.MeasureService=Pp,za().supermap.networkAnalyst3DService=function(e,t){return new Np(e,t)},za().supermap.NetworkAnalyst3DService=Np,za().supermap.networkAnalystService=function(e,t){return new Ip(e,t)},za().supermap.NetworkAnalystService=Ip,za().supermap.processingService=function(e,t){return new Fp(e,t)},za().supermap.ProcessingService=Fp,za().supermap.queryService=function(e,t){return new Dp(e,t)},za().supermap.QueryService=Dp,za().supermap.ServiceBase=bu,za().supermap.spatialAnalystService=function(e,t){return new Rp(e,t)},za().supermap.SpatialAnalystService=Rp,za().supermap.themeService=function(e,t){return new kp(e,t)},za().supermap.ThemeService=kp,za().supermap.trafficTransferAnalystService=function(e,t){return new Bp(e,t)},za().supermap.TrafficTransferAnalystService=Bp,za().supermap.webPrintingJobService=function(e,t){return new Gp(e,t)},za().supermap.WebPrintingJobService=Gp,za().supermap.CommonUtil=ee})(),(()=>{"use strict"; /* Copyright© 2000 - 2022 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.*/})()})();