vis-core 0.30.0-beta.31 → 0.30.0-beta.33

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.
package/dist/index.d.ts CHANGED
@@ -8,4 +8,4 @@ export * as animationUtils from './utils/animation';
8
8
  export declare const access: {
9
9
  token: string;
10
10
  };
11
- export declare const VERSION = "0.30.0-beta.31";
11
+ export declare const VERSION = "0.30.0-beta.33";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode(".-translate-x-1\\/2,.-translate-y-1\\/2,.transform{--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1 }.shadow{--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.ring{--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.invert,.filter{--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: }.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.whitespace-nowrap{white-space:nowrap}.text-center{text-align:center}.text-sm{font-size:14px;line-height:20px}.leading-\\[1\\]{line-height:1}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-opacity-80{--tw-text-opacity: .8 }.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- "use strict";var Jn=Object.defineProperty,jn=Object.defineProperties;var Qn=Object.getOwnPropertyDescriptors;var Yn=Object.getOwnPropertySymbols,$n=Object.getPrototypeOf,qn=Object.prototype.hasOwnProperty,e1=Object.prototype.propertyIsEnumerable,t1=Reflect.get;var Pn=(v,e)=>(e=Symbol[v])?e:Symbol.for("Symbol."+v),i1=v=>{throw TypeError(v)},Gn=Math.pow,Hn=(v,e,r)=>e in v?Jn(v,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):v[e]=r,gi=(v,e)=>{for(var r in e||(e={}))qn.call(e,r)&&Hn(v,r,e[r]);if(Yn)for(var r of Yn(e))e1.call(e,r)&&Hn(v,r,e[r]);return v},qi=(v,e)=>jn(v,Qn(e));var C0=(v,e,r)=>Hn(v,typeof e!="symbol"?e+"":e,r);var _n=(v,e,r)=>t1($n(v),r,e);var B0=(v,e,r)=>new Promise((o,V)=>{var le=Ce=>{try{Le(r.next(Ce))}catch(Re){V(Re)}},fe=Ce=>{try{Le(r.throw(Ce))}catch(Re){V(Re)}},Le=Ce=>Ce.done?o(Ce.value):Promise.resolve(Ce.value).then(le,fe);Le((r=r.apply(v,e)).next())}),n1=function(v,e){this[0]=v,this[1]=e};var Un=v=>{var e=v[Pn("asyncIterator")],r=!1,o,V={};return e==null?(e=v[Pn("iterator")](),o=le=>V[le]=fe=>e[le](fe)):(e=e.call(v),o=le=>V[le]=fe=>{if(r){if(r=!1,le==="throw")throw fe;return fe}return r=!0,{done:!1,value:new n1(new Promise(Le=>{var Ce=e[le](fe);Ce instanceof Object||i1("Object expected"),Le(Ce)}),1)}}),V[Pn("iterator")]=()=>V,o("next"),"throw"in e?o("throw"):V.throw=le=>{throw le},"return"in e&&o("return"),V},Bn=(v,e,r)=>(e=v[Pn("asyncIterator")])?e.call(v):(v=v[Pn("iterator")](),e={},r=(o,V)=>(V=v[o])&&(e[o]=le=>new Promise((fe,Le,Ce)=>(le=V.call(v,le),Ce=le.done,Promise.resolve(le.value).then(Re=>fe({value:Re,done:Ce}),Le)))),r("next"),r("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsrsasign=require("jsrsasign"),CryptoJS=require("crypto-js"),esusLite=require("esus-lite"),events=require("events"),world$1=require("geojson-cn/json/0.json"),json100000Lite=require("geojson-cn/json-lite/100000.json"),json100000=require("geojson-cn/json/100000.json"),adcodeAll=require("geojson-cn/json-lite/all.json"),turf=require("@turf/turf"),geojsonCn=require("geojson-cn");Array.prototype.at||(Array.prototype.at=function(v){return v<0&&(v=this.length+v),this[v]});const version="0.30.0-beta.31",publicKeyPEM="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t",accessToken={token:void 0,getInfo(){if(!this.token)return"";const[v,e,r]=this.token.split(":::"),o=jsrsasign.KEYUTIL.getKey(atob(publicKeyPEM)),V=CryptoJS.enc.Base64.parse(e),le=CryptoJS.enc.Base64.parse(r),fe=CryptoJS.lib.WordArray.create(V.words.slice(0,4)),Le=CryptoJS.lib.WordArray.create(V.words.slice(4)),Ce=jsrsasign.KJUR.crypto.Util.hashHex(V.toString(),"sha256"),Re=o.verifyWithMessageHashPSS(Ce,jsrsasign.b64tohex(v),"sha256",32);if(!Re)return this.token=void 0,"";const ze=CryptoJS.AES.decrypt({ciphertext:Le},le,{iv:fe,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8),Fe=JSON.parse(ze),ke=Date.now();return!Fe.s||Fe.s>ke?(this.token=void 0,""):Fe.e&&Fe.e<ke?(this.token=void 0,""):(Fe.isValid=Re,Fe)}};var Easing=Object.freeze({Linear:Object.freeze({None:function(v){return v},In:function(v){return v},Out:function(v){return v},InOut:function(v){return v}}),Quadratic:Object.freeze({In:function(v){return v*v},Out:function(v){return v*(2-v)},InOut:function(v){return(v*=2)<1?.5*v*v:-.5*(--v*(v-2)-1)}}),Cubic:Object.freeze({In:function(v){return v*v*v},Out:function(v){return--v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v:.5*((v-=2)*v*v+2)}}),Quartic:Object.freeze({In:function(v){return v*v*v*v},Out:function(v){return 1- --v*v*v*v},InOut:function(v){return(v*=2)<1?.5*v*v*v*v:-.5*((v-=2)*v*v*v-2)}}),Quintic:Object.freeze({In:function(v){return v*v*v*v*v},Out:function(v){return--v*v*v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v*v*v:.5*((v-=2)*v*v*v*v+2)}}),Sinusoidal:Object.freeze({In:function(v){return 1-Math.sin((1-v)*Math.PI/2)},Out:function(v){return Math.sin(v*Math.PI/2)},InOut:function(v){return .5*(1-Math.sin(Math.PI*(.5-v)))}}),Exponential:Object.freeze({In:function(v){return v===0?0:Math.pow(1024,v-1)},Out:function(v){return v===1?1:1-Math.pow(2,-10*v)},InOut:function(v){return v===0?0:v===1?1:(v*=2)<1?.5*Math.pow(1024,v-1):.5*(-Math.pow(2,-10*(v-1))+2)}}),Circular:Object.freeze({In:function(v){return 1-Math.sqrt(1-v*v)},Out:function(v){return Math.sqrt(1- --v*v)},InOut:function(v){return(v*=2)<1?-.5*(Math.sqrt(1-v*v)-1):.5*(Math.sqrt(1-(v-=2)*v)+1)}}),Elastic:Object.freeze({In:function(v){return v===0?0:v===1?1:-Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI)},Out:function(v){return v===0?0:v===1?1:Math.pow(2,-10*v)*Math.sin((v-.1)*5*Math.PI)+1},InOut:function(v){return v===0?0:v===1?1:(v*=2,v<1?-.5*Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI):.5*Math.pow(2,-10*(v-1))*Math.sin((v-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(v){var e=1.70158;return v===1?1:v*v*((e+1)*v-e)},Out:function(v){var e=1.70158;return v===0?0:--v*v*((e+1)*v+e)+1},InOut:function(v){var e=2.5949095;return(v*=2)<1?.5*(v*v*((e+1)*v-e)):.5*((v-=2)*v*((e+1)*v+e)+2)}}),Bounce:Object.freeze({In:function(v){return 1-Easing.Bounce.Out(1-v)},Out:function(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375},InOut:function(v){return v<.5?Easing.Bounce.In(v*2)*.5:Easing.Bounce.Out(v*2-1)*.5+.5}}),generatePow:function(v){return v===void 0&&(v=4),v=v<Number.EPSILON?Number.EPSILON:v,v=v>1e4?1e4:v,{In:function(e){return Math.pow(e,v)},Out:function(e){return 1-Math.pow(1-e,v)},InOut:function(e){return e<.5?Math.pow(e*2,v)/2:(1-Math.pow(2-e*2,v))/2+.5}}}}),now=function(){return performance.now()},Group$1=function(){function v(){this._tweens={},this._tweensAddedDuringUpdate={}}return v.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},v.prototype.removeAll=function(){this._tweens={}},v.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},v.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},v.prototype.update=function(e,r){e===void 0&&(e=now()),r===void 0&&(r=!1);var o=Object.keys(this._tweens);if(o.length===0)return!1;for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var V=0;V<o.length;V++){var le=this._tweens[o[V]],fe=!r;le&&le.update(e,fe)===!1&&!r&&delete this._tweens[o[V]]}o=Object.keys(this._tweensAddedDuringUpdate)}return!0},v}(),Interpolation={Linear:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),le=Interpolation.Utils.Linear;return e<0?le(v[0],v[1],o):e>1?le(v[r],v[r-1],r-o):le(v[V],v[V+1>r?r:V+1],o-V)},Bezier:function(v,e){for(var r=0,o=v.length-1,V=Math.pow,le=Interpolation.Utils.Bernstein,fe=0;fe<=o;fe++)r+=V(1-e,o-fe)*V(e,fe)*v[fe]*le(o,fe);return r},CatmullRom:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),le=Interpolation.Utils.CatmullRom;return v[0]===v[r]?(e<0&&(V=Math.floor(o=r*(1+e))),le(v[(V-1+r)%r],v[V],v[(V+1)%r],v[(V+2)%r],o-V)):e<0?v[0]-(le(v[0],v[0],v[1],v[1],-o)-v[0]):e>1?v[r]-(le(v[r],v[r],v[r-1],v[r-1],o-r)-v[r]):le(v[V?V-1:0],v[V],v[r<V+1?r:V+1],v[r<V+2?r:V+2],o-V)},Utils:{Linear:function(v,e,r){return(e-v)*r+v},Bernstein:function(v,e){var r=Interpolation.Utils.Factorial;return r(v)/r(e)/r(v-e)},Factorial:function(){var v=[1];return function(e){var r=1;if(v[e])return v[e];for(var o=e;o>1;o--)r*=o;return v[e]=r,r}}(),CatmullRom:function(v,e,r,o,V){var le=(r-v)*.5,fe=(o-e)*.5,Le=V*V,Ce=V*Le;return(2*e-2*r+le+fe)*Ce+(-3*e+3*r-2*le-fe)*Le+le*V+e}}},Sequence=function(){function v(){}return v.nextId=function(){return v._nextId++},v._nextId=0,v}(),mainGroup=new Group$1,Tween=function(){function v(e,r){r===void 0&&(r=mainGroup),this._object=e,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Easing.Linear.None,this._interpolationFunction=Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Sequence.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return v.prototype.getId=function(){return this._id},v.prototype.isPlaying=function(){return this._isPlaying},v.prototype.isPaused=function(){return this._isPaused},v.prototype.getDuration=function(){return this._duration},v.prototype.to=function(e,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},v.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},v.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},v.prototype.start=function(e,r){if(e===void 0&&(e=now()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var V={};for(var le in this._valuesEnd)V[le]=this._valuesEnd[le];this._valuesEnd=V}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},v.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},v.prototype._setupProperties=function(e,r,o,V,le){for(var fe in o){var Le=e[fe],Ce=Array.isArray(Le),Re=Ce?"array":typeof Le,Pe=!Ce&&Array.isArray(o[fe]);if(!(Re==="undefined"||Re==="function")){if(Pe){var ze=o[fe];if(ze.length===0)continue;for(var Fe=[Le],ke=0,Gt=ze.length;ke<Gt;ke+=1){var Vt=this._handleRelativeValue(Le,ze[ke]);if(isNaN(Vt)){Pe=!1,console.warn("Found invalid interpolation list. Skipping.");break}Fe.push(Vt)}Pe&&(o[fe]=Fe)}if((Re==="object"||Ce)&&Le&&!Pe){r[fe]=Ce?[]:{};var Zt=Le;for(var xt in Zt)r[fe][xt]=Zt[xt];V[fe]=Ce?[]:{};var ze=o[fe];if(!this._isDynamic){var Xt={};for(var xt in ze)Xt[xt]=ze[xt];o[fe]=ze=Xt}this._setupProperties(Zt,r[fe],ze,V[fe],le)}else(typeof r[fe]=="undefined"||le)&&(r[fe]=Le),Ce||(r[fe]*=1),Pe?V[fe]=o[fe].slice().reverse():V[fe]=r[fe]||0}}},v.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},v.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},v.prototype.pause=function(e){return e===void 0&&(e=now()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},v.prototype.resume=function(e){return e===void 0&&(e=now()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},v.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},v.prototype.group=function(e){return e===void 0&&(e=mainGroup),this._group=e,this},v.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},v.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},v.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},v.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},v.prototype.easing=function(e){return e===void 0&&(e=Easing.Linear.None),this._easingFunction=e,this},v.prototype.interpolation=function(e){return e===void 0&&(e=Interpolation.Linear),this._interpolationFunction=e,this},v.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},v.prototype.onStart=function(e){return this._onStartCallback=e,this},v.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},v.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},v.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},v.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},v.prototype.onStop=function(e){return this._onStopCallback=e,this},v.prototype.update=function(e,r){var o;if(e===void 0&&(e=now()),r===void 0&&(r=!0),this._isPaused)return!0;var V=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>V)return!1;r&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var le=e-this._startTime,fe=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),Le=this._duration+this._repeat*fe,Ce=this._calculateElapsedPortion(le,fe,Le),Re=this._easingFunction(Ce),Pe=this._calculateCompletionStatus(le,fe);if(Pe==="repeat"&&this._processRepetition(le,fe),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,Re),Pe==="about-to-repeat"&&this._processRepetition(le,fe),this._onUpdateCallback&&this._onUpdateCallback(this._object,Ce),Pe==="repeat"||Pe==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(Pe==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var ze=0,Fe=this._chainedTweens.length;ze<Fe;ze++)this._chainedTweens[ze].start(this._startTime+this._duration,!1)}return Pe!=="completed"},v.prototype._calculateElapsedPortion=function(e,r,o){if(this._duration===0||e>o)return 1;var V=e%r,le=Math.min(V/this._duration,1);return le===0&&e!==0&&e%this._duration===0?1:le},v.prototype._calculateCompletionStatus=function(e,r){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},v.prototype._processRepetition=function(e,r){var o=Math.min(Math.trunc((e-this._duration)/r)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=o);for(var V in this._valuesStartRepeat){var le=this._valuesEnd[V];!this._yoyo&&typeof le=="string"&&(this._valuesStartRepeat[V]=this._valuesStartRepeat[V]+parseFloat(le)),this._yoyo&&this._swapEndStartRepeatValues(V),this._valuesStart[V]=this._valuesStartRepeat[V]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=r*o},v.prototype._updateProperties=function(e,r,o,V){for(var le in o)if(r[le]!==void 0){var fe=r[le]||0,Le=o[le],Ce=Array.isArray(e[le]),Re=Array.isArray(Le),Pe=!Ce&&Re;Pe?e[le]=this._interpolationFunction(Le,V):typeof Le=="object"&&Le?this._updateProperties(e[le],fe,Le,V):(Le=this._handleRelativeValue(fe,Le),typeof Le=="number"&&(e[le]=fe+(Le-fe)*V))}},v.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},v.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],o=this._valuesEnd[e];typeof o=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(o):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},v}(),VERSION$1="23.1.2",nextId=Sequence.nextId,TWEEN=mainGroup,getAll=TWEEN.getAll.bind(TWEEN),removeAll=TWEEN.removeAll.bind(TWEEN),add=TWEEN.add.bind(TWEEN),remove=TWEEN.remove.bind(TWEEN),update=TWEEN.update.bind(TWEEN),exports$1={Easing,Group:Group$1,Interpolation,now,Sequence,nextId,Tween,VERSION:VERSION$1,getAll,removeAll,add,remove,update};const tween_esm=Object.freeze(Object.defineProperty({__proto__:null,Easing,Group:Group$1,Interpolation,Sequence,Tween,VERSION:VERSION$1,add,default:exports$1,getAll,nextId,now,remove,removeAll,update},Symbol.toStringTag,{value:"Module"}));/**
2
+ "use strict";var Jn=Object.defineProperty,jn=Object.defineProperties;var Qn=Object.getOwnPropertyDescriptors;var Yn=Object.getOwnPropertySymbols,$n=Object.getPrototypeOf,qn=Object.prototype.hasOwnProperty,e1=Object.prototype.propertyIsEnumerable,t1=Reflect.get;var Pn=(v,e)=>(e=Symbol[v])?e:Symbol.for("Symbol."+v),i1=v=>{throw TypeError(v)},Gn=Math.pow,Hn=(v,e,r)=>e in v?Jn(v,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):v[e]=r,gi=(v,e)=>{for(var r in e||(e={}))qn.call(e,r)&&Hn(v,r,e[r]);if(Yn)for(var r of Yn(e))e1.call(e,r)&&Hn(v,r,e[r]);return v},qi=(v,e)=>jn(v,Qn(e));var C0=(v,e,r)=>Hn(v,typeof e!="symbol"?e+"":e,r);var _n=(v,e,r)=>t1($n(v),r,e);var B0=(v,e,r)=>new Promise((o,V)=>{var le=Ce=>{try{Le(r.next(Ce))}catch(Re){V(Re)}},fe=Ce=>{try{Le(r.throw(Ce))}catch(Re){V(Re)}},Le=Ce=>Ce.done?o(Ce.value):Promise.resolve(Ce.value).then(le,fe);Le((r=r.apply(v,e)).next())}),n1=function(v,e){this[0]=v,this[1]=e};var Un=v=>{var e=v[Pn("asyncIterator")],r=!1,o,V={};return e==null?(e=v[Pn("iterator")](),o=le=>V[le]=fe=>e[le](fe)):(e=e.call(v),o=le=>V[le]=fe=>{if(r){if(r=!1,le==="throw")throw fe;return fe}return r=!0,{done:!1,value:new n1(new Promise(Le=>{var Ce=e[le](fe);Ce instanceof Object||i1("Object expected"),Le(Ce)}),1)}}),V[Pn("iterator")]=()=>V,o("next"),"throw"in e?o("throw"):V.throw=le=>{throw le},"return"in e&&o("return"),V},Bn=(v,e,r)=>(e=v[Pn("asyncIterator")])?e.call(v):(v=v[Pn("iterator")](),e={},r=(o,V)=>(V=v[o])&&(e[o]=le=>new Promise((fe,Le,Ce)=>(le=V.call(v,le),Ce=le.done,Promise.resolve(le.value).then(Re=>fe({value:Re,done:Ce}),Le)))),r("next"),r("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsrsasign=require("jsrsasign"),CryptoJS=require("crypto-js"),esusLite=require("esus-lite"),events=require("events"),world$1=require("geojson-cn/json/0.json"),json100000Lite=require("geojson-cn/json-lite/100000.json"),json100000=require("geojson-cn/json/100000.json"),adcodeAll=require("geojson-cn/json-lite/all.json"),turf=require("@turf/turf"),geojsonCn=require("geojson-cn");Array.prototype.at||(Array.prototype.at=function(v){return v<0&&(v=this.length+v),this[v]});const version="0.30.0-beta.33",publicKeyPEM="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t",accessToken={token:void 0,getInfo(){if(!this.token)return"";const[v,e,r]=this.token.split(":::"),o=jsrsasign.KEYUTIL.getKey(atob(publicKeyPEM)),V=CryptoJS.enc.Base64.parse(e),le=CryptoJS.enc.Base64.parse(r),fe=CryptoJS.lib.WordArray.create(V.words.slice(0,4)),Le=CryptoJS.lib.WordArray.create(V.words.slice(4)),Ce=jsrsasign.KJUR.crypto.Util.hashHex(V.toString(),"sha256"),Re=o.verifyWithMessageHashPSS(Ce,jsrsasign.b64tohex(v),"sha256",32);if(!Re)return this.token=void 0,"";const ze=CryptoJS.AES.decrypt({ciphertext:Le},le,{iv:fe,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8),Fe=JSON.parse(ze),ke=Date.now();return!Fe.s||Fe.s>ke?(this.token=void 0,""):Fe.e&&Fe.e<ke?(this.token=void 0,""):(Fe.isValid=Re,Fe)}};var Easing=Object.freeze({Linear:Object.freeze({None:function(v){return v},In:function(v){return v},Out:function(v){return v},InOut:function(v){return v}}),Quadratic:Object.freeze({In:function(v){return v*v},Out:function(v){return v*(2-v)},InOut:function(v){return(v*=2)<1?.5*v*v:-.5*(--v*(v-2)-1)}}),Cubic:Object.freeze({In:function(v){return v*v*v},Out:function(v){return--v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v:.5*((v-=2)*v*v+2)}}),Quartic:Object.freeze({In:function(v){return v*v*v*v},Out:function(v){return 1- --v*v*v*v},InOut:function(v){return(v*=2)<1?.5*v*v*v*v:-.5*((v-=2)*v*v*v-2)}}),Quintic:Object.freeze({In:function(v){return v*v*v*v*v},Out:function(v){return--v*v*v*v*v+1},InOut:function(v){return(v*=2)<1?.5*v*v*v*v*v:.5*((v-=2)*v*v*v*v+2)}}),Sinusoidal:Object.freeze({In:function(v){return 1-Math.sin((1-v)*Math.PI/2)},Out:function(v){return Math.sin(v*Math.PI/2)},InOut:function(v){return .5*(1-Math.sin(Math.PI*(.5-v)))}}),Exponential:Object.freeze({In:function(v){return v===0?0:Math.pow(1024,v-1)},Out:function(v){return v===1?1:1-Math.pow(2,-10*v)},InOut:function(v){return v===0?0:v===1?1:(v*=2)<1?.5*Math.pow(1024,v-1):.5*(-Math.pow(2,-10*(v-1))+2)}}),Circular:Object.freeze({In:function(v){return 1-Math.sqrt(1-v*v)},Out:function(v){return Math.sqrt(1- --v*v)},InOut:function(v){return(v*=2)<1?-.5*(Math.sqrt(1-v*v)-1):.5*(Math.sqrt(1-(v-=2)*v)+1)}}),Elastic:Object.freeze({In:function(v){return v===0?0:v===1?1:-Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI)},Out:function(v){return v===0?0:v===1?1:Math.pow(2,-10*v)*Math.sin((v-.1)*5*Math.PI)+1},InOut:function(v){return v===0?0:v===1?1:(v*=2,v<1?-.5*Math.pow(2,10*(v-1))*Math.sin((v-1.1)*5*Math.PI):.5*Math.pow(2,-10*(v-1))*Math.sin((v-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(v){var e=1.70158;return v===1?1:v*v*((e+1)*v-e)},Out:function(v){var e=1.70158;return v===0?0:--v*v*((e+1)*v+e)+1},InOut:function(v){var e=2.5949095;return(v*=2)<1?.5*(v*v*((e+1)*v-e)):.5*((v-=2)*v*((e+1)*v+e)+2)}}),Bounce:Object.freeze({In:function(v){return 1-Easing.Bounce.Out(1-v)},Out:function(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375},InOut:function(v){return v<.5?Easing.Bounce.In(v*2)*.5:Easing.Bounce.Out(v*2-1)*.5+.5}}),generatePow:function(v){return v===void 0&&(v=4),v=v<Number.EPSILON?Number.EPSILON:v,v=v>1e4?1e4:v,{In:function(e){return Math.pow(e,v)},Out:function(e){return 1-Math.pow(1-e,v)},InOut:function(e){return e<.5?Math.pow(e*2,v)/2:(1-Math.pow(2-e*2,v))/2+.5}}}}),now=function(){return performance.now()},Group$1=function(){function v(){this._tweens={},this._tweensAddedDuringUpdate={}}return v.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},v.prototype.removeAll=function(){this._tweens={}},v.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},v.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},v.prototype.update=function(e,r){e===void 0&&(e=now()),r===void 0&&(r=!1);var o=Object.keys(this._tweens);if(o.length===0)return!1;for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var V=0;V<o.length;V++){var le=this._tweens[o[V]],fe=!r;le&&le.update(e,fe)===!1&&!r&&delete this._tweens[o[V]]}o=Object.keys(this._tweensAddedDuringUpdate)}return!0},v}(),Interpolation={Linear:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),le=Interpolation.Utils.Linear;return e<0?le(v[0],v[1],o):e>1?le(v[r],v[r-1],r-o):le(v[V],v[V+1>r?r:V+1],o-V)},Bezier:function(v,e){for(var r=0,o=v.length-1,V=Math.pow,le=Interpolation.Utils.Bernstein,fe=0;fe<=o;fe++)r+=V(1-e,o-fe)*V(e,fe)*v[fe]*le(o,fe);return r},CatmullRom:function(v,e){var r=v.length-1,o=r*e,V=Math.floor(o),le=Interpolation.Utils.CatmullRom;return v[0]===v[r]?(e<0&&(V=Math.floor(o=r*(1+e))),le(v[(V-1+r)%r],v[V],v[(V+1)%r],v[(V+2)%r],o-V)):e<0?v[0]-(le(v[0],v[0],v[1],v[1],-o)-v[0]):e>1?v[r]-(le(v[r],v[r],v[r-1],v[r-1],o-r)-v[r]):le(v[V?V-1:0],v[V],v[r<V+1?r:V+1],v[r<V+2?r:V+2],o-V)},Utils:{Linear:function(v,e,r){return(e-v)*r+v},Bernstein:function(v,e){var r=Interpolation.Utils.Factorial;return r(v)/r(e)/r(v-e)},Factorial:function(){var v=[1];return function(e){var r=1;if(v[e])return v[e];for(var o=e;o>1;o--)r*=o;return v[e]=r,r}}(),CatmullRom:function(v,e,r,o,V){var le=(r-v)*.5,fe=(o-e)*.5,Le=V*V,Ce=V*Le;return(2*e-2*r+le+fe)*Ce+(-3*e+3*r-2*le-fe)*Le+le*V+e}}},Sequence=function(){function v(){}return v.nextId=function(){return v._nextId++},v._nextId=0,v}(),mainGroup=new Group$1,Tween=function(){function v(e,r){r===void 0&&(r=mainGroup),this._object=e,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Easing.Linear.None,this._interpolationFunction=Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Sequence.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return v.prototype.getId=function(){return this._id},v.prototype.isPlaying=function(){return this._isPlaying},v.prototype.isPaused=function(){return this._isPaused},v.prototype.getDuration=function(){return this._duration},v.prototype.to=function(e,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},v.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},v.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},v.prototype.start=function(e,r){if(e===void 0&&(e=now()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var V={};for(var le in this._valuesEnd)V[le]=this._valuesEnd[le];this._valuesEnd=V}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},v.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},v.prototype._setupProperties=function(e,r,o,V,le){for(var fe in o){var Le=e[fe],Ce=Array.isArray(Le),Re=Ce?"array":typeof Le,Pe=!Ce&&Array.isArray(o[fe]);if(!(Re==="undefined"||Re==="function")){if(Pe){var ze=o[fe];if(ze.length===0)continue;for(var Fe=[Le],ke=0,Gt=ze.length;ke<Gt;ke+=1){var Vt=this._handleRelativeValue(Le,ze[ke]);if(isNaN(Vt)){Pe=!1,console.warn("Found invalid interpolation list. Skipping.");break}Fe.push(Vt)}Pe&&(o[fe]=Fe)}if((Re==="object"||Ce)&&Le&&!Pe){r[fe]=Ce?[]:{};var Zt=Le;for(var xt in Zt)r[fe][xt]=Zt[xt];V[fe]=Ce?[]:{};var ze=o[fe];if(!this._isDynamic){var Xt={};for(var xt in ze)Xt[xt]=ze[xt];o[fe]=ze=Xt}this._setupProperties(Zt,r[fe],ze,V[fe],le)}else(typeof r[fe]=="undefined"||le)&&(r[fe]=Le),Ce||(r[fe]*=1),Pe?V[fe]=o[fe].slice().reverse():V[fe]=r[fe]||0}}},v.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},v.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},v.prototype.pause=function(e){return e===void 0&&(e=now()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},v.prototype.resume=function(e){return e===void 0&&(e=now()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},v.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},v.prototype.group=function(e){return e===void 0&&(e=mainGroup),this._group=e,this},v.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},v.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},v.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},v.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},v.prototype.easing=function(e){return e===void 0&&(e=Easing.Linear.None),this._easingFunction=e,this},v.prototype.interpolation=function(e){return e===void 0&&(e=Interpolation.Linear),this._interpolationFunction=e,this},v.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},v.prototype.onStart=function(e){return this._onStartCallback=e,this},v.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},v.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},v.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},v.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},v.prototype.onStop=function(e){return this._onStopCallback=e,this},v.prototype.update=function(e,r){var o;if(e===void 0&&(e=now()),r===void 0&&(r=!0),this._isPaused)return!0;var V=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>V)return!1;r&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var le=e-this._startTime,fe=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),Le=this._duration+this._repeat*fe,Ce=this._calculateElapsedPortion(le,fe,Le),Re=this._easingFunction(Ce),Pe=this._calculateCompletionStatus(le,fe);if(Pe==="repeat"&&this._processRepetition(le,fe),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,Re),Pe==="about-to-repeat"&&this._processRepetition(le,fe),this._onUpdateCallback&&this._onUpdateCallback(this._object,Ce),Pe==="repeat"||Pe==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(Pe==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var ze=0,Fe=this._chainedTweens.length;ze<Fe;ze++)this._chainedTweens[ze].start(this._startTime+this._duration,!1)}return Pe!=="completed"},v.prototype._calculateElapsedPortion=function(e,r,o){if(this._duration===0||e>o)return 1;var V=e%r,le=Math.min(V/this._duration,1);return le===0&&e!==0&&e%this._duration===0?1:le},v.prototype._calculateCompletionStatus=function(e,r){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},v.prototype._processRepetition=function(e,r){var o=Math.min(Math.trunc((e-this._duration)/r)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=o);for(var V in this._valuesStartRepeat){var le=this._valuesEnd[V];!this._yoyo&&typeof le=="string"&&(this._valuesStartRepeat[V]=this._valuesStartRepeat[V]+parseFloat(le)),this._yoyo&&this._swapEndStartRepeatValues(V),this._valuesStart[V]=this._valuesStartRepeat[V]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=r*o},v.prototype._updateProperties=function(e,r,o,V){for(var le in o)if(r[le]!==void 0){var fe=r[le]||0,Le=o[le],Ce=Array.isArray(e[le]),Re=Array.isArray(Le),Pe=!Ce&&Re;Pe?e[le]=this._interpolationFunction(Le,V):typeof Le=="object"&&Le?this._updateProperties(e[le],fe,Le,V):(Le=this._handleRelativeValue(fe,Le),typeof Le=="number"&&(e[le]=fe+(Le-fe)*V))}},v.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},v.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],o=this._valuesEnd[e];typeof o=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(o):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},v}(),VERSION$1="23.1.2",nextId=Sequence.nextId,TWEEN=mainGroup,getAll=TWEEN.getAll.bind(TWEEN),removeAll=TWEEN.removeAll.bind(TWEEN),add=TWEEN.add.bind(TWEEN),remove=TWEEN.remove.bind(TWEEN),update=TWEEN.update.bind(TWEEN),exports$1={Easing,Group:Group$1,Interpolation,now,Sequence,nextId,Tween,VERSION:VERSION$1,getAll,removeAll,add,remove,update};const tween_esm=Object.freeze(Object.defineProperty({__proto__:null,Easing,Group:Group$1,Interpolation,Sequence,Tween,VERSION:VERSION$1,add,default:exports$1,getAll,nextId,now,remove,removeAll,update},Symbol.toStringTag,{value:"Module"}));/**
3
3
  * @license
4
4
  * Copyright 2010-2025 Three.js Authors
5
5
  * SPDX-License-Identifier: MIT
@@ -5363,4 +5363,4 @@ version 0.8.2
5363
5363
  <div class="text-white text-opacity-80 text-center leading-[1] text-sm whitespace-nowrap">
5364
5364
  ${v}
5365
5365
  </div>
5366
- `,e},worldPacificCentre=v=>{v.loaderAdd=function(){const e=this.loader;e.add(["/image/map/jianbian.webp"]),e.add(["/image/map/hp2.webp","/image/map/fx2.webp"])},v.initMaterial=function(){return B0(this,null,function*(){const e=this.loader,r=this.mList,o=(()=>{const V=e.getAsset("/image/map/hp2.webp");V.center.set(.5,.5),V.repeat.set(.97,1.01);const le=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp2.webp"),normalMap:e.getAsset("/image/map/fx2.webp"),normalScale:new Vector2(2,1)}),fe=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),Le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),Ce=new kt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:le,sideMat:fe,lineMat:Le,extrudeLineMat:v.options.extrudeLine?Ce:null}})();r.addMultiple("plane",o)})}},world=v=>{if(v.options.lineOffset=.02,delete v.extendsOptions.handleBackKeepCamvasState,v.extendsOptions.extrudeLine=()=>v.options.extrudeLine,v.extendsOptions.worldPacificCentre=()=>v.options.worldPacificCentre,v.options.worldPacificCentre){worldPacificCentre(v);return}v.initMaterial=function(){return B0(this,null,function*(){const e=this.mList,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:"#0d2425"}),V=new MeshBasicMaterial({name:"侧面",color:"#0d2425"}),le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new kt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:v.options.extrudeLine?fe:null}})();e.addMultiple("plane",r)})}},china=v=>{v.options.lineOffset=.005,v.loaderAdd=function(){return B0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp","/image/map/hp.webp","/image/map/shuchu2.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return B0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp.webp"),normalMap:e.getAsset("/image/map/shuchu2.webp")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new kt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},base$1=v=>{v.loaderAdd=function(){return B0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return B0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:new Color$1("#0d2425")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new kt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},cityOnMap=v=>{v.extendsOptions={mapDepth:v.options.mapDepth,parentBg:v.options.parentBg,continentsBg:v.options.continentsBg,continentsBgDepth:v.options.continentsBgDepth,mergeSide:v.options.mergeSide,handleBackKeepCamvasState:v.options.handleBackKeepCamvasState,mapBoundary:v.options.mapBoundary,showBuilding:v.options.showBuilding,showRoad:v.options.showRoad,showGrassland:v.options.showGrassland,showRiver:v.options.showRiver,buildingSideGradient:v.options.buildingSideGradient,buildingHasSide:v.options.buildingHasSide,setWaterMaterial:v.options.setWaterMaterial,showCityOnMapInnerLine:v.options.showCityOnMapInnerLine},v.options.parentBg&&(v.extendsOptions.parentBgDepth=()=>v.options.parentBgDepth),v.loaderAdd=function(){this.loader.add(["/image/map2/side.png"])},v.initMaterial=function(){return B0(this,null,function*(){const r=this.loader,o=(()=>{const V=new MeshBasicMaterial({name:"板块顶面",color:"#094253"}),le=new MeshBasicMaterial({name:"板块侧面",map:r.getAsset("/image/map2/side.png"),side:DoubleSide}),fe=new kt({name:"板块边框",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1}),Le=new kt({name:"板块内线",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1});return{topMat:V,sideMat:le,lineMat:Le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",o),this.initMaterialBg()})};const e=v.init.bind(v);v.init=function(){return B0(this,null,function*(){yield e(),yield this.initCityOnMap(this.mapInfo.adcode)})}},base=v=>{if(v.initMaterialBg=function(){return B0(this,null,function*(){const e=this.getRoomEnvMap();if(this.options.parentBg){if(this.options.adcode!==1e5){const o=(()=>{const V=new MeshStandardMaterial({name:"父级顶面",color:"#031529",emissive:"#010f1f",envMap:e}),le=new MeshBasicMaterial({name:"父级侧面",color:"#064d73",side:DoubleSide}),fe=new kt({name:"父级板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:V,sideMat:le,lineMat:fe}})();this.mList.addMultiple("parentPlane",o)}const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",color:"#031529",emissive:"#010f1f",envMap:e}),V=new MeshBasicMaterial({name:"世界侧面",color:"#064d73",side:DoubleSide}),le=new kt({name:"世界板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("worldPlane",r)}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#235278"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),le=new kt({name:"大洲板块线",color:new Color$1("#1488e0"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("continents",r)}})},v.options.style==="map2CityOnMap"){cityOnMap(v);return}v.loaderAdd=function(){return B0(this,null,function*(){this.loaderAddBg()})},v.initMaterial=function(){return B0(this,null,function*(){const e=(()=>{const r=new MeshBasicMaterial({name:"板块顶面",color:new Color$1("#064773")}),o=new MeshBasicMaterial({name:"板块侧面",color:new Color$1("#064d73"),side:DoubleSide}),V=new kt({name:"板块线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1}),le=new kt({name:"板块边框线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1});return{topMat:r,sideMat:o,lineMat:V,extrudeLineMat:le}})();this.mList.addMultiple("plane",e),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.initMaterialBg()})}},getAdcodeShowLevel=(v,e=!0)=>{if(v===0)return"world";if(v===1e5)return"country";if(/^\d{6}$/.test(`${v}`)){const{level:r,parent:o}=findAdcodeInfo(v),V=o&&findAdcodeInfo(o).level;return r==="district"&&V==="province"&&e?"city":r}else if(continentsType.find(r=>r.adcode===v))return"continent"},Ln=class Ln extends Base{constructor(){super(...arguments);C0(this,"leadObjs",objs);C0(this,"mapHistory",[]);C0(this,"activePlaneMap",null);C0(this,"isAnimating",!1);C0(this,"parentBg",[]);C0(this,"continentsBg");C0(this,"group");C0(this,"projection");C0(this,"pcenter",[104,37.5]);C0(this,"pscale",5e4/1e3);C0(this,"meters");C0(this,"cityVis",[]);C0(this,"extendsOptions",{mapDepth:()=>this.getOptionsDepth(this.options.adcode),equirectangular:()=>this.options.projectionType==="equirectangular",mapBoundary:()=>this.options.mapBoundary,mergeSide:()=>this.options.mergeSide});C0(this,"initSettingsObj",{label:!1,labelLite:!1,shadowMap:!1});C0(this,"caId");C0(this,"shadowMapLight");C0(this,"planeShadow")}get mapObj(){return this.mapHistory[this.mapHistory.length-1]}get map(){var r;return(r=this.mapObj)==null?void 0:r.map}get mapInfo(){var r;return(r=this.mapObj)==null?void 0:r.mapInfo}get mapArea(){var r;return(r=this.map)==null?void 0:r.areaArr}get mapLine(){var r;return(r=this.map)==null?void 0:r.lineArr}get adcodes(){return this.mapHistory.map(r=>r.mapInfo.adcode)}setOptions(r){r.continentType;const o=gi(gi({0:worldExclATAJson,1e5:chinaJson},continentsJson),r==null?void 0:r.geojsonMap);let V=gi({0:worldExclATALiteJson,1e5:chinaLiteJson},continentsLiteJson);Object.keys(o).forEach(le=>{le!=="100000"&&/^\d{6}$/.test(le)&&o[+le].features.forEach(Le=>{const Ce=Le.properties.adcode;V[Ce]={type:"FeatureCollection",features:[Le]}})}),V=gi(gi({},V),r==null?void 0:r.extrudeLineGeojsonMap),super.setOptions(qi(gi({parentBg:!1,continents:"",continentsBg:!1,continentsBgDepth:0,parentBgDepth:0,topSegments:0,clickHandleDrillDown:!1,drillDownSecondLevelMats:!1,drillDownFirstLevelUseBgMats:!1,drillDownThirdLevelMats:!1,clickOusideBack:!0,mapDepth:[1,.4,.2],mapPadding:[100,100,100,100],plateInCenter:!0,drillDownPlateInCenter:!0,drillDownHideParent:!1,showOneLevel:!1,drillDownRestrictions:"district",showDistrict:!0,showLabel:!1,lineWidth:.6,lineOffset:0,extrudeLineWidth:1.8,extrudeLine:!0,equirectangular:!1,winkel3:!1,projectionType:"mercator",polarAngle:r.style==="map2CityOnMap"?Math.PI/180*60:Math.PI/180*120,azimuthAngle:0,handleBackKeepCamvasState:!1,worldPacificCentre:!1,mapBoundary:!0,mergeSide:!1,bottomPlane:!1,bottomPlaneWater:!1,showBuilding:!0,buildingSideGradient:!1,buildingHasSide:!0,showRoad:!0,cacheCity:!0,showGrassland:!0,showRiver:!0,setWaterMaterial:!1,showCityOnMapInnerLine:!1,nearbyCities:!1,citySSAO:!1},r),{geojsonMap:o,extrudeLineGeojsonMap:V})),this.options.equirectangular&&(this.options.projectionType="equirectangular"),this.options.winkel3&&(this.options.projectionType="winkel3"),this.options.adcode===0?this.extendsOptions.winkel3=()=>this.options.winkel3:(this.getAdcodeShowLevel(this.options.adcode)==="province"||this.getAdcodeShowLevel(this.options.adcode)==="country")&&(this.extendsOptions.clickHandleDrillDown=()=>this.options.clickHandleDrillDown,this.options.clickHandleDrillDown&&(this.extendsOptions.mapDepth=()=>Array.isArray(this.options.mapDepth)?this.options.mapDepth:new Array(3).fill(this.options.mapDepth),this.extendsOptions.drillDownFirstLevelUseBgMats=()=>this.options.drillDownFirstLevelUseBgMats,this.extendsOptions.drillDownSecondLevelMats=()=>this.options.drillDownSecondLevelMats,this.extendsOptions.drillDownThirdLevelMats=()=>this.options.drillDownThirdLevelMats,this.extendsOptions.drillDownPlateInCenter=()=>this.options.drillDownPlateInCenter,this.extendsOptions.clickOusideBack=()=>this.options.clickOusideBack,this.extendsOptions.handleBackKeepCamvasState=()=>this.options.handleBackKeepCamvasState,this.extendsOptions.showOneLevel=()=>this.options.showOneLevel,this.extendsOptions.showDistrict=()=>this.options.showDistrict,this.options.parentBg&&(this.extendsOptions.drillDownHideParent=()=>this.options.drillDownHideParent)),this.extendsOptions.parentBg=()=>this.options.parentBg,this.options.parentBg&&(this.extendsOptions.parentBgDepth=()=>this.options.parentBgDepth,this.options.adcode===1e5&&(this.extendsOptions.worldPacificCentre=()=>this.options.worldPacificCentre)),this.extendsOptions.continentsBg=()=>this.options.continentsBg,this.options.continentsBg&&(this.extendsOptions.continentsBgDepth=()=>this.options.continentsBgDepth)),this.options.adcode===0?world(this):this.options.style==="map2Base"||this.options.style==="map2CityOnMap"?base(this):this.options.adcode===1e5?china(this):base$1(this)}handleSetting(r,o){return B0(this,null,function*(){return yield _n(Ln.prototype,this,"handleSetting").call(this,r,o),r==="label"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.labelLite=!1,yield this.settings.labelLite,this.options.showLabel=!0,yield this.drawLabels()):r==="labelLite"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.label=!1,yield this.settings.label,this.options.showLabel="lite",yield this.drawLabels()):r==="shadowMap"&&(o===!1?this.shadowMapDisabled():yield this.shadowMapEnabled()),o})}init(){return B0(this,null,function*(){const{adcode:r}=this.options;this.options.center&&(this.pcenter=this.options.center),this.options.worldPacificCentre&&r===1e5&&(this.pcenter=[this.pcenter[0]-160,this.pcenter[1]]),this.projection=f({center:this.pcenter,scale:this.pscale,projectionType:this.options.projectionType,rotate:this.options.worldPacificCentre?[-160,0]:void 0}),this.meters=this.projection([1*1141e-8+this.pcenter[0],0])[0],yield this.initPencil(),console.time(`vis-core:time.${this.visName}-loader`),this.loaderAdd(),console.timeEnd(`vis-core:time.${this.visName}-loader`),yield this.loader.loadAll(),this.group=yield this.lead.draw("Group",{key:"map"+r}),this.group.object3d.name="地图",yield this.initMaterial(),yield this.initVis(r),this.options.clickHandleDrillDown&&(this.lead.handlePick(()=>this.mapArea||[],"down",({baseObject:o,mouseEvent:V})=>{(this.playing||V.metaKey||V.ctrlKey)&&this.handleClick(o)}),this.options.clickOusideBack&&this.lead.handlePick(()=>this.map?[this.map]:[],"downOutside",({mouseEvent:o})=>{(this.playing||o.metaKey||o.ctrlKey)&&this.handleClick()})),yield Promise.all(this.lead.objectsPromise)})}initCityVis(r,o=!1){return B0(this,null,function*(){var Le;(Le=this.options.fixCity)!=null&&Le[r]&&(r=this.options.fixCity[r]);const V=new City({container:this.container,editor:!1}),le=getCityConfig(r);V.setOptions({container:this.container,center:le.center,grey:o,adcode:r,cacheKey:this.options.cacheCity?`${r}`:void 0,jsonName:le.jsonName,showBuilding:this.options.showBuilding,buildingSideGradient:this.options.buildingSideGradient,buildingHasSide:this.options.buildingHasSide,showRoad:this.options.showRoad,showGrassland:this.options.showGrassland,showRiver:this.options.showRiver,setWaterMaterial:this.options.setWaterMaterial,ssao:this.options.citySSAO,pencil2:this.pencil}),yield V.init();const fe=this.projection(le.center);return fe&&V.group.position.set(fe[0],-fe[1],0),this.cityVis.push(V),this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.emit("initCityVis",r),V})}initCityOnMap(r){return B0(this,null,function*(){const o=this.getAdcodeShowLevel(r);if(o==="province")yield(yield this.initCityVis(r)).drawCityPlane(r,this.lead.group);else if(o==="city"){const V=findAdcodeInfo(r).c;let le=null;if(V.length>0)for(const fe of V)le=yield this.initCityVis(fe);else le=yield this.initCityVis(r);yield le==null?void 0:le.drawCityPlane(r,this.lead.group),this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix()}else if(o==="district"&&(yield(yield this.initCityVis(r)).drawCityPlane(r,this.lead.group),this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix(),this.options.nearbyCities)){const le=findAdcodeInfo(r).parent,fe=findAdcodeInfo(le).c;for(const Le of fe)(this.options.nearbyCities==="full"||Le!==r)&&(yield this.initCityVis(Le,!0))}this.cityVis.forEach(V=>{if(!V.options.grey){const le=this.mapObj.depth+1e-5;V.group.position.z=this.mapObj.z+le}})})}initVisBg(){return B0(this,null,function*(){let r=1e3,o=1e3;const V=new Vector3(0,0,0);if(this.options.parentBg){const le={projection:{center:this.pcenter,scale:this.pscale,rotate:[0,0],projectionType:this.options.projectionType},areaGroup:!1,depth:this.options.parentBgDepth},fe=this.options.adcode!==1e5;if(fe){const ke=this.mList.getMultiple("parentPlane"),Gt=findAdcodeInfo(this.options.adcode).parent,Vt=findAdcodeInfo(Gt),Zt=Vt.b,{res:xt}=yield this.getGeojson(Gt),Xt=yield this.lead.draw("PlaneMap",gi({key:"bg-100000",geojson:xt,bbox:Zt,materialOptions:gi({},ke)},le),this.group);Xt.object3d.name=Vt.name,Xt.lineArr.forEach(wt=>{wt.object3d.name="线",this.lead.updateBaseObjectKey(wt,{type:"100000line"}),this.initBaseObjectUserData(wt)}),Xt.areaArr.forEach(wt=>{wt.object3d.name="板块",this.lead.updateBaseObjectKey(wt,{type:"100000area"})}),Xt.position.z=-this.options.parentBgDepth,this.parentBg.push(Xt)}const Le=this.mList.getMultiple("worldPlane"),Ce=this.options.geojsonMap[0],Re=findAdcodeInfo(0).b,Pe=yield this.lead.draw("PlaneMap",qi(gi({key:"bg-0",geojson:qi(gi({},Ce),{features:[...Ce.features.filter(ke=>fe?ke.properties.iso_a3!=="CHN":!0)]}),bbox:Re,materialOptions:gi({},Le)},le),{projection:qi(gi({},le.projection),{rotate:this.options.worldPacificCentre?[-160,0]:void 0})}),this.group);Pe.object3d.name="世界",Pe.lineArr.forEach(ke=>{ke.object3d.name="线",this.lead.updateBaseObjectKey(ke,{type:"worldline"}),this.initBaseObjectUserData(ke)}),Pe.areaArr.forEach(ke=>{ke.object3d.name="板块",this.lead.updateBaseObjectKey(ke,{type:"worldarea"})}),Pe.position.z=-this.options.parentBgDepth,this.parentBg.push(Pe);const{center:ze,size:Fe}=Pe.getSize();r=Fe.x,o=Fe.y,V.set(ze.x,ze.y,0)}if(this.options.continentsBg){if(this.continentsBg=yield this.lead.draw("ContinentsBg",{depth:this.options.continentsBgDepth,scale:this.pscale},this.group),this.options.style!=="map2CityOnMap"&&this.options.style!=="map2Base"){const le=this.getLocationPosition([104,37.5]);this.continentsBg.position.set(...le)}this.continentsBg.position.z=.1}if(this.options.bottomPlane){const le=yield this.lead.draw("CityPlane",{width:r,height:o,color:"#0f1e57"},this.group);le.object3d.name="地图底面",this.lead.updateBaseObjectKey(le,{type:"map-plane"}),this.options.bottomPlaneWater&&le.addWater(),le.position.copy(V),le.position.z-=.1}})}initVis(r){return B0(this,null,function*(){var o;if(yield this.setAdcode({adcodes:[r],duration:0}),this.options.style!=="map2Base"&&this.options.style!=="map2CityOnMap"){const V=yield this.lead.draw("Light",{type:"SpotLight",color:this.options.adcode===0?"#82d9f2":"#c1e6dd",intensity:3,distance:0,angle:this.options.continentsBg?1:.5,penumbra:1,decay:0}),le=this.pencil.cameraPositon,fe=this.pencil.cameraTarget;V==null||V.spotLight.position.copy(le),V==null||V.spotLight.target.position.copy(fe)}if(this.options.mapBoundary){const V=new Box3().setFromObject((o=this.map)==null?void 0:o.object3d);this.pencil.controls.setBoundary(V)}yield this.initVisBg()})}loaderAddBg(){this.options.bottomPlaneWater&&this.loader.add(["/image/water/normalMap0.jpg","/image/water/normalMap1.jpg"],{})}initMaterialBg(){return B0(this,null,function*(){if(this.options.parentBg){const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",emissive:"#081417",color:"#000000"}),V=new MeshBasicMaterial({name:"世界侧面",color:"#051714",side:DoubleSide}),le=new kt({name:"世界线",color:new Color$1("#50766E"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("worldPlane",r),this.options.adcode!==1e5&&(this.mList.copyMultiple("worldPlane","parentPlane"),Object.values(this.mList.getMultiple("parentPlane")).forEach(o=>{o.name=o.name.replace("世界","父级")}))}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#154532"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),le=new kt({name:"大洲板块线",color:new Color$1("#09e6c1"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("continents",r)}})}consoleMousePostion(){this.addListener(this.container,"click",r=>{var le,fe;const o=this.unproject(r,this.mapObj.z+this.mapObj.depth),V=(fe=(le=this.projection).invert)==null?void 0:fe.call(le,[o.x,-o.y]);console.log("consoleMousePostion.postion",o),console.log("consoleMousePostion.lnglat",V)})}setAreaMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.areaArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#topMat");V!=="origin"&&(Le=fe.material[0].clone(),V.color&&Le.color.set(V.color),V.emissive&&(Le.emissive.set(V.emissive),Le.emissiveIntensity=V.emissiveIntensity||1)),fe.material[0]=Le}}setLineMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.lineArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#lineMat");V!=="origin"&&(Le=fe.material.clone(),V.color&&Le.color.set(V.color),V.width&&(Le.lineWidth=V.width)),fe.material=Le}}addAreaPlaneByProperty(r,o,V){return B0(this,null,function*(){if(!this.map)return;const fe=this.map.options.geojson.features.find(Le=>Le.properties&&Le.properties[r]===o);if(fe){let Le=V.material,Ce=V.sideMaterial;if(y(V.sideMaterial)&&(Ce=new MeshBasicMaterial(gi({},V.sideMaterial))),y(V.material)&&(Le=new MeshBasicMaterial(gi({},V.material))),V.area){const ze=this.objectByUuid(V.area);ze&&([Le,Ce]=ze.material)}let Re=V.lineMaterial;if(y(V.lineMaterial)&&(Re=new kt(gi({},V.lineMaterial))),V.line){const ze=this.objectByUuid(V.line);ze&&(Re=ze.material)}const Pe=yield this.lead.draw("PlaneMap",{geojson:{type:"FeatureCollection",features:[fe]},depth:V.depth||0,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:{topMat:Le,lineMat:Re,sideMat:Ce},areaGroup:!1},this.group);if(Pe.position.z=this.mapObj.z+this.mapObj.depth+.01,V.lineBloom&&Pe.lineArr.forEach(ze=>{ze.enableBloom()}),V.area){Pe.position.z=0;const ze=this.baseObjectByUuid(V.area);Pe.areaArr.forEach(Fe=>{ze!=null&&ze.isBloom&&Fe.enableBloom(),Fe.scale.z=ze.scale.z,Fe.position.z=ze.position.z})}if(V.line){const ze=this.baseObjectByUuid(V.line);Pe.lineArr.forEach(Fe=>{ze!=null&&ze.isBloom&&Fe.enableBloom(),Fe.position.z=ze.position.z})}return Pe}})}showAction(){return B0(this,null,function*(){_n(Ln.prototype,this,"showAction").call(this),this.useSaveCamera(`map-${this.options.adcode}`);const r=this.lead.group;if(this.mapHistory[0]){const{stop:o,start:V}=sinusoidalInOut({onUpdate:le=>{if(!this.mapHistory[0]){o();return}r.position.z=-this.mapHistory[0].depth*(1-le)}});yield V(),this.saveCamvasState("controls",0)}})}hide(){return B0(this,null,function*(){if(!this.showState)return;const r=this.lead.group;yield sinusoidalInOut({onUpdate:o=>{r.position.z=-this.mapHistory[0].depth*o}}).start(),setTimeout(()=>{_n(Ln.prototype,this,"hide").call(this)})})}shadowMapEnabled(){return B0(this,null,function*(){if(this.pencil.scene.userData.shadowMapEnabled)return;this.pencil.scene.userData.shadowMapEnabled=!0;const r=yield this.lead.draw("Light",{type:"SpotLight",color:"#c1e6dd",intensity:1,distance:0,angle:.5,penumbra:1,decay:0});this.lead.updateBaseObjectKey(r,{type:"ShadowSpotLight"}),this.shadowMapLight=r,r.object3d.position.set(.281,32.487,43.077),r.object3d.castShadow=!0;const o=yield this.lead.draw("PlaneShadow");this.planeShadow=o})}shadowMapDisabled(){this.pencil.scene.userData.shadowMapEnabled&&(this.pencil.scene.userData.shadowMapEnabled=!1,this.shadowMapLight&&(this.shadowMapLight.erase(),this.shadowMapLight=void 0),this.planeShadow&&(this.planeShadow.erase(),this.planeShadow=void 0))}getOptionsDepth(r){const o=this.getAdcodeShowLevel(r);let V=this.options.mapDepth;Array.isArray(V)||(V=new Array(3).fill(V));let le;return o==="country"?le=V[0]:o==="province"?le=V[1]:le=V[2],le}getDepth(r,o){let V=this.getOptionsDepth(r);if(this.options.depthReference){const le=this.options.depthReference,fe=findAdcodeInfo(r).b;V=V*this.getReferenceScale(le,fe)}else if(this.mapHistory.length){const le=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b,fe=this.getReferenceScale(le,o);V=V*fe}return V}getReferenceScale(r,o){const V=Math.abs(o[3]-o[1])/Math.abs(r[3]-r[1]),le=Math.abs(o[2]-o[0])/Math.abs(r[2]-r[0]);return Math.max(V,le)}getAdcodeShowLevel(r,o=!0){var V;return(V=this.options.fixCity)!=null&&V[r]&&(r=this.options.fixCity[r]),getAdcodeShowLevel(r,o)}handleClick(r){const{drillDownRestrictions:o}=this.options;this.isAnimating||(r&&r.userData.adcode?this.getAdcodeShowLevel(r.userData.adcode,!1)!==o?this.showMap({adcode:r.userData.adcode}):this.emit("drilldownRestrictions",r.userData.adcode):!r&&this.mapHistory.length>1&&this.showMap({adcode:this.adcodes.at(-2)}))}beforeShowMap(r){return!0}getAdcodes(r){var le;const o=[];let V=r;for(;V&&(o.unshift(V),V!==this.options.adcode);)V=(le=findAdcodeInfo(V))==null?void 0:le.parent;return o}showMap(le){return B0(this,arguments,function*({adcode:r,adcodes:o,duration:V=1e3}){const fe=o||this.getAdcodes(r);(yield this.beforeShowMap(fe))!==!1&&(this.emit("beforeDrillDown",[...fe]),yield this.setAdcode({adcodes:fe,duration:V}),this.emit("afterDrillDown",[...fe]))})}drawLabels(){return B0(this,null,function*(){var V;const r=this.options.showLabel;if(!((V=this.mapArea)!=null&&V.length)||!r)return;let o=this.lead.getObject("Group",{key:"mapLabel"});o||(o=yield this.lead.draw("Group",{key:"mapLabel"},this.group),o.object3d.name="地图标签组",yield Promise.all(this.mapArea.map(le=>B0(this,null,function*(){let{name:fe,adcode:Le,centroid:Ce}=le.userData;const{DistrictID:Re,DistName:Pe,iso_a2:ze,center:Fe}=le.userData;if(Le=Le||ze||Re,Ce=Ce||Fe,fe=fe||Pe,!Ce)return;const ke=this.getLocationPosition(Ce);if(this.lead.getObject("Node",{key:`mapLabel-${Le}`})||!ke)return;const[Gt,Vt,Zt]=ke;let xt=fe;r==="lite"&&xt&&(xt=fe.replace(/自治州|地区|自治区|省|市|壮族|特别行政区|回族|维吾尔/g,""));const Xt=xt&&getLabelElement(xt),wt=xt!=null&&xt.startsWith("澳门")?-1:0;yield this.lead.draw("Node",{position:new Vector3(Gt,Vt+wt,Zt),children:Xt,key:`$p:-${this.options.adcode===0?fe:Le}`},o)}))))})}eraseLabels(){const r=this.lead.getObject("Group",{key:"mapLabel"});r==null||r.erase()}geAdcodePosition(r){var V;const o=(V=this.mapArea)==null?void 0:V.find(le=>le.userData.adcode===r);if(o){const{centroid:le,center:fe}=o.userData;return this.getLocationPosition(le||fe)}}getLocationPosition(r){const[o,V]=r,[le,fe]=this.projection([o,V]);return[le,-fe,this.mapObj?this.mapObj.z+this.mapObj.depth:0]}setObjectOnMap(r,o,V=0){const le=this.getLocationPosition(o);r.position.set(le[0],le[1],le[2]+V)}setObjectOnMapAreaByProperty(r,o,V,le=0){var Le;const fe=(Le=this.mapArea)==null?void 0:Le.find(Ce=>Ce.userData[o]===V);if(fe){const{centroid:Ce,center:Re}=fe.userData,Pe=this.getLocationPosition(Ce||Re);r.position.set(Pe[0],Pe[1],Pe[2]+le)}}getAdcodeScreenPosition(r){const o=this.geAdcodePosition(r);if(o){const[V,le,fe]=o,Le=new Vector3(V,le,fe);Le.project(this.pencil.camera);const{width:Ce,height:Re}=this.pencil.getSize(),Pe=(Le.x*.5+.5)*Ce,ze=(Le.y*-.5+.5)*Re;return{x:Pe,y:ze}}}booleanPointInCn(r){return chinaLiteJson.features[0].geometry.coordinates.some(o=>turf.booleanPointInPolygon(turf.point(r),turf.polygon(o)))}booleanPointInMap(r,o){var Le,Ce;const V=o!=null?o:(Le=this.mapInfo)==null?void 0:Le.adcode;if(!V)return!1;const le=findAdcodeInfo(V);if(le!=null&&le.b){const[Re,Pe,ze,Fe]=le.b,[ke,Gt]=r;if(ke<Re||ke>ze||Gt<Pe||Gt>Fe)return!1}const fe=(Ce=this.options.extrudeLineGeojsonMap)==null?void 0:Ce[V];return fe?fe.features.some(Re=>{const Pe=Re.geometry.coordinates;return Re.geometry.type==="Polygon"?Pe.some(ze=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([ze]))):Re.geometry.type==="MultiPolygon"?Pe.some(ze=>ze.some(Fe=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([Fe])))):!1}):!1}getGeojson(r,o=!1){return B0(this,null,function*(){var V,le,fe,Le;return o?this.options.extrudeLine?(fe=this.options.extrudeLineGeojsonMap)!=null&&fe[r]?{res:(Le=this.options.extrudeLineGeojsonMap)==null?void 0:Le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json-lite/${r}.json`):{res:void 0}:(V=this.options.geojsonMap)!=null&&V[r]?{res:(le=this.options.geojsonMap)==null?void 0:le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json/${r}.json`)})}handleDrillDown(Le){return B0(this,arguments,function*({adcode:r,duration:o,handleLook:V,saveBackCamvasState:le,extrudelineBloom:fe}){var Ce,Re,Pe,ze,Fe;if(typeof r!="undefined"&&!this.isAnimating){const ke=(Ce=this.map)==null?void 0:Ce.findGroup(r,!0),Gt=findAdcodeInfo(+r);if(this.isAnimating||!Gt)return;this.isAnimating=!0;const{name:Vt}=Gt;let{res:Zt}=yield this.getGeojson(r),{res:xt}=yield this.getGeojson(r,!0);if(!this.options.showDistrict&&this.getAdcodeShowLevel(r)==="city"&&(Zt=xt,xt=void 0),[Zt,xt].filter(Boolean).forEach(wt=>{if(!wt.features[0].properties.adcode&&/^\d{6}$/.test(`${r}`)){const Wt=findAdcodeInfo(r);wt.features[0].properties=qi(gi(gi({},wt.features[0].properties),Wt),{center:[Wt.lng,Wt.lat]})}}),Zt){const wt=this.options.plateInCenter&&(this.mapHistory.length<1||this.options.drillDownPlateInCenter);if((Re=this.options.fixGeojson)!=null&&Re[r]){const e0=(Pe=this.options.fixGeojson)==null?void 0:Pe[r];if(e0.startsWith("-")){const o0=+e0.slice(1);Zt.features=Zt.features.filter(b0=>b0.properties.adcode!==o0)}}let Wt=findAdcodeInfo(r).b;const It=[...Wt];this.mapHistory.length===1&&!this.options.drillDownSecondLevelMats?Wt=findAdcodeInfo(this.mapInfo.adcode).b:this.mapHistory.length===2&&!this.options.drillDownThirdLevelMats&&(this.options.drillDownSecondLevelMats?Wt=findAdcodeInfo(this.mapInfo.adcode).b:Wt=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b),this.eraseLabels(),this.map&&(this.options.drillDownHideParent&&this.parentBg.forEach(e0=>{e0.hide()}),this.options.showOneLevel?this.map.hide():this.map.deactive(),le&&this.saveCamvasState("userControls",-1));const Nt=this.mapHistory.length,Ft=Nt-1,Ht=this.getDepth(r,It),Kt=(ze=this.mapHistory[Ft])==null?void 0:ze.depth,Yt=Nt===0||this.options.showOneLevel?0:this.mapHistory[Ft].z+Kt,jt=Nt===0||this.options.showOneLevel?0:Yt-Ht,n0=turf.center(Zt).geometry.coordinates,[a0,l0]=this.projection(n0),s0=yield this.drawPlaneMap({geojson:Zt,extrudeLineGeojson:xt,depth:Ht,bbox:Wt,adcode:r,extrudelineBloom:fe});ke==null||ke.hide(),s0.position.setZ(jt);const $t=s0.position.z,qt=()=>B0(this,null,function*(){yield sinusoidalInOut({onUpdate:e0=>{Yt!==$t&&(s0.position.z=$t+(Yt-$t)*e0)}}).start({duration:o})});if(wt)if(this.fixNear(r),s0.position.z=Yt,V){const e0=(Fe=this.mapHistory.at(-1))==null?void 0:Fe.controls;yield this.fitTo(s0,{z:Yt+Ht,adcode:r,enableTransition:o!==0,polarAngle:e0==null?void 0:e0.polarAngle,azimuthAngle:e0==null?void 0:e0.azimuthAngle,handleStart:()=>B0(this,null,function*(){s0.position.z=$t,yield qt()})})}else this.options.showOneLevel&&s0.hide();else yield qt();this.mapHistory.push({map:s0,mapInfo:Gt,z:Yt,depth:Ht,cX:a0,cY:-l0}),V&&this.drawLabels(),this.saveCamvasState("controls",-1)}else console.log(`${Vt}的地图数据不存在`);this.event.emit("handleDrillDown",{adcode:r,z:this.mapObj.z+this.mapObj.depth})}this.isAnimating=!1})}saveCamvasState(r,o){const V=this.mapHistory.at(o);V&&(V[r]={lookAt:[...this.pencil.cameraPositon.toArray(),...this.pencil.cameraTarget.toArray()],polarAngle:this.pencil.controls.polarAngle,azimuthAngle:this.pencil.controls.azimuthAngle})}fixNear(r){const o=this.getAdcodeShowLevel(r),V=this.pencil.options;r===0?(this.pencil.camera.near=1,this.pencil.camera.far=1e3,this.pencil.camera.updateProjectionMatrix()):(o==="country"||o==="province")&&this.pencil.camera.near!==V.camera.near*10?(this.pencil.camera.near=V.camera.near*10,this.pencil.camera.updateProjectionMatrix()):(o==="city"||o==="district")&&this.pencil.camera.near!==V.camera.near&&(this.pencil.camera.near=V.camera.near,this.pencil.camera.updateProjectionMatrix())}fitTo(Re){return B0(this,arguments,function*(r,{polarAngle:o,azimuthAngle:V,z:le,handleStart:fe,adcode:Le,enableTransition:Ce=!0}={}){if(!(r!=null&&r.object3d))return;if(Le&&(yield this.useSaveCamera(`map-${Le}`,Ce))){fe&&(yield fe());return}const Pe=this.options.mapPadding,{height:ze,width:Fe}=this.pencil.getSize();ze<Pe[0]+Pe[2]+50&&(Pe[0]=0,Pe[2]=0),Fe<Pe[1]+Pe[3]+50&&(Pe[1]=0,Pe[3]=0);const ke=o!=null?o:this.options.polarAngle,Gt=V!=null?V:this.options.azimuthAngle,Vt=this.pencil.cameraPositon.toArray(),Zt=this.pencil.cameraTarget.toArray();yield this.paddingInCssPixel(r,Pe[0],Pe[1],Pe[2],Pe[3],!1);let xt;le&&(xt=this.pencil.cameraTarget.toArray(),yield this.pencil.controls.setTarget(xt[0],xt[1],le,!1)),yield this.pencil.controls.rotateTo(Gt,ke,!1),xt=this.pencil.cameraTarget.toArray();const Xt=this.pencil.cameraPositon.toArray();yield this.lookAt(...Vt,...Zt),yield Promise.all([this.lookAt(...Xt,...xt,Ce),fe==null?void 0:fe()].filter(Boolean))})}drawPlaneMap(Ce){return B0(this,arguments,function*({geojson:r,extrudeLineGeojson:o,bbox:V,depth:le,extrudelineBloom:fe,adcode:Le}){var Vt;const Re=[this.mList.getMultiple("plane"),this.mList.getMultiple("secondPlane"),this.mList.getMultiple("thirdPlane")];let Pe=this.mapHistory.length,ze=null;for(;ze===null;)ze=Re[Pe],Pe--;const Fe=this.mList.getMultiple("bgPlane"),ke=gi(gi({},ze),Fe?{bgTopMat:Fe.topMat,bgSideMat:Fe.sideMat,bgLineMat:Fe.lineMat,bgExtrudeLineMat:Fe.extrudeLineMat}:{}),Gt=yield this.lead.draw("PlaneMap",{key:`${Le}`,geojson:r,extrudeLineGeojson:o,depth:le,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:ke,bbox:V,topSegments:this.options.topSegments,lineOffset:this.options.lineOffset,mergeSide:this.options.mergeSide},this.group);return Gt.object3d.name=((Vt=findAdcodeInfo(Le))==null?void 0:Vt.name)||`${Le}`,this.options.style==="map2CityOnMap"&&!this.options.showCityOnMapInnerLine&&(ze.lineMat.colorWrite=!1,Gt.lineArr.forEach(Zt=>{Zt.userData.selectHide=!0})),Gt.extrudelineArr&&Gt.extrudelineArr.forEach(Zt=>{Zt.object3d.name="板块边线",this.lead.updateBaseObjectKey(Zt,{type:"extrudeLine",key:this.mapHistory.length?"$p:":void 0}),this.initBaseObjectUserData(Zt),fe&&(Zt.object3d.userData.bloom=!0)}),Gt.lineArr&&Gt.lineArr.forEach(Zt=>{this.initBaseObjectUserData(Zt)}),Gt})}handleBack(){return B0(this,arguments,function*({duration:r=1e3,handleLookBack:o=!0,keepOne:V=!0}={}){if(this.isAnimating||(V?this.mapHistory.length<=1:this.mapHistory.length===0))return;this.isAnimating=!0;const le=this.mapHistory.pop();if(!this.options.drillDownPlateInCenter){const fe=le.map.position.z,Le=this.mapObj?this.mapObj.z+(this.mapObj.depth-le.depth):0;yield sinusoidalInOut({onUpdate:Ce=>{le.map.position.z=fe+(Le-fe)*Ce}}).start({duration:r})}if(this.lead.eraseWithoutMaterial(le.map),this.eraseLabels(),this.mapObj){const{map:fe}=this.mapObj,Le=fe==null?void 0:fe.findGroup(le.mapInfo.adcode,!0);Le&&Le.show(),fe&&o&&(this.options.showOneLevel?fe.show():fe.active(),this.options.drillDownHideParent&&this.parentBg.forEach(Ce=>{Ce.show()}),yield this.handleLookBack(r),this.drawLabels())}this.emit("handleBack",{adcodes:this.adcodes}),this.isAnimating=!1})}handleLookBack(r){return B0(this,null,function*(){const{userControls:o,controls:V}=this.mapObj;yield this.pencil.controls.setLookAt(...o?o.lookAt:V.lookAt,r!==0)})}compareLocations(r,o){const V=r.filter(Ce=>Ce),le=o.filter(Ce=>Ce),fe=[];let Le=0;for(let Ce=0;Ce<Math.min(V.length,le.length)&&V[Ce]===le[Ce];Ce++)Le++;for(let Ce=Le;Ce<V.length;Ce++)fe.push(-1);for(let Ce=Le;Ce<le.length;Ce++)fe.push(le[Ce]);return fe}setAdcode(V){return B0(this,arguments,function*({adcodes:r,duration:o}){var fe,Le,Ce;const{adcodes:le}=this;if(!(JSON.stringify(r)===JSON.stringify(le)||this.isAnimating))if(JSON.stringify(r)===JSON.stringify([0]))try{yield this.handleDrillDown({adcode:0,duration:o,handleLook:!0})}catch(ke){console.error(ke)}else{const{continent:ke,country:Gt,province:Vt,city:Zt,district:xt}=r.reduce((Yt,jt)=>{const n0=this.getAdcodeShowLevel(jt);return Yt[n0]=jt,Yt},{}),{continent:Xt,country:wt,province:Wt,city:It,district:Nt}=le.reduce((Yt,jt)=>{const n0=this.getAdcodeShowLevel(jt);return Yt[n0]=jt,Yt},{}),Ft=ke||Xt,Ht=(Ce=(Le=(fe=this.map)==null?void 0:fe.extrudelineArr)==null?void 0:Le[0])==null?void 0:Ce.object3d.userData.bloom,Kt=this.compareLocations([Xt,wt,Wt,It,Nt],[ke,Gt,Vt,Zt,xt]);try{for(var Re=Bn(Kt.entries()),Pe,ze,Fe;Pe=!(ze=yield Re.next()).done;Pe=!1){const[Yt,jt]=ze.value;const n0=Yt===Kt.length-1?o:0,a0=Yt===Kt.length-1;jt===-1?yield this.handleBack({duration:n0,handleLookBack:a0,keepOne:!Ft}):yield this.handleDrillDown({adcode:jt,duration:n0,handleLook:a0,saveBackCamvasState:Kt.includes(-1)?!1:this.options.handleBackKeepCamvasState,extrudelineBloom:Ht})}}catch(ze){Fe=[ze]}finally{try{Pe&&(ze=Re.return)&&(yield ze.call(Re))}finally{if(Fe)throw Fe[0]}}}})}setPadding(r,o=!1,V=!1){this.options.mapPadding=[...r],o&&this.fitTo(this.map,{enableTransition:V})}findAdcodeInfo(r){return findAdcodeInfo(r)}dispose(){var r,o,V;(r=this.editor)==null||r.events.removeAllListeners(),this.cityVis.forEach(le=>{le.dispose()}),this.cityVis.length=0,(o=this.map)==null||o.dispose(),this.parentBg.forEach(le=>{le.dispose()}),this.parentBg.length=0,(V=this.continentsBg)==null||V.dispose(),this.continentsBg=void 0,this.mapHistory.length=0,super.dispose()}};C0(Ln,"VisName","map"),C0(Ln,"getAdcodeShowLevel",getAdcodeShowLevel),C0(Ln,"findAdcodeInfo",findAdcodeInfo),C0(Ln,"findNameInfo",findNameInfo);let index=Ln;const access={set token(v){accessToken.token=v}},VERSION=version;exports.Base=Base;exports.City=City$1;exports.Earth=index$1;exports.Map=index;exports.THREE=THREE;exports.TWEEN=tween_esm;exports.VERSION=VERSION;exports.access=access;exports.animationUtils=animation;exports.getCityConfig=getCityConfig;exports.getMapConfig=getMapConfig;exports.removeCameraHistory=removeCameraHistory;
5366
+ `,e},worldPacificCentre=v=>{v.loaderAdd=function(){const e=this.loader;e.add(["/image/map/jianbian.webp"]),e.add(["/image/map/hp2.webp","/image/map/fx2.webp"])},v.initMaterial=function(){return B0(this,null,function*(){const e=this.loader,r=this.mList,o=(()=>{const V=e.getAsset("/image/map/hp2.webp");V.center.set(.5,.5),V.repeat.set(.97,1.01);const le=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp2.webp"),normalMap:e.getAsset("/image/map/fx2.webp"),normalScale:new Vector2(2,1)}),fe=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),Le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),Ce=new kt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:le,sideMat:fe,lineMat:Le,extrudeLineMat:v.options.extrudeLine?Ce:null}})();r.addMultiple("plane",o)})}},world=v=>{if(v.options.lineOffset=.02,delete v.extendsOptions.handleBackKeepCamvasState,v.extendsOptions.extrudeLine=()=>v.options.extrudeLine,v.extendsOptions.worldPacificCentre=()=>v.options.worldPacificCentre,v.options.worldPacificCentre){worldPacificCentre(v);return}v.initMaterial=function(){return B0(this,null,function*(){const e=this.mList,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:"#0d2425"}),V=new MeshBasicMaterial({name:"侧面",color:"#0d2425"}),le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new kt({name:"板块边线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:v.options.extrudeLine?fe:null}})();e.addMultiple("plane",r)})}},china=v=>{v.options.lineOffset=.005,v.loaderAdd=function(){return B0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp","/image/map/hp.webp","/image/map/shuchu2.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return B0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshStandardMaterial({name:"顶面",map:e.getAsset("/image/map/hp.webp"),normalMap:e.getAsset("/image/map/shuchu2.webp")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new kt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},base$1=v=>{v.loaderAdd=function(){return B0(this,null,function*(){this.loader.add(["/image/map/jianbian.webp"]),this.loaderAddBg()})},v.initMaterial=function(){return B0(this,null,function*(){const e=this.loader,r=(()=>{const o=new MeshBasicMaterial({name:"顶面",color:new Color$1("#0d2425")}),V=new MeshBasicMaterial({name:"侧面",map:e.getAsset("/image/map/jianbian.webp")}),le=new kt({name:"板块线",color:new Color$1("#73FEDD"),sizeAttenuation:!1,lineWidth:this.options.lineWidth,depthWrite:!1}),fe=new kt({name:"板块边线",color:new Color$1("#00FFED"),sizeAttenuation:!1,lineWidth:this.options.extrudeLineWidth,depthWrite:!1});return{topMat:o,sideMat:V,lineMat:le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",r),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.options.drillDownSecondLevelMats&&this.mList.copyMultiple("plane","secondPlane"),this.options.drillDownThirdLevelMats&&this.mList.copyMultiple("plane","thirdPlane"),this.initMaterialBg()})}},cityOnMap=v=>{v.extendsOptions={mapDepth:v.options.mapDepth,parentBg:v.options.parentBg,continentsBg:v.options.continentsBg,continentsBgDepth:v.options.continentsBgDepth,mergeSide:v.options.mergeSide,handleBackKeepCamvasState:v.options.handleBackKeepCamvasState,mapBoundary:v.options.mapBoundary,showBuilding:v.options.showBuilding,showRoad:v.options.showRoad,showGrassland:v.options.showGrassland,showRiver:v.options.showRiver,buildingSideGradient:v.options.buildingSideGradient,buildingHasSide:v.options.buildingHasSide,setWaterMaterial:v.options.setWaterMaterial,showCityOnMapInnerLine:v.options.showCityOnMapInnerLine},v.options.parentBg&&(v.extendsOptions.parentBgDepth=()=>v.options.parentBgDepth),v.loaderAdd=function(){this.loader.add(["/image/map2/side.png"])},v.initMaterial=function(){return B0(this,null,function*(){const r=this.loader,o=(()=>{const V=new MeshBasicMaterial({name:"板块顶面",color:"#094253"}),le=new MeshBasicMaterial({name:"板块侧面",map:r.getAsset("/image/map2/side.png"),side:DoubleSide}),fe=new kt({name:"板块边框",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1}),Le=new kt({name:"板块内线",color:new Color$1("#02f7eb"),lineWidth:1.8,sizeAttenuation:!1,depthTest:!1});return{topMat:V,sideMat:le,lineMat:Le,extrudeLineMat:fe}})();this.mList.addMultiple("plane",o),this.initMaterialBg()})};const e=v.init.bind(v);v.init=function(){return B0(this,null,function*(){yield e(),yield this.initCityOnMap(this.mapInfo.adcode)})}},base=v=>{if(v.initMaterialBg=function(){return B0(this,null,function*(){const e=this.getRoomEnvMap();if(this.options.parentBg){if(this.options.adcode!==1e5){const o=(()=>{const V=new MeshStandardMaterial({name:"父级顶面",color:"#031529",emissive:"#010f1f",envMap:e}),le=new MeshBasicMaterial({name:"父级侧面",color:"#064d73",side:DoubleSide}),fe=new kt({name:"父级板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:V,sideMat:le,lineMat:fe}})();this.mList.addMultiple("parentPlane",o)}const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",color:"#031529",emissive:"#010f1f",envMap:e}),V=new MeshBasicMaterial({name:"世界侧面",color:"#064d73",side:DoubleSide}),le=new kt({name:"世界板块线",color:new Color$1("#3f648c"),lineWidth:1.2,sizeAttenuation:!1});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("worldPlane",r)}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#235278"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),le=new kt({name:"大洲板块线",color:new Color$1("#1488e0"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("continents",r)}})},v.options.style==="map2CityOnMap"){cityOnMap(v);return}v.loaderAdd=function(){return B0(this,null,function*(){this.loaderAddBg()})},v.initMaterial=function(){return B0(this,null,function*(){const e=(()=>{const r=new MeshBasicMaterial({name:"板块顶面",color:new Color$1("#064773")}),o=new MeshBasicMaterial({name:"板块侧面",color:new Color$1("#064d73"),side:DoubleSide}),V=new kt({name:"板块线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1}),le=new kt({name:"板块边框线",color:new Color$1("#02BAF7"),lineWidth:1,sizeAttenuation:!1});return{topMat:r,sideMat:o,lineMat:V,extrudeLineMat:le}})();this.mList.addMultiple("plane",e),this.options.drillDownFirstLevelUseBgMats&&this.mList.copyMultiple("plane","bgPlane"),this.initMaterialBg()})}},getAdcodeShowLevel=(v,e=!0)=>{if(v===0)return"world";if(v===1e5)return"country";if(/^\d{6}$/.test(`${v}`)){const{level:r,parent:o}=findAdcodeInfo(v),V=o&&findAdcodeInfo(o).level;return r==="district"&&V==="province"&&e?"city":r}else if(continentsType.find(r=>r.adcode===v))return"continent"},Ln=class Ln extends Base{constructor(){super(...arguments);C0(this,"leadObjs",objs);C0(this,"mapHistory",[]);C0(this,"activePlaneMap",null);C0(this,"isAnimating",!1);C0(this,"parentBg",[]);C0(this,"continentsBg");C0(this,"group");C0(this,"projection");C0(this,"pcenter",[104,37.5]);C0(this,"pscale",5e4/1e3);C0(this,"meters");C0(this,"cityVis",[]);C0(this,"extendsOptions",{mapDepth:()=>this.getOptionsDepth(this.options.adcode),equirectangular:()=>this.options.projectionType==="equirectangular",mapBoundary:()=>this.options.mapBoundary,mergeSide:()=>this.options.mergeSide});C0(this,"initSettingsObj",{label:!1,labelLite:!1,shadowMap:!1});C0(this,"caId");C0(this,"shadowMapLight");C0(this,"planeShadow")}get mapObj(){return this.mapHistory[this.mapHistory.length-1]}get map(){var r;return(r=this.mapObj)==null?void 0:r.map}get mapInfo(){var r;return(r=this.mapObj)==null?void 0:r.mapInfo}get mapArea(){var r;return(r=this.map)==null?void 0:r.areaArr}get mapLine(){var r;return(r=this.map)==null?void 0:r.lineArr}get adcodes(){return this.mapHistory.map(r=>r.mapInfo.adcode)}setOptions(r){r.continentType;const o=gi(gi({0:worldExclATAJson,1e5:chinaJson},continentsJson),r==null?void 0:r.geojsonMap);let V=gi({0:worldExclATALiteJson,1e5:chinaLiteJson},continentsLiteJson);Object.keys(o).forEach(le=>{le!=="100000"&&/^\d{6}$/.test(le)&&o[+le].features.forEach(Le=>{const Ce=Le.properties.adcode;V[Ce]={type:"FeatureCollection",features:[Le]}})}),V=gi(gi({},V),r==null?void 0:r.extrudeLineGeojsonMap),super.setOptions(qi(gi({parentBg:!1,continents:"",continentsBg:!1,continentsBgDepth:0,parentBgDepth:0,topSegments:0,clickHandleDrillDown:!1,drillDownSecondLevelMats:!1,drillDownFirstLevelUseBgMats:!1,drillDownThirdLevelMats:!1,clickOusideBack:!0,mapDepth:[1,.4,.2],mapPadding:[100,100,100,100],plateInCenter:!0,drillDownPlateInCenter:!0,drillDownHideParent:!1,showOneLevel:!1,drillDownRestrictions:"district",showDistrict:!0,showLabel:!1,lineWidth:.6,lineOffset:0,extrudeLineWidth:1.8,extrudeLine:!0,equirectangular:!1,winkel3:!1,projectionType:"mercator",polarAngle:r.style==="map2CityOnMap"?Math.PI/180*60:Math.PI/180*120,azimuthAngle:0,handleBackKeepCamvasState:!1,worldPacificCentre:!1,mapBoundary:!0,mergeSide:!1,bottomPlane:!1,bottomPlaneWater:!1,showBuilding:!0,buildingSideGradient:!1,buildingHasSide:!0,showRoad:!0,cacheCity:!0,showGrassland:!0,showRiver:!0,setWaterMaterial:!1,showCityOnMapInnerLine:!1,nearbyCities:!1,citySSAO:!1},r),{geojsonMap:o,extrudeLineGeojsonMap:V})),this.options.equirectangular&&(this.options.projectionType="equirectangular"),this.options.winkel3&&(this.options.projectionType="winkel3"),this.options.adcode===0?this.extendsOptions.winkel3=()=>this.options.winkel3:(this.getAdcodeShowLevel(this.options.adcode)==="province"||this.getAdcodeShowLevel(this.options.adcode)==="country")&&(this.extendsOptions.clickHandleDrillDown=()=>this.options.clickHandleDrillDown,this.options.clickHandleDrillDown&&(this.extendsOptions.mapDepth=()=>Array.isArray(this.options.mapDepth)?this.options.mapDepth:new Array(3).fill(this.options.mapDepth),this.extendsOptions.drillDownFirstLevelUseBgMats=()=>this.options.drillDownFirstLevelUseBgMats,this.extendsOptions.drillDownSecondLevelMats=()=>this.options.drillDownSecondLevelMats,this.extendsOptions.drillDownThirdLevelMats=()=>this.options.drillDownThirdLevelMats,this.extendsOptions.drillDownPlateInCenter=()=>this.options.drillDownPlateInCenter,this.extendsOptions.clickOusideBack=()=>this.options.clickOusideBack,this.extendsOptions.handleBackKeepCamvasState=()=>this.options.handleBackKeepCamvasState,this.extendsOptions.showOneLevel=()=>this.options.showOneLevel,this.extendsOptions.showDistrict=()=>this.options.showDistrict,this.options.parentBg&&(this.extendsOptions.drillDownHideParent=()=>this.options.drillDownHideParent)),this.extendsOptions.parentBg=()=>this.options.parentBg,this.options.parentBg&&(this.extendsOptions.parentBgDepth=()=>this.options.parentBgDepth,this.options.adcode===1e5&&(this.extendsOptions.worldPacificCentre=()=>this.options.worldPacificCentre)),this.extendsOptions.continentsBg=()=>this.options.continentsBg,this.options.continentsBg&&(this.extendsOptions.continentsBgDepth=()=>this.options.continentsBgDepth)),this.options.adcode===0?world(this):this.options.style==="map2Base"||this.options.style==="map2CityOnMap"?base(this):this.options.adcode===1e5?china(this):base$1(this)}handleSetting(r,o){return B0(this,null,function*(){return yield _n(Ln.prototype,this,"handleSetting").call(this,r,o),r==="label"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.labelLite=!1,yield this.settings.labelLite,this.options.showLabel=!0,yield this.drawLabels()):r==="labelLite"?o===!1?(this.eraseLabels(),this.options.showLabel=!1):(this.settings.label=!1,yield this.settings.label,this.options.showLabel="lite",yield this.drawLabels()):r==="shadowMap"&&(o===!1?this.shadowMapDisabled():yield this.shadowMapEnabled()),o})}init(){return B0(this,null,function*(){const{adcode:r}=this.options;this.options.center&&(this.pcenter=this.options.center),this.options.worldPacificCentre&&r===1e5&&(this.pcenter=[this.pcenter[0]-160,this.pcenter[1]]),this.projection=f({center:this.pcenter,scale:this.pscale,projectionType:this.options.projectionType,rotate:this.options.worldPacificCentre?[-160,0]:void 0}),this.meters=this.projection([1*1141e-8+this.pcenter[0],0])[0],yield this.initPencil(),console.time(`vis-core:time.${this.visName}-loader`),this.loaderAdd(),console.timeEnd(`vis-core:time.${this.visName}-loader`),yield this.loader.loadAll(),this.group=yield this.lead.draw("Group",{key:"map"+r}),this.group.object3d.name="地图",yield this.initMaterial(),yield this.initVis(r),this.options.clickHandleDrillDown&&(this.lead.handlePick(()=>this.mapArea||[],"down",({baseObject:o,mouseEvent:V})=>{(this.playing||V.metaKey||V.ctrlKey)&&this.handleClick(o)}),this.options.clickOusideBack&&this.lead.handlePick(()=>this.map?[this.map]:[],"downOutside",({mouseEvent:o})=>{(this.playing||o.metaKey||o.ctrlKey)&&this.handleClick()})),yield Promise.all(this.lead.objectsPromise)})}initCityVis(r,o=!1){return B0(this,null,function*(){var Le;if((Le=this.options.fixCity)!=null&&Le[r]&&(r=this.options.fixCity[r]),r===71e4)return this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.pencil.camera.userData.up="0,0,1",null;const V=new City({container:this.container,editor:!1}),le=getCityConfig(r);V.setOptions({container:this.container,center:le.center,grey:o,adcode:r,cacheKey:this.options.cacheCity?`${r}`:void 0,jsonName:le.jsonName,showBuilding:this.options.showBuilding,buildingSideGradient:this.options.buildingSideGradient,buildingHasSide:this.options.buildingHasSide,showRoad:this.options.showRoad,showGrassland:this.options.showGrassland,showRiver:this.options.showRiver,setWaterMaterial:this.options.setWaterMaterial,ssao:this.options.citySSAO,pencil2:this.pencil}),yield V.init();const fe=this.projection(le.center);return fe&&V.group.position.set(fe[0],-fe[1],0),this.cityVis.push(V),this.settings.mouseLeft=Xi.SCREEN_PAN,yield this.settings.mouseLeft,this.emit("initCityVis",r),V})}initCityOnMap(r){return B0(this,null,function*(){const o=this.getAdcodeShowLevel(r);if(o==="province"){const V=yield this.initCityVis(r);yield V==null?void 0:V.drawCityPlane(r,this.lead.group)}else if(o==="city"){const V=findAdcodeInfo(r).c;let le=null;if(V.length>0)for(const fe of V)le=yield this.initCityVis(fe);else le=yield this.initCityVis(r);yield le==null?void 0:le.drawCityPlane(r,this.lead.group),this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix()}else if(o==="district"){const V=yield this.initCityVis(r);if(yield V==null?void 0:V.drawCityPlane(r,this.lead.group),this.pencil.camera.near=.001,this.pencil.camera.far=7,this.pencil.camera.updateProjectionMatrix(),this.options.nearbyCities){const le=findAdcodeInfo(r).parent,fe=findAdcodeInfo(le).c;for(const Le of fe)(this.options.nearbyCities==="full"||Le!==r)&&(yield this.initCityVis(Le,!0))}}this.cityVis.forEach(V=>{if(!V.options.grey){const le=this.mapObj.depth+1e-5;V.group.position.z=this.mapObj.z+le}})})}initVisBg(){return B0(this,null,function*(){let r=1e3,o=1e3;const V=new Vector3(0,0,0);if(this.options.parentBg){const le={projection:{center:this.pcenter,scale:this.pscale,rotate:[0,0],projectionType:this.options.projectionType},areaGroup:!1,depth:this.options.parentBgDepth},fe=this.options.adcode!==1e5;if(fe){const ke=this.mList.getMultiple("parentPlane"),Gt=findAdcodeInfo(this.options.adcode).parent,Vt=findAdcodeInfo(Gt),Zt=Vt.b,{res:xt}=yield this.getGeojson(Gt),Xt=yield this.lead.draw("PlaneMap",gi({key:"bg-100000",geojson:xt,bbox:Zt,materialOptions:gi({},ke)},le),this.group);Xt.object3d.name=Vt.name,Xt.lineArr.forEach(wt=>{wt.object3d.name="线",this.lead.updateBaseObjectKey(wt,{type:"100000line"}),this.initBaseObjectUserData(wt)}),Xt.areaArr.forEach(wt=>{wt.object3d.name="板块",this.lead.updateBaseObjectKey(wt,{type:"100000area"})}),Xt.position.z=-this.options.parentBgDepth,this.parentBg.push(Xt)}const Le=this.mList.getMultiple("worldPlane"),Ce=this.options.geojsonMap[0],Re=findAdcodeInfo(0).b,Pe=yield this.lead.draw("PlaneMap",qi(gi({key:"bg-0",geojson:qi(gi({},Ce),{features:[...Ce.features.filter(ke=>fe?ke.properties.iso_a3!=="CHN":!0)]}),bbox:Re,materialOptions:gi({},Le)},le),{projection:qi(gi({},le.projection),{rotate:this.options.worldPacificCentre?[-160,0]:void 0})}),this.group);Pe.object3d.name="世界",Pe.lineArr.forEach(ke=>{ke.object3d.name="线",this.lead.updateBaseObjectKey(ke,{type:"worldline"}),this.initBaseObjectUserData(ke)}),Pe.areaArr.forEach(ke=>{ke.object3d.name="板块",this.lead.updateBaseObjectKey(ke,{type:"worldarea"})}),Pe.position.z=-this.options.parentBgDepth,this.parentBg.push(Pe);const{center:ze,size:Fe}=Pe.getSize();r=Fe.x,o=Fe.y,V.set(ze.x,ze.y,0)}if(this.options.continentsBg){if(this.continentsBg=yield this.lead.draw("ContinentsBg",{depth:this.options.continentsBgDepth,scale:this.pscale},this.group),this.options.style!=="map2CityOnMap"&&this.options.style!=="map2Base"){const le=this.getLocationPosition([104,37.5]);this.continentsBg.position.set(...le)}this.continentsBg.position.z=.1}if(this.options.bottomPlane){const le=yield this.lead.draw("CityPlane",{width:r,height:o,color:"#0f1e57"},this.group);le.object3d.name="地图底面",this.lead.updateBaseObjectKey(le,{type:"map-plane"}),this.options.bottomPlaneWater&&le.addWater(),le.position.copy(V),le.position.z-=.1}})}initVis(r){return B0(this,null,function*(){var o;if(yield this.setAdcode({adcodes:[r],duration:0}),this.options.style!=="map2Base"&&this.options.style!=="map2CityOnMap"){const V=yield this.lead.draw("Light",{type:"SpotLight",color:this.options.adcode===0?"#82d9f2":"#c1e6dd",intensity:3,distance:0,angle:this.options.continentsBg?1:.5,penumbra:1,decay:0}),le=this.pencil.cameraPositon,fe=this.pencil.cameraTarget;V==null||V.spotLight.position.copy(le),V==null||V.spotLight.target.position.copy(fe)}if(this.options.mapBoundary){const V=new Box3().setFromObject((o=this.map)==null?void 0:o.object3d);this.pencil.controls.setBoundary(V)}yield this.initVisBg()})}loaderAddBg(){this.options.bottomPlaneWater&&this.loader.add(["/image/water/normalMap0.jpg","/image/water/normalMap1.jpg"],{})}initMaterialBg(){return B0(this,null,function*(){if(this.options.parentBg){const r=(()=>{const o=new MeshStandardMaterial({name:"世界顶面",emissive:"#081417",color:"#000000"}),V=new MeshBasicMaterial({name:"世界侧面",color:"#051714",side:DoubleSide}),le=new kt({name:"世界线",color:new Color$1("#50766E"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("worldPlane",r),this.options.adcode!==1e5&&(this.mList.copyMultiple("worldPlane","parentPlane"),Object.values(this.mList.getMultiple("parentPlane")).forEach(o=>{o.name=o.name.replace("世界","父级")}))}if(this.options.continentsBg){const r=(()=>{const o=new MeshStandardMaterial({name:"大洲板块顶面",emissive:"#154532"}),V=new MeshBasicMaterial({name:"大洲板块侧面",color:"#0c1528"}),le=new kt({name:"大洲板块线",color:new Color$1("#09e6c1"),sizeAttenuation:!1,lineWidth:this.options.lineWidth});return{topMat:o,sideMat:V,lineMat:le}})();this.mList.addMultiple("continents",r)}})}consoleMousePostion(){this.addListener(this.container,"click",r=>{var le,fe;const o=this.unproject(r,this.mapObj.z+this.mapObj.depth),V=(fe=(le=this.projection).invert)==null?void 0:fe.call(le,[o.x,-o.y]);console.log("consoleMousePostion.postion",o),console.log("consoleMousePostion.lnglat",V)})}setAreaMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.areaArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#topMat");V!=="origin"&&(Le=fe.material[0].clone(),V.color&&Le.color.set(V.color),V.emissive&&(Le.emissive.set(V.emissive),Le.emissiveIntensity=V.emissiveIntensity||1)),fe.material[0]=Le}}setLineMaterialByProperty(r,o,V){if(!this.map)return;const le=this.map.lineArr.find(fe=>fe.userData[r]===o);if(le){const fe=le.object3d;let Le=this.mList.get("plane#lineMat");V!=="origin"&&(Le=fe.material.clone(),V.color&&Le.color.set(V.color),V.width&&(Le.lineWidth=V.width)),fe.material=Le}}addAreaPlaneByProperty(r,o,V){return B0(this,null,function*(){if(!this.map)return;const fe=this.map.options.geojson.features.find(Le=>Le.properties&&Le.properties[r]===o);if(fe){let Le=V.material,Ce=V.sideMaterial;if(y(V.sideMaterial)&&(Ce=new MeshBasicMaterial(gi({},V.sideMaterial))),y(V.material)&&(Le=new MeshBasicMaterial(gi({},V.material))),V.area){const ze=this.objectByUuid(V.area);ze&&([Le,Ce]=ze.material)}let Re=V.lineMaterial;if(y(V.lineMaterial)&&(Re=new kt(gi({},V.lineMaterial))),V.line){const ze=this.objectByUuid(V.line);ze&&(Re=ze.material)}const Pe=yield this.lead.draw("PlaneMap",{geojson:{type:"FeatureCollection",features:[fe]},depth:V.depth||0,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:{topMat:Le,lineMat:Re,sideMat:Ce},areaGroup:!1},this.group);if(Pe.position.z=this.mapObj.z+this.mapObj.depth+.01,V.lineBloom&&Pe.lineArr.forEach(ze=>{ze.enableBloom()}),V.area){Pe.position.z=0;const ze=this.baseObjectByUuid(V.area);Pe.areaArr.forEach(Fe=>{ze!=null&&ze.isBloom&&Fe.enableBloom(),Fe.scale.z=ze.scale.z,Fe.position.z=ze.position.z})}if(V.line){const ze=this.baseObjectByUuid(V.line);Pe.lineArr.forEach(Fe=>{ze!=null&&ze.isBloom&&Fe.enableBloom(),Fe.position.z=ze.position.z})}return Pe}})}showAction(){return B0(this,null,function*(){_n(Ln.prototype,this,"showAction").call(this),this.useSaveCamera(`map-${this.options.adcode}`);const r=this.lead.group;if(this.mapHistory[0]){const{stop:o,start:V}=sinusoidalInOut({onUpdate:le=>{if(!this.mapHistory[0]){o();return}r.position.z=-this.mapHistory[0].depth*(1-le)}});yield V(),this.saveCamvasState("controls",0)}})}hide(){return B0(this,null,function*(){if(!this.showState)return;const r=this.lead.group;yield sinusoidalInOut({onUpdate:o=>{r.position.z=-this.mapHistory[0].depth*o}}).start(),setTimeout(()=>{_n(Ln.prototype,this,"hide").call(this)})})}shadowMapEnabled(){return B0(this,null,function*(){if(this.pencil.scene.userData.shadowMapEnabled)return;this.pencil.scene.userData.shadowMapEnabled=!0;const r=yield this.lead.draw("Light",{type:"SpotLight",color:"#c1e6dd",intensity:1,distance:0,angle:.5,penumbra:1,decay:0});this.lead.updateBaseObjectKey(r,{type:"ShadowSpotLight"}),this.shadowMapLight=r,r.object3d.position.set(.281,32.487,43.077),r.object3d.castShadow=!0;const o=yield this.lead.draw("PlaneShadow");this.planeShadow=o})}shadowMapDisabled(){this.pencil.scene.userData.shadowMapEnabled&&(this.pencil.scene.userData.shadowMapEnabled=!1,this.shadowMapLight&&(this.shadowMapLight.erase(),this.shadowMapLight=void 0),this.planeShadow&&(this.planeShadow.erase(),this.planeShadow=void 0))}getOptionsDepth(r){const o=this.getAdcodeShowLevel(r);let V=this.options.mapDepth;Array.isArray(V)||(V=new Array(3).fill(V));let le;return o==="country"?le=V[0]:o==="province"?le=V[1]:le=V[2],le}getDepth(r,o){let V=this.getOptionsDepth(r);if(this.options.depthReference){const le=this.options.depthReference,fe=findAdcodeInfo(r).b;V=V*this.getReferenceScale(le,fe)}else if(this.mapHistory.length){const le=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b,fe=this.getReferenceScale(le,o);V=V*fe}return V}getReferenceScale(r,o){const V=Math.abs(o[3]-o[1])/Math.abs(r[3]-r[1]),le=Math.abs(o[2]-o[0])/Math.abs(r[2]-r[0]);return Math.max(V,le)}getAdcodeShowLevel(r,o=!0){var V;return(V=this.options.fixCity)!=null&&V[r]&&(r=this.options.fixCity[r]),getAdcodeShowLevel(r,o)}handleClick(r){const{drillDownRestrictions:o}=this.options;this.isAnimating||(r&&r.userData.adcode?this.getAdcodeShowLevel(r.userData.adcode,!1)!==o?this.showMap({adcode:r.userData.adcode}):this.emit("drilldownRestrictions",r.userData.adcode):!r&&this.mapHistory.length>1&&this.showMap({adcode:this.adcodes.at(-2)}))}beforeShowMap(r){return!0}getAdcodes(r){var le;const o=[];let V=r;for(;V&&(o.unshift(V),V!==this.options.adcode);)V=(le=findAdcodeInfo(V))==null?void 0:le.parent;return o}showMap(le){return B0(this,arguments,function*({adcode:r,adcodes:o,duration:V=1e3}){const fe=o||this.getAdcodes(r);(yield this.beforeShowMap(fe))!==!1&&(this.emit("beforeDrillDown",[...fe]),yield this.setAdcode({adcodes:fe,duration:V}),this.emit("afterDrillDown",[...fe]))})}drawLabels(){return B0(this,null,function*(){var V;const r=this.options.showLabel;if(!((V=this.mapArea)!=null&&V.length)||!r)return;let o=this.lead.getObject("Group",{key:"mapLabel"});o||(o=yield this.lead.draw("Group",{key:"mapLabel"},this.group),o.object3d.name="地图标签组",yield Promise.all(this.mapArea.map(le=>B0(this,null,function*(){let{name:fe,adcode:Le,centroid:Ce}=le.userData;const{DistrictID:Re,DistName:Pe,iso_a2:ze,center:Fe}=le.userData;if(Le=Le||ze||Re,Ce=Ce||Fe,fe=fe||Pe,!Ce)return;const ke=this.getLocationPosition(Ce);if(this.lead.getObject("Node",{key:`mapLabel-${Le}`})||!ke)return;const[Gt,Vt,Zt]=ke;let xt=fe;r==="lite"&&xt&&(xt=fe.replace(/自治州|地区|自治区|省|市|壮族|特别行政区|回族|维吾尔/g,""));const Xt=xt&&getLabelElement(xt),wt=xt!=null&&xt.startsWith("澳门")?-1:0;yield this.lead.draw("Node",{position:new Vector3(Gt,Vt+wt,Zt),children:Xt,key:`$p:-${this.options.adcode===0?fe:Le}`},o)}))))})}eraseLabels(){const r=this.lead.getObject("Group",{key:"mapLabel"});r==null||r.erase()}geAdcodePosition(r){var V;const o=(V=this.mapArea)==null?void 0:V.find(le=>le.userData.adcode===r);if(o){const{centroid:le,center:fe}=o.userData;return this.getLocationPosition(le||fe)}}getLocationPosition(r){const[o,V]=r,[le,fe]=this.projection([o,V]);return[le,-fe,this.mapObj?this.mapObj.z+this.mapObj.depth:0]}setObjectOnMap(r,o,V=0){const le=this.getLocationPosition(o);r.position.set(le[0],le[1],le[2]+V)}setObjectOnMapAreaByProperty(r,o,V,le=0){var Le;const fe=(Le=this.mapArea)==null?void 0:Le.find(Ce=>Ce.userData[o]===V);if(fe){const{centroid:Ce,center:Re}=fe.userData,Pe=this.getLocationPosition(Ce||Re);r.position.set(Pe[0],Pe[1],Pe[2]+le)}}getAdcodeScreenPosition(r){const o=this.geAdcodePosition(r);if(o){const[V,le,fe]=o,Le=new Vector3(V,le,fe);Le.project(this.pencil.camera);const{width:Ce,height:Re}=this.pencil.getSize(),Pe=(Le.x*.5+.5)*Ce,ze=(Le.y*-.5+.5)*Re;return{x:Pe,y:ze}}}booleanPointInCn(r){return chinaLiteJson.features[0].geometry.coordinates.some(o=>turf.booleanPointInPolygon(turf.point(r),turf.polygon(o)))}booleanPointInMap(r,o){var Le,Ce;const V=o!=null?o:(Le=this.mapInfo)==null?void 0:Le.adcode;if(!V)return!1;const le=findAdcodeInfo(V);if(le!=null&&le.b){const[Re,Pe,ze,Fe]=le.b,[ke,Gt]=r;if(ke<Re||ke>ze||Gt<Pe||Gt>Fe)return!1}const fe=(Ce=this.options.extrudeLineGeojsonMap)==null?void 0:Ce[V];return fe?fe.features.some(Re=>{const Pe=Re.geometry.coordinates;return Re.geometry.type==="Polygon"?Pe.some(ze=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([ze]))):Re.geometry.type==="MultiPolygon"?Pe.some(ze=>ze.some(Fe=>turf.booleanPointInPolygon(turf.point(r),turf.polygon([Fe])))):!1}):!1}getGeojson(r,o=!1){return B0(this,null,function*(){var V,le,fe,Le;return o?this.options.extrudeLine?(fe=this.options.extrudeLineGeojsonMap)!=null&&fe[r]?{res:(Le=this.options.extrudeLineGeojsonMap)==null?void 0:Le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json-lite/${r}.json`):{res:void 0}:(V=this.options.geojsonMap)!=null&&V[r]?{res:(le=this.options.geojsonMap)==null?void 0:le[r]}:yield jsonFetch(`${this.options.assetsPrefix}/geojson/json/${r}.json`)})}handleDrillDown(Le){return B0(this,arguments,function*({adcode:r,duration:o,handleLook:V,saveBackCamvasState:le,extrudelineBloom:fe}){var Ce,Re,Pe,ze,Fe;if(typeof r!="undefined"&&!this.isAnimating){const ke=(Ce=this.map)==null?void 0:Ce.findGroup(r,!0),Gt=findAdcodeInfo(+r);if(this.isAnimating||!Gt)return;this.isAnimating=!0;const{name:Vt}=Gt;let{res:Zt}=yield this.getGeojson(r),{res:xt}=yield this.getGeojson(r,!0);if(!this.options.showDistrict&&this.getAdcodeShowLevel(r)==="city"&&(Zt=xt,xt=void 0),[Zt,xt].filter(Boolean).forEach(wt=>{if(!wt.features[0].properties.adcode&&/^\d{6}$/.test(`${r}`)){const Wt=findAdcodeInfo(r);wt.features[0].properties=qi(gi(gi({},wt.features[0].properties),Wt),{center:[Wt.lng,Wt.lat]})}}),Zt){const wt=this.options.plateInCenter&&(this.mapHistory.length<1||this.options.drillDownPlateInCenter);if((Re=this.options.fixGeojson)!=null&&Re[r]){const e0=(Pe=this.options.fixGeojson)==null?void 0:Pe[r];if(e0.startsWith("-")){const o0=+e0.slice(1);Zt.features=Zt.features.filter(b0=>b0.properties.adcode!==o0)}}let Wt=findAdcodeInfo(r).b;const It=[...Wt];this.mapHistory.length===1&&!this.options.drillDownSecondLevelMats?Wt=findAdcodeInfo(this.mapInfo.adcode).b:this.mapHistory.length===2&&!this.options.drillDownThirdLevelMats&&(this.options.drillDownSecondLevelMats?Wt=findAdcodeInfo(this.mapInfo.adcode).b:Wt=findAdcodeInfo(this.mapHistory[0].mapInfo.adcode).b),this.eraseLabels(),this.map&&(this.options.drillDownHideParent&&this.parentBg.forEach(e0=>{e0.hide()}),this.options.showOneLevel?this.map.hide():this.map.deactive(),le&&this.saveCamvasState("userControls",-1));const Nt=this.mapHistory.length,Ft=Nt-1,Ht=this.getDepth(r,It),Kt=(ze=this.mapHistory[Ft])==null?void 0:ze.depth,Yt=Nt===0||this.options.showOneLevel?0:this.mapHistory[Ft].z+Kt,jt=Nt===0||this.options.showOneLevel?0:Yt-Ht,n0=turf.center(Zt).geometry.coordinates,[a0,l0]=this.projection(n0),s0=yield this.drawPlaneMap({geojson:Zt,extrudeLineGeojson:xt,depth:Ht,bbox:Wt,adcode:r,extrudelineBloom:fe});ke==null||ke.hide(),s0.position.setZ(jt);const $t=s0.position.z,qt=()=>B0(this,null,function*(){yield sinusoidalInOut({onUpdate:e0=>{Yt!==$t&&(s0.position.z=$t+(Yt-$t)*e0)}}).start({duration:o})});if(wt)if(this.fixNear(r),s0.position.z=Yt,V){const e0=(Fe=this.mapHistory.at(-1))==null?void 0:Fe.controls;yield this.fitTo(s0,{z:Yt+Ht,adcode:r,enableTransition:o!==0,polarAngle:e0==null?void 0:e0.polarAngle,azimuthAngle:e0==null?void 0:e0.azimuthAngle,handleStart:()=>B0(this,null,function*(){s0.position.z=$t,yield qt()})})}else this.options.showOneLevel&&s0.hide();else yield qt();this.mapHistory.push({map:s0,mapInfo:Gt,z:Yt,depth:Ht,cX:a0,cY:-l0}),V&&this.drawLabels(),this.saveCamvasState("controls",-1)}else console.log(`${Vt}的地图数据不存在`);this.event.emit("handleDrillDown",{adcode:r,z:this.mapObj.z+this.mapObj.depth})}this.isAnimating=!1})}saveCamvasState(r,o){const V=this.mapHistory.at(o);V&&(V[r]={lookAt:[...this.pencil.cameraPositon.toArray(),...this.pencil.cameraTarget.toArray()],polarAngle:this.pencil.controls.polarAngle,azimuthAngle:this.pencil.controls.azimuthAngle})}fixNear(r){const o=this.getAdcodeShowLevel(r),V=this.pencil.options;r===0?(this.pencil.camera.near=1,this.pencil.camera.far=1e3,this.pencil.camera.updateProjectionMatrix()):(o==="country"||o==="province")&&this.pencil.camera.near!==V.camera.near*10?(this.pencil.camera.near=V.camera.near*10,this.pencil.camera.updateProjectionMatrix()):(o==="city"||o==="district")&&this.pencil.camera.near!==V.camera.near&&(this.pencil.camera.near=V.camera.near,this.pencil.camera.updateProjectionMatrix())}fitTo(Re){return B0(this,arguments,function*(r,{polarAngle:o,azimuthAngle:V,z:le,handleStart:fe,adcode:Le,enableTransition:Ce=!0}={}){if(!(r!=null&&r.object3d))return;if(Le&&(yield this.useSaveCamera(`map-${Le}`,Ce))){fe&&(yield fe());return}const Pe=this.options.mapPadding,{height:ze,width:Fe}=this.pencil.getSize();ze<Pe[0]+Pe[2]+50&&(Pe[0]=0,Pe[2]=0),Fe<Pe[1]+Pe[3]+50&&(Pe[1]=0,Pe[3]=0);const ke=o!=null?o:this.options.polarAngle,Gt=V!=null?V:this.options.azimuthAngle,Vt=this.pencil.cameraPositon.toArray(),Zt=this.pencil.cameraTarget.toArray();yield this.paddingInCssPixel(r,Pe[0],Pe[1],Pe[2],Pe[3],!1);let xt;le&&(xt=this.pencil.cameraTarget.toArray(),yield this.pencil.controls.setTarget(xt[0],xt[1],le,!1)),yield this.pencil.controls.rotateTo(Gt,ke,!1),xt=this.pencil.cameraTarget.toArray();const Xt=this.pencil.cameraPositon.toArray();yield this.lookAt(...Vt,...Zt),yield Promise.all([this.lookAt(...Xt,...xt,Ce),fe==null?void 0:fe()].filter(Boolean))})}drawPlaneMap(Ce){return B0(this,arguments,function*({geojson:r,extrudeLineGeojson:o,bbox:V,depth:le,extrudelineBloom:fe,adcode:Le}){var Vt;const Re=[this.mList.getMultiple("plane"),this.mList.getMultiple("secondPlane"),this.mList.getMultiple("thirdPlane")];let Pe=this.mapHistory.length,ze=null;for(;ze===null;)ze=Re[Pe],Pe--;const Fe=this.mList.getMultiple("bgPlane"),ke=gi(gi({},ze),Fe?{bgTopMat:Fe.topMat,bgSideMat:Fe.sideMat,bgLineMat:Fe.lineMat,bgExtrudeLineMat:Fe.extrudeLineMat}:{}),Gt=yield this.lead.draw("PlaneMap",{key:`${Le}`,geojson:r,extrudeLineGeojson:o,depth:le,projection:{center:this.pcenter,scale:this.pscale,rotate:this.options.worldPacificCentre?[-160,0]:void 0,projectionType:this.options.projectionType},materialOptions:ke,bbox:V,topSegments:this.options.topSegments,lineOffset:this.options.lineOffset,mergeSide:this.options.mergeSide},this.group);return Gt.object3d.name=((Vt=findAdcodeInfo(Le))==null?void 0:Vt.name)||`${Le}`,this.options.style==="map2CityOnMap"&&!this.options.showCityOnMapInnerLine&&(ze.lineMat.colorWrite=!1,Gt.lineArr.forEach(Zt=>{Zt.userData.selectHide=!0})),Gt.extrudelineArr&&Gt.extrudelineArr.forEach(Zt=>{Zt.object3d.name="板块边线",this.lead.updateBaseObjectKey(Zt,{type:"extrudeLine",key:this.mapHistory.length?"$p:":void 0}),this.initBaseObjectUserData(Zt),fe&&(Zt.object3d.userData.bloom=!0)}),Gt.lineArr&&Gt.lineArr.forEach(Zt=>{this.initBaseObjectUserData(Zt)}),Gt})}handleBack(){return B0(this,arguments,function*({duration:r=1e3,handleLookBack:o=!0,keepOne:V=!0}={}){if(this.isAnimating||(V?this.mapHistory.length<=1:this.mapHistory.length===0))return;this.isAnimating=!0;const le=this.mapHistory.pop();if(!this.options.drillDownPlateInCenter){const fe=le.map.position.z,Le=this.mapObj?this.mapObj.z+(this.mapObj.depth-le.depth):0;yield sinusoidalInOut({onUpdate:Ce=>{le.map.position.z=fe+(Le-fe)*Ce}}).start({duration:r})}if(this.lead.eraseWithoutMaterial(le.map),this.eraseLabels(),this.mapObj){const{map:fe}=this.mapObj,Le=fe==null?void 0:fe.findGroup(le.mapInfo.adcode,!0);Le&&Le.show(),fe&&o&&(this.options.showOneLevel?fe.show():fe.active(),this.options.drillDownHideParent&&this.parentBg.forEach(Ce=>{Ce.show()}),yield this.handleLookBack(r),this.drawLabels())}this.emit("handleBack",{adcodes:this.adcodes}),this.isAnimating=!1})}handleLookBack(r){return B0(this,null,function*(){const{userControls:o,controls:V}=this.mapObj;yield this.pencil.controls.setLookAt(...o?o.lookAt:V.lookAt,r!==0)})}compareLocations(r,o){const V=r.filter(Ce=>Ce),le=o.filter(Ce=>Ce),fe=[];let Le=0;for(let Ce=0;Ce<Math.min(V.length,le.length)&&V[Ce]===le[Ce];Ce++)Le++;for(let Ce=Le;Ce<V.length;Ce++)fe.push(-1);for(let Ce=Le;Ce<le.length;Ce++)fe.push(le[Ce]);return fe}setAdcode(V){return B0(this,arguments,function*({adcodes:r,duration:o}){var fe,Le,Ce;const{adcodes:le}=this;if(!(JSON.stringify(r)===JSON.stringify(le)||this.isAnimating))if(JSON.stringify(r)===JSON.stringify([0]))try{yield this.handleDrillDown({adcode:0,duration:o,handleLook:!0})}catch(ke){console.error(ke)}else{const{continent:ke,country:Gt,province:Vt,city:Zt,district:xt}=r.reduce((Yt,jt)=>{const n0=this.getAdcodeShowLevel(jt);return Yt[n0]=jt,Yt},{}),{continent:Xt,country:wt,province:Wt,city:It,district:Nt}=le.reduce((Yt,jt)=>{const n0=this.getAdcodeShowLevel(jt);return Yt[n0]=jt,Yt},{}),Ft=ke||Xt,Ht=(Ce=(Le=(fe=this.map)==null?void 0:fe.extrudelineArr)==null?void 0:Le[0])==null?void 0:Ce.object3d.userData.bloom,Kt=this.compareLocations([Xt,wt,Wt,It,Nt],[ke,Gt,Vt,Zt,xt]);try{for(var Re=Bn(Kt.entries()),Pe,ze,Fe;Pe=!(ze=yield Re.next()).done;Pe=!1){const[Yt,jt]=ze.value;const n0=Yt===Kt.length-1?o:0,a0=Yt===Kt.length-1;jt===-1?yield this.handleBack({duration:n0,handleLookBack:a0,keepOne:!Ft}):yield this.handleDrillDown({adcode:jt,duration:n0,handleLook:a0,saveBackCamvasState:Kt.includes(-1)?!1:this.options.handleBackKeepCamvasState,extrudelineBloom:Ht})}}catch(ze){Fe=[ze]}finally{try{Pe&&(ze=Re.return)&&(yield ze.call(Re))}finally{if(Fe)throw Fe[0]}}}})}setPadding(r,o=!1,V=!1){this.options.mapPadding=[...r],o&&this.fitTo(this.map,{enableTransition:V})}findAdcodeInfo(r){return findAdcodeInfo(r)}dispose(){var r,o,V;(r=this.editor)==null||r.events.removeAllListeners(),this.cityVis.forEach(le=>{le.dispose()}),this.cityVis.length=0,(o=this.map)==null||o.dispose(),this.parentBg.forEach(le=>{le.dispose()}),this.parentBg.length=0,(V=this.continentsBg)==null||V.dispose(),this.continentsBg=void 0,this.mapHistory.length=0,super.dispose()}};C0(Ln,"VisName","map"),C0(Ln,"getAdcodeShowLevel",getAdcodeShowLevel),C0(Ln,"findAdcodeInfo",findAdcodeInfo),C0(Ln,"findNameInfo",findNameInfo);let index=Ln;const access={set token(v){accessToken.token=v}},VERSION=version;exports.Base=Base;exports.City=City$1;exports.Earth=index$1;exports.Map=index;exports.THREE=THREE;exports.TWEEN=tween_esm;exports.VERSION=VERSION;exports.access=access;exports.animationUtils=animation;exports.getCityConfig=getCityConfig;exports.getMapConfig=getMapConfig;exports.removeCameraHistory=removeCameraHistory;
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
63
63
  Array.prototype.at || (Array.prototype.at = function(v) {
64
64
  return v < 0 && (v = this.length + v), this[v];
65
65
  });
66
- const version = "0.30.0-beta.31", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
66
+ const version = "0.30.0-beta.33", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
67
67
  token: void 0,
68
68
  getInfo() {
69
69
  if (!this.token)
@@ -144282,7 +144282,8 @@ const getLabelElement = (v) => {
144282
144282
  initCityVis(r, o = !1) {
144283
144283
  return B0(this, null, function* () {
144284
144284
  var Le;
144285
- (Le = this.options.fixCity) != null && Le[r] && (r = this.options.fixCity[r]);
144285
+ if ((Le = this.options.fixCity) != null && Le[r] && (r = this.options.fixCity[r]), r === 71e4)
144286
+ return this.settings.mouseLeft = Xi.SCREEN_PAN, yield this.settings.mouseLeft, this.pencil.camera.userData.up = "0,0,1", null;
144286
144287
  const V = new City({
144287
144288
  container: this.container,
144288
144289
  editor: !1
@@ -144311,9 +144312,10 @@ const getLabelElement = (v) => {
144311
144312
  initCityOnMap(r) {
144312
144313
  return B0(this, null, function* () {
144313
144314
  const o = this.getAdcodeShowLevel(r);
144314
- if (o === "province")
144315
- yield (yield this.initCityVis(r)).drawCityPlane(r, this.lead.group);
144316
- else if (o === "city") {
144315
+ if (o === "province") {
144316
+ const V = yield this.initCityVis(r);
144317
+ yield V == null ? void 0 : V.drawCityPlane(r, this.lead.group);
144318
+ } else if (o === "city") {
144317
144319
  const V = findAdcodeInfo(r).c;
144318
144320
  let le = null;
144319
144321
  if (V.length > 0)
@@ -144322,10 +144324,13 @@ const getLabelElement = (v) => {
144322
144324
  else
144323
144325
  le = yield this.initCityVis(r);
144324
144326
  yield le == null ? void 0 : le.drawCityPlane(r, this.lead.group), this.pencil.camera.near = 1e-3, this.pencil.camera.far = 7, this.pencil.camera.updateProjectionMatrix();
144325
- } else if (o === "district" && (yield (yield this.initCityVis(r)).drawCityPlane(r, this.lead.group), this.pencil.camera.near = 1e-3, this.pencil.camera.far = 7, this.pencil.camera.updateProjectionMatrix(), this.options.nearbyCities)) {
144326
- const le = findAdcodeInfo(r).parent, fe = findAdcodeInfo(le).c;
144327
- for (const Le of fe)
144328
- (this.options.nearbyCities === "full" || Le !== r) && (yield this.initCityVis(Le, !0));
144327
+ } else if (o === "district") {
144328
+ const V = yield this.initCityVis(r);
144329
+ if (yield V == null ? void 0 : V.drawCityPlane(r, this.lead.group), this.pencil.camera.near = 1e-3, this.pencil.camera.far = 7, this.pencil.camera.updateProjectionMatrix(), this.options.nearbyCities) {
144330
+ const le = findAdcodeInfo(r).parent, fe = findAdcodeInfo(le).c;
144331
+ for (const Le of fe)
144332
+ (this.options.nearbyCities === "full" || Le !== r) && (yield this.initCityVis(Le, !0));
144333
+ }
144329
144334
  }
144330
144335
  this.cityVis.forEach((V) => {
144331
144336
  if (!V.options.grey) {
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.30.0-beta.31";
1
+ declare const _default: "0.30.0-beta.33";
2
2
  export default _default;
@@ -190,7 +190,7 @@ export default class extends Base {
190
190
  initSettingsObj: Record<string, any>;
191
191
  handleSetting(key: string, value: any): Promise<any>;
192
192
  init(): Promise<void>;
193
- initCityVis(adcode: number, grey?: boolean): Promise<City>;
193
+ initCityVis(adcode: number, grey?: boolean): Promise<City | null>;
194
194
  initCityOnMap(adcode: number): Promise<void>;
195
195
  initVisBg(): Promise<void>;
196
196
  initVis(adcode: number): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.30.0-beta.31",
3
+ "version": "0.30.0-beta.33",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",