rk-web-core 0.9.91 → 0.9.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rk-web-core",
|
|
3
3
|
"description": "iep core utils",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.92",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "rk-web-core.js",
|
|
7
7
|
"scripts": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"vue-router": "^3.5.3",
|
|
19
19
|
"@micro-zoe/micro-app": "^0.8.3",
|
|
20
20
|
"axios": "^0.21.1",
|
|
21
|
-
"rk-web-map": "^0.3.
|
|
21
|
+
"rk-web-map": "^0.3.53"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@babel/runtime": "^7.15.4",
|
package/rk-web-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("rk-web-core",[],e):"object"==typeof exports?exports["rk-web-core"]=e():t["rk-web-core"]=e()}(window,(function(){return function(t){function e(e){for(var n,r,i=e[0],o=e[1],a=0,s=[];a<i.length;a++)r=i[a],Object.prototype.hasOwnProperty.call(P,r)&&P[r]&&s.push(P[r][0]),P[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);for(D&&D(e);s.length;)s.shift()()}var n=window.webpackHotUpdaterk_web_core;window.webpackHotUpdaterk_web_core=function(t,e){!function(t,e){if(!w[t]||!b[t])return;for(var n in b[t]=!1,e)Object.prototype.hasOwnProperty.call(e,n)&&(m[n]=e[n]);0==--y&&0===_&&C()}(t,e),n&&n(t,e)};var r,i=!0,o="ffad41d189337c897c21",a={},s=[],c=[];function u(t){var e=L[t];if(!e)return R;var n=function(n){return e.hot.active?(L[n]?-1===L[n].parents.indexOf(t)&&L[n].parents.push(t):(s=[t],r=n),-1===e.children.indexOf(n)&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),s=[]),R(n)},i=function(t){return{configurable:!0,enumerable:!0,get:function(){return R[t]},set:function(e){R[t]=e}}};for(var o in R)Object.prototype.hasOwnProperty.call(R,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(n,o,i(o));return n.e=function(t){return"ready"===f&&d("prepare"),_++,R.e(t).then(e,(function(t){throw e(),t}));function e(){_--,"prepare"===f&&(x[t]||A(t),0===_&&0===y&&C())}},n.t=function(t,e){return 1&e&&(t=n(t)),R.t(t,-2&e)},n}function l(e){var n={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:r!==e,active:!0,accept:function(t,e){if(void 0===t)n._selfAccepted=!0;else if("function"==typeof t)n._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)n._acceptedDependencies[t[r]]=e||function(){};else n._acceptedDependencies[t]=e||function(){}},decline:function(t){if(void 0===t)n._selfDeclined=!0;else if("object"==typeof t)for(var e=0;e<t.length;e++)n._declinedDependencies[t[e]]=!0;else n._declinedDependencies[t]=!0},dispose:function(t){n._disposeHandlers.push(t)},addDisposeHandler:function(t){n._disposeHandlers.push(t)},removeDisposeHandler:function(t){var e=n._disposeHandlers.indexOf(t);e>=0&&n._disposeHandlers.splice(e,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[e]=t[e],d("ready");break;case"ready":I(e);break;case"prepare":case"check":case"dispose":case"apply":(v=v||[]).push(e)}},check:S,apply:E,status:function(t){if(!t)return f;h.push(t)},addStatusHandler:function(t){h.push(t)},removeStatusHandler:function(t){var e=h.indexOf(t);e>=0&&h.splice(e,1)},data:a[e]};return r=void 0,n}var h=[],f="idle";function d(t){f=t;for(var e=0;e<h.length;e++)h[e].call(null,t)}var p,m,g,v,y=0,_=0,x={},b={},w={};function M(t){return+t+""===t?+t:t}function S(t){if("idle"!==f)throw new Error("check() is only allowed in idle status");return i=t,d("check"),(e=1e4,e=e||1e4,new Promise((function(t,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=R.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=e,r.send(null)}catch(t){return n(t)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)t();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var e=JSON.parse(r.responseText)}catch(t){return void n(t)}t(e)}}}))).then((function(t){if(!t)return d(T()?"ready":"idle"),null;b={},x={},w=t.c,g=t.h,d("prepare");var e=new Promise((function(t,e){p={resolve:t,reject:e}}));for(var n in m={},P)A(n);return"prepare"===f&&0===_&&0===y&&C(),e}));var e}function A(t){w[t]?(b[t]=!0,y++,function(t){var e=document.createElement("script");e.charset="utf-8",e.src=R.p+""+t+"."+o+".hot-update.js",e.crossOrigin="anonymous",document.head.appendChild(e)}(t)):x[t]=!0}function C(){d("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return E(i)})).then((function(e){t.resolve(e)}),(function(e){t.reject(e)}));else{var e=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&e.push(M(n));t.resolve(e)}}function E(e){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function e(n){var i,c,u,l,h;function f(t){for(var e=[t],n={},r=e.map((function(t){return{chain:[t],id:t}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((l=L[o])&&(!l.hot._selfAccepted||l.hot._selfInvalidated)){if(l.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(l.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<l.parents.length;s++){var c=l.parents[s],u=L[c];if(u){if(u.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([c]),moduleId:o,parentId:c};-1===e.indexOf(c)&&(u.hot._acceptedDependencies[o]?(n[c]||(n[c]=[]),p(n[c],[o])):(delete n[c],e.push(c),r.push({chain:a.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];-1===t.indexOf(r)&&t.push(r)}}T();var y={},_=[],x={},b=function(){console.warn("[HMR] unexpected require("+A.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var A;h=M(S),A=m[S]?f(h):{type:"disposed",moduleId:S};var C=!1,E=!1,I=!1,O="";switch(A.chain&&(O="\nUpdate propagation: "+A.chain.join(" -> ")),A.type){case"self-declined":n.onDeclined&&n.onDeclined(A),n.ignoreDeclined||(C=new Error("Aborted because of self decline: "+A.moduleId+O));break;case"declined":n.onDeclined&&n.onDeclined(A),n.ignoreDeclined||(C=new Error("Aborted because of declined dependency: "+A.moduleId+" in "+A.parentId+O));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(A),n.ignoreUnaccepted||(C=new Error("Aborted because "+h+" is not accepted"+O));break;case"accepted":n.onAccepted&&n.onAccepted(A),E=!0;break;case"disposed":n.onDisposed&&n.onDisposed(A),I=!0;break;default:throw new Error("Unexception type "+A.type)}if(C)return d("abort"),Promise.reject(C);if(E)for(h in x[h]=m[h],p(_,A.outdatedModules),A.outdatedDependencies)Object.prototype.hasOwnProperty.call(A.outdatedDependencies,h)&&(y[h]||(y[h]=[]),p(y[h],A.outdatedDependencies[h]));I&&(p(_,[A.moduleId]),x[h]=b)}var k,B=[];for(c=0;c<_.length;c++)h=_[c],L[h]&&L[h].hot._selfAccepted&&x[h]!==b&&!L[h].hot._selfInvalidated&&B.push({module:h,parents:L[h].parents.slice(),errorHandler:L[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(t){!1===w[t]&&function(t){delete P[t]}(t)}));var D,F,U=_.slice();for(;U.length>0;)if(h=U.pop(),l=L[h]){var j={},N=l.hot._disposeHandlers;for(u=0;u<N.length;u++)(i=N[u])(j);for(a[h]=j,l.hot.active=!1,delete L[h],delete y[h],u=0;u<l.children.length;u++){var z=L[l.children[u]];z&&((k=z.parents.indexOf(h))>=0&&z.parents.splice(k,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h]))for(F=y[h],u=0;u<F.length;u++)D=F[u],(k=l.children.indexOf(D))>=0&&l.children.splice(k,1);d("apply"),void 0!==g&&(o=g,g=void 0);for(h in m=void 0,x)Object.prototype.hasOwnProperty.call(x,h)&&(t[h]=x[h]);var G=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h])){F=y[h];var H=[];for(c=0;c<F.length;c++)if(D=F[c],i=l.hot._acceptedDependencies[D]){if(-1!==H.indexOf(i))continue;H.push(i)}for(c=0;c<H.length;c++){i=H[c];try{i(F)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:h,dependencyId:F[c],error:t}),n.ignoreErrored||G||(G=t)}}}for(c=0;c<B.length;c++){var W=B[c];h=W.module,s=W.parents,r=h;try{R(h)}catch(t){if("function"==typeof W.errorHandler)try{W.errorHandler(t)}catch(e){n.onErrored&&n.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:e,originalError:t}),n.ignoreErrored||G||(G=e),G||(G=t)}else n.onErrored&&n.onErrored({type:"self-accept-errored",moduleId:h,error:t}),n.ignoreErrored||G||(G=t)}}if(G)return d("fail"),Promise.reject(G);if(v)return e(n).then((function(t){return _.forEach((function(e){t.indexOf(e)<0&&t.push(e)})),t}));return d("idle"),new Promise((function(t){t(_)}))}(e=e||{})}function T(){if(v)return m||(m={}),v.forEach(I),v=void 0,!0}function I(e){Object.prototype.hasOwnProperty.call(m,e)||(m[e]=t[e])}var L={},P={0:0};function R(e){if(L[e])return L[e].exports;var n=L[e]={i:e,l:!1,exports:{},hot:l(e),parents:(c=s,s=[],c),children:[]};return t[e].call(n.exports,n,n.exports,u(e)),n.l=!0,n.exports}R.e=function(t){var e=[],n=P[t];if(0!==n)if(n)e.push(n[2]);else{var r=new Promise((function(e,r){n=P[t]=[e,r]}));e.push(n[2]=r);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,R.nc&&a.setAttribute("nonce",R.nc),a.src=function(t){return R.p+""+t+"."+o+".js"}(t),0!==a.src.indexOf(window.location.origin+"/")&&(a.crossOrigin="anonymous");var s=new Error;i=function(e){a.onerror=a.onload=null,clearTimeout(c);var n=P[t];if(0!==n){if(n){var r=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}P[t]=void 0}};var c=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(e)},R.m=t,R.c=L,R.d=function(t,e,n){R.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},R.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},R.t=function(t,e){if(1&e&&(t=R(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(R.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)R.d(n,r,function(e){return t[e]}.bind(null,r));return n},R.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return R.d(e,"a",e),e},R.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},R.p="./",R.oe=function(t){throw console.error(t),t},R.h=function(){return o};var O=window.webpackJsonprk_web_core=window.webpackJsonprk_web_core||[],k=O.push.bind(O);O.push=e,O=O.slice();for(var B=0;B<O.length;B++)e(O[B]);var D=k;return u(116)(R.s=116)}([function(t,e,n){(function(e){var r;t.exports=(r=r||function(t,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==e&&e.crypto&&(i=e.crypto),!i)try{i=n(207)}catch(t){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},c=s.lib={},u=c.Base={extend:function(t){var e=a(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},l=c.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(o());return new l.init(e,t)}}),h=s.enc={},f=h.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},d=h.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(n,e)}},p=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},m=c.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*c,o);if(c){for(var h=0;h<c;h+=a)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(c.Hasher=m.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new g.HMAC.init(t,n).finalize(e)}}}),s.algo={});return s}(Math),r)}).call(this,n(14))},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,p,m,g,v,y,_,x,b;t.exports=(r=n(0),n(21),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,c=o.BufferedBlockAlgorithm,u=i.enc,u.Utf8,l=u.Base64,h=i.algo.EvpKDF,f=o.Cipher=c.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?b:_}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()}),o.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=d.CBC=function(){var t=p.extend();function e(t,e,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o<n;o++)t[e+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i),r.encryptBlock(t,n),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);r.decryptBlock(t,n),e.call(this,t,n,i),this._prevBlock=o}}),t}(),g=(i.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,r=n-t.sigBytes%n,i=r<<24|r<<16|r<<8|r,o=[],a=0;a<r;a+=4)o.push(i);var c=s.create(o,r);t.concat(c)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},o.BlockCipher=f.extend({cfg:f.cfg.extend({mode:m,padding:g}),reset:function(){var t;f.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),v=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(e):e).toString(l)},parse:function(t){var e,n=l.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:e})}},_=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),a=i.cfg;return v.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),x=(i.kdf={}).OpenSSL={execute:function(t,e,n,r){r||(r=s.random(8));var i=h.create({keySize:e+n}).compute(t,r),o=s.create(i.words.slice(e),4*n);return i.sigBytes=4*e,v.create({key:i,iv:o,salt:r})}},b=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:x}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=_.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);return r.iv=i.iv,_.decrypt.call(this,t,e,i.key,r)}}))))},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(52)("wks"),i=n(36),o=n(3).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){"use strict";var r=n(97),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function u(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isPlainObject:c,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:u,isStream:function(t){return s(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){c(e[r])&&c(n)?e[r]=t(e[r],n):c(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){var r=n(3),i=n(1),o=n(31),a=n(18),s=n(16),c=function(t,e,n){var u,l,h,f=t&c.F,d=t&c.G,p=t&c.S,m=t&c.P,g=t&c.B,v=t&c.W,y=d?i:i[e]||(i[e]={}),_=y.prototype,x=d?r:p?r[e]:(r[e]||{}).prototype;for(u in d&&(n=e),n)(l=!f&&x&&void 0!==x[u])&&s(y,u)||(h=l?x[u]:n[u],y[u]=d&&"function"!=typeof x[u]?n[u]:g&&l?o(h,r):v&&x[u]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[u]=h,t&c.R&&_&&!_[u]&&a(_,u,h)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.treeFindPath=e.prefixCls=void 0;var r,i=n(45),o=(r=i)&&r.__esModule?r:{default:r};e.prefixCls="rk-web-core",e.treeFindPath=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var i=!0,a=!1,s=void 0;try{for(var c,u=(0,o.default)(e);!(i=(c=u.next()).done);i=!0){var l=c.value;if(r.push(l),n(l))return r;if(l.children){var h=t(l.children,n,r);if(h.length)return h}r.pop()}}catch(t){a=!0,s=t}finally{try{!i&&u.return&&u.return()}finally{if(a)throw s}}return[]}},function(t,e,n){t.exports=!n(23)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){(function(t,r){var i;
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("rk-web-core",[],e):"object"==typeof exports?exports["rk-web-core"]=e():t["rk-web-core"]=e()}(window,(function(){return function(t){function e(e){for(var n,r,i=e[0],o=e[1],a=0,s=[];a<i.length;a++)r=i[a],Object.prototype.hasOwnProperty.call(P,r)&&P[r]&&s.push(P[r][0]),P[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);for(D&&D(e);s.length;)s.shift()()}var n=window.webpackHotUpdaterk_web_core;window.webpackHotUpdaterk_web_core=function(t,e){!function(t,e){if(!w[t]||!b[t])return;for(var n in b[t]=!1,e)Object.prototype.hasOwnProperty.call(e,n)&&(m[n]=e[n]);0==--y&&0===_&&C()}(t,e),n&&n(t,e)};var r,i=!0,o="f9b8c9739b720129cc3e",a={},s=[],c=[];function u(t){var e=L[t];if(!e)return R;var n=function(n){return e.hot.active?(L[n]?-1===L[n].parents.indexOf(t)&&L[n].parents.push(t):(s=[t],r=n),-1===e.children.indexOf(n)&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),s=[]),R(n)},i=function(t){return{configurable:!0,enumerable:!0,get:function(){return R[t]},set:function(e){R[t]=e}}};for(var o in R)Object.prototype.hasOwnProperty.call(R,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(n,o,i(o));return n.e=function(t){return"ready"===f&&d("prepare"),_++,R.e(t).then(e,(function(t){throw e(),t}));function e(){_--,"prepare"===f&&(x[t]||A(t),0===_&&0===y&&C())}},n.t=function(t,e){return 1&e&&(t=n(t)),R.t(t,-2&e)},n}function l(e){var n={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:r!==e,active:!0,accept:function(t,e){if(void 0===t)n._selfAccepted=!0;else if("function"==typeof t)n._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)n._acceptedDependencies[t[r]]=e||function(){};else n._acceptedDependencies[t]=e||function(){}},decline:function(t){if(void 0===t)n._selfDeclined=!0;else if("object"==typeof t)for(var e=0;e<t.length;e++)n._declinedDependencies[t[e]]=!0;else n._declinedDependencies[t]=!0},dispose:function(t){n._disposeHandlers.push(t)},addDisposeHandler:function(t){n._disposeHandlers.push(t)},removeDisposeHandler:function(t){var e=n._disposeHandlers.indexOf(t);e>=0&&n._disposeHandlers.splice(e,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[e]=t[e],d("ready");break;case"ready":I(e);break;case"prepare":case"check":case"dispose":case"apply":(v=v||[]).push(e)}},check:S,apply:E,status:function(t){if(!t)return f;h.push(t)},addStatusHandler:function(t){h.push(t)},removeStatusHandler:function(t){var e=h.indexOf(t);e>=0&&h.splice(e,1)},data:a[e]};return r=void 0,n}var h=[],f="idle";function d(t){f=t;for(var e=0;e<h.length;e++)h[e].call(null,t)}var p,m,g,v,y=0,_=0,x={},b={},w={};function M(t){return+t+""===t?+t:t}function S(t){if("idle"!==f)throw new Error("check() is only allowed in idle status");return i=t,d("check"),(e=1e4,e=e||1e4,new Promise((function(t,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=R.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=e,r.send(null)}catch(t){return n(t)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)t();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var e=JSON.parse(r.responseText)}catch(t){return void n(t)}t(e)}}}))).then((function(t){if(!t)return d(T()?"ready":"idle"),null;b={},x={},w=t.c,g=t.h,d("prepare");var e=new Promise((function(t,e){p={resolve:t,reject:e}}));for(var n in m={},P)A(n);return"prepare"===f&&0===_&&0===y&&C(),e}));var e}function A(t){w[t]?(b[t]=!0,y++,function(t){var e=document.createElement("script");e.charset="utf-8",e.src=R.p+""+t+"."+o+".hot-update.js",e.crossOrigin="anonymous",document.head.appendChild(e)}(t)):x[t]=!0}function C(){d("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return E(i)})).then((function(e){t.resolve(e)}),(function(e){t.reject(e)}));else{var e=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&e.push(M(n));t.resolve(e)}}function E(e){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function e(n){var i,c,u,l,h;function f(t){for(var e=[t],n={},r=e.map((function(t){return{chain:[t],id:t}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((l=L[o])&&(!l.hot._selfAccepted||l.hot._selfInvalidated)){if(l.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(l.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<l.parents.length;s++){var c=l.parents[s],u=L[c];if(u){if(u.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([c]),moduleId:o,parentId:c};-1===e.indexOf(c)&&(u.hot._acceptedDependencies[o]?(n[c]||(n[c]=[]),p(n[c],[o])):(delete n[c],e.push(c),r.push({chain:a.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];-1===t.indexOf(r)&&t.push(r)}}T();var y={},_=[],x={},b=function(){console.warn("[HMR] unexpected require("+A.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var A;h=M(S),A=m[S]?f(h):{type:"disposed",moduleId:S};var C=!1,E=!1,I=!1,O="";switch(A.chain&&(O="\nUpdate propagation: "+A.chain.join(" -> ")),A.type){case"self-declined":n.onDeclined&&n.onDeclined(A),n.ignoreDeclined||(C=new Error("Aborted because of self decline: "+A.moduleId+O));break;case"declined":n.onDeclined&&n.onDeclined(A),n.ignoreDeclined||(C=new Error("Aborted because of declined dependency: "+A.moduleId+" in "+A.parentId+O));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(A),n.ignoreUnaccepted||(C=new Error("Aborted because "+h+" is not accepted"+O));break;case"accepted":n.onAccepted&&n.onAccepted(A),E=!0;break;case"disposed":n.onDisposed&&n.onDisposed(A),I=!0;break;default:throw new Error("Unexception type "+A.type)}if(C)return d("abort"),Promise.reject(C);if(E)for(h in x[h]=m[h],p(_,A.outdatedModules),A.outdatedDependencies)Object.prototype.hasOwnProperty.call(A.outdatedDependencies,h)&&(y[h]||(y[h]=[]),p(y[h],A.outdatedDependencies[h]));I&&(p(_,[A.moduleId]),x[h]=b)}var k,B=[];for(c=0;c<_.length;c++)h=_[c],L[h]&&L[h].hot._selfAccepted&&x[h]!==b&&!L[h].hot._selfInvalidated&&B.push({module:h,parents:L[h].parents.slice(),errorHandler:L[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(t){!1===w[t]&&function(t){delete P[t]}(t)}));var D,F,U=_.slice();for(;U.length>0;)if(h=U.pop(),l=L[h]){var j={},N=l.hot._disposeHandlers;for(u=0;u<N.length;u++)(i=N[u])(j);for(a[h]=j,l.hot.active=!1,delete L[h],delete y[h],u=0;u<l.children.length;u++){var z=L[l.children[u]];z&&((k=z.parents.indexOf(h))>=0&&z.parents.splice(k,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h]))for(F=y[h],u=0;u<F.length;u++)D=F[u],(k=l.children.indexOf(D))>=0&&l.children.splice(k,1);d("apply"),void 0!==g&&(o=g,g=void 0);for(h in m=void 0,x)Object.prototype.hasOwnProperty.call(x,h)&&(t[h]=x[h]);var G=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h])){F=y[h];var H=[];for(c=0;c<F.length;c++)if(D=F[c],i=l.hot._acceptedDependencies[D]){if(-1!==H.indexOf(i))continue;H.push(i)}for(c=0;c<H.length;c++){i=H[c];try{i(F)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:h,dependencyId:F[c],error:t}),n.ignoreErrored||G||(G=t)}}}for(c=0;c<B.length;c++){var W=B[c];h=W.module,s=W.parents,r=h;try{R(h)}catch(t){if("function"==typeof W.errorHandler)try{W.errorHandler(t)}catch(e){n.onErrored&&n.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:e,originalError:t}),n.ignoreErrored||G||(G=e),G||(G=t)}else n.onErrored&&n.onErrored({type:"self-accept-errored",moduleId:h,error:t}),n.ignoreErrored||G||(G=t)}}if(G)return d("fail"),Promise.reject(G);if(v)return e(n).then((function(t){return _.forEach((function(e){t.indexOf(e)<0&&t.push(e)})),t}));return d("idle"),new Promise((function(t){t(_)}))}(e=e||{})}function T(){if(v)return m||(m={}),v.forEach(I),v=void 0,!0}function I(e){Object.prototype.hasOwnProperty.call(m,e)||(m[e]=t[e])}var L={},P={0:0};function R(e){if(L[e])return L[e].exports;var n=L[e]={i:e,l:!1,exports:{},hot:l(e),parents:(c=s,s=[],c),children:[]};return t[e].call(n.exports,n,n.exports,u(e)),n.l=!0,n.exports}R.e=function(t){var e=[],n=P[t];if(0!==n)if(n)e.push(n[2]);else{var r=new Promise((function(e,r){n=P[t]=[e,r]}));e.push(n[2]=r);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,R.nc&&a.setAttribute("nonce",R.nc),a.src=function(t){return R.p+""+t+"."+o+".js"}(t),0!==a.src.indexOf(window.location.origin+"/")&&(a.crossOrigin="anonymous");var s=new Error;i=function(e){a.onerror=a.onload=null,clearTimeout(c);var n=P[t];if(0!==n){if(n){var r=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}P[t]=void 0}};var c=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(e)},R.m=t,R.c=L,R.d=function(t,e,n){R.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},R.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},R.t=function(t,e){if(1&e&&(t=R(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(R.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)R.d(n,r,function(e){return t[e]}.bind(null,r));return n},R.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return R.d(e,"a",e),e},R.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},R.p="./",R.oe=function(t){throw console.error(t),t},R.h=function(){return o};var O=window.webpackJsonprk_web_core=window.webpackJsonprk_web_core||[],k=O.push.bind(O);O.push=e,O=O.slice();for(var B=0;B<O.length;B++)e(O[B]);var D=k;return u(116)(R.s=116)}([function(t,e,n){(function(e){var r;t.exports=(r=r||function(t,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==e&&e.crypto&&(i=e.crypto),!i)try{i=n(207)}catch(t){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},c=s.lib={},u=c.Base={extend:function(t){var e=a(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},l=c.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(o());return new l.init(e,t)}}),h=s.enc={},f=h.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},d=h.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(n,e)}},p=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},m=c.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*c,o);if(c){for(var h=0;h<c;h+=a)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(c.Hasher=m.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new g.HMAC.init(t,n).finalize(e)}}}),s.algo={});return s}(Math),r)}).call(this,n(14))},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,p,m,g,v,y,_,x,b;t.exports=(r=n(0),n(21),void(r.lib.Cipher||(i=r,o=i.lib,a=o.Base,s=o.WordArray,c=o.BufferedBlockAlgorithm,u=i.enc,u.Utf8,l=u.Base64,h=i.algo.EvpKDF,f=o.Cipher=c.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?b:_}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()}),o.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=d.CBC=function(){var t=p.extend();function e(t,e,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o<n;o++)t[e+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i),r.encryptBlock(t,n),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);r.decryptBlock(t,n),e.call(this,t,n,i),this._prevBlock=o}}),t}(),g=(i.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,r=n-t.sigBytes%n,i=r<<24|r<<16|r<<8|r,o=[],a=0;a<r;a+=4)o.push(i);var c=s.create(o,r);t.concat(c)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},o.BlockCipher=f.extend({cfg:f.cfg.extend({mode:m,padding:g}),reset:function(){var t;f.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),v=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),y=(i.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(e):e).toString(l)},parse:function(t){var e,n=l.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:e})}},_=o.SerializableCipher=a.extend({cfg:a.extend({format:y}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),a=i.cfg;return v.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),x=(i.kdf={}).OpenSSL={execute:function(t,e,n,r){r||(r=s.random(8));var i=h.create({keySize:e+n}).compute(t,r),o=s.create(i.words.slice(e),4*n);return i.sigBytes=4*e,v.create({key:i,iv:o,salt:r})}},b=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:x}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=_.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);return r.iv=i.iv,_.decrypt.call(this,t,e,i.key,r)}}))))},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(52)("wks"),i=n(36),o=n(3).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){"use strict";var r=n(97),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function u(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isPlainObject:c,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:u,isStream:function(t){return s(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){c(e[r])&&c(n)?e[r]=t(e[r],n):c(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){var r=n(3),i=n(1),o=n(31),a=n(18),s=n(16),c=function(t,e,n){var u,l,h,f=t&c.F,d=t&c.G,p=t&c.S,m=t&c.P,g=t&c.B,v=t&c.W,y=d?i:i[e]||(i[e]={}),_=y.prototype,x=d?r:p?r[e]:(r[e]||{}).prototype;for(u in d&&(n=e),n)(l=!f&&x&&void 0!==x[u])&&s(y,u)||(h=l?x[u]:n[u],y[u]=d&&"function"!=typeof x[u]?n[u]:g&&l?o(h,r):v&&x[u]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[u]=h,t&c.R&&_&&!_[u]&&a(_,u,h)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.treeFindPath=e.prefixCls=void 0;var r,i=n(45),o=(r=i)&&r.__esModule?r:{default:r};e.prefixCls="rk-web-core",e.treeFindPath=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var i=!0,a=!1,s=void 0;try{for(var c,u=(0,o.default)(e);!(i=(c=u.next()).done);i=!0){var l=c.value;if(r.push(l),n(l))return r;if(l.children){var h=t(l.children,n,r);if(h.length)return h}r.pop()}}catch(t){a=!0,s=t}finally{try{!i&&u.return&&u.return()}finally{if(a)throw s}}return[]}},function(t,e,n){t.exports=!n(23)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){(function(t,r){var i;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Lodash <https://lodash.com/>
|
|
@@ -109,7 +109,7 @@ e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,h=n?i-1:0,f=
|
|
|
109
109
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
110
110
|
* @license MIT
|
|
111
111
|
*/
|
|
112
|
-
var r=n("1fb5"),i=n("9152"),o=n("e3db");function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=f(t,e),t}(t,e,n,r):"string"==typeof e?function(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=s(t,r)).write(e,n);return i!==r&&(t=t.slice(0,i)),t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|d(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?s(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=s(t,e<0?0:0|d(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|d(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return N(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return C(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,a=1,s=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;o<s;o++)if(u(t,o)===u(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+c>s&&(n=s-c),o=n;o>=0;o--){for(var h=!0,f=0;f<c;f++)if(u(t,o+f)!==u(e,f)){h=!1;break}if(h)return o}return-1}function _(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function x(t,e,n,r){return G(N(e,t.length-n),t,n,r)}function b(t,e,n,r){return G(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return b(t,e,n,r)}function M(t,e,n,r){return G(z(e),t,n,r)}function S(t,e,n,r){return G(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function C(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,c,u=t[i],l=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}function E(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function I(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=j(t[o]);return i}function L(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function O(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function k(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(t,e,n,r,o){return o||B(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,o){return o||B(t,0,n,8),i.write(t,e,n,r,52,8),n+8}e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return u(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return h(null,t)},c.allocUnsafeSlow=function(t){return h(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):m.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(r,i),l=t.slice(e,n),h=0;h<s;++h)if(u[h]!==l[h]){o=u[h],a=l[h];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return M(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},c.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):k(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):k(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return D(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return D(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=c.isBuffer(t)?t:N(new c(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function j(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n("c8ba"))},b64b:function(t,e,n){var r=n("23e7"),i=n("7b0b"),o=n("df75");r({target:"Object",stat:!0,forced:n("d039")((function(){o(1)}))},{keys:function(t){return o(i(t))}})},b680:function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("e330"),a=n("5926"),s=n("408a"),c=n("1148"),u=n("d039"),l=i.RangeError,h=i.String,f=Math.floor,d=o(c),p=o("".slice),m=o(1..toFixed),g=function(t,e,n){return 0===e?n:e%2==1?g(t,e-1,n*t):g(t*t,e/2,n)},v=function(t,e,n){for(var r=-1,i=n;++r<6;)i+=e*t[r],t[r]=i%1e7,i=f(i/1e7)},y=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=f(r/e),r=r%e*1e7},_=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=h(t[e]);n=""===n?r:n+d("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:u((function(){return"0.000"!==m(8e-5,3)||"1"!==m(.9,0)||"1.25"!==m(1.255,2)||"1000000000000000128"!==m(0xde0b6b3a7640080,0)}))||!u((function(){m({})}))},{toFixed:function(t){var e,n,r,i,o=s(this),c=a(t),u=[0,0,0,0,0,0],f="",m="0";if(c<0||c>20)throw l("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return h(o);if(o<0&&(f="-",o=-o),o>1e-21)if(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(o*g(2,69,1))-69,n=e<0?o*g(2,-e,1):o/g(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(u,0,n),r=c;r>=7;)v(u,1e7,0),r-=7;for(v(u,g(10,r,1),0),r=e-1;r>=23;)y(u,1<<23),r-=23;y(u,1<<r),v(u,1,1),y(u,2),m=_(u)}else v(u,0,n),v(u,1<<-e,0),m=_(u)+d("0",c);return m=c>0?f+((i=m.length)<=c?"0."+d("0",c-i)+m:p(m,0,i-c)+"."+p(m,i-c)):f+m}})},b693:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAYAAAAx8TU7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0ppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RTM3QjEyRDNBOTZDMTFFNUE2QTA4M0M3MDI4QUVDMTQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RTM3QjEyRDJBOTZDMTFFNUE2QTA4M0M3MDI4QUVDMTQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo3ZmI2MGZkMi1hOTZjLTExZTUtYWU4Yi1kYzQ2ODQxNzA1ZmIiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo3ZmI2MGZkMi1hOTZjLTExZTUtYWU4Yi1kYzQ2ODQxNzA1ZmIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4r2gBAAAAASklEQVR42mL4////HCBmB2IGGAYRIHACiKXRBUHgORBbgwQZ/4Ol4OA3EOcxMaCCf2AJJO1PgNgC2cyjQCyJbNEMIGZDdhJAgAEACP9sQulYHrwAAAAASUVORK5CYII="},b6b7:function(t,e,n){var r=n("ebb5"),i=n("4840"),o=r.TYPED_ARRAY_CONSTRUCTOR,a=r.aTypedArrayConstructor;t.exports=function(t){return a(i(t,t[o]))}},b727:function(t,e,n){var r=n("0366"),i=n("e330"),o=n("44ad"),a=n("7b0b"),s=n("07fa"),c=n("65f0"),u=i([].push),l=function(t){var e=1==t,n=2==t,i=3==t,l=4==t,h=6==t,f=7==t,d=5==t||h;return function(p,m,g,v){for(var y,_,x=a(p),b=o(x),w=r(m,g),M=s(b),S=0,A=v||c,C=e?A(p,M):n||f?A(p,0):void 0;M>S;S++)if((d||S in b)&&(_=w(y=b[S],S,x),t))if(e)C[S]=_;else if(_)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:u(C,y)}else switch(t){case 4:return!1;case 7:u(C,y)}return h?-1:i||l?l:C}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},b770:function(t,e,n){"use strict";(t.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n]);if(r)return r}}},b904:function(t,e,n){t.exports=function(){return n("81a5"),{}}},bb7e:function(t,e,n){"use strict";var r=n("d4ec"),i=n("bee2"),o=(n("d3b7"),n("d81d"),n("fb6a"),n("159b"),n("9767"),n("1913"),n("ac1f"),n("5319"),n("4703")),a=n("d30b"),s=function(t,e,n){void 0===n&&(n={});var r=Object(o.a)(t),i=Object(o.a)(e),s=Object(a.a)(i[1]-r[1]),c=Object(a.a)(i[0]-r[0]),u=Object(a.a)(r[1]),l=Object(a.a)(i[1]),h=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(u)*Math.cos(l);return Object(a.d)(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),n.units)};function c(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],c=e[o][0],u=e[o][1];if(t[1]*(a-c)+s*(c-t[0])+u*(t[0]-a)==0&&(a-t[0])*(c-t[0])<=0&&(s-t[1])*(u-t[1])<=0)return!n;s>t[1]!=u>t[1]&&t[0]<(c-a)*(t[1]-s)/(u-s)+a&&(r=!r)}return r}var u=n("5a89"),l=n("ec60"),h=document.createElement("canvas"),f=function(){function t(){Object(r.a)(this,t),this.type="gisCommon"}return Object(i.a)(t,null,[{key:"getTexture",value:function(t,e,n,r){var i=t.getContext("2d");i.drawImage(e,n,r);var o=new u.Texture(i.getImageData(0,0,t.width,t.height));return o.minFilter=u.LinearFilter,o.generateMipmaps=!1,o.needsUpdate=!0,o}},{key:"getTexture1",value:function(t,e,n,r,i,o){var a=t.getContext("2d");a.drawImage(e,n,r,i,o);var s=new u.Texture(a.getImageData(0,0,t.width,t.height));return s.minFilter=u.LinearFilter,s.generateMipmaps=!1,s.needsUpdate=!0,s}},{key:"addImageProcessImage",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.onload=function(){return e(r)},r.onerror=n,r.setAttribute("src",t)}))}},{key:"addImageProcess",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.onload=function(){return e(r)},r.onerror=n,r.setAttribute("src","data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(t))))}))}},{key:"containsCoordinate1",value:function(t,e){var n={type:"Feature",properties:{},geometry:{type:"Point",coordinates:[e.getCenter().x,e.getCenter().y]}};return 1e3*s(n,{type:"Feature",properties:{},geometry:{type:"Point",coordinates:t}},"kilometers")<e.getRadius()}},{key:"containsCoordinate2",value:function(t,e){return function(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=Object(o.a)(t),i=Object(o.b)(e),a=i.type,s=e.bbox,u=i.coordinates;if(s&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,s))return!1;"Polygon"===a&&(u=[u]);for(var l=!1,h=0;h<u.length&&!l;h++)if(c(r,u[h][0],n.ignoreBoundary)){for(var f=!1,d=1;d<u[h].length&&!f;)c(r,u[h][d],!n.ignoreBoundary)&&(f=!0),d++;f||(l=!0)}return l}({type:"Feature",geometry:{type:"Point",coordinates:t}},{type:"Feature",geometry:{type:"Polygon",coordinates:e.geometry.coordinates[0]}})}},{key:"containsCoordinate",value:function(t,e){var n,r;Array.isArray(t)?(n=t[0],r=t[1]):t instanceof l.Coordinate&&(n=t.x,r=t.y);var i=e.xmin,o=e.ymin,a=e.xmax,s=e.ymax;return i<=n&&n<=a&&o<=r&&r<=s}},{key:"isInLevels",value:function(t,e){for(var n=!1,r=0;r<t.rangeArr.length;r+=2){var i=1*t.rangeArr[r],o=1*t.rangeArr[r+1];if(e>i&&e<=o){n=!0;break}}return n}},{key:"getExtent",value:function(t){if(0!==t.length){var e=1/0,n=1/0,r=-1/0,i=-1/0;return 1===t.length?(e=1*t[0].longitude-.5,n=1*t[0].latitude-.5,r=1*t[0].longitude+.5,i=1*t[0].latitude+.5):t.length>1&&t.slice(0,1/0).map((function(t){var o=1*t.longitude,a=1*t.latitude;e=Math.min(e,o),n=Math.min(n,a),r=Math.max(r,o),i=Math.max(i,a)})),{minX:e,minY:n,maxX:r,maxY:i}}}},{key:"vector2Pixel",value:function(t,e,n){var r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}},{key:"generateTextureOne",value:function(t,e,n){h.width=e,h.height=n;var r=h.getContext("2d");r.drawImage(t,0,0,e,n);var i=new u.Texture(r.getImageData(0,0,h.width,h.height));return i.magFilter=u.NearestFilter,i.minFilter=u.NearestFilter,i.generateMipmaps=!1,i.needsUpdate=!0,i}},{key:"generateTexture",value:function(t){var e=[64,128,256,512,1024],n=-1/0;t.forEach((function(t){n=Math.max(n,t.w),Math.max(n,t.h)}));var r=Math.sqrt(t.length),i=parseInt(r);r>i&&(i+=1);for(var o=(r=i)*n+5*r,a=0,s=0;s<e.length;s++){if(o<e[s]){a=e[s];break}a=1024}h.width=h.height=a;for(var c=h.getContext("2d"),l=0,f=0,d=[],p=0;p<r;p++){for(var m=5*(p+1)+p*l,g=0;g<r;g++){var v=5*(g+1)+g*t[f].w;if("img"===t[f].type){var y=(t[f].w-t[f].iw)/2,_=(t[f].h-t[f].ih)/2;c.drawImage(t[f].src,v+y,m+_,t[f].iw,t[f].ih)}else if("txt"===t[f].type)c.fillStyle=t[f].color,"#fff"===t[f].color?(c.font="lighter "+t[f].size+"px Microsoft YaHei",c.fillText(t[f].src,v+t[f].offx,m+t[f].offy),c.strokeStyle=t[f].color,c.strokeText(t[f].src,v+t[f].offx,m+t[f].offy)):(c.font="normal "+t[f].size+"px Microsoft YaHei",c.fillText(t[f].src,v+t[f].offx,m+t[f].offy));else{var x=(t[f].w-t[f].iw)/2,b=(t[f].h-t[f].ih)/2;c.drawImage(t[f].src,v+x,m+b,t[f].iw,t[f].ih)}if(d.push({w:t[f].w,h:t[f].h,u:v/a,v:m/a}),l=Math.max(l,t[f].h),(f+=1)>=t.length)break}if(f>=t.length)break}var w=new u.Texture(c.getImageData(0,0,h.width,h.height));if(w.minFilter=u.LinearFilter,w.generateMipmaps=!1,w.needsUpdate=!0,d.length<100)for(var M=100-d.length,S=0;S<M;S++)d.push({w:0,h:0,u:0,v:0});return{xys:d,texture:w,textureSize:a}}},{key:"setPointEventStatus",value:function(t,e){t&&t.getMeshes().forEach((function(t){"Points"===t.type&&(t.options.interactive=e)}))}},{key:"createTextTexture",value:function(t,e){h.width=h.height=t;var n=h.width/2,r=h.height/2;if(e){var i=0;e.forEach((function(t){var e=h.getContext("2d");e.fillStyle=t.fontcolor,e.font="".concat(t.fontsize,"px Arial"),e.textAlign="center",e.textBaseline="middle",e.fillText(t.txt,n,r+i),i+=t.fontsize}))}var o=new u.Texture(h);return o.minFilter=u.LinearFilter,o.generateMipmaps=!1,o.needsUpdate=!0,o}},{key:"createSimpleShader",value:function(t,e,n){return t.uniforms.texture1={value:e},t.uniforms.size1={value:n},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="\n uniform sampler2D texture1;\n varying float vimgflag;\n varying float vVisible;\n "+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n\n vec2 pUv = gl_PointCoord;\n pUv.y = 1. - pUv.y;\n\n if(vimgflag < 1.0){\n vec4 texColor = texture2D( texture1, pUv );\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n }\n\n if (vVisible < 0.5) discard;\n "),t}}]),t}();e.a=f},bee2:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return i}))},c04e:function(t,e,n){var r=n("da84"),i=n("c65b"),o=n("861d"),a=n("d9b5"),s=n("dc4a"),c=n("485a"),u=n("b622"),l=r.TypeError,h=u("toPrimitive");t.exports=function(t,e){if(!o(t)||a(t))return t;var n,r=s(t,h);if(r){if(void 0===e&&(e="default"),n=i(r,t,e),!o(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},c1ac:function(t,e,n){"use strict";var r=n("ebb5"),i=n("b727").filter,o=n("1448"),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(t){var e=i(a(this),t,arguments.length>1?arguments[1]:void 0);return o(this,e)}))},c274:function(t,e,n){"use strict";var r=n("50bf");function i(){var t={},e=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:i<r&&(r=i),t[i]||(t[i]=[]),t[i].push(o),e++},process:function(){for(var e=r;e<=n;e++)for(var i=t[e],o=0;o<i.length;o++)(0,i[o])()},size:function(){return e}}}t.exports=function(t){var e=(t=t||{}).reporter,n=r.getOption(t,"async",!0),o=r.getOption(t,"auto",!0);o&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var a,s=i(),c=!1;function u(){for(c=!0;s.size();){var t=s;s=i(),t.process()}c=!1}function l(){a=function(t){return function(t){return setTimeout(t,0)}(t)}(u)}return{add:function(t,e){!c&&o&&n&&0===s.size()&&l(),s.add(t,e)},force:function(t){c||(void 0===t&&(t=n),a&&(function(t){clearTimeout(t)}(a),a=null),t?l():u())}}}},c430:function(t,e){t.exports=!1},c60d:function(t,e,n){var r=n("1a2d");t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},c65b:function(t,e){var n=Function.prototype.call;t.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},c6b6:function(t,e,n){var r=n("e330"),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},c6cd:function(t,e,n){var r=n("da84"),i=n("ce4e"),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},c7b2:function(t,e,n){"use strict";n.r(e),n.d(e,"install",(function(){return ie})),n.d(e,"GMap",(function(){return ne}));var r=n("d4ec"),i=n("bee2"),o=(n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("d81d"),n("d3b7"),n("b0c0"),n("1da1")),a=(n("96cf"),n("ac1f"),n("466d"),n("5319"),n("5b81"),n("2ef0")),s=function(){function t(){Object(r.a)(this,t)}return Object(i.a)(t,[{key:"getSvgDict",value:function(t){var e=this;return Object(a.isEmpty)(t)?(console.error("svg javascript file is not null"),!1):new Promise((function(n){var r=[];e.getJSON(t).then((function(t){t.match(/<symbol id=.*?symbol>/g).map((function(t,n){var i=t.match(/id=".*?"/gi),o=t.match(/(?<=viewBox=".*?">).*?(?=<\/symbol>)/gi);r.push({id:i[0].replaceAll('"',"").replace("id=icon-",""),svg:e.createSvg(o[0])})})),n(r)}))}))}},{key:"getJSON",value:function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(e);case 3:return n=t.sent,t.next=6,n.text();case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(0),console.log("Request Failed",t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()},{key:"createSvg",value:function(t){return'<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15737">'.concat(t,"</svg>")}}]),t}(),c=(n("159b"),n("b64b"),n("acb4"),n("5a89")),u=n("ec60"),l={name:"Spin",props:{visible:Boolean},render:function(t,e){var n=arguments[0];return n("div",{class:"sk-chase-box"},[this.visible?null:n("div",{class:"sk-chase-core"},[n("div",{class:"sk-chase"},[n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"})])]),this.$slots.default])}};n("93b5");var h=function(t,e,n,r,i,o,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}(l,void 0,void 0,!1,null,"c8c2036e",null).exports,f=n("e675"),d=n.n(f),p=(n("8ded"),n("add5")),m=n.n(p),g=n("0ab6"),v=n.n(g),y=n("0e54"),_=n.n(y),x=n("ee7c"),b=n.n(x),w=d.a.createStore(v.a,b.a),M=(d.a.createStore(m.a,b.a),d.a.createStore(_.a,b.a),n("fb6a"),n("3ca3"),n("ddb0"),n("47c9")),S=(n("1276"),n("262e")),A=n("2caf"),C=n("5765"),E={altitude:0,imageWidth:512,imageHeight:512,texture:null},T=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n);var l=i=u.Util.extend({},E,i),h=l.altitude;l.imageHeight,l.imageWidth,t instanceof u.Extent||(t=new u.Extent(t));var f=t,d=f.xmin,p=f.ymin,m=f.xmax,g=f.ymax,v=1/0,y=1/0,_=-1/0,x=-1/0;[[d,p],[d,g],[m,g],[m,p]].forEach((function(t){var e=a.coordinateToVector3(t),n=e.x,r=e.y;v=Math.min(n,v),y=Math.min(r,y),_=Math.max(n,_),x=Math.max(r,x)}));var b=Math.abs(_-v),w=Math.abs(x-y),M=new c.PlaneBufferGeometry(b,w);(s=e.call(this))._initOptions(i),s._createMesh(M,o);var S=a.distanceToVector3(h,h).x,A=a.coordinateToVector3(t.getCenter(),S);return s.getObject3d().position.copy(A),s.parent=null,s.type="Image",s}return n}(C.a),I=function(){function t(e,n,i,o,a){var s=this;Object(r.a)(this,t),this.threelayer=a,this.map=a.map,this.textureLoader=new c.TextureLoader;var l=e.split(","),h=n.split(","),f=parseFloat(l[0]),d=parseFloat(l[1]),p=parseFloat(h[0]),m=parseFloat(h[1]),g=o.maxZoom||11,v=o.renderOrder||0,y=o.opacity||1,_=o.minZoom||3,x=new u.Extent(f,d,p,m);this.textureLoader.load(i,(function(t){var e=new c.MeshBasicMaterial({map:t,transparent:!0,opacity:y}),n=new T(x,{imageWidth:512,imageHeight:512,maxZoom:g,minZoom:_,interactive:void 0!==o.interactive&&o.interactive},e,s.threelayer);n.object3d.renderOrder=v,s.imgMesh=n,s.imgMesh.parent=s,s.m=e,s.texture=t,s.threelayer.addMesh(s.imgMesh),o.opacityItems&&o.opacityItems.length>0&&!isNaN(o.opacityItems[0])&&!isNaN(o.opacityItems[1])&&o.opacityItems[0]>3&&o.opacityItems[0]<=18&&o.opacityItems[1]>=0&&o.opacityItems[1]<=1&&(s.opacityItems=o.opacityItems,s._bindMapEvents(),s._viewChange())}))}return Object(i.a)(t,[{key:"_bindMapEvents",value:function(){this.map.on("viewchange",this._viewChange,this)}},{key:"_viewChange",value:function(){this.opacityItems[0]<=this.map.getZoom()?this.imgMesh.object3d.material.opacity=this.opacityItems[1]:this.imgMesh.object3d.material.opacity=1}},{key:"_closeEvent",value:function(){this.map.off("viewchange",this._viewChange,this)}},{key:"updateImage",value:function(t){var e=this;this.textureLoader.load(t,(function(t){e.texture&&e.texture.dispose(),delete e.texture,t.magFilter=c.NearestFilter,t.minFilter=c.NearestFilter,e.imgMesh.object3d.material.map=t,e.imgMesh.object3d.material.map.needsUpdate=!0,e.texture=t,!1===e.imgMesh.isAdd&&(e.threelayer.addMesh(e.imgMesh),e.opacityItems&&e._bindMapEvents())}))}},{key:"clearImage",value:function(){this.imgMesh&&(this.threelayer.removeMesh(this.imgMesh),this.opacityItems&&this._closeEvent())}},{key:"dispose",value:function(){this.imgMesh&&(this.threelayer.removeMesh(this.imgMesh),this.imgMesh.object3d.geometry&&this.imgMesh.object3d.geometry.dispose(),this.imgMesh.object3d.material&&(this.imgMesh.object3d.material.dispose(),delete this.m)),this.texture&&(this.texture&&this.texture.dispose(),delete this.texture),this.opacityItems&&(this._closeEvent(),delete this.opacityItems),this.threelayer=null,this.textureLoader&&delete this.textureLoader}}]),t}(),L=(n("99af"),n("b680"),n("8a79"),n("65d4")),P={0:.05,1:.05,2:.05,3:.003,4:.003,5:.003,6:.003,7:.003,8:.002,9:.001,10:5e-4,11:3e-4,12:15e-5,13:1e-4,14:5e-5,15:25e-6,16:1e-5,16.99:1e-5,17:5e-6,18:2e-6,19:1e-6,20:5e-7,21:2e-7,22:1e-7},R=Object(a.map)(["南","东南偏南","东南","东南偏东","东","东北偏东","东北","东北偏北","北","西北偏北","西北","西北偏西","西","西南偏西","西南","西南偏南"],(function(t,e){var n=22.5,r=n*e;return{bearing:r,range:[r-n/2,r+n/2],label:t}})),O=function(t,e,n){return t>=e&&t<n},k=function(){function t(e,n,i){var o=this;Object(r.a)(this,t),this.map=i,this.windLayer=this.map.getLayer("windLayer"),this.windLayer?this.windLayer.setData(e):(this.windLayer=new L.a("windLayer",e,{windOptions:{colorScale:["rgba(68,162,255,1)","rgba(110,223,255,1)","rgba(142,228,187,1)","rgba(179,253,163,1)","rgba(213,247,176,1)","rgba(255,252,213,1)","rgba(255,238,159,1)","rgba(252,217,125,1)","rgba(255,182,100,1)","rgba(252,150,75,1)","rgba(250,112,52,1)","rgba(245,64,32,1)","rgba(237,45,28,1)","rgba(220,24,32,1)","rgba(180,0,35,1)"],velocityScale:function(){var t=o.map.getZoom();return P[parseInt(t)]||1/40},frameRate:16,maxAge:60,globalAlpha:.9,paths:3782*i.options.devicePixelRatio}}),this.map.addLayer(this.windLayer)),this.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),this._bindMapEvents()}return Object(i.a)(t,[{key:"_bindMapEvents",value:function(){this.map.on("mousemove",this._onWind,this)}},{key:"_closeEvent",value:function(){this.map.off("mousemove",this._onWind,this)}},{key:"_onWind",value:function(t){var e,n=this.windLayer.field.interpolatedValueAt(t.coordinate.x,t.coordinate.y);if(n){var r=this.vectorToDegrees(n.u,n.v,"bearingCCW"),i=this.vectorToSpeed(n.u,n.v,"m/s");this.toolTip._content="".concat(null===(e=function(t){return Object(a.find)(R,(function(e){return O(t,e.range[0],e.range[1])||O(t-360,e.range[0],e.range[1])}))}(r))||void 0===e?void 0:e.label).concat(this.windLevel(i),"级;速度").concat(i.toFixed(2),"m/s;高度10米")}}},{key:"windLevel",value:function(t){return t<=0?0:t<=.3?1:t<=1.6?2:t<=3.4?3:t<=5.5?4:t<=8?5:t<=10.8?6:t<=13.9?7:t<=17.2?8:t<=20.8?9:t<=24.5?10:t<=28.5?11:12}},{key:"setToolTip",value:function(t,e){this.removeToolTip(),this.toolTip=new u.ui.ToolTip(t,e),this.toolTip.addTo(this.map)}},{key:"removeToolTip",value:function(){var t;this.toolTip&&(null===(t=this.toolTip)||void 0===t||t.remove(),this.toolTip=null)}},{key:"vectorToDegrees",value:function(t,e,n){n.endsWith("CCW")&&(e=e>0?e=-e:Math.abs(e));var r=Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),i=180*Math.atan2(t/r,e/r)/Math.PI+180;return"bearingCW"!==n&&"meteoCCW"!==n||(i+=180)>=360&&(i-=360),i}},{key:"vectorToSpeed",value:function(t,e,n){var r=Math.sqrt(Math.pow(t,2)+Math.pow(e,2));return"k/h"===n?3.6*r:"kt"===n?r/.514:r}},{key:"closeWind",value:function(){this._closeEvent(),this.removeToolTip(),this.map.removeLayer(this.windLayer),delete this.windLayer,this.windLayer=null}}]),t}(),B=n("bb7e"),D=function(){function t(e,n,i,o,a,s,c){if(Object(r.a)(this,t),this.map=s,this.tlayer=a,this.parent=c,this.geometry=null,void 0===i)this.drawTool=new u.DrawTool({mode:e,symbol:{lineColor:o.lineColor||"#E40D56",lineWidth:2,lineDasharray:[5,5],polygonFill:o.polygonFill||"#E40D56",polygonOpacity:.2}}).addTo(this.map).enable(),this._bindEvent(),B.a.setPointEventStatus(a,!1);else{var l={lineColor:o.lineColor||"#1bbc9b",lineWidth:o.lineWidth||1,lineOpacity:o.lineOpacity||1,polygonOpacity:isNaN(o.polygonOpacity)?1:o.polygonOpacity};o.colors?l.polygonFill={type:"linear",places:[0,0,1,1],colorStops:o.colors}:l.polygonFill=o.polygonFill||"#1bbc9b",o.lineDasharray&&(l.lineDasharray=[5,5,5]),"Polygon"===e?this.geometry=new u.MultiPolygon(i,{symbol:l}):"Circle"===e&&(this.geometry=new u.Circle(i,o.radius||1e3,{symbol:l}))}this._drawEnd=n,this.mode=e,this.toolLayer=this.map.getLayer("toolLayer"),this.toolLayer||(this.toolLayer=new u.VectorLayer("toolLayer",{geometryEvents:!1,hitDetect:!1}).addTo(this.map),this.geometry&&(this.toolLayer.addGeometry(this.geometry),this._drawEnd&&("Circle"===this.mode?this._drawEnd(this.geometry.getCoordinates(),this.geometry.getRadius()):this._drawEnd(this.geometry.getCoordinates())))),this.type="drawTool"}return Object(i.a)(t,[{key:"_bindEvent",value:function(){this.drawTool.on("drawend",this.drawEnd,this)}},{key:"_closeEvent",value:function(){this.drawTool.off("drawend",this.drawEnd,this)}},{key:"drawEnd",value:function(t){this.toolLayer&&this.toolLayer.addGeometry(t.geometry),this._drawEnd&&("Circle"===this.mode?this._drawEnd(t.geometry.getCoordinates(),t.geometry.getRadius()):this._drawEnd(t.geometry.getCoordinates())),this.geometry=t.geometry}},{key:"disableTool",value:function(){this.drawTool.disable(),B.a.setPointEventStatus(this.tlayer,!0)}},{key:"clearGeometry",value:function(){this.toolLayer&&this.toolLayer.clear()}},{key:"setMode",value:function(t,e){B.a.setPointEventStatus(this.tlayer,!1),this._drawEnd&&delete this._drawEnd,this._drawEnd=e,this.drawTool.setMode(t).enable(),this.mode=t}},{key:"startEdit",value:function(){this.disableTool(),this.geometry&&this.geometry.startEdit()}},{key:"endEdit",value:function(t){this.geometry&&(this.geometry.endEdit(),t&&("Circle"===this.mode?t(this.geometry.getCoordinates(),this.geometry.getRadius()):t(this.geometry.getCoordinates())))}},{key:"dispose",value:function(){this.parent&&delete this.parent.drawTool,this.drawTool&&(this._closeEvent(),delete this.drawTool),this._drawEnd&&delete this._drawEnd,this.geometry&&delete this.geometry,this.map.removeLayer(this.toolLayer),delete this.toolLayer}}]),t}(),F=function(){function t(e,n,i){Object(r.a)(this,t),this.tlayer=n,this.map=i,this.distanceTool=new u.DistanceTool({symbol:{lineColor:"#fff",lineWidth:2},vertexSymbol:{markerType:"ellipse",markerFill:"#1bbc9b",markerLineColor:"#000",markerLineWidth:3,markerWidth:10,markerHeight:10},labelOptions:{textSymbol:{textFaceName:"monospace",textFill:"#fff",textLineSpacing:1,textHorizontalAlignment:"right",textDx:15,markerLineColor:"#b4b3b3",markerFill:"#000"},boxStyle:{padding:[6,2],symbol:{markerType:"square",markerFill:"#000",markerFillOpacity:.9,markerLineColor:"#b4b3b3"}}},clearButtonSymbol:[{markerType:"square",markerFill:"#000",markerLineColor:"#b4b3b3",markerLineWidth:2,markerWidth:15,markerHeight:15,markerDx:20},{markerType:"x",markerWidth:10,markerHeight:10,markerLineColor:"#fff",markerDx:20}],language:"zh-CN"}).addTo(this.map),B.a.setPointEventStatus(n,!1)}return Object(i.a)(t,[{key:"dispose",value:function(){this.distanceTool&&(this.distanceTool.clear(),delete this.distanceTool),this.tlayer=null,this.map=null}},{key:"disable",value:function(){this.distanceTool.disable(),B.a.setPointEventStatus(this.tlayer,!0)}},{key:"enable",value:function(){B.a.setPointEventStatus(this.tlayer,!1),this.distanceTool.enable()}},{key:"clear",value:function(){this.distanceTool.clear()}}]),t}(),U=(n("4e82"),n("25a5")),j=n.n(U),N=n("ad2f"),z={fontSize:20,altitude:0,color:"#fff",text:"hello",weight:0,zoomFilter:!1},G={positionsConvert:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=[],i=0,o=t.length;i<o;i+=3){var a=t[i],s=t[i+1],u=t[i+2];e>0&&(u+=n.distanceToVector3(e,e).x),r.push(new c.Vector3(a,s,u))}return r},vectors2Pixel:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0;t[0]instanceof c.Vector3||(t=G.positionsConvert(t,r,i));var o=t.map((function(t){return G.vector2Pixel(t,e,n)}));return o},vector2Pixel:function(t,e,n){var r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}},H=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o){var a;Object(r.a)(this,n),i=u.Util.extend({},z,i,{layer:o,position:t}),(a=e.call(this))._initOptions(i);var s=i,l=(s.altitude,s.fontSize),h=s.color,f=s.text,d=s.rotation,p=d*(Math.PI/180);a._createGroup();var m=new N.SpriteText2D(f,{align:N.textAlign.center,font:"".concat(2*l,"px Arial"),fillStyle:h,antialias:!1});m.children[0].material.sizeAttenuation=!1,m.children[0].material.rotation=p;var g=.001/3;return m.scale.set(g,g,g),a.getObject3d().add(m),a.getObject3d().name=d,a.getObject3d().position.copy(t),a.textRect={width:a.calTextWidth(f,l)+3*l,height:l+3*l},a._vector=new c.Vector3,a._pixel={x:0,y:0},a}return Object(i.a)(n,[{key:"getTextRect",value:function(){this.getPixel();var t=this._pixel,e=t.x,n=t.y,r=this.textRect,i=r.width,o=r.height;return{minX:e-i/2,minY:n-o/2,maxX:e+i/2,maxY:n+o/2}}},{key:"calTextWidth",value:function(t,e){var n=(t.match(/[\u4e00-\u9fa5]/g)||"").length;return n*e+.5*(t.length-n)*e}},{key:"getPixel",value:function(){var t=this.getMap().getSize(),e=this.getLayer().getCamera(),n=this.getObject3d().position;this._vector.x=n.x,this._vector.y=n.y,this._vector.z=n.z,this._pixel=G.vector2Pixel(this._vector,t,e)}},{key:"identify",value:function(t){var e=this.getTextRect(),n=e.minX,r=e.minY,i=e.maxX,o=e.maxY,a=this.getMap().coordToContainerPoint(t);return a.x>=n&&a.x<=i&&a.y>=r&&a.y<=o}}]),n}(C.a),W={radius:100,altitude:0},V=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),i=u.Util.extend({},W,i,{layer:a,coordinate:t}),(s=e.call(this))._initOptions(i);var l=i,h=l.altitude,f=l.radius,d=a.distanceToVector3(f,f).x,p=new c.CircleBufferGeometry(d,128,0,90*Math.PI/180);s._createMesh(p,o);var m=a.distanceToVector3(h,h).x,g=a.coordinateToVector3(t,m);return s.getObject3d().position.copy(g),s}return n}(C.a),Z=function(){function t(e,n,i,o,a){var s=this;Object(r.a)(this,t),this.threelayer=a,this.map=a.map,this.all_cirles=[],this.rItems={},this.all_texts={},this.all_sectors={},this.textSprites=[],this.rbush=new j.a,this.material=new c.MeshBasicMaterial({color:"#233F75",transparent:!0,opacity:.5,depthTest:!1}),this.vector_circle_layer=this.map.getLayer("vector_circle"),this.vector_circle_layer||(this.vector_circle_layer=new u.VectorLayer("vector_circle",{geometryEvents:!1,hitDetect:!1}).addTo(a.map)),this.sector=null;for(var l=this.threelayer.coordinateToVector3([e,n],0),h=(new c.Matrix4).makeTranslation(l.x,l.y,l.z),f=1e3;f<=1e4;f+=1e3){this.createLine([e,n],f);var d=this.threelayer.distanceToVector3(f,f).x;this.rItems[f]=d,this.all_texts[f]=[]}for(var p=this.vector_circle_layer.getGeometries(),m=0;m<p.length;m++)this.all_cirles.push(p[m]);for(var g=3;g<=360;){for(var v in this.rItems){var y=this.createLabel("".concat(v/1e3,"km"),g,this.rItems[v],h,5,a);this.all_texts[v].push(y)}g+=24}var _=this.createParty(e,n,3e3);this.all_sectors[3e3]=_;var x=this.createParty(e,n,5e3);this.all_sectors[5e3]=x;var b=this.createParty(e,n,1e4);this.all_sectors[1e4]=b,this.vector_circle_layer.clear();for(var w=i/1e3,M=void 0,S=0;S<w;S++){var A=this.all_texts[1e3*(S+1)];A&&A.forEach((function(t){s.textSprites.push(t)})),this.vector_circle_layer.addGeometry(this.all_cirles[S]),S===w-1&&(M=this.all_cirles[S])}if(this.vector_circle_layer.options.visible=!0,this.threelayer.addMesh(this.textSprites),o.rotation){var C=this.all_sectors[i],E=this.calDirection(o.rotation);C.object3d.rotation.z=E*Math.PI/180,this.threelayer.addMesh(C),this.sector=C}this.collides(),this._bindEvent(),o.callback&&o.callback(M)}return Object(i.a)(t,[{key:"update",value:function(t,e,n,r){var i=this;this._closeEvent();var o=this.threelayer.coordinateToVector3([t,e],0),a=(new c.Matrix4).makeTranslation(o.x,o.y,o.z);this.all_cirles.forEach((function(n){n.setCoordinates([t,e])}));for(var s=3,u=0;s<=360;){for(var l in this.rItems){var h=this.getPsVec(s,this.rItems[l],a);this.all_texts[l][u].object3d.position.copy(h)}s+=24,u+=1}for(var f in this.all_sectors)this.all_sectors[f].object3d.position.copy(o);this.threelayer.removeMesh(this.textSprites),this.textSprites=[],this.vector_circle_layer.clear(),this.threelayer.removeMesh(this.sector);for(var d=n/1e3,p=void 0,m=0;m<d;m++){var g=this.all_texts[1e3*(m+1)];g&&g.forEach((function(t){i.textSprites.push(t)})),this.vector_circle_layer.addGeometry(this.all_cirles[m]),m===d-1&&(p=this.all_cirles[m])}if(this.vector_circle_layer.show(),this.threelayer.addMesh(this.textSprites),r.rotation){var v=this.all_sectors[n],y=this.calDirection(r.rotation);v.object3d.rotation.z=y*Math.PI/180,this.threelayer.addMesh(v),this.sector=v}this.collides(),this._bindEvent(),r.callback&&r.callback(p)}},{key:"_bindEvent",value:function(){this.map.on("zooming zoomend moveend animateend",this.circleTextOn,this),this.map.on("rotate",this.circleTextRotationOn,this)}},{key:"_closeEvent",value:function(){this.map.off("zooming zoomend moveend animateend",this.circleTextOn,this),this.map.off("rotate",this.circleTextRotationOn,this)}},{key:"circleTextOn",value:function(){this.textSprites.sort((function(t,e){return e.getOptions().weight-t.getOptions().weight})),this.collides()}},{key:"circleTextRotationOn",value:function(){for(var t=0;t<this.textSprites.length;t++)this.textSprites[t].object3d.children[0].material.rotation=(parseFloat(this.textSprites[t].object3d.name)+this.map.getBearing())*(Math.PI/180);this.textSprites.sort((function(t,e){return e.getOptions().weight-t.getOptions().weight})),this.collides()}},{key:"dispose",value:function(){for(var t in this._closeEvent(),this.all_cirles=[],this.rItems)delete this.rItems[t];for(var e in this.threelayer.removeMesh(this.textSprites),this.sector&&this.threelayer.removeMesh(this.sector),this.rbush.clear(),delete this.rbush,this.textSprites=[],this.all_texts)this.all_texts[e].forEach((function(t){t.object3d.children[0].sprite&&t.object3d.children[0].sprite.geometry&&t.object3d.children[0].sprite.geometry.dispose(),t.object3d.children[0].material&&t.object3d.children[0].material.dispose(),t.object3d.children[0].texture&&t.object3d.children[0].texture.dispose()})),delete this.all_texts[e];for(var n in this.sector=null,this.all_sectors){var r=this.all_sectors[n];r.object3d.geometry&&r.object3d.geometry.dispose(),delete this.all_sectors[n]}this.material&&this.material.dispose(),this.map.removeLayer(this.vector_circle_layer)}},{key:"createLine",value:function(t,e){1e3===e?new u.Circle(t,e,{symbol:{lineColor:"#1bbc9b",lineWidth:1,lineOpacity:1,polygonFill:"#1bbc9b",polygonOpacity:0}}).addTo(this.vector_circle_layer):new u.Circle(t,e,{symbol:{lineColor:"#1bbc9b",lineWidth:1,lineDasharray:[5,5,5],lineOpacity:1,polygonFill:"#1bbc9b",polygonOpacity:0}}).addTo(this.vector_circle_layer)}},{key:"createParty",value:function(t,e,n){return new V([t,e],{radius:n,interactive:!1},this.material,this.threelayer)}},{key:"createLabel",value:function(t,e,n,r,i,o){var a=this.getArrowPs(e,1),s=this.getPsVec(e,n,r),c=new H(s,{text:t,color:"white",fontSize:18,weight:i,interactive:!1,rotation:a.rotation,minZoom:11},o);return c.object3d.renderOrder=3,c}},{key:"collides",value:function(){this.rbush.clear();for(var t=0,e=this.textSprites.length;t<e;t++){var n=this.textSprites[t],r=n.getTextRect();this.rbush.collides(r)?n.hide():(n.show(),this.rbush.insert(r))}}},{key:"getPsVec",value:function(t,e,n){var r=t*(Math.PI/180),i=new c.Vector3(Math.sin(r)*e,Math.cos(r)*e,0);return i=i.applyMatrix4(n)}},{key:"calDirection",value:function(t){return t<=22.5&&t>337.5?45:t<=67.5&&t>22.5?0:t<=112.5&&t>67.5?315:t<=157.5&&t>112.5?270:t<=202.5&&t>157.5?225:t<=247.5&&t>202.5?180:t<=292.5&&t>247.5?135:t<=337.5&&t>292.5?90:0}},{key:"getArrowPs",value:function(t,e){var n=0;return t<=90?n=-t:t>90&&t<=180||t>180&&t<=270?n=180-t:t>270&&t<360&&(n=360-t),{rotation:n}}}]),t}(),Q={altitude:0,height:0},X=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),t=u.Util.extend({},Q,t,{layer:a}),s=e.call(this);var c=t;return c.width,c.height,c.altitude,s._initOptions(t),s._createMesh(i,o),s}return n}(C.a),Y={computeTangents:function(t){t.computeTangents(),console.warn("THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.")},mergeBufferGeometries:function(t,e){for(var n=null!==t[0].index,r=new Set(Object.keys(t[0].attributes)),i=new Set(Object.keys(t[0].morphAttributes)),o={},a={},s=t[0].morphTargetsRelative,u=new c.BufferGeometry,l=0,h=0;h<t.length;++h){var f=t[h],d=0;if(n!==(null!==f.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(var p in f.attributes){if(!r.has(p))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+'. All geometries must have compatible attributes; make sure "'+p+'" attribute exists among all geometries, or in none of them.'),null;void 0===o[p]&&(o[p]=[]),o[p].push(f.attributes[p]),d++}if(d!==r.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". Make sure all geometries have the same number of attributes."),null;if(s!==f.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(var p in f.morphAttributes){if(!i.has(p))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". .morphAttributes must be consistent throughout all geometries."),null;void 0===a[p]&&(a[p]=[]),a[p].push(f.morphAttributes[p])}if(u.userData.mergedUserData=u.userData.mergedUserData||[],u.userData.mergedUserData.push(f.userData),e){var m;if(n)m=f.index.count;else{if(void 0===f.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". The geometry must have either an index or a position attribute"),null;m=f.attributes.position.count}u.addGroup(l,m,h),l+=m}}if(n){var g=0,v=[];for(h=0;h<t.length;++h){for(var y=t[h].index,_=0;_<y.count;++_)v.push(y.getX(_)+g);g+=t[h].attributes.position.count}u.setIndex(v)}for(var p in o){var x=this.mergeBufferAttributes(o[p]);if(!x)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+p+" attribute."),null;u.setAttribute(p,x)}for(var p in a){var b=a[p][0].length;if(0===b)break;for(u.morphAttributes=u.morphAttributes||{},u.morphAttributes[p]=[],h=0;h<b;++h){var w=[];for(_=0;_<a[p].length;++_)w.push(a[p][_][h]);var M=this.mergeBufferAttributes(w);if(!M)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+p+" morphAttribute."),null;u.morphAttributes[p].push(M)}}return u},mergeBufferAttributes:function(t){for(var e,n,r,i=0,o=0;o<t.length;++o){var a=t[o];if(a.isInterleavedBufferAttribute)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported."),null;if(void 0===e&&(e=a.array.constructor),e!==a.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;i+=a.array.length}var s=new e(i),u=0;for(o=0;o<t.length;++o)s.set(t[o].array,u),u+=t[o].array.length;return new c.BufferAttribute(s,n,r)},interleaveAttributes:function(t){for(var e,n=0,r=0,i=0,o=t.length;i<o;++i){var a=t[i];if(void 0===e&&(e=a.array.constructor),e!==a.array.constructor)return console.error("AttributeBuffers of different types cannot be interleaved"),null;n+=a.array.length,r+=a.itemSize}var s=new c.InterleavedBuffer(new e(n),r),u=0,l=[],h=["getX","getY","getZ","getW"],f=["setX","setY","setZ","setW"],d=0;for(o=t.length;d<o;d++){var p=(a=t[d]).itemSize,m=a.count,g=new c.InterleavedBufferAttribute(s,p,u,a.normalized);l.push(g),u+=p;for(var v=0;v<m;v++)for(var y=0;y<p;y++)g[f[y]](v,a[h[y]](v))}return l},estimateBytesUsed:function(t){var e=0;for(var n in t.attributes){var r=t.getAttribute(n);e+=r.count*r.itemSize*r.array.BYTES_PER_ELEMENT}var i=t.getIndex();return e+=i?i.count*i.itemSize*i.array.BYTES_PER_ELEMENT:0},mergeVertices:function(t,e=1e-4){e=Math.max(e,Number.EPSILON);for(var n={},r=t.getIndex(),i=t.getAttribute("position"),o=r?r.count:i.count,a=0,s=Object.keys(t.attributes),u={},l={},h=[],f=["getX","getY","getZ","getW"],d=0,p=s.length;d<p;d++){var m=s[d];u[m]=[];var g=t.morphAttributes[m];g&&(l[m]=new Array(g.length).fill().map(()=>[]))}var v=Math.log10(1/e),y=Math.pow(10,v);for(d=0;d<o;d++){var _=r?r.getX(d):d,x="",b=0;for(p=s.length;b<p;b++){m=s[b];for(var w=t.getAttribute(m),M=w.itemSize,S=0;S<M;S++)x+=~~(w[f[S]](_)*y)+","}if(x in n)h.push(n[x]);else{for(b=0,p=s.length;b<p;b++){m=s[b],w=t.getAttribute(m),g=t.morphAttributes[m],M=w.itemSize;var A=u[m],C=l[m];for(S=0;S<M;S++){var E=f[S];if(A.push(w[E](_)),g)for(var T=0,I=g.length;T<I;T++)C[T].push(g[T][E](_))}}n[x]=a,h.push(a),a++}}const L=t.clone();for(d=0,p=s.length;d<p;d++){m=s[d];var P=t.getAttribute(m),R=new P.array.constructor(u[m]);if(w=new c.BufferAttribute(R,P.itemSize,P.normalized),L.setAttribute(m,w),m in l)for(b=0;b<l[m].length;b++){var O=t.morphAttributes[m][b],k=(R=new O.array.constructor(l[m][b]),new c.BufferAttribute(R,O.itemSize,O.normalized));L.morphAttributes[m][b]=k}}return L.setIndex(h),L},toTrianglesDrawMode:function(t,e){if(e===c.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===c.TriangleFanDrawMode||e===c.TriangleStripDrawMode){var n=t.getIndex();if(null===n){var r=[],i=t.getAttribute("position");if(void 0===i)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t;for(var o=0;o<i.count;o++)r.push(o);t.setIndex(r),n=t.getIndex()}var a=n.count-2,s=[];if(e===c.TriangleFanDrawMode)for(o=1;o<=a;o++)s.push(n.getX(0)),s.push(n.getX(o)),s.push(n.getX(o+1));else for(o=0;o<a;o++)o%2==0?(s.push(n.getX(o)),s.push(n.getX(o+1)),s.push(n.getX(o+2))):(s.push(n.getX(o+2)),s.push(n.getX(o+1)),s.push(n.getX(o)));s.length/3!==a&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var u=t.clone();return u.setIndex(s),u.clearGroups(),u}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),t},computeMorphedAttributes:function(t){if(!0!==t.geometry.isBufferGeometry)return console.error("THREE.BufferGeometryUtils: Geometry is not of type BufferGeometry."),null;var e=new c.Vector3,n=new c.Vector3,r=new c.Vector3,i=new c.Vector3,o=new c.Vector3,a=new c.Vector3,s=new c.Vector3,u=new c.Vector3,l=new c.Vector3;function h(t,c,h,f,d,p,m,g,v){e.fromBufferAttribute(h,p),n.fromBufferAttribute(h,m),r.fromBufferAttribute(h,g);var y=t.morphTargetInfluences;if(c.morphTargets&&f&&y){s.set(0,0,0),u.set(0,0,0),l.set(0,0,0);for(var _=0,x=f.length;_<x;_++){var b=y[_],w=f[_];0!==b&&(i.fromBufferAttribute(w,p),o.fromBufferAttribute(w,m),a.fromBufferAttribute(w,g),d?(s.addScaledVector(i,b),u.addScaledVector(o,b),l.addScaledVector(a,b)):(s.addScaledVector(i.sub(e),b),u.addScaledVector(o.sub(n),b),l.addScaledVector(a.sub(r),b)))}e.add(s),n.add(u),r.add(l)}t.isSkinnedMesh&&(t.boneTransform(p,e),t.boneTransform(m,n),t.boneTransform(g,r)),v[3*p+0]=e.x,v[3*p+1]=e.y,v[3*p+2]=e.z,v[3*m+0]=n.x,v[3*m+1]=n.y,v[3*m+2]=n.z,v[3*g+0]=r.x,v[3*g+1]=r.y,v[3*g+2]=r.z}var f,d,p,m,g,v,y,_,x,b=t.geometry,w=t.material,M=b.index,S=b.attributes.position,A=b.morphAttributes.position,C=b.morphTargetsRelative,E=b.attributes.normal,T=b.morphAttributes.position,I=b.groups,L=b.drawRange,P=new Float32Array(S.count*S.itemSize),R=new Float32Array(E.count*E.itemSize);if(null!==M)if(Array.isArray(w))for(m=0,v=I.length;m<v;m++)for(x=w[(_=I[m]).materialIndex],g=Math.max(_.start,L.start),y=Math.min(_.start+_.count,L.start+L.count);g<y;g+=3)h(t,x,S,A,C,f=M.getX(g),d=M.getX(g+1),p=M.getX(g+2),P),h(t,x,E,T,C,f,d,p,R);else for(m=Math.max(0,L.start),v=Math.min(M.count,L.start+L.count);m<v;m+=3)h(t,w,S,A,C,f=M.getX(m),d=M.getX(m+1),p=M.getX(m+2),P),h(t,w,E,T,C,f,d,p,R);else if(void 0!==S)if(Array.isArray(w))for(m=0,v=I.length;m<v;m++)for(x=w[(_=I[m]).materialIndex],g=Math.max(_.start,L.start),y=Math.min(_.start+_.count,L.start+L.count);g<y;g+=3)h(t,x,S,A,C,f=g,d=g+1,p=g+2,P),h(t,x,E,T,C,f,d,p,R);else for(m=Math.max(0,L.start),v=Math.min(S.count,L.start+L.count);m<v;m+=3)h(t,w,S,A,C,f=m,d=m+1,p=m+2,P),h(t,w,E,T,C,f,d,p,R);return{positionAttribute:S,normalAttribute:E,morphedPositionAttribute:new c.Float32BufferAttribute(P,3),morphedNormalAttribute:new c.Float32BufferAttribute(R,3)}}},J=n("22b5"),q=function(){function t(e,n,i){var o=this;Object(r.a)(this,t);var a=n.width||64,s=e.length>100?100:e.length,u=new c.PlaneBufferGeometry(a,a);this.texture=this._createBackGround(a),this.radius=a/3;var l,h=new c.MeshStandardMaterial({map:this.texture}),f=[];this.impacts=[],this.tweens=[],e.slice(0,s).map((function(t){var e=u.clone(),n=i.coordinateToVector3(t,0),r=(new c.Matrix4).makeTranslation(n.x,n.y,n.z);e.applyMatrix4(r),f.push(e),o.impacts.push({impactPosition:new c.Vector3(0,0,0).applyMatrix4(r),impactMaxRadius:o.radius,impactRatio:1})})),h.onBeforeCompile=function(t){t.uniforms.impacts={value:o.impacts},t.uniforms.impactRadius={value:a/2},t.vertexShader="varying vec3 vPosition;\n"+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <worldpos_vertex>","#include <worldpos_vertex>\n vPosition = transformed.xyz;"),t.fragmentShader="struct impact {\n vec3 impactPosition;\n float impactMaxRadius;\n float impactRatio;\n };\n uniform impact impacts[".concat(s,"];\n uniform float impactRadius;\n varying vec3 vPosition;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("#include <dithering_fragment>","#include <dithering_fragment>\n float finalStep = 0.0;\n for (int i = 0; i < ".concat(s,";i++){\n \n float dist = distance(vPosition, impacts[i].impactPosition);\n //float curRadius = impacts[i].impactMaxRadius * impacts[i].impactRatio;\n float curRadius = impactRadius * impacts[i].impactRatio;\n float sstep = smoothstep(0., curRadius, dist) - smoothstep(curRadius - ( 0.25 * impacts[i].impactRatio ), curRadius, dist);\n sstep *= 1. - impacts[i].impactRatio;\n finalStep += sstep;\n\n }\n finalStep = 1. - clamp(finalStep, 0., 1.);\n\n //vec3 col = mix(vec3(1., 0.5, 0.0625), vec3(1.,0.125, 0.0625), finalStep);\n vec3 col = mix(vec3(1.,0., 0.), vec3(1.,0., 0.), finalStep);\n gl_FragColor = vec4( mix( col, gl_FragColor.rgb, finalStep), diffuseColor.a );")),l=t,o.materialShader=t};var d=Y.mergeBufferGeometries(f),p=new X({interactive:!1},d,h,i);i.addMesh(p),this.map=i.map,this.curscale=this.map.getScale();for(var m=this,g=function(t){o.tweens.push({runTween:function(){new J.a({value:0}).to({value:1},c.Math.randInt(2500,5e3)).delay(c.Math.randInt(500,2e3)).onUpdate((function(e){l&&l.uniforms.impacts.value[t]&&(l.uniforms.impacts.value[t].impactRatio=e.value)})).onComplete((function(){var e;null===(e=m.tweens[t])||void 0===e||e.runTween()})).start()}})},v=0;v<s;v++)g(v);this.tweens.forEach((function(t){t.runTween()})),this.width=a,this.shockMeshs=p,this.threelayer=i,this.points=e,this._geom=u,this._bindMapEvents()}return Object(i.a)(t,[{key:"_bindMapEvents",value:function(){this.map&&this.map.on("zooming zoomend",this._setSizeOn,this)}},{key:"_closeEvent",value:function(){this.map&&this.map.off("zooming zoomend",this._setSizeOn,this)}},{key:"_setSizeOn",value:function(){if(this.materialShader){var t=this.map.getScale()/this.curscale;t=(t=t>1?1:t)<.5?.5:t,this.materialShader.uniforms.impactRadius.value=this.radius*t}}},{key:"_createBackGround",value:function(t){var e=document.createElement("canvas");e.width=e.height=t;var n=e.getContext("2d");n.globalCompositeOperation,n.globalAlpha=0,n.fillRect(0,0,e.width,e.height);var r=new c.Texture(e);return r.needsUpdate=!0,r}},{key:"hide",value:function(){this.shockMeshs&&this.threelayer.removeMesh(this.shockMeshs)}},{key:"show",value:function(){this.shockMeshs&&this.threelayer.addMesh(this.shockMeshs)}},{key:"dispose",value:function(){if(this.shockMeshs&&(this.threelayer.removeMesh(this.shockMeshs),this.shockMeshs.object3d.geometry&&this.shockMeshs.object3d.geometry.dispose(),delete this.shockMeshs,this.texture&&this.texture.dispose(),this.material&&(this.material.dispose(),delete this.material)),this.tweens.length>0){for(var t=0;t<this.tweens.length;t++)delete this.tweens[t];this.tweens=[]}if(this.impacts.length>0){for(var e=0;e<this.impacts.length;e++)delete this.impacts[e];this.impacts=[]}this._geom&&(this._geom.dispose(),delete this._geom),this._closeEvent(),this.points=[],this.materialShader&&delete this.materialShader,this.map=null}}]),t}();n("1913"),c.UniformsLib.line={linewidth:{value:1},resolution:{value:new c.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},dashOffset:{value:0},gapSize:{value:1},opacity:{value:1}},c.ShaderLib.line={uniforms:c.UniformsUtils.merge([c.UniformsLib.common,c.UniformsLib.fog,c.UniformsLib.line]),vertexShader:"\n\t\t#include <common>\n\t\t#include <color_pars_vertex>\n\t\t#include <fog_pars_vertex>\n\t\t#include <logdepthbuf_pars_vertex>\n\t\t#include <clipping_planes_pars_vertex>\n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\n\t\tvarying vec2 vUv;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include <logdepthbuf_vertex>\n\t\t\t#include <clipping_planes_vertex>\n\t\t\t#include <fog_vertex>\n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float dashOffset;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\n\t\tvarying float vLineDistance;\n\n\t\t#include <common>\n\t\t#include <color_pars_fragment>\n\t\t#include <fog_pars_fragment>\n\t\t#include <logdepthbuf_pars_fragment>\n\t\t#include <clipping_planes_pars_fragment>\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\t#include <clipping_planes_fragment>\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\tfloat alpha = opacity;\n\n\t\t\t#ifdef ALPHA_TO_COVERAGE\n\n\t\t\t// artifacts appear on some hardware if a derivative is taken within a conditional\n\t\t\tfloat a = vUv.x;\n\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\tfloat len2 = a * a + b * b;\n\t\t\tfloat dlen = fwidth( len2 );\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\talpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );\n\n\t\t\t}\n\n\t\t\t#else\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t}\n\n\t\t\t#endif\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, alpha );\n\n\t\t\t#include <logdepthbuf_fragment>\n\t\t\t#include <color_fragment>\n\n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, alpha );\n\n\t\t\t#include <tonemapping_fragment>\n\t\t\t#include <encodings_fragment>\n\t\t\t#include <fog_fragment>\n\t\t\t#include <premultiplied_alpha_fragment>\n\n\t\t}\n\t\t"};var K=function(t){c.ShaderMaterial.call(this,{type:"LineMaterial",uniforms:c.UniformsUtils.clone(c.ShaderLib.line.uniforms),vertexShader:c.ShaderLib.line.vertexShader,fragmentShader:c.ShaderLib.line.fragmentShader,clipping:!0}),this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(t){this.uniforms.dashOffset.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}},alphaToCoverage:{enumerable:!0,get:function(){return Boolean("ALPHA_TO_COVERAGE"in this.defines)},set:function(t){Boolean(t)!==Boolean("ALPHA_TO_COVERAGE"in this.defines)&&(this.needsUpdate=!0),t?(this.defines.ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(t)};(K.prototype=Object.create(c.ShaderMaterial.prototype)).constructor=K,K.prototype.isLineMaterial=!0;var $=function(){c.InstancedBufferGeometry.call(this),this.type="LineSegmentsGeometry",this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new c.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new c.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))};$.prototype=Object.assign(Object.create(c.InstancedBufferGeometry.prototype),{constructor:$,isLineSegmentsGeometry:!0,applyMatrix4:function(t){var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==e&&(e.applyMatrix4(t),n.applyMatrix4(t),e.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},setPositions:function(t){var e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));var n=new c.InstancedInterleavedBuffer(e,6,1);return this.setAttribute("instanceStart",new c.InterleavedBufferAttribute(n,3,0)),this.setAttribute("instanceEnd",new c.InterleavedBufferAttribute(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this},setColors:function(t){var e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));var n=new c.InstancedInterleavedBuffer(e,6,1);return this.setAttribute("instanceColorStart",new c.InterleavedBufferAttribute(n,3,0)),this.setAttribute("instanceColorEnd",new c.InterleavedBufferAttribute(n,3,3)),this},fromWireframeGeometry:function(t){return this.setPositions(t.attributes.position.array),this},fromEdgesGeometry:function(t){return this.setPositions(t.attributes.position.array),this},fromMesh:function(t){return this.fromWireframeGeometry(new c.WireframeGeometry(t.geometry)),this},fromLineSegments:function(t){var e=t.geometry;if(!e.isGeometry)return e.isBufferGeometry&&this.setPositions(e.attributes.position.array),this;console.error("THREE.LineSegmentsGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.")},computeBoundingBox:function(){var t=new c.Box3;return function(){null===this.boundingBox&&(this.boundingBox=new c.Box3);var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;void 0!==e&&void 0!==n&&(this.boundingBox.setFromBufferAttribute(e),t.setFromBufferAttribute(n),this.boundingBox.union(t))}}(),computeBoundingSphere:function(){var t=new c.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere=new c.Sphere),null===this.boundingBox&&this.computeBoundingBox();var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(void 0!==e&&void 0!==n){var r=this.boundingSphere.center;this.boundingBox.getCenter(r);for(var i=0,o=0,a=e.count;o<a;o++)t.fromBufferAttribute(e,o),i=Math.max(i,r.distanceToSquared(t)),t.fromBufferAttribute(n,o),i=Math.max(i,r.distanceToSquared(t));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}}(),toJSON:function(){},applyMatrix:function(t){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(t)}});var tt=function(){$.call(this),this.type="LineGeometry"};tt.prototype=Object.assign(Object.create($.prototype),{constructor:tt,isLineGeometry:!0,setPositions:function(t){for(var e=t.length-3,n=new Float32Array(2*e),r=0;r<e;r+=3)n[2*r]=t[r],n[2*r+1]=t[r+1],n[2*r+2]=t[r+2],n[2*r+3]=t[r+3],n[2*r+4]=t[r+4],n[2*r+5]=t[r+5];return $.prototype.setPositions.call(this,n),this},setColors:function(t){for(var e=t.length-3,n=new Float32Array(2*e),r=0;r<e;r+=3)n[2*r]=t[r],n[2*r+1]=t[r+1],n[2*r+2]=t[r+2],n[2*r+3]=t[r+3],n[2*r+4]=t[r+4],n[2*r+5]=t[r+5];return $.prototype.setColors.call(this,n),this},fromLine:function(t){var e=t.geometry;if(!e.isGeometry)return e.isBufferGeometry&&this.setPositions(e.attributes.position.array),this;console.error("THREE.LineGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.")},copy:function(){return this}});var et={altitude:0,height:0},nt=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o){var a;Object(r.a)(this,n),t=u.Util.extend({},et,t,{layer:o}),a=e.call(this);var s=t,l=s.width,h=s.height;s.altitude,a._initOptions(t);var f=new c.PlaneBufferGeometry(l,h);return a._createMesh(f,i),a}return n}(C.a),rt=n("257e"),it=function(t,e){void 0===t&&(t=new $),void 0===e&&(e=new K({color:16777215*Math.random()})),c.Mesh.call(this,t,e),this.type="LineSegments2"};it.prototype=Object.assign(Object.create(c.Mesh.prototype),{constructor:it,isLineSegments2:!0,computeLineDistances:function(){var t=new c.Vector3,e=new c.Vector3;return function(){for(var n=this.geometry,r=n.attributes.instanceStart,i=n.attributes.instanceEnd,o=new Float32Array(2*r.count),a=0,s=0,u=r.count;a<u;a++,s+=2)t.fromBufferAttribute(r,a),e.fromBufferAttribute(i,a),o[s]=0===s?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);var l=new c.InstancedInterleavedBuffer(o,2,1);return n.setAttribute("instanceDistanceStart",new c.InterleavedBufferAttribute(l,1,0)),n.setAttribute("instanceDistanceEnd",new c.InterleavedBufferAttribute(l,1,1)),this}}(),raycast:function(){var t=new c.Vector4,e=new c.Vector4,n=new c.Vector4,r=new c.Vector3,i=new c.Matrix4,o=new c.Line3,a=new c.Vector3,s=new c.Box3,u=new c.Sphere,l=new c.Vector4;return function(h,f){null===h.camera&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var d=void 0!==h.params.Line2&&h.params.Line2.threshold||0,p=h.ray,m=h.camera,g=m.projectionMatrix,v=this.matrixWorld,y=this.geometry,_=this.material,x=_.resolution,b=_.linewidth+d,w=y.attributes.instanceStart,M=y.attributes.instanceEnd,S=-m.near,A=2*Math.max(b/x.width,b/x.height);null===y.boundingSphere&&y.computeBoundingSphere(),u.copy(y.boundingSphere).applyMatrix4(v);var C=Math.max(m.near,u.distanceToPoint(p.origin));l.set(0,0,-C,1).applyMatrix4(m.projectionMatrix),l.multiplyScalar(1/l.w),l.applyMatrix4(m.projectionMatrixInverse);var E=.5*Math.abs(A/l.w);if(u.radius+=E,!1!==h.ray.intersectsSphere(u)){null===y.boundingBox&&y.computeBoundingBox(),s.copy(y.boundingBox).applyMatrix4(v);var T=Math.max(m.near,s.distanceToPoint(p.origin));l.set(0,0,-T,1).applyMatrix4(m.projectionMatrix),l.multiplyScalar(1/l.w),l.applyMatrix4(m.projectionMatrixInverse);var I=.5*Math.abs(A/l.w);if(s.max.x+=I,s.max.y+=I,s.max.z+=I,s.min.x-=I,s.min.y-=I,s.min.z-=I,!1!==h.ray.intersectsBox(s)){p.at(1,n),n.w=1,n.applyMatrix4(m.matrixWorldInverse),n.applyMatrix4(g),n.multiplyScalar(1/n.w),n.x*=x.x/2,n.y*=x.y/2,n.z=0,r.copy(n),i.multiplyMatrices(m.matrixWorldInverse,v);for(var L=0,P=w.count;L<P;L++)if(t.fromBufferAttribute(w,L),e.fromBufferAttribute(M,L),t.w=1,e.w=1,t.applyMatrix4(i),e.applyMatrix4(i),!(t.z>S&&e.z>S)){if(t.z>S){const n=t.z-e.z,r=(t.z-S)/n;t.lerp(e,r)}else if(e.z>S){const n=e.z-t.z,r=(e.z-S)/n;e.lerp(t,r)}t.applyMatrix4(g),e.applyMatrix4(g),t.multiplyScalar(1/t.w),e.multiplyScalar(1/e.w),t.x*=x.x/2,t.y*=x.y/2,e.x*=x.x/2,e.y*=x.y/2,o.start.copy(t),o.start.z=0,o.end.copy(e),o.end.z=0;var R=o.closestPointToPointParameter(r,!0);o.at(R,a);var O=c.MathUtils.lerp(t.z,e.z,R),k=O>=-1&&O<=1,B=r.distanceTo(a)<.5*b;if(k&&B){o.start.fromBufferAttribute(w,L),o.end.fromBufferAttribute(M,L),o.start.applyMatrix4(v),o.end.applyMatrix4(v);var D=new c.Vector3,F=new c.Vector3;p.distanceSqToSegment(o.start,o.end,F,D),f.push({point:F,pointOnLine:D,distance:p.origin.distanceTo(F),object:this,face:null,faceIndex:L,uv:null,uv2:null})}}}}}}()});var ot=function(t,e){void 0===t&&(t=new tt),void 0===e&&(e=new K({color:16777215*Math.random()})),it.call(this,t,e),this.type="Line2"};ot.prototype=Object.assign(Object.create(it.prototype),{constructor:ot,isLine2:!0});var at={radius:100,altitude:0},st=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a,s){var c;Object(r.a)(this,n),i=u.Util.extend({},at,i,{layer:s,coordinate:t}),(c=e.call(this))._initOptions(i);var l=i.altitude;c.object3d=new ot(o,a),c.object3d.computeLineDistances(),c.object3d.scale.set(1,1,1),c.object3d.__parent=Object(rt.a)(c);var h=s.distanceToVector3(l,l).x,f=s.coordinateToVector3(t,h);return c.getObject3d().position.copy(f),c}return n}(C.a),ct={radius:100,altitude:0},ut=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),i=u.Util.extend({},ct,i,{layer:a,coordinate:t}),(s=e.call(this))._initOptions(i);var l=i,h=l.altitude,f=l.inradius,d=l.outradius,p=l.start,m=a.distanceToVector3(f,f).x,g=a.distanceToVector3(d,d).x,v=new c.RingBufferGeometry(m,g,14,1,p*Math.PI/180,45*Math.PI/180);s._createMesh(v,o);var y=a.distanceToVector3(h,h).x,_=a.coordinateToVector3(t,y);return s.getObject3d().position.copy(_),s}return n}(C.a),lt={radius:100,altitude:0},ht=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),i=u.Util.extend({},lt,i,{layer:a,coordinate:t}),(s=e.call(this))._initOptions(i);var l=i,h=l.altitude,f=l.radius,d=l.start,p=a.distanceToVector3(f,f).x,m=new c.CircleBufferGeometry(p,128,d*Math.PI/180,45*Math.PI/180);s._createMesh(m,o);var g=a.distanceToVector3(h,h).x,v=a.coordinateToVector3(t,g);return s.getObject3d().position.copy(v),s}return n}(C.a),ft=function(){function t(e,n,i,o){Object(r.a)(this,t),this.tlayer=o,this.map=o.map;var a=o.coordinateToVector3(e,0),s=i.maxdis||15e3,l=i.middis||1e4,h=i.mindis||5e3,f=s/2e3,d=i.fontsize||80,p=4*f,m=1*f,g=o.distanceToVector3(s,s).x;this.global_r=g;var v=o.distanceToVector3(l,l).x,y=o.distanceToVector3(h,h).x,_=(new c.Matrix4).makeTranslation(a.x,a.y,a.z);this.matLine=new K({color:i.color||4227327,linewidth:i.lineWidth||.002,dashed:!1,transparent:!0}),this.matLine.uniforms.opacity.value=i.opacity||.65,this.meshitems=[],this.textures=[],this.lineItems=[],this.psItems=[];var x={type:"label",x_offset:0,y_offset:m,name:"N",degree:0};this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:m,y_offset:m,name:"EN",degree:45},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:m,y_offset:0,name:"E",degree:90},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:m,y_offset:-m,name:"ES",degree:135},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:0,y_offset:-m,name:"S",degree:180},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:-m,y_offset:-m,name:"WS",degree:225},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:-m,y_offset:0,name:"W",degree:270},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:-m,y_offset:m,name:"WN",degree:315},this.createLabelNew(g,d,p,_,x),this.createCircle(g,e),this.createCircle(v,e),this.createCircle(y,e);for(var b=0;b<360;b+=45)this.lineItems.push({x1:0*Math.sin(Math.PI/180*0),y1:0*Math.cos(Math.PI/180*0),z1:0,x2:Math.sin(b*(Math.PI/180))*g,y2:Math.cos(b*(Math.PI/180))*g,z2:0});this.createLine(e);for(var w=0;w<n.length;w++)-1!=n[w].name.indexOf("A")?this.createMinPoly(h,e,n[w].color,this.getDegree(n[w].name),Object.assign(n[w],{type:"poly"})):-1!=n[w].name.indexOf("B")?this.createRing(h,l,e,n[w].color,this.getDegree(n[w].name),Object.assign(n[w],{type:"poly"})):-1!=n[w].name.indexOf("C")&&this.createRing(l,s,e,n[w].color,this.getDegree(n[w].name),Object.assign(n[w],{type:"poly"}));if(o.addMesh(this.meshitems),this.callback=i.callback,this.callback){var M={custom:!0,dy:i.dy||-48,content:"",autoOpenOn:null};this.infoWindow=new u.ui.InfoWindow(M).addTo(this.map)}this._translation=_}return Object(i.a)(t,[{key:"clearInfo",value:function(){this.infoWindow&&this.infoWindow.hide()}},{key:"updateRing",value:function(t,e,n){var r=this,i=this.tlayer.coordinateToVector3([t,e],0),o=(new c.Matrix4).makeTranslation(i.x,i.y,i.z);this.meshitems.forEach((function(t){var e=t.getProperties();if(e&&"label"===e.type){var a=r.getPsVec(e.degree,r.global_r,o);r.psItems.push(a),t.object3d.position.set(a.x+e.x_offset,a.y+e.y_offset,0)}else if(e&&"poly"===e.type){var s=r.getPropertiesByName(e.name,n);if(s){e.color=s.color,e.value=s.value;var u=new c.Color(e.color);t.object3d.material.color=u,t.object3d.material.color.needsUpdate=!0,t.object3d.position.set(i.x,i.y,i.z)}}else t.object3d.position.set(i.x,i.y,i.z)}))}},{key:"dispose",value:function(){var t=this;if(this.infoWindow&&(this.infoWindow.remove(),delete this.infoWindow),this.meshitems){this.tlayer.removeMesh(this.meshitems),this.meshitems.forEach((function(e){var n=e.getProperties();n&&"poly"===n.type&&t.closeClick(e),n&&e.getProperties()})),this.textures.length>0&&(this.textures.forEach((function(t){t.dispose()})),this.textures=[]),this.meshitems.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()}));for(var e=0;e<this.lineItems.length;e++)delete this.lineItems[e];this.lineItems=[];for(var n=0;n<this.psItems.length;n++)delete this.psItems[n];this.psItems=[]}delete this._translation}},{key:"createMinPoly",value:function(t,e,n,r,i){var o=new c.MeshBasicMaterial({color:n,transparent:!0,opacity:.5,depthTest:!1}),a=new ht(e,{radius:t,start:r},o,this.tlayer);a.setProperties(i),this.attachClick(a),this.meshitems.push(a)}},{key:"createRing",value:function(t,e,n,r,i,o){var a=new c.MeshBasicMaterial({color:r,transparent:!0,opacity:.5,depthTest:!1}),s=new ut(n,{inradius:t,outradius:e,start:i},a,this.tlayer);s.setProperties(o),this.meshitems.push(s),this.attachClick(s)}},{key:"closeClick",value:function(t){t.off("click",this._setItemEvent,this)}},{key:"attachClick",value:function(t){t.on("click",this._setItemEvent,this)}},{key:"_setItemEvent",value:function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.callback){t.next=5;break}return n=e.target.getProperties(),t.next=4,this.callback(this.infoWindow,n);case 4:this.infoWindow.show({x:e.coordinate.x,y:e.coordinate.y});case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"getPropertiesByName",value:function(t,e){for(var n=0;n<e.length;n++)if(e[n].name===t)return e[n]}},{key:"getDegree",value:function(t){switch(t){case"A1":case"B1":case"C1":return 45;case"A2":case"B2":case"C2":return 0;case"A8":case"B8":case"C8":return 90;case"A7":case"B7":case"C7":return 135;case"A6":case"B6":case"C6":return 180;case"A5":case"B5":case"C5":return 225;case"A4":case"B4":case"C4":return 270;case"A3":case"B3":case"C3":return 315}}},{key:"createLine",value:function(t){for(var e=[],n=0;n<this.lineItems.length;n++){(e=[]).push(this.lineItems[n].x1,this.lineItems[n].y1,this.lineItems[n].z1),e.push(this.lineItems[n].x2,this.lineItems[n].y2,this.lineItems[n].z2);var r=new tt;r.setPositions(e);var i=new st(t,{interactive:!1},r,this.matLine,this.tlayer);this.meshitems.push(i)}}},{key:"createCircle",value:function(t,e){for(var n=[],r=0;r<=360;r++)n.push(Math.sin(r*(Math.PI/180))*t,Math.cos(r*(Math.PI/180))*t,0);var i=new tt;i.setPositions(n);var o=new st(e,{interactive:!1},i,this.matLine,this.tlayer);this.meshitems.push(o)}},{key:"createLabelNew",value:function(t,e,n,r,i){var o=new nt({interactive:!1,width:n,height:n},this.getTextMaterial(i.name,e,"#fff"),this.tlayer),a=this.getPsVec(i.degree,t,r);o.object3d.position.set(a.x+i.x_offset,a.y+i.y_offset,0),this.psItems.push(a),o.setProperties(i),this.meshitems.push(o)}},{key:"getPsVec",value:function(t,e,n){var r=t*(Math.PI/180),i=new c.Vector3(Math.sin(r)*e,Math.cos(r)*e,0);return i=i.applyMatrix4(n)}},{key:"getTextMaterial",value:function(t,e,n){var r=document.createElement("canvas");r.width=r.height=256;var i=r.getContext("2d");i.fillStyle=n,i.font="".concat(e,"px Aria"),i.textAlign="center",i.textBaseline="middle",i.fillText(t,128,128);var o=new c.Texture(r);return o.needsUpdate=!0,this.textures.push(o),new c.MeshPhongMaterial({map:o,transparent:!0,depthTest:!1})}}]),t}(),dt=(n("25f0"),n("a15b"),n("4c53"),Math.PI/180);function pt(t){return t.getCoordinates().map((function(t){return t.toArray()}))}function mt(t){return t*dt}function gt(t,e){if(!t||!e)return 0;Array.isArray(t)||(t=t.toArray()),Array.isArray(e)||(e=e.toArray());var n=mt(t[1]),r=mt(e[1]),i=n-r,o=mt(t[0])-mt(e[0]);return n=2*Math.asin(Math.sqrt(Math.pow(Math.sin(i/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(o/2),2))),n*=6378137,Math.round(1e5*n)/1e5}function vt(t,e){var n=t.len,r=t.c1,i=t.c2,o=i[0]-r[0],a=i[1]-r[1],s=(i[2]||0)-(r[2]||0),c=e/n;return[r[0]+c*o,r[1]+c*a,(r[2]||0)+c*s]}var yt=n("d30b"),_t=n("4703");function xt(t,e,n){if(void 0===n&&(n={}),!0===n.final)return function(t,e){var n=xt(e,t);return n=(n+180)%360}(t,e);var r=Object(_t.a)(t),i=Object(_t.a)(e),o=Object(yt.a)(r[0]),a=Object(yt.a)(i[0]),s=Object(yt.a)(r[1]),c=Object(yt.a)(i[1]),u=Math.sin(a-o)*Math.cos(c),l=Math.cos(s)*Math.sin(c)-Math.sin(s)*Math.cos(c)*Math.cos(a-o);return Object(yt.c)(Math.atan2(u,l))}var bt=n("77cd"),wt=n.n(bt),Mt={altitude:0,height:0},St=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),o=u.Util.extend({},Mt,o,{layer:a}),s=e.call(this);var l=o,h=l.width,f=l.height,d=l.altitude;s._initOptions(o);var p=new c.PlaneBufferGeometry(h,f);s._createMesh(p,i);var m=a.distanceToVector3(d,d).x,g=a.coordinateToVector3(t,m);return s.getObject3d().position.copy(g),s}return n}(C.a),At=function(){function t(e,n,i){var o=this;Object(r.a)(this,t),this.tlayer=i,this.map=i.map,n.color;var a=void 0!==n.smoothFlag&&!0===n.smoothFlag,s=void 0!==n.lineFlag&&!0===n.lineFlag;this.material=null,this.texture=null,this.curve=null,this.meshs=[],this.pts=[],this.newPts=[],this.arrows=[],this.lines=null,this.coordinates=null,this.positions=null,this.bearings=[],s&&(this.lineMaterial=new K({color:n.lineColor||"red",transparent:!0,linewidth:n.linewidth||4,blending:c.AdditiveBlending})),this.loadTexture().then((function(t){var r=null;if(a?(e.forEach((function(t){var e=i.coordinateToVector3(t);o.pts.push(e)})),o.curve=new c.CatmullRomCurve3(o.pts,!1),o.curve.getPoints(20).forEach((function(t){var e=o.map.pointToCoordinate(t,o.map.getGLZoom());o.newPts.push(e)})),r=new u.LineString(o.newPts)):r=new u.LineString(e),s){var l=i.toFatLine(r,{},o.lineMaterial);o.meshs.push(l),o.tlayer.addMesh(o.meshs)}var h=r.getLength(),f=parseInt(h/30);f=f>10?10:f,o.ArrowNum=f;var d=1/o.ArrowNum;o.addSpan=Math.floor(100*d)/100;for(var p=0;p<o.ArrowNum;p++){var m=new St(e[0],t,{width:n.width||.2,height:n.height||.1},o.tlayer);m.object3d.renderOrder=n.arrowOrder||1,o.arrows.push(m)}o.tlayer.addMesh(o.arrows),o.lines=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;e=Math.max(e,1),Array.isArray(t)||(t=pt(t));for(var n=t.length,r=[],i=0,o=0;o<n-1;o++){var a=gt(t[o],t[o+1]),s=Math.floor(a);r.push({c1:t[o],len:s,c2:t[o+1]}),i+=s}if(i<=e){var c=r.map((function(t){return[t.c1,t.c2]}));return c}if(1===r.length&&r[0].len<=e)return[[r[0].c1,r[0].c2]];for(var u,l=r.length,h=r[0],f=0,d=0,p=[],m=[h.c1];f<l;){var g=r[f],v=g.len,y=g.c2;if((d+=v)<e&&(m.push(y),f===l-1&&p.push(m),f++),d==e&&(m.push(y),d=0,p.push(m),m=[y],f++),d>e){var _=v-d+e;u=vt(r[f],_),m.push(u),p.push(m),d=0,r[f].c1=u,r[f].len=v-_,(m=[]).push(u)}}return p}(r,1);var g=o.lines[0][0],v=o.tlayer.coordinateToVector3(g);o.coordinates=[g],o.positions=[v],o.lines.forEach((function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.join(",").toString()!==o.coordinates[o.coordinates.length-1].join(",").toString()){o.coordinates.push(n);var r=o.tlayer.coordinateToVector3(n);r.z=.02,o.positions.push(r)}}}));for(var y=0;y<o.coordinates.length-1;y++){var _=o.coordinates[y],x=o.coordinates[y+1],b=xt(wt()(_),wt()(x));o.bearings.push((180-b)*Math.PI/180)}}))}return Object(i.a)(t,[{key:"loadTexture",value:function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.promiseToDoSomething();case 2:return e=t.sent,this.texture=new c.CanvasTexture(e.canvas),this.material=new c.MeshBasicMaterial({map:this.texture,side:c.DoubleSide,depthWrite:!1,depthTest:!1}),t.abrupt("return",this.material);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"promiseToDoSomething",value:function(){return new Promise((function(t){var e=document.createElement("canvas").getContext("2d");e.canvas.width=64,e.canvas.height=64,e.translate(29,32),e.rotate(.5*Math.PI),e.fillStyle="rgb(0,255,255)",e.textAlign="center",e.textBaseline="middle",e.font="48px sans-serif",e.fillText("➡︎",0,0),setTimeout((function(){return t(e)}),4)}))}},{key:"naimationFunc",value:function(){if(this.coordinates)for(var t=1e-4*performance.now(),e=0;e<this.ArrowNum;e++){var n=(t+this.addSpan*e)%1,r=Math.floor(n*this.coordinates.length);this.arrows[e].getObject3d().position.copy(this.positions[r]);var i=this.bearings[r];null!=i&&(this.arrows[e].getObject3d().rotation.z=i)}}},{key:"dispose",value:function(){this.meshs&&(this.tlayer.removeMesh(this.meshs),this.meshs.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose()}))),this.arrows&&(this.tlayer.removeMesh(this.arrows),this.arrows.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose()}))),this.material&&this.material.dispose(),this.texture&&this.texture.dispose(),this.curve&&delete this.curve;for(var t=0;t<this.pts.length;t++)delete this.pts[t];this.pts=[],this.newPts=[];for(var e=0;e<this.lines.length;e++)delete this.lines[e];this.lines=[],this.coordinates=[],this.positions=[],this.bearings=[]}}]),t}(),Ct=function(){function t(e,n,i,o){var a=this;Object(r.a)(this,t),this.tlayer=i,this.map=i.map,this.layerP=o;var s=i.coordinateToVector3(e,0),u=n.distince||15e3,l=u/2,h=u/2e3,f=n.fontsize||80,d=4*h,p=1*h,m=i.distanceToVector3(u,u).x,g=i.distanceToVector3(l,l).x,v=(new c.Matrix4).makeTranslation(s.x,s.y,s.z);if(this.meshitems=[],this.textures=[],this.lineItems=[],this.psItems=[],this.arrowitems=[],this.matLine=new K({color:n.color||4227327,linewidth:n.lineWidth||.001,dashed:!1,transparent:!0,opacity:n.opacity||1}),this.matLine.uniforms.opacity.value=n.opacity||.65,this.textureLoader=new c.TextureLoader,n.arrowImgPath){var y=n.windSpeed||0,_=n.windDirection||0;this.textureLoader.load(n.arrowImgPath,(function(t){a.textures.push(t),a.arrowMaterial=new c.MeshBasicMaterial({map:t});var n=new nt({interactive:!1,width:2*h,height:2*h},a.arrowMaterial,a.tlayer),r=a.getArrowPs(_,h),o=r.rotation*(Math.PI/180),u=a.getPsVec(_,m,v);a.psItems.push(u),a.psItems.push(r),n.object3d.position.set(u.x,u.y,s.z),n.object3d.rotation.z=o,a.arrowitems.push(n);var l=a.createTexture("".concat(y,"级"),60,"#fff");a.textures.push(l);var x=new nt({interactive:!1,width:d,height:d},a.getArrowTextMaterial(l),a.tlayer);x.object3d.position.set(u.x+r.offx,u.y+r.offy,s.z),a.arrowitems.push(x);var b={type:"label",x_offset:0,y_offset:p,name:"N",degree:0};a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:p,y_offset:p,name:"EN",degree:45},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:p,y_offset:0,name:"E",degree:90},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:p,y_offset:-p,name:"ES",degree:135},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:0,y_offset:-p,name:"S",degree:180},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:-p,y_offset:-p,name:"WS",degree:225},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:-p,y_offset:0,name:"W",degree:270},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:-p,y_offset:p,name:"WN",degree:315},a.createLabelNew(m,f,d,v,b),a.createCircle(m,e),a.createCircle(g,e);for(var w=0;w<360;w+=22.5)a.lineItems.push({x1:0*Math.sin(Math.PI/180*0),y1:0*Math.cos(Math.PI/180*0),z1:0,x2:Math.sin(w*(Math.PI/180))*m,y2:Math.cos(w*(Math.PI/180))*m,z2:0});a.createLine(e),a.tlayer.addMesh(a.arrowitems),i.addMesh(a.meshitems),!1===a.layerP.directionObjVisible&&a.setDirectionVisible(!1)}))}this._translation=v,this._r=m,this._factor=h}return Object(i.a)(t,[{key:"dispose",value:function(){if(this.meshitems){this.tlayer.removeMesh(this.meshitems),this.meshitems.forEach((function(t){t.getProperties()&&t.getProperties()})),this.textures.length>0&&(this.textures.forEach((function(t){t.dispose()})),this.textures=[]),this.meshitems.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()}));for(var t=0;t<this.lineItems.length;t++)delete this.lineItems[t];this.lineItems=[];for(var e=0;e<this.psItems.length;e++)delete this.psItems[e];this.psItems=[]}this.arrowitems&&(this.tlayer.removeMesh(this.arrowitems),this.arrowitems.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()}))),this.textureLoader&&delete this.textureLoader,delete this._translation}},{key:"createLine",value:function(t){for(var e=[],n=0;n<this.lineItems.length;n++){(e=[]).push(this.lineItems[n].x1,this.lineItems[n].y1,this.lineItems[n].z1),e.push(this.lineItems[n].x2,this.lineItems[n].y2,this.lineItems[n].z2);var r=new tt;r.setPositions(e);var i=new st(t,{interactive:!1},r,this.matLine,this.tlayer);this.meshitems.push(i)}}},{key:"updateDirection",value:function(t,e){if(2===this.arrowitems.length){var n=this.arrowitems[0],r=this.arrowitems[1],i=this.createTexture("".concat(e||0,"级"),60,"#fff");r.object3d.material.map=i,this.textures.push(i),r.object3d.material.map.needsUpdate=!0;var o=this.getArrowPs(t,this._factor),a=o.rotation*(Math.PI/180),s=this.getPsVec(t,this._r,this._translation);n.object3d.position.set(s.x,s.y,0),this.psItems.push(s),this.psItems.push(o),n.object3d.position.set(s.x,s.y,0),n.object3d.rotation.z=a,r.object3d.position.set(s.x+o.offx,s.y+o.offy,0)}}},{key:"setDirectionVisible",value:function(t){this.meshitems&&(t?this.tlayer.addMesh(this.meshitems):this.tlayer.removeMesh(this.meshitems)),this.arrowitems&&(t?this.tlayer.addMesh(this.arrowitems):this.tlayer.removeMesh(this.arrowitems))}},{key:"createCircle",value:function(t,e){for(var n=[],r=0;r<=360;r++)n.push(Math.sin(r*(Math.PI/180))*t,Math.cos(r*(Math.PI/180))*t,0);var i=new tt;i.setPositions(n);var o=new st(e,{interactive:!1},i,this.matLine,this.tlayer);this.meshitems.push(o)}},{key:"createLabelNew",value:function(t,e,n,r,i){var o=new nt({interactive:!1,width:n,height:n},this.getTextMaterial(i.name,e,"#fff"),this.tlayer),a=this.getPsVec(i.degree,t,r);o.object3d.position.set(a.x+i.x_offset,a.y+i.y_offset,0),this.psItems.push(a),o.setProperties(i),this.meshitems.push(o)}},{key:"getPsVec",value:function(t,e,n){var r=t*(Math.PI/180),i=new c.Vector3(Math.sin(r)*e,Math.cos(r)*e,0);return i=i.applyMatrix4(n)}},{key:"getTextMaterial",value:function(t,e,n){var r=document.createElement("canvas");r.width=r.height=256;var i=r.getContext("2d");i.fillStyle=n,i.font="".concat(e,"px Aria"),i.textAlign="center",i.textBaseline="middle",i.fillText(t,128,128);var o=new c.Texture(r);return o.needsUpdate=!0,this.textures.push(o),new c.MeshPhongMaterial({map:o,transparent:!0,depthTest:!1})}},{key:"getArrowPs",value:function(t,e){var n=0,r=0,i=0;return t>180?(n=360-t+180,r=2*e,i=0):n=180-t,0==t?(r=0,i=-2*e):180==t?(i=0,i=2*e):t>0&&t<180&&(r=-2*e,i=0),{rotation:n,offx:r,offy:i}}},{key:"createTexture",value:function(t,e,n){var r=document.createElement("canvas");r.width=r.height=256;var i=r.getContext("2d");i.fillStyle=n,i.font="".concat(e,"px Aria"),i.textAlign="center",i.textBaseline="middle",i.fillText(t,128,128);var o=new c.Texture(r);return o.needsUpdate=!0,o}},{key:"getArrowTextMaterial",value:function(t){return new c.MeshPhongMaterial({map:t,transparent:!0,depthTest:!1})}}]),t}(),Et={altitude:0,height:0},Tt=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),i=u.Util.extend({},Et,i,{layer:a}),(s=e.call(this))._initOptions(i);var l=i.altitude;console.log(l),s._createGroup();var h=new c.Sprite(o);h.material.sizeAttenuation=!1;var f=.005/3;h.scale.set(36*f,36*f,1),console.log(36*f/2*200),s.getObject3d().add(h);var d=a.distanceToVector3(l,l).x,p=a.coordinateToVector3(t,d);return s.getObject3d().position.copy(p),s}return n}(C.a),It=function(){function t(e,n,i){var o=this;Object(r.a)(this,t),this.map=i.map,this.threeLayer=i,this.lineStrings=[],this.meshs=[],this.properties=[],this.lineMaterial=new c.LineBasicMaterial({color:n.lineColor||"rgb(0,160,233)"}),this.rfields=null,this.fields=[],this.isToolTip=n.isToolTip,this.isExtrusion=n.isExtrusion,this.oriColor={},this.selectColor=n.selectColor?new c.Color(n.selectColor):null,this.geojson=e,this.iconPath=n.iconPath,this.iconCidName=n.iconCidValue,this.codeFild=void 0!==n.codeField?n.codeField:"name",this.fontConfig=n.fontConfig,n.text&&(this.txtLabel=new u.VectorLayer(u.Util.GUID(),{hitDetect:!1,enableAltitude:!0,zIndex:1001}).addTo(i.map),this.rfields=n.text.match(/\{(.+?)\}/g),this.rfields.forEach((function(t){o.fields.push(t.substring(1,t.length-1))})),this.geoItems=[]),this.textureLoader=new c.TextureLoader,e.forEach((function(t){var e=t.geometry,r=u.GeoJSON.toGeometry(t),a=t.properties;o.oriColor[a[o.codeFild]]||(o.oriColor[a[o.codeFild]]=new c.Color(a.color));var s=new c.MeshPhongMaterial({transparent:!0,opacity:void 0!==a.opacity?a.opacity:1,color:o.oriColor[a[o.codeFild]]}),l=.1;o.isExtrusion&&(l=a.height?200*a.height:.1);var h=i.toExtrudePolygon(r,{height:l,interactive:void 0===n.interactive||n.interactive},s);h.setProperties(t.properties),h.object3d.renderOrder=n.renderOrder||0,o.isToolTip&&h.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),o.meshs.push(h),n.isAddLine&&e.coordinates.forEach((function(e){var n=new u.LineString(e[0]),r=i.toLine(n,{altitude:.1===l?1:l,interactive:!1},o.lineMaterial);r.setProperties(t.properties),o.meshs.push(r),o.lineStrings.push(n)}));var f=r.getCenter();if(o.iconPath&&o.iconCidName&&o.iconCidName===a[o.codeFild]){var d=new u.Marker(f,{properties:{altitude:.1===l?1:l,code:a[o.codeFild]},symbol:{markerFile:o.iconPath,markerWidth:64,markerHeight:64,markerDx:0,markerDy:0,markerOpacity:1}});o.geoItems.push(d),o.txtLabel.addGeometry(d)}n.text&&o.createMark(f,l,a)})),this.clickFunc=n.clickFunc,i.addMesh(this.meshs),this._bindEvent()}return Object(i.a)(t,[{key:"createMark",value:function(t,e,n){var r=null;1===this.fields.length?r=new u.Marker(t,{properties:{name:n[this.fields[0]],altitude:.1===e?1:e,code:n[this.codeFild]},symbol:[{textFaceName:"sans-serif",textName:"{name}",textWeight:"normal",textStyle:"normal",textSize:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].fontSize?this.fontConfig[0].fontSize:12,textFont:null,textFill:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].fontColor?this.fontConfig[0].fontColor:"#fff",textOpacity:1,textWrapWidth:null,textWrapCharacter:"\n",textLineSpacing:0,textDx:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].dx?this.fontConfig[0].dx:20,textDy:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].dy?this.fontConfig[0].dy:0,textHorizontalAlignment:"top",textVerticalAlignment:"middle",textAlign:"center"}]}):2===this.fields.length&&(r=new u.Marker(t,{properties:{name:n[this.fields[0]],index:n[this.fields[1]],altitude:.1===e?1:e,code:n[this.codeFild]},symbol:[{textFaceName:"sans-serif",textName:"{name}",textWeight:"normal",textStyle:"normal",textSize:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].fontSize?this.fontConfig[0].fontSize:12,textFont:null,textFill:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].fontColor?this.fontConfig[0].fontColor:"#fff",textOpacity:1,textWrapWidth:null,textWrapCharacter:"\n",textLineSpacing:0,textDx:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].dx?this.fontConfig[0].dx:20,textDy:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].dy?this.fontConfig[0].dy:0,textHorizontalAlignment:"top",textVerticalAlignment:"middle",textAlign:"center"},{textFaceName:"sans-serif",textName:"{index}",textWeight:"bold",textStyle:"normal",textSize:this.fontConfig&&this.fontConfig[1]&&this.fontConfig[1].fontSize?this.fontConfig[1].fontSize:20,textFont:null,textFill:this.fontConfig&&this.fontConfig[1]&&this.fontConfig[1].fontColor?this.fontConfig[1].fontColor:"#fff",textOpacity:1,textWrapWidth:null,textWrapCharacter:"\n",textLineSpacing:0,textDx:this.fontConfig&&this.fontConfig[1]&&this.fontConfig[1].dx?this.fontConfig[1].dx:20,textDy:this.fontConfig&&this.fontConfig[1]&&this.fontConfig[1].dy?this.fontConfig[1].dy:-20,textHorizontalAlignment:"top",textVerticalAlignment:"middle",textAlign:"center"}]})),r&&(this.geoItems.push(r),this.txtLabel.addGeometry(r))}},{key:"addIcon",value:function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(e,n){var r,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,B.a.addImageProcessImage(this.iconPath);case 2:r=t.sent,i=B.a.generateTextureOne(r,128,128),this.iconMaterial=new c.SpriteMaterial({map:i}),(o=new Tt(e,{altitude:n+=2400},this.iconMaterial,this.threeLayer)).zoomChange=function(){o.getMap()},this.threeLayer.addMesh(o);case 8:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"_bindEvent",value:function(){var t=this;this.meshs.forEach((function(e){"ExtrudePolygon"===e.type&&e.on("click mousemove mouseout",t._setEvent,t)}))}},{key:"_closeEvent",value:function(){var t=this;this.meshs.forEach((function(e){"ExtrudePolygon"===e.type&&e.off("click mousemove mouseout",t._setEvent,t)}))}},{key:"_setEvent",value:function(t){var e=t.target.getProperties();"mousemove"===t.type&&t.target&&(this.isToolTip&&(t.target.getToolTip()._content="".concat(e.name)),this.selectColor&&(t.target.object3d.material.color=this.selectColor,t.target.object3d.material.color.needsUpdate=!0)),"mouseout"===t.type&&t.target&&this.selectColor&&(t.target.object3d.material.color=this.oriColor[e.name],t.target.object3d.material.color.needsUpdate=!0),"click"===t.type&&t.target&&this.clickFunc&&this.clickFunc(e)}},{key:"dispose",value:function(){for(var t in this.threeLayer.removeMesh(this.meshs),this._closeEvent(),this.meshs.forEach((function(t){"ExtrudePolygon"===t.type&&t.removeToolTip(),t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()})),this.lineMaterial&&this.lineMaterial.dispose(),this.selectColor&&delete this.selectColor,this.oriColor)delete this.oriColor[t];if(this.txtLabel&&this.map.removeLayer(this.txtLabel),this.geoItems)for(var e=0;e<this.geoItems.length;e++)delete this.geoItems[e];if(this.geoItems=[],this.geojson)for(var n=0;n<this.geojson.length;n++)delete this.geojson[n]}},{key:"findMesh",value:function(t){for(var e=0;e<this.meshs.length;e++)if("ExtrudePolygon"===this.meshs[e].type&&this.meshs[e].getProperties()[this.codeFild]===t)return this.meshs[e]}},{key:"setOpacity",value:function(t,e){for(var n=0;n<this.meshs.length;n++)"ExtrudePolygon"===this.meshs[n].type&&this.meshs[n].getProperties()[this.codeFild]===t&&(this.meshs[n].object3d.material.opacity=e)}},{key:"update",value:function(t){var e=this;this.geojson.forEach((function(n){for(var r=u.GeoJSON.toGeometry(n),i=n.properties,o=function(n){if(t[n][e.codeFild]===i[e.codeFild]){e.oriColor[i[e.codeFild]]&&(delete e.oriColor[i[e.codeFild]],e.oriColor[i[e.codeFild]]=new c.Color(t[n].color));var o=new c.MeshBasicMaterial({transparent:!0,opacity:i.opacity||1,color:e.oriColor[i[e.codeFild]]}),a=.1;e.isExtrusion&&(a=t[n].height?200*t[n].height:.1);for(var s=e.threeLayer.toExtrudePolygon(r,{height:a},o),u=e.findMesh(t[n][e.codeFild]),l=s.object3d.geometry.attributes.position.array,h=u.object3d.geometry.attributes.position.array,f=0;f<h.length;f++)h[f]=l[f];u.object3d.geometry.attributes.position.needsUpdate=!0,u.object3d.material.color=e.oriColor[i[e.codeFild]],u.object3d.material.color.needsUpdate=!0;var d=e.threeLayer.distanceToVector3(a,a).x;e.meshs.forEach((function(r){"Line"===r.type&&r.getProperties()[e.codeFild]===t[n][e.codeFild]&&(r.object3d.position.z=d)})),s.object3d.geometry&&s.object3d.geometry.dispose(),s.object3d.material&&s.object3d.material.dispose();for(var p=0;p<e.geoItems.length;p++)e.geoItems[p].getProperties().code===t[n][e.codeFild]&&(e.geoItems[p].getProperties().index&&(e.geoItems[p].getProperties().index=t[n].rank),e.geoItems[p].getProperties().altitude=a,e.geoItems[p].updateSymbol({index:"{index}"}));return"break"}},a=0;a<t.length&&"break"!==o(a);a++);}))}}]),t}();function Lt(){var t="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}));return"iep".concat(t,"layer")}n("a4d3"),n("e01a"),n("d28b"),n("06c5"),n("3835"),n("4fad"),n("1bf2"),n("f8c9"),n("e439"),n("60ed");var Pt=function(){function t(e,n){var i=this;Object(r.a)(this,t),this.map=n,this.animationId=null,this.func=[];var o=Lt();this.threeLayer=new C.c(o,{forceRenderOnMoving:!0,forceRenderOnRotating:!0,identifyCountOnEvent:1});var a=function t(){var e,n;i.threeLayer._needsUpdate=!i.threeLayer._needsUpdate,i.threeLayer._needsUpdate&&(null===(e=i.threeLayer)||void 0===e||null===(n=e.getRenderer())||void 0===n||n.clearCanvas(),i.threeLayer.renderScene()),i.func.forEach((function(t){return t()})),J.c(),i.animationId=requestAnimationFrame(t)};this.threeLayer.prepareToDraw=function(t,e,n){var r=new c.DirectionalLight(16777215);r.position.set(0,-10,10).normalize(),e.add(r),a()},this.threeLayer.addTo(n),n.getLayer(o).setZIndex(1e3),this.layerId=o,this.layerName=e,this.dirty=!1,this.polygonObjs=[],this.polylineObjs=[],this.circleObj=null,this.directionObj=null,this.directionObjVisible=!0,this.trips=[],this.ringObj=null,this.shockObj=null,this.initFlag=!1}return Object(i.a)(t,[{key:"getLayerId",value:function(){return this.layerId}},{key:"changeLayerId",value:function(){if(this.threeLayer){var t=Lt();this.threeLayer.setId(t),this.layerId=t}}},{key:"setVisible",value:function(t,e){this.threeLayer&&(!0===t?(this.threeLayer.show(),e&&e()):(this.threeLayer.hide(),e&&e()))}},{key:"prepareToDraw",value:function(){var t=this,e=function e(){var n,r;t.threeLayer._needsUpdate=!t.threeLayer._needsUpdate,t.threeLayer._needsUpdate&&(null===(n=t.threeLayer)||void 0===n||null===(r=n.getRenderer())||void 0===r||r.clearCanvas(),t.threeLayer.renderScene()),t.func.forEach((function(t){return t()})),J.c(),t.animationId=requestAnimationFrame(e)};return new Promise((function(n){t.threeLayer.prepareToDraw=function(t,r,i){var o=new c.DirectionalLight(16777215);o.position.set(0,-10,10).normalize(),r.add(o),e(),n()}}))}},{key:"removeIepLayer",value:function(){this.threeLayer&&this.threeLayer.getMeshes().forEach((function(t){var e;"Points"!==t.type&&"Image"!==t.type||null===(e=t.parent)||void 0===e||e.dispose()})),this.directionObj&&(this.directionObj.dispose(),delete this.directionObj),this.trips.length>0&&(this.func=[],this.trips.forEach((function(t){t.dispose()})),this.trips=[]),this.circleObj&&(this.circleObj.dispose(),delete this.circleObj),this.ringObj&&(this.ringObj.dispose(),delete this.ringObj),this.clearShock(),this.clearPolygon(),this.clearPolyline()}},{key:"getPointObjByName",value:function(t,e){this.threeLayer&&this.threeLayer.getMeshes().forEach((function(n){"Points"===n.type&&n.parent.name===t&&e(n.parent)}))}},{key:"updateDirection",value:function(t,e){this.directionObj&&this.directionObj.updateDirection(t,e)}},{key:"clearDirection",value:function(){this.directionObj&&(this.directionObj.dispose(),delete this.directionObj)}},{key:"setDirectionVisible",value:function(t){this.directionObjVisible=t,this.directionObj&&this.directionObj.setDirectionVisible(t)}},{key:"drawDirection",value:function(t,e,n){var r=this,i=n||{};this.threeLayer.getScene()?(this.directionObj&&(this.directionObj.dispose(),delete this.directionObj),setTimeout((function(){r.directionObj=new Ct([t,e],i,r.threeLayer,r)}),500)):(this.initFlag=!0,this.prepareToDraw().then((function(){r.directionObj||(r.directionObj=new Ct([t,e],i,r.threeLayer,r))})))}},{key:"clearCircle",value:function(){this.circleObj&&(this.circleObj.dispose(),delete this.circleObj)}},{key:"drawCircle",value:function(t,e,n,r){var i=this,o=r||{};this.threeLayer.getScene()?this.circleObj?this.circleObj.update(t,e,n,o):this.circleObj=new Z(t,e,n,o,this.threeLayer):(this.initFlag=!0,this.prepareToDraw().then((function(){i.circleObj?i.circleObj.update(t,e,n,o):i.circleObj=new Z(t,e,n,o,i.threeLayer)})))}},{key:"drawImage",value:function(t,e,n,r,i){var o=this;if(this.threeLayer.getScene()){var a=new I(t,e,n,r,this.threeLayer);i(a)}else this.initFlag=!0,this.prepareToDraw().then((function(){var a=new I(t,e,n,r,o.threeLayer);i(a)}))}},{key:"drawPoint",value:function(t,e,n){var r=this;if(this.threeLayer.getScene()){var i=null;t.length>0?(i=new M.a(t,e,this.threeLayer)).addPoint().then((function(){!1===r.threeLayer.options.visible&&i.hide(),n(i)})):n(i)}else this.initFlag=!0,this.prepareToDraw().then((function(){var i=null;t.length>0?(i=new M.a(t,e,r.threeLayer)).addPoint().then((function(){!1===r.threeLayer.options.visible&&i.hide(),n(i)})):n(i)}))}},{key:"updatePolygonOpacity",value:function(t,e){this.polygonObjs.forEach((function(n){n.setOpacity(t,e)}))}},{key:"clearTrip",value:function(){this.func=[],this.trips.forEach((function(t){t.dispose()})),this.trips=[]}},{key:"drawTrip",value:function(t,e){var n=this,r=e||{};if(this.threeLayer.getScene()){var i=new At(t,r,this.threeLayer);this.trips.push(i),this.func.push((function(){i.naimationFunc()}))}else this.initFlag=!0,this.prepareToDraw().then((function(){var e=new At(t,r,n.threeLayer);n.trips.push(e),n.func.push((function(){e.naimationFunc()}))}))}},{key:"updatePolygon",value:function(t){console.log(t),this.polygonObjs.forEach((function(e){e.update(t)}))}},{key:"clearPolygon",value:function(){for(var t=0;t<this.polygonObjs.length;t++)this.polygonObjs[t].dispose(),delete this.polygonObjs[t];this.polygonObjs=[]}},{key:"drawPolygon",value:function(t,e){var n=this,r=e||{};if(this.threeLayer.getScene()){var i=new It(t,r,this.threeLayer);this.polygonObjs.push(i)}else this.initFlag=!0,this.prepareToDraw().then((function(){var e=new It(t,r,n.threeLayer);n.polygonObjs.push(e)}))}},{key:"clearPolyline",value:function(){for(var t=0;t<this.polylineObjs.length;t++)this.polylineObjs[t].dispose(),delete this.polylineObjs[t];this.polylineObjs=[]}},{key:"drawPolyline",value:function(t,e){var n=this,r=e||{};if(this.threeLayer.getScene()){var i=new Rt(t,r,this.threeLayer);this.polylineObjs.push(i)}else this.initFlag=!0,this.prepareToDraw().then((function(){var e=new Rt(t,r,n.threeLayer);n.polylineObjs.push(e)}))}},{key:"clearRing",value:function(){this.ringObj&&(this.ringObj.dispose(),delete this.ringObj)}},{key:"clearRingInfo",value:function(){this.ringObj&&this.ringObj.clearInfo()}},{key:"updateRing",value:function(t,e,n){this.ringObj&&this.ringObj.updateRing(t,e,n)}},{key:"drawRing",value:function(t,e,n,r){var i=this,o=r||{};this.threeLayer.getScene()?(this.ringObj&&(this.ringObj.dispose(),delete this.ringObj),setTimeout((function(){i.ringObj=new ft([t,e],n,o,i.threeLayer)}),500)):(this.initFlag=!0,this.prepareToDraw().then((function(){i.ringObj||(i.ringObj=new ft([t,e],n,o,i.threeLayer))})))}},{key:"drawShock",value:function(t,e){var n=this;this.threeLayer.getScene()?this.shockObj&&(this.shockObj.dispose(),this.shockObj=null,setTimeout((function(){n.shockObj=new q(t,e||{},n.threeLayer)}),500)):(this.initFlag=!0,this.prepareToDraw().then((function(){n.shockObj=new q(t,e||{},n.threeLayer)})))}},{key:"clearShock",value:function(){this.shockObj&&(J.b(),this.shockObj.dispose(),this.shockObj=null)}}]),t}(),Rt=function(){function t(e,n,i){var o=this;Object(r.a)(this,t),this.map=i.map,this.threeLayer=i,this.meshs=[],this.lineMaterial=new K({color:n.lineColor||"red",transparent:!0,linewidth:n.linewidth||4,blending:c.AdditiveBlending}),e.forEach((function(t){var e=u.GeoJSON.toGeometry(t),r=i.toFatLine(e,{interactive:void 0!==n.interactive&&n.interactive},o.lineMaterial);r.object3d.renderOrder=n.renderOrder||0,o.meshs.push(r)})),i.addMesh(this.meshs)}return Object(i.a)(t,[{key:"dispose",value:function(){this.threeLayer.removeMesh(this.meshs),this.meshs.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()})),this.lineMaterial&&this.lineMaterial.dispose()}}]),t}(),Ot=function(){function t(e){Object(r.a)(this,t),this.map=e,this.windObj=null,this.drawTool=null,this.distanceTool=null,this.trafficLayer=null,this.threeLayers=[]}return Object(i.a)(t,[{key:"isLayerExist",value:function(t){if(0===this.threeLayers.length)return!1;if(void 0===t)return!1;for(var e=0;e<this.threeLayers.length;e++)if(this.threeLayers[e].layerId===t)return!0;return!1}},{key:"getLayer",value:function(t){if(0===this.threeLayers.length){var e=new Pt(t,this.map);return this.threeLayers.push(e),e.layerId}if(void 0===t){for(var n=0;n<this.threeLayers.length;n++)if(!1===this.threeLayers[n].dirty)return this.threeLayers[n].layerId}else for(var r=0;r<this.threeLayers.length;r++)if(this.threeLayers[r].layerName===t)return this.threeLayers[r].layerId;if(!(this.threeLayers.length>=2)){var i=new Pt(t,this.map);return this.threeLayers.push(i),i.layerId}}},{key:"removeAllLayer",value:function(){this.windObj&&(this.windObj.closeWind(),delete this.windObj),this.drawTool&&(this.drawTool.dispose(),delete this.drawTool),this.distanceTool&&(this.distanceTool.dispose(),delete this.distanceTool),this.trafficLayer&&(this.trafficLayer.setMap(null),delete this.trafficLayer);for(var t=0;t<this.threeLayers.length;t++)this.threeLayers[t].removeIepLayer()}},{key:"clearPolygon",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearPolygon()}}},{key:"findLayerById",value:function(t){for(var e=0;e<this.threeLayers.length;e++)if(this.threeLayers[e].layerId==t)return this.threeLayers[e]}},{key:"findLayerByName",value:function(t){for(var e=0;e<this.threeLayers.length;e++)if(this.threeLayers[e].layerName==t)return this.threeLayers[e]}},{key:"setLayerVisible",value:function(t,e,n){if(void 0!==t){var r=this.findLayerByName(t);void 0!==r&&r.setVisible(e,n)}}},{key:"clearLayerById",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&(e.changeLayerId(),e.removeIepLayer())}}},{key:"setLayerDirty",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&(e.dirty=!0)}}},{key:"drawPolygon",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&(!0===r.initFlag&&void 0===r.threeLayer.getScene()?setTimeout((function(){r.drawPolygon(t,e)}),200):r.drawPolygon(t,e))}}},{key:"updatePolygon",value:function(t,e){if(void 0!==e){var n=this.findLayerById(e);void 0!==n&&n.updatePolygon(t)}}},{key:"updatePolygonOpacity",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&r.updatePolygonOpacity(t,e)}}},{key:"clearPolyline",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearPolyline()}}},{key:"drawPolyline",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&(!0===r.initFlag&&void 0===r.threeLayer.getScene()?setTimeout((function(){r.drawPolyline(t,e)}),200):r.drawPolyline(t,e))}}},{key:"clearTrip",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearTrip()}}},{key:"drawTrip",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&r.drawTrip(t,e)}}},{key:"updateRing",value:function(t,e,n,r){if(void 0!==r){var i=this.findLayerById(r);void 0!==i&&i.updateRing(t,e,n)}}},{key:"clearRing",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearRing()}}},{key:"clearRingInfo",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearRingInfo()}}},{key:"drawRing",value:function(t,e,n,r,i){if(void 0!==i){var o=this.findLayerById(i);void 0!==o&&o.drawRing(t,e,n,r)}}},{key:"updateDirection",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&r.updateDirection(t,e)}}},{key:"clearDirection",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearDirection()}}},{key:"setDirectionVisible",value:function(t,e){if(void 0!==e){var n=this.findLayerById(e);void 0!==n&&n.setDirectionVisible(t)}}},{key:"drawDirection",value:function(t,e,n,r){if(void 0!==r){var i=this.findLayerById(r);void 0!==i&&(!0===i.initFlag&&void 0===i.threeLayer.getScene()?setTimeout((function(){i.drawDirection(t,e,n)}),200):i.drawDirection(t,e,n))}}},{key:"clearCircle",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearCircle()}}},{key:"drawCircle",value:function(t,e,n,r,i){if(void 0!==i){var o=this.findLayerById(i);void 0!==o&&o.drawCircle(t,e,n,r)}}},{key:"Traffic",value:function(t){var e=this.map.getBaseLayer();if(e){var n=e.getAMap();n&&(this.trafficLayer||(this.trafficLayer=new AMap.TileLayer.Traffic({zIndex:10})),!0===t?this.trafficLayer.setMap(n):this.trafficLayer.setMap(null))}}},{key:"distance",value:function(t){var e=this;return new Promise((function(n){var r=null;if(t){var i=e.findLayerByName(t);i&&(r=i.threeLayer)}e.distanceTool?(e.distanceTool.enable(),n(e.distanceTool)):(e.distanceTool=new F({},r,e.map),n(e.distanceTool))}))}},{key:"drawGeometry",value:function(t,e,n,r,i){var o=this;return new Promise((function(a){var s=null;if(n){var c=o.findLayerByName(n);c&&(s=c.threeLayer)}"Polygon"!==t&&"Circle"!==t&&a(null),o.drawTool?(o.drawTool.setMode(t,e),a(o.drawTool)):(o.drawTool=new D(t,e,r,i||{},s,o.map,o),a(o.drawTool))}))}},{key:"drawWeatherData",value:function(t,e){var n=this;return new Promise((function(r){var i=null;r(t?i=new k(t,e||{},n.map):i),n.windObj=i}))}},{key:"drawImage",value:function(t,e,n,r,i){var o=this;return new Promise((function(a){void 0===i&&a(null);var s=o.findLayerById(i);void 0===s&&a(null),!0===s.initFlag&&void 0===s.threeLayer.getScene()?setTimeout((function(){s.drawImage(t,e,n,r,a)}),200):s.drawImage(t,e,n,r,a)}))}},{key:"getPointObjByName",value:function(t,e){var n=this;return new Promise((function(r){void 0===t&&r(null);var i=n.findLayerByName(t);void 0===i&&r(null),i.getPointObjByName(e,r)}))}},{key:"drawShock",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&(!0===r.initFlag&&void 0===r.threeLayer.getScene()?setTimeout((function(){r.drawShock(t,e)}),200):r.drawShock(t,e))}}},{key:"clearShock",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearShock()}}},{key:"drawPoint",value:function(t,e,n){var r=this;return new Promise((function(i){void 0===n&&i(null);var o=r.findLayerById(n);void 0===o&&i(null),!0===o.initFlag&&void 0===o.threeLayer.getScene()?setTimeout((function(){o.drawPoint(t,e,i)}),200):o.drawPoint(t,e,i)}))}},{key:"changeAMapStyle",value:function(t){var e;null===(e=this.map.getBaseLayer().getAMap())||void 0===e||e.setMapStyle(t)}},{key:"saveIndexedDb",value:function(){return new Promise((function(t,e){var n=window.indexedDB.open("iep_db");n.onsuccess=function(e){var n=e.target.result;t(n)},n.onerror=function(t){e(t)},n.onupgradeneeded=function(t){var e=t.target.result;if(!e.objectStoreNames.contains("svg_dict")){var n=e.createObjectStore("svg_dict",{keyPath:"code"});n.createIndex("code","code",{unique:!0}),n.createIndex("file","file",{unique:!1})}}}))}},{key:"getType",value:function(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}},{key:"getDbRecord",value:function(t){var e=this,n="string"===this.getType(t)?[t]:t;return new Promise((function(t){e.saveIndexedDb().then((function(e){var r=e.transaction("svg_dict","readwrite").objectStore("svg_dict");Promise.all(n.map((function(t){return new Promise((function(e){var n=r.get(t);n.onsuccess=function(t){e(t.target.result)},n.onerror=function(t){e()}}))}))).then((function(e){t(e)}))}))}))}}]),t}(),kt=function(t){return new Ot(t)};
|
|
112
|
+
var r=n("1fb5"),i=n("9152"),o=n("e3db");function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=f(t,e),t}(t,e,n,r):"string"==typeof e?function(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=s(t,r)).write(e,n);return i!==r&&(t=t.slice(0,i)),t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|d(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?s(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=s(t,e<0?0:0|d(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|d(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return N(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return C(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,a=1,s=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;o<s;o++)if(u(t,o)===u(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+c>s&&(n=s-c),o=n;o>=0;o--){for(var h=!0,f=0;f<c;f++)if(u(t,o+f)!==u(e,f)){h=!1;break}if(h)return o}return-1}function _(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function x(t,e,n,r){return G(N(e,t.length-n),t,n,r)}function b(t,e,n,r){return G(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return b(t,e,n,r)}function M(t,e,n,r){return G(z(e),t,n,r)}function S(t,e,n,r){return G(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function C(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,c,u=t[i],l=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}function E(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function I(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=j(t[o]);return i}function L(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function O(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function k(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(t,e,n,r,o){return o||B(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,o){return o||B(t,0,n,8),i.write(t,e,n,r,52,8),n+8}e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return u(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return h(null,t)},c.allocUnsafeSlow=function(t){return h(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):m.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(r,i),l=t.slice(e,n),h=0;h<s;++h)if(u[h]!==l[h]){o=u[h],a=l[h];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return M(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},c.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):k(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):k(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return D(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return D(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=c.isBuffer(t)?t:N(new c(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function j(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n("c8ba"))},b64b:function(t,e,n){var r=n("23e7"),i=n("7b0b"),o=n("df75");r({target:"Object",stat:!0,forced:n("d039")((function(){o(1)}))},{keys:function(t){return o(i(t))}})},b680:function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("e330"),a=n("5926"),s=n("408a"),c=n("1148"),u=n("d039"),l=i.RangeError,h=i.String,f=Math.floor,d=o(c),p=o("".slice),m=o(1..toFixed),g=function(t,e,n){return 0===e?n:e%2==1?g(t,e-1,n*t):g(t*t,e/2,n)},v=function(t,e,n){for(var r=-1,i=n;++r<6;)i+=e*t[r],t[r]=i%1e7,i=f(i/1e7)},y=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=f(r/e),r=r%e*1e7},_=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=h(t[e]);n=""===n?r:n+d("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:u((function(){return"0.000"!==m(8e-5,3)||"1"!==m(.9,0)||"1.25"!==m(1.255,2)||"1000000000000000128"!==m(0xde0b6b3a7640080,0)}))||!u((function(){m({})}))},{toFixed:function(t){var e,n,r,i,o=s(this),c=a(t),u=[0,0,0,0,0,0],f="",m="0";if(c<0||c>20)throw l("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return h(o);if(o<0&&(f="-",o=-o),o>1e-21)if(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(o*g(2,69,1))-69,n=e<0?o*g(2,-e,1):o/g(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(u,0,n),r=c;r>=7;)v(u,1e7,0),r-=7;for(v(u,g(10,r,1),0),r=e-1;r>=23;)y(u,1<<23),r-=23;y(u,1<<r),v(u,1,1),y(u,2),m=_(u)}else v(u,0,n),v(u,1<<-e,0),m=_(u)+d("0",c);return m=c>0?f+((i=m.length)<=c?"0."+d("0",c-i)+m:p(m,0,i-c)+"."+p(m,i-c)):f+m}})},b693:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAYAAAAx8TU7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0ppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RTM3QjEyRDNBOTZDMTFFNUE2QTA4M0M3MDI4QUVDMTQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RTM3QjEyRDJBOTZDMTFFNUE2QTA4M0M3MDI4QUVDMTQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo3ZmI2MGZkMi1hOTZjLTExZTUtYWU4Yi1kYzQ2ODQxNzA1ZmIiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo3ZmI2MGZkMi1hOTZjLTExZTUtYWU4Yi1kYzQ2ODQxNzA1ZmIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4r2gBAAAAASklEQVR42mL4////HCBmB2IGGAYRIHACiKXRBUHgORBbgwQZ/4Ol4OA3EOcxMaCCf2AJJO1PgNgC2cyjQCyJbNEMIGZDdhJAgAEACP9sQulYHrwAAAAASUVORK5CYII="},b6b7:function(t,e,n){var r=n("ebb5"),i=n("4840"),o=r.TYPED_ARRAY_CONSTRUCTOR,a=r.aTypedArrayConstructor;t.exports=function(t){return a(i(t,t[o]))}},b727:function(t,e,n){var r=n("0366"),i=n("e330"),o=n("44ad"),a=n("7b0b"),s=n("07fa"),c=n("65f0"),u=i([].push),l=function(t){var e=1==t,n=2==t,i=3==t,l=4==t,h=6==t,f=7==t,d=5==t||h;return function(p,m,g,v){for(var y,_,x=a(p),b=o(x),w=r(m,g),M=s(b),S=0,A=v||c,C=e?A(p,M):n||f?A(p,0):void 0;M>S;S++)if((d||S in b)&&(_=w(y=b[S],S,x),t))if(e)C[S]=_;else if(_)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:u(C,y)}else switch(t){case 4:return!1;case 7:u(C,y)}return h?-1:i||l?l:C}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},b770:function(t,e,n){"use strict";(t.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n]);if(r)return r}}},b904:function(t,e,n){t.exports=function(){return n("81a5"),{}}},bb7e:function(t,e,n){"use strict";var r=n("d4ec"),i=n("bee2"),o=(n("d3b7"),n("d81d"),n("fb6a"),n("159b"),n("9767"),n("1913"),n("ac1f"),n("5319"),n("4703")),a=n("d30b"),s=function(t,e,n){void 0===n&&(n={});var r=Object(o.a)(t),i=Object(o.a)(e),s=Object(a.a)(i[1]-r[1]),c=Object(a.a)(i[0]-r[0]),u=Object(a.a)(r[1]),l=Object(a.a)(i[1]),h=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(u)*Math.cos(l);return Object(a.d)(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),n.units)};function c(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],c=e[o][0],u=e[o][1];if(t[1]*(a-c)+s*(c-t[0])+u*(t[0]-a)==0&&(a-t[0])*(c-t[0])<=0&&(s-t[1])*(u-t[1])<=0)return!n;s>t[1]!=u>t[1]&&t[0]<(c-a)*(t[1]-s)/(u-s)+a&&(r=!r)}return r}var u=n("5a89"),l=n("ec60"),h=document.createElement("canvas"),f=function(){function t(){Object(r.a)(this,t),this.type="gisCommon"}return Object(i.a)(t,null,[{key:"getTexture",value:function(t,e,n,r){var i=t.getContext("2d");i.drawImage(e,n,r);var o=new u.Texture(i.getImageData(0,0,t.width,t.height));return o.minFilter=u.LinearFilter,o.generateMipmaps=!1,o.needsUpdate=!0,o}},{key:"getTexture1",value:function(t,e,n,r,i,o){var a=t.getContext("2d");a.drawImage(e,n,r,i,o);var s=new u.Texture(a.getImageData(0,0,t.width,t.height));return s.minFilter=u.LinearFilter,s.generateMipmaps=!1,s.needsUpdate=!0,s}},{key:"addImageProcessImage",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.onload=function(){return e(r)},r.onerror=n,r.setAttribute("src",t)}))}},{key:"addImageProcess",value:function(t){return new Promise((function(e,n){var r=document.createElement("img");r.onload=function(){return e(r)},r.onerror=n,r.setAttribute("src","data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(t))))}))}},{key:"containsCoordinate1",value:function(t,e){var n={type:"Feature",properties:{},geometry:{type:"Point",coordinates:[e.getCenter().x,e.getCenter().y]}};return 1e3*s(n,{type:"Feature",properties:{},geometry:{type:"Point",coordinates:t}},"kilometers")<e.getRadius()}},{key:"containsCoordinate2",value:function(t,e){return function(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=Object(o.a)(t),i=Object(o.b)(e),a=i.type,s=e.bbox,u=i.coordinates;if(s&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,s))return!1;"Polygon"===a&&(u=[u]);for(var l=!1,h=0;h<u.length&&!l;h++)if(c(r,u[h][0],n.ignoreBoundary)){for(var f=!1,d=1;d<u[h].length&&!f;)c(r,u[h][d],!n.ignoreBoundary)&&(f=!0),d++;f||(l=!0)}return l}({type:"Feature",geometry:{type:"Point",coordinates:t}},{type:"Feature",geometry:{type:"Polygon",coordinates:e.geometry.coordinates[0]}})}},{key:"containsCoordinate",value:function(t,e){var n,r;Array.isArray(t)?(n=t[0],r=t[1]):t instanceof l.Coordinate&&(n=t.x,r=t.y);var i=e.xmin,o=e.ymin,a=e.xmax,s=e.ymax;return i<=n&&n<=a&&o<=r&&r<=s}},{key:"isInLevels",value:function(t,e){for(var n=!1,r=0;r<t.rangeArr.length;r+=2){var i=1*t.rangeArr[r],o=1*t.rangeArr[r+1];if(e>i&&e<=o){n=!0;break}}return n}},{key:"getExtent",value:function(t){if(0!==t.length){var e=1/0,n=1/0,r=-1/0,i=-1/0;return 1===t.length?(e=1*t[0].longitude-.5,n=1*t[0].latitude-.5,r=1*t[0].longitude+.5,i=1*t[0].latitude+.5):t.length>1&&t.slice(0,1/0).map((function(t){var o=1*t.longitude,a=1*t.latitude;e=Math.min(e,o),n=Math.min(n,a),r=Math.max(r,o),i=Math.max(i,a)})),{minX:e,minY:n,maxX:r,maxY:i}}}},{key:"vector2Pixel",value:function(t,e,n){var r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}},{key:"generateTextureOne",value:function(t,e,n){h.width=e,h.height=n;var r=h.getContext("2d");r.drawImage(t,0,0,e,n);var i=new u.Texture(r.getImageData(0,0,h.width,h.height));return i.magFilter=u.NearestFilter,i.minFilter=u.NearestFilter,i.generateMipmaps=!1,i.needsUpdate=!0,i}},{key:"generateTexture",value:function(t){var e=[64,128,256,512,1024],n=-1/0;t.forEach((function(t){n=Math.max(n,t.w),Math.max(n,t.h)}));var r=Math.sqrt(t.length),i=parseInt(r);r>i&&(i+=1);for(var o=(r=i)*n+5*r,a=0,s=0;s<e.length;s++){if(o<e[s]){a=e[s];break}a=1024}h.width=h.height=a;for(var c=h.getContext("2d"),l=0,f=0,d=[],p=0;p<r;p++){for(var m=5*(p+1)+p*l,g=0;g<r;g++){var v=5*(g+1)+g*t[f].w;if("img"===t[f].type){var y=(t[f].w-t[f].iw)/2,_=(t[f].h-t[f].ih)/2;c.drawImage(t[f].src,v+y,m+_,t[f].iw,t[f].ih)}else if("txt"===t[f].type)c.fillStyle=t[f].color,"#fff"===t[f].color?(c.font="lighter "+t[f].size+"px Microsoft YaHei",c.fillText(t[f].src,v+t[f].offx,m+t[f].offy),c.strokeStyle=t[f].color,c.strokeText(t[f].src,v+t[f].offx,m+t[f].offy)):(c.font="normal "+t[f].size+"px Microsoft YaHei",c.fillText(t[f].src,v+t[f].offx,m+t[f].offy));else{var x=(t[f].w-t[f].iw)/2,b=(t[f].h-t[f].ih)/2;c.drawImage(t[f].src,v+x,m+b,t[f].iw,t[f].ih)}if(d.push({w:t[f].w,h:t[f].h,u:v/a,v:m/a}),l=Math.max(l,t[f].h),(f+=1)>=t.length)break}if(f>=t.length)break}var w=new u.Texture(c.getImageData(0,0,h.width,h.height));if(w.minFilter=u.LinearFilter,w.generateMipmaps=!1,w.needsUpdate=!0,d.length<100)for(var M=100-d.length,S=0;S<M;S++)d.push({w:0,h:0,u:0,v:0});return{xys:d,texture:w,textureSize:a}}},{key:"setPointEventStatus",value:function(t,e){t&&t.getMeshes().forEach((function(t){"Points"===t.type&&(t.options.interactive=e)}))}},{key:"createTextTexture",value:function(t,e){h.width=h.height=t;var n=h.width/2,r=h.height/2;if(e){var i=0;e.forEach((function(t){var e=h.getContext("2d");e.fillStyle=t.fontcolor,e.font="".concat(t.fontsize,"px Arial"),e.textAlign="center",e.textBaseline="middle",e.fillText(t.txt,n,r+i),i+=t.fontsize}))}var o=new u.Texture(h);return o.minFilter=u.LinearFilter,o.generateMipmaps=!1,o.needsUpdate=!0,o}},{key:"createSimpleShader",value:function(t,e,n){return t.uniforms.texture1={value:e},t.uniforms.size1={value:n},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="\n uniform sampler2D texture1;\n varying float vimgflag;\n varying float vVisible;\n "+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n\n vec2 pUv = gl_PointCoord;\n pUv.y = 1. - pUv.y;\n\n if(vimgflag < 1.0){\n vec4 texColor = texture2D( texture1, pUv );\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n }\n\n if (vVisible < 0.5) discard;\n "),t}}]),t}();e.a=f},bee2:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return i}))},c04e:function(t,e,n){var r=n("da84"),i=n("c65b"),o=n("861d"),a=n("d9b5"),s=n("dc4a"),c=n("485a"),u=n("b622"),l=r.TypeError,h=u("toPrimitive");t.exports=function(t,e){if(!o(t)||a(t))return t;var n,r=s(t,h);if(r){if(void 0===e&&(e="default"),n=i(r,t,e),!o(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},c1ac:function(t,e,n){"use strict";var r=n("ebb5"),i=n("b727").filter,o=n("1448"),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(t){var e=i(a(this),t,arguments.length>1?arguments[1]:void 0);return o(this,e)}))},c274:function(t,e,n){"use strict";var r=n("50bf");function i(){var t={},e=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:i<r&&(r=i),t[i]||(t[i]=[]),t[i].push(o),e++},process:function(){for(var e=r;e<=n;e++)for(var i=t[e],o=0;o<i.length;o++)(0,i[o])()},size:function(){return e}}}t.exports=function(t){var e=(t=t||{}).reporter,n=r.getOption(t,"async",!0),o=r.getOption(t,"auto",!0);o&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var a,s=i(),c=!1;function u(){for(c=!0;s.size();){var t=s;s=i(),t.process()}c=!1}function l(){a=function(t){return function(t){return setTimeout(t,0)}(t)}(u)}return{add:function(t,e){!c&&o&&n&&0===s.size()&&l(),s.add(t,e)},force:function(t){c||(void 0===t&&(t=n),a&&(function(t){clearTimeout(t)}(a),a=null),t?l():u())}}}},c430:function(t,e){t.exports=!1},c60d:function(t,e,n){var r=n("1a2d");t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},c65b:function(t,e){var n=Function.prototype.call;t.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},c6b6:function(t,e,n){var r=n("e330"),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},c6cd:function(t,e,n){var r=n("da84"),i=n("ce4e"),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},c7b2:function(t,e,n){"use strict";n.r(e),n.d(e,"install",(function(){return ie})),n.d(e,"GMap",(function(){return ne}));var r=n("d4ec"),i=n("bee2"),o=(n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("d81d"),n("d3b7"),n("b0c0"),n("1da1")),a=(n("96cf"),n("ac1f"),n("466d"),n("5319"),n("5b81"),n("2ef0")),s=function(){function t(){Object(r.a)(this,t)}return Object(i.a)(t,[{key:"getSvgDict",value:function(t){var e=this;return Object(a.isEmpty)(t)?(console.error("svg javascript file is not null"),!1):new Promise((function(n){var r=[];e.getJSON(t).then((function(t){t.match(/<symbol id=.*?symbol>/g).map((function(t,n){var i=t.match(/id=".*?"/gi),o=t.match(/(?<=viewBox=".*?">).*?(?=<\/symbol>)/gi);r.push({id:i[0].replaceAll('"',"").replace("id=icon-",""),svg:e.createSvg(o[0])})})),n(r)}))}))}},{key:"getJSON",value:function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(e);case 3:return n=t.sent,t.next=6,n.text();case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(0),console.log("Request Failed",t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()},{key:"createSvg",value:function(t){return'<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15737">'.concat(t,"</svg>")}}]),t}(),c=(n("159b"),n("b64b"),n("acb4"),n("5a89")),u=n("ec60"),l={name:"Spin",props:{visible:Boolean},render:function(t,e){var n=arguments[0];return n("div",{class:"sk-chase-box"},[this.visible?null:n("div",{class:"sk-chase-core"},[n("div",{class:"sk-chase"},[n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"}),n("div",{class:"sk-chase-dot"})])]),this.$slots.default])}};n("93b5");var h=function(t,e,n,r,i,o,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}(l,void 0,void 0,!1,null,"c8c2036e",null).exports,f=n("e675"),d=n.n(f),p=(n("8ded"),n("add5")),m=n.n(p),g=n("0ab6"),v=n.n(g),y=n("0e54"),_=n.n(y),x=n("ee7c"),b=n.n(x),w=d.a.createStore(v.a,b.a),M=(d.a.createStore(m.a,b.a),d.a.createStore(_.a,b.a),n("fb6a"),n("3ca3"),n("ddb0"),n("47c9")),S=(n("1276"),n("262e")),A=n("2caf"),C=n("5765"),E={altitude:0,imageWidth:512,imageHeight:512,texture:null},T=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n);var l=i=u.Util.extend({},E,i),h=l.altitude;l.imageHeight,l.imageWidth,t instanceof u.Extent||(t=new u.Extent(t));var f=t,d=f.xmin,p=f.ymin,m=f.xmax,g=f.ymax,v=1/0,y=1/0,_=-1/0,x=-1/0;[[d,p],[d,g],[m,g],[m,p]].forEach((function(t){var e=a.coordinateToVector3(t),n=e.x,r=e.y;v=Math.min(n,v),y=Math.min(r,y),_=Math.max(n,_),x=Math.max(r,x)}));var b=Math.abs(_-v),w=Math.abs(x-y),M=new c.PlaneBufferGeometry(b,w);(s=e.call(this))._initOptions(i),s._createMesh(M,o);var S=a.distanceToVector3(h,h).x,A=a.coordinateToVector3(t.getCenter(),S);return s.getObject3d().position.copy(A),s.parent=null,s.type="Image",s}return n}(C.a),I=function(){function t(e,n,i,o,a){var s=this;Object(r.a)(this,t),this.threelayer=a,this.map=a.map,this.textureLoader=new c.TextureLoader;var l=e.split(","),h=n.split(","),f=parseFloat(l[0]),d=parseFloat(l[1]),p=parseFloat(h[0]),m=parseFloat(h[1]),g=o.maxZoom||11,v=o.renderOrder||0,y=o.opacity||1,_=o.minZoom||3,x=new u.Extent(f,d,p,m);this.textureLoader.load(i,(function(t){var e=new c.MeshBasicMaterial({map:t,transparent:!0,opacity:y}),n=new T(x,{imageWidth:512,imageHeight:512,maxZoom:g,minZoom:_,interactive:void 0!==o.interactive&&o.interactive},e,s.threelayer);n.object3d.renderOrder=v,s.imgMesh=n,s.imgMesh.parent=s,s.m=e,s.texture=t,s.threelayer.addMesh(s.imgMesh),o.opacityItems&&o.opacityItems.length>0&&!isNaN(o.opacityItems[0])&&!isNaN(o.opacityItems[1])&&o.opacityItems[0]>3&&o.opacityItems[0]<=18&&o.opacityItems[1]>=0&&o.opacityItems[1]<=1&&(s.opacityItems=o.opacityItems,s._bindMapEvents(),s._viewChange())}))}return Object(i.a)(t,[{key:"_bindMapEvents",value:function(){this.map.on("viewchange",this._viewChange,this)}},{key:"_viewChange",value:function(){this.opacityItems[0]<=this.map.getZoom()?this.imgMesh.object3d.material.opacity=this.opacityItems[1]:this.imgMesh.object3d.material.opacity=1}},{key:"_closeEvent",value:function(){this.map.off("viewchange",this._viewChange,this)}},{key:"updateImage",value:function(t){var e=this;this.textureLoader.load(t,(function(t){e.texture&&e.texture.dispose(),delete e.texture,t.magFilter=c.NearestFilter,t.minFilter=c.NearestFilter,e.imgMesh.object3d.material.map=t,e.imgMesh.object3d.material.map.needsUpdate=!0,e.texture=t,!1===e.imgMesh.isAdd&&(e.threelayer.addMesh(e.imgMesh),e.opacityItems&&e._bindMapEvents())}))}},{key:"clearImage",value:function(){this.imgMesh&&(this.threelayer.removeMesh(this.imgMesh),this.opacityItems&&this._closeEvent())}},{key:"dispose",value:function(){this.imgMesh&&(this.threelayer.removeMesh(this.imgMesh),this.imgMesh.object3d.geometry&&this.imgMesh.object3d.geometry.dispose(),this.imgMesh.object3d.material&&(this.imgMesh.object3d.material.dispose(),delete this.m)),this.texture&&(this.texture&&this.texture.dispose(),delete this.texture),this.opacityItems&&(this._closeEvent(),delete this.opacityItems),this.threelayer=null,this.textureLoader&&delete this.textureLoader}}]),t}(),L=(n("99af"),n("b680"),n("8a79"),n("65d4")),P={0:.05,1:.05,2:.05,3:.003,4:.003,5:.003,6:.003,7:.003,8:.002,9:.001,10:5e-4,11:3e-4,12:15e-5,13:1e-4,14:5e-5,15:25e-6,16:1e-5,16.99:1e-5,17:5e-6,18:2e-6,19:1e-6,20:5e-7,21:2e-7,22:1e-7},R=Object(a.map)(["南","东南偏南","东南","东南偏东","东","东北偏东","东北","东北偏北","北","西北偏北","西北","西北偏西","西","西南偏西","西南","西南偏南"],(function(t,e){var n=22.5,r=n*e;return{bearing:r,range:[r-n/2,r+n/2],label:t}})),O=function(t,e,n){return t>=e&&t<n},k=function(){function t(e,n,i){var o=this;Object(r.a)(this,t),this.map=i,this.windLayer=this.map.getLayer("windLayer"),this.windLayer?this.windLayer.setData(e):(this.windLayer=new L.a("windLayer",e,{windOptions:{colorScale:["rgba(68,162,255,1)","rgba(110,223,255,1)","rgba(142,228,187,1)","rgba(179,253,163,1)","rgba(213,247,176,1)","rgba(255,252,213,1)","rgba(255,238,159,1)","rgba(252,217,125,1)","rgba(255,182,100,1)","rgba(252,150,75,1)","rgba(250,112,52,1)","rgba(245,64,32,1)","rgba(237,45,28,1)","rgba(220,24,32,1)","rgba(180,0,35,1)"],velocityScale:function(){var t=o.map.getZoom();return P[parseInt(t)]||1/40},frameRate:16,maxAge:60,globalAlpha:.9,paths:3782*i.options.devicePixelRatio}}),this.map.addLayer(this.windLayer)),this.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),this._bindMapEvents()}return Object(i.a)(t,[{key:"_bindMapEvents",value:function(){this.map.on("mousemove",this._onWind,this)}},{key:"_closeEvent",value:function(){this.map.off("mousemove",this._onWind,this)}},{key:"_onWind",value:function(t){var e,n=this.windLayer.field.interpolatedValueAt(t.coordinate.x,t.coordinate.y);if(n){var r=this.vectorToDegrees(n.u,n.v,"bearingCCW"),i=this.vectorToSpeed(n.u,n.v,"m/s");this.toolTip._content="".concat(null===(e=function(t){return Object(a.find)(R,(function(e){return O(t,e.range[0],e.range[1])||O(t-360,e.range[0],e.range[1])}))}(r))||void 0===e?void 0:e.label).concat(this.windLevel(i),"级;速度").concat(i.toFixed(2),"m/s;高度10米")}}},{key:"windLevel",value:function(t){return t<=0?0:t<=.3?1:t<=1.6?2:t<=3.4?3:t<=5.5?4:t<=8?5:t<=10.8?6:t<=13.9?7:t<=17.2?8:t<=20.8?9:t<=24.5?10:t<=28.5?11:12}},{key:"setToolTip",value:function(t,e){this.removeToolTip(),this.toolTip=new u.ui.ToolTip(t,e),this.toolTip.addTo(this.map)}},{key:"removeToolTip",value:function(){var t;this.toolTip&&(null===(t=this.toolTip)||void 0===t||t.remove(),this.toolTip=null)}},{key:"vectorToDegrees",value:function(t,e,n){n.endsWith("CCW")&&(e=e>0?e=-e:Math.abs(e));var r=Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),i=180*Math.atan2(t/r,e/r)/Math.PI+180;return"bearingCW"!==n&&"meteoCCW"!==n||(i+=180)>=360&&(i-=360),i}},{key:"vectorToSpeed",value:function(t,e,n){var r=Math.sqrt(Math.pow(t,2)+Math.pow(e,2));return"k/h"===n?3.6*r:"kt"===n?r/.514:r}},{key:"closeWind",value:function(){this._closeEvent(),this.removeToolTip(),this.map.removeLayer(this.windLayer),delete this.windLayer,this.windLayer=null}}]),t}(),B=n("bb7e"),D=function(){function t(e,n,i,o,a,s,c){if(Object(r.a)(this,t),this.map=s,this.tlayer=a,this.parent=c,this.geometry=null,void 0===i)this.drawTool=new u.DrawTool({mode:e,symbol:{lineColor:o.lineColor||"#E40D56",lineWidth:2,lineDasharray:[5,5],polygonFill:o.polygonFill||"#E40D56",polygonOpacity:.2}}).addTo(this.map).enable(),this._bindEvent(),B.a.setPointEventStatus(a,!1);else{var l={lineColor:o.lineColor||"#1bbc9b",lineWidth:o.lineWidth||1,lineOpacity:o.lineOpacity||1,polygonOpacity:isNaN(o.polygonOpacity)?1:o.polygonOpacity};o.colors?l.polygonFill={type:"linear",places:[0,0,1,1],colorStops:o.colors}:l.polygonFill=o.polygonFill||"#1bbc9b",o.lineDasharray&&(l.lineDasharray=[5,5,5]),"Polygon"===e?this.geometry=new u.MultiPolygon(i,{symbol:l}):"Circle"===e&&(this.geometry=new u.Circle(i,o.radius||1e3,{symbol:l}))}this._drawEnd=n,this.mode=e,this.toolLayer=new u.VectorLayer(u.Util.GUID(),{geometryEvents:!1,hitDetect:!1}).addTo(this.map),this.geometry&&(this.toolLayer.addGeometry(this.geometry),this._drawEnd&&("Circle"===this.mode?this._drawEnd(this.geometry.getCoordinates(),this.geometry.getRadius()):this._drawEnd(this.geometry.getCoordinates()))),this.type="drawTool"}return Object(i.a)(t,[{key:"_bindEvent",value:function(){this.drawTool.on("drawend",this.drawEnd,this)}},{key:"_closeEvent",value:function(){this.drawTool.off("drawend",this.drawEnd,this)}},{key:"drawEnd",value:function(t){this.toolLayer&&this.toolLayer.addGeometry(t.geometry),this._drawEnd&&("Circle"===this.mode?this._drawEnd(t.geometry.getCoordinates(),t.geometry.getRadius()):this._drawEnd(t.geometry.getCoordinates())),this.geometry=t.geometry}},{key:"disableTool",value:function(){this.drawTool.disable(),B.a.setPointEventStatus(this.tlayer,!0)}},{key:"clearGeometry",value:function(){this.toolLayer&&this.toolLayer.clear()}},{key:"setMode",value:function(t,e){B.a.setPointEventStatus(this.tlayer,!1),this._drawEnd&&delete this._drawEnd,this._drawEnd=e,this.drawTool.setMode(t).enable(),this.mode=t}},{key:"startEdit",value:function(){this.disableTool(),this.geometry&&this.geometry.startEdit()}},{key:"endEdit",value:function(t){this.geometry&&(this.geometry.endEdit(),t&&("Circle"===this.mode?t(this.geometry.getCoordinates(),this.geometry.getRadius()):t(this.geometry.getCoordinates())))}},{key:"dispose",value:function(){this.parent&&delete this.parent.geometryTool,this.drawTool&&(this._closeEvent(),delete this.drawTool),this._drawEnd&&delete this._drawEnd,this.geometry&&delete this.geometry,this.map.removeLayer(this.toolLayer),delete this.toolLayer}}]),t}(),F=function(){function t(e,n,i){Object(r.a)(this,t),this.tlayer=n,this.map=i,this.distanceTool=new u.DistanceTool({symbol:{lineColor:"#fff",lineWidth:2},vertexSymbol:{markerType:"ellipse",markerFill:"#1bbc9b",markerLineColor:"#000",markerLineWidth:3,markerWidth:10,markerHeight:10},labelOptions:{textSymbol:{textFaceName:"monospace",textFill:"#fff",textLineSpacing:1,textHorizontalAlignment:"right",textDx:15,markerLineColor:"#b4b3b3",markerFill:"#000"},boxStyle:{padding:[6,2],symbol:{markerType:"square",markerFill:"#000",markerFillOpacity:.9,markerLineColor:"#b4b3b3"}}},clearButtonSymbol:[{markerType:"square",markerFill:"#000",markerLineColor:"#b4b3b3",markerLineWidth:2,markerWidth:15,markerHeight:15,markerDx:20},{markerType:"x",markerWidth:10,markerHeight:10,markerLineColor:"#fff",markerDx:20}],language:"zh-CN"}).addTo(this.map),B.a.setPointEventStatus(n,!1)}return Object(i.a)(t,[{key:"dispose",value:function(){this.distanceTool&&(this.distanceTool.clear(),delete this.distanceTool),this.tlayer=null,this.map=null}},{key:"disable",value:function(){this.distanceTool.disable(),B.a.setPointEventStatus(this.tlayer,!0)}},{key:"enable",value:function(){B.a.setPointEventStatus(this.tlayer,!1),this.distanceTool.enable()}},{key:"clear",value:function(){this.distanceTool.clear()}}]),t}(),U=(n("4e82"),n("25a5")),j=n.n(U),N=n("ad2f"),z={fontSize:20,altitude:0,color:"#fff",text:"hello",weight:0,zoomFilter:!1},G={positionsConvert:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=[],i=0,o=t.length;i<o;i+=3){var a=t[i],s=t[i+1],u=t[i+2];e>0&&(u+=n.distanceToVector3(e,e).x),r.push(new c.Vector3(a,s,u))}return r},vectors2Pixel:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0;t[0]instanceof c.Vector3||(t=G.positionsConvert(t,r,i));var o=t.map((function(t){return G.vector2Pixel(t,e,n)}));return o},vector2Pixel:function(t,e,n){var r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}},H=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o){var a;Object(r.a)(this,n),i=u.Util.extend({},z,i,{layer:o,position:t}),(a=e.call(this))._initOptions(i);var s=i,l=(s.altitude,s.fontSize),h=s.color,f=s.text,d=s.rotation,p=d*(Math.PI/180);a._createGroup();var m=new N.SpriteText2D(f,{align:N.textAlign.center,font:"".concat(2*l,"px Arial"),fillStyle:h,antialias:!1});m.children[0].material.sizeAttenuation=!1,m.children[0].material.rotation=p;var g=.001/3;return m.scale.set(g,g,g),a.getObject3d().add(m),a.getObject3d().name=d,a.getObject3d().position.copy(t),a.textRect={width:a.calTextWidth(f,l)+3*l,height:l+3*l},a._vector=new c.Vector3,a._pixel={x:0,y:0},a}return Object(i.a)(n,[{key:"getTextRect",value:function(){this.getPixel();var t=this._pixel,e=t.x,n=t.y,r=this.textRect,i=r.width,o=r.height;return{minX:e-i/2,minY:n-o/2,maxX:e+i/2,maxY:n+o/2}}},{key:"calTextWidth",value:function(t,e){var n=(t.match(/[\u4e00-\u9fa5]/g)||"").length;return n*e+.5*(t.length-n)*e}},{key:"getPixel",value:function(){var t=this.getMap().getSize(),e=this.getLayer().getCamera(),n=this.getObject3d().position;this._vector.x=n.x,this._vector.y=n.y,this._vector.z=n.z,this._pixel=G.vector2Pixel(this._vector,t,e)}},{key:"identify",value:function(t){var e=this.getTextRect(),n=e.minX,r=e.minY,i=e.maxX,o=e.maxY,a=this.getMap().coordToContainerPoint(t);return a.x>=n&&a.x<=i&&a.y>=r&&a.y<=o}}]),n}(C.a),W={radius:100,altitude:0},V=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),i=u.Util.extend({},W,i,{layer:a,coordinate:t}),(s=e.call(this))._initOptions(i);var l=i,h=l.altitude,f=l.radius,d=a.distanceToVector3(f,f).x,p=new c.CircleBufferGeometry(d,128,0,90*Math.PI/180);s._createMesh(p,o);var m=a.distanceToVector3(h,h).x,g=a.coordinateToVector3(t,m);return s.getObject3d().position.copy(g),s}return n}(C.a),Z=function(){function t(e,n,i,o,a){var s=this;Object(r.a)(this,t),this.threelayer=a,this.map=a.map,this.all_cirles=[],this.rItems={},this.all_texts={},this.all_sectors={},this.textSprites=[],this.rbush=new j.a,this.material=new c.MeshBasicMaterial({color:"#233F75",transparent:!0,opacity:.5,depthTest:!1}),this.vector_circle_layer=this.map.getLayer("vector_circle"),this.vector_circle_layer||(this.vector_circle_layer=new u.VectorLayer("vector_circle",{geometryEvents:!1,hitDetect:!1}).addTo(a.map)),this.sector=null;for(var l=this.threelayer.coordinateToVector3([e,n],0),h=(new c.Matrix4).makeTranslation(l.x,l.y,l.z),f=1e3;f<=1e4;f+=1e3){this.createLine([e,n],f);var d=this.threelayer.distanceToVector3(f,f).x;this.rItems[f]=d,this.all_texts[f]=[]}for(var p=this.vector_circle_layer.getGeometries(),m=0;m<p.length;m++)this.all_cirles.push(p[m]);for(var g=3;g<=360;){for(var v in this.rItems){var y=this.createLabel("".concat(v/1e3,"km"),g,this.rItems[v],h,5,a);this.all_texts[v].push(y)}g+=24}var _=this.createParty(e,n,3e3);this.all_sectors[3e3]=_;var x=this.createParty(e,n,5e3);this.all_sectors[5e3]=x;var b=this.createParty(e,n,1e4);this.all_sectors[1e4]=b,this.vector_circle_layer.clear();for(var w=i/1e3,M=void 0,S=0;S<w;S++){var A=this.all_texts[1e3*(S+1)];A&&A.forEach((function(t){s.textSprites.push(t)})),this.vector_circle_layer.addGeometry(this.all_cirles[S]),S===w-1&&(M=this.all_cirles[S])}if(this.vector_circle_layer.options.visible=!0,this.threelayer.addMesh(this.textSprites),o.rotation){var C=this.all_sectors[i],E=this.calDirection(o.rotation);C.object3d.rotation.z=E*Math.PI/180,this.threelayer.addMesh(C),this.sector=C}this.collides(),this._bindEvent(),o.callback&&o.callback(M)}return Object(i.a)(t,[{key:"update",value:function(t,e,n,r){var i=this;this._closeEvent();var o=this.threelayer.coordinateToVector3([t,e],0),a=(new c.Matrix4).makeTranslation(o.x,o.y,o.z);this.all_cirles.forEach((function(n){n.setCoordinates([t,e])}));for(var s=3,u=0;s<=360;){for(var l in this.rItems){var h=this.getPsVec(s,this.rItems[l],a);this.all_texts[l][u].object3d.position.copy(h)}s+=24,u+=1}for(var f in this.all_sectors)this.all_sectors[f].object3d.position.copy(o);this.threelayer.removeMesh(this.textSprites),this.textSprites=[],this.vector_circle_layer.clear(),this.threelayer.removeMesh(this.sector);for(var d=n/1e3,p=void 0,m=0;m<d;m++){var g=this.all_texts[1e3*(m+1)];g&&g.forEach((function(t){i.textSprites.push(t)})),this.vector_circle_layer.addGeometry(this.all_cirles[m]),m===d-1&&(p=this.all_cirles[m])}if(this.vector_circle_layer.show(),this.threelayer.addMesh(this.textSprites),r.rotation){var v=this.all_sectors[n],y=this.calDirection(r.rotation);v.object3d.rotation.z=y*Math.PI/180,this.threelayer.addMesh(v),this.sector=v}this.collides(),this._bindEvent(),r.callback&&r.callback(p)}},{key:"_bindEvent",value:function(){this.map.on("zooming zoomend moveend animateend",this.circleTextOn,this),this.map.on("rotate",this.circleTextRotationOn,this)}},{key:"_closeEvent",value:function(){this.map.off("zooming zoomend moveend animateend",this.circleTextOn,this),this.map.off("rotate",this.circleTextRotationOn,this)}},{key:"circleTextOn",value:function(){this.textSprites.sort((function(t,e){return e.getOptions().weight-t.getOptions().weight})),this.collides()}},{key:"circleTextRotationOn",value:function(){for(var t=0;t<this.textSprites.length;t++)this.textSprites[t].object3d.children[0].material.rotation=(parseFloat(this.textSprites[t].object3d.name)+this.map.getBearing())*(Math.PI/180);this.textSprites.sort((function(t,e){return e.getOptions().weight-t.getOptions().weight})),this.collides()}},{key:"dispose",value:function(){for(var t in this._closeEvent(),this.all_cirles=[],this.rItems)delete this.rItems[t];for(var e in this.threelayer.removeMesh(this.textSprites),this.sector&&this.threelayer.removeMesh(this.sector),this.rbush.clear(),delete this.rbush,this.textSprites=[],this.all_texts)this.all_texts[e].forEach((function(t){t.object3d.children[0].sprite&&t.object3d.children[0].sprite.geometry&&t.object3d.children[0].sprite.geometry.dispose(),t.object3d.children[0].material&&t.object3d.children[0].material.dispose(),t.object3d.children[0].texture&&t.object3d.children[0].texture.dispose()})),delete this.all_texts[e];for(var n in this.sector=null,this.all_sectors){var r=this.all_sectors[n];r.object3d.geometry&&r.object3d.geometry.dispose(),delete this.all_sectors[n]}this.material&&this.material.dispose(),this.map.removeLayer(this.vector_circle_layer)}},{key:"createLine",value:function(t,e){1e3===e?new u.Circle(t,e,{symbol:{lineColor:"#1bbc9b",lineWidth:1,lineOpacity:1,polygonFill:"#1bbc9b",polygonOpacity:0}}).addTo(this.vector_circle_layer):new u.Circle(t,e,{symbol:{lineColor:"#1bbc9b",lineWidth:1,lineDasharray:[5,5,5],lineOpacity:1,polygonFill:"#1bbc9b",polygonOpacity:0}}).addTo(this.vector_circle_layer)}},{key:"createParty",value:function(t,e,n){return new V([t,e],{radius:n,interactive:!1},this.material,this.threelayer)}},{key:"createLabel",value:function(t,e,n,r,i,o){var a=this.getArrowPs(e,1),s=this.getPsVec(e,n,r),c=new H(s,{text:t,color:"white",fontSize:18,weight:i,interactive:!1,rotation:a.rotation,minZoom:11},o);return c.object3d.renderOrder=3,c}},{key:"collides",value:function(){this.rbush.clear();for(var t=0,e=this.textSprites.length;t<e;t++){var n=this.textSprites[t],r=n.getTextRect();this.rbush.collides(r)?n.hide():(n.show(),this.rbush.insert(r))}}},{key:"getPsVec",value:function(t,e,n){var r=t*(Math.PI/180),i=new c.Vector3(Math.sin(r)*e,Math.cos(r)*e,0);return i=i.applyMatrix4(n)}},{key:"calDirection",value:function(t){return t<=22.5&&t>337.5?45:t<=67.5&&t>22.5?0:t<=112.5&&t>67.5?315:t<=157.5&&t>112.5?270:t<=202.5&&t>157.5?225:t<=247.5&&t>202.5?180:t<=292.5&&t>247.5?135:t<=337.5&&t>292.5?90:0}},{key:"getArrowPs",value:function(t,e){var n=0;return t<=90?n=-t:t>90&&t<=180||t>180&&t<=270?n=180-t:t>270&&t<360&&(n=360-t),{rotation:n}}}]),t}(),Q={altitude:0,height:0},X=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),t=u.Util.extend({},Q,t,{layer:a}),s=e.call(this);var c=t;return c.width,c.height,c.altitude,s._initOptions(t),s._createMesh(i,o),s}return n}(C.a),Y={computeTangents:function(t){t.computeTangents(),console.warn("THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.")},mergeBufferGeometries:function(t,e){for(var n=null!==t[0].index,r=new Set(Object.keys(t[0].attributes)),i=new Set(Object.keys(t[0].morphAttributes)),o={},a={},s=t[0].morphTargetsRelative,u=new c.BufferGeometry,l=0,h=0;h<t.length;++h){var f=t[h],d=0;if(n!==(null!==f.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(var p in f.attributes){if(!r.has(p))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+'. All geometries must have compatible attributes; make sure "'+p+'" attribute exists among all geometries, or in none of them.'),null;void 0===o[p]&&(o[p]=[]),o[p].push(f.attributes[p]),d++}if(d!==r.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". Make sure all geometries have the same number of attributes."),null;if(s!==f.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(var p in f.morphAttributes){if(!i.has(p))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". .morphAttributes must be consistent throughout all geometries."),null;void 0===a[p]&&(a[p]=[]),a[p].push(f.morphAttributes[p])}if(u.userData.mergedUserData=u.userData.mergedUserData||[],u.userData.mergedUserData.push(f.userData),e){var m;if(n)m=f.index.count;else{if(void 0===f.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+h+". The geometry must have either an index or a position attribute"),null;m=f.attributes.position.count}u.addGroup(l,m,h),l+=m}}if(n){var g=0,v=[];for(h=0;h<t.length;++h){for(var y=t[h].index,_=0;_<y.count;++_)v.push(y.getX(_)+g);g+=t[h].attributes.position.count}u.setIndex(v)}for(var p in o){var x=this.mergeBufferAttributes(o[p]);if(!x)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+p+" attribute."),null;u.setAttribute(p,x)}for(var p in a){var b=a[p][0].length;if(0===b)break;for(u.morphAttributes=u.morphAttributes||{},u.morphAttributes[p]=[],h=0;h<b;++h){var w=[];for(_=0;_<a[p].length;++_)w.push(a[p][_][h]);var M=this.mergeBufferAttributes(w);if(!M)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+p+" morphAttribute."),null;u.morphAttributes[p].push(M)}}return u},mergeBufferAttributes:function(t){for(var e,n,r,i=0,o=0;o<t.length;++o){var a=t[o];if(a.isInterleavedBufferAttribute)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported."),null;if(void 0===e&&(e=a.array.constructor),e!==a.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;i+=a.array.length}var s=new e(i),u=0;for(o=0;o<t.length;++o)s.set(t[o].array,u),u+=t[o].array.length;return new c.BufferAttribute(s,n,r)},interleaveAttributes:function(t){for(var e,n=0,r=0,i=0,o=t.length;i<o;++i){var a=t[i];if(void 0===e&&(e=a.array.constructor),e!==a.array.constructor)return console.error("AttributeBuffers of different types cannot be interleaved"),null;n+=a.array.length,r+=a.itemSize}var s=new c.InterleavedBuffer(new e(n),r),u=0,l=[],h=["getX","getY","getZ","getW"],f=["setX","setY","setZ","setW"],d=0;for(o=t.length;d<o;d++){var p=(a=t[d]).itemSize,m=a.count,g=new c.InterleavedBufferAttribute(s,p,u,a.normalized);l.push(g),u+=p;for(var v=0;v<m;v++)for(var y=0;y<p;y++)g[f[y]](v,a[h[y]](v))}return l},estimateBytesUsed:function(t){var e=0;for(var n in t.attributes){var r=t.getAttribute(n);e+=r.count*r.itemSize*r.array.BYTES_PER_ELEMENT}var i=t.getIndex();return e+=i?i.count*i.itemSize*i.array.BYTES_PER_ELEMENT:0},mergeVertices:function(t,e=1e-4){e=Math.max(e,Number.EPSILON);for(var n={},r=t.getIndex(),i=t.getAttribute("position"),o=r?r.count:i.count,a=0,s=Object.keys(t.attributes),u={},l={},h=[],f=["getX","getY","getZ","getW"],d=0,p=s.length;d<p;d++){var m=s[d];u[m]=[];var g=t.morphAttributes[m];g&&(l[m]=new Array(g.length).fill().map(()=>[]))}var v=Math.log10(1/e),y=Math.pow(10,v);for(d=0;d<o;d++){var _=r?r.getX(d):d,x="",b=0;for(p=s.length;b<p;b++){m=s[b];for(var w=t.getAttribute(m),M=w.itemSize,S=0;S<M;S++)x+=~~(w[f[S]](_)*y)+","}if(x in n)h.push(n[x]);else{for(b=0,p=s.length;b<p;b++){m=s[b],w=t.getAttribute(m),g=t.morphAttributes[m],M=w.itemSize;var A=u[m],C=l[m];for(S=0;S<M;S++){var E=f[S];if(A.push(w[E](_)),g)for(var T=0,I=g.length;T<I;T++)C[T].push(g[T][E](_))}}n[x]=a,h.push(a),a++}}const L=t.clone();for(d=0,p=s.length;d<p;d++){m=s[d];var P=t.getAttribute(m),R=new P.array.constructor(u[m]);if(w=new c.BufferAttribute(R,P.itemSize,P.normalized),L.setAttribute(m,w),m in l)for(b=0;b<l[m].length;b++){var O=t.morphAttributes[m][b],k=(R=new O.array.constructor(l[m][b]),new c.BufferAttribute(R,O.itemSize,O.normalized));L.morphAttributes[m][b]=k}}return L.setIndex(h),L},toTrianglesDrawMode:function(t,e){if(e===c.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===c.TriangleFanDrawMode||e===c.TriangleStripDrawMode){var n=t.getIndex();if(null===n){var r=[],i=t.getAttribute("position");if(void 0===i)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t;for(var o=0;o<i.count;o++)r.push(o);t.setIndex(r),n=t.getIndex()}var a=n.count-2,s=[];if(e===c.TriangleFanDrawMode)for(o=1;o<=a;o++)s.push(n.getX(0)),s.push(n.getX(o)),s.push(n.getX(o+1));else for(o=0;o<a;o++)o%2==0?(s.push(n.getX(o)),s.push(n.getX(o+1)),s.push(n.getX(o+2))):(s.push(n.getX(o+2)),s.push(n.getX(o+1)),s.push(n.getX(o)));s.length/3!==a&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var u=t.clone();return u.setIndex(s),u.clearGroups(),u}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),t},computeMorphedAttributes:function(t){if(!0!==t.geometry.isBufferGeometry)return console.error("THREE.BufferGeometryUtils: Geometry is not of type BufferGeometry."),null;var e=new c.Vector3,n=new c.Vector3,r=new c.Vector3,i=new c.Vector3,o=new c.Vector3,a=new c.Vector3,s=new c.Vector3,u=new c.Vector3,l=new c.Vector3;function h(t,c,h,f,d,p,m,g,v){e.fromBufferAttribute(h,p),n.fromBufferAttribute(h,m),r.fromBufferAttribute(h,g);var y=t.morphTargetInfluences;if(c.morphTargets&&f&&y){s.set(0,0,0),u.set(0,0,0),l.set(0,0,0);for(var _=0,x=f.length;_<x;_++){var b=y[_],w=f[_];0!==b&&(i.fromBufferAttribute(w,p),o.fromBufferAttribute(w,m),a.fromBufferAttribute(w,g),d?(s.addScaledVector(i,b),u.addScaledVector(o,b),l.addScaledVector(a,b)):(s.addScaledVector(i.sub(e),b),u.addScaledVector(o.sub(n),b),l.addScaledVector(a.sub(r),b)))}e.add(s),n.add(u),r.add(l)}t.isSkinnedMesh&&(t.boneTransform(p,e),t.boneTransform(m,n),t.boneTransform(g,r)),v[3*p+0]=e.x,v[3*p+1]=e.y,v[3*p+2]=e.z,v[3*m+0]=n.x,v[3*m+1]=n.y,v[3*m+2]=n.z,v[3*g+0]=r.x,v[3*g+1]=r.y,v[3*g+2]=r.z}var f,d,p,m,g,v,y,_,x,b=t.geometry,w=t.material,M=b.index,S=b.attributes.position,A=b.morphAttributes.position,C=b.morphTargetsRelative,E=b.attributes.normal,T=b.morphAttributes.position,I=b.groups,L=b.drawRange,P=new Float32Array(S.count*S.itemSize),R=new Float32Array(E.count*E.itemSize);if(null!==M)if(Array.isArray(w))for(m=0,v=I.length;m<v;m++)for(x=w[(_=I[m]).materialIndex],g=Math.max(_.start,L.start),y=Math.min(_.start+_.count,L.start+L.count);g<y;g+=3)h(t,x,S,A,C,f=M.getX(g),d=M.getX(g+1),p=M.getX(g+2),P),h(t,x,E,T,C,f,d,p,R);else for(m=Math.max(0,L.start),v=Math.min(M.count,L.start+L.count);m<v;m+=3)h(t,w,S,A,C,f=M.getX(m),d=M.getX(m+1),p=M.getX(m+2),P),h(t,w,E,T,C,f,d,p,R);else if(void 0!==S)if(Array.isArray(w))for(m=0,v=I.length;m<v;m++)for(x=w[(_=I[m]).materialIndex],g=Math.max(_.start,L.start),y=Math.min(_.start+_.count,L.start+L.count);g<y;g+=3)h(t,x,S,A,C,f=g,d=g+1,p=g+2,P),h(t,x,E,T,C,f,d,p,R);else for(m=Math.max(0,L.start),v=Math.min(S.count,L.start+L.count);m<v;m+=3)h(t,w,S,A,C,f=m,d=m+1,p=m+2,P),h(t,w,E,T,C,f,d,p,R);return{positionAttribute:S,normalAttribute:E,morphedPositionAttribute:new c.Float32BufferAttribute(P,3),morphedNormalAttribute:new c.Float32BufferAttribute(R,3)}}},J=n("22b5"),q=function(){function t(e,n,i){var o=this;Object(r.a)(this,t);var a=n.width||64,s=e.length>100?100:e.length,u=new c.PlaneBufferGeometry(a,a);this.texture=this._createBackGround(a),this.radius=a/3;var l,h=new c.MeshStandardMaterial({map:this.texture}),f=[];this.impacts=[],this.tweens=[],e.slice(0,s).map((function(t){var e=u.clone(),n=i.coordinateToVector3(t,0),r=(new c.Matrix4).makeTranslation(n.x,n.y,n.z);e.applyMatrix4(r),f.push(e),o.impacts.push({impactPosition:new c.Vector3(0,0,0).applyMatrix4(r),impactMaxRadius:o.radius,impactRatio:1})})),h.onBeforeCompile=function(t){t.uniforms.impacts={value:o.impacts},t.uniforms.impactRadius={value:a/2},t.vertexShader="varying vec3 vPosition;\n"+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <worldpos_vertex>","#include <worldpos_vertex>\n vPosition = transformed.xyz;"),t.fragmentShader="struct impact {\n vec3 impactPosition;\n float impactMaxRadius;\n float impactRatio;\n };\n uniform impact impacts[".concat(s,"];\n uniform float impactRadius;\n varying vec3 vPosition;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("#include <dithering_fragment>","#include <dithering_fragment>\n float finalStep = 0.0;\n for (int i = 0; i < ".concat(s,";i++){\n \n float dist = distance(vPosition, impacts[i].impactPosition);\n //float curRadius = impacts[i].impactMaxRadius * impacts[i].impactRatio;\n float curRadius = impactRadius * impacts[i].impactRatio;\n float sstep = smoothstep(0., curRadius, dist) - smoothstep(curRadius - ( 0.25 * impacts[i].impactRatio ), curRadius, dist);\n sstep *= 1. - impacts[i].impactRatio;\n finalStep += sstep;\n\n }\n finalStep = 1. - clamp(finalStep, 0., 1.);\n\n //vec3 col = mix(vec3(1., 0.5, 0.0625), vec3(1.,0.125, 0.0625), finalStep);\n vec3 col = mix(vec3(1.,0., 0.), vec3(1.,0., 0.), finalStep);\n gl_FragColor = vec4( mix( col, gl_FragColor.rgb, finalStep), diffuseColor.a );")),l=t,o.materialShader=t};var d=Y.mergeBufferGeometries(f),p=new X({interactive:!1},d,h,i);i.addMesh(p),this.map=i.map,this.curscale=this.map.getScale();for(var m=this,g=function(t){o.tweens.push({runTween:function(){new J.a({value:0}).to({value:1},c.Math.randInt(2500,5e3)).delay(c.Math.randInt(500,2e3)).onUpdate((function(e){l&&l.uniforms.impacts.value[t]&&(l.uniforms.impacts.value[t].impactRatio=e.value)})).onComplete((function(){var e;null===(e=m.tweens[t])||void 0===e||e.runTween()})).start()}})},v=0;v<s;v++)g(v);this.tweens.forEach((function(t){t.runTween()})),this.width=a,this.shockMeshs=p,this.threelayer=i,this.points=e,this._geom=u,this._bindMapEvents()}return Object(i.a)(t,[{key:"_bindMapEvents",value:function(){this.map&&this.map.on("zooming zoomend",this._setSizeOn,this)}},{key:"_closeEvent",value:function(){this.map&&this.map.off("zooming zoomend",this._setSizeOn,this)}},{key:"_setSizeOn",value:function(){if(this.materialShader){var t=this.map.getScale()/this.curscale;t=(t=t>1?1:t)<.5?.5:t,this.materialShader.uniforms.impactRadius.value=this.radius*t}}},{key:"_createBackGround",value:function(t){var e=document.createElement("canvas");e.width=e.height=t;var n=e.getContext("2d");n.globalCompositeOperation,n.globalAlpha=0,n.fillRect(0,0,e.width,e.height);var r=new c.Texture(e);return r.needsUpdate=!0,r}},{key:"hide",value:function(){this.shockMeshs&&this.threelayer.removeMesh(this.shockMeshs)}},{key:"show",value:function(){this.shockMeshs&&this.threelayer.addMesh(this.shockMeshs)}},{key:"dispose",value:function(){if(this.shockMeshs&&(this.threelayer.removeMesh(this.shockMeshs),this.shockMeshs.object3d.geometry&&this.shockMeshs.object3d.geometry.dispose(),delete this.shockMeshs,this.texture&&this.texture.dispose(),this.material&&(this.material.dispose(),delete this.material)),this.tweens.length>0){for(var t=0;t<this.tweens.length;t++)delete this.tweens[t];this.tweens=[]}if(this.impacts.length>0){for(var e=0;e<this.impacts.length;e++)delete this.impacts[e];this.impacts=[]}this._geom&&(this._geom.dispose(),delete this._geom),this._closeEvent(),this.points=[],this.materialShader&&delete this.materialShader,this.map=null}}]),t}();n("1913"),c.UniformsLib.line={linewidth:{value:1},resolution:{value:new c.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},dashOffset:{value:0},gapSize:{value:1},opacity:{value:1}},c.ShaderLib.line={uniforms:c.UniformsUtils.merge([c.UniformsLib.common,c.UniformsLib.fog,c.UniformsLib.line]),vertexShader:"\n\t\t#include <common>\n\t\t#include <color_pars_vertex>\n\t\t#include <fog_pars_vertex>\n\t\t#include <logdepthbuf_pars_vertex>\n\t\t#include <clipping_planes_pars_vertex>\n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\n\t\tvarying vec2 vUv;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include <logdepthbuf_vertex>\n\t\t\t#include <clipping_planes_vertex>\n\t\t\t#include <fog_vertex>\n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float dashOffset;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\n\t\tvarying float vLineDistance;\n\n\t\t#include <common>\n\t\t#include <color_pars_fragment>\n\t\t#include <fog_pars_fragment>\n\t\t#include <logdepthbuf_pars_fragment>\n\t\t#include <clipping_planes_pars_fragment>\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\t#include <clipping_planes_fragment>\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\tfloat alpha = opacity;\n\n\t\t\t#ifdef ALPHA_TO_COVERAGE\n\n\t\t\t// artifacts appear on some hardware if a derivative is taken within a conditional\n\t\t\tfloat a = vUv.x;\n\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\tfloat len2 = a * a + b * b;\n\t\t\tfloat dlen = fwidth( len2 );\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\talpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );\n\n\t\t\t}\n\n\t\t\t#else\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t}\n\n\t\t\t#endif\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, alpha );\n\n\t\t\t#include <logdepthbuf_fragment>\n\t\t\t#include <color_fragment>\n\n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, alpha );\n\n\t\t\t#include <tonemapping_fragment>\n\t\t\t#include <encodings_fragment>\n\t\t\t#include <fog_fragment>\n\t\t\t#include <premultiplied_alpha_fragment>\n\n\t\t}\n\t\t"};var K=function(t){c.ShaderMaterial.call(this,{type:"LineMaterial",uniforms:c.UniformsUtils.clone(c.ShaderLib.line.uniforms),vertexShader:c.ShaderLib.line.vertexShader,fragmentShader:c.ShaderLib.line.fragmentShader,clipping:!0}),this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(t){this.uniforms.dashOffset.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}},alphaToCoverage:{enumerable:!0,get:function(){return Boolean("ALPHA_TO_COVERAGE"in this.defines)},set:function(t){Boolean(t)!==Boolean("ALPHA_TO_COVERAGE"in this.defines)&&(this.needsUpdate=!0),t?(this.defines.ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(t)};(K.prototype=Object.create(c.ShaderMaterial.prototype)).constructor=K,K.prototype.isLineMaterial=!0;var $=function(){c.InstancedBufferGeometry.call(this),this.type="LineSegmentsGeometry",this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new c.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new c.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))};$.prototype=Object.assign(Object.create(c.InstancedBufferGeometry.prototype),{constructor:$,isLineSegmentsGeometry:!0,applyMatrix4:function(t){var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==e&&(e.applyMatrix4(t),n.applyMatrix4(t),e.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},setPositions:function(t){var e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));var n=new c.InstancedInterleavedBuffer(e,6,1);return this.setAttribute("instanceStart",new c.InterleavedBufferAttribute(n,3,0)),this.setAttribute("instanceEnd",new c.InterleavedBufferAttribute(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this},setColors:function(t){var e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));var n=new c.InstancedInterleavedBuffer(e,6,1);return this.setAttribute("instanceColorStart",new c.InterleavedBufferAttribute(n,3,0)),this.setAttribute("instanceColorEnd",new c.InterleavedBufferAttribute(n,3,3)),this},fromWireframeGeometry:function(t){return this.setPositions(t.attributes.position.array),this},fromEdgesGeometry:function(t){return this.setPositions(t.attributes.position.array),this},fromMesh:function(t){return this.fromWireframeGeometry(new c.WireframeGeometry(t.geometry)),this},fromLineSegments:function(t){var e=t.geometry;if(!e.isGeometry)return e.isBufferGeometry&&this.setPositions(e.attributes.position.array),this;console.error("THREE.LineSegmentsGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.")},computeBoundingBox:function(){var t=new c.Box3;return function(){null===this.boundingBox&&(this.boundingBox=new c.Box3);var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;void 0!==e&&void 0!==n&&(this.boundingBox.setFromBufferAttribute(e),t.setFromBufferAttribute(n),this.boundingBox.union(t))}}(),computeBoundingSphere:function(){var t=new c.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere=new c.Sphere),null===this.boundingBox&&this.computeBoundingBox();var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(void 0!==e&&void 0!==n){var r=this.boundingSphere.center;this.boundingBox.getCenter(r);for(var i=0,o=0,a=e.count;o<a;o++)t.fromBufferAttribute(e,o),i=Math.max(i,r.distanceToSquared(t)),t.fromBufferAttribute(n,o),i=Math.max(i,r.distanceToSquared(t));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}}(),toJSON:function(){},applyMatrix:function(t){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(t)}});var tt=function(){$.call(this),this.type="LineGeometry"};tt.prototype=Object.assign(Object.create($.prototype),{constructor:tt,isLineGeometry:!0,setPositions:function(t){for(var e=t.length-3,n=new Float32Array(2*e),r=0;r<e;r+=3)n[2*r]=t[r],n[2*r+1]=t[r+1],n[2*r+2]=t[r+2],n[2*r+3]=t[r+3],n[2*r+4]=t[r+4],n[2*r+5]=t[r+5];return $.prototype.setPositions.call(this,n),this},setColors:function(t){for(var e=t.length-3,n=new Float32Array(2*e),r=0;r<e;r+=3)n[2*r]=t[r],n[2*r+1]=t[r+1],n[2*r+2]=t[r+2],n[2*r+3]=t[r+3],n[2*r+4]=t[r+4],n[2*r+5]=t[r+5];return $.prototype.setColors.call(this,n),this},fromLine:function(t){var e=t.geometry;if(!e.isGeometry)return e.isBufferGeometry&&this.setPositions(e.attributes.position.array),this;console.error("THREE.LineGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.")},copy:function(){return this}});var et={altitude:0,height:0},nt=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o){var a;Object(r.a)(this,n),t=u.Util.extend({},et,t,{layer:o}),a=e.call(this);var s=t,l=s.width,h=s.height;s.altitude,a._initOptions(t);var f=new c.PlaneBufferGeometry(l,h);return a._createMesh(f,i),a}return n}(C.a),rt=n("257e"),it=function(t,e){void 0===t&&(t=new $),void 0===e&&(e=new K({color:16777215*Math.random()})),c.Mesh.call(this,t,e),this.type="LineSegments2"};it.prototype=Object.assign(Object.create(c.Mesh.prototype),{constructor:it,isLineSegments2:!0,computeLineDistances:function(){var t=new c.Vector3,e=new c.Vector3;return function(){for(var n=this.geometry,r=n.attributes.instanceStart,i=n.attributes.instanceEnd,o=new Float32Array(2*r.count),a=0,s=0,u=r.count;a<u;a++,s+=2)t.fromBufferAttribute(r,a),e.fromBufferAttribute(i,a),o[s]=0===s?0:o[s-1],o[s+1]=o[s]+t.distanceTo(e);var l=new c.InstancedInterleavedBuffer(o,2,1);return n.setAttribute("instanceDistanceStart",new c.InterleavedBufferAttribute(l,1,0)),n.setAttribute("instanceDistanceEnd",new c.InterleavedBufferAttribute(l,1,1)),this}}(),raycast:function(){var t=new c.Vector4,e=new c.Vector4,n=new c.Vector4,r=new c.Vector3,i=new c.Matrix4,o=new c.Line3,a=new c.Vector3,s=new c.Box3,u=new c.Sphere,l=new c.Vector4;return function(h,f){null===h.camera&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var d=void 0!==h.params.Line2&&h.params.Line2.threshold||0,p=h.ray,m=h.camera,g=m.projectionMatrix,v=this.matrixWorld,y=this.geometry,_=this.material,x=_.resolution,b=_.linewidth+d,w=y.attributes.instanceStart,M=y.attributes.instanceEnd,S=-m.near,A=2*Math.max(b/x.width,b/x.height);null===y.boundingSphere&&y.computeBoundingSphere(),u.copy(y.boundingSphere).applyMatrix4(v);var C=Math.max(m.near,u.distanceToPoint(p.origin));l.set(0,0,-C,1).applyMatrix4(m.projectionMatrix),l.multiplyScalar(1/l.w),l.applyMatrix4(m.projectionMatrixInverse);var E=.5*Math.abs(A/l.w);if(u.radius+=E,!1!==h.ray.intersectsSphere(u)){null===y.boundingBox&&y.computeBoundingBox(),s.copy(y.boundingBox).applyMatrix4(v);var T=Math.max(m.near,s.distanceToPoint(p.origin));l.set(0,0,-T,1).applyMatrix4(m.projectionMatrix),l.multiplyScalar(1/l.w),l.applyMatrix4(m.projectionMatrixInverse);var I=.5*Math.abs(A/l.w);if(s.max.x+=I,s.max.y+=I,s.max.z+=I,s.min.x-=I,s.min.y-=I,s.min.z-=I,!1!==h.ray.intersectsBox(s)){p.at(1,n),n.w=1,n.applyMatrix4(m.matrixWorldInverse),n.applyMatrix4(g),n.multiplyScalar(1/n.w),n.x*=x.x/2,n.y*=x.y/2,n.z=0,r.copy(n),i.multiplyMatrices(m.matrixWorldInverse,v);for(var L=0,P=w.count;L<P;L++)if(t.fromBufferAttribute(w,L),e.fromBufferAttribute(M,L),t.w=1,e.w=1,t.applyMatrix4(i),e.applyMatrix4(i),!(t.z>S&&e.z>S)){if(t.z>S){const n=t.z-e.z,r=(t.z-S)/n;t.lerp(e,r)}else if(e.z>S){const n=e.z-t.z,r=(e.z-S)/n;e.lerp(t,r)}t.applyMatrix4(g),e.applyMatrix4(g),t.multiplyScalar(1/t.w),e.multiplyScalar(1/e.w),t.x*=x.x/2,t.y*=x.y/2,e.x*=x.x/2,e.y*=x.y/2,o.start.copy(t),o.start.z=0,o.end.copy(e),o.end.z=0;var R=o.closestPointToPointParameter(r,!0);o.at(R,a);var O=c.MathUtils.lerp(t.z,e.z,R),k=O>=-1&&O<=1,B=r.distanceTo(a)<.5*b;if(k&&B){o.start.fromBufferAttribute(w,L),o.end.fromBufferAttribute(M,L),o.start.applyMatrix4(v),o.end.applyMatrix4(v);var D=new c.Vector3,F=new c.Vector3;p.distanceSqToSegment(o.start,o.end,F,D),f.push({point:F,pointOnLine:D,distance:p.origin.distanceTo(F),object:this,face:null,faceIndex:L,uv:null,uv2:null})}}}}}}()});var ot=function(t,e){void 0===t&&(t=new tt),void 0===e&&(e=new K({color:16777215*Math.random()})),it.call(this,t,e),this.type="Line2"};ot.prototype=Object.assign(Object.create(it.prototype),{constructor:ot,isLine2:!0});var at={radius:100,altitude:0},st=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a,s){var c;Object(r.a)(this,n),i=u.Util.extend({},at,i,{layer:s,coordinate:t}),(c=e.call(this))._initOptions(i);var l=i.altitude;c.object3d=new ot(o,a),c.object3d.computeLineDistances(),c.object3d.scale.set(1,1,1),c.object3d.__parent=Object(rt.a)(c);var h=s.distanceToVector3(l,l).x,f=s.coordinateToVector3(t,h);return c.getObject3d().position.copy(f),c}return n}(C.a),ct={radius:100,altitude:0},ut=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),i=u.Util.extend({},ct,i,{layer:a,coordinate:t}),(s=e.call(this))._initOptions(i);var l=i,h=l.altitude,f=l.inradius,d=l.outradius,p=l.start,m=a.distanceToVector3(f,f).x,g=a.distanceToVector3(d,d).x,v=new c.RingBufferGeometry(m,g,14,1,p*Math.PI/180,45*Math.PI/180);s._createMesh(v,o);var y=a.distanceToVector3(h,h).x,_=a.coordinateToVector3(t,y);return s.getObject3d().position.copy(_),s}return n}(C.a),lt={radius:100,altitude:0},ht=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),i=u.Util.extend({},lt,i,{layer:a,coordinate:t}),(s=e.call(this))._initOptions(i);var l=i,h=l.altitude,f=l.radius,d=l.start,p=a.distanceToVector3(f,f).x,m=new c.CircleBufferGeometry(p,128,d*Math.PI/180,45*Math.PI/180);s._createMesh(m,o);var g=a.distanceToVector3(h,h).x,v=a.coordinateToVector3(t,g);return s.getObject3d().position.copy(v),s}return n}(C.a),ft=function(){function t(e,n,i,o){Object(r.a)(this,t),this.tlayer=o,this.map=o.map;var a=o.coordinateToVector3(e,0),s=i.maxdis||15e3,l=i.middis||1e4,h=i.mindis||5e3,f=s/2e3,d=i.fontsize||80,p=4*f,m=1*f,g=o.distanceToVector3(s,s).x;this.global_r=g;var v=o.distanceToVector3(l,l).x,y=o.distanceToVector3(h,h).x,_=(new c.Matrix4).makeTranslation(a.x,a.y,a.z);this.matLine=new K({color:i.color||4227327,linewidth:i.lineWidth||.002,dashed:!1,transparent:!0}),this.matLine.uniforms.opacity.value=i.opacity||.65,this.meshitems=[],this.textures=[],this.lineItems=[],this.psItems=[];var x={type:"label",x_offset:0,y_offset:m,name:"N",degree:0};this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:m,y_offset:m,name:"EN",degree:45},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:m,y_offset:0,name:"E",degree:90},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:m,y_offset:-m,name:"ES",degree:135},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:0,y_offset:-m,name:"S",degree:180},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:-m,y_offset:-m,name:"WS",degree:225},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:-m,y_offset:0,name:"W",degree:270},this.createLabelNew(g,d,p,_,x),x={type:"label",x_offset:-m,y_offset:m,name:"WN",degree:315},this.createLabelNew(g,d,p,_,x),this.createCircle(g,e),this.createCircle(v,e),this.createCircle(y,e);for(var b=0;b<360;b+=45)this.lineItems.push({x1:0*Math.sin(Math.PI/180*0),y1:0*Math.cos(Math.PI/180*0),z1:0,x2:Math.sin(b*(Math.PI/180))*g,y2:Math.cos(b*(Math.PI/180))*g,z2:0});this.createLine(e);for(var w=0;w<n.length;w++)-1!=n[w].name.indexOf("A")?this.createMinPoly(h,e,n[w].color,this.getDegree(n[w].name),Object.assign(n[w],{type:"poly"})):-1!=n[w].name.indexOf("B")?this.createRing(h,l,e,n[w].color,this.getDegree(n[w].name),Object.assign(n[w],{type:"poly"})):-1!=n[w].name.indexOf("C")&&this.createRing(l,s,e,n[w].color,this.getDegree(n[w].name),Object.assign(n[w],{type:"poly"}));if(o.addMesh(this.meshitems),this.callback=i.callback,this.callback){var M={custom:!0,dy:i.dy||-48,content:"",autoOpenOn:null};this.infoWindow=new u.ui.InfoWindow(M).addTo(this.map)}this._translation=_}return Object(i.a)(t,[{key:"clearInfo",value:function(){this.infoWindow&&this.infoWindow.hide()}},{key:"updateRing",value:function(t,e,n){var r=this,i=this.tlayer.coordinateToVector3([t,e],0),o=(new c.Matrix4).makeTranslation(i.x,i.y,i.z);this.meshitems.forEach((function(t){var e=t.getProperties();if(e&&"label"===e.type){var a=r.getPsVec(e.degree,r.global_r,o);r.psItems.push(a),t.object3d.position.set(a.x+e.x_offset,a.y+e.y_offset,0)}else if(e&&"poly"===e.type){var s=r.getPropertiesByName(e.name,n);if(s){e.color=s.color,e.value=s.value;var u=new c.Color(e.color);t.object3d.material.color=u,t.object3d.material.color.needsUpdate=!0,t.object3d.position.set(i.x,i.y,i.z)}}else t.object3d.position.set(i.x,i.y,i.z)}))}},{key:"dispose",value:function(){var t=this;if(this.infoWindow&&(this.infoWindow.remove(),delete this.infoWindow),this.meshitems){this.tlayer.removeMesh(this.meshitems),this.meshitems.forEach((function(e){var n=e.getProperties();n&&"poly"===n.type&&t.closeClick(e),n&&e.getProperties()})),this.textures.length>0&&(this.textures.forEach((function(t){t.dispose()})),this.textures=[]),this.meshitems.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()}));for(var e=0;e<this.lineItems.length;e++)delete this.lineItems[e];this.lineItems=[];for(var n=0;n<this.psItems.length;n++)delete this.psItems[n];this.psItems=[]}delete this._translation}},{key:"createMinPoly",value:function(t,e,n,r,i){var o=new c.MeshBasicMaterial({color:n,transparent:!0,opacity:.5,depthTest:!1}),a=new ht(e,{radius:t,start:r},o,this.tlayer);a.setProperties(i),this.attachClick(a),this.meshitems.push(a)}},{key:"createRing",value:function(t,e,n,r,i,o){var a=new c.MeshBasicMaterial({color:r,transparent:!0,opacity:.5,depthTest:!1}),s=new ut(n,{inradius:t,outradius:e,start:i},a,this.tlayer);s.setProperties(o),this.meshitems.push(s),this.attachClick(s)}},{key:"closeClick",value:function(t){t.off("click",this._setItemEvent,this)}},{key:"attachClick",value:function(t){t.on("click",this._setItemEvent,this)}},{key:"_setItemEvent",value:function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.callback){t.next=5;break}return n=e.target.getProperties(),t.next=4,this.callback(this.infoWindow,n);case 4:this.infoWindow.show({x:e.coordinate.x,y:e.coordinate.y});case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"getPropertiesByName",value:function(t,e){for(var n=0;n<e.length;n++)if(e[n].name===t)return e[n]}},{key:"getDegree",value:function(t){switch(t){case"A1":case"B1":case"C1":return 45;case"A2":case"B2":case"C2":return 0;case"A8":case"B8":case"C8":return 90;case"A7":case"B7":case"C7":return 135;case"A6":case"B6":case"C6":return 180;case"A5":case"B5":case"C5":return 225;case"A4":case"B4":case"C4":return 270;case"A3":case"B3":case"C3":return 315}}},{key:"createLine",value:function(t){for(var e=[],n=0;n<this.lineItems.length;n++){(e=[]).push(this.lineItems[n].x1,this.lineItems[n].y1,this.lineItems[n].z1),e.push(this.lineItems[n].x2,this.lineItems[n].y2,this.lineItems[n].z2);var r=new tt;r.setPositions(e);var i=new st(t,{interactive:!1},r,this.matLine,this.tlayer);this.meshitems.push(i)}}},{key:"createCircle",value:function(t,e){for(var n=[],r=0;r<=360;r++)n.push(Math.sin(r*(Math.PI/180))*t,Math.cos(r*(Math.PI/180))*t,0);var i=new tt;i.setPositions(n);var o=new st(e,{interactive:!1},i,this.matLine,this.tlayer);this.meshitems.push(o)}},{key:"createLabelNew",value:function(t,e,n,r,i){var o=new nt({interactive:!1,width:n,height:n},this.getTextMaterial(i.name,e,"#fff"),this.tlayer),a=this.getPsVec(i.degree,t,r);o.object3d.position.set(a.x+i.x_offset,a.y+i.y_offset,0),this.psItems.push(a),o.setProperties(i),this.meshitems.push(o)}},{key:"getPsVec",value:function(t,e,n){var r=t*(Math.PI/180),i=new c.Vector3(Math.sin(r)*e,Math.cos(r)*e,0);return i=i.applyMatrix4(n)}},{key:"getTextMaterial",value:function(t,e,n){var r=document.createElement("canvas");r.width=r.height=256;var i=r.getContext("2d");i.fillStyle=n,i.font="".concat(e,"px Aria"),i.textAlign="center",i.textBaseline="middle",i.fillText(t,128,128);var o=new c.Texture(r);return o.needsUpdate=!0,this.textures.push(o),new c.MeshPhongMaterial({map:o,transparent:!0,depthTest:!1})}}]),t}(),dt=(n("25f0"),n("a15b"),n("4c53"),Math.PI/180);function pt(t){return t.getCoordinates().map((function(t){return t.toArray()}))}function mt(t){return t*dt}function gt(t,e){if(!t||!e)return 0;Array.isArray(t)||(t=t.toArray()),Array.isArray(e)||(e=e.toArray());var n=mt(t[1]),r=mt(e[1]),i=n-r,o=mt(t[0])-mt(e[0]);return n=2*Math.asin(Math.sqrt(Math.pow(Math.sin(i/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(o/2),2))),n*=6378137,Math.round(1e5*n)/1e5}function vt(t,e){var n=t.len,r=t.c1,i=t.c2,o=i[0]-r[0],a=i[1]-r[1],s=(i[2]||0)-(r[2]||0),c=e/n;return[r[0]+c*o,r[1]+c*a,(r[2]||0)+c*s]}var yt=n("d30b"),_t=n("4703");function xt(t,e,n){if(void 0===n&&(n={}),!0===n.final)return function(t,e){var n=xt(e,t);return n=(n+180)%360}(t,e);var r=Object(_t.a)(t),i=Object(_t.a)(e),o=Object(yt.a)(r[0]),a=Object(yt.a)(i[0]),s=Object(yt.a)(r[1]),c=Object(yt.a)(i[1]),u=Math.sin(a-o)*Math.cos(c),l=Math.cos(s)*Math.sin(c)-Math.sin(s)*Math.cos(c)*Math.cos(a-o);return Object(yt.c)(Math.atan2(u,l))}var bt=n("77cd"),wt=n.n(bt),Mt={altitude:0,height:0},St=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),o=u.Util.extend({},Mt,o,{layer:a}),s=e.call(this);var l=o,h=l.width,f=l.height,d=l.altitude;s._initOptions(o);var p=new c.PlaneBufferGeometry(h,f);s._createMesh(p,i);var m=a.distanceToVector3(d,d).x,g=a.coordinateToVector3(t,m);return s.getObject3d().position.copy(g),s}return n}(C.a),At=function(){function t(e,n,i){var o=this;Object(r.a)(this,t),this.tlayer=i,this.map=i.map,n.color;var a=void 0!==n.smoothFlag&&!0===n.smoothFlag,s=void 0!==n.lineFlag&&!0===n.lineFlag;this.material=null,this.texture=null,this.curve=null,this.meshs=[],this.pts=[],this.newPts=[],this.arrows=[],this.lines=null,this.coordinates=null,this.positions=null,this.bearings=[],s&&(this.lineMaterial=new K({color:n.lineColor||"red",transparent:!0,linewidth:n.linewidth||4,blending:c.AdditiveBlending})),this.loadTexture().then((function(t){var r=null;if(a?(e.forEach((function(t){var e=i.coordinateToVector3(t);o.pts.push(e)})),o.curve=new c.CatmullRomCurve3(o.pts,!1),o.curve.getPoints(20).forEach((function(t){var e=o.map.pointToCoordinate(t,o.map.getGLZoom());o.newPts.push(e)})),r=new u.LineString(o.newPts)):r=new u.LineString(e),s){var l=i.toFatLine(r,{},o.lineMaterial);o.meshs.push(l),o.tlayer.addMesh(o.meshs)}var h=r.getLength(),f=parseInt(h/30);f=f>10?10:f,o.ArrowNum=f;var d=1/o.ArrowNum;o.addSpan=Math.floor(100*d)/100;for(var p=0;p<o.ArrowNum;p++){var m=new St(e[0],t,{width:n.width||.2,height:n.height||.1},o.tlayer);m.object3d.renderOrder=n.arrowOrder||1,o.arrows.push(m)}o.tlayer.addMesh(o.arrows),o.lines=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;e=Math.max(e,1),Array.isArray(t)||(t=pt(t));for(var n=t.length,r=[],i=0,o=0;o<n-1;o++){var a=gt(t[o],t[o+1]),s=Math.floor(a);r.push({c1:t[o],len:s,c2:t[o+1]}),i+=s}if(i<=e){var c=r.map((function(t){return[t.c1,t.c2]}));return c}if(1===r.length&&r[0].len<=e)return[[r[0].c1,r[0].c2]];for(var u,l=r.length,h=r[0],f=0,d=0,p=[],m=[h.c1];f<l;){var g=r[f],v=g.len,y=g.c2;if((d+=v)<e&&(m.push(y),f===l-1&&p.push(m),f++),d==e&&(m.push(y),d=0,p.push(m),m=[y],f++),d>e){var _=v-d+e;u=vt(r[f],_),m.push(u),p.push(m),d=0,r[f].c1=u,r[f].len=v-_,(m=[]).push(u)}}return p}(r,1);var g=o.lines[0][0],v=o.tlayer.coordinateToVector3(g);o.coordinates=[g],o.positions=[v],o.lines.forEach((function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.join(",").toString()!==o.coordinates[o.coordinates.length-1].join(",").toString()){o.coordinates.push(n);var r=o.tlayer.coordinateToVector3(n);r.z=.02,o.positions.push(r)}}}));for(var y=0;y<o.coordinates.length-1;y++){var _=o.coordinates[y],x=o.coordinates[y+1],b=xt(wt()(_),wt()(x));o.bearings.push((180-b)*Math.PI/180)}}))}return Object(i.a)(t,[{key:"loadTexture",value:function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.promiseToDoSomething();case 2:return e=t.sent,this.texture=new c.CanvasTexture(e.canvas),this.material=new c.MeshBasicMaterial({map:this.texture,side:c.DoubleSide,depthWrite:!1,depthTest:!1}),t.abrupt("return",this.material);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"promiseToDoSomething",value:function(){return new Promise((function(t){var e=document.createElement("canvas").getContext("2d");e.canvas.width=64,e.canvas.height=64,e.translate(29,32),e.rotate(.5*Math.PI),e.fillStyle="rgb(0,255,255)",e.textAlign="center",e.textBaseline="middle",e.font="48px sans-serif",e.fillText("➡︎",0,0),setTimeout((function(){return t(e)}),4)}))}},{key:"naimationFunc",value:function(){if(this.coordinates)for(var t=1e-4*performance.now(),e=0;e<this.ArrowNum;e++){var n=(t+this.addSpan*e)%1,r=Math.floor(n*this.coordinates.length);this.arrows[e].getObject3d().position.copy(this.positions[r]);var i=this.bearings[r];null!=i&&(this.arrows[e].getObject3d().rotation.z=i)}}},{key:"dispose",value:function(){this.meshs&&(this.tlayer.removeMesh(this.meshs),this.meshs.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose()}))),this.arrows&&(this.tlayer.removeMesh(this.arrows),this.arrows.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose()}))),this.material&&this.material.dispose(),this.texture&&this.texture.dispose(),this.curve&&delete this.curve;for(var t=0;t<this.pts.length;t++)delete this.pts[t];this.pts=[],this.newPts=[];for(var e=0;e<this.lines.length;e++)delete this.lines[e];this.lines=[],this.coordinates=[],this.positions=[],this.bearings=[]}}]),t}(),Ct=function(){function t(e,n,i,o){var a=this;Object(r.a)(this,t),this.tlayer=i,this.map=i.map,this.layerP=o;var s=i.coordinateToVector3(e,0),u=n.distince||15e3,l=u/2,h=u/2e3,f=n.fontsize||80,d=4*h,p=1*h,m=i.distanceToVector3(u,u).x,g=i.distanceToVector3(l,l).x,v=(new c.Matrix4).makeTranslation(s.x,s.y,s.z);if(this.meshitems=[],this.textures=[],this.lineItems=[],this.psItems=[],this.arrowitems=[],this.matLine=new K({color:n.color||4227327,linewidth:n.lineWidth||.001,dashed:!1,transparent:!0,opacity:n.opacity||1}),this.matLine.uniforms.opacity.value=n.opacity||.65,this.textureLoader=new c.TextureLoader,n.arrowImgPath){var y=n.windSpeed||0,_=n.windDirection||0;this.textureLoader.load(n.arrowImgPath,(function(t){a.textures.push(t),a.arrowMaterial=new c.MeshBasicMaterial({map:t});var n=new nt({interactive:!1,width:2*h,height:2*h},a.arrowMaterial,a.tlayer),r=a.getArrowPs(_,h),o=r.rotation*(Math.PI/180),u=a.getPsVec(_,m,v);a.psItems.push(u),a.psItems.push(r),n.object3d.position.set(u.x,u.y,s.z),n.object3d.rotation.z=o,a.arrowitems.push(n);var l=a.createTexture("".concat(y,"级"),60,"#fff");a.textures.push(l);var x=new nt({interactive:!1,width:d,height:d},a.getArrowTextMaterial(l),a.tlayer);x.object3d.position.set(u.x+r.offx,u.y+r.offy,s.z),a.arrowitems.push(x);var b={type:"label",x_offset:0,y_offset:p,name:"N",degree:0};a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:p,y_offset:p,name:"EN",degree:45},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:p,y_offset:0,name:"E",degree:90},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:p,y_offset:-p,name:"ES",degree:135},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:0,y_offset:-p,name:"S",degree:180},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:-p,y_offset:-p,name:"WS",degree:225},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:-p,y_offset:0,name:"W",degree:270},a.createLabelNew(m,f,d,v,b),b={type:"label",x_offset:-p,y_offset:p,name:"WN",degree:315},a.createLabelNew(m,f,d,v,b),a.createCircle(m,e),a.createCircle(g,e);for(var w=0;w<360;w+=22.5)a.lineItems.push({x1:0*Math.sin(Math.PI/180*0),y1:0*Math.cos(Math.PI/180*0),z1:0,x2:Math.sin(w*(Math.PI/180))*m,y2:Math.cos(w*(Math.PI/180))*m,z2:0});a.createLine(e),a.tlayer.addMesh(a.arrowitems),i.addMesh(a.meshitems),!1===a.layerP.directionObjVisible&&a.setDirectionVisible(!1)}))}this._translation=v,this._r=m,this._factor=h}return Object(i.a)(t,[{key:"dispose",value:function(){if(this.meshitems){this.tlayer.removeMesh(this.meshitems),this.meshitems.forEach((function(t){t.getProperties()&&t.getProperties()})),this.textures.length>0&&(this.textures.forEach((function(t){t.dispose()})),this.textures=[]),this.meshitems.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()}));for(var t=0;t<this.lineItems.length;t++)delete this.lineItems[t];this.lineItems=[];for(var e=0;e<this.psItems.length;e++)delete this.psItems[e];this.psItems=[]}this.arrowitems&&(this.tlayer.removeMesh(this.arrowitems),this.arrowitems.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()}))),this.textureLoader&&delete this.textureLoader,delete this._translation}},{key:"createLine",value:function(t){for(var e=[],n=0;n<this.lineItems.length;n++){(e=[]).push(this.lineItems[n].x1,this.lineItems[n].y1,this.lineItems[n].z1),e.push(this.lineItems[n].x2,this.lineItems[n].y2,this.lineItems[n].z2);var r=new tt;r.setPositions(e);var i=new st(t,{interactive:!1},r,this.matLine,this.tlayer);this.meshitems.push(i)}}},{key:"updateDirection",value:function(t,e){if(2===this.arrowitems.length){var n=this.arrowitems[0],r=this.arrowitems[1],i=this.createTexture("".concat(e||0,"级"),60,"#fff");r.object3d.material.map=i,this.textures.push(i),r.object3d.material.map.needsUpdate=!0;var o=this.getArrowPs(t,this._factor),a=o.rotation*(Math.PI/180),s=this.getPsVec(t,this._r,this._translation);n.object3d.position.set(s.x,s.y,0),this.psItems.push(s),this.psItems.push(o),n.object3d.position.set(s.x,s.y,0),n.object3d.rotation.z=a,r.object3d.position.set(s.x+o.offx,s.y+o.offy,0)}}},{key:"setDirectionVisible",value:function(t){this.meshitems&&(t?this.tlayer.addMesh(this.meshitems):this.tlayer.removeMesh(this.meshitems)),this.arrowitems&&(t?this.tlayer.addMesh(this.arrowitems):this.tlayer.removeMesh(this.arrowitems))}},{key:"createCircle",value:function(t,e){for(var n=[],r=0;r<=360;r++)n.push(Math.sin(r*(Math.PI/180))*t,Math.cos(r*(Math.PI/180))*t,0);var i=new tt;i.setPositions(n);var o=new st(e,{interactive:!1},i,this.matLine,this.tlayer);this.meshitems.push(o)}},{key:"createLabelNew",value:function(t,e,n,r,i){var o=new nt({interactive:!1,width:n,height:n},this.getTextMaterial(i.name,e,"#fff"),this.tlayer),a=this.getPsVec(i.degree,t,r);o.object3d.position.set(a.x+i.x_offset,a.y+i.y_offset,0),this.psItems.push(a),o.setProperties(i),this.meshitems.push(o)}},{key:"getPsVec",value:function(t,e,n){var r=t*(Math.PI/180),i=new c.Vector3(Math.sin(r)*e,Math.cos(r)*e,0);return i=i.applyMatrix4(n)}},{key:"getTextMaterial",value:function(t,e,n){var r=document.createElement("canvas");r.width=r.height=256;var i=r.getContext("2d");i.fillStyle=n,i.font="".concat(e,"px Aria"),i.textAlign="center",i.textBaseline="middle",i.fillText(t,128,128);var o=new c.Texture(r);return o.needsUpdate=!0,this.textures.push(o),new c.MeshPhongMaterial({map:o,transparent:!0,depthTest:!1})}},{key:"getArrowPs",value:function(t,e){var n=0,r=0,i=0;return t>180?(n=360-t+180,r=2*e,i=0):n=180-t,0==t?(r=0,i=-2*e):180==t?(i=0,i=2*e):t>0&&t<180&&(r=-2*e,i=0),{rotation:n,offx:r,offy:i}}},{key:"createTexture",value:function(t,e,n){var r=document.createElement("canvas");r.width=r.height=256;var i=r.getContext("2d");i.fillStyle=n,i.font="".concat(e,"px Aria"),i.textAlign="center",i.textBaseline="middle",i.fillText(t,128,128);var o=new c.Texture(r);return o.needsUpdate=!0,o}},{key:"getArrowTextMaterial",value:function(t){return new c.MeshPhongMaterial({map:t,transparent:!0,depthTest:!1})}}]),t}(),Et={altitude:0,height:0},Tt=function(t){Object(S.a)(n,t);var e=Object(A.a)(n);function n(t,i,o,a){var s;Object(r.a)(this,n),i=u.Util.extend({},Et,i,{layer:a}),(s=e.call(this))._initOptions(i);var l=i.altitude;console.log(l),s._createGroup();var h=new c.Sprite(o);h.material.sizeAttenuation=!1;var f=.005/3;h.scale.set(36*f,36*f,1),console.log(36*f/2*200),s.getObject3d().add(h);var d=a.distanceToVector3(l,l).x,p=a.coordinateToVector3(t,d);return s.getObject3d().position.copy(p),s}return n}(C.a),It=function(){function t(e,n,i){var o=this;Object(r.a)(this,t),this.map=i.map,this.threeLayer=i,this.lineStrings=[],this.meshs=[],this.properties=[],this.lineMaterial=new c.LineBasicMaterial({color:n.lineColor||"rgb(0,160,233)"}),this.rfields=null,this.fields=[],this.isToolTip=n.isToolTip,this.isExtrusion=n.isExtrusion,this.oriColor={},this.selectColor=n.selectColor?new c.Color(n.selectColor):null,this.geojson=e,this.iconPath=n.iconPath,this.iconCidName=n.iconCidValue,this.codeFild=void 0!==n.codeField?n.codeField:"name",this.fontConfig=n.fontConfig,n.text&&(this.txtLabel=new u.VectorLayer(u.Util.GUID(),{hitDetect:!1,enableAltitude:!0,zIndex:1001}).addTo(i.map),this.rfields=n.text.match(/\{(.+?)\}/g),this.rfields.forEach((function(t){o.fields.push(t.substring(1,t.length-1))})),this.geoItems=[]),this.textureLoader=new c.TextureLoader,e.forEach((function(t){var e=t.geometry,r=u.GeoJSON.toGeometry(t),a=t.properties;o.oriColor[a[o.codeFild]]||(o.oriColor[a[o.codeFild]]=new c.Color(a.color));var s=new c.MeshPhongMaterial({transparent:!0,opacity:void 0!==a.opacity?a.opacity:1,color:o.oriColor[a[o.codeFild]]}),l=.1;o.isExtrusion&&(l=a.height?200*a.height:.1);var h=i.toExtrudePolygon(r,{height:l,interactive:void 0===n.interactive||n.interactive},s);h.setProperties(t.properties),h.object3d.renderOrder=n.renderOrder||0,o.isToolTip&&h.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),o.meshs.push(h),n.isAddLine&&e.coordinates.forEach((function(e){var n=new u.LineString(e[0]),r=i.toLine(n,{altitude:.1===l?1:l,interactive:!1},o.lineMaterial);r.setProperties(t.properties),o.meshs.push(r),o.lineStrings.push(n)}));var f=r.getCenter();if(o.iconPath&&o.iconCidName&&o.iconCidName===a[o.codeFild]){var d=new u.Marker(f,{properties:{altitude:.1===l?1:l,code:a[o.codeFild]},symbol:{markerFile:o.iconPath,markerWidth:64,markerHeight:64,markerDx:0,markerDy:0,markerOpacity:1}});o.geoItems.push(d),o.txtLabel.addGeometry(d)}n.text&&o.createMark(f,l,a)})),this.clickFunc=n.clickFunc,i.addMesh(this.meshs),this._bindEvent()}return Object(i.a)(t,[{key:"createMark",value:function(t,e,n){var r=null;1===this.fields.length?r=new u.Marker(t,{properties:{name:n[this.fields[0]],altitude:.1===e?1:e,code:n[this.codeFild]},symbol:[{textFaceName:"sans-serif",textName:"{name}",textWeight:"normal",textStyle:"normal",textSize:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].fontSize?this.fontConfig[0].fontSize:12,textFont:null,textFill:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].fontColor?this.fontConfig[0].fontColor:"#fff",textOpacity:1,textWrapWidth:null,textWrapCharacter:"\n",textLineSpacing:0,textDx:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].dx?this.fontConfig[0].dx:20,textDy:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].dy?this.fontConfig[0].dy:0,textHorizontalAlignment:"top",textVerticalAlignment:"middle",textAlign:"center"}]}):2===this.fields.length&&(r=new u.Marker(t,{properties:{name:n[this.fields[0]],index:n[this.fields[1]],altitude:.1===e?1:e,code:n[this.codeFild]},symbol:[{textFaceName:"sans-serif",textName:"{name}",textWeight:"normal",textStyle:"normal",textSize:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].fontSize?this.fontConfig[0].fontSize:12,textFont:null,textFill:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].fontColor?this.fontConfig[0].fontColor:"#fff",textOpacity:1,textWrapWidth:null,textWrapCharacter:"\n",textLineSpacing:0,textDx:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].dx?this.fontConfig[0].dx:20,textDy:this.fontConfig&&this.fontConfig[0]&&this.fontConfig[0].dy?this.fontConfig[0].dy:0,textHorizontalAlignment:"top",textVerticalAlignment:"middle",textAlign:"center"},{textFaceName:"sans-serif",textName:"{index}",textWeight:"bold",textStyle:"normal",textSize:this.fontConfig&&this.fontConfig[1]&&this.fontConfig[1].fontSize?this.fontConfig[1].fontSize:20,textFont:null,textFill:this.fontConfig&&this.fontConfig[1]&&this.fontConfig[1].fontColor?this.fontConfig[1].fontColor:"#fff",textOpacity:1,textWrapWidth:null,textWrapCharacter:"\n",textLineSpacing:0,textDx:this.fontConfig&&this.fontConfig[1]&&this.fontConfig[1].dx?this.fontConfig[1].dx:20,textDy:this.fontConfig&&this.fontConfig[1]&&this.fontConfig[1].dy?this.fontConfig[1].dy:-20,textHorizontalAlignment:"top",textVerticalAlignment:"middle",textAlign:"center"}]})),r&&(this.geoItems.push(r),this.txtLabel.addGeometry(r))}},{key:"addIcon",value:function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(e,n){var r,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,B.a.addImageProcessImage(this.iconPath);case 2:r=t.sent,i=B.a.generateTextureOne(r,128,128),this.iconMaterial=new c.SpriteMaterial({map:i}),(o=new Tt(e,{altitude:n+=2400},this.iconMaterial,this.threeLayer)).zoomChange=function(){o.getMap()},this.threeLayer.addMesh(o);case 8:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"_bindEvent",value:function(){var t=this;this.meshs.forEach((function(e){"ExtrudePolygon"===e.type&&e.on("click mousemove mouseout",t._setEvent,t)}))}},{key:"_closeEvent",value:function(){var t=this;this.meshs.forEach((function(e){"ExtrudePolygon"===e.type&&e.off("click mousemove mouseout",t._setEvent,t)}))}},{key:"_setEvent",value:function(t){var e=t.target.getProperties();"mousemove"===t.type&&t.target&&(this.isToolTip&&(t.target.getToolTip()._content="".concat(e.name)),this.selectColor&&(t.target.object3d.material.color=this.selectColor,t.target.object3d.material.color.needsUpdate=!0)),"mouseout"===t.type&&t.target&&this.selectColor&&(t.target.object3d.material.color=this.oriColor[e.name],t.target.object3d.material.color.needsUpdate=!0),"click"===t.type&&t.target&&this.clickFunc&&this.clickFunc(e)}},{key:"dispose",value:function(){for(var t in this.threeLayer.removeMesh(this.meshs),this._closeEvent(),this.meshs.forEach((function(t){"ExtrudePolygon"===t.type&&t.removeToolTip(),t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()})),this.lineMaterial&&this.lineMaterial.dispose(),this.selectColor&&delete this.selectColor,this.oriColor)delete this.oriColor[t];if(this.txtLabel&&this.map.removeLayer(this.txtLabel),this.geoItems)for(var e=0;e<this.geoItems.length;e++)delete this.geoItems[e];if(this.geoItems=[],this.geojson)for(var n=0;n<this.geojson.length;n++)delete this.geojson[n]}},{key:"findMesh",value:function(t){for(var e=0;e<this.meshs.length;e++)if("ExtrudePolygon"===this.meshs[e].type&&this.meshs[e].getProperties()[this.codeFild]===t)return this.meshs[e]}},{key:"setOpacity",value:function(t,e){for(var n=0;n<this.meshs.length;n++)"ExtrudePolygon"===this.meshs[n].type&&this.meshs[n].getProperties()[this.codeFild]===t&&(this.meshs[n].object3d.material.opacity=e)}},{key:"update",value:function(t){var e=this;this.geojson.forEach((function(n){for(var r=u.GeoJSON.toGeometry(n),i=n.properties,o=function(n){if(t[n][e.codeFild]===i[e.codeFild]){e.oriColor[i[e.codeFild]]&&(delete e.oriColor[i[e.codeFild]],e.oriColor[i[e.codeFild]]=new c.Color(t[n].color));var o=new c.MeshBasicMaterial({transparent:!0,opacity:i.opacity||1,color:e.oriColor[i[e.codeFild]]}),a=.1;e.isExtrusion&&(a=t[n].height?200*t[n].height:.1);for(var s=e.threeLayer.toExtrudePolygon(r,{height:a},o),u=e.findMesh(t[n][e.codeFild]),l=s.object3d.geometry.attributes.position.array,h=u.object3d.geometry.attributes.position.array,f=0;f<h.length;f++)h[f]=l[f];u.object3d.geometry.attributes.position.needsUpdate=!0,u.object3d.material.color=e.oriColor[i[e.codeFild]],u.object3d.material.color.needsUpdate=!0;var d=e.threeLayer.distanceToVector3(a,a).x;e.meshs.forEach((function(r){"Line"===r.type&&r.getProperties()[e.codeFild]===t[n][e.codeFild]&&(r.object3d.position.z=d)})),s.object3d.geometry&&s.object3d.geometry.dispose(),s.object3d.material&&s.object3d.material.dispose();for(var p=0;p<e.geoItems.length;p++)e.geoItems[p].getProperties().code===t[n][e.codeFild]&&(e.geoItems[p].getProperties().index&&(e.geoItems[p].getProperties().index=t[n].rank),e.geoItems[p].getProperties().altitude=a,e.geoItems[p].updateSymbol({index:"{index}"}));return"break"}},a=0;a<t.length&&"break"!==o(a);a++);}))}}]),t}();function Lt(){var t="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}));return"iep".concat(t,"layer")}n("a4d3"),n("e01a"),n("d28b"),n("06c5"),n("3835"),n("4fad"),n("1bf2"),n("f8c9"),n("e439"),n("60ed");var Pt=function(){function t(e,n){var i=this;Object(r.a)(this,t),this.map=n,this.animationId=null,this.func=[];var o=Lt();this.threeLayer=new C.c(o,{forceRenderOnMoving:!0,forceRenderOnRotating:!0,identifyCountOnEvent:1});var a=function t(){var e,n;i.threeLayer._needsUpdate=!i.threeLayer._needsUpdate,i.threeLayer._needsUpdate&&(null===(e=i.threeLayer)||void 0===e||null===(n=e.getRenderer())||void 0===n||n.clearCanvas(),i.threeLayer.renderScene()),i.func.forEach((function(t){return t()})),J.c(),i.animationId=requestAnimationFrame(t)};this.threeLayer.prepareToDraw=function(t,e,n){var r=new c.DirectionalLight(16777215);r.position.set(0,-10,10).normalize(),e.add(r),a()},this.threeLayer.addTo(n),n.getLayer(o).setZIndex(1e3),this.layerId=o,this.layerName=e,this.dirty=!1,this.polygonObjs=[],this.polylineObjs=[],this.circleObj=null,this.directionObj=null,this.directionObjVisible=!0,this.trips=[],this.ringObj=null,this.shockObj=null,this.initFlag=!1}return Object(i.a)(t,[{key:"getLayerId",value:function(){return this.layerId}},{key:"changeLayerId",value:function(){if(this.threeLayer){var t=Lt();this.threeLayer.setId(t),this.layerId=t}}},{key:"setVisible",value:function(t,e){this.threeLayer&&(!0===t?(this.threeLayer.show(),e&&e()):(this.threeLayer.hide(),e&&e()))}},{key:"prepareToDraw",value:function(){var t=this,e=function e(){var n,r;t.threeLayer._needsUpdate=!t.threeLayer._needsUpdate,t.threeLayer._needsUpdate&&(null===(n=t.threeLayer)||void 0===n||null===(r=n.getRenderer())||void 0===r||r.clearCanvas(),t.threeLayer.renderScene()),t.func.forEach((function(t){return t()})),J.c(),t.animationId=requestAnimationFrame(e)};return new Promise((function(n){t.threeLayer.prepareToDraw=function(t,r,i){var o=new c.DirectionalLight(16777215);o.position.set(0,-10,10).normalize(),r.add(o),e(),n()}}))}},{key:"removeIepLayer",value:function(){this.threeLayer&&this.threeLayer.getMeshes().forEach((function(t){var e;"Points"!==t.type&&"Image"!==t.type||null===(e=t.parent)||void 0===e||e.dispose()})),this.directionObj&&(this.directionObj.dispose(),delete this.directionObj),this.trips.length>0&&(this.func=[],this.trips.forEach((function(t){t.dispose()})),this.trips=[]),this.circleObj&&(this.circleObj.dispose(),delete this.circleObj),this.ringObj&&(this.ringObj.dispose(),delete this.ringObj),this.clearShock(),this.clearPolygon(),this.clearPolyline()}},{key:"getPointObjByName",value:function(t,e){this.threeLayer&&this.threeLayer.getMeshes().forEach((function(n){"Points"===n.type&&n.parent.name===t&&e(n.parent)}))}},{key:"updateDirection",value:function(t,e){this.directionObj&&this.directionObj.updateDirection(t,e)}},{key:"clearDirection",value:function(){this.directionObj&&(this.directionObj.dispose(),delete this.directionObj)}},{key:"setDirectionVisible",value:function(t){this.directionObjVisible=t,this.directionObj&&this.directionObj.setDirectionVisible(t)}},{key:"drawDirection",value:function(t,e,n){var r=this,i=n||{};this.threeLayer.getScene()?(this.directionObj&&(this.directionObj.dispose(),delete this.directionObj),setTimeout((function(){r.directionObj=new Ct([t,e],i,r.threeLayer,r)}),500)):(this.initFlag=!0,this.prepareToDraw().then((function(){r.directionObj||(r.directionObj=new Ct([t,e],i,r.threeLayer,r))})))}},{key:"clearCircle",value:function(){this.circleObj&&(this.circleObj.dispose(),delete this.circleObj)}},{key:"drawCircle",value:function(t,e,n,r){var i=this,o=r||{};this.threeLayer.getScene()?this.circleObj?this.circleObj.update(t,e,n,o):this.circleObj=new Z(t,e,n,o,this.threeLayer):(this.initFlag=!0,this.prepareToDraw().then((function(){i.circleObj?i.circleObj.update(t,e,n,o):i.circleObj=new Z(t,e,n,o,i.threeLayer)})))}},{key:"drawImage",value:function(t,e,n,r,i){var o=this;if(this.threeLayer.getScene()){var a=new I(t,e,n,r,this.threeLayer);i(a)}else this.initFlag=!0,this.prepareToDraw().then((function(){var a=new I(t,e,n,r,o.threeLayer);i(a)}))}},{key:"drawPoint",value:function(t,e,n){var r=this;if(this.threeLayer.getScene()){var i=null;t.length>0?(i=new M.a(t,e,this.threeLayer)).addPoint().then((function(){!1===r.threeLayer.options.visible&&i.hide(),n(i)})):n(i)}else this.initFlag=!0,this.prepareToDraw().then((function(){var i=null;t.length>0?(i=new M.a(t,e,r.threeLayer)).addPoint().then((function(){!1===r.threeLayer.options.visible&&i.hide(),n(i)})):n(i)}))}},{key:"updatePolygonOpacity",value:function(t,e){this.polygonObjs.forEach((function(n){n.setOpacity(t,e)}))}},{key:"clearTrip",value:function(){this.func=[],this.trips.forEach((function(t){t.dispose()})),this.trips=[]}},{key:"drawTrip",value:function(t,e){var n=this,r=e||{};if(this.threeLayer.getScene()){var i=new At(t,r,this.threeLayer);this.trips.push(i),this.func.push((function(){i.naimationFunc()}))}else this.initFlag=!0,this.prepareToDraw().then((function(){var e=new At(t,r,n.threeLayer);n.trips.push(e),n.func.push((function(){e.naimationFunc()}))}))}},{key:"updatePolygon",value:function(t){console.log(t),this.polygonObjs.forEach((function(e){e.update(t)}))}},{key:"clearPolygon",value:function(){for(var t=0;t<this.polygonObjs.length;t++)this.polygonObjs[t].dispose(),delete this.polygonObjs[t];this.polygonObjs=[]}},{key:"drawPolygon",value:function(t,e){var n=this,r=e||{};if(this.threeLayer.getScene()){var i=new It(t,r,this.threeLayer);this.polygonObjs.push(i)}else this.initFlag=!0,this.prepareToDraw().then((function(){var e=new It(t,r,n.threeLayer);n.polygonObjs.push(e)}))}},{key:"clearPolyline",value:function(){for(var t=0;t<this.polylineObjs.length;t++)this.polylineObjs[t].dispose(),delete this.polylineObjs[t];this.polylineObjs=[]}},{key:"drawPolyline",value:function(t,e){var n=this,r=e||{};if(this.threeLayer.getScene()){var i=new Rt(t,r,this.threeLayer);this.polylineObjs.push(i)}else this.initFlag=!0,this.prepareToDraw().then((function(){var e=new Rt(t,r,n.threeLayer);n.polylineObjs.push(e)}))}},{key:"clearRing",value:function(){this.ringObj&&(this.ringObj.dispose(),delete this.ringObj)}},{key:"clearRingInfo",value:function(){this.ringObj&&this.ringObj.clearInfo()}},{key:"updateRing",value:function(t,e,n){this.ringObj&&this.ringObj.updateRing(t,e,n)}},{key:"drawRing",value:function(t,e,n,r){var i=this,o=r||{};this.threeLayer.getScene()?(this.ringObj&&(this.ringObj.dispose(),delete this.ringObj),setTimeout((function(){i.ringObj=new ft([t,e],n,o,i.threeLayer)}),500)):(this.initFlag=!0,this.prepareToDraw().then((function(){i.ringObj||(i.ringObj=new ft([t,e],n,o,i.threeLayer))})))}},{key:"drawShock",value:function(t,e){var n=this;this.threeLayer.getScene()?this.shockObj&&(this.shockObj.dispose(),this.shockObj=null,setTimeout((function(){n.shockObj=new q(t,e||{},n.threeLayer)}),500)):(this.initFlag=!0,this.prepareToDraw().then((function(){n.shockObj=new q(t,e||{},n.threeLayer)})))}},{key:"clearShock",value:function(){this.shockObj&&(J.b(),this.shockObj.dispose(),this.shockObj=null)}}]),t}(),Rt=function(){function t(e,n,i){var o=this;Object(r.a)(this,t),this.map=i.map,this.threeLayer=i,this.meshs=[],this.lineMaterial=new K({color:n.lineColor||"red",transparent:!0,linewidth:n.linewidth||4,blending:c.AdditiveBlending}),e.forEach((function(t){var e=u.GeoJSON.toGeometry(t),r=i.toFatLine(e,{interactive:void 0!==n.interactive&&n.interactive},o.lineMaterial);r.object3d.renderOrder=n.renderOrder||0,o.meshs.push(r)})),i.addMesh(this.meshs)}return Object(i.a)(t,[{key:"dispose",value:function(){this.threeLayer.removeMesh(this.meshs),this.meshs.forEach((function(t){t.object3d.geometry&&t.object3d.geometry.dispose(),t.object3d.material&&t.object3d.material.dispose()})),this.lineMaterial&&this.lineMaterial.dispose()}}]),t}(),Ot=function(){function t(e){Object(r.a)(this,t),this.map=e,this.windObj=null,this.drawTool=null,this.geometryTool=null,this.distanceTool=null,this.trafficLayer=null,this.threeLayers=[]}return Object(i.a)(t,[{key:"isLayerExist",value:function(t){if(0===this.threeLayers.length)return!1;if(void 0===t)return!1;for(var e=0;e<this.threeLayers.length;e++)if(this.threeLayers[e].layerId===t)return!0;return!1}},{key:"getLayer",value:function(t){if(0===this.threeLayers.length){var e=new Pt(t,this.map);return this.threeLayers.push(e),e.layerId}if(void 0===t){for(var n=0;n<this.threeLayers.length;n++)if(!1===this.threeLayers[n].dirty)return this.threeLayers[n].layerId}else for(var r=0;r<this.threeLayers.length;r++)if(this.threeLayers[r].layerName===t)return this.threeLayers[r].layerId;if(!(this.threeLayers.length>=2)){var i=new Pt(t,this.map);return this.threeLayers.push(i),i.layerId}}},{key:"removeAllLayer",value:function(){this.windObj&&(this.windObj.closeWind(),delete this.windObj),this.drawTool&&(this.drawTool.dispose(),delete this.drawTool),this.geometryTool&&(this.geometryTool.dispose(),delete this.geometryTool),this.distanceTool&&(this.distanceTool.dispose(),delete this.distanceTool),this.trafficLayer&&(this.trafficLayer.setMap(null),delete this.trafficLayer);for(var t=0;t<this.threeLayers.length;t++)this.threeLayers[t].removeIepLayer()}},{key:"clearPolygon",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearPolygon()}}},{key:"findLayerById",value:function(t){for(var e=0;e<this.threeLayers.length;e++)if(this.threeLayers[e].layerId==t)return this.threeLayers[e]}},{key:"findLayerByName",value:function(t){for(var e=0;e<this.threeLayers.length;e++)if(this.threeLayers[e].layerName==t)return this.threeLayers[e]}},{key:"setLayerVisible",value:function(t,e,n){if(void 0!==t){var r=this.findLayerByName(t);void 0!==r&&r.setVisible(e,n)}}},{key:"clearLayerById",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&(e.changeLayerId(),e.removeIepLayer())}}},{key:"setLayerDirty",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&(e.dirty=!0)}}},{key:"drawPolygon",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&(!0===r.initFlag&&void 0===r.threeLayer.getScene()?setTimeout((function(){r.drawPolygon(t,e)}),200):r.drawPolygon(t,e))}}},{key:"updatePolygon",value:function(t,e){if(void 0!==e){var n=this.findLayerById(e);void 0!==n&&n.updatePolygon(t)}}},{key:"updatePolygonOpacity",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&r.updatePolygonOpacity(t,e)}}},{key:"clearPolyline",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearPolyline()}}},{key:"drawPolyline",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&(!0===r.initFlag&&void 0===r.threeLayer.getScene()?setTimeout((function(){r.drawPolyline(t,e)}),200):r.drawPolyline(t,e))}}},{key:"clearTrip",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearTrip()}}},{key:"drawTrip",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&r.drawTrip(t,e)}}},{key:"updateRing",value:function(t,e,n,r){if(void 0!==r){var i=this.findLayerById(r);void 0!==i&&i.updateRing(t,e,n)}}},{key:"clearRing",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearRing()}}},{key:"clearRingInfo",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearRingInfo()}}},{key:"drawRing",value:function(t,e,n,r,i){if(void 0!==i){var o=this.findLayerById(i);void 0!==o&&o.drawRing(t,e,n,r)}}},{key:"updateDirection",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&r.updateDirection(t,e)}}},{key:"clearDirection",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearDirection()}}},{key:"setDirectionVisible",value:function(t,e){if(void 0!==e){var n=this.findLayerById(e);void 0!==n&&n.setDirectionVisible(t)}}},{key:"drawDirection",value:function(t,e,n,r){if(void 0!==r){var i=this.findLayerById(r);void 0!==i&&(!0===i.initFlag&&void 0===i.threeLayer.getScene()?setTimeout((function(){i.drawDirection(t,e,n)}),200):i.drawDirection(t,e,n))}}},{key:"clearCircle",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearCircle()}}},{key:"drawCircle",value:function(t,e,n,r,i){if(void 0!==i){var o=this.findLayerById(i);void 0!==o&&o.drawCircle(t,e,n,r)}}},{key:"Traffic",value:function(t){var e=this.map.getBaseLayer();if(e){var n=e.getAMap();n&&(this.trafficLayer||(this.trafficLayer=new AMap.TileLayer.Traffic({zIndex:10})),!0===t?this.trafficLayer.setMap(n):this.trafficLayer.setMap(null))}}},{key:"distance",value:function(t){var e=this;return new Promise((function(n){var r=null;if(t){var i=e.findLayerByName(t);i&&(r=i.threeLayer)}e.distanceTool?(e.distanceTool.enable(),n(e.distanceTool)):(e.distanceTool=new F({},r,e.map),n(e.distanceTool))}))}},{key:"drawGeometry",value:function(t,e,n,r,i){var o=this;return new Promise((function(a){var s=null;if(n){var c=o.findLayerByName(n);c&&(s=c.threeLayer)}"Polygon"!==t&&"Circle"!==t&&a(null),void 0===r?o.drawTool?(o.drawTool.setMode(t,e),a(o.drawTool)):(o.drawTool=new D(t,e,r,i||{},s,o.map),a(o.drawTool)):(o.geometryTool||(o.geometryTool=new D(t,e,r,i||{},s,o.map,o)),a(o.geometryTool))}))}},{key:"drawWeatherData",value:function(t,e){var n=this;return new Promise((function(r){var i=null;r(t?i=new k(t,e||{},n.map):i),n.windObj=i}))}},{key:"drawImage",value:function(t,e,n,r,i){var o=this;return new Promise((function(a){void 0===i&&a(null);var s=o.findLayerById(i);void 0===s&&a(null),!0===s.initFlag&&void 0===s.threeLayer.getScene()?setTimeout((function(){s.drawImage(t,e,n,r,a)}),200):s.drawImage(t,e,n,r,a)}))}},{key:"getPointObjByName",value:function(t,e){var n=this;return new Promise((function(r){void 0===t&&r(null);var i=n.findLayerByName(t);void 0===i&&r(null),i.getPointObjByName(e,r)}))}},{key:"drawShock",value:function(t,e,n){if(void 0!==n){var r=this.findLayerById(n);void 0!==r&&(!0===r.initFlag&&void 0===r.threeLayer.getScene()?setTimeout((function(){r.drawShock(t,e)}),200):r.drawShock(t,e))}}},{key:"clearShock",value:function(t){if(void 0!==t){var e=this.findLayerById(t);void 0!==e&&e.clearShock()}}},{key:"drawPoint",value:function(t,e,n){var r=this;return new Promise((function(i){void 0===n&&i(null);var o=r.findLayerById(n);void 0===o&&i(null),!0===o.initFlag&&void 0===o.threeLayer.getScene()?setTimeout((function(){o.drawPoint(t,e,i)}),200):o.drawPoint(t,e,i)}))}},{key:"changeAMapStyle",value:function(t){var e;null===(e=this.map.getBaseLayer().getAMap())||void 0===e||e.setMapStyle(t)}},{key:"saveIndexedDb",value:function(){return new Promise((function(t,e){var n=window.indexedDB.open("iep_db");n.onsuccess=function(e){var n=e.target.result;t(n)},n.onerror=function(t){e(t)},n.onupgradeneeded=function(t){var e=t.target.result;if(!e.objectStoreNames.contains("svg_dict")){var n=e.createObjectStore("svg_dict",{keyPath:"code"});n.createIndex("code","code",{unique:!0}),n.createIndex("file","file",{unique:!1})}}}))}},{key:"getType",value:function(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}},{key:"getDbRecord",value:function(t){var e=this,n="string"===this.getType(t)?[t]:t;return new Promise((function(t){e.saveIndexedDb().then((function(e){var r=e.transaction("svg_dict","readwrite").objectStore("svg_dict");Promise.all(n.map((function(t){return new Promise((function(e){var n=r.get(t);n.onsuccess=function(t){e(t.target.result)},n.onerror=function(t){e()}}))}))).then((function(e){t(e)}))}))}))}}]),t}(),kt=function(t){return new Ot(t)};
|
|
113
113
|
/*!
|
|
114
114
|
* maptalks.amap v0.10.1
|
|
115
115
|
* LICENSE : MIT
|