vis-core 0.29.8 → 0.29.9

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.29.8";
11
+ export declare const VERSION = "0.29.9";
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 }.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)}.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 An=Object.defineProperty,Fn=Object.defineProperties;var Kn=Object.getOwnPropertyDescriptors;var En=Object.getOwnPropertySymbols,Hn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty,Un=Object.prototype.propertyIsEnumerable,Bn=Reflect.get;var Mn=(v,e)=>(e=Symbol[v])?e:Symbol.for("Symbol."+v),On=v=>{throw TypeError(v)},bn=Math.pow,Wn=(v,e,n)=>e in v?An(v,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):v[e]=n,O0=(v,e)=>{for(var n in e||(e={}))Yn.call(e,n)&&Wn(v,n,e[n]);if(En)for(var n of En(e))Un.call(e,n)&&Wn(v,n,e[n]);return v},Ui=(v,e)=>Fn(v,Kn(e));var g0=(v,e,n)=>Wn(v,typeof e!="symbol"?e+"":e,n);var gn=(v,e,n)=>Bn(Hn(v),n,e);var E0=(v,e,n)=>new Promise((r,C)=>{var w=le=>{try{O(n.next(le))}catch(fe){C(fe)}},E=le=>{try{O(n.throw(le))}catch(fe){C(fe)}},O=le=>le.done?r(le.value):Promise.resolve(le.value).then(w,E);O((n=n.apply(v,e)).next())}),Dn=function(v,e){this[0]=v,this[1]=e};var In=v=>{var e=v[Mn("asyncIterator")],n=!1,r,C={};return e==null?(e=v[Mn("iterator")](),r=w=>C[w]=E=>e[w](E)):(e=e.call(v),r=w=>C[w]=E=>{if(n){if(n=!1,w==="throw")throw E;return E}return n=!0,{done:!1,value:new Dn(new Promise(O=>{var le=e[w](E);le instanceof Object||On("Object expected"),O(le)}),1)}}),C[Mn("iterator")]=()=>C,r("next"),"throw"in e?r("throw"):C.throw=w=>{throw w},"return"in e&&r("return"),C},Nn=(v,e,n)=>(e=v[Mn("asyncIterator")])?e.call(v):(v=v[Mn("iterator")](),e={},n=(r,C)=>(C=v[r])&&(e[r]=w=>new Promise((E,O,le)=>(w=C.call(v,w),le=w.done,Promise.resolve(w.value).then(fe=>E({value:fe,done:le}),O)))),n("next"),n("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.29.8",publicKeyPEM="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t",accessToken={token:void 0,getInfo(){if(!this.token)return"";const[v,e,n]=this.token.split(":::"),r=jsrsasign.KEYUTIL.getKey(atob(publicKeyPEM)),C=CryptoJS.enc.Base64.parse(e),w=CryptoJS.enc.Base64.parse(n),E=CryptoJS.lib.WordArray.create(C.words.slice(0,4)),O=CryptoJS.lib.WordArray.create(C.words.slice(4)),le=jsrsasign.KJUR.crypto.Util.hashHex(C.toString(),"sha256"),fe=r.verifyWithMessageHashPSS(le,jsrsasign.b64tohex(v),"sha256",32);if(!fe)return this.token=void 0,"";const ze=CryptoJS.AES.decrypt({ciphertext:O},w,{iv:E,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8),ke=JSON.parse(ze),Fe=Date.now();return!ke.s||ke.s>Fe?(this.token=void 0,""):ke.e&&ke.e<Fe?(this.token=void 0,""):(ke.isValid=fe,ke)}};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(n){return e._tweens[n]})},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,n){e===void 0&&(e=now()),n===void 0&&(n=!1);var r=Object.keys(this._tweens);if(r.length===0)return!1;for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var C=0;C<r.length;C++){var w=this._tweens[r[C]],E=!n;w&&w.update(e,E)===!1&&!n&&delete this._tweens[r[C]]}r=Object.keys(this._tweensAddedDuringUpdate)}return!0},v}(),Interpolation={Linear:function(v,e){var n=v.length-1,r=n*e,C=Math.floor(r),w=Interpolation.Utils.Linear;return e<0?w(v[0],v[1],r):e>1?w(v[n],v[n-1],n-r):w(v[C],v[C+1>n?n:C+1],r-C)},Bezier:function(v,e){for(var n=0,r=v.length-1,C=Math.pow,w=Interpolation.Utils.Bernstein,E=0;E<=r;E++)n+=C(1-e,r-E)*C(e,E)*v[E]*w(r,E);return n},CatmullRom:function(v,e){var n=v.length-1,r=n*e,C=Math.floor(r),w=Interpolation.Utils.CatmullRom;return v[0]===v[n]?(e<0&&(C=Math.floor(r=n*(1+e))),w(v[(C-1+n)%n],v[C],v[(C+1)%n],v[(C+2)%n],r-C)):e<0?v[0]-(w(v[0],v[0],v[1],v[1],-r)-v[0]):e>1?v[n]-(w(v[n],v[n],v[n-1],v[n-1],r-n)-v[n]):w(v[C?C-1:0],v[C],v[n<C+1?n:C+1],v[n<C+2?n:C+2],r-C)},Utils:{Linear:function(v,e,n){return(e-v)*n+v},Bernstein:function(v,e){var n=Interpolation.Utils.Factorial;return n(v)/n(e)/n(v-e)},Factorial:function(){var v=[1];return function(e){var n=1;if(v[e])return v[e];for(var r=e;r>1;r--)n*=r;return v[e]=n,n}}(),CatmullRom:function(v,e,n,r,C){var w=(n-v)*.5,E=(r-e)*.5,O=C*C,le=C*O;return(2*e-2*n+w+E)*le+(-3*e+3*n-2*w-E)*O+w*C+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,n){n===void 0&&(n=mainGroup),this._object=e,this._group=n,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,n){if(n===void 0&&(n=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=n<0?0:n,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,n){if(e===void 0&&(e=now()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var r in this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r]}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||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var C={};for(var w in this._valuesEnd)C[w]=this._valuesEnd[w];this._valuesEnd=C}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},v.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},v.prototype._setupProperties=function(e,n,r,C,w){for(var E in r){var O=e[E],le=Array.isArray(O),fe=le?"array":typeof O,Se=!le&&Array.isArray(r[E]);if(!(fe==="undefined"||fe==="function")){if(Se){var ze=r[E];if(ze.length===0)continue;for(var ke=[O],Fe=0,mt=ze.length;Fe<mt;Fe+=1){var Lt=this._handleRelativeValue(O,ze[Fe]);if(isNaN(Lt)){Se=!1,console.warn("Found invalid interpolation list. Skipping.");break}ke.push(Lt)}Se&&(r[E]=ke)}if((fe==="object"||le)&&O&&!Se){n[E]=le?[]:{};var bt=O;for(var Ue in bt)n[E][Ue]=bt[Ue];C[E]=le?[]:{};var ze=r[E];if(!this._isDynamic){var Gt={};for(var Ue in ze)Gt[Ue]=ze[Ue];r[E]=ze=Gt}this._setupProperties(bt,n[E],ze,C[E],w)}else(typeof n[E]=="undefined"||w)&&(n[E]=O),le||(n[E]*=1),Se?C[E]=r[E].slice().reverse():C[E]=n[E]||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,n=this._chainedTweens.length;e<n;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=[],n=0;n<arguments.length;n++)e[n]=arguments[n];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,n){var r;if(e===void 0&&(e=now()),n===void 0&&(n=!0),this._isPaused)return!0;var C=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>C)return!1;n&&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 w=e-this._startTime,E=this._duration+((r=this._repeatDelayTime)!==null&&r!==void 0?r:this._delayTime),O=this._duration+this._repeat*E,le=this._calculateElapsedPortion(w,E,O),fe=this._easingFunction(le),Se=this._calculateCompletionStatus(w,E);if(Se==="repeat"&&this._processRepetition(w,E),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,fe),Se==="about-to-repeat"&&this._processRepetition(w,E),this._onUpdateCallback&&this._onUpdateCallback(this._object,le),Se==="repeat"||Se==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(Se==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var ze=0,ke=this._chainedTweens.length;ze<ke;ze++)this._chainedTweens[ze].start(this._startTime+this._duration,!1)}return Se!=="completed"},v.prototype._calculateElapsedPortion=function(e,n,r){if(this._duration===0||e>r)return 1;var C=e%n,w=Math.min(C/this._duration,1);return w===0&&e!==0&&e%this._duration===0?1:w},v.prototype._calculateCompletionStatus=function(e,n){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},v.prototype._processRepetition=function(e,n){var r=Math.min(Math.trunc((e-this._duration)/n)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=r);for(var C in this._valuesStartRepeat){var w=this._valuesEnd[C];!this._yoyo&&typeof w=="string"&&(this._valuesStartRepeat[C]=this._valuesStartRepeat[C]+parseFloat(w)),this._yoyo&&this._swapEndStartRepeatValues(C),this._valuesStart[C]=this._valuesStartRepeat[C]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=n*r},v.prototype._updateProperties=function(e,n,r,C){for(var w in r)if(n[w]!==void 0){var E=n[w]||0,O=r[w],le=Array.isArray(e[w]),fe=Array.isArray(O),Se=!le&&fe;Se?e[w]=this._interpolationFunction(O,C):typeof O=="object"&&O?this._updateProperties(e[w],E,O,C):(O=this._handleRelativeValue(E,O),typeof O=="number"&&(e[w]=E+(O-E)*C))}},v.prototype._handleRelativeValue=function(e,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?e+parseFloat(n):parseFloat(n)},v.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},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 An=Object.defineProperty,Fn=Object.defineProperties;var Kn=Object.getOwnPropertyDescriptors;var En=Object.getOwnPropertySymbols,Hn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty,Un=Object.prototype.propertyIsEnumerable,Bn=Reflect.get;var Mn=(v,e)=>(e=Symbol[v])?e:Symbol.for("Symbol."+v),On=v=>{throw TypeError(v)},bn=Math.pow,Wn=(v,e,n)=>e in v?An(v,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):v[e]=n,O0=(v,e)=>{for(var n in e||(e={}))Yn.call(e,n)&&Wn(v,n,e[n]);if(En)for(var n of En(e))Un.call(e,n)&&Wn(v,n,e[n]);return v},Ui=(v,e)=>Fn(v,Kn(e));var g0=(v,e,n)=>Wn(v,typeof e!="symbol"?e+"":e,n);var gn=(v,e,n)=>Bn(Hn(v),n,e);var E0=(v,e,n)=>new Promise((r,C)=>{var w=le=>{try{O(n.next(le))}catch(fe){C(fe)}},E=le=>{try{O(n.throw(le))}catch(fe){C(fe)}},O=le=>le.done?r(le.value):Promise.resolve(le.value).then(w,E);O((n=n.apply(v,e)).next())}),Dn=function(v,e){this[0]=v,this[1]=e};var In=v=>{var e=v[Mn("asyncIterator")],n=!1,r,C={};return e==null?(e=v[Mn("iterator")](),r=w=>C[w]=E=>e[w](E)):(e=e.call(v),r=w=>C[w]=E=>{if(n){if(n=!1,w==="throw")throw E;return E}return n=!0,{done:!1,value:new Dn(new Promise(O=>{var le=e[w](E);le instanceof Object||On("Object expected"),O(le)}),1)}}),C[Mn("iterator")]=()=>C,r("next"),"throw"in e?r("throw"):C.throw=w=>{throw w},"return"in e&&r("return"),C},Nn=(v,e,n)=>(e=v[Mn("asyncIterator")])?e.call(v):(v=v[Mn("iterator")](),e={},n=(r,C)=>(C=v[r])&&(e[r]=w=>new Promise((E,O,le)=>(w=C.call(v,w),le=w.done,Promise.resolve(w.value).then(fe=>E({value:fe,done:le}),O)))),n("next"),n("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.29.9",publicKeyPEM="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t",accessToken={token:void 0,getInfo(){if(!this.token)return"";const[v,e,n]=this.token.split(":::"),r=jsrsasign.KEYUTIL.getKey(atob(publicKeyPEM)),C=CryptoJS.enc.Base64.parse(e),w=CryptoJS.enc.Base64.parse(n),E=CryptoJS.lib.WordArray.create(C.words.slice(0,4)),O=CryptoJS.lib.WordArray.create(C.words.slice(4)),le=jsrsasign.KJUR.crypto.Util.hashHex(C.toString(),"sha256"),fe=r.verifyWithMessageHashPSS(le,jsrsasign.b64tohex(v),"sha256",32);if(!fe)return this.token=void 0,"";const ze=CryptoJS.AES.decrypt({ciphertext:O},w,{iv:E,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8),ke=JSON.parse(ze),Fe=Date.now();return!ke.s||ke.s>Fe?(this.token=void 0,""):ke.e&&ke.e<Fe?(this.token=void 0,""):(ke.isValid=fe,ke)}};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(n){return e._tweens[n]})},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,n){e===void 0&&(e=now()),n===void 0&&(n=!1);var r=Object.keys(this._tweens);if(r.length===0)return!1;for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var C=0;C<r.length;C++){var w=this._tweens[r[C]],E=!n;w&&w.update(e,E)===!1&&!n&&delete this._tweens[r[C]]}r=Object.keys(this._tweensAddedDuringUpdate)}return!0},v}(),Interpolation={Linear:function(v,e){var n=v.length-1,r=n*e,C=Math.floor(r),w=Interpolation.Utils.Linear;return e<0?w(v[0],v[1],r):e>1?w(v[n],v[n-1],n-r):w(v[C],v[C+1>n?n:C+1],r-C)},Bezier:function(v,e){for(var n=0,r=v.length-1,C=Math.pow,w=Interpolation.Utils.Bernstein,E=0;E<=r;E++)n+=C(1-e,r-E)*C(e,E)*v[E]*w(r,E);return n},CatmullRom:function(v,e){var n=v.length-1,r=n*e,C=Math.floor(r),w=Interpolation.Utils.CatmullRom;return v[0]===v[n]?(e<0&&(C=Math.floor(r=n*(1+e))),w(v[(C-1+n)%n],v[C],v[(C+1)%n],v[(C+2)%n],r-C)):e<0?v[0]-(w(v[0],v[0],v[1],v[1],-r)-v[0]):e>1?v[n]-(w(v[n],v[n],v[n-1],v[n-1],r-n)-v[n]):w(v[C?C-1:0],v[C],v[n<C+1?n:C+1],v[n<C+2?n:C+2],r-C)},Utils:{Linear:function(v,e,n){return(e-v)*n+v},Bernstein:function(v,e){var n=Interpolation.Utils.Factorial;return n(v)/n(e)/n(v-e)},Factorial:function(){var v=[1];return function(e){var n=1;if(v[e])return v[e];for(var r=e;r>1;r--)n*=r;return v[e]=n,n}}(),CatmullRom:function(v,e,n,r,C){var w=(n-v)*.5,E=(r-e)*.5,O=C*C,le=C*O;return(2*e-2*n+w+E)*le+(-3*e+3*n-2*w-E)*O+w*C+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,n){n===void 0&&(n=mainGroup),this._object=e,this._group=n,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,n){if(n===void 0&&(n=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=n<0?0:n,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,n){if(e===void 0&&(e=now()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var r in this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r]}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||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var C={};for(var w in this._valuesEnd)C[w]=this._valuesEnd[w];this._valuesEnd=C}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},v.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},v.prototype._setupProperties=function(e,n,r,C,w){for(var E in r){var O=e[E],le=Array.isArray(O),fe=le?"array":typeof O,Se=!le&&Array.isArray(r[E]);if(!(fe==="undefined"||fe==="function")){if(Se){var ze=r[E];if(ze.length===0)continue;for(var ke=[O],Fe=0,mt=ze.length;Fe<mt;Fe+=1){var Lt=this._handleRelativeValue(O,ze[Fe]);if(isNaN(Lt)){Se=!1,console.warn("Found invalid interpolation list. Skipping.");break}ke.push(Lt)}Se&&(r[E]=ke)}if((fe==="object"||le)&&O&&!Se){n[E]=le?[]:{};var bt=O;for(var Ue in bt)n[E][Ue]=bt[Ue];C[E]=le?[]:{};var ze=r[E];if(!this._isDynamic){var Gt={};for(var Ue in ze)Gt[Ue]=ze[Ue];r[E]=ze=Gt}this._setupProperties(bt,n[E],ze,C[E],w)}else(typeof n[E]=="undefined"||w)&&(n[E]=O),le||(n[E]*=1),Se?C[E]=r[E].slice().reverse():C[E]=n[E]||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,n=this._chainedTweens.length;e<n;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=[],n=0;n<arguments.length;n++)e[n]=arguments[n];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,n){var r;if(e===void 0&&(e=now()),n===void 0&&(n=!0),this._isPaused)return!0;var C=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>C)return!1;n&&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 w=e-this._startTime,E=this._duration+((r=this._repeatDelayTime)!==null&&r!==void 0?r:this._delayTime),O=this._duration+this._repeat*E,le=this._calculateElapsedPortion(w,E,O),fe=this._easingFunction(le),Se=this._calculateCompletionStatus(w,E);if(Se==="repeat"&&this._processRepetition(w,E),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,fe),Se==="about-to-repeat"&&this._processRepetition(w,E),this._onUpdateCallback&&this._onUpdateCallback(this._object,le),Se==="repeat"||Se==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(Se==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var ze=0,ke=this._chainedTweens.length;ze<ke;ze++)this._chainedTweens[ze].start(this._startTime+this._duration,!1)}return Se!=="completed"},v.prototype._calculateElapsedPortion=function(e,n,r){if(this._duration===0||e>r)return 1;var C=e%n,w=Math.min(C/this._duration,1);return w===0&&e!==0&&e%this._duration===0?1:w},v.prototype._calculateCompletionStatus=function(e,n){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},v.prototype._processRepetition=function(e,n){var r=Math.min(Math.trunc((e-this._duration)/n)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=r);for(var C in this._valuesStartRepeat){var w=this._valuesEnd[C];!this._yoyo&&typeof w=="string"&&(this._valuesStartRepeat[C]=this._valuesStartRepeat[C]+parseFloat(w)),this._yoyo&&this._swapEndStartRepeatValues(C),this._valuesStart[C]=this._valuesStartRepeat[C]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=n*r},v.prototype._updateProperties=function(e,n,r,C){for(var w in r)if(n[w]!==void 0){var E=n[w]||0,O=r[w],le=Array.isArray(e[w]),fe=Array.isArray(O),Se=!le&&fe;Se?e[w]=this._interpolationFunction(O,C):typeof O=="object"&&O?this._updateProperties(e[w],E,O,C):(O=this._handleRelativeValue(E,O),typeof O=="number"&&(e[w]=E+(O-E)*C))}},v.prototype._handleRelativeValue=function(e,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?e+parseFloat(n):parseFloat(n)},v.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},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
@@ -4210,7 +4210,7 @@ void main() {
4210
4210
  `};class LineMaterial extends ShaderMaterial{constructor(e){super({type:"LineMaterial",uniforms:UniformsUtils.clone(ShaderLib.line.uniforms),vertexShader:ShaderLib.line.vertexShader,fragmentShader:ShaderLib.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const _box$1=new Box3,_vector=new Vector3;class LineSegmentsGeometry extends InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],n=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],r=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(r),this.setAttribute("position",new Float32BufferAttribute(e,3)),this.setAttribute("uv",new Float32BufferAttribute(n,2))}applyMatrix4(e){const n=this.attributes.instanceStart,r=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(e),r.applyMatrix4(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const r=new InstancedInterleavedBuffer(n,6,1);return this.setAttribute("instanceStart",new InterleavedBufferAttribute(r,3,0)),this.setAttribute("instanceEnd",new InterleavedBufferAttribute(r,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const r=new InstancedInterleavedBuffer(n,6,1);return this.setAttribute("instanceColorStart",new InterleavedBufferAttribute(r,3,0)),this.setAttribute("instanceColorEnd",new InterleavedBufferAttribute(r,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new WireframeGeometry(e.geometry)),this}fromLineSegments(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Box3);const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;e!==void 0&&n!==void 0&&(this.boundingBox.setFromBufferAttribute(e),_box$1.setFromBufferAttribute(n),this.boundingBox.union(_box$1))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Sphere$1),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(e!==void 0&&n!==void 0){const r=this.boundingSphere.center;this.boundingBox.getCenter(r);let C=0;for(let w=0,E=e.count;w<E;w++)_vector.fromBufferAttribute(e,w),C=Math.max(C,r.distanceToSquared(_vector)),_vector.fromBufferAttribute(n,w),C=Math.max(C,r.distanceToSquared(_vector));this.boundingSphere.radius=Math.sqrt(C),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}class CSS2DObject extends Object3D{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new Vector2(.5,.5),this.addEventListener("removed",function(){this.traverse(function(n){n.element instanceof n.element.ownerDocument.defaultView.Element&&n.element.parentNode!==null&&n.element.remove()})})}copy(e,n){return super.copy(e,n),this.element=e.element.cloneNode(!0),this.center=e.center,this}}new Vector3;new Matrix4;new Matrix4;new Vector3;new Vector3;new Vector3;new Vector3;class CSS3DObject extends Object3D{constructor(e=document.createElement("div")){super(),this.isCSS3DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",function(){this.traverse(function(n){n.element instanceof n.element.ownerDocument.defaultView.Element&&n.element.parentNode!==null&&n.element.remove()})})}copy(e,n){return super.copy(e,n),this.element=e.element.cloneNode(!0),this}}class CSS3DSprite extends CSS3DObject{constructor(e){super(e),this.isCSS3DSprite=!0,this.rotation2D=0}copy(e,n){return super.copy(e,n),this.rotation2D=e.rotation2D,this}}new Matrix4;new Matrix4;function ascending(v,e){return v==null||e==null?NaN:v<e?-1:v>e?1:v>=e?0:NaN}function descending(v,e){return v==null||e==null?NaN:e<v?-1:e>v?1:e>=v?0:NaN}function bisector(v){let e,n,r;v.length!==2?(e=ascending,n=(O,le)=>ascending(v(O),le),r=(O,le)=>v(O)-le):(e=v===ascending||v===descending?v:zero$1,n=v,r=v);function C(O,le,fe=0,Se=O.length){if(fe<Se){if(e(le,le)!==0)return Se;do{const ze=fe+Se>>>1;n(O[ze],le)<0?fe=ze+1:Se=ze}while(fe<Se)}return fe}function w(O,le,fe=0,Se=O.length){if(fe<Se){if(e(le,le)!==0)return Se;do{const ze=fe+Se>>>1;n(O[ze],le)<=0?fe=ze+1:Se=ze}while(fe<Se)}return fe}function E(O,le,fe=0,Se=O.length){const ze=C(O,le,fe,Se-1);return ze>fe&&r(O[ze-1],le)>-r(O[ze],le)?ze-1:ze}return{left:C,center:E,right:w}}function zero$1(){return 0}function number$1(v){return v===null?NaN:+v}const ascendingBisect=bisector(ascending),bisectRight=ascendingBisect.right;bisector(number$1).center;function extent(v,e){let n,r;if(e===void 0)for(const C of v)C!=null&&(n===void 0?C>=C&&(n=r=C):(n>C&&(n=C),r<C&&(r=C)));else{let C=-1;for(let w of v)(w=e(w,++C,v))!=null&&(n===void 0?w>=w&&(n=r=w):(n>w&&(n=w),r<w&&(r=w)))}return[n,r]}class Adder{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let C=0;C<this._n&&C<32;C++){const w=n[C],E=e+w,O=Math.abs(e)<Math.abs(w)?e-(E-w):w-(E-e);O&&(n[r++]=O),e=E}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,C,w,E=0;if(n>0){for(E=e[--n];n>0&&(r=E,C=e[--n],E=r+C,w=C-(E-r),!w););n>0&&(w<0&&e[n-1]<0||w>0&&e[n-1]>0)&&(C=w*2,r=E+C,C==r-E&&(E=r))}return E}}const e10=Math.sqrt(50),e5=Math.sqrt(10),e2=Math.sqrt(2);function tickSpec(v,e,n){const r=(e-v)/Math.max(0,n),C=Math.floor(Math.log10(r)),w=r/Math.pow(10,C),E=w>=e10?10:w>=e5?5:w>=e2?2:1;let O,le,fe;return C<0?(fe=Math.pow(10,-C)/E,O=Math.round(v*fe),le=Math.round(e*fe),O/fe<v&&++O,le/fe>e&&--le,fe=-fe):(fe=Math.pow(10,C)*E,O=Math.round(v/fe),le=Math.round(e/fe),O*fe<v&&++O,le*fe>e&&--le),le<O&&.5<=n&&n<2?tickSpec(v,e,n*2):[O,le,fe]}function ticks(v,e,n){if(e=+e,v=+v,n=+n,!(n>0))return[];if(v===e)return[v];const r=e<v,[C,w,E]=r?tickSpec(e,v,n):tickSpec(v,e,n);if(!(w>=C))return[];const O=w-C+1,le=new Array(O);if(r)if(E<0)for(let fe=0;fe<O;++fe)le[fe]=(w-fe)/-E;else for(let fe=0;fe<O;++fe)le[fe]=(w-fe)*E;else if(E<0)for(let fe=0;fe<O;++fe)le[fe]=(C+fe)/-E;else for(let fe=0;fe<O;++fe)le[fe]=(C+fe)*E;return le}function tickIncrement(v,e,n){return e=+e,v=+v,n=+n,tickSpec(v,e,n)[2]}function tickStep(v,e,n){e=+e,v=+v,n=+n;const r=e<v,C=r?tickIncrement(e,v,n):tickIncrement(v,e,n);return(r?-1:1)*(C<0?1/-C:C)}function mean(v,e){let n=0,r=0;if(e===void 0)for(let C of v)C!=null&&(C=+C)>=C&&(++n,r+=C);else{let C=-1;for(let w of v)(w=e(w,++C,v))!=null&&(w=+w)>=w&&(++n,r+=w)}if(n)return r/n}function*flatten$1(v){for(const e of v)yield*In(e)}function merge(v){return Array.from(flatten$1(v))}var epsilon$3=1e-6,epsilon2=1e-12,pi$3=Math.PI,halfPi$2=pi$3/2,quarterPi=pi$3/4,tau$1=pi$3*2,degrees$1=180/pi$3,radians$1=pi$3/180,abs$1=Math.abs,atan=Math.atan,atan2$1=Math.atan2,cos$2=Math.cos,exp=Math.exp,hypot=Math.hypot,log=Math.log,sin$2=Math.sin,sign$2=Math.sign||function(v){return v>0?1:v<0?-1:0},sqrt$2=Math.sqrt,tan=Math.tan;function acos$1(v){return v>1?0:v<-1?pi$3:Math.acos(v)}function asin$1(v){return v>1?halfPi$2:v<-1?-halfPi$2:Math.asin(v)}function haversin(v){return(v=sin$2(v/2))*v}function noop(){}function streamGeometry(v,e){v&&streamGeometryType.hasOwnProperty(v.type)&&streamGeometryType[v.type](v,e)}var streamObjectType={Feature:function(v,e){streamGeometry(v.geometry,e)},FeatureCollection:function(v,e){for(var n=v.features,r=-1,C=n.length;++r<C;)streamGeometry(n[r].geometry,e)}},streamGeometryType={Sphere:function(v,e){e.sphere()},Point:function(v,e){v=v.coordinates,e.point(v[0],v[1],v[2])},MultiPoint:function(v,e){for(var n=v.coordinates,r=-1,C=n.length;++r<C;)v=n[r],e.point(v[0],v[1],v[2])},LineString:function(v,e){streamLine(v.coordinates,e,0)},MultiLineString:function(v,e){for(var n=v.coordinates,r=-1,C=n.length;++r<C;)streamLine(n[r],e,0)},Polygon:function(v,e){streamPolygon(v.coordinates,e)},MultiPolygon:function(v,e){for(var n=v.coordinates,r=-1,C=n.length;++r<C;)streamPolygon(n[r],e)},GeometryCollection:function(v,e){for(var n=v.geometries,r=-1,C=n.length;++r<C;)streamGeometry(n[r],e)}};function streamLine(v,e,n){var r=-1,C=v.length-n,w;for(e.lineStart();++r<C;)w=v[r],e.point(w[0],w[1],w[2]);e.lineEnd()}function streamPolygon(v,e){var n=-1,r=v.length;for(e.polygonStart();++n<r;)streamLine(v[n],e,1);e.polygonEnd()}function geoStream(v,e){v&&streamObjectType.hasOwnProperty(v.type)?streamObjectType[v.type](v,e):streamGeometry(v,e)}var areaRingSum=new Adder,areaSum=new Adder,lambda00$2,phi00$2,lambda0$2,cosPhi0$1,sinPhi0$1,areaStream={point:noop,lineStart:noop,lineEnd:noop,polygonStart:function(){areaRingSum=new Adder,areaStream.lineStart=areaRingStart,areaStream.lineEnd=areaRingEnd},polygonEnd:function(){var v=+areaRingSum;areaSum.add(v<0?tau$1+v:v),this.lineStart=this.lineEnd=this.point=noop},sphere:function(){areaSum.add(tau$1)}};function areaRingStart(){areaStream.point=areaPointFirst}function areaRingEnd(){areaPoint(lambda00$2,phi00$2)}function areaPointFirst(v,e){areaStream.point=areaPoint,lambda00$2=v,phi00$2=e,v*=radians$1,e*=radians$1,lambda0$2=v,cosPhi0$1=cos$2(e=e/2+quarterPi),sinPhi0$1=sin$2(e)}function areaPoint(v,e){v*=radians$1,e*=radians$1,e=e/2+quarterPi;var n=v-lambda0$2,r=n>=0?1:-1,C=r*n,w=cos$2(e),E=sin$2(e),O=sinPhi0$1*E,le=cosPhi0$1*w+O*cos$2(C),fe=O*r*sin$2(C);areaRingSum.add(atan2$1(fe,le)),lambda0$2=v,cosPhi0$1=w,sinPhi0$1=E}function spherical$1(v){return[atan2$1(v[1],v[0]),asin$1(v[2])]}function cartesian$1(v){var e=v[0],n=v[1],r=cos$2(n);return[r*cos$2(e),r*sin$2(e),sin$2(n)]}function cartesianDot$1(v,e){return v[0]*e[0]+v[1]*e[1]+v[2]*e[2]}function cartesianCross$1(v,e){return[v[1]*e[2]-v[2]*e[1],v[2]*e[0]-v[0]*e[2],v[0]*e[1]-v[1]*e[0]]}function cartesianAddInPlace(v,e){v[0]+=e[0],v[1]+=e[1],v[2]+=e[2]}function cartesianScale(v,e){return[v[0]*e,v[1]*e,v[2]*e]}function cartesianNormalizeInPlace(v){var e=sqrt$2(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);v[0]/=e,v[1]/=e,v[2]/=e}var lambda0$1,phi0,lambda1,phi1,lambda2,lambda00$1,phi00$1,p0,deltaSum,ranges,range,boundsStream$1={point:boundsPoint$1,lineStart:boundsLineStart,lineEnd:boundsLineEnd,polygonStart:function(){boundsStream$1.point=boundsRingPoint,boundsStream$1.lineStart=boundsRingStart,boundsStream$1.lineEnd=boundsRingEnd,deltaSum=new Adder,areaStream.polygonStart()},polygonEnd:function(){areaStream.polygonEnd(),boundsStream$1.point=boundsPoint$1,boundsStream$1.lineStart=boundsLineStart,boundsStream$1.lineEnd=boundsLineEnd,areaRingSum<0?(lambda0$1=-(lambda1=180),phi0=-(phi1=90)):deltaSum>epsilon$3?phi1=90:deltaSum<-epsilon$3&&(phi0=-90),range[0]=lambda0$1,range[1]=lambda1},sphere:function(){lambda0$1=-(lambda1=180),phi0=-(phi1=90)}};function boundsPoint$1(v,e){ranges.push(range=[lambda0$1=v,lambda1=v]),e<phi0&&(phi0=e),e>phi1&&(phi1=e)}function linePoint(v,e){var n=cartesian$1([v*radians$1,e*radians$1]);if(p0){var r=cartesianCross$1(p0,n),C=[r[1],-r[0],0],w=cartesianCross$1(C,r);cartesianNormalizeInPlace(w),w=spherical$1(w);var E=v-lambda2,O=E>0?1:-1,le=w[0]*degrees$1*O,fe,Se=abs$1(E)>180;Se^(O*lambda2<le&&le<O*v)?(fe=w[1]*degrees$1,fe>phi1&&(phi1=fe)):(le=(le+360)%360-180,Se^(O*lambda2<le&&le<O*v)?(fe=-w[1]*degrees$1,fe<phi0&&(phi0=fe)):(e<phi0&&(phi0=e),e>phi1&&(phi1=e))),Se?v<lambda2?angle(lambda0$1,v)>angle(lambda0$1,lambda1)&&(lambda1=v):angle(v,lambda1)>angle(lambda0$1,lambda1)&&(lambda0$1=v):lambda1>=lambda0$1?(v<lambda0$1&&(lambda0$1=v),v>lambda1&&(lambda1=v)):v>lambda2?angle(lambda0$1,v)>angle(lambda0$1,lambda1)&&(lambda1=v):angle(v,lambda1)>angle(lambda0$1,lambda1)&&(lambda0$1=v)}else ranges.push(range=[lambda0$1=v,lambda1=v]);e<phi0&&(phi0=e),e>phi1&&(phi1=e),p0=n,lambda2=v}function boundsLineStart(){boundsStream$1.point=linePoint}function boundsLineEnd(){range[0]=lambda0$1,range[1]=lambda1,boundsStream$1.point=boundsPoint$1,p0=null}function boundsRingPoint(v,e){if(p0){var n=v-lambda2;deltaSum.add(abs$1(n)>180?n+(n>0?360:-360):n)}else lambda00$1=v,phi00$1=e;areaStream.point(v,e),linePoint(v,e)}function boundsRingStart(){areaStream.lineStart()}function boundsRingEnd(){boundsRingPoint(lambda00$1,phi00$1),areaStream.lineEnd(),abs$1(deltaSum)>epsilon$3&&(lambda0$1=-(lambda1=180)),range[0]=lambda0$1,range[1]=lambda1,p0=null}function angle(v,e){return(e-=v)<0?e+360:e}function rangeCompare(v,e){return v[0]-e[0]}function rangeContains(v,e){return v[0]<=v[1]?v[0]<=e&&e<=v[1]:e<v[0]||v[1]<e}function je$1(v){var e,n,r,C,w,E,O;if(phi1=lambda1=-(lambda0$1=phi0=1/0),ranges=[],geoStream(v,boundsStream$1),n=ranges.length){for(ranges.sort(rangeCompare),e=1,r=ranges[0],w=[r];e<n;++e)C=ranges[e],rangeContains(r,C[0])||rangeContains(r,C[1])?(angle(r[0],C[1])>angle(r[0],r[1])&&(r[1]=C[1]),angle(C[0],r[1])>angle(r[0],r[1])&&(r[0]=C[0])):w.push(r=C);for(E=-1/0,n=w.length-1,e=0,r=w[n];e<=n;r=C,++e)C=w[e],(O=angle(r[1],C[0]))>E&&(E=O,lambda0$1=C[0],lambda1=r[1])}return ranges=range=null,lambda0$1===1/0||phi0===1/0?[[NaN,NaN],[NaN,NaN]]:[[lambda0$1,phi0],[lambda1,phi1]]}var W0,W1,X0,Y0,Z0,X1,Y1,Z1,X2,Y2,Z2,lambda00,phi00,x0$1,y0$1,z0,centroidStream={sphere:noop,point:centroidPoint,lineStart:centroidLineStart,lineEnd:centroidLineEnd,polygonStart:function(){centroidStream.lineStart=centroidRingStart,centroidStream.lineEnd=centroidRingEnd},polygonEnd:function(){centroidStream.lineStart=centroidLineStart,centroidStream.lineEnd=centroidLineEnd}};function centroidPoint(v,e){v*=radians$1,e*=radians$1;var n=cos$2(e);centroidPointCartesian(n*cos$2(v),n*sin$2(v),sin$2(e))}function centroidPointCartesian(v,e,n){++W0,X0+=(v-X0)/W0,Y0+=(e-Y0)/W0,Z0+=(n-Z0)/W0}function centroidLineStart(){centroidStream.point=centroidLinePointFirst}function centroidLinePointFirst(v,e){v*=radians$1,e*=radians$1;var n=cos$2(e);x0$1=n*cos$2(v),y0$1=n*sin$2(v),z0=sin$2(e),centroidStream.point=centroidLinePoint,centroidPointCartesian(x0$1,y0$1,z0)}function centroidLinePoint(v,e){v*=radians$1,e*=radians$1;var n=cos$2(e),r=n*cos$2(v),C=n*sin$2(v),w=sin$2(e),E=atan2$1(sqrt$2((E=y0$1*w-z0*C)*E+(E=z0*r-x0$1*w)*E+(E=x0$1*C-y0$1*r)*E),x0$1*r+y0$1*C+z0*w);W1+=E,X1+=E*(x0$1+(x0$1=r)),Y1+=E*(y0$1+(y0$1=C)),Z1+=E*(z0+(z0=w)),centroidPointCartesian(x0$1,y0$1,z0)}function centroidLineEnd(){centroidStream.point=centroidPoint}function centroidRingStart(){centroidStream.point=centroidRingPointFirst}function centroidRingEnd(){centroidRingPoint(lambda00,phi00),centroidStream.point=centroidPoint}function centroidRingPointFirst(v,e){lambda00=v,phi00=e,v*=radians$1,e*=radians$1,centroidStream.point=centroidRingPoint;var n=cos$2(e);x0$1=n*cos$2(v),y0$1=n*sin$2(v),z0=sin$2(e),centroidPointCartesian(x0$1,y0$1,z0)}function centroidRingPoint(v,e){v*=radians$1,e*=radians$1;var n=cos$2(e),r=n*cos$2(v),C=n*sin$2(v),w=sin$2(e),E=y0$1*w-z0*C,O=z0*r-x0$1*w,le=x0$1*C-y0$1*r,fe=hypot(E,O,le),Se=asin$1(fe),ze=fe&&-Se/fe;X2.add(ze*E),Y2.add(ze*O),Z2.add(ze*le),W1+=Se,X1+=Se*(x0$1+(x0$1=r)),Y1+=Se*(y0$1+(y0$1=C)),Z1+=Se*(z0+(z0=w)),centroidPointCartesian(x0$1,y0$1,z0)}function geoCentroid(v){W0=W1=X0=Y0=Z0=X1=Y1=Z1=0,X2=new Adder,Y2=new Adder,Z2=new Adder,geoStream(v,centroidStream);var e=+X2,n=+Y2,r=+Z2,C=hypot(e,n,r);return C<epsilon2&&(e=X1,n=Y1,r=Z1,W1<epsilon$3&&(e=X0,n=Y0,r=Z0),C=hypot(e,n,r),C<epsilon2)?[NaN,NaN]:[atan2$1(n,e)*degrees$1,asin$1(r/C)*degrees$1]}function compose(v,e){function n(r,C){return r=v(r,C),e(r[0],r[1])}return v.invert&&e.invert&&(n.invert=function(r,C){return r=e.invert(r,C),r&&v.invert(r[0],r[1])}),n}function rotationIdentity(v,e){return abs$1(v)>pi$3&&(v-=Math.round(v/tau$1)*tau$1),[v,e]}rotationIdentity.invert=rotationIdentity;function rotateRadians(v,e,n){return(v%=tau$1)?e||n?compose(rotationLambda(v),rotationPhiGamma(e,n)):rotationLambda(v):e||n?rotationPhiGamma(e,n):rotationIdentity}function forwardRotationLambda(v){return function(e,n){return e+=v,abs$1(e)>pi$3&&(e-=Math.round(e/tau$1)*tau$1),[e,n]}}function rotationLambda(v){var e=forwardRotationLambda(v);return e.invert=forwardRotationLambda(-v),e}function rotationPhiGamma(v,e){var n=cos$2(v),r=sin$2(v),C=cos$2(e),w=sin$2(e);function E(O,le){var fe=cos$2(le),Se=cos$2(O)*fe,ze=sin$2(O)*fe,ke=sin$2(le),Fe=ke*n+Se*r;return[atan2$1(ze*C-Fe*w,Se*n-ke*r),asin$1(Fe*C+ze*w)]}return E.invert=function(O,le){var fe=cos$2(le),Se=cos$2(O)*fe,ze=sin$2(O)*fe,ke=sin$2(le),Fe=ke*C-ze*w;return[atan2$1(ze*C+ke*w,Se*n+Fe*r),asin$1(Fe*n-Se*r)]},E}function geoRotation(v){v=rotateRadians(v[0]*radians$1,v[1]*radians$1,v.length>2?v[2]*radians$1:0);function e(n){return n=v(n[0]*radians$1,n[1]*radians$1),n[0]*=degrees$1,n[1]*=degrees$1,n}return e.invert=function(n){return n=v.invert(n[0]*radians$1,n[1]*radians$1),n[0]*=degrees$1,n[1]*=degrees$1,n},e}function circleStream(v,e,n,r,C,w){if(n){var E=cos$2(e),O=sin$2(e),le=r*n;C==null?(C=e+r*tau$1,w=e-le/2):(C=circleRadius(E,C),w=circleRadius(E,w),(r>0?C<w:C>w)&&(C+=r*tau$1));for(var fe,Se=C;r>0?Se>w:Se<w;Se-=le)fe=spherical$1([E,-O*cos$2(Se),-O*sin$2(Se)]),v.point(fe[0],fe[1])}}function circleRadius(v,e){e=cartesian$1(e),e[0]-=v,cartesianNormalizeInPlace(e);var n=acos$1(-e[1]);return((-e[2]<0?-n:n)+tau$1-epsilon$3)%tau$1}function clipBuffer(){var v=[],e;return{point:function(n,r,C){e.push([n,r,C])},lineStart:function(){v.push(e=[])},lineEnd:noop,rejoin:function(){v.length>1&&v.push(v.pop().concat(v.shift()))},result:function(){var n=v;return v=[],e=null,n}}}function pointEqual(v,e){return abs$1(v[0]-e[0])<epsilon$3&&abs$1(v[1]-e[1])<epsilon$3}function Intersection(v,e,n,r){this.x=v,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function clipRejoin(v,e,n,r,C){var w=[],E=[],O,le;if(v.forEach(function(mt){if(!((Lt=mt.length-1)<=0)){var Lt,bt=mt[0],Ue=mt[Lt],Gt;if(pointEqual(bt,Ue)){if(!bt[2]&&!Ue[2]){for(C.lineStart(),O=0;O<Lt;++O)C.point((bt=mt[O])[0],bt[1]);C.lineEnd();return}Ue[0]+=2*epsilon$3}w.push(Gt=new Intersection(bt,mt,null,!0)),E.push(Gt.o=new Intersection(bt,null,Gt,!1)),w.push(Gt=new Intersection(Ue,mt,null,!1)),E.push(Gt.o=new Intersection(Ue,null,Gt,!0))}}),!!w.length){for(E.sort(e),link(w),link(E),O=0,le=E.length;O<le;++O)E[O].e=n=!n;for(var fe=w[0],Se,ze;;){for(var ke=fe,Fe=!0;ke.v;)if((ke=ke.n)===fe)return;Se=ke.z,C.lineStart();do{if(ke.v=ke.o.v=!0,ke.e){if(Fe)for(O=0,le=Se.length;O<le;++O)C.point((ze=Se[O])[0],ze[1]);else r(ke.x,ke.n.x,1,C);ke=ke.n}else{if(Fe)for(Se=ke.p.z,O=Se.length-1;O>=0;--O)C.point((ze=Se[O])[0],ze[1]);else r(ke.x,ke.p.x,-1,C);ke=ke.p}ke=ke.o,Se=ke.z,Fe=!Fe}while(!ke.v);C.lineEnd()}}}function link(v){if(e=v.length){for(var e,n=0,r=v[0],C;++n<e;)r.n=C=v[n],C.p=r,r=C;r.n=C=v[0],C.p=r}}function longitude(v){return abs$1(v[0])<=pi$3?v[0]:sign$2(v[0])*((abs$1(v[0])+pi$3)%tau$1-pi$3)}function polygonContains(v,e){var n=longitude(e),r=e[1],C=sin$2(r),w=[sin$2(n),-cos$2(n),0],E=0,O=0,le=new Adder;C===1?r=halfPi$2+epsilon$3:C===-1&&(r=-halfPi$2-epsilon$3);for(var fe=0,Se=v.length;fe<Se;++fe)if(ke=(ze=v[fe]).length)for(var ze,ke,Fe=ze[ke-1],mt=longitude(Fe),Lt=Fe[1]/2+quarterPi,bt=sin$2(Lt),Ue=cos$2(Lt),Gt=0;Gt<ke;++Gt,mt=Xt,bt=wt,Ue=Vt,Fe=xt){var xt=ze[Gt],Xt=longitude(xt),Zt=xt[1]/2+quarterPi,wt=sin$2(Zt),Vt=cos$2(Zt),Wt=Xt-mt,It=Wt>=0?1:-1,Nt=It*Wt,Ft=Nt>pi$3,jt=bt*wt;if(le.add(atan2$1(jt*It*sin$2(Nt),Ue*Vt+jt*cos$2(Nt))),E+=Ft?Wt+It*tau$1:Wt,Ft^mt>=n^Xt>=n){var n0=cartesianCross$1(cartesian$1(Fe),cartesian$1(xt));cartesianNormalizeInPlace(n0);var s0=cartesianCross$1(w,n0);cartesianNormalizeInPlace(s0);var qt=(Ft^Wt>=0?-1:1)*asin$1(s0[2]);(r>qt||r===qt&&(n0[0]||n0[1]))&&(O+=Ft^Wt>=0?1:-1)}}return(E<-epsilon$3||E<epsilon$3&&le<-epsilon2)^O&1}function clip(v,e,n,r){return function(C){var w=e(C),E=clipBuffer(),O=e(E),le=!1,fe,Se,ze,ke={point:Fe,lineStart:Lt,lineEnd:bt,polygonStart:function(){ke.point=Ue,ke.lineStart=Gt,ke.lineEnd=xt,Se=[],fe=[]},polygonEnd:function(){ke.point=Fe,ke.lineStart=Lt,ke.lineEnd=bt,Se=merge(Se);var Xt=polygonContains(fe,r);Se.length?(le||(C.polygonStart(),le=!0),clipRejoin(Se,compareIntersection,Xt,n,C)):Xt&&(le||(C.polygonStart(),le=!0),C.lineStart(),n(null,null,1,C),C.lineEnd()),le&&(C.polygonEnd(),le=!1),Se=fe=null},sphere:function(){C.polygonStart(),C.lineStart(),n(null,null,1,C),C.lineEnd(),C.polygonEnd()}};function Fe(Xt,Zt){v(Xt,Zt)&&C.point(Xt,Zt)}function mt(Xt,Zt){w.point(Xt,Zt)}function Lt(){ke.point=mt,w.lineStart()}function bt(){ke.point=Fe,w.lineEnd()}function Ue(Xt,Zt){ze.push([Xt,Zt]),O.point(Xt,Zt)}function Gt(){O.lineStart(),ze=[]}function xt(){Ue(ze[0][0],ze[0][1]),O.lineEnd();var Xt=O.clean(),Zt=E.result(),wt,Vt=Zt.length,Wt,It,Nt;if(ze.pop(),fe.push(ze),ze=null,!!Vt){if(Xt&1){if(It=Zt[0],(Wt=It.length-1)>0){for(le||(C.polygonStart(),le=!0),C.lineStart(),wt=0;wt<Wt;++wt)C.point((Nt=It[wt])[0],Nt[1]);C.lineEnd()}return}Vt>1&&Xt&2&&Zt.push(Zt.pop().concat(Zt.shift())),Se.push(Zt.filter(validSegment))}}return ke}}function validSegment(v){return v.length>1}function compareIntersection(v,e){return((v=v.x)[0]<0?v[1]-halfPi$2-epsilon$3:halfPi$2-v[1])-((e=e.x)[0]<0?e[1]-halfPi$2-epsilon$3:halfPi$2-e[1])}const clipAntimeridian=clip(function(){return!0},clipAntimeridianLine,clipAntimeridianInterpolate,[-pi$3,-halfPi$2]);function clipAntimeridianLine(v){var e=NaN,n=NaN,r=NaN,C;return{lineStart:function(){v.lineStart(),C=1},point:function(w,E){var O=w>0?pi$3:-pi$3,le=abs$1(w-e);abs$1(le-pi$3)<epsilon$3?(v.point(e,n=(n+E)/2>0?halfPi$2:-halfPi$2),v.point(r,n),v.lineEnd(),v.lineStart(),v.point(O,n),v.point(w,n),C=0):r!==O&&le>=pi$3&&(abs$1(e-r)<epsilon$3&&(e-=r*epsilon$3),abs$1(w-O)<epsilon$3&&(w-=O*epsilon$3),n=clipAntimeridianIntersect(e,n,w,E),v.point(r,n),v.lineEnd(),v.lineStart(),v.point(O,n),C=0),v.point(e=w,n=E),r=O},lineEnd:function(){v.lineEnd(),e=n=NaN},clean:function(){return 2-C}}}function clipAntimeridianIntersect(v,e,n,r){var C,w,E=sin$2(v-n);return abs$1(E)>epsilon$3?atan((sin$2(e)*(w=cos$2(r))*sin$2(n)-sin$2(r)*(C=cos$2(e))*sin$2(v))/(C*w*E)):(e+r)/2}function clipAntimeridianInterpolate(v,e,n,r){var C;if(v==null)C=n*halfPi$2,r.point(-pi$3,C),r.point(0,C),r.point(pi$3,C),r.point(pi$3,0),r.point(pi$3,-C),r.point(0,-C),r.point(-pi$3,-C),r.point(-pi$3,0),r.point(-pi$3,C);else if(abs$1(v[0]-e[0])>epsilon$3){var w=v[0]<e[0]?pi$3:-pi$3;C=n*w/2,r.point(-w,C),r.point(0,C),r.point(w,C)}else r.point(e[0],e[1])}function clipCircle(v){var e=cos$2(v),n=2*radians$1,r=e>0,C=abs$1(e)>epsilon$3;function w(Se,ze,ke,Fe){circleStream(Fe,v,n,ke,Se,ze)}function E(Se,ze){return cos$2(Se)*cos$2(ze)>e}function O(Se){var ze,ke,Fe,mt,Lt;return{lineStart:function(){mt=Fe=!1,Lt=1},point:function(bt,Ue){var Gt=[bt,Ue],xt,Xt=E(bt,Ue),Zt=r?Xt?0:fe(bt,Ue):Xt?fe(bt+(bt<0?pi$3:-pi$3),Ue):0;if(!ze&&(mt=Fe=Xt)&&Se.lineStart(),Xt!==Fe&&(xt=le(ze,Gt),(!xt||pointEqual(ze,xt)||pointEqual(Gt,xt))&&(Gt[2]=1)),Xt!==Fe)Lt=0,Xt?(Se.lineStart(),xt=le(Gt,ze),Se.point(xt[0],xt[1])):(xt=le(ze,Gt),Se.point(xt[0],xt[1],2),Se.lineEnd()),ze=xt;else if(C&&ze&&r^Xt){var wt;!(Zt&ke)&&(wt=le(Gt,ze,!0))&&(Lt=0,r?(Se.lineStart(),Se.point(wt[0][0],wt[0][1]),Se.point(wt[1][0],wt[1][1]),Se.lineEnd()):(Se.point(wt[1][0],wt[1][1]),Se.lineEnd(),Se.lineStart(),Se.point(wt[0][0],wt[0][1],3)))}Xt&&(!ze||!pointEqual(ze,Gt))&&Se.point(Gt[0],Gt[1]),ze=Gt,Fe=Xt,ke=Zt},lineEnd:function(){Fe&&Se.lineEnd(),ze=null},clean:function(){return Lt|(mt&&Fe)<<1}}}function le(Se,ze,ke){var Fe=cartesian$1(Se),mt=cartesian$1(ze),Lt=[1,0,0],bt=cartesianCross$1(Fe,mt),Ue=cartesianDot$1(bt,bt),Gt=bt[0],xt=Ue-Gt*Gt;if(!xt)return!ke&&Se;var Xt=e*Ue/xt,Zt=-e*Gt/xt,wt=cartesianCross$1(Lt,bt),Vt=cartesianScale(Lt,Xt),Wt=cartesianScale(bt,Zt);cartesianAddInPlace(Vt,Wt);var It=wt,Nt=cartesianDot$1(Vt,It),Ft=cartesianDot$1(It,It),jt=Nt*Nt-Ft*(cartesianDot$1(Vt,Vt)-1);if(!(jt<0)){var n0=sqrt$2(jt),s0=cartesianScale(It,(-Nt-n0)/Ft);if(cartesianAddInPlace(s0,Vt),s0=spherical$1(s0),!ke)return s0;var qt=Se[0],Ht=ze[0],$t=Se[1],Kt=ze[1],e0;Ht<qt&&(e0=qt,qt=Ht,Ht=e0);var u0=Ht-qt,d0=abs$1(u0-pi$3)<epsilon$3,_0=d0||u0<epsilon$3;if(!d0&&Kt<$t&&(e0=$t,$t=Kt,Kt=e0),_0?d0?$t+Kt>0^s0[1]<(abs$1(s0[0]-qt)<epsilon$3?$t:Kt):$t<=s0[1]&&s0[1]<=Kt:u0>pi$3^(qt<=s0[0]&&s0[0]<=Ht)){var J0=cartesianScale(It,(-Nt+n0)/Ft);return cartesianAddInPlace(J0,Vt),[s0,spherical$1(J0)]}}}function fe(Se,ze){var ke=r?v:pi$3-v,Fe=0;return Se<-ke?Fe|=1:Se>ke&&(Fe|=2),ze<-ke?Fe|=4:ze>ke&&(Fe|=8),Fe}return clip(E,O,w,r?[0,-v]:[-pi$3,v-pi$3])}function clipLine(v,e,n,r,C,w){var E=v[0],O=v[1],le=e[0],fe=e[1],Se=0,ze=1,ke=le-E,Fe=fe-O,mt;if(mt=n-E,!(!ke&&mt>0)){if(mt/=ke,ke<0){if(mt<Se)return;mt<ze&&(ze=mt)}else if(ke>0){if(mt>ze)return;mt>Se&&(Se=mt)}if(mt=C-E,!(!ke&&mt<0)){if(mt/=ke,ke<0){if(mt>ze)return;mt>Se&&(Se=mt)}else if(ke>0){if(mt<Se)return;mt<ze&&(ze=mt)}if(mt=r-O,!(!Fe&&mt>0)){if(mt/=Fe,Fe<0){if(mt<Se)return;mt<ze&&(ze=mt)}else if(Fe>0){if(mt>ze)return;mt>Se&&(Se=mt)}if(mt=w-O,!(!Fe&&mt<0)){if(mt/=Fe,Fe<0){if(mt>ze)return;mt>Se&&(Se=mt)}else if(Fe>0){if(mt<Se)return;mt<ze&&(ze=mt)}return Se>0&&(v[0]=E+Se*ke,v[1]=O+Se*Fe),ze<1&&(e[0]=E+ze*ke,e[1]=O+ze*Fe),!0}}}}}var clipMax=1e9,clipMin=-clipMax;function clipRectangle(v,e,n,r){function C(fe,Se){return v<=fe&&fe<=n&&e<=Se&&Se<=r}function w(fe,Se,ze,ke){var Fe=0,mt=0;if(fe==null||(Fe=E(fe,ze))!==(mt=E(Se,ze))||le(fe,Se)<0^ze>0)do ke.point(Fe===0||Fe===3?v:n,Fe>1?r:e);while((Fe=(Fe+ze+4)%4)!==mt);else ke.point(Se[0],Se[1])}function E(fe,Se){return abs$1(fe[0]-v)<epsilon$3?Se>0?0:3:abs$1(fe[0]-n)<epsilon$3?Se>0?2:1:abs$1(fe[1]-e)<epsilon$3?Se>0?1:0:Se>0?3:2}function O(fe,Se){return le(fe.x,Se.x)}function le(fe,Se){var ze=E(fe,1),ke=E(Se,1);return ze!==ke?ze-ke:ze===0?Se[1]-fe[1]:ze===1?fe[0]-Se[0]:ze===2?fe[1]-Se[1]:Se[0]-fe[0]}return function(fe){var Se=fe,ze=clipBuffer(),ke,Fe,mt,Lt,bt,Ue,Gt,xt,Xt,Zt,wt,Vt={point:Wt,lineStart:jt,lineEnd:n0,polygonStart:Nt,polygonEnd:Ft};function Wt(qt,Ht){C(qt,Ht)&&Se.point(qt,Ht)}function It(){for(var qt=0,Ht=0,$t=Fe.length;Ht<$t;++Ht)for(var Kt=Fe[Ht],e0=1,u0=Kt.length,d0=Kt[0],_0,J0,H0=d0[0],bi=d0[1];e0<u0;++e0)_0=H0,J0=bi,d0=Kt[e0],H0=d0[0],bi=d0[1],J0<=r?bi>r&&(H0-_0)*(r-J0)>(bi-J0)*(v-_0)&&++qt:bi<=r&&(H0-_0)*(r-J0)<(bi-J0)*(v-_0)&&--qt;return qt}function Nt(){Se=ze,ke=[],Fe=[],wt=!0}function Ft(){var qt=It(),Ht=wt&&qt,$t=(ke=merge(ke)).length;(Ht||$t)&&(fe.polygonStart(),Ht&&(fe.lineStart(),w(null,null,1,fe),fe.lineEnd()),$t&&clipRejoin(ke,O,qt,w,fe),fe.polygonEnd()),Se=fe,ke=Fe=mt=null}function jt(){Vt.point=s0,Fe&&Fe.push(mt=[]),Zt=!0,Xt=!1,Gt=xt=NaN}function n0(){ke&&(s0(Lt,bt),Ue&&Xt&&ze.rejoin(),ke.push(ze.result())),Vt.point=Wt,Xt&&Se.lineEnd()}function s0(qt,Ht){var $t=C(qt,Ht);if(Fe&&mt.push([qt,Ht]),Zt)Lt=qt,bt=Ht,Ue=$t,Zt=!1,$t&&(Se.lineStart(),Se.point(qt,Ht));else if($t&&Xt)Se.point(qt,Ht);else{var Kt=[Gt=Math.max(clipMin,Math.min(clipMax,Gt)),xt=Math.max(clipMin,Math.min(clipMax,xt))],e0=[qt=Math.max(clipMin,Math.min(clipMax,qt)),Ht=Math.max(clipMin,Math.min(clipMax,Ht))];clipLine(Kt,e0,v,e,n,r)?(Xt||(Se.lineStart(),Se.point(Kt[0],Kt[1])),Se.point(e0[0],e0[1]),$t||Se.lineEnd(),wt=!1):$t&&(Se.lineStart(),Se.point(qt,Ht),wt=!1)}Gt=qt,xt=Ht,Xt=$t}return Vt}}var lengthSum,lambda0,sinPhi0,cosPhi0,lengthStream={sphere:noop,point:noop,lineStart:lengthLineStart,lineEnd:noop,polygonStart:noop,polygonEnd:noop};function lengthLineStart(){lengthStream.point=lengthPointFirst,lengthStream.lineEnd=lengthLineEnd}function lengthLineEnd(){lengthStream.point=lengthStream.lineEnd=noop}function lengthPointFirst(v,e){v*=radians$1,e*=radians$1,lambda0=v,sinPhi0=sin$2(e),cosPhi0=cos$2(e),lengthStream.point=lengthPoint}function lengthPoint(v,e){v*=radians$1,e*=radians$1;var n=sin$2(e),r=cos$2(e),C=abs$1(v-lambda0),w=cos$2(C),E=sin$2(C),O=r*E,le=cosPhi0*n-sinPhi0*r*w,fe=sinPhi0*n+cosPhi0*r*w;lengthSum.add(atan2$1(sqrt$2(O*O+le*le),fe)),lambda0=v,sinPhi0=n,cosPhi0=r}function length(v){return lengthSum=new Adder,geoStream(v,lengthStream),+lengthSum}var coordinates=[null,null],object$1={type:"LineString",coordinates};function Re$1(v,e){return coordinates[0]=v,coordinates[1]=e,length(object$1)}var containsObjectType={Feature:function(v,e){return containsGeometry(v.geometry,e)},FeatureCollection:function(v,e){for(var n=v.features,r=-1,C=n.length;++r<C;)if(containsGeometry(n[r].geometry,e))return!0;return!1}},containsGeometryType={Sphere:function(){return!0},Point:function(v,e){return containsPoint(v.coordinates,e)},MultiPoint:function(v,e){for(var n=v.coordinates,r=-1,C=n.length;++r<C;)if(containsPoint(n[r],e))return!0;return!1},LineString:function(v,e){return containsLine(v.coordinates,e)},MultiLineString:function(v,e){for(var n=v.coordinates,r=-1,C=n.length;++r<C;)if(containsLine(n[r],e))return!0;return!1},Polygon:function(v,e){return containsPolygon(v.coordinates,e)},MultiPolygon:function(v,e){for(var n=v.coordinates,r=-1,C=n.length;++r<C;)if(containsPolygon(n[r],e))return!0;return!1},GeometryCollection:function(v,e){for(var n=v.geometries,r=-1,C=n.length;++r<C;)if(containsGeometry(n[r],e))return!0;return!1}};function containsGeometry(v,e){return v&&containsGeometryType.hasOwnProperty(v.type)?containsGeometryType[v.type](v,e):!1}function containsPoint(v,e){return Re$1(v,e)===0}function containsLine(v,e){for(var n,r,C,w=0,E=v.length;w<E;w++){if(r=Re$1(v[w],e),r===0||w>0&&(C=Re$1(v[w],v[w-1]),C>0&&n<=C&&r<=C&&(n+r-C)*(1-Math.pow((n-r)/C,2))<epsilon2*C))return!0;n=r}return!1}function containsPolygon(v,e){return!!polygonContains(v.map(ringRadians),pointRadians(e))}function ringRadians(v){return v=v.map(pointRadians),v.pop(),v}function pointRadians(v){return[v[0]*radians$1,v[1]*radians$1]}function Ne(v,e){return(v&&containsObjectType.hasOwnProperty(v.type)?containsObjectType[v.type]:containsGeometry)(v,e)}function Ge$1(v,e){var n=v[0]*radians$1,r=v[1]*radians$1,C=e[0]*radians$1,w=e[1]*radians$1,E=cos$2(r),O=sin$2(r),le=cos$2(w),fe=sin$2(w),Se=E*cos$2(n),ze=E*sin$2(n),ke=le*cos$2(C),Fe=le*sin$2(C),mt=2*asin$1(sqrt$2(haversin(w-r)+E*le*haversin(C-n))),Lt=sin$2(mt),bt=mt?function(Ue){var Gt=sin$2(Ue*=mt)/Lt,xt=sin$2(mt-Ue)/Lt,Xt=xt*Se+Gt*ke,Zt=xt*ze+Gt*Fe,wt=xt*O+Gt*fe;return[atan2$1(Zt,Xt)*degrees$1,atan2$1(wt,sqrt$2(Xt*Xt+Zt*Zt))*degrees$1]}:function(){return[n*degrees$1,r*degrees$1]};return bt.distance=mt,bt}const identity$2=v=>v;var x0=1/0,y0=x0,x1=-x0,y1=x1,boundsStream={point:boundsPoint,lineStart:noop,lineEnd:noop,polygonStart:noop,polygonEnd:noop,result:function(){var v=[[x0,y0],[x1,y1]];return x1=y1=-(y0=x0=1/0),v}};function boundsPoint(v,e){v<x0&&(x0=v),v>x1&&(x1=v),e<y0&&(y0=e),e>y1&&(y1=e)}function transformer$1(v){return function(e){var n=new TransformStream;for(var r in v)n[r]=v[r];return n.stream=e,n}}function TransformStream(){}TransformStream.prototype={constructor:TransformStream,point:function(v,e){this.stream.point(v,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function fit(v,e,n){var r=v.clipExtent&&v.clipExtent();return v.scale(150).translate([0,0]),r!=null&&v.clipExtent(null),geoStream(n,v.stream(boundsStream)),e(boundsStream.result()),r!=null&&v.clipExtent(r),v}function fitExtent(v,e,n){return fit(v,function(r){var C=e[1][0]-e[0][0],w=e[1][1]-e[0][1],E=Math.min(C/(r[1][0]-r[0][0]),w/(r[1][1]-r[0][1])),O=+e[0][0]+(C-E*(r[1][0]+r[0][0]))/2,le=+e[0][1]+(w-E*(r[1][1]+r[0][1]))/2;v.scale(150*E).translate([O,le])},n)}function fitSize(v,e,n){return fitExtent(v,[[0,0],e],n)}function fitWidth(v,e,n){return fit(v,function(r){var C=+e,w=C/(r[1][0]-r[0][0]),E=(C-w*(r[1][0]+r[0][0]))/2,O=-w*r[0][1];v.scale(150*w).translate([E,O])},n)}function fitHeight(v,e,n){return fit(v,function(r){var C=+e,w=C/(r[1][1]-r[0][1]),E=-w*r[0][0],O=(C-w*(r[1][1]+r[0][1]))/2;v.scale(150*w).translate([E,O])},n)}var maxDepth=16,cosMinDistance=cos$2(30*radians$1);function resample(v,e){return+e?resample$1(v,e):resampleNone(v)}function resampleNone(v){return transformer$1({point:function(e,n){e=v(e,n),this.stream.point(e[0],e[1])}})}function resample$1(v,e){function n(r,C,w,E,O,le,fe,Se,ze,ke,Fe,mt,Lt,bt){var Ue=fe-r,Gt=Se-C,xt=Ue*Ue+Gt*Gt;if(xt>4*e&&Lt--){var Xt=E+ke,Zt=O+Fe,wt=le+mt,Vt=sqrt$2(Xt*Xt+Zt*Zt+wt*wt),Wt=asin$1(wt/=Vt),It=abs$1(abs$1(wt)-1)<epsilon$3||abs$1(w-ze)<epsilon$3?(w+ze)/2:atan2$1(Zt,Xt),Nt=v(It,Wt),Ft=Nt[0],jt=Nt[1],n0=Ft-r,s0=jt-C,qt=Gt*n0-Ue*s0;(qt*qt/xt>e||abs$1((Ue*n0+Gt*s0)/xt-.5)>.3||E*ke+O*Fe+le*mt<cosMinDistance)&&(n(r,C,w,E,O,le,Ft,jt,It,Xt/=Vt,Zt/=Vt,wt,Lt,bt),bt.point(Ft,jt),n(Ft,jt,It,Xt,Zt,wt,fe,Se,ze,ke,Fe,mt,Lt,bt))}}return function(r){var C,w,E,O,le,fe,Se,ze,ke,Fe,mt,Lt,bt={point:Ue,lineStart:Gt,lineEnd:Xt,polygonStart:function(){r.polygonStart(),bt.lineStart=Zt},polygonEnd:function(){r.polygonEnd(),bt.lineStart=Gt}};function Ue(Wt,It){Wt=v(Wt,It),r.point(Wt[0],Wt[1])}function Gt(){ze=NaN,bt.point=xt,r.lineStart()}function xt(Wt,It){var Nt=cartesian$1([Wt,It]),Ft=v(Wt,It);n(ze,ke,Se,Fe,mt,Lt,ze=Ft[0],ke=Ft[1],Se=Wt,Fe=Nt[0],mt=Nt[1],Lt=Nt[2],maxDepth,r),r.point(ze,ke)}function Xt(){bt.point=Ue,r.lineEnd()}function Zt(){Gt(),bt.point=wt,bt.lineEnd=Vt}function wt(Wt,It){xt(C=Wt,It),w=ze,E=ke,O=Fe,le=mt,fe=Lt,bt.point=xt}function Vt(){n(ze,ke,Se,Fe,mt,Lt,w,E,C,O,le,fe,maxDepth,r),bt.lineEnd=Xt,Xt()}return bt}}var transformRadians=transformer$1({point:function(v,e){this.stream.point(v*radians$1,e*radians$1)}});function transformRotate(v){return transformer$1({point:function(e,n){var r=v(e,n);return this.stream.point(r[0],r[1])}})}function scaleTranslate(v,e,n,r,C){function w(E,O){return E*=r,O*=C,[e+v*E,n-v*O]}return w.invert=function(E,O){return[(E-e)/v*r,(n-O)/v*C]},w}function scaleTranslateRotate(v,e,n,r,C,w){if(!w)return scaleTranslate(v,e,n,r,C);var E=cos$2(w),O=sin$2(w),le=E*v,fe=O*v,Se=E/v,ze=O/v,ke=(O*n-E*e)/v,Fe=(O*e+E*n)/v;function mt(Lt,bt){return Lt*=r,bt*=C,[le*Lt-fe*bt+e,n-fe*Lt-le*bt]}return mt.invert=function(Lt,bt){return[r*(Se*Lt-ze*bt+ke),C*(Fe-ze*Lt-Se*bt)]},mt}function projection(v){return projectionMutator(function(){return v})()}function projectionMutator(v){var e,n=150,r=480,C=250,w=0,E=0,O=0,le=0,fe=0,Se,ze=0,ke=1,Fe=1,mt=null,Lt=clipAntimeridian,bt=null,Ue,Gt,xt,Xt=identity$2,Zt=.5,wt,Vt,Wt,It,Nt;function Ft(qt){return Wt(qt[0]*radians$1,qt[1]*radians$1)}function jt(qt){return qt=Wt.invert(qt[0],qt[1]),qt&&[qt[0]*degrees$1,qt[1]*degrees$1]}Ft.stream=function(qt){return It&&Nt===qt?It:It=transformRadians(transformRotate(Se)(Lt(wt(Xt(Nt=qt)))))},Ft.preclip=function(qt){return arguments.length?(Lt=qt,mt=void 0,s0()):Lt},Ft.postclip=function(qt){return arguments.length?(Xt=qt,bt=Ue=Gt=xt=null,s0()):Xt},Ft.clipAngle=function(qt){return arguments.length?(Lt=+qt?clipCircle(mt=qt*radians$1):(mt=null,clipAntimeridian),s0()):mt*degrees$1},Ft.clipExtent=function(qt){return arguments.length?(Xt=qt==null?(bt=Ue=Gt=xt=null,identity$2):clipRectangle(bt=+qt[0][0],Ue=+qt[0][1],Gt=+qt[1][0],xt=+qt[1][1]),s0()):bt==null?null:[[bt,Ue],[Gt,xt]]},Ft.scale=function(qt){return arguments.length?(n=+qt,n0()):n},Ft.translate=function(qt){return arguments.length?(r=+qt[0],C=+qt[1],n0()):[r,C]},Ft.center=function(qt){return arguments.length?(w=qt[0]%360*radians$1,E=qt[1]%360*radians$1,n0()):[w*degrees$1,E*degrees$1]},Ft.rotate=function(qt){return arguments.length?(O=qt[0]%360*radians$1,le=qt[1]%360*radians$1,fe=qt.length>2?qt[2]%360*radians$1:0,n0()):[O*degrees$1,le*degrees$1,fe*degrees$1]},Ft.angle=function(qt){return arguments.length?(ze=qt%360*radians$1,n0()):ze*degrees$1},Ft.reflectX=function(qt){return arguments.length?(ke=qt?-1:1,n0()):ke<0},Ft.reflectY=function(qt){return arguments.length?(Fe=qt?-1:1,n0()):Fe<0},Ft.precision=function(qt){return arguments.length?(wt=resample(Vt,Zt=qt*qt),s0()):sqrt$2(Zt)},Ft.fitExtent=function(qt,Ht){return fitExtent(Ft,qt,Ht)},Ft.fitSize=function(qt,Ht){return fitSize(Ft,qt,Ht)},Ft.fitWidth=function(qt,Ht){return fitWidth(Ft,qt,Ht)},Ft.fitHeight=function(qt,Ht){return fitHeight(Ft,qt,Ht)};function n0(){var qt=scaleTranslateRotate(n,0,0,ke,Fe,ze).apply(null,e(w,E)),Ht=scaleTranslateRotate(n,r-qt[0],C-qt[1],ke,Fe,ze);return Se=rotateRadians(O,le,fe),Vt=compose(e,Ht),Wt=compose(Se,Vt),wt=resample(Vt,Zt),s0()}function s0(){return It=Nt=null,Ft}return function(){return e=v.apply(this,arguments),Ft.invert=e.invert&&jt,n0()}}function azimuthalInvert(v){return function(e,n){var r=sqrt$2(e*e+n*n),C=v(r),w=sin$2(C),E=cos$2(C);return[atan2$1(e*w,r*E),asin$1(r&&n*w/r)]}}function mercatorRaw(v,e){return[v,log(tan((halfPi$2+e)/2))]}mercatorRaw.invert=function(v,e){return[v,2*atan(exp(e))-halfPi$2]};function i$2(){return mercatorProjection(mercatorRaw).scale(961/tau$1)}function mercatorProjection(v){var e=projection(v),n=e.center,r=e.scale,C=e.translate,w=e.clipExtent,E=null,O,le,fe;e.scale=function(ze){return arguments.length?(r(ze),Se()):r()},e.translate=function(ze){return arguments.length?(C(ze),Se()):C()},e.center=function(ze){return arguments.length?(n(ze),Se()):n()},e.clipExtent=function(ze){return arguments.length?(ze==null?E=O=le=fe=null:(E=+ze[0][0],O=+ze[0][1],le=+ze[1][0],fe=+ze[1][1]),Se()):E==null?null:[[E,O],[le,fe]]};function Se(){var ze=pi$3*r(),ke=e(geoRotation(e.rotate()).invert([0,0]));return w(E==null?[[ke[0]-ze,ke[1]-ze],[ke[0]+ze,ke[1]+ze]]:v===mercatorRaw?[[Math.max(ke[0]-ze,E),O],[Math.min(ke[0]+ze,le),fe]]:[[E,Math.max(ke[1]-ze,O)],[le,Math.min(ke[1]+ze,fe)]])}return Se()}function equirectangularRaw(v,e){return[v,e]}equirectangularRaw.invert=equirectangularRaw;function s$1(){return projection(equirectangularRaw).scale(152.63)}function stereographicRaw(v,e){var n=cos$2(e),r=1+cos$2(v)*n;return[n*sin$2(v)/r,sin$2(e)/r]}stereographicRaw.invert=azimuthalInvert(function(v){return 2*atan(v)});function geoStereographic(){return projection(stereographicRaw).scale(250).clipAngle(142)}var abs=Math.abs,cos$1=Math.cos,sin$1=Math.sin,epsilon$2=1e-6,pi$2=Math.PI,halfPi$1=pi$2/2;function sinci(v){return v?v/Math.sin(v):1}function acos(v){return v>1?0:v<-1?pi$2:Math.acos(v)}function sqrt$1(v){return v>0?Math.sqrt(v):0}function aitoffRaw(v,e){var n=cos$1(e),r=sinci(acos(n*cos$1(v/=2)));return[2*n*sin$1(v)*r,sin$1(e)*r]}aitoffRaw.invert=function(v,e){if(!(v*v+4*e*e>pi$2*pi$2+epsilon$2)){var n=v,r=e,C=25;do{var w=sin$1(n),E=sin$1(n/2),O=cos$1(n/2),le=sin$1(r),fe=cos$1(r),Se=sin$1(2*r),ze=le*le,ke=fe*fe,Fe=E*E,mt=1-ke*O*O,Lt=mt?acos(fe*O)*sqrt$1(bt=1/mt):bt=0,bt,Ue=2*Lt*fe*E-v,Gt=Lt*le-e,xt=bt*(ke*Fe+Lt*fe*O*ze),Xt=bt*(.5*w*Se-Lt*2*le*E),Zt=bt*.25*(Se*E-Lt*le*ke*w),wt=bt*(ze*O+Lt*Fe*fe),Vt=Xt*Zt-wt*xt;if(!Vt)break;var Wt=(Gt*Xt-Ue*wt)/Vt,It=(Ue*Zt-Gt*xt)/Vt;n-=Wt,r-=It}while((abs(Wt)>epsilon$2||abs(It)>epsilon$2)&&--C>0);return[n,r]}};function winkel3Raw(v,e){var n=aitoffRaw(v,e);return[(n[0]+v/halfPi$1)/2,(n[1]+e)/2]}winkel3Raw.invert=function(v,e){var n=v,r=e,C=25;do{var w=cos$1(r),E=sin$1(r),O=sin$1(2*r),le=E*E,fe=w*w,Se=sin$1(n),ze=cos$1(n/2),ke=sin$1(n/2),Fe=ke*ke,mt=1-fe*ze*ze,Lt=mt?acos(w*ze)*sqrt$1(bt=1/mt):bt=0,bt,Ue=.5*(2*Lt*w*ke+n/halfPi$1)-v,Gt=.5*(Lt*E+r)-e,xt=.5*bt*(fe*Fe+Lt*w*ze*le)+.5/halfPi$1,Xt=bt*(Se*O/4-Lt*E*ke),Zt=.125*bt*(O*ke-Lt*E*fe*Se),wt=.5*bt*(le*ze+Lt*Fe*w)+.5,Vt=Xt*Zt-wt*xt,Wt=(Gt*Xt-Ue*wt)/Vt,It=(Ue*Zt-Gt*xt)/Vt;n-=Wt,r-=It}while((abs(Wt)>epsilon$2||abs(It)>epsilon$2)&&--C>0);return[n,r]};function p$1(){return projection(winkel3Raw).scale(158.837)}const i$1=v=>v instanceof Vector3?v:new Vector3(...v);function p(v,e,n=0){const r=(90-e)*Math.PI/180,C=(90-v)*Math.PI/180;return[n*Math.sin(r)*Math.cos(C),n*Math.cos(r),n*Math.sin(r)*Math.sin(C)]}function earcut(v,e,n=2){const r=e&&e.length,C=r?e[0]*n:v.length;let w=linkedList(v,0,C,n,!0);const E=[];if(!w||w.next===w.prev)return E;let O,le,fe;if(r&&(w=eliminateHoles(v,e,w,n)),v.length>80*n){O=v[0],le=v[1];let Se=O,ze=le;for(let ke=n;ke<C;ke+=n){const Fe=v[ke],mt=v[ke+1];Fe<O&&(O=Fe),mt<le&&(le=mt),Fe>Se&&(Se=Fe),mt>ze&&(ze=mt)}fe=Math.max(Se-O,ze-le),fe=fe!==0?32767/fe:0}return earcutLinked(w,E,n,O,le,fe,0),E}function linkedList(v,e,n,r,C){let w;if(C===signedArea(v,e,n,r)>0)for(let E=e;E<n;E+=r)w=insertNode(E/r|0,v[E],v[E+1],w);else for(let E=n-r;E>=e;E-=r)w=insertNode(E/r|0,v[E],v[E+1],w);return w&&equals(w,w.next)&&(removeNode(w),w=w.next),w}function filterPoints(v,e){if(!v)return v;e||(e=v);let n=v,r;do if(r=!1,!n.steiner&&(equals(n,n.next)||area(n.prev,n,n.next)===0)){if(removeNode(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function earcutLinked(v,e,n,r,C,w,E){if(!v)return;!E&&w&&indexCurve(v,r,C,w);let O=v;for(;v.prev!==v.next;){const le=v.prev,fe=v.next;if(w?isEarHashed(v,r,C,w):isEar(v)){e.push(le.i,v.i,fe.i),removeNode(v),v=fe.next,O=fe.next;continue}if(v=fe,v===O){E?E===1?(v=cureLocalIntersections(filterPoints(v),e),earcutLinked(v,e,n,r,C,w,2)):E===2&&splitEarcut(v,e,n,r,C,w):earcutLinked(filterPoints(v),e,n,r,C,w,1);break}}}function isEar(v){const e=v.prev,n=v,r=v.next;if(area(e,n,r)>=0)return!1;const C=e.x,w=n.x,E=r.x,O=e.y,le=n.y,fe=r.y,Se=Math.min(C,w,E),ze=Math.min(O,le,fe),ke=Math.max(C,w,E),Fe=Math.max(O,le,fe);let mt=r.next;for(;mt!==e;){if(mt.x>=Se&&mt.x<=ke&&mt.y>=ze&&mt.y<=Fe&&pointInTriangleExceptFirst(C,O,w,le,E,fe,mt.x,mt.y)&&area(mt.prev,mt,mt.next)>=0)return!1;mt=mt.next}return!0}function isEarHashed(v,e,n,r){const C=v.prev,w=v,E=v.next;if(area(C,w,E)>=0)return!1;const O=C.x,le=w.x,fe=E.x,Se=C.y,ze=w.y,ke=E.y,Fe=Math.min(O,le,fe),mt=Math.min(Se,ze,ke),Lt=Math.max(O,le,fe),bt=Math.max(Se,ze,ke),Ue=zOrder(Fe,mt,e,n,r),Gt=zOrder(Lt,bt,e,n,r);let xt=v.prevZ,Xt=v.nextZ;for(;xt&&xt.z>=Ue&&Xt&&Xt.z<=Gt;){if(xt.x>=Fe&&xt.x<=Lt&&xt.y>=mt&&xt.y<=bt&&xt!==C&&xt!==E&&pointInTriangleExceptFirst(O,Se,le,ze,fe,ke,xt.x,xt.y)&&area(xt.prev,xt,xt.next)>=0||(xt=xt.prevZ,Xt.x>=Fe&&Xt.x<=Lt&&Xt.y>=mt&&Xt.y<=bt&&Xt!==C&&Xt!==E&&pointInTriangleExceptFirst(O,Se,le,ze,fe,ke,Xt.x,Xt.y)&&area(Xt.prev,Xt,Xt.next)>=0))return!1;Xt=Xt.nextZ}for(;xt&&xt.z>=Ue;){if(xt.x>=Fe&&xt.x<=Lt&&xt.y>=mt&&xt.y<=bt&&xt!==C&&xt!==E&&pointInTriangleExceptFirst(O,Se,le,ze,fe,ke,xt.x,xt.y)&&area(xt.prev,xt,xt.next)>=0)return!1;xt=xt.prevZ}for(;Xt&&Xt.z<=Gt;){if(Xt.x>=Fe&&Xt.x<=Lt&&Xt.y>=mt&&Xt.y<=bt&&Xt!==C&&Xt!==E&&pointInTriangleExceptFirst(O,Se,le,ze,fe,ke,Xt.x,Xt.y)&&area(Xt.prev,Xt,Xt.next)>=0)return!1;Xt=Xt.nextZ}return!0}function cureLocalIntersections(v,e){let n=v;do{const r=n.prev,C=n.next.next;!equals(r,C)&&intersects(r,n,n.next,C)&&locallyInside(r,C)&&locallyInside(C,r)&&(e.push(r.i,n.i,C.i),removeNode(n),removeNode(n.next),n=v=C),n=n.next}while(n!==v);return filterPoints(n)}function splitEarcut(v,e,n,r,C,w){let E=v;do{let O=E.next.next;for(;O!==E.prev;){if(E.i!==O.i&&isValidDiagonal(E,O)){let le=splitPolygon(E,O);E=filterPoints(E,E.next),le=filterPoints(le,le.next),earcutLinked(E,e,n,r,C,w,0),earcutLinked(le,e,n,r,C,w,0);return}O=O.next}E=E.next}while(E!==v)}function eliminateHoles(v,e,n,r){const C=[];for(let w=0,E=e.length;w<E;w++){const O=e[w]*r,le=w<E-1?e[w+1]*r:v.length,fe=linkedList(v,O,le,r,!1);fe===fe.next&&(fe.steiner=!0),C.push(getLeftmost(fe))}C.sort(compareXYSlope);for(let w=0;w<C.length;w++)n=eliminateHole(C[w],n);return n}function compareXYSlope(v,e){let n=v.x-e.x;if(n===0&&(n=v.y-e.y,n===0)){const r=(v.next.y-v.y)/(v.next.x-v.x),C=(e.next.y-e.y)/(e.next.x-e.x);n=r-C}return n}function eliminateHole(v,e){const n=findHoleBridge(v,e);if(!n)return e;const r=splitPolygon(n,v);return filterPoints(r,r.next),filterPoints(n,n.next)}function findHoleBridge(v,e){let n=e;const r=v.x,C=v.y;let w=-1/0,E;if(equals(v,n))return n;do{if(equals(v,n.next))return n.next;if(C<=n.y&&C>=n.next.y&&n.next.y!==n.y){const ze=n.x+(C-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(ze<=r&&ze>w&&(w=ze,E=n.x<n.next.x?n:n.next,ze===r))return E}n=n.next}while(n!==e);if(!E)return null;const O=E,le=E.x,fe=E.y;let Se=1/0;n=E;do{if(r>=n.x&&n.x>=le&&r!==n.x&&pointInTriangle(C<fe?r:w,C,le,fe,C<fe?w:r,C,n.x,n.y)){const ze=Math.abs(C-n.y)/(r-n.x);locallyInside(n,v)&&(ze<Se||ze===Se&&(n.x>E.x||n.x===E.x&&sectorContainsSector(E,n)))&&(E=n,Se=ze)}n=n.next}while(n!==O);return E}function sectorContainsSector(v,e){return area(v.prev,v,e.prev)<0&&area(e.next,v,v.next)<0}function indexCurve(v,e,n,r){let C=v;do C.z===0&&(C.z=zOrder(C.x,C.y,e,n,r)),C.prevZ=C.prev,C.nextZ=C.next,C=C.next;while(C!==v);C.prevZ.nextZ=null,C.prevZ=null,sortLinked(C)}function sortLinked(v){let e,n=1;do{let r=v,C;v=null;let w=null;for(e=0;r;){e++;let E=r,O=0;for(let fe=0;fe<n&&(O++,E=E.nextZ,!!E);fe++);let le=n;for(;O>0||le>0&&E;)O!==0&&(le===0||!E||r.z<=E.z)?(C=r,r=r.nextZ,O--):(C=E,E=E.nextZ,le--),w?w.nextZ=C:v=C,C.prevZ=w,w=C;r=E}w.nextZ=null,n*=2}while(e>1);return v}function zOrder(v,e,n,r,C){return v=(v-n)*C|0,e=(e-r)*C|0,v=(v|v<<8)&16711935,v=(v|v<<4)&252645135,v=(v|v<<2)&858993459,v=(v|v<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,v|e<<1}function getLeftmost(v){let e=v,n=v;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==v);return n}function pointInTriangle(v,e,n,r,C,w,E,O){return(C-E)*(e-O)>=(v-E)*(w-O)&&(v-E)*(r-O)>=(n-E)*(e-O)&&(n-E)*(w-O)>=(C-E)*(r-O)}function pointInTriangleExceptFirst(v,e,n,r,C,w,E,O){return!(v===E&&e===O)&&pointInTriangle(v,e,n,r,C,w,E,O)}function isValidDiagonal(v,e){return v.next.i!==e.i&&v.prev.i!==e.i&&!intersectsPolygon(v,e)&&(locallyInside(v,e)&&locallyInside(e,v)&&middleInside(v,e)&&(area(v.prev,v,e.prev)||area(v,e.prev,e))||equals(v,e)&&area(v.prev,v,v.next)>0&&area(e.prev,e,e.next)>0)}function area(v,e,n){return(e.y-v.y)*(n.x-e.x)-(e.x-v.x)*(n.y-e.y)}function equals(v,e){return v.x===e.x&&v.y===e.y}function intersects(v,e,n,r){const C=sign$1(area(v,e,n)),w=sign$1(area(v,e,r)),E=sign$1(area(n,r,v)),O=sign$1(area(n,r,e));return!!(C!==w&&E!==O||C===0&&onSegment(v,n,e)||w===0&&onSegment(v,r,e)||E===0&&onSegment(n,v,r)||O===0&&onSegment(n,e,r))}function onSegment(v,e,n){return e.x<=Math.max(v.x,n.x)&&e.x>=Math.min(v.x,n.x)&&e.y<=Math.max(v.y,n.y)&&e.y>=Math.min(v.y,n.y)}function sign$1(v){return v>0?1:v<0?-1:0}function intersectsPolygon(v,e){let n=v;do{if(n.i!==v.i&&n.next.i!==v.i&&n.i!==e.i&&n.next.i!==e.i&&intersects(n,n.next,v,e))return!0;n=n.next}while(n!==v);return!1}function locallyInside(v,e){return area(v.prev,v,v.next)<0?area(v,e,v.next)>=0&&area(v,v.prev,e)>=0:area(v,e,v.prev)<0||area(v,v.next,e)<0}function middleInside(v,e){let n=v,r=!1;const C=(v.x+e.x)/2,w=(v.y+e.y)/2;do n.y>w!=n.next.y>w&&n.next.y!==n.y&&C<(n.next.x-n.x)*(w-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==v);return r}function splitPolygon(v,e){const n=createNode(v.i,v.x,v.y),r=createNode(e.i,e.x,e.y),C=v.next,w=e.prev;return v.next=e,e.prev=v,n.next=C,C.prev=n,r.next=n,n.prev=r,w.next=r,r.prev=w,r}function insertNode(v,e,n,r){const C=createNode(v,e,n);return r?(C.next=r.next,C.prev=r,r.next.prev=C,r.next=C):(C.prev=C,C.next=C),C}function removeNode(v){v.next.prev=v.prev,v.prev.next=v.next,v.prevZ&&(v.prevZ.nextZ=v.nextZ),v.nextZ&&(v.nextZ.prevZ=v.prevZ)}function createNode(v,e,n){return{i:v,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function signedArea(v,e,n,r){let C=0;for(let w=e,E=n-r;w<n;w+=r)C+=(v[E]-v[w])*(v[w+1]+v[E+1]),E=w;return C}function flatten(v){const e=[],n=[],r=v[0][0].length;let C=0,w=0;for(const E of v){for(const O of E)for(let le=0;le<r;le++)e.push(O[le]);w&&(C+=w,n.push(C)),w=E.length}return{vertices:e,holes:n,dimensions:r}}function getCoord(v){if(!v)throw new Error("coord is required");if(!Array.isArray(v)){if(v.type==="Feature"&&v.geometry!==null&&v.geometry.type==="Point")return[...v.geometry.coordinates];if(v.type==="Point")return[...v.coordinates]}if(Array.isArray(v)&&v.length>=2&&!Array.isArray(v[0])&&!Array.isArray(v[1]))return[...v];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function getCoords(v){if(Array.isArray(v))return v;if(v.type==="Feature"){if(v.geometry!==null)return v.geometry.coordinates}else if(v.coordinates)return v.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function getGeom(v){return v.type==="Feature"?v.geometry:v}function booleanClockwise(v){const e=getCoords(v);let n=0,r=1,C,w;for(;r<e.length;)C=w||e[0],w=e[r],n+=(w[0]-C[0])*(w[1]+C[1]),r++;return n>0}var turf_boolean_clockwise_default=booleanClockwise;const epsilon$1=11102230246251565e-32,splitter=134217729,resulterrbound=(3+8*epsilon$1)*epsilon$1;function sum(v,e,n,r,C){let w,E,O,le,fe=e[0],Se=r[0],ze=0,ke=0;Se>fe==Se>-fe?(w=fe,fe=e[++ze]):(w=Se,Se=r[++ke]);let Fe=0;if(ze<v&&ke<n)for(Se>fe==Se>-fe?(E=fe+w,O=w-(E-fe),fe=e[++ze]):(E=Se+w,O=w-(E-Se),Se=r[++ke]),w=E,O!==0&&(C[Fe++]=O);ze<v&&ke<n;)Se>fe==Se>-fe?(E=w+fe,le=E-w,O=w-(E-le)+(fe-le),fe=e[++ze]):(E=w+Se,le=E-w,O=w-(E-le)+(Se-le),Se=r[++ke]),w=E,O!==0&&(C[Fe++]=O);for(;ze<v;)E=w+fe,le=E-w,O=w-(E-le)+(fe-le),fe=e[++ze],w=E,O!==0&&(C[Fe++]=O);for(;ke<n;)E=w+Se,le=E-w,O=w-(E-le)+(Se-le),Se=r[++ke],w=E,O!==0&&(C[Fe++]=O);return(w!==0||Fe===0)&&(C[Fe++]=w),Fe}function estimate(v,e){let n=e[0];for(let r=1;r<v;r++)n+=e[r];return n}function vec(v){return new Float64Array(v)}const ccwerrboundA=(3+16*epsilon$1)*epsilon$1,ccwerrboundB=(2+12*epsilon$1)*epsilon$1,ccwerrboundC=(9+64*epsilon$1)*epsilon$1*epsilon$1,B=vec(4),C1=vec(8),C2=vec(12),D$2=vec(16),u$2=vec(4);function orient2dadapt(v,e,n,r,C,w,E){let O,le,fe,Se,ze,ke,Fe,mt,Lt,bt,Ue,Gt,xt,Xt,Zt,wt,Vt,Wt;const It=v-C,Nt=n-C,Ft=e-w,jt=r-w;Xt=It*jt,ke=splitter*It,Fe=ke-(ke-It),mt=It-Fe,ke=splitter*jt,Lt=ke-(ke-jt),bt=jt-Lt,Zt=mt*bt-(Xt-Fe*Lt-mt*Lt-Fe*bt),wt=Ft*Nt,ke=splitter*Ft,Fe=ke-(ke-Ft),mt=Ft-Fe,ke=splitter*Nt,Lt=ke-(ke-Nt),bt=Nt-Lt,Vt=mt*bt-(wt-Fe*Lt-mt*Lt-Fe*bt),Ue=Zt-Vt,ze=Zt-Ue,B[0]=Zt-(Ue+ze)+(ze-Vt),Gt=Xt+Ue,ze=Gt-Xt,xt=Xt-(Gt-ze)+(Ue-ze),Ue=xt-wt,ze=xt-Ue,B[1]=xt-(Ue+ze)+(ze-wt),Wt=Gt+Ue,ze=Wt-Gt,B[2]=Gt-(Wt-ze)+(Ue-ze),B[3]=Wt;let n0=estimate(4,B),s0=ccwerrboundB*E;if(n0>=s0||-n0>=s0||(ze=v-It,O=v-(It+ze)+(ze-C),ze=n-Nt,fe=n-(Nt+ze)+(ze-C),ze=e-Ft,le=e-(Ft+ze)+(ze-w),ze=r-jt,Se=r-(jt+ze)+(ze-w),O===0&&le===0&&fe===0&&Se===0)||(s0=ccwerrboundC*E+resulterrbound*Math.abs(n0),n0+=It*Se+jt*O-(Ft*fe+Nt*le),n0>=s0||-n0>=s0))return n0;Xt=O*jt,ke=splitter*O,Fe=ke-(ke-O),mt=O-Fe,ke=splitter*jt,Lt=ke-(ke-jt),bt=jt-Lt,Zt=mt*bt-(Xt-Fe*Lt-mt*Lt-Fe*bt),wt=le*Nt,ke=splitter*le,Fe=ke-(ke-le),mt=le-Fe,ke=splitter*Nt,Lt=ke-(ke-Nt),bt=Nt-Lt,Vt=mt*bt-(wt-Fe*Lt-mt*Lt-Fe*bt),Ue=Zt-Vt,ze=Zt-Ue,u$2[0]=Zt-(Ue+ze)+(ze-Vt),Gt=Xt+Ue,ze=Gt-Xt,xt=Xt-(Gt-ze)+(Ue-ze),Ue=xt-wt,ze=xt-Ue,u$2[1]=xt-(Ue+ze)+(ze-wt),Wt=Gt+Ue,ze=Wt-Gt,u$2[2]=Gt-(Wt-ze)+(Ue-ze),u$2[3]=Wt;const qt=sum(4,B,4,u$2,C1);Xt=It*Se,ke=splitter*It,Fe=ke-(ke-It),mt=It-Fe,ke=splitter*Se,Lt=ke-(ke-Se),bt=Se-Lt,Zt=mt*bt-(Xt-Fe*Lt-mt*Lt-Fe*bt),wt=Ft*fe,ke=splitter*Ft,Fe=ke-(ke-Ft),mt=Ft-Fe,ke=splitter*fe,Lt=ke-(ke-fe),bt=fe-Lt,Vt=mt*bt-(wt-Fe*Lt-mt*Lt-Fe*bt),Ue=Zt-Vt,ze=Zt-Ue,u$2[0]=Zt-(Ue+ze)+(ze-Vt),Gt=Xt+Ue,ze=Gt-Xt,xt=Xt-(Gt-ze)+(Ue-ze),Ue=xt-wt,ze=xt-Ue,u$2[1]=xt-(Ue+ze)+(ze-wt),Wt=Gt+Ue,ze=Wt-Gt,u$2[2]=Gt-(Wt-ze)+(Ue-ze),u$2[3]=Wt;const Ht=sum(qt,C1,4,u$2,C2);Xt=O*Se,ke=splitter*O,Fe=ke-(ke-O),mt=O-Fe,ke=splitter*Se,Lt=ke-(ke-Se),bt=Se-Lt,Zt=mt*bt-(Xt-Fe*Lt-mt*Lt-Fe*bt),wt=le*fe,ke=splitter*le,Fe=ke-(ke-le),mt=le-Fe,ke=splitter*fe,Lt=ke-(ke-fe),bt=fe-Lt,Vt=mt*bt-(wt-Fe*Lt-mt*Lt-Fe*bt),Ue=Zt-Vt,ze=Zt-Ue,u$2[0]=Zt-(Ue+ze)+(ze-Vt),Gt=Xt+Ue,ze=Gt-Xt,xt=Xt-(Gt-ze)+(Ue-ze),Ue=xt-wt,ze=xt-Ue,u$2[1]=xt-(Ue+ze)+(ze-wt),Wt=Gt+Ue,ze=Wt-Gt,u$2[2]=Gt-(Wt-ze)+(Ue-ze),u$2[3]=Wt;const $t=sum(Ht,C2,4,u$2,D$2);return D$2[$t-1]}function orient2d(v,e,n,r,C,w){const E=(e-w)*(n-C),O=(v-C)*(r-w),le=E-O,fe=Math.abs(E+O);return Math.abs(le)>=ccwerrboundA*fe?le:-orient2dadapt(v,e,n,r,C,w,fe)}const EPSILON$2=Math.pow(2,-52),EDGE_STACK=new Uint32Array(512);class Delaunator{static from(e,n=defaultGetX,r=defaultGetY){const C=e.length,w=new Float64Array(C*2);for(let E=0;E<C;E++){const O=e[E];w[2*E]=n(O),w[2*E+1]=r(O)}return new Delaunator(w)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:C,_hullHash:w}=this,E=e.length>>1;let O=1/0,le=1/0,fe=-1/0,Se=-1/0;for(let It=0;It<E;It++){const Nt=e[2*It],Ft=e[2*It+1];Nt<O&&(O=Nt),Ft<le&&(le=Ft),Nt>fe&&(fe=Nt),Ft>Se&&(Se=Ft),this._ids[It]=It}const ze=(O+fe)/2,ke=(le+Se)/2;let Fe,mt,Lt;for(let It=0,Nt=1/0;It<E;It++){const Ft=dist(ze,ke,e[2*It],e[2*It+1]);Ft<Nt&&(Fe=It,Nt=Ft)}const bt=e[2*Fe],Ue=e[2*Fe+1];for(let It=0,Nt=1/0;It<E;It++){if(It===Fe)continue;const Ft=dist(bt,Ue,e[2*It],e[2*It+1]);Ft<Nt&&Ft>0&&(mt=It,Nt=Ft)}let Gt=e[2*mt],xt=e[2*mt+1],Xt=1/0;for(let It=0;It<E;It++){if(It===Fe||It===mt)continue;const Nt=circumradius(bt,Ue,Gt,xt,e[2*It],e[2*It+1]);Nt<Xt&&(Lt=It,Xt=Nt)}let Zt=e[2*Lt],wt=e[2*Lt+1];if(Xt===1/0){for(let Ft=0;Ft<E;Ft++)this._dists[Ft]=e[2*Ft]-e[0]||e[2*Ft+1]-e[1];quicksort(this._ids,this._dists,0,E-1);const It=new Uint32Array(E);let Nt=0;for(let Ft=0,jt=-1/0;Ft<E;Ft++){const n0=this._ids[Ft],s0=this._dists[n0];s0>jt&&(It[Nt++]=n0,jt=s0)}this.hull=It.subarray(0,Nt),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(orient2d(bt,Ue,Gt,xt,Zt,wt)<0){const It=mt,Nt=Gt,Ft=xt;mt=Lt,Gt=Zt,xt=wt,Lt=It,Zt=Nt,wt=Ft}const Vt=circumcenter(bt,Ue,Gt,xt,Zt,wt);this._cx=Vt.x,this._cy=Vt.y;for(let It=0;It<E;It++)this._dists[It]=dist(e[2*It],e[2*It+1],Vt.x,Vt.y);quicksort(this._ids,this._dists,0,E-1),this._hullStart=Fe;let Wt=3;r[Fe]=n[Lt]=mt,r[mt]=n[Fe]=Lt,r[Lt]=n[mt]=Fe,C[Fe]=0,C[mt]=1,C[Lt]=2,w.fill(-1),w[this._hashKey(bt,Ue)]=Fe,w[this._hashKey(Gt,xt)]=mt,w[this._hashKey(Zt,wt)]=Lt,this.trianglesLen=0,this._addTriangle(Fe,mt,Lt,-1,-1,-1);for(let It=0,Nt,Ft;It<this._ids.length;It++){const jt=this._ids[It],n0=e[2*jt],s0=e[2*jt+1];if(It>0&&Math.abs(n0-Nt)<=EPSILON$2&&Math.abs(s0-Ft)<=EPSILON$2||(Nt=n0,Ft=s0,jt===Fe||jt===mt||jt===Lt))continue;let qt=0;for(let u0=0,d0=this._hashKey(n0,s0);u0<this._hashSize&&(qt=w[(d0+u0)%this._hashSize],!(qt!==-1&&qt!==r[qt]));u0++);qt=n[qt];let Ht=qt,$t;for(;$t=r[Ht],orient2d(n0,s0,e[2*Ht],e[2*Ht+1],e[2*$t],e[2*$t+1])>=0;)if(Ht=$t,Ht===qt){Ht=-1;break}if(Ht===-1)continue;let Kt=this._addTriangle(Ht,jt,r[Ht],-1,-1,C[Ht]);C[jt]=this._legalize(Kt+2),C[Ht]=Kt,Wt++;let e0=r[Ht];for(;$t=r[e0],orient2d(n0,s0,e[2*e0],e[2*e0+1],e[2*$t],e[2*$t+1])<0;)Kt=this._addTriangle(e0,jt,$t,C[jt],-1,C[e0]),C[jt]=this._legalize(Kt+2),r[e0]=e0,Wt--,e0=$t;if(Ht===qt)for(;$t=n[Ht],orient2d(n0,s0,e[2*$t],e[2*$t+1],e[2*Ht],e[2*Ht+1])<0;)Kt=this._addTriangle($t,jt,Ht,-1,C[Ht],C[$t]),this._legalize(Kt+2),C[$t]=Kt,r[Ht]=Ht,Wt--,Ht=$t;this._hullStart=n[jt]=Ht,r[Ht]=n[e0]=jt,r[jt]=e0,w[this._hashKey(n0,s0)]=jt,w[this._hashKey(e[2*Ht],e[2*Ht+1])]=Ht}this.hull=new Uint32Array(Wt);for(let It=0,Nt=this._hullStart;It<Wt;It++)this.hull[It]=Nt,Nt=r[Nt];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(pseudoAngle(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:C}=this;let w=0,E=0;for(;;){const O=r[e],le=e-e%3;if(E=le+(e+2)%3,O===-1){if(w===0)break;e=EDGE_STACK[--w];continue}const fe=O-O%3,Se=le+(e+1)%3,ze=fe+(O+2)%3,ke=n[E],Fe=n[e],mt=n[Se],Lt=n[ze];if(inCircle(C[2*ke],C[2*ke+1],C[2*Fe],C[2*Fe+1],C[2*mt],C[2*mt+1],C[2*Lt],C[2*Lt+1])){n[e]=Lt,n[O]=ke;const Ue=r[ze];if(Ue===-1){let xt=this._hullStart;do{if(this._hullTri[xt]===ze){this._hullTri[xt]=e;break}xt=this._hullPrev[xt]}while(xt!==this._hullStart)}this._link(e,Ue),this._link(O,r[E]),this._link(E,ze);const Gt=fe+(O+1)%3;w<EDGE_STACK.length&&(EDGE_STACK[w++]=Gt)}else{if(w===0)break;e=EDGE_STACK[--w]}}return E}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,C,w,E){const O=this.trianglesLen;return this._triangles[O]=e,this._triangles[O+1]=n,this._triangles[O+2]=r,this._link(O,C),this._link(O+1,w),this._link(O+2,E),this.trianglesLen+=3,O}}function pseudoAngle(v,e){const n=v/(Math.abs(v)+Math.abs(e));return(e>0?3-n:1+n)/4}function dist(v,e,n,r){const C=v-n,w=e-r;return C*C+w*w}function inCircle(v,e,n,r,C,w,E,O){const le=v-E,fe=e-O,Se=n-E,ze=r-O,ke=C-E,Fe=w-O,mt=le*le+fe*fe,Lt=Se*Se+ze*ze,bt=ke*ke+Fe*Fe;return le*(ze*bt-Lt*Fe)-fe*(Se*bt-Lt*ke)+mt*(Se*Fe-ze*ke)<0}function circumradius(v,e,n,r,C,w){const E=n-v,O=r-e,le=C-v,fe=w-e,Se=E*E+O*O,ze=le*le+fe*fe,ke=.5/(E*fe-O*le),Fe=(fe*Se-O*ze)*ke,mt=(E*ze-le*Se)*ke;return Fe*Fe+mt*mt}function circumcenter(v,e,n,r,C,w){const E=n-v,O=r-e,le=C-v,fe=w-e,Se=E*E+O*O,ze=le*le+fe*fe,ke=.5/(E*fe-O*le),Fe=v+(fe*Se-O*ze)*ke,mt=e+(E*ze-le*Se)*ke;return{x:Fe,y:mt}}function quicksort(v,e,n,r){if(r-n<=20)for(let C=n+1;C<=r;C++){const w=v[C],E=e[w];let O=C-1;for(;O>=n&&e[v[O]]>E;)v[O+1]=v[O--];v[O+1]=w}else{const C=n+r>>1;let w=n+1,E=r;swap(v,C,w),e[v[n]]>e[v[r]]&&swap(v,n,r),e[v[w]]>e[v[r]]&&swap(v,w,r),e[v[n]]>e[v[w]]&&swap(v,n,w);const O=v[w],le=e[O];for(;;){do w++;while(e[v[w]]<le);do E--;while(e[v[E]]>le);if(E<w)break;swap(v,w,E)}v[n+1]=v[E],v[E]=O,r-w+1>=E-n?(quicksort(v,e,w,r),quicksort(v,e,n,E-1)):(quicksort(v,e,n,E-1),quicksort(v,e,w,r))}}function swap(v,e,n){const r=v[e];v[e]=v[n],v[n]=r}function defaultGetX(v){return v[0]}function defaultGetY(v){return v[1]}function pointInPolygon(v,e){var n=0,r=0,C=0,w=0,E=0,O=0,le=0,fe=0,Se=null,ze=null,ke=v[0],Fe=v[1],mt=e.length;for(n;n<mt;n++){r=0;var Lt=e[n].length-1,bt=e[n];if(Se=bt[0],Se[0]!==bt[Lt][0]&&Se[1]!==bt[Lt][1])throw new Error("First and last coordinates in a ring must be the same");for(E=Se[0]-ke,O=Se[1]-Fe,r;r<Lt;r++){if(ze=bt[r+1],fe=ze[1]-Fe,O<0&&fe<0||O>0&&fe>0){Se=ze,O=fe,E=Se[0]-ke;continue}if(le=ze[0]-v[0],fe>0&&O<=0){if(w=E*fe-le*O,w>0)C=C+1;else if(w===0)return 0}else if(O>0&&fe<=0){if(w=E*fe-le*O,w<0)C=C+1;else if(w===0)return 0}else if(fe===0&&O<0){if(w=E*fe-le*O,w===0)return 0}else if(O===0&&fe<0){if(w=E*fe-le*O,w===0)return 0}else if(O===0&&fe===0){if(le<=0&&E>=0)return 0;if(E<=0&&le>=0)return 0}Se=ze,O=fe,E=le}}return C%2!==0}function booleanPointInPolygon(v,e,n={}){if(!v)throw new Error("point is required");if(!e)throw new Error("polygon is required");const r=getCoord(v),C=getGeom(e),w=C.type,E=e.bbox;let O=C.coordinates;if(E&&inBBox(r,E)===!1)return!1;w==="Polygon"&&(O=[O]);let le=!1;for(var fe=0;fe<O.length;++fe){const Se=pointInPolygon(r,O[fe]);if(Se===0)return!n.ignoreBoundary;Se&&(le=!0)}return le}function inBBox(v,e){return e[0]<=v[0]&&e[1]<=v[1]&&e[2]>=v[0]&&e[3]>=v[1]}var turf_boolean_point_in_polygon_default=booleanPointInPolygon;const epsilon=1e-6;class Path{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const C=e+r,w=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${C},${w}`:(Math.abs(this._x1-C)>epsilon||Math.abs(this._y1-w)>epsilon)&&(this._+="L"+C+","+w),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=C},${this._y1=w}`)}rect(e,n,r,C){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+C}h${-r}Z`}value(){return this._||null}}class Polygon{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class Voronoi{constructor(e,[n,r,C,w]=[0,0,960,500]){if(!((C=+C)>=(n=+n))||!((w=+w)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=C,this.xmin=n,this.ymax=w,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:C}=this;let w,E;const O=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let Lt=0,bt=0,Ue=r.length,Gt,xt;Lt<Ue;Lt+=3,bt+=2){const Xt=r[Lt]*2,Zt=r[Lt+1]*2,wt=r[Lt+2]*2,Vt=e[Xt],Wt=e[Xt+1],It=e[Zt],Nt=e[Zt+1],Ft=e[wt],jt=e[wt+1],n0=It-Vt,s0=Nt-Wt,qt=Ft-Vt,Ht=jt-Wt,$t=(n0*Ht-s0*qt)*2;if(Math.abs($t)<1e-9){if(w===void 0){w=E=0;for(const e0 of n)w+=e[e0*2],E+=e[e0*2+1];w/=n.length,E/=n.length}const Kt=1e9*Math.sign((w-Vt)*Ht-(E-Wt)*qt);Gt=(Vt+Ft)/2-Kt*Ht,xt=(Wt+jt)/2+Kt*qt}else{const Kt=1/$t,e0=n0*n0+s0*s0,u0=qt*qt+Ht*Ht;Gt=Vt+(Ht*e0-s0*u0)*Kt,xt=Wt+(n0*u0-qt*e0)*Kt}O[bt]=Gt,O[bt+1]=xt}let le=n[n.length-1],fe,Se=le*4,ze,ke=e[2*le],Fe,mt=e[2*le+1];C.fill(0);for(let Lt=0;Lt<n.length;++Lt)le=n[Lt],fe=Se,ze=ke,Fe=mt,Se=le*4,ke=e[2*le],mt=e[2*le+1],C[fe+2]=C[Se]=Fe-mt,C[fe+3]=C[Se+1]=ke-ze}render(e){const n=e==null?e=new Path:void 0,{delaunay:{halfedges:r,inedges:C,hull:w},circumcenters:E,vectors:O}=this;if(w.length<=1)return null;for(let Se=0,ze=r.length;Se<ze;++Se){const ke=r[Se];if(ke<Se)continue;const Fe=Math.floor(Se/3)*2,mt=Math.floor(ke/3)*2,Lt=E[Fe],bt=E[Fe+1],Ue=E[mt],Gt=E[mt+1];this._renderSegment(Lt,bt,Ue,Gt,e)}let le,fe=w[w.length-1];for(let Se=0;Se<w.length;++Se){le=fe,fe=w[Se];const ze=Math.floor(C[fe]/3)*2,ke=E[ze],Fe=E[ze+1],mt=le*4,Lt=this._project(ke,Fe,O[mt+2],O[mt+3]);Lt&&this._renderSegment(ke,Fe,Lt[0],Lt[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new Path:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new Path:void 0,C=this._clip(e);if(C===null||!C.length)return;n.moveTo(C[0],C[1]);let w=C.length;for(;C[0]===C[w-2]&&C[1]===C[w-1]&&w>1;)w-=2;for(let E=2;E<w;E+=2)(C[E]!==C[E-2]||C[E+1]!==C[E-1])&&n.lineTo(C[E],C[E+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const C=this.cellPolygon(n);C&&(C.index=n,yield C)}}cellPolygon(e){const n=new Polygon;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,C,w){let E;const O=this._regioncode(e,n),le=this._regioncode(r,C);O===0&&le===0?(w.moveTo(e,n),w.lineTo(r,C)):(E=this._clipSegment(e,n,r,C,O,le))&&(w.moveTo(E[0],E[1]),w.lineTo(E[2],E[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const C=this._clip(r);if(C){e:for(let w=0,E=n.length;w<E;w+=2)for(let O=0,le=C.length;O<le;O+=2)if(n[w]===C[O]&&n[w+1]===C[O+1]&&n[(w+2)%E]===C[(O+le-2)%le]&&n[(w+3)%E]===C[(O+le-1)%le]){yield r;break e}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:C,triangles:w}}=this,E=r[e];if(E===-1)return null;const O=[];let le=E;do{const fe=Math.floor(le/3);if(O.push(n[fe*2],n[fe*2+1]),le=le%3===2?le-2:le+1,w[le]!==e)break;le=C[le]}while(le!==E&&le!==-1);return O}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,C=e*4;return this._simplify(r[C]||r[C+1]?this._clipInfinite(e,n,r[C],r[C+1],r[C+2],r[C+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let C=null,w,E,O=n[r-2],le=n[r-1],fe,Se=this._regioncode(O,le),ze,ke=0;for(let Fe=0;Fe<r;Fe+=2)if(w=O,E=le,O=n[Fe],le=n[Fe+1],fe=Se,Se=this._regioncode(O,le),fe===0&&Se===0)ze=ke,ke=0,C?C.push(O,le):C=[O,le];else{let mt,Lt,bt,Ue,Gt;if(fe===0){if((mt=this._clipSegment(w,E,O,le,fe,Se))===null)continue;[Lt,bt,Ue,Gt]=mt}else{if((mt=this._clipSegment(O,le,w,E,Se,fe))===null)continue;[Ue,Gt,Lt,bt]=mt,ze=ke,ke=this._edgecode(Lt,bt),ze&&ke&&this._edge(e,ze,ke,C,C.length),C?C.push(Lt,bt):C=[Lt,bt]}ze=ke,ke=this._edgecode(Ue,Gt),ze&&ke&&this._edge(e,ze,ke,C,C.length),C?C.push(Ue,Gt):C=[Ue,Gt]}if(C)ze=ke,ke=this._edgecode(C[0],C[1]),ze&&ke&&this._edge(e,ze,ke,C,C.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return C}_clipSegment(e,n,r,C,w,E){const O=w<E;for(O&&([e,n,r,C,w,E]=[r,C,e,n,E,w]);;){if(w===0&&E===0)return O?[r,C,e,n]:[e,n,r,C];if(w&E)return null;let le,fe,Se=w||E;Se&8?(le=e+(r-e)*(this.ymax-n)/(C-n),fe=this.ymax):Se&4?(le=e+(r-e)*(this.ymin-n)/(C-n),fe=this.ymin):Se&2?(fe=n+(C-n)*(this.xmax-e)/(r-e),le=this.xmax):(fe=n+(C-n)*(this.xmin-e)/(r-e),le=this.xmin),w?(e=le,n=fe,w=this._regioncode(e,n)):(r=le,C=fe,E=this._regioncode(r,C))}}_clipInfinite(e,n,r,C,w,E){let O=Array.from(n),le;if((le=this._project(O[0],O[1],r,C))&&O.unshift(le[0],le[1]),(le=this._project(O[O.length-2],O[O.length-1],w,E))&&O.push(le[0],le[1]),O=this._clipFinite(e,O))for(let fe=0,Se=O.length,ze,ke=this._edgecode(O[Se-2],O[Se-1]);fe<Se;fe+=2)ze=ke,ke=this._edgecode(O[fe],O[fe+1]),ze&&ke&&(fe=this._edge(e,ze,ke,O,fe),Se=O.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(O=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return O}_edge(e,n,r,C,w){for(;n!==r;){let E,O;switch(n){case 5:n=4;continue;case 4:n=6,E=this.xmax,O=this.ymin;break;case 6:n=2;continue;case 2:n=10,E=this.xmax,O=this.ymax;break;case 10:n=8;continue;case 8:n=9,E=this.xmin,O=this.ymax;break;case 9:n=1;continue;case 1:n=5,E=this.xmin,O=this.ymin;break}(C[w]!==E||C[w+1]!==O)&&this.contains(e,E,O)&&(C.splice(w,0,E,O),w+=2)}return w}_project(e,n,r,C){let w=1/0,E,O,le;if(C<0){if(n<=this.ymin)return null;(E=(this.ymin-n)/C)<w&&(le=this.ymin,O=e+(w=E)*r)}else if(C>0){if(n>=this.ymax)return null;(E=(this.ymax-n)/C)<w&&(le=this.ymax,O=e+(w=E)*r)}if(r>0){if(e>=this.xmax)return null;(E=(this.xmax-e)/r)<w&&(O=this.xmax,le=n+(w=E)*C)}else if(r<0){if(e<=this.xmin)return null;(E=(this.xmin-e)/r)<w&&(O=this.xmin,le=n+(w=E)*C)}return[O,le]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,C=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[C]||e[n+1]===e[r+1]&&e[r+1]===e[C+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const tau=2*Math.PI,pow=Math.pow;function pointX(v){return v[0]}function pointY(v){return v[1]}function collinear(v){const{triangles:e,coords:n}=v;for(let r=0;r<e.length;r+=3){const C=2*e[r],w=2*e[r+1],E=2*e[r+2];if((n[E]-n[C])*(n[w+1]-n[C+1])-(n[w]-n[C])*(n[E+1]-n[C+1])>1e-10)return!1}return!0}function jitter(v,e,n){return[v+Math.sin(v+e)*n,e+Math.cos(v-e)*n]}class Delaunay{static from(e,n=pointX,r=pointY,C){return new Delaunay("length"in e?flatArray(e,n,r,C):Float64Array.from(flatIterable(e,n,r,C)))}constructor(e){this._delaunator=new Delaunator(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&collinear(e)){this.collinear=Int32Array.from({length:n.length/2},(ke,Fe)=>Fe).sort((ke,Fe)=>n[2*ke]-n[2*Fe]||n[2*ke+1]-n[2*Fe+1]);const le=this.collinear[0],fe=this.collinear[this.collinear.length-1],Se=[n[2*le],n[2*le+1],n[2*fe],n[2*fe+1]],ze=1e-8*Math.hypot(Se[3]-Se[1],Se[2]-Se[0]);for(let ke=0,Fe=n.length/2;ke<Fe;++ke){const mt=jitter(n[2*ke],n[2*ke+1],ze);n[2*ke]=mt[0],n[2*ke+1]=mt[1]}this._delaunator=new Delaunator(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,C=this.hull=this._delaunator.hull,w=this.triangles=this._delaunator.triangles,E=this.inedges.fill(-1),O=this._hullIndex.fill(-1);for(let le=0,fe=r.length;le<fe;++le){const Se=w[le%3===2?le-2:le+1];(r[le]===-1||E[Se]===-1)&&(E[Se]=le)}for(let le=0,fe=C.length;le<fe;++le)O[C[le]]=le;C.length<=2&&C.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=C[0],E[C[0]]=1,C.length===2&&(E[C[1]]=0,this.triangles[1]=C[1],this.triangles[2]=C[1]))}voronoi(e){return new Voronoi(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:C,halfedges:w,triangles:E,collinear:O}=this;if(O){const ze=O.indexOf(e);ze>0&&(yield O[ze-1]),ze<O.length-1&&(yield O[ze+1]);return}const le=n[e];if(le===-1)return;let fe=le,Se=-1;do{if(yield Se=E[fe],fe=fe%3===2?fe-2:fe+1,E[fe]!==e)return;if(fe=w[fe],fe===-1){const ze=r[(C[e]+1)%r.length];ze!==Se&&(yield ze);return}}while(fe!==le)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const C=r;let w;for(;(w=this._step(r,e,n))>=0&&w!==r&&w!==C;)r=w;return w}_step(e,n,r){const{inedges:C,hull:w,_hullIndex:E,halfedges:O,triangles:le,points:fe}=this;if(C[e]===-1||!fe.length)return(e+1)%(fe.length>>1);let Se=e,ze=pow(n-fe[e*2],2)+pow(r-fe[e*2+1],2);const ke=C[e];let Fe=ke;do{let mt=le[Fe];const Lt=pow(n-fe[mt*2],2)+pow(r-fe[mt*2+1],2);if(Lt<ze&&(ze=Lt,Se=mt),Fe=Fe%3===2?Fe-2:Fe+1,le[Fe]!==e)break;if(Fe=O[Fe],Fe===-1){if(Fe=w[(E[e]+1)%w.length],Fe!==mt&&pow(n-fe[Fe*2],2)+pow(r-fe[Fe*2+1],2)<ze)return Fe;break}}while(Fe!==ke);return Se}render(e){const n=e==null?e=new Path:void 0,{points:r,halfedges:C,triangles:w}=this;for(let E=0,O=C.length;E<O;++E){const le=C[E];if(le<E)continue;const fe=w[E]*2,Se=w[le]*2;e.moveTo(r[fe],r[fe+1]),e.lineTo(r[Se],r[Se+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new Path:void 0,{points:C}=this;for(let w=0,E=C.length;w<E;w+=2){const O=C[w],le=C[w+1];e.moveTo(O+n,le),e.arc(O,le,n,0,tau)}return r&&r.value()}renderHull(e){const n=e==null?e=new Path:void 0,{hull:r,points:C}=this,w=r[0]*2,E=r.length;e.moveTo(C[w],C[w+1]);for(let O=1;O<E;++O){const le=2*r[O];e.lineTo(C[le],C[le+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Polygon;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Path:void 0,{points:C,triangles:w}=this,E=w[e*=3]*2,O=w[e+1]*2,le=w[e+2]*2;return n.moveTo(C[E],C[E+1]),n.lineTo(C[O],C[O+1]),n.lineTo(C[le],C[le+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Polygon;return this.renderTriangle(e,n),n.value()}}function flatArray(v,e,n,r){const C=v.length,w=new Float64Array(C*2);for(let E=0;E<C;++E){const O=v[E];w[E*2]=e.call(r,O,E,v),w[E*2+1]=n.call(r,O,E,v)}return w}function*flatIterable(v,e,n,r){let C=0;for(const w of v)yield e.call(r,w,C,v),yield n.call(r,w,C,v),++C}const pi$1=Math.PI,halfPi=pi$1/2,degrees=180/pi$1,radians=pi$1/180,atan2=Math.atan2,cos=Math.cos,max$1=Math.max,min=Math.min,sin=Math.sin,sign=Math.sign||function(v){return v>0?1:v<0?-1:0},sqrt=Math.sqrt;function asin(v){return v>1?halfPi:v<-1?-halfPi:Math.asin(v)}function cartesianDot(v,e){return v[0]*e[0]+v[1]*e[1]+v[2]*e[2]}function cartesianCross(v,e){return[v[1]*e[2]-v[2]*e[1],v[2]*e[0]-v[0]*e[2],v[0]*e[1]-v[1]*e[0]]}function cartesianAdd(v,e){return[v[0]+e[0],v[1]+e[1],v[2]+e[2]]}function cartesianNormalize(v){var e=sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);return[v[0]/e,v[1]/e,v[2]/e]}function spherical(v){return[atan2(v[1],v[0])*degrees,asin(max$1(-1,min(1,v[2])))*degrees]}function cartesian(v){const e=v[0]*radians,n=v[1]*radians,r=cos(n);return[r*cos(e),r*sin(e),sin(n)]}function excess(v){return v=v.map(e=>cartesian(e)),cartesianDot(v[0],cartesianCross(v[2],v[1]))}function geoDelaunay(v){const e=geo_delaunay_from(v),n=geo_triangles(e),r=geo_edges(n,v),C=geo_neighbors(n,v.length),w=geo_find(C,v),E=geo_circumcenters(n,v),{polygons:O,centers:le}=geo_polygons(E,n,v),fe=geo_mesh(O),Se=geo_hull(n,v),ze=geo_urquhart(r,n);return{delaunay:e,edges:r,triangles:n,centers:le,neighbors:C,polygons:O,mesh:fe,hull:Se,urquhart:ze,find:w}}function geo_find(v,e){function n(r,C){let w=r[0]-C[0],E=r[1]-C[1],O=r[2]-C[2];return w*w+E*E+O*O}return function(C,w,E){E===void 0&&(E=0);let O,le,fe=E;const Se=cartesian([C,w]);do O=E,E=null,le=n(Se,cartesian(e[O])),v[O].forEach(ze=>{let ke=n(Se,cartesian(e[ze]));if(ke<le){le=ke,E=ze,fe=ze;return}});while(E!==null);return fe}}function geo_delaunay_from(v){if(v.length<2)return{};let e=0;for(;isNaN(v[e][0]+v[e][1])&&e++<v.length;);const n=geoRotation(v[e]),r=geoStereographic().translate([0,0]).scale(1).rotate(n.invert([180,0]));v=v.map(r);const C=[];let w=1;for(let ze=0,ke=v.length;ze<ke;ze++){let Fe=bn(v[ze][0],2)+bn(v[ze][1],2);!isFinite(Fe)||Fe>1e32?C.push(ze):Fe>w&&(w=Fe)}const E=1e6*sqrt(w);C.forEach(ze=>v[ze]=[E,0]),v.push([0,E]),v.push([-E,0]),v.push([0,-E]);const O=Delaunay.from(v);O.projection=r;const{triangles:le,halfedges:fe,inedges:Se}=O;for(let ze=0,ke=fe.length;ze<ke;ze++)if(fe[ze]<0){const Fe=ze%3==2?ze-2:ze+1,mt=ze%3==0?ze+2:ze-1,Lt=fe[Fe],bt=fe[mt];fe[Lt]=bt,fe[bt]=Lt,fe[Fe]=fe[mt]=-1,le[ze]=le[Fe]=le[mt]=e,Se[le[Lt]]=Lt%3==0?Lt+2:Lt-1,Se[le[bt]]=bt%3==0?bt+2:bt-1,ze+=2-ze%3}else le[ze]>v.length-3-1&&(le[ze]=e);return O}function geo_edges(v,e){const n=new Set;return e.length===2?[[0,1]]:(v.forEach(r=>{if(r[0]!==r[1]&&!(excess(r.map(C=>e[C]))<0))for(let C=0,w;C<3;C++)w=(C+1)%3,n.add(extent([r[C],r[w]]).join("-"))}),Array.from(n,r=>r.split("-").map(Number)))}function geo_triangles(v){const{triangles:e}=v;if(!e)return[];const n=[];for(let r=0,C=e.length/3;r<C;r++){const w=e[3*r],E=e[3*r+1],O=e[3*r+2];w!==E&&E!==O&&n.push([w,O,E])}return n}function geo_circumcenters(v,e){return v.map(n=>{const r=n.map(w=>e[w]).map(cartesian),C=cartesianAdd(cartesianAdd(cartesianCross(r[1],r[0]),cartesianCross(r[2],r[1])),cartesianCross(r[0],r[2]));return spherical(cartesianNormalize(C))})}function geo_neighbors(v,e){const n=[];return v.forEach(r=>{for(let C=0;C<3;C++){const w=r[C],E=r[(C+1)%3];n[w]=n[w]||[],n[w].push(E)}}),v.length===0&&(e===2?(n[0]=[1],n[1]=[0]):e===1&&(n[0]=[])),n}function geo_polygons(v,e,n){const r=[],C=v.slice();if(e.length===0){if(n.length<2)return{polygons:r,centers:C};if(n.length===2){const O=cartesian(n[0]),le=cartesian(n[1]),fe=cartesianNormalize(cartesianAdd(O,le)),Se=cartesianNormalize(cartesianCross(O,le)),ze=cartesianCross(fe,Se),ke=[fe,cartesianCross(fe,ze),cartesianCross(cartesianCross(fe,ze),ze),cartesianCross(cartesianCross(cartesianCross(fe,ze),ze),ze)].map(spherical).map(E);return r.push(ke),r.push(ke.slice().reverse()),{polygons:r,centers:C}}}e.forEach((O,le)=>{for(let fe=0;fe<3;fe++){const Se=O[fe],ze=O[(fe+1)%3],ke=O[(fe+2)%3];r[Se]=r[Se]||[],r[Se].push([ze,ke,le,[Se,ze,ke]])}});const w=r.map(O=>{const le=[O[0][2]];let fe=O[0][1];for(let Se=1;Se<O.length;Se++)for(let ze=0;ze<O.length;ze++)if(O[ze][0]==fe){fe=O[ze][1],le.push(O[ze][2]);break}if(le.length>2)return le;if(le.length==2){const Se=o_midpoint(n[O[0][3][0]],n[O[0][3][1]],C[le[0]]),ze=o_midpoint(n[O[0][3][2]],n[O[0][3][0]],C[le[0]]),ke=E(Se),Fe=E(ze);return[le[0],Fe,le[1],ke]}});function E(O){let le=-1;return C.slice(e.length,1/0).forEach((fe,Se)=>{fe[0]===O[0]&&fe[1]===O[1]&&(le=Se+e.length)}),le<0&&(le=C.length,C.push(O)),le}return{polygons:w,centers:C}}function o_midpoint(v,e,n){v=cartesian(v),e=cartesian(e),n=cartesian(n);const r=sign(cartesianDot(cartesianCross(e,v),n));return spherical(cartesianNormalize(cartesianAdd(v,e)).map(C=>r*C))}function geo_mesh(v){const e=[];return v.forEach(n=>{if(!n)return;let r=n[n.length-1];for(let C of n)C>r&&e.push([r,C]),r=C}),e}function geo_urquhart(v,e){return function(n){const r=new Map,C=new Map;return v.forEach((w,E)=>{const O=w.join("-");r.set(O,n[E]),C.set(O,!0)}),e.forEach(w=>{let E=0,O=-1;for(let le=0;le<3;le++){let fe=extent([w[le],w[(le+1)%3]]).join("-");r.get(fe)>E&&(E=r.get(fe),O=fe)}C.set(O,!1)}),v.map(w=>C.get(w.join("-")))}}function geo_hull(v,e){const n=new Set,r=[];v.map(O=>{if(!(excess(O.map(le=>e[le>e.length?0:le]))>1e-12))for(let le=0;le<3;le++){let fe=[O[le],O[(le+1)%3]],Se=`${fe[0]}-${fe[1]}`;n.has(Se)?n.delete(Se):n.add(`${fe[1]}-${fe[0]}`)}});const C=new Map;let w;if(n.forEach(O=>{O=O.split("-").map(Number),C.set(O[0],O[1]),w=O[0]}),w===void 0)return r;let E=w;do{r.push(E);let O=C.get(E);C.set(E,-1),E=O}while(E>-1&&E!==w);return r}function geoVoronoi(v){const e=function(n){if(e.delaunay=null,e._data=n,typeof e._data=="object"&&e._data.type==="FeatureCollection"&&(e._data=e._data.features),typeof e._data=="object"){const r=e._data.map(C=>[e._vx(C),e._vy(C),C]).filter(C=>isFinite(C[0]+C[1]));e.points=r.map(C=>[C[0],C[1]]),e.valid=r.map(C=>C[2]),e.delaunay=geoDelaunay(e.points)}return e};return e._vx=function(n){if(typeof n=="object"&&"type"in n)return geoCentroid(n)[0];if(0 in n)return n[0]},e._vy=function(n){if(typeof n=="object"&&"type"in n)return geoCentroid(n)[1];if(1 in n)return n[1]},e.x=function(n){return n?(e._vx=n,e):e._vx},e.y=function(n){return n?(e._vy=n,e):e._vy},e.polygons=function(n){if(n!==void 0&&e(n),!e.delaunay)return!1;const r={type:"FeatureCollection",features:[]};return e.valid.length===0||(e.delaunay.polygons.forEach((C,w)=>r.features.push({type:"Feature",geometry:C?{type:"Polygon",coordinates:[[...C,C[0]].map(E=>e.delaunay.centers[E])]}:null,properties:{site:e.valid[w],sitecoordinates:e.points[w],neighbours:e.delaunay.neighbors[w]}})),e.valid.length===1&&r.features.push({type:"Feature",geometry:{type:"Sphere"},properties:{site:e.valid[0],sitecoordinates:e.points[0],neighbours:[]}})),r},e.triangles=function(n){return n!==void 0&&e(n),e.delaunay?{type:"FeatureCollection",features:e.delaunay.triangles.map((r,C)=>(r=r.map(w=>e.points[w]),r.center=e.delaunay.centers[C],r)).filter(r=>excess(r)>0).map(r=>({type:"Feature",properties:{circumcenter:r.center},geometry:{type:"Polygon",coordinates:[[...r,r[0]]]}}))}:!1},e.links=function(n){if(n!==void 0&&e(n),!e.delaunay)return!1;const r=e.delaunay.edges.map(w=>Re$1(e.points[w[0]],e.points[w[1]])),C=e.delaunay.urquhart(r);return{type:"FeatureCollection",features:e.delaunay.edges.map((w,E)=>({type:"Feature",properties:{source:e.valid[w[0]],target:e.valid[w[1]],length:r[E],urquhart:!!C[E]},geometry:{type:"LineString",coordinates:[e.points[w[0]],e.points[w[1]]]}}))}},e.mesh=function(n){return n!==void 0&&e(n),e.delaunay?{type:"MultiLineString",coordinates:e.delaunay.edges.map(r=>[e.points[r[0]],e.points[r[1]]])}:!1},e.cellMesh=function(n){if(n!==void 0&&e(n),!e.delaunay)return!1;const{centers:r,polygons:C}=e.delaunay,w=[];for(const E of C)if(E)for(let O=E.length,le=E[O-1],fe=E[0],Se=0;Se<O;le=fe,fe=E[++Se])fe>le&&w.push([r[le],r[fe]]);return{type:"MultiLineString",coordinates:w}},e._found=void 0,e.find=function(n,r,C){if(e._found=e.delaunay.find(n,r,e._found),!C||Re$1([n,r],e.points[e._found])<C)return e._found},e.hull=function(n){n!==void 0&&e(n);const r=e.delaunay.hull,C=e.points;return r.length===0?null:{type:"Polygon",coordinates:[[...r.map(w=>C[w]),C[r[0]]]]}},v?e(v):e}function initRange(v,e){switch(arguments.length){case 0:break;case 1:this.range(v);break;default:this.range(e).domain(v);break}return this}function define$1(v,e,n){v.prototype=e.prototype=n,n.constructor=v}function extend(v,e){var n=Object.create(v.prototype);for(var r in e)n[r]=e[r];return n}function Color(){}var darker=.7,brighter=1/darker,reI="\\s*([+-]?\\d+)\\s*",reN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",reP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",reHex=/^#([0-9a-f]{3,8})$/,reRgbInteger=new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),reRgbPercent=new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),reRgbaInteger=new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),reRgbaPercent=new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),reHslPercent=new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),reHslaPercent=new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`),named={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};define$1(Color,color,{copy(v){return Object.assign(new this.constructor,this,v)},displayable(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHex8:color_formatHex8,formatHsl:color_formatHsl,formatRgb:color_formatRgb,toString:color_formatRgb});function color_formatHex(){return this.rgb().formatHex()}function color_formatHex8(){return this.rgb().formatHex8()}function color_formatHsl(){return hslConvert(this).formatHsl()}function color_formatRgb(){return this.rgb().formatRgb()}function color(v){var e,n;return v=(v+"").trim().toLowerCase(),(e=reHex.exec(v))?(n=e[1].length,e=parseInt(e[1],16),n===6?rgbn(e):n===3?new Rgb(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?rgba(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?rgba(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=reRgbInteger.exec(v))?new Rgb(e[1],e[2],e[3],1):(e=reRgbPercent.exec(v))?new Rgb(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=reRgbaInteger.exec(v))?rgba(e[1],e[2],e[3],e[4]):(e=reRgbaPercent.exec(v))?rgba(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=reHslPercent.exec(v))?hsla(e[1],e[2]/100,e[3]/100,1):(e=reHslaPercent.exec(v))?hsla(e[1],e[2]/100,e[3]/100,e[4]):named.hasOwnProperty(v)?rgbn(named[v]):v==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(v){return new Rgb(v>>16&255,v>>8&255,v&255,1)}function rgba(v,e,n,r){return r<=0&&(v=e=n=NaN),new Rgb(v,e,n,r)}function rgbConvert(v){return v instanceof Color||(v=color(v)),v?(v=v.rgb(),new Rgb(v.r,v.g,v.b,v.opacity)):new Rgb}function rgb$1(v,e,n,r){return arguments.length===1?rgbConvert(v):new Rgb(v,e,n,r==null?1:r)}function Rgb(v,e,n,r){this.r=+v,this.g=+e,this.b=+n,this.opacity=+r}define$1(Rgb,rgb$1,extend(Color,{brighter(v){return v=v==null?brighter:Math.pow(brighter,v),new Rgb(this.r*v,this.g*v,this.b*v,this.opacity)},darker(v){return v=v==null?darker:Math.pow(darker,v),new Rgb(this.r*v,this.g*v,this.b*v,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const v=clampa(this.opacity);return`${v===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${v===1?")":`, ${v})`}`}function clampa(v){return isNaN(v)?1:Math.max(0,Math.min(1,v))}function clampi(v){return Math.max(0,Math.min(255,Math.round(v)||0))}function hex(v){return v=clampi(v),(v<16?"0":"")+v.toString(16)}function hsla(v,e,n,r){return r<=0?v=e=n=NaN:n<=0||n>=1?v=e=NaN:e<=0&&(v=NaN),new Hsl(v,e,n,r)}function hslConvert(v){if(v instanceof Hsl)return new Hsl(v.h,v.s,v.l,v.opacity);if(v instanceof Color||(v=color(v)),!v)return new Hsl;if(v instanceof Hsl)return v;v=v.rgb();var e=v.r/255,n=v.g/255,r=v.b/255,C=Math.min(e,n,r),w=Math.max(e,n,r),E=NaN,O=w-C,le=(w+C)/2;return O?(e===w?E=(n-r)/O+(n<r)*6:n===w?E=(r-e)/O+2:E=(e-n)/O+4,O/=le<.5?w+C:2-w-C,E*=60):O=le>0&&le<1?0:E,new Hsl(E,O,le,v.opacity)}function hsl(v,e,n,r){return arguments.length===1?hslConvert(v):new Hsl(v,e,n,r==null?1:r)}function Hsl(v,e,n,r){this.h=+v,this.s=+e,this.l=+n,this.opacity=+r}define$1(Hsl,hsl,extend(Color,{brighter(v){return v=v==null?brighter:Math.pow(brighter,v),new Hsl(this.h,this.s,this.l*v,this.opacity)},darker(v){return v=v==null?darker:Math.pow(darker,v),new Hsl(this.h,this.s,this.l*v,this.opacity)},rgb(){var v=this.h%360+(this.h<0)*360,e=isNaN(v)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,C=2*n-r;return new Rgb(hsl2rgb(v>=240?v-240:v+120,C,r),hsl2rgb(v,C,r),hsl2rgb(v<120?v+240:v-120,C,r),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const v=clampa(this.opacity);return`${v===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${v===1?")":`, ${v})`}`}}));function clamph(v){return v=(v||0)%360,v<0?v+360:v}function clampt(v){return Math.max(0,Math.min(1,v||0))}function hsl2rgb(v,e,n){return(v<60?e+(n-e)*v/60:v<180?n:v<240?e+(n-e)*(240-v)/60:e)*255}const constant=v=>()=>v;function linear$1(v,e){return function(n){return v+n*e}}function exponential(v,e,n){return v=Math.pow(v,n),e=Math.pow(e,n)-v,n=1/n,function(r){return Math.pow(v+r*e,n)}}function gamma(v){return(v=+v)==1?nogamma:function(e,n){return n-e?exponential(e,n,v):constant(isNaN(e)?n:e)}}function nogamma(v,e){var n=e-v;return n?linear$1(v,n):constant(isNaN(v)?e:v)}const rgb=function v(e){var n=gamma(e);function r(C,w){var E=n((C=rgb$1(C)).r,(w=rgb$1(w)).r),O=n(C.g,w.g),le=n(C.b,w.b),fe=nogamma(C.opacity,w.opacity);return function(Se){return C.r=E(Se),C.g=O(Se),C.b=le(Se),C.opacity=fe(Se),C+""}}return r.gamma=v,r}(1);function numberArray(v,e){e||(e=[]);var n=v?Math.min(e.length,v.length):0,r=e.slice(),C;return function(w){for(C=0;C<n;++C)r[C]=v[C]*(1-w)+e[C]*w;return r}}function isNumberArray(v){return ArrayBuffer.isView(v)&&!(v instanceof DataView)}function genericArray(v,e){var n=e?e.length:0,r=v?Math.min(n,v.length):0,C=new Array(r),w=new Array(n),E;for(E=0;E<r;++E)C[E]=interpolate(v[E],e[E]);for(;E<n;++E)w[E]=e[E];return function(O){for(E=0;E<r;++E)w[E]=C[E](O);return w}}function date(v,e){var n=new Date;return v=+v,e=+e,function(r){return n.setTime(v*(1-r)+e*r),n}}function interpolateNumber(v,e){return v=+v,e=+e,function(n){return v*(1-n)+e*n}}function object(v,e){var n={},r={},C;(v===null||typeof v!="object")&&(v={}),(e===null||typeof e!="object")&&(e={});for(C in e)C in v?n[C]=interpolate(v[C],e[C]):r[C]=e[C];return function(w){for(C in n)r[C]=n[C](w);return r}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero(v){return function(){return v}}function one(v){return function(e){return v(e)+""}}function string(v,e){var n=reA.lastIndex=reB.lastIndex=0,r,C,w,E=-1,O=[],le=[];for(v=v+"",e=e+"";(r=reA.exec(v))&&(C=reB.exec(e));)(w=C.index)>n&&(w=e.slice(n,w),O[E]?O[E]+=w:O[++E]=w),(r=r[0])===(C=C[0])?O[E]?O[E]+=C:O[++E]=C:(O[++E]=null,le.push({i:E,x:interpolateNumber(r,C)})),n=reB.lastIndex;return n<e.length&&(w=e.slice(n),O[E]?O[E]+=w:O[++E]=w),O.length<2?le[0]?one(le[0].x):zero(e):(e=le.length,function(fe){for(var Se=0,ze;Se<e;++Se)O[(ze=le[Se]).i]=ze.x(fe);return O.join("")})}function interpolate(v,e){var n=typeof e,r;return e==null||n==="boolean"?constant(e):(n==="number"?interpolateNumber:n==="string"?(r=color(e))?(e=r,rgb):string:e instanceof color?rgb:e instanceof Date?date:isNumberArray(e)?numberArray:Array.isArray(e)?genericArray:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?object:interpolateNumber)(v,e)}function interpolateRound(v,e){return v=+v,e=+e,function(n){return Math.round(v*(1-n)+e*n)}}function constants(v){return function(){return v}}function number(v){return+v}var unit=[0,1];function identity$1(v){return v}function normalize(v,e){return(e-=v=+v)?function(n){return(n-v)/e}:constants(isNaN(e)?NaN:.5)}function clamper(v,e){var n;return v>e&&(n=v,v=e,e=n),function(r){return Math.max(v,Math.min(e,r))}}function bimap(v,e,n){var r=v[0],C=v[1],w=e[0],E=e[1];return C<r?(r=normalize(C,r),w=n(E,w)):(r=normalize(r,C),w=n(w,E)),function(O){return w(r(O))}}function polymap(v,e,n){var r=Math.min(v.length,e.length)-1,C=new Array(r),w=new Array(r),E=-1;for(v[r]<v[0]&&(v=v.slice().reverse(),e=e.slice().reverse());++E<r;)C[E]=normalize(v[E],v[E+1]),w[E]=n(e[E],e[E+1]);return function(O){var le=bisectRight(v,O,1,r)-1;return w[le](C[le](O))}}function copy(v,e){return e.domain(v.domain()).range(v.range()).interpolate(v.interpolate()).clamp(v.clamp()).unknown(v.unknown())}function transformer(){var v=unit,e=unit,n=interpolate,r,C,w,E=identity$1,O,le,fe;function Se(){var ke=Math.min(v.length,e.length);return E!==identity$1&&(E=clamper(v[0],v[ke-1])),O=ke>2?polymap:bimap,le=fe=null,ze}function ze(ke){return ke==null||isNaN(ke=+ke)?w:(le||(le=O(v.map(r),e,n)))(r(E(ke)))}return ze.invert=function(ke){return E(C((fe||(fe=O(e,v.map(r),interpolateNumber)))(ke)))},ze.domain=function(ke){return arguments.length?(v=Array.from(ke,number),Se()):v.slice()},ze.range=function(ke){return arguments.length?(e=Array.from(ke),Se()):e.slice()},ze.rangeRound=function(ke){return e=Array.from(ke),n=interpolateRound,Se()},ze.clamp=function(ke){return arguments.length?(E=ke?!0:identity$1,Se()):E!==identity$1},ze.interpolate=function(ke){return arguments.length?(n=ke,Se()):n},ze.unknown=function(ke){return arguments.length?(w=ke,ze):w},function(ke,Fe){return r=ke,C=Fe,Se()}}function continuous(){return transformer()(identity$1,identity$1)}function formatDecimal(v){return Math.abs(v=Math.round(v))>=1e21?v.toLocaleString("en").replace(/,/g,""):v.toString(10)}function formatDecimalParts(v,e){if((n=(v=e?v.toExponential(e-1):v.toExponential()).indexOf("e"))<0)return null;var n,r=v.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+v.slice(n+1)]}function exponent(v){return v=formatDecimalParts(Math.abs(v)),v?v[1]:NaN}function formatGroup(v,e){return function(n,r){for(var C=n.length,w=[],E=0,O=v[0],le=0;C>0&&O>0&&(le+O+1>r&&(O=Math.max(1,r-le)),w.push(n.substring(C-=O,C+O)),!((le+=O+1)>r));)O=v[E=(E+1)%v.length];return w.reverse().join(e)}}function formatNumerals(v){return function(e){return e.replace(/[0-9]/g,function(n){return v[+n]})}}var re$2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(v){if(!(e=re$2.exec(v)))throw new Error("invalid format: "+v);var e;return new FormatSpecifier({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(v){this.fill=v.fill===void 0?" ":v.fill+"",this.align=v.align===void 0?">":v.align+"",this.sign=v.sign===void 0?"-":v.sign+"",this.symbol=v.symbol===void 0?"":v.symbol+"",this.zero=!!v.zero,this.width=v.width===void 0?void 0:+v.width,this.comma=!!v.comma,this.precision=v.precision===void 0?void 0:+v.precision,this.trim=!!v.trim,this.type=v.type===void 0?"":v.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(v){e:for(var e=v.length,n=1,r=-1,C;n<e;++n)switch(v[n]){case".":r=C=n;break;case"0":r===0&&(r=n),C=n;break;default:if(!+v[n])break e;r>0&&(r=0);break}return r>0?v.slice(0,r)+v.slice(C+1):v}var prefixExponent;function formatPrefixAuto(v,e){var n=formatDecimalParts(v,e);if(!n)return v+"";var r=n[0],C=n[1],w=C-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(C/3)))*3)+1,E=r.length;return w===E?r:w>E?r+new Array(w-E+1).join("0"):w>0?r.slice(0,w)+"."+r.slice(w):"0."+new Array(1-w).join("0")+formatDecimalParts(v,Math.max(0,e+w-1))[0]}function formatRounded(v,e){var n=formatDecimalParts(v,e);if(!n)return v+"";var r=n[0],C=n[1];return C<0?"0."+new Array(-C).join("0")+r:r.length>C+1?r.slice(0,C+1)+"."+r.slice(C+1):r+new Array(C-r.length+2).join("0")}const formatTypes={"%":(v,e)=>(v*100).toFixed(e),b:v=>Math.round(v).toString(2),c:v=>v+"",d:formatDecimal,e:(v,e)=>v.toExponential(e),f:(v,e)=>v.toFixed(e),g:(v,e)=>v.toPrecision(e),o:v=>Math.round(v).toString(8),p:(v,e)=>formatRounded(v*100,e),r:formatRounded,s:formatPrefixAuto,X:v=>Math.round(v).toString(16).toUpperCase(),x:v=>Math.round(v).toString(16)};function identity(v){return v}var map$1=Array.prototype.map,prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale(v){var e=v.grouping===void 0||v.thousands===void 0?identity:formatGroup(map$1.call(v.grouping,Number),v.thousands+""),n=v.currency===void 0?"":v.currency[0]+"",r=v.currency===void 0?"":v.currency[1]+"",C=v.decimal===void 0?".":v.decimal+"",w=v.numerals===void 0?identity:formatNumerals(map$1.call(v.numerals,String)),E=v.percent===void 0?"%":v.percent+"",O=v.minus===void 0?"−":v.minus+"",le=v.nan===void 0?"NaN":v.nan+"";function fe(ze){ze=formatSpecifier(ze);var ke=ze.fill,Fe=ze.align,mt=ze.sign,Lt=ze.symbol,bt=ze.zero,Ue=ze.width,Gt=ze.comma,xt=ze.precision,Xt=ze.trim,Zt=ze.type;Zt==="n"?(Gt=!0,Zt="g"):formatTypes[Zt]||(xt===void 0&&(xt=12),Xt=!0,Zt="g"),(bt||ke==="0"&&Fe==="=")&&(bt=!0,ke="0",Fe="=");var wt=Lt==="$"?n:Lt==="#"&&/[boxX]/.test(Zt)?"0"+Zt.toLowerCase():"",Vt=Lt==="$"?r:/[%p]/.test(Zt)?E:"",Wt=formatTypes[Zt],It=/[defgprs%]/.test(Zt);xt=xt===void 0?6:/[gprs]/.test(Zt)?Math.max(1,Math.min(21,xt)):Math.max(0,Math.min(20,xt));function Nt(Ft){var jt=wt,n0=Vt,s0,qt,Ht;if(Zt==="c")n0=Wt(Ft)+n0,Ft="";else{Ft=+Ft;var $t=Ft<0||1/Ft<0;if(Ft=isNaN(Ft)?le:Wt(Math.abs(Ft),xt),Xt&&(Ft=formatTrim(Ft)),$t&&+Ft==0&&mt!=="+"&&($t=!1),jt=($t?mt==="("?mt:O:mt==="-"||mt==="("?"":mt)+jt,n0=(Zt==="s"?prefixes[8+prefixExponent/3]:"")+n0+($t&&mt==="("?")":""),It){for(s0=-1,qt=Ft.length;++s0<qt;)if(Ht=Ft.charCodeAt(s0),48>Ht||Ht>57){n0=(Ht===46?C+Ft.slice(s0+1):Ft.slice(s0))+n0,Ft=Ft.slice(0,s0);break}}}Gt&&!bt&&(Ft=e(Ft,1/0));var Kt=jt.length+Ft.length+n0.length,e0=Kt<Ue?new Array(Ue-Kt+1).join(ke):"";switch(Gt&&bt&&(Ft=e(e0+Ft,e0.length?Ue-n0.length:1/0),e0=""),Fe){case"<":Ft=jt+Ft+n0+e0;break;case"=":Ft=jt+e0+Ft+n0;break;case"^":Ft=e0.slice(0,Kt=e0.length>>1)+jt+Ft+n0+e0.slice(Kt);break;default:Ft=e0+jt+Ft+n0;break}return w(Ft)}return Nt.toString=function(){return ze+""},Nt}function Se(ze,ke){var Fe=fe((ze=formatSpecifier(ze),ze.type="f",ze)),mt=Math.max(-8,Math.min(8,Math.floor(exponent(ke)/3)))*3,Lt=Math.pow(10,-mt),bt=prefixes[8+mt/3];return function(Ue){return Fe(Lt*Ue)+bt}}return{format:fe,formatPrefix:Se}}var locale,format,formatPrefix;defaultLocale({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale(v){return locale=formatLocale(v),format=locale.format,formatPrefix=locale.formatPrefix,locale}function precisionFixed(v){return Math.max(0,-exponent(Math.abs(v)))}function precisionPrefix(v,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(exponent(e)/3)))*3-exponent(Math.abs(v)))}function precisionRound(v,e){return v=Math.abs(v),e=Math.abs(e)-v,Math.max(0,exponent(e)-exponent(v))+1}function tickFormat(v,e,n,r){var C=tickStep(v,e,n),w;switch(r=formatSpecifier(r==null?",f":r),r.type){case"s":{var E=Math.max(Math.abs(v),Math.abs(e));return r.precision==null&&!isNaN(w=precisionPrefix(C,E))&&(r.precision=w),formatPrefix(r,E)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(w=precisionRound(C,Math.max(Math.abs(v),Math.abs(e))))&&(r.precision=w-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(w=precisionFixed(C))&&(r.precision=w-(r.type==="%")*2);break}}return format(r)}function linearish(v){var e=v.domain;return v.ticks=function(n){var r=e();return ticks(r[0],r[r.length-1],n==null?10:n)},v.tickFormat=function(n,r){var C=e();return tickFormat(C[0],C[C.length-1],n==null?10:n,r)},v.nice=function(n){n==null&&(n=10);var r=e(),C=0,w=r.length-1,E=r[C],O=r[w],le,fe,Se=10;for(O<E&&(fe=E,E=O,O=fe,fe=C,C=w,w=fe);Se-- >0;){if(fe=tickIncrement(E,O,n),fe===le)return r[C]=E,r[w]=O,e(r);if(fe>0)E=Math.floor(E/fe)*fe,O=Math.ceil(O/fe)*fe;else if(fe<0)E=Math.ceil(E*fe)/fe,O=Math.floor(O*fe)/fe;else break;le=fe}return v},v}function linear(){var v=continuous();return v.copy=function(){return copy(v,linear())},initRange.apply(v,arguments),linearish(v)}var Ce=Object.defineProperty,Ie$2=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,V$2=Object.getOwnPropertySymbols,te$1=Object.prototype.hasOwnProperty,ie$1=Object.prototype.propertyIsEnumerable,ne$1=Math.pow,ee$1=(v,e,n)=>e in v?Ce(v,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):v[e]=n,k$1=(v,e)=>{for(var n in e||(e={}))te$1.call(e,n)&&ee$1(v,n,e[n]);if(V$2)for(var n of V$2(e))ie$1.call(e,n)&&ee$1(v,n,e[n]);return v},$$1=(v,e)=>Ie$2(v,Pe(e)),se$1=(v,e)=>{var n={};for(var r in v)te$1.call(v,r)&&e.indexOf(r)<0&&(n[r]=v[r]);if(v!=null&&V$2)for(var r of V$2(v))e.indexOf(r)<0&&ie$1.call(v,r)&&(n[r]=v[r]);return n},re$1=(v,e,n)=>new Promise((r,C)=>{var w=le=>{try{O(n.next(le))}catch(fe){C(fe)}},E=le=>{try{O(n.throw(le))}catch(fe){C(fe)}},O=le=>le.done?r(le.value):Promise.resolve(le.value).then(w,E);O((n=n.apply(v,e)).next())});const Je$2=0,Dt$2=1,He$2=2,Tt$1=!1;let et$2=class{constructor(){this.resources=new Set,this.disposeMaterial=!0,this.disposeVideo=!0}track(e){if(!e)return e;if(Array.isArray(e))return e.forEach(n=>this.track(n)),e;if(!this.disposeMaterial&&e instanceof Material)return e;if(e instanceof pe$1?(e.disposeTrack&&e.object3d?this.track(e.object3d):this.resources.add(e),Object.values(e.materialList).map(n=>this.track(n))):(e instanceof Object3D||Reflect.has(e,"dispose"))&&this.resources.add(e),e instanceof pe$1)e.children.forEach(n=>{n.disposeTrack=!1}),this.track(e.children);else if(e instanceof Object3D){const n=e;this.track(n.geometry),this.track(n.material),this.track(n.children)}else if(e instanceof Material){for(const r of Object.values(e))r instanceof Texture&&this.track(r);const n=e;if(n.uniforms){for(const r of Object.values(n.uniforms))if(r){const C=r.value;(C instanceof Texture||Array.isArray(C))&&this.track(C)}}}else this.disposeVideo&&e.isVideoTexture&&e.source.data&&this.resources.add(e.source.data);return e}dispose(){const e=[];for(const n of this.resources)n instanceof Object3D?e.push(n):n instanceof HTMLVideoElement&&n.pause(),Reflect.has(n,"dispose")&&n.dispose();e.forEach(n=>{n.removeFromParent()}),e.length=0,this.resources.clear()}};const tt$1=(v,e=1)=>{const n=new BufferGeometry;n.setAttribute("position",new Float32BufferAttribute(new Array(e*3).fill(0),3)),n.setAttribute("scaleAtt",new Float32BufferAttribute(new Array(e).fill(1),1));const r=v.material,C=new PointsMaterial({size:10,map:r.map,alphaMap:r.alphaMap,color:r.color,blending:r.blending,depthTest:r.depthTest,depthWrite:!1,opacity:r.opacity,transparent:!0,alphaTest:r.alphaTest,sizeAttenuation:!1});return C.onBeforeCompile=w=>{w.vertexShader=`
4211
4211
  attribute float scaleAtt;
4212
4212
  ${w.vertexShader.replace("gl_PointSize = size;","gl_PointSize = size * scaleAtt;")}
4213
- `},new Points(n,C)},it$1=(v,e)=>{const n=new Object3D;e.forEach((r,C)=>{const w=i$1(r.position),E=i$1(r.scale||[1,1,1]);n.position.copy(w),n.scale.copy(E),n.updateMatrix();const O=n.matrix.clone();if(v instanceof InstancedMesh||v.isInstantiate)v.setMatrixAt(C,O);else if(v instanceof Points||v.type==="Points"){const le=v.geometry,fe=le.attributes.position.array,Se=le.attributes.scaleAtt.array,ze=new Vector3,ke=new Vector3,Fe=new Quaternion,mt=C*3,Lt=C*1;O.decompose(ze,Fe,ke),fe[mt]=ze.x,fe[mt+1]=ze.y,fe[mt+2]=ze.z,Se[Lt]=Math.max(ke.x,ke.y,ke.z),le.attributes.position.needsUpdate=!0,le.attributes.scaleAtt.needsUpdate=!0}})};class nt{constructor(){this.onPointerIndex=[]}onPointerEvent(e,n){const r=this.lead.handlePick([this],e,n);this.onPointerIndex.push(r)}onClick(e){this.onPointerEvent("click",e)}onPointerEnter(e){this.onPointerEvent("enter",e)}onPointerLeave(e){this.onPointerEvent("leave",e)}onPointerMove(e){this.onPointerEvent("move",e)}onPointerDown(e){this.onPointerEvent("down",e)}dispose(){this.onPointerIndex.forEach(e=>{this.lead.removePick(e)})}}let st$1=class extends nt{constructor(){super(...arguments),this.userData={},this.materialList={},this.useMaterialType="origin",this.disposeMaterialIfNotUsed=!0}cloneMaterial(){const e=this.object3d;if(!e||!e.material)return;const n=e.material;if(Array.isArray(n))return n.map(r=>{const C=r.userData;r.userData={};const w=r.clone();return r.userData=C,w});{const r=n.userData;n.userData={};const C=n.clone();return n.userData=r,C}}setMaterialList(e,n){const r=this.object3d;if(!r||!r.material)return;this.materialList.origin||(this.materialList.origin=r.material);const C=n==="clone"?this.cloneMaterial():Array.isArray(n)?n.slice():n;return this.materialList[e]=C,C}useMaterial(e){const n=this.object3d;!n||!n.material||this.useMaterialType===e||!this.materialList[e]||(this.useMaterialType=e,n.material=this.materialList[e])}useMListById(e,n){if(!this.mList)return;const r=this.mList.get(e);if(!r)return;const C=this.object3d;Array.isArray(C.material)&&n!==void 0?C.material[n]=r:C.material=r}useMListByName(e,n){if(!this.mList)return;const r=this.mList.getKeyByName(e);r&&this.useMListById(r,n)}dispose(){super.dispose(),this.mList.rmBaseObjectMap(this,void 0,this.disposeMaterialIfNotUsed)}},pe$1=class extends st$1{constructor(){super(...arguments),this.key="",this.objectType="BaseObject",this.userData={},this.isPrefab=!1,this.isInstantiate=!1,this.isBloom=!1,this.isBaseObject=!0,this.disposeTrack=!0}get parent(){const e=this.object3d.parent;return e&&this.lead.objMap.get(e)||null}get children(){return this.object3d.children.map(e=>this.lead.objMap.get(e)).filter(e=>!!e)}get position(){return this.object3d.position}get rotation(){return this.object3d.rotation}get scale(){return this.object3d.scale}get lookAt(){return this.object3d.lookAt}add(...e){[...e].forEach(n=>{this.lead.objMap.get(n)?this.object3d.add(n):this.lead.createBaseObject(n,{target:this})})}remove(...e){[...e].forEach(n=>{var r;this.lead.objMap.get(n)?(r=this.lead.objMap.get(n))==null||r.erase():this.object3d.remove(n)})}get visible(){return this.object3d.visible}get visibleWithAncestors(){if(this.visible){let e=this.parent;for(;e;){if(!e.visible)return!1;e=e.parent}return!0}else return!1}create(){this.createGroup()}render(){}update(e,n){}resize(e,n){}show(){return this.object3d.visible=!0,this.object3d.layers.set(Je$2),this.isBloom&&this.enableBloom(),this}hide(){return this.object3d.visible=!1,this.object3d.layers.set(He$2),this}createGroup(){return this.object3d=new Group,this}createMesh(...e){return this.object3d=new Mesh(...e),this}createPoints(...e){return this.object3d=new Points(...e),this}createCSS2DObject(e){return this.object3d=new CSS2DObject(e),this}createCSS3DObject(e){return this.object3d=new CSS3DObject(e),this}createCSS3DSprite(e){return this.object3d=new CSS3DSprite(e),this}createSprite(e){return this.object3d=new Sprite$1(e),this}attach(...e){return[...e].forEach(n=>{this.object3d.attach(n.object3d)}),this}getSize(){const e=new Box3().setFromObject(this.object3d);return{min:e.min,max:e.max,size:e.getSize(new Vector3),center:e.getCenter(new Vector3)}}setTop(e){this.object3d&&(this.object3d.renderOrder=e)}traverse(e){e(this),this.children.forEach(n=>{n.traverse(e)})}instantiate(e){return re$1(this,null,function*(){var n,r;const C=(n=e==null?void 0:e.recursive)!=null?n:!0,w=(r=e==null?void 0:e.cloneMaterial)!=null?r:!1,{objectType:E,objectOptions:O}=this;let le=e==null?void 0:e.create,fe;return this.objectType==="BaseObject"?fe=this.lead.createBaseObject(this.object3d.clone(!1),{target:(e==null?void 0:e.target)||this.parent}):(le===void 0&&(le=Se=>{var ze;if(this.object3d){if((ze=e==null?void 0:e.instancedAttr)!=null&&ze.length){const ke=e.instancedAttr.length;if(this.object3d instanceof Sprite$1)Se.object3d=tt$1(this.object3d,ke);else{const Fe=this.object3d,mt=w?this.cloneMaterial():Fe.material;Se.object3d=new InstancedMesh(Fe.geometry,mt,ke)}it$1(Se.object3d,e==null?void 0:e.instancedAttr)}else Se.object3d=this.object3d.clone(!1),w&&Se.object3d.material&&(Se.object3d.material=this.cloneMaterial());Se.object3d.userData.prefab&&delete Se.object3d.userData.prefab}}),fe=yield this.lead.draw(E,$$1(k$1({},O||{}),{create:le,prefab:!1,keyType:this.keyType,key:(e==null?void 0:e.key)||this.keyName,uId:(e==null?void 0:e.uId)||this.keyUId,target:(e==null?void 0:e.target)||this.parent}))),this.isBloom&&fe.enableBloom(),C&&(yield Promise.all(this.children.map(Se=>Se.instantiate({key:Se.keyUId?`${Se.keyName}-${Se.keyUId}`:Se.keyName,uId:e==null?void 0:e.uId,cloneMaterial:w,target:fe})))),fe.isInstantiate=!0,fe})}erase(){this.lead.erase(this)}handleMaterialChange(e){}enableBloom(){var e;(e=this.pencil.composerController)==null||e.setBloomSelection(this,!0),this.isBloom=!0}disableBloom(){var e;(e=this.pencil.composerController)==null||e.setBloomSelection(this,!1),this.isBloom=!1}dispose(){var e;if(super.dispose(),(e=this.pencil.composerController)==null||e.bloomSelection.delete(this),this.lead&&(this.lead.objects.delete(this.key),this.lead.objectWrapChindIdMap.delete(this),this.object3d&&this.lead.objMap.delete(this.object3d)),this.disposeTrack){const n=new et$2;n.disposeMaterial=!1,n.track(this),n.dispose()}}};function rt$1(v,e){return v.map(n=>{const r=[];let C;return n.forEach(w=>{if(C){const E=Re$1(w,C)*180/Math.PI;if(E>e){const O=Ge$1(C,w),le=1/Math.ceil(E/e);let fe=le;for(;fe<1;)r.push(O(fe)),fe+=le}}r.push(C=w)}),r})}function at(v,{minLng:e,maxLng:n,minLat:r,maxLat:C}={}){const w=Math.round(ne$1(360/v,2)/Math.PI),E=(1+Math.sqrt(5))/2,O=Fe=>Fe/E*360%360-180,le=Fe=>Math.acos(2*Fe/w-1)/Math.PI*180-90,fe=Fe=>w*(Math.cos((Fe+90)*Math.PI/180)+1)/2,Se=[C!==void 0?Math.ceil(fe(C)):0,r!==void 0?Math.floor(fe(r)):w-1],ze=e===void 0&&n===void 0?()=>!0:e===void 0?Fe=>Fe<=n:n===void 0?Fe=>Fe>=e:n>=e?Fe=>Fe>=e&&Fe<=n:Fe=>Fe>=e||Fe<=n,ke=[];for(let Fe=Se[0];Fe<=Se[1];Fe++){const mt=O(Fe);ze(mt)&&ke.push([mt,le(Fe)])}return ke}function Y$2(v,e,n=!1){return n?Ne(e,v):turf_boolean_point_in_polygon_default(v,e)}function ot$1(v,e){const n={type:"Polygon",coordinates:v},[[r,C],[w,E]]=je$1(n);if(Math.min(Math.abs(w-r),Math.abs(E-C))<e)return[];const O=r>w||E>=89||C<=-89;return at(e,{minLng:r,maxLng:w,minLat:C,maxLat:E}).filter(le=>Y$2(le,n,O))}function ct(v,{resolution:e=1/0,bbox:n,projection:r}={}){const C=rt$1(v,e),w=merge(C),E=ot$1(v,e),O=[...w,...E],le={type:"Polygon",coordinates:v},[[fe,Se],[ze,ke]]=je$1(le),Fe=fe>ze||ke>=89||Se<=-89;let mt=[];if(Fe){const Xt=geoVoronoi(O).triangles(),Zt=new Map(O.map(([wt,Vt],Wt)=>[`${wt}-${Vt}`,Wt]));Xt.features.forEach(wt=>{const Vt=wt.geometry.coordinates[0].slice(0,3).reverse(),Wt=[];if(Vt.forEach(([It,Nt])=>{const Ft=`${It}-${Nt}`;Zt.has(Ft)&&Wt.push(Zt.get(Ft))}),Wt.length===3){if(Wt.some(It=>It<w.length)){const It=wt.properties.circumcenter;if(!Y$2(It,le,Fe))return}mt.push(...Wt)}})}else if(E.length){const Xt=Delaunator.from(O);for(let Zt=0,wt=Xt.triangles.length;Zt<wt;Zt+=3){const Vt=[2,1,0].map(It=>Xt.triangles[Zt+It]),Wt=Vt.map(It=>O[It]);if(Vt.some(It=>It<w.length)){const It=[0,1].map(Nt=>mean(Wt,Ft=>Ft[Nt]));if(!Y$2(It,le,Fe))continue}mt.push(...Vt)}}else{const{vertices:Xt,holes:Zt=[]}=flatten(C);mt=earcut(Xt,Zt,2)}let Lt=n?[n[0],n[2]]:extent(O,Xt=>Xt[0]),bt=n?[n[1],n[3]]:extent(O,Xt=>Xt[1]);if(r){const[Xt,Zt]=r([Lt[0],bt[0]]),[wt,Vt]=r([Lt[1],bt[1]]);Lt=[Xt,wt],bt=[-Zt,-Vt]}const Ue=linear(Lt,[0,1]),Gt=linear(bt,[0,1]),xt=O.map(([Xt,Zt])=>{if(r){const[wt,Vt]=r([Xt,Zt]);return[Ue(wt),Gt(-Vt)]}else return[Ue(Xt),Gt(Zt)]});return{contour:C,triangles:{points:O,indices:mt,uvs:xt}}}const me$1=new BufferGeometry().setAttribute?"setAttribute":"addAttribute";function G$1(v,e,n,r){const C=v.map(w=>w.map(([E,O])=>{if(r){const[le,fe]=r([E,O]);return[le,-fe,e]}return n?p(E,O,e):[E,O,e]}));return flatten(C)}function lt(v,e,n,r,C){const{vertices:w,holes:E}=G$1(v,e,r,C),{vertices:O}=G$1(v,n,r,C),le=merge([O,w]),fe=Math.round(O.length/3),Se=new Set(E);let ze=0;const ke=[];for(let mt=0;mt<fe;mt++){let Lt=mt+1;if(Lt===fe)Lt=ze;else if(Se.has(Lt)){const bt=Lt;Lt=ze,ze=bt}ke.push(mt,mt+fe,Lt+fe),ke.push(Lt+fe,Lt,mt)}const Fe=[];for(let mt=1;mt>=0;mt--)for(let Lt=0;Lt<fe;Lt+=1)Fe.push(Lt/(fe-1),mt);return{indices:ke,vertices:le,uvs:Fe,topVerts:O}}function ve(v,e,n,r,C,w){return{indices:r?v.indices:v.indices.slice().reverse(),vertices:G$1([v.points],e,C,w).vertices,uvs:n}}const ut$1=({polygonGeoJson:v,startHeight:e,endHeight:n,curvatureResolution:r=1,cartesian:C=!0,hasSide:w=!0,hasBottom:E=!1,hasTop:O=!1,projection:le,bbox:fe})=>{v.forEach(Ue=>{turf_boolean_clockwise_default(Ue)||Ue.reverse()});const{contour:Se,triangles:ze}=ct(v,{resolution:r,bbox:fe,projection:le});let ke={},Fe;w&&(ke=lt(Se,e!=null?e:n,n!=null?n:e,C,le),Fe=ke.topVerts);let mt=[];(E||O)&&(mt=merge(ze.uvs));let Lt={};E&&(Lt=ve(ze,e,mt,!1,C,le));let bt={};return O&&(bt=ve(ze,n,mt,!0,C,le)),{contour:Se,triangles:ze,sideTorso:ke,bottomCap:Lt,topCap:bt,topVerts:Fe}};class zt extends BufferGeometry{constructor(e,n={}){super(),this.type="PolygonBufferGeometry",this.parameters=k$1({polygonGeoJson:e,startHeight:0,endHeight:1,hasTop:!0,topFirst:!1,hasBottom:!0,hasSide:!0,curvatureResolution:1,cartesian:!0,userDataRsoOffset:0},n);const{endHeight:r,hasTop:C,topFirst:w,hasBottom:E,hasSide:O,cartesian:le,userDataRsoOffset:fe,projection:Se}=this.parameters,{contour:ze,sideTorso:ke,topVerts:Fe,bottomCap:mt,topCap:Lt}=ut$1(k$1({},this.parameters));let bt=[],Ue=[],Gt=[],xt=0;const Xt=Zt=>{const wt=Math.round(bt.length/3),Vt=Gt.length;bt=bt.concat(Zt.vertices),Ue=Ue.concat(Zt.uvs),Gt=Gt.concat(wt?Zt.indices.map(Wt=>Wt+wt):Zt.indices),this.addGroup(Vt,Gt.length-Vt,xt++)};C&&w&&Xt(Lt),O&&(Xt(ke),this.userData.topVerts=fe?G$1(ze,r+fe,le,Se).vertices:Fe),E&&Xt(mt),C&&!w&&Xt(Lt),this.setIndex(Gt),this[me$1]("position",new Float32BufferAttribute(bt,3)),this[me$1]("uv",new Float32BufferAttribute(Ue,2)),this.computeVertexNormals()}}const ft$1=`
4213
+ `},new Points(n,C)},it$1=(v,e)=>{const n=new Object3D;e.forEach((r,C)=>{const w=i$1(r.position),E=i$1(r.scale||[1,1,1]);n.position.copy(w),n.scale.copy(E),n.updateMatrix();const O=n.matrix.clone();if(v instanceof InstancedMesh||v.isInstantiate)v.setMatrixAt(C,O);else if(v instanceof Points||v.type==="Points"){const le=v.geometry,fe=le.attributes.position.array,Se=le.attributes.scaleAtt.array,ze=new Vector3,ke=new Vector3,Fe=new Quaternion,mt=C*3,Lt=C*1;O.decompose(ze,Fe,ke),fe[mt]=ze.x,fe[mt+1]=ze.y,fe[mt+2]=ze.z,Se[Lt]=Math.max(ke.x,ke.y,ke.z),le.attributes.position.needsUpdate=!0,le.attributes.scaleAtt.needsUpdate=!0}})};class nt{constructor(){this.onPointerIndex=[]}onPointerEvent(e,n){const r=this.lead.handlePick([this],e,n);this.onPointerIndex.push(r)}onClick(e){this.onPointerEvent("click",e)}onPointerEnter(e){this.onPointerEvent("enter",e)}onPointerLeave(e){this.onPointerEvent("leave",e)}onPointerMove(e){this.onPointerEvent("move",e)}onPointerDown(e){this.onPointerEvent("down",e)}dispose(){this.onPointerIndex.forEach(e=>{this.lead.removePick(e)})}}let st$1=class extends nt{constructor(){super(...arguments),this.userData={},this.materialList={},this.useMaterialType="origin",this.disposeMaterialIfNotUsed=!0}cloneMaterial(){const e=this.object3d;if(!e||!e.material)return;const n=e.material;if(Array.isArray(n))return n.map(r=>{const C=r.userData;r.userData={};const w=r.clone();return r.userData=C,w});{const r=n.userData;n.userData={};const C=n.clone();return n.userData=r,C}}setMaterialList(e,n){const r=this.object3d;if(!r||!r.material)return;this.materialList.origin||(this.materialList.origin=r.material);const C=n==="clone"?this.cloneMaterial():Array.isArray(n)?n.slice():n;return this.materialList[e]=C,C}useMaterial(e){const n=this.object3d;!n||!n.material||this.useMaterialType===e||!this.materialList[e]||(this.useMaterialType=e,n.material=this.materialList[e])}useMListById(e,n){if(!this.mList)return;const r=this.mList.get(e);if(!r)return;const C=this.object3d;Array.isArray(C.material)&&n!==void 0?C.material[n]=r:C.material=r}useMListByName(e,n){if(!this.mList)return;const r=this.mList.getKeyByName(e);r&&this.useMListById(r,n)}dispose(){super.dispose(),this.mList.rmBaseObjectMap(this,void 0,this.disposeMaterialIfNotUsed)}},pe$1=class extends st$1{constructor(){super(...arguments),this.key="",this.objectType="BaseObject",this.userData={},this.isPrefab=!1,this.isInstantiate=!1,this.isBloom=!1,this.isBaseObject=!0,this.disposeTrack=!0}get parent(){const e=this.object3d.parent;return e&&this.lead.objMap.get(e)||null}get children(){return this.object3d.children.map(e=>this.lead.objMap.get(e)).filter(e=>!!e)}get position(){return this.object3d.position}get rotation(){return this.object3d.rotation}get scale(){return this.object3d.scale}lookAt(e){const n=e instanceof Vector3?e:new Vector3(...e);this.object3d.lookAt(n)}add(...e){[...e].forEach(n=>{this.lead.objMap.get(n)?this.object3d.add(n):this.lead.createBaseObject(n,{target:this})})}remove(...e){[...e].forEach(n=>{var r;this.lead.objMap.get(n)?(r=this.lead.objMap.get(n))==null||r.erase():this.object3d.remove(n)})}get visible(){return this.object3d.visible}get visibleWithAncestors(){if(this.visible){let e=this.parent;for(;e;){if(!e.visible)return!1;e=e.parent}return!0}else return!1}create(){this.createGroup()}render(){}update(e,n){}resize(e,n){}show(){return this.object3d.visible=!0,this.object3d.layers.set(Je$2),this.isBloom&&this.enableBloom(),this}hide(){return this.object3d.visible=!1,this.object3d.layers.set(He$2),this}createGroup(){return this.object3d=new Group,this}createMesh(...e){return this.object3d=new Mesh(...e),this}createPoints(...e){return this.object3d=new Points(...e),this}createCSS2DObject(e){return this.object3d=new CSS2DObject(e),this}createCSS3DObject(e){return this.object3d=new CSS3DObject(e),this}createCSS3DSprite(e){return this.object3d=new CSS3DSprite(e),this}createSprite(e){return this.object3d=new Sprite$1(e),this}attach(...e){return[...e].forEach(n=>{this.object3d.attach(n.object3d)}),this}getSize(){const e=new Box3().setFromObject(this.object3d);return{min:e.min,max:e.max,size:e.getSize(new Vector3),center:e.getCenter(new Vector3)}}setTop(e){this.object3d&&(this.object3d.renderOrder=e)}traverse(e){e(this),this.children.forEach(n=>{n.traverse(e)})}instantiate(e){return re$1(this,null,function*(){var n,r;const C=(n=e==null?void 0:e.recursive)!=null?n:!0,w=(r=e==null?void 0:e.cloneMaterial)!=null?r:!1,{objectType:E,objectOptions:O}=this;let le=e==null?void 0:e.create,fe;return this.objectType==="BaseObject"?fe=this.lead.createBaseObject(this.object3d.clone(!1),{target:(e==null?void 0:e.target)||this.parent}):(le===void 0&&(le=Se=>{var ze;if(this.object3d){if((ze=e==null?void 0:e.instancedAttr)!=null&&ze.length){const ke=e.instancedAttr.length;if(this.object3d instanceof Sprite$1)Se.object3d=tt$1(this.object3d,ke);else{const Fe=this.object3d,mt=w?this.cloneMaterial():Fe.material;Se.object3d=new InstancedMesh(Fe.geometry,mt,ke)}it$1(Se.object3d,e==null?void 0:e.instancedAttr)}else Se.object3d=this.object3d.clone(!1),w&&Se.object3d.material&&(Se.object3d.material=this.cloneMaterial());Se.object3d.userData.prefab&&delete Se.object3d.userData.prefab}}),fe=yield this.lead.draw(E,$$1(k$1({},O||{}),{create:le,prefab:!1,keyType:this.keyType,key:(e==null?void 0:e.key)||this.keyName,uId:(e==null?void 0:e.uId)||this.keyUId,target:(e==null?void 0:e.target)||this.parent}))),this.isBloom&&fe.enableBloom(),C&&(yield Promise.all(this.children.map(Se=>Se.instantiate({key:Se.keyUId?`${Se.keyName}-${Se.keyUId}`:Se.keyName,uId:e==null?void 0:e.uId,cloneMaterial:w,target:fe})))),fe.isInstantiate=!0,fe})}erase(){this.lead.erase(this)}handleMaterialChange(e){}enableBloom(){var e;(e=this.pencil.composerController)==null||e.setBloomSelection(this,!0),this.isBloom=!0}disableBloom(){var e;(e=this.pencil.composerController)==null||e.setBloomSelection(this,!1),this.isBloom=!1}dispose(){var e;if(super.dispose(),(e=this.pencil.composerController)==null||e.bloomSelection.delete(this),this.lead&&(this.lead.objects.delete(this.key),this.lead.objectWrapChindIdMap.delete(this),this.object3d&&this.lead.objMap.delete(this.object3d)),this.disposeTrack){const n=new et$2;n.disposeMaterial=!1,n.track(this),n.dispose()}}};function rt$1(v,e){return v.map(n=>{const r=[];let C;return n.forEach(w=>{if(C){const E=Re$1(w,C)*180/Math.PI;if(E>e){const O=Ge$1(C,w),le=1/Math.ceil(E/e);let fe=le;for(;fe<1;)r.push(O(fe)),fe+=le}}r.push(C=w)}),r})}function at(v,{minLng:e,maxLng:n,minLat:r,maxLat:C}={}){const w=Math.round(ne$1(360/v,2)/Math.PI),E=(1+Math.sqrt(5))/2,O=Fe=>Fe/E*360%360-180,le=Fe=>Math.acos(2*Fe/w-1)/Math.PI*180-90,fe=Fe=>w*(Math.cos((Fe+90)*Math.PI/180)+1)/2,Se=[C!==void 0?Math.ceil(fe(C)):0,r!==void 0?Math.floor(fe(r)):w-1],ze=e===void 0&&n===void 0?()=>!0:e===void 0?Fe=>Fe<=n:n===void 0?Fe=>Fe>=e:n>=e?Fe=>Fe>=e&&Fe<=n:Fe=>Fe>=e||Fe<=n,ke=[];for(let Fe=Se[0];Fe<=Se[1];Fe++){const mt=O(Fe);ze(mt)&&ke.push([mt,le(Fe)])}return ke}function Y$2(v,e,n=!1){return n?Ne(e,v):turf_boolean_point_in_polygon_default(v,e)}function ot$1(v,e){const n={type:"Polygon",coordinates:v},[[r,C],[w,E]]=je$1(n);if(Math.min(Math.abs(w-r),Math.abs(E-C))<e)return[];const O=r>w||E>=89||C<=-89;return at(e,{minLng:r,maxLng:w,minLat:C,maxLat:E}).filter(le=>Y$2(le,n,O))}function ct(v,{resolution:e=1/0,bbox:n,projection:r}={}){const C=rt$1(v,e),w=merge(C),E=ot$1(v,e),O=[...w,...E],le={type:"Polygon",coordinates:v},[[fe,Se],[ze,ke]]=je$1(le),Fe=fe>ze||ke>=89||Se<=-89;let mt=[];if(Fe){const Xt=geoVoronoi(O).triangles(),Zt=new Map(O.map(([wt,Vt],Wt)=>[`${wt}-${Vt}`,Wt]));Xt.features.forEach(wt=>{const Vt=wt.geometry.coordinates[0].slice(0,3).reverse(),Wt=[];if(Vt.forEach(([It,Nt])=>{const Ft=`${It}-${Nt}`;Zt.has(Ft)&&Wt.push(Zt.get(Ft))}),Wt.length===3){if(Wt.some(It=>It<w.length)){const It=wt.properties.circumcenter;if(!Y$2(It,le,Fe))return}mt.push(...Wt)}})}else if(E.length){const Xt=Delaunator.from(O);for(let Zt=0,wt=Xt.triangles.length;Zt<wt;Zt+=3){const Vt=[2,1,0].map(It=>Xt.triangles[Zt+It]),Wt=Vt.map(It=>O[It]);if(Vt.some(It=>It<w.length)){const It=[0,1].map(Nt=>mean(Wt,Ft=>Ft[Nt]));if(!Y$2(It,le,Fe))continue}mt.push(...Vt)}}else{const{vertices:Xt,holes:Zt=[]}=flatten(C);mt=earcut(Xt,Zt,2)}let Lt=n?[n[0],n[2]]:extent(O,Xt=>Xt[0]),bt=n?[n[1],n[3]]:extent(O,Xt=>Xt[1]);if(r){const[Xt,Zt]=r([Lt[0],bt[0]]),[wt,Vt]=r([Lt[1],bt[1]]);Lt=[Xt,wt],bt=[-Zt,-Vt]}const Ue=linear(Lt,[0,1]),Gt=linear(bt,[0,1]),xt=O.map(([Xt,Zt])=>{if(r){const[wt,Vt]=r([Xt,Zt]);return[Ue(wt),Gt(-Vt)]}else return[Ue(Xt),Gt(Zt)]});return{contour:C,triangles:{points:O,indices:mt,uvs:xt}}}const me$1=new BufferGeometry().setAttribute?"setAttribute":"addAttribute";function G$1(v,e,n,r){const C=v.map(w=>w.map(([E,O])=>{if(r){const[le,fe]=r([E,O]);return[le,-fe,e]}return n?p(E,O,e):[E,O,e]}));return flatten(C)}function lt(v,e,n,r,C){const{vertices:w,holes:E}=G$1(v,e,r,C),{vertices:O}=G$1(v,n,r,C),le=merge([O,w]),fe=Math.round(O.length/3),Se=new Set(E);let ze=0;const ke=[];for(let mt=0;mt<fe;mt++){let Lt=mt+1;if(Lt===fe)Lt=ze;else if(Se.has(Lt)){const bt=Lt;Lt=ze,ze=bt}ke.push(mt,mt+fe,Lt+fe),ke.push(Lt+fe,Lt,mt)}const Fe=[];for(let mt=1;mt>=0;mt--)for(let Lt=0;Lt<fe;Lt+=1)Fe.push(Lt/(fe-1),mt);return{indices:ke,vertices:le,uvs:Fe,topVerts:O}}function ve(v,e,n,r,C,w){return{indices:r?v.indices:v.indices.slice().reverse(),vertices:G$1([v.points],e,C,w).vertices,uvs:n}}const ut$1=({polygonGeoJson:v,startHeight:e,endHeight:n,curvatureResolution:r=1,cartesian:C=!0,hasSide:w=!0,hasBottom:E=!1,hasTop:O=!1,projection:le,bbox:fe})=>{v.forEach(Ue=>{turf_boolean_clockwise_default(Ue)||Ue.reverse()});const{contour:Se,triangles:ze}=ct(v,{resolution:r,bbox:fe,projection:le});let ke={},Fe;w&&(ke=lt(Se,e!=null?e:n,n!=null?n:e,C,le),Fe=ke.topVerts);let mt=[];(E||O)&&(mt=merge(ze.uvs));let Lt={};E&&(Lt=ve(ze,e,mt,!1,C,le));let bt={};return O&&(bt=ve(ze,n,mt,!0,C,le)),{contour:Se,triangles:ze,sideTorso:ke,bottomCap:Lt,topCap:bt,topVerts:Fe}};class zt extends BufferGeometry{constructor(e,n={}){super(),this.type="PolygonBufferGeometry",this.parameters=k$1({polygonGeoJson:e,startHeight:0,endHeight:1,hasTop:!0,topFirst:!1,hasBottom:!0,hasSide:!0,curvatureResolution:1,cartesian:!0,userDataRsoOffset:0},n);const{endHeight:r,hasTop:C,topFirst:w,hasBottom:E,hasSide:O,cartesian:le,userDataRsoOffset:fe,projection:Se}=this.parameters,{contour:ze,sideTorso:ke,topVerts:Fe,bottomCap:mt,topCap:Lt}=ut$1(k$1({},this.parameters));let bt=[],Ue=[],Gt=[],xt=0;const Xt=Zt=>{const wt=Math.round(bt.length/3),Vt=Gt.length;bt=bt.concat(Zt.vertices),Ue=Ue.concat(Zt.uvs),Gt=Gt.concat(wt?Zt.indices.map(Wt=>Wt+wt):Zt.indices),this.addGroup(Vt,Gt.length-Vt,xt++)};C&&w&&Xt(Lt),O&&(Xt(ke),this.userData.topVerts=fe?G$1(ze,r+fe,le,Se).vertices:Fe),E&&Xt(mt),C&&!w&&Xt(Lt),this.setIndex(Gt),this[me$1]("position",new Float32BufferAttribute(bt,3)),this[me$1]("uv",new Float32BufferAttribute(Ue,2)),this.computeVertexNormals()}}const ft$1=`
4214
4214
  #include <fog_pars_fragment>
4215
4215
  #include <logdepthbuf_pars_fragment>
4216
4216
 
@@ -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.29.8", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
66
+ const version = "0.29.9", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
67
67
  token: void 0,
68
68
  getInfo() {
69
69
  if (!this.token)
@@ -36931,8 +36931,9 @@ let st$1 = class extends nt {
36931
36931
  get scale() {
36932
36932
  return this.object3d.scale;
36933
36933
  }
36934
- get lookAt() {
36935
- return this.object3d.lookAt;
36934
+ lookAt(e) {
36935
+ const n = e instanceof Vector3 ? e : new Vector3(...e);
36936
+ this.object3d.lookAt(n);
36936
36937
  }
36937
36938
  add(...e) {
36938
36939
  [...e].forEach((n) => {
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.29.8";
1
+ declare const _default: "0.29.9";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.29.8",
3
+ "version": "0.29.9",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",
@@ -66,7 +66,7 @@
66
66
  "esus-lite": "^0.2.8",
67
67
  "events": "^3.3.0",
68
68
  "geojson-cn": "^0.2.5",
69
- "gl-draw": "0.16.2",
69
+ "gl-draw": "0.16.3",
70
70
  "jsrsasign": "^11.1.0",
71
71
  "lodash-es": "^4.17.21"
72
72
  },