@aibee/crc-bmap 0.8.76 → 0.8.77
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/lib/index.cjs +1 -1
- package/lib/index.esm.js +6 -3
- package/lib/index.esm.min.js +1 -1
- package/lib/index.js +1 -1
- package/lib/platform/wrapper.cjs +1 -1
- package/lib/platform/wrapper.esm.js +6 -3
- package/lib/platform/wrapper.esm.min.js +1 -1
- package/lib/platform/wrapper.js +1 -1
- package/lib/src/plugins/navigation/navigation.d.ts +1 -0
- package/lib/src/plugins/navigation/navigation.js +6 -3
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
top: 0;
|
|
112
112
|
left: 0;
|
|
113
113
|
z-index: 9999;
|
|
114
|
-
`,document.body.appendChild(r.canvas)}setAngle(t){if(console.log("angle",t),r.textureMap.has(t))this._initIcon(r.textureMap.get(t));else{this.draw(t);let e=this.getTexture(this.getImageData());r.textureMap.set(t,e),this._initIcon(e),this._initScale({zoom:this.bmap.context.camera.zoom})}}_initIcon(t){if(this.spriteIcon)this.spriteIcon.material.map=t,t.needsUpdate=!0;else{let e=new le.Sprite(new le.SpriteMaterial({map:t,transparent:!0,alphaTest:.2,depthTest:this.options.depth_test,rotation:this.options.icon_rotate/180*Math.PI}));e.renderOrder=1e5+this.options.level,t.needsUpdate=!0,this.add(e),e.center.set(.5,.5),this.spriteIcon=e}}initSize(){this.spriteIcon&&this.spriteIcon.center.set(.5,.5)}draw(t){let{ctx:e}=r,{config:{size:n}}=this,i=n[0]/2,o=n[1]/2,s=4,a=1,u=s+a;if(e.clearRect(0,0,n[0],n[1]),e.setLineDash([10,10]),e.strokeStyle="#fff",e.lineWidth=2,e.beginPath(),e.arc(i,o,o-u,-Math.PI/2,Math.PI*2-Math.PI/2,t<Math.PI),e.stroke(),e.strokeStyle="#0A7AFF",t<Math.PI){let l=-Math.PI/2,c=l-t;e.beginPath(),e.arc(i,o,o-u,l,c,!0)}else{let l=-Math.PI/2,c=l+Math.PI*2-t;e.beginPath(),e.arc(i,o,o-u,l,c,!1)}e.stroke(),e.clearRect(i-u*2,0,u*4,u*4),e.beginPath(),e.arc(i,u,s,0,Math.PI*2),e.fillStyle="#0A7AFF",e.fill(),e.setLineDash([10,0]),e.strokeStyle="#fff",e.lineWidth=a,e.stroke(),e.clearRect(0,o-5,10,10),e.clearRect(i-5,n[1]-10,10,10),e.clearRect(n[0]-10,o-5,10,10),t>Math.PI/2&&t<Math.PI?e.fillStyle="#0A7AFF":e.fillStyle="#fff",e.fillRect(0,o-1,10,2),e.fillStyle="#fff",e.fillRect(i-1,n[1]-10,2,10),t>Math.PI&&t<Math.PI/2*3?e.fillStyle="#0A7AFF":e.fillStyle="#fff",e.fillRect(n[0]-10,o-1,10,2)}getImageData(){let{ctx:t}=r,{config:{size:e}}=this;return t.getImageData(0,0,e[0],e[1])}getTexture(t){let{config:{size:e}}=this,n=new le.DataTexture(Uint8Array.from(t.data),e[0],e[1],le.RGBAFormat);return n.format=le.RGBAFormat,n.magFilter=le.LinearFilter,n.minFilter=le.LinearFilter,n.colorSpace="srgb",n.flipY=!0,n}dispose(){var t;super.dispose(),(t=this.spriteIcon)==null||t.material.dispose()}static dispose(){this.textureMap.forEach(t=>{t.dispose()}),this.textureMap.clear(),this.ctx=null,this.canvas=null}constructor(t,e){super(t.context,{icon_size:e.size,collision_enable:!1,level:2}),this.bmap=t,this.config=e,r.canvas.width=e.size[0],r.canvas.height=e.size[1]}};sn.canvas=document.createElement("canvas");sn.ctx=sn.canvas.getContext("2d",{willReadFrequently:!0});sn.textureMap=new Map;var C9={path:{},cheapMaximumDistance:20,needStartPoi:!1,startPoi:{},positionNavigation:{},offsetY:150,directionEmitThreshold:5,disablePathAnimation:!1,speed:1,roadData:[],runAnimationMaxTime:1,navigationCameraBasic:45},jh=class extends Dt{get curFloorPathLength(){var t,e;return(e=(t=this.curFloorPath)==null?void 0:t.distance)!=null?e:0}get curFloorPathPoints(){var t,e;return(e=(t=this.curFloorPath)==null?void 0:t.points)!=null?e:[]}registryEvent(){this.bmap.context.addEventListener("update",this.onUpdate),this.bmap.addEventListener(Mt.SWITCH_FLOOR_AFTER,this.onSwitchFloor),this.positionNavigation.addEventListener("navigation-info",this.onNavigationInfo),this.bmap.context.addEventListener("control-change",this.onControlChangeForStartPoi)}setRoadData(t){this.options.roadData=t,this.positionNavigation.setRoadData(t)}showStartRotateHelperPoi(){var t;if(this.needStartRotateHelperPoi=!0,!this.startPoi||this.startRotateHelperPoi)return;let e=this.startPoi.options.icon_size;this.startRotateHelperPoi=new sn(this.bmap,{size:[e[0]+20,e[1]+20]}),this.startRotateHelperPoi.setAngle(0),this.startRotateHelperPoi.position.setZ(.51),(t=this.bmap.context.currentFloor)==null||t.poiLayer2.pushPoi(this.startRotateHelperPoi)}hideStartRotateHelperPoi(){if(this.needStartRotateHelperPoi=!1,this.startRotateHelperPoi){var t;(t=this.bmap.context.currentFloor)==null||t.poiLayer2.removePoi(this.startRotateHelperPoi),this.startRotateHelperPoi=null}}setStartPoiPosition(t,e){this.startPoi&&(this.startPoi.position.setX(t).setY(e),this.startRotateHelperPoi&&this.startRotateHelperPoi.position.setX(t).setY(e),this.detachLine&&this.detachLine.setPosition(this.startPoi.position,this.detachStartPoi.position))}toPositionByTask(t){var e;let i=(e=this.taskQueue.getTasks().find(s=>s.meta.type==="toPosition"))==null?void 0:e.tid,o={run:()=>this.toPositionBySpeed(t,this.options.speed),meta:{type:"toPosition"}};i?this.taskQueue.replace(i,o):this.taskQueue.add(o)}pauseAnimation(){this.taskQueue.clear(),this.positionNavigation.pause(),this.tweenUtil.pause()}continueAnimation(){this.tweenUtil.continue(),this.positionNavigation.continue()}clearTween(){this.tweenUtil.clear(),this.taskQueue.clear(),this.bmap.context.control.enabled=!0}unRegistryEvent(){this.bmap.context.removeEventListener("update",this.onUpdate),this.bmap.removeEventListener(Mt.SWITCH_FLOOR_AFTER,this.onSwitchFloor),this.positionNavigation.removeEventListener("navigation-info",this.onNavigationInfo),this.bmap.context.removeEventListener("control-change",this.onControlChangeForStartPoi)}clearPath(){if(this.path&&(this.bmap.context.scene.remove(this.path),this.path.dispose(),this.path=null,this.clearTween()),this.startPoi){var t;if((t=this.bmap.context.currentFloor)==null||t.poiLayer2.removePoi(this.startPoi),this.startPoi=null,this.startRotateHelperPoi){var e;(e=this.bmap.context.currentFloor)==null||e.poiLayer2.removePoi(this.startRotateHelperPoi),this.startRotateHelperPoi=null}}this.translatePath=null}setCurFloorPath(t){t===null?(this.curFloorPath=null,this.currentPathPosition=null,this.toPointPosition=null):(this.curFloorPath=t,this.currentPathPosition=t.points[0],this.toPointPosition=t.points[0]),this.movedDistance=0,this.clearTween()}setCurPathIndex(t){var e,n;this.curPathIndex=t,((e=this.paths[t])==null?void 0:e.floor)===((n=this.bmap.context.currentFloor)==null?void 0:n.name)?(this.setCurFloorPath(this.paths[t]),this.renderPath(this.translatePoints(this.curFloorPathPoints))):this.clearPath()}addPath(t,e){e===void 0&&(e=0);var n;this.paths=t,this.curPathIndex=e,this.clearTween();let i=(n=this.bmap.context.currentFloor)==null?void 0:n.name,o=t[e];if(i&&(o==null?void 0:o.floor)===i)if(this.setCurFloorPath(o),this.bmap.currentBuildGround)this.renderPath(this.translatePoints(o.points));else{let s=()=>{this.bmap.removeEventListener("center-change",s),this.renderPath(this.translatePoints(o.points))};this.bmap.addEventListener("center-change",s)}else this.clearPath();this.dispatchEvent({type:"add-path",paths:t})}translatePoints(t){let[e,n]=this.bmap.buildingCenter;return t.map(i=>[i[0]-e,i[1]-n])}renderPath(t){this.translatePath=t;let e=this.catmullRomCurve3(t);if(this.cPath=e,this.animationPathOptions={cPathIndex:0},this.pathStart=e[0],this.path?this.path.updatePoints(e):(this.path=new za(this,this.options.path),this.path.create(e),this.path.position.z=this.bmap.context.currentFloor.groundMaxHeight+.5,this.bmap.context.scene.add(this.path)),this.path.movePath(0),this.startPoi){var n;if((n=this.bmap.context.currentFloor)==null||n.poiLayer2.removePoi(this.startPoi),this.startPoi=null,this.startRotateHelperPoi){var i;(i=this.bmap.context.currentFloor)==null||i.poiLayer2.removePoi(this.startRotateHelperPoi),this.startRotateHelperPoi=null}}if(this.hideDetachStart(),this.showDetachStartState&&this.options.detachStartPoi){var o;this.detachStartPoi=new nt(this.bmap.context,T({},this.options.detachStartPoi,{id:"navigation_detach_start_poi",position:{x:e[0][0],y:e[0][1],z:.51},collision_enable:!1}))||null,(o=this.bmap.context.currentFloor)==null||o.poiLayer2.pushPoi(this.detachStartPoi),this.detachLine=new zr(this.bmap.context,new Xt.Vector3(e[0][0],e[0][1],.51),new Xt.Vector3(e[0][0],e[0][1],.51)),this.bmap.context.scene.add(this.detachLine)}if(this.options.needStartPoi){var s;this.startPoi=new nt(this.bmap.context,T({},this.options.startPoi,{id:"navigation_start_poi",position:{x:e[0][0],y:e[0][1],z:.51},collision_enable:!1}))||null,(s=this.bmap.context.currentFloor)==null||s.poiLayer2.pushPoi(this.startPoi),this.needStartRotateHelperPoi&&this.showStartRotateHelperPoi(),console.log(this.startRotateHelperPoi)}this.dispatchEvent({type:"render-path",path:this.path})}catmullRomCurve3(t){return Wi(t,!1,!0,.1,170,2.5)}getPathDirection(){if(!this.curFloorPath||!this.currentPathPosition||this.curFloorPathPoints.length<2)return null;let t=Ze(this.curFloorPathPoints,this.currentPathPosition),e=this.curFloorPathPoints[t],n=this.curFloorPathPoints[t+1],i=new Xt.Vector3(n[0]-e[0],n[1]-e[1],0).normalize(),o=new Xt.Vector3(0,1,0).normalize(),s=i.angleTo(o),a=new Xt.Vector3().crossVectors(o,i);return(Object.is(a.y,0)?-1:1)*s}getPathDirection2(){if(!this.curFloorPath||!this.toPointPosition||this.curFloorPathPoints.length<2)return null;let t=Ze(this.curFloorPathPoints,this.toPointPosition),e=this.curFloorPathPoints[t],n=this.curFloorPathPoints[t+1];return(new Xt.Vector2(n[0]-e[0],n[1]-e[1]).normalize().angle()*180/Math.PI-90+360)%360}changeCameraToPathUp(t){return j(this,null,function*(){t===void 0&&(t=100);let e=this.getPathDirection();if(e===null)return;let n=this.bmap.context.control.getAzimuthalAngle();Math.abs(n-e)>Math.PI&&(n>0?e=Math.PI*2+e:e=e-Math.PI*2);let i=Math.abs(e-this.bmap.context.control.getAzimuthalAngle());if(i<.01)return;let{control:o}=this.bmap.context,s=t/Math.PI*6*i;return Nt(new Promise(a=>{let u={azimuthal:o.getAzimuthalAngle()},l={azimuthal:e},c=o.getPolarAngle(),{maxPolarAngle:h,minPolarAngle:p}=o;o.maxPolarAngle=c,o.minPolarAngle=c;let m=new kr.Tween(u,this.tweenUtil.group).to(l,s).easing(kr.Easing.Quadratic.InOut).onUpdate(()=>j(this,null,function*(){this.startPoi&&o.target.copy(this.startPoi.position),o.setAzimuthalAngle(u.azimuthal,!0),o.setTargetByOffset(this.options.offsetY)})).onComplete(()=>{o.enabled=!0,this.tweenUtil.remove(m),o.maxPolarAngle=h,o.minPolarAngle=p,a(!0)}).onStart(()=>{o.enabled=!1}).start()}),s+500).finally(()=>{this.bmap.context.control.enabled=!0})})}initNavigationCamera(t){return j(this,null,function*(){t===void 0&&(t=1e3);var e;let i=(e=this.taskQueue.getTasks().find(s=>s.meta.type==="initNavigationCamera"))==null?void 0:e.tid,o={run:()=>Nt(j(this,null,function*(){yield this.initCameraZoom(t/2),yield this.changeCameraToPathUp(t/4),yield this.translateCameraToStartPoi(t/4)}),t+500).finally(()=>{this.bmap.context.control.enabled=!0}),meta:{type:"initNavigationCamera"}};i?this.taskQueue.replace(i,o):this.taskQueue.add(o)})}translateCameraToStartPoi(t){return j(this,null,function*(){if(t===void 0&&(t=100),!this.startPoi)return;let{clientSize:{width:e,height:n},camera:i,control:o}=this.bmap.context,s=Math.round(e/2),a=Math.round(n/2),u=o.target.clone(),l=I(this.startPoi.position,i,e,n),c=l.x-s,h=a-l.y+this.options.offsetY;if(!(Math.abs(c)<=1&&Math.abs(h)<=1)){if(Math.abs(c)>=1){let p=new Xt.Vector3;p.setFromMatrixColumn(i.matrix,0),p.normalize(),p.multiplyScalar(c/i.zoom),u.add(new Xt.Vector3(p.x,p.y,0))}if(Math.abs(h)>=1){let p=new Xt.Vector3;p.setFromMatrixColumn(i.matrix,1),p.normalize(),p.multiplyScalar(h/i.zoom),u.add(new Xt.Vector3(p.x,p.y,0))}return Nt(new Promise(p=>{let m=o.target.clone();console.log(m,u,t);let g=new kr.Tween(m,this.tweenUtil.group).to(u,t).onUpdate(()=>{this.bmap.context.control.setCameraPositionByTarget(m,0)}).onComplete(()=>{this.bmap.context.control.setCameraPositionByTarget(u,0),this.tweenUtil.remove(g),this.bmap.context.control.enabled=!0,p(!0)}).onStart(()=>{this.bmap.context.control.enabled=!1}).start()}),t+500).then(()=>{this.bmap.context.control.enabled=!0})}})}initCameraZoom(t){return j(this,null,function*(){if(t===void 0&&(t=100),!this.startPoi)return;let{clientSize:{width:e,height:n},currentFloor:i}=this.bmap.context,{max:o,min:s}=i.box,u=Math.min(e/(o.x-s.x),n/(o.y-s.y))*(o.x-s.x)/this.options.navigationCameraBasic;return this.bmap.context.setZoom(u,this.startPoi.position,t).finally(()=>{this.bmap.context.control.enabled=!0})})}toPosition(t,e){if(this.paths[this.curPathIndex]&&this.paths[this.curPathIndex].floor===t&&this.detachStartPoi){let n=this.translatePoints([e]);this.detachStartPoi.position.setX(n[0][0]),this.detachStartPoi.position.setY(n[0][1]),this.detachLine&&this.startPoi&&this.detachLine.setPosition(this.startPoi.position,this.detachStartPoi.position)}this.positionNavigation.toPosition(t,e)}startSimulation(){this.positionNavigation.startSimulation()}setSimulationSpeed(t){this.positionNavigation.changeSimulationSpeed(t)}toPositionBySpeed(t,e){return j(this,null,function*(){let{currentPathPosition:n,curFloorPath:i,curFloorPathPoints:o}=this;if(!i||!n)return null;let s=this.movedDistance,a=G0(o,t);if(s===-1||a===-1||a<=s)return null;let u=a-s;if(!u)return;let l=Math.min(u/e,this.options.runAnimationMaxTime);return this.pathTween&&this.clearTween(),Nt(new Promise(c=>{let h=this.pathTween=new kr.Tween({distance:0},this.tweenUtil.group).to({distance:u},l*1e3).onUpdate(p=>j(this,null,function*(){this.moveDistance(p.distance+s,h)})).onComplete(()=>{this.tweenUtil.remove(h),c(!0)}).start()}),l*1e3+500).finally(()=>{this.bmap.context.control.enabled=!0})})}moveDistance(t,e){return j(this,null,function*(){var n;this.movedDistance=t,(n=this.path)==null||n.movePath(this.movedDistance/this.curFloorPathLength);let i=kn(this.curFloorPathPoints,this.movedDistance);if(i===null)return;this.currentPathPosition=i;let o=this.translatePoints([i])[0];this.startPoi&&(this.setStartPoiPosition(o[0],o[1]),this.options.disablePathAnimation||this.bmap.context.control.setTargetByOffset(this.options.offsetY,this.startPoi.position.clone())),this.options.disablePathAnimation||(e==null||e.pause(),yield this.changeCameraToPathUp(500/this.options.speed),e==null||e.resume())})}hideDetachStart(){if(this.showDetachStartState=!1,this.detachLine&&(this.bmap.context.scene.remove(this.detachLine),this.detachLine.dispose(),this.detachLine=null),this.detachStartPoi){var t;(t=this.bmap.context.currentFloor)==null||t.poiLayer2.removePoi(this.detachStartPoi),this.detachStartPoi=null}}showDetachStart(){if(this.showDetachStartState=!0,this.path&&this.startPoi&&this.options.detachStartPoi){var t;let e=this.startPoi.position;this.detachStartPoi=new nt(this.bmap.context,T({},this.options.detachStartPoi,{id:"navigation_detach_start_poi",position:e,collision_enable:!1}))||null,(t=this.bmap.context.currentFloor)==null||t.poiLayer2.pushPoi(this.detachStartPoi),this.detachLine=new zr(this.bmap.context,new Xt.Vector3(e.x,e.y,.51),new Xt.Vector3(e.x,e.y,.51)),this.bmap.context.scene.add(this.detachLine)}}setStartPoiRotate(t){this.startPoiRotate=t;let n=(this.bmap.context.control.getAzimuthalAngle()*180/Math.PI+360)%360,i=(360-t-n)%360;this.detachStartPoi&&(this.detachStartPoi.options.icon_rotate=i),this.startPoi&&this.startRotateHelperPoi&&this.startRotateHelperPoi.setAngle(i)}dispose(){var t;if(this.path&&(this.bmap.context.scene.remove(this.path),this.path.dispose()),this.hideDetachStart(),this.startPoi){var e;(e=this.bmap.context.currentFloor)==null||e.poiLayer2.removePoi(this.startPoi),this.startPoi=null}this.tweenUtil.dispose(),this.unRegistryEvent(),(t=this.startRotateHelperPoi)==null||t.dispose(),sn.dispose(),this.positionNavigation.dispose(),this.startRotateHelperPoi=null,super.dispose()}constructor(t,e={},n){super(t),this.path=null,this.fetchRoadStatus=!1,this.paths=[],this.curPathIndex=0,this.curFloorPath=null,this.translatePath=null,this.currentPathPosition=null,this.toPointPosition=null,this.pathTween=null,this.startPoi=null,this.detachStartPoi=null,this.detachLine=null,this.startPoiRotate=0,this.startRotateHelperPoi=null,this.needStartRotateHelperPoi=!1,this.showDetachStartState=!0,this.movedDistance=0,this.pathStart=[0,0],this.tweenUtil=new qe,this.taskQueue=new Jn,this.animationPathOptions={cPathIndex:0},this.cPath=[],this.onNavigationInfo=i=>{let{info:o}=i;if(this.dispatchEvent({type:"navigation-info",info:o}),!o.offset){if(o.routeIndex!==this.curPathIndex)return;this.toPointPosition=o.pos,this.toPositionByTask(o.pos)}},this.onUpdate=()=>{this.tweenUtil.update()},this.onSwitchFloor=i=>{let{data:{curFloor:o}}=i;if(this.clearTween(),this.paths[this.curPathIndex]){let s=this.paths[this.curPathIndex];this.setCurFloorPath(s!=null?s:null),s?this.renderPath(this.translatePoints(s.points)):this.clearPath()}else this.clearPath()},this.onControlChangeForStartPoi=()=>{this.startPoi&&this.setStartPoiRotate(this.startPoiRotate)},!n&&typeof e=="object"&&(n=e),this.options=Object.assign({},C9,n),this.positionNavigation=new Na(this,T({simulationSpeed:this.options.speed},this.options.positionNavigation),this.options.roadData),this.registryEvent()}};var Z8=d(W(),1);var Vr=require("three"),Ah=class extends Dt{show(t){let e=0;t.forEach(o=>{o.poiLayer2.pois.forEach(s=>{let a=new Vr.Vector3().setFromMatrixPosition(s.matrixWorld).z;s.position.setZ(a+e),s.options.depth_test=!0,this.poiLayer.pushPoi(s)}),o.poiLayer2.pois.length=0,o.poiLayer2.dispose(),o.position.z=e,e+=o.userData.height});let{scene:n,currentFloor:i}=this.bmap.context;i&&(n.remove(i),i.dispose()),this.group.add(this.poiLayer,...t),n.add(this.group),this.floors=t,this.fitCamera(),this.bmap.context.cameraBound.updateBox(),this.showStatus=!0}hide(){let{scene:t}=this.bmap.context;t.remove(this.group),this.poiLayer.clear(),this.floors.forEach(e=>{e.dispose()}),this.floors=[],this.group.clear(),this.showStatus=!1}fitCamera(){let{context:t,config:e,type:n}=this.bmap;t.cameraBound.setEnable(!1),t.control.minZoom=0,t.control.maxZoom=1/0,t.camera.zoom=1,t.setAzimuthalAngle(e.control.defaultAzimuthal,0),t.setPolarAngle(e.control.defaultPolar,0),t.fitCameraToObject(this.group,e.defaultPadding,0);let i=t.camera.zoom;t.control.minZoom=i,t.control.maxZoom=i*25,n==="3d"&&t.fitCameraToObject(this.group,e.defaultPadding,0,!1),this.bmap.basicZoom=t.camera.zoom,t.control.addEventListener("change",this.bmap.onControlChange.bind(this.bmap)),this.bmap.onControlChange(),t.cameraBound.setEnable(!0)}dispose(){this.poiLayer.dispose(),this.floors.forEach(t=>t.dispose()),this.floors=[],super.dispose()}constructor(t){super(t),this.floors=[],this.group=new Vr.Group,this.showStatus=!1,this.group.name="mul-floor-group",this.poiLayer=new er(t.context),this.poiLayer.changeParkingSpaceVisibleByZoom=()=>{let e=new Vr.Box3().setFromObject(this.group),{clientSize:{width:n,height:i}}=this.bmap.context,{max:o,min:s}=e,u=Math.min(n/(o.x-s.x),i/(o.y-s.y))*(o.x-s.x)/45;this.poiLayer.pois.filter(l=>l.userData.type==="parkingSpace").map(l=>{let c=this.bmap.context.camera.zoom>=u;l.visible=c,c||l.parentSetVisible(c)})}}};var fT=require("three");function Th(){let r=new Blob([`var xF=Object.create;var $x=Object.defineProperty;var EF=Object.getOwnPropertyDescriptor;var wF=Object.getOwnPropertyNames;var SF=Object.getPrototypeOf,MF=Object.prototype.hasOwnProperty;var at=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var bF=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of wF(t))!MF.call(n,s)&&s!==e&&$x(n,s,{get:()=>t[s],enumerable:!(o=EF(t,s))||o.enumerable});return n};var Ze=(n,t,e)=>(e=n!=null?xF(SF(n)):{},bF(t||!n||!n.__esModule?$x(e,"default",{value:n,enumerable:!0}):e,n));var np=(n,t,e)=>new Promise((o,s)=>{var c=g=>{try{p(e.next(g))}catch(m){s(m)}},h=g=>{try{p(e.throw(g))}catch(m){s(m)}},p=g=>g.done?o(g.value):Promise.resolve(g.value).then(c,h);p((e=e.apply(n,t)).next())});var oo=at((Im,Zx)=>{"use strict";var If=function(n){return n&&n.Math===Math&&n};Zx.exports=If(typeof globalThis=="object"&&globalThis)||If(typeof window=="object"&&window)||If(typeof self=="object"&&self)||If(typeof global=="object"&&global)||If(typeof Im=="object"&&Im)||function(){return this}()||Function("return this")()});var Kx=at((bJ,Jx)=>{"use strict";Jx.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var Di=at((AJ,jx)=>{"use strict";var Rm=typeof document=="object"&&document.all;jx.exports=typeof Rm=="undefined"&&Rm!==void 0?function(n){return typeof n=="function"||n===Rm}:function(n){return typeof n=="function"}});var Ea=at((TJ,Qx)=>{"use strict";var AF=Di();Qx.exports=function(n){return typeof n=="object"?n!==null:AF(n)}});var rp=at((CJ,eE)=>{"use strict";var TF=oo(),tE=Ea(),Lm=TF.document,CF=tE(Lm)&&tE(Lm.createElement);eE.exports=function(n){return CF?Lm.createElement(n):{}}});var iE=at((PJ,rE)=>{"use strict";var PF=rp(),Nm=PF("span").classList,nE=Nm&&Nm.constructor&&Nm.constructor.prototype;rE.exports=nE===Object.prototype?void 0:nE});var gi=at((IJ,oE)=>{"use strict";oE.exports=function(n){try{return!!n()}catch(t){return!0}}});var Rf=at((RJ,sE)=>{"use strict";var IF=gi();sE.exports=!IF(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")})});var mi=at((LJ,lE)=>{"use strict";var aE=Rf(),uE=Function.prototype,Om=uE.call,RF=aE&&uE.bind.bind(Om,Om);lE.exports=aE?RF:function(n){return function(){return Om.apply(n,arguments)}}});var ec=at((NJ,fE)=>{"use strict";var cE=mi(),LF=cE({}.toString),NF=cE("".slice);fE.exports=function(n){return NF(LF(n),8,-1)}});var pE=at((OJ,hE)=>{"use strict";var OF=mi(),DF=gi(),FF=ec(),Dm=Object,UF=OF("".split);hE.exports=DF(function(){return!Dm("z").propertyIsEnumerable(0)})?function(n){return FF(n)==="String"?UF(n,""):Dm(n)}:Dm});var ip=at((DJ,dE)=>{"use strict";dE.exports=function(n){return n==null}});var nc=at((FJ,gE)=>{"use strict";var BF=ip(),zF=TypeError;gE.exports=function(n){if(BF(n))throw new zF("Can't call method on "+n);return n}});var rc=at((UJ,mE)=>{"use strict";var GF=pE(),kF=nc();mE.exports=function(n){return GF(kF(n))}});var Lf=at((BJ,yE)=>{"use strict";yE.exports=!1});var op=at((zJ,_E)=>{"use strict";var vE=oo(),qF=Object.defineProperty;_E.exports=function(n,t){try{qF(vE,n,{value:t,configurable:!0,writable:!0})}catch(e){vE[n]=t}return t}});var sp=at((GJ,wE)=>{"use strict";var HF=Lf(),VF=oo(),WF=op(),xE="__core-js_shared__",EE=wE.exports=VF[xE]||WF(xE,{});(EE.versions||(EE.versions=[])).push({version:"3.39.0",mode:HF?"pure":"global",copyright:"\\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var ap=at((kJ,ME)=>{"use strict";var SE=sp();ME.exports=function(n,t){return SE[n]||(SE[n]=t||{})}});var ic=at((qJ,bE)=>{"use strict";var XF=nc(),YF=Object;bE.exports=function(n){return YF(XF(n))}});var wa=at((HJ,AE)=>{"use strict";var $F=mi(),ZF=ic(),JF=$F({}.hasOwnProperty);AE.exports=Object.hasOwn||function(t,e){return JF(ZF(t),e)}});var Fm=at((VJ,TE)=>{"use strict";var KF=mi(),jF=0,QF=Math.random(),tU=KF(1 .toString);TE.exports=function(n){return"Symbol("+(n===void 0?"":n)+")_"+tU(++jF+QF,36)}});var RE=at((WJ,IE)=>{"use strict";var eU=oo(),CE=eU.navigator,PE=CE&&CE.userAgent;IE.exports=PE?String(PE):""});var BE=at((XJ,UE)=>{"use strict";var FE=oo(),Um=RE(),LE=FE.process,NE=FE.Deno,OE=LE&&LE.versions||NE&&NE.version,DE=OE&&OE.v8,Xs,up;DE&&(Xs=DE.split("."),up=Xs[0]>0&&Xs[0]<4?1:+(Xs[0]+Xs[1]));!up&&Um&&(Xs=Um.match(/Edge\\/(\\d+)/),(!Xs||Xs[1]>=74)&&(Xs=Um.match(/Chrome\\/(\\d+)/),Xs&&(up=+Xs[1])));UE.exports=up});var Bm=at((YJ,GE)=>{"use strict";var zE=BE(),nU=gi(),rU=oo(),iU=rU.String;GE.exports=!!Object.getOwnPropertySymbols&&!nU(function(){var n=Symbol("symbol detection");return!iU(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&zE&&zE<41})});var zm=at(($J,kE)=>{"use strict";var oU=Bm();kE.exports=oU&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Is=at((ZJ,HE)=>{"use strict";var sU=oo(),aU=ap(),qE=wa(),uU=Fm(),lU=Bm(),cU=zm(),oc=sU.Symbol,Gm=aU("wks"),fU=cU?oc.for||oc:oc&&oc.withoutSetter||uU;HE.exports=function(n){return qE(Gm,n)||(Gm[n]=lU&&qE(oc,n)?oc[n]:fU("Symbol."+n)),Gm[n]}});var Sa=at((JJ,VE)=>{"use strict";var hU=Ea(),pU=String,dU=TypeError;VE.exports=function(n){if(hU(n))return n;throw new dU(pU(n)+" is not an object")}});var Ys=at((KJ,WE)=>{"use strict";var gU=gi();WE.exports=!gU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var km=at((jJ,XE)=>{"use strict";var mU=Ys(),yU=gi();XE.exports=mU&&yU(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var qm=at((QJ,YE)=>{"use strict";var vU=Ys(),_U=gi(),xU=rp();YE.exports=!vU&&!_U(function(){return Object.defineProperty(xU("div"),"a",{get:function(){return 7}}).a!==7})});var Rs=at((tK,$E)=>{"use strict";var EU=Rf(),lp=Function.prototype.call;$E.exports=EU?lp.bind(lp):function(){return lp.apply(lp,arguments)}});var sc=at((eK,ZE)=>{"use strict";var Hm=oo(),wU=Di(),SU=function(n){return wU(n)?n:void 0};ZE.exports=function(n,t){return arguments.length<2?SU(Hm[n]):Hm[n]&&Hm[n][t]}});var KE=at((nK,JE)=>{"use strict";var MU=mi();JE.exports=MU({}.isPrototypeOf)});var Vm=at((rK,jE)=>{"use strict";var bU=sc(),AU=Di(),TU=KE(),CU=zm(),PU=Object;jE.exports=CU?function(n){return typeof n=="symbol"}:function(n){var t=bU("Symbol");return AU(t)&&TU(t.prototype,PU(n))}});var tw=at((iK,QE)=>{"use strict";var IU=String;QE.exports=function(n){try{return IU(n)}catch(t){return"Object"}}});var Nf=at((oK,ew)=>{"use strict";var RU=Di(),LU=tw(),NU=TypeError;ew.exports=function(n){if(RU(n))return n;throw new NU(LU(n)+" is not a function")}});var cp=at((sK,nw)=>{"use strict";var OU=Nf(),DU=ip();nw.exports=function(n,t){var e=n[t];return DU(e)?void 0:OU(e)}});var iw=at((aK,rw)=>{"use strict";var Wm=Rs(),Xm=Di(),Ym=Ea(),FU=TypeError;rw.exports=function(n,t){var e,o;if(t==="string"&&Xm(e=n.toString)&&!Ym(o=Wm(e,n))||Xm(e=n.valueOf)&&!Ym(o=Wm(e,n))||t!=="string"&&Xm(e=n.toString)&&!Ym(o=Wm(e,n)))return o;throw new FU("Can't convert object to primitive value")}});var uw=at((uK,aw)=>{"use strict";var UU=Rs(),ow=Ea(),sw=Vm(),BU=cp(),zU=iw(),GU=Is(),kU=TypeError,qU=GU("toPrimitive");aw.exports=function(n,t){if(!ow(n)||sw(n))return n;var e=BU(n,qU),o;if(e){if(t===void 0&&(t="default"),o=UU(e,n,t),!ow(o)||sw(o))return o;throw new kU("Can't convert object to primitive value")}return t===void 0&&(t="number"),zU(n,t)}});var $m=at((lK,lw)=>{"use strict";var HU=uw(),VU=Vm();lw.exports=function(n){var t=HU(n,"string");return VU(t)?t:t+""}});var Pu=at(fw=>{"use strict";var WU=Ys(),XU=qm(),YU=km(),fp=Sa(),cw=$m(),$U=TypeError,Zm=Object.defineProperty,ZU=Object.getOwnPropertyDescriptor,Jm="enumerable",Km="configurable",jm="writable";fw.f=WU?YU?function(t,e,o){if(fp(t),e=cw(e),fp(o),typeof t=="function"&&e==="prototype"&&"value"in o&&jm in o&&!o[jm]){var s=ZU(t,e);s&&s[jm]&&(t[e]=o.value,o={configurable:Km in o?o[Km]:s[Km],enumerable:Jm in o?o[Jm]:s[Jm],writable:!1})}return Zm(t,e,o)}:Zm:function(t,e,o){if(fp(t),e=cw(e),fp(o),XU)try{return Zm(t,e,o)}catch(s){}if("get"in o||"set"in o)throw new $U("Accessors not supported");return"value"in o&&(t[e]=o.value),t}});var pw=at((fK,hw)=>{"use strict";var JU=Math.ceil,KU=Math.floor;hw.exports=Math.trunc||function(t){var e=+t;return(e>0?KU:JU)(e)}});var ml=at((hK,dw)=>{"use strict";var jU=pw();dw.exports=function(n){var t=+n;return t!==t||t===0?0:jU(t)}});var mw=at((pK,gw)=>{"use strict";var QU=ml(),tB=Math.max,eB=Math.min;gw.exports=function(n,t){var e=QU(n);return e<0?tB(e+t,0):eB(e,t)}});var Qm=at((dK,yw)=>{"use strict";var nB=ml(),rB=Math.min;yw.exports=function(n){var t=nB(n);return t>0?rB(t,9007199254740991):0}});var Of=at((gK,vw)=>{"use strict";var iB=Qm();vw.exports=function(n){return iB(n.length)}});var Ew=at((mK,xw)=>{"use strict";var oB=rc(),sB=mw(),aB=Of(),_w=function(n){return function(t,e,o){var s=oB(t),c=aB(s);if(c===0)return!n&&-1;var h=sB(o,c),p;if(n&&e!==e){for(;c>h;)if(p=s[h++],p!==p)return!0}else for(;c>h;h++)if((n||h in s)&&s[h]===e)return n||h||0;return!n&&-1}};xw.exports={includes:_w(!0),indexOf:_w(!1)}});var hp=at((yK,ww)=>{"use strict";ww.exports={}});var e0=at((vK,Mw)=>{"use strict";var uB=mi(),t0=wa(),lB=rc(),cB=Ew().indexOf,fB=hp(),Sw=uB([].push);Mw.exports=function(n,t){var e=lB(n),o=0,s=[],c;for(c in e)!t0(fB,c)&&t0(e,c)&&Sw(s,c);for(;t.length>o;)t0(e,c=t[o++])&&(~cB(s,c)||Sw(s,c));return s}});var pp=at((_K,bw)=>{"use strict";bw.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Tw=at((xK,Aw)=>{"use strict";var hB=e0(),pB=pp();Aw.exports=Object.keys||function(t){return hB(t,pB)}});var Pw=at(Cw=>{"use strict";var dB=Ys(),gB=km(),mB=Pu(),yB=Sa(),vB=rc(),_B=Tw();Cw.f=dB&&!gB?Object.defineProperties:function(t,e){yB(t);for(var o=vB(e),s=_B(e),c=s.length,h=0,p;c>h;)mB.f(t,p=s[h++],o[p]);return t}});var Rw=at((wK,Iw)=>{"use strict";var xB=sc();Iw.exports=xB("document","documentElement")});var dp=at((SK,Nw)=>{"use strict";var EB=ap(),wB=Fm(),Lw=EB("keys");Nw.exports=function(n){return Lw[n]||(Lw[n]=wB(n))}});var Df=at((MK,Gw)=>{"use strict";var SB=Sa(),MB=Pw(),Ow=pp(),bB=hp(),AB=Rw(),TB=rp(),CB=dp(),Dw=">",Fw="<",r0="prototype",i0="script",Bw=CB("IE_PROTO"),n0=function(){},zw=function(n){return Fw+i0+Dw+n+Fw+"/"+i0+Dw},Uw=function(n){n.write(zw("")),n.close();var t=n.parentWindow.Object;return n=null,t},PB=function(){var n=TB("iframe"),t="java"+i0+":",e;return n.style.display="none",AB.appendChild(n),n.src=String(t),e=n.contentWindow.document,e.open(),e.write(zw("document.F=Object")),e.close(),e.F},gp,mp=function(){try{gp=new ActiveXObject("htmlfile")}catch(t){}mp=typeof document!="undefined"?document.domain&&gp?Uw(gp):PB():Uw(gp);for(var n=Ow.length;n--;)delete mp[r0][Ow[n]];return mp()};bB[Bw]=!0;Gw.exports=Object.create||function(t,e){var o;return t!==null?(n0[r0]=SB(t),o=new n0,n0[r0]=null,o[Bw]=t):o=mp(),e===void 0?o:MB.f(o,e)}});var a0=at((bK,kw)=>{"use strict";var IB=Is(),RB=Df(),LB=Pu().f,o0=IB("unscopables"),s0=Array.prototype;s0[o0]===void 0&&LB(s0,o0,{configurable:!0,value:RB(null)});kw.exports=function(n){s0[o0][n]=!0}});var yp=at((AK,qw)=>{"use strict";qw.exports={}});var Ww=at((TK,Vw)=>{"use strict";var NB=oo(),OB=Di(),Hw=NB.WeakMap;Vw.exports=OB(Hw)&&/native code/.test(String(Hw))});var vp=at((CK,Xw)=>{"use strict";Xw.exports=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}}});var ac=at((PK,Yw)=>{"use strict";var DB=Ys(),FB=Pu(),UB=vp();Yw.exports=DB?function(n,t,e){return FB.f(n,t,UB(1,e))}:function(n,t,e){return n[t]=e,n}});var Ep=at((IK,Jw)=>{"use strict";var BB=Ww(),Zw=oo(),zB=Ea(),GB=ac(),u0=wa(),l0=sp(),kB=dp(),qB=hp(),$w="Object already initialized",c0=Zw.TypeError,HB=Zw.WeakMap,_p,Ff,xp,VB=function(n){return xp(n)?Ff(n):_p(n,{})},WB=function(n){return function(t){var e;if(!zB(t)||(e=Ff(t)).type!==n)throw new c0("Incompatible receiver, "+n+" required");return e}};BB||l0.state?($s=l0.state||(l0.state=new HB),$s.get=$s.get,$s.has=$s.has,$s.set=$s.set,_p=function(n,t){if($s.has(n))throw new c0($w);return t.facade=n,$s.set(n,t),t},Ff=function(n){return $s.get(n)||{}},xp=function(n){return $s.has(n)}):(yl=kB("state"),qB[yl]=!0,_p=function(n,t){if(u0(n,yl))throw new c0($w);return t.facade=n,GB(n,yl,t),t},Ff=function(n){return u0(n,yl)?n[yl]:{}},xp=function(n){return u0(n,yl)});var $s,yl;Jw.exports={set:_p,get:Ff,has:xp,enforce:VB,getterFor:WB}});var tS=at(Qw=>{"use strict";var Kw={}.propertyIsEnumerable,jw=Object.getOwnPropertyDescriptor,XB=jw&&!Kw.call({1:2},1);Qw.f=XB?function(t){var e=jw(this,t);return!!e&&e.enumerable}:Kw});var f0=at(nS=>{"use strict";var YB=Ys(),$B=Rs(),ZB=tS(),JB=vp(),KB=rc(),jB=$m(),QB=wa(),tz=qm(),eS=Object.getOwnPropertyDescriptor;nS.f=YB?eS:function(t,e){if(t=KB(t),e=jB(e),tz)try{return eS(t,e)}catch(o){}if(QB(t,e))return JB(!$B(ZB.f,t,e),t[e])}});var d0=at((NK,iS)=>{"use strict";var h0=Ys(),ez=wa(),rS=Function.prototype,nz=h0&&Object.getOwnPropertyDescriptor,p0=ez(rS,"name"),rz=p0&&function(){}.name==="something",iz=p0&&(!h0||h0&&nz(rS,"name").configurable);iS.exports={EXISTS:p0,PROPER:rz,CONFIGURABLE:iz}});var m0=at((OK,oS)=>{"use strict";var oz=mi(),sz=Di(),g0=sp(),az=oz(Function.toString);sz(g0.inspectSource)||(g0.inspectSource=function(n){return az(n)});oS.exports=g0.inspectSource});var lS=at((DK,uS)=>{"use strict";var v0=mi(),uz=gi(),lz=Di(),wp=wa(),y0=Ys(),cz=d0().CONFIGURABLE,fz=m0(),aS=Ep(),hz=aS.enforce,pz=aS.get,sS=String,Sp=Object.defineProperty,dz=v0("".slice),gz=v0("".replace),mz=v0([].join),yz=y0&&!uz(function(){return Sp(function(){},"length",{value:8}).length!==8}),vz=String(String).split("String"),_z=uS.exports=function(n,t,e){dz(sS(t),0,7)==="Symbol("&&(t="["+gz(sS(t),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!wp(n,"name")||cz&&n.name!==t)&&(y0?Sp(n,"name",{value:t,configurable:!0}):n.name=t),yz&&e&&wp(e,"arity")&&n.length!==e.arity&&Sp(n,"length",{value:e.arity});try{e&&wp(e,"constructor")&&e.constructor?y0&&Sp(n,"prototype",{writable:!1}):n.prototype&&(n.prototype=void 0)}catch(s){}var o=hz(n);return wp(o,"source")||(o.source=mz(vz,typeof t=="string"?t:"")),n};Function.prototype.toString=_z(function(){return lz(this)&&pz(this).source||fz(this)},"toString")});var Uf=at((FK,cS)=>{"use strict";var xz=Di(),Ez=Pu(),wz=lS(),Sz=op();cS.exports=function(n,t,e,o){o||(o={});var s=o.enumerable,c=o.name!==void 0?o.name:t;if(xz(e)&&wz(e,c,o),o.global)s?n[t]=e:Sz(t,e);else{try{o.unsafe?n[t]&&(s=!0):delete n[t]}catch(h){}s?n[t]=e:Ez.f(n,t,{value:e,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return n}});var hS=at(fS=>{"use strict";var Mz=e0(),bz=pp(),Az=bz.concat("length","prototype");fS.f=Object.getOwnPropertyNames||function(t){return Mz(t,Az)}});var dS=at(pS=>{"use strict";pS.f=Object.getOwnPropertySymbols});var mS=at((zK,gS)=>{"use strict";var Tz=sc(),Cz=mi(),Pz=hS(),Iz=dS(),Rz=Sa(),Lz=Cz([].concat);gS.exports=Tz("Reflect","ownKeys")||function(t){var e=Pz.f(Rz(t)),o=Iz.f;return o?Lz(e,o(t)):e}});var _S=at((GK,vS)=>{"use strict";var yS=wa(),Nz=mS(),Oz=f0(),Dz=Pu();vS.exports=function(n,t,e){for(var o=Nz(t),s=Dz.f,c=Oz.f,h=0;h<o.length;h++){var p=o[h];!yS(n,p)&&!(e&&yS(e,p))&&s(n,p,c(t,p))}}});var ES=at((kK,xS)=>{"use strict";var Fz=gi(),Uz=Di(),Bz=/#|\\.prototype\\./,Bf=function(n,t){var e=Gz[zz(n)];return e===qz?!0:e===kz?!1:Uz(t)?Fz(t):!!t},zz=Bf.normalize=function(n){return String(n).replace(Bz,".").toLowerCase()},Gz=Bf.data={},kz=Bf.NATIVE="N",qz=Bf.POLYFILL="P";xS.exports=Bf});var Ls=at((qK,wS)=>{"use strict";var Mp=oo(),Hz=f0().f,Vz=ac(),Wz=Uf(),Xz=op(),Yz=_S(),$z=ES();wS.exports=function(n,t){var e=n.target,o=n.global,s=n.stat,c,h,p,g,m,_;if(o?h=Mp:s?h=Mp[e]||Xz(e,{}):h=Mp[e]&&Mp[e].prototype,h)for(p in t){if(m=t[p],n.dontCallGetSet?(_=Hz(h,p),g=_&&_.value):g=h[p],c=$z(o?p:e+(s?".":"#")+p,n.forced),!c&&g!==void 0){if(typeof m==typeof g)continue;Yz(m,g)}(n.sham||g&&g.sham)&&Vz(m,"sham",!0),Wz(h,p,m,n)}}});var MS=at((HK,SS)=>{"use strict";var Zz=gi();SS.exports=!Zz(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype})});var x0=at((VK,AS)=>{"use strict";var Jz=wa(),Kz=Di(),jz=ic(),Qz=dp(),tG=MS(),bS=Qz("IE_PROTO"),_0=Object,eG=_0.prototype;AS.exports=tG?_0.getPrototypeOf:function(n){var t=jz(n);if(Jz(t,bS))return t[bS];var e=t.constructor;return Kz(e)&&t instanceof e?e.prototype:t instanceof _0?eG:null}});var M0=at((WK,PS)=>{"use strict";var nG=gi(),rG=Di(),iG=Ea(),oG=Df(),TS=x0(),sG=Uf(),aG=Is(),uG=Lf(),S0=aG("iterator"),CS=!1,Qa,E0,w0;[].keys&&(w0=[].keys(),"next"in w0?(E0=TS(TS(w0)),E0!==Object.prototype&&(Qa=E0)):CS=!0);var lG=!iG(Qa)||nG(function(){var n={};return Qa[S0].call(n)!==n});lG?Qa={}:uG&&(Qa=oG(Qa));rG(Qa[S0])||sG(Qa,S0,function(){return this});PS.exports={IteratorPrototype:Qa,BUGGY_SAFARI_ITERATORS:CS}});var bp=at((XK,RS)=>{"use strict";var cG=Pu().f,fG=wa(),hG=Is(),IS=hG("toStringTag");RS.exports=function(n,t,e){n&&!e&&(n=n.prototype),n&&!fG(n,IS)&&cG(n,IS,{configurable:!0,value:t})}});var NS=at((YK,LS)=>{"use strict";var pG=M0().IteratorPrototype,dG=Df(),gG=vp(),mG=bp(),yG=yp(),vG=function(){return this};LS.exports=function(n,t,e,o){var s=t+" Iterator";return n.prototype=dG(pG,{next:gG(+!o,e)}),mG(n,s,!1,!0),yG[s]=vG,n}});var b0=at(($K,OS)=>{"use strict";var _G=mi(),xG=Nf();OS.exports=function(n,t,e){try{return _G(xG(Object.getOwnPropertyDescriptor(n,t)[e]))}catch(o){}}});var FS=at((ZK,DS)=>{"use strict";var EG=Ea();DS.exports=function(n){return EG(n)||n===null}});var BS=at((JK,US)=>{"use strict";var wG=FS(),SG=String,MG=TypeError;US.exports=function(n){if(wG(n))return n;throw new MG("Can't set "+SG(n)+" as a prototype")}});var GS=at((KK,zS)=>{"use strict";var bG=b0(),AG=Ea(),TG=nc(),CG=BS();zS.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var n=!1,t={},e;try{e=bG(Object.prototype,"__proto__","set"),e(t,[]),n=t instanceof Array}catch(o){}return function(s,c){return TG(s),CG(c),AG(s)&&(n?e(s,c):s.__proto__=c),s}}():void 0)});var KS=at((jK,JS)=>{"use strict";var PG=Ls(),IG=Rs(),Ap=Lf(),$S=d0(),RG=Di(),LG=NS(),kS=x0(),qS=GS(),NG=bp(),OG=ac(),A0=Uf(),DG=Is(),HS=yp(),ZS=M0(),FG=$S.PROPER,UG=$S.CONFIGURABLE,VS=ZS.IteratorPrototype,Tp=ZS.BUGGY_SAFARI_ITERATORS,zf=DG("iterator"),WS="keys",Gf="values",XS="entries",YS=function(){return this};JS.exports=function(n,t,e,o,s,c,h){LG(e,t,o);var p=function(E){if(E===s&&x)return x;if(!Tp&&E&&E in _)return _[E];switch(E){case WS:return function(){return new e(this,E)};case Gf:return function(){return new e(this,E)};case XS:return function(){return new e(this,E)}}return function(){return new e(this)}},g=t+" Iterator",m=!1,_=n.prototype,S=_[zf]||_["@@iterator"]||s&&_[s],x=!Tp&&S||p(s),b=t==="Array"&&_.entries||S,A,I,w;if(b&&(A=kS(b.call(new n)),A!==Object.prototype&&A.next&&(!Ap&&kS(A)!==VS&&(qS?qS(A,VS):RG(A[zf])||A0(A,zf,YS)),NG(A,g,!0,!0),Ap&&(HS[g]=YS))),FG&&s===Gf&&S&&S.name!==Gf&&(!Ap&&UG?OG(_,"name",Gf):(m=!0,x=function(){return IG(S,this)})),s)if(I={values:p(Gf),keys:c?x:p(WS),entries:p(XS)},h)for(w in I)(Tp||m||!(w in _))&&A0(_,w,I[w]);else PG({target:t,proto:!0,forced:Tp||m},I);return(!Ap||h)&&_[zf]!==x&&A0(_,zf,x,{name:s}),HS[t]=x,I}});var QS=at((QK,jS)=>{"use strict";jS.exports=function(n,t){return{value:n,done:t}}});var oM=at((tj,iM)=>{"use strict";var BG=rc(),T0=a0(),tM=yp(),nM=Ep(),zG=Pu().f,GG=KS(),Cp=QS(),kG=Lf(),qG=Ys(),rM="Array Iterator",HG=nM.set,VG=nM.getterFor(rM);iM.exports=GG(Array,"Array",function(n,t){HG(this,{type:rM,target:BG(n),index:0,kind:t})},function(){var n=VG(this),t=n.target,e=n.index++;if(!t||e>=t.length)return n.target=null,Cp(void 0,!0);switch(n.kind){case"keys":return Cp(e,!1);case"values":return Cp(t[e],!1)}return Cp([e,t[e]],!1)},"values");var eM=tM.Arguments=tM.Array;T0("keys");T0("values");T0("entries");if(!kG&&qG&&eM.name!=="values")try{zG(eM,"name",{value:"values"})}catch(n){}});var Ip=at(()=>{"use strict";var sM=oo(),uM=Kx(),WG=iE(),kf=oM(),aM=ac(),XG=bp(),YG=Is(),C0=YG("iterator"),P0=kf.values,lM=function(n,t){if(n){if(n[C0]!==P0)try{aM(n,C0,P0)}catch(o){n[C0]=P0}if(XG(n,t,!0),uM[t]){for(var e in kf)if(n[e]!==kf[e])try{aM(n,e,kf[e])}catch(o){n[e]=kf[e]}}}};for(Pp in uM)lM(sM[Pp]&&sM[Pp].prototype,Pp);var Pp;lM(WG,"DOMTokenList")});var hM=at((rj,fM)=>{"use strict";var $G=Is(),ZG=$G("toStringTag"),cM={};cM[ZG]="z";fM.exports=String(cM)==="[object z]"});var I0=at((ij,pM)=>{"use strict";var JG=hM(),KG=Di(),Rp=ec(),jG=Is(),QG=jG("toStringTag"),t4=Object,e4=Rp(function(){return arguments}())==="Arguments",n4=function(n,t){try{return n[t]}catch(e){}};pM.exports=JG?Rp:function(n){var t,e,o;return n===void 0?"Undefined":n===null?"Null":typeof(e=n4(t=t4(n),QG))=="string"?e:e4?Rp(t):(o=Rp(t))==="Object"&&KG(t.callee)?"Arguments":o}});var Lp=at((oj,dM)=>{"use strict";var r4=I0(),i4=String;dM.exports=function(n){if(r4(n)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return i4(n)}});var mM=at((sj,gM)=>{"use strict";var o4=Sa();gM.exports=function(){var n=o4(this),t="";return n.hasIndices&&(t+="d"),n.global&&(t+="g"),n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.dotAll&&(t+="s"),n.unicode&&(t+="u"),n.unicodeSets&&(t+="v"),n.sticky&&(t+="y"),t}});var vM=at((aj,yM)=>{"use strict";var R0=gi(),s4=oo(),L0=s4.RegExp,N0=R0(function(){var n=L0("a","y");return n.lastIndex=2,n.exec("abcd")!==null}),a4=N0||R0(function(){return!L0("a","y").sticky}),u4=N0||R0(function(){var n=L0("^r","gy");return n.lastIndex=2,n.exec("str")!==null});yM.exports={BROKEN_CARET:u4,MISSED_STICKY:a4,UNSUPPORTED_Y:N0}});var xM=at((uj,_M)=>{"use strict";var l4=gi(),c4=oo(),f4=c4.RegExp;_M.exports=l4(function(){var n=f4(".","s");return!(n.dotAll&&n.test(\`
|
|
114
|
+
`,document.body.appendChild(r.canvas)}setAngle(t){if(console.log("angle",t),r.textureMap.has(t))this._initIcon(r.textureMap.get(t));else{this.draw(t);let e=this.getTexture(this.getImageData());r.textureMap.set(t,e),this._initIcon(e),this._initScale({zoom:this.bmap.context.camera.zoom})}}_initIcon(t){if(this.spriteIcon)this.spriteIcon.material.map=t,t.needsUpdate=!0;else{let e=new le.Sprite(new le.SpriteMaterial({map:t,transparent:!0,alphaTest:.2,depthTest:this.options.depth_test,rotation:this.options.icon_rotate/180*Math.PI}));e.renderOrder=1e5+this.options.level,t.needsUpdate=!0,this.add(e),e.center.set(.5,.5),this.spriteIcon=e}}initSize(){this.spriteIcon&&this.spriteIcon.center.set(.5,.5)}draw(t){let{ctx:e}=r,{config:{size:n}}=this,i=n[0]/2,o=n[1]/2,s=4,a=1,u=s+a;if(e.clearRect(0,0,n[0],n[1]),e.setLineDash([10,10]),e.strokeStyle="#fff",e.lineWidth=2,e.beginPath(),e.arc(i,o,o-u,-Math.PI/2,Math.PI*2-Math.PI/2,t<Math.PI),e.stroke(),e.strokeStyle="#0A7AFF",t<Math.PI){let l=-Math.PI/2,c=l-t;e.beginPath(),e.arc(i,o,o-u,l,c,!0)}else{let l=-Math.PI/2,c=l+Math.PI*2-t;e.beginPath(),e.arc(i,o,o-u,l,c,!1)}e.stroke(),e.clearRect(i-u*2,0,u*4,u*4),e.beginPath(),e.arc(i,u,s,0,Math.PI*2),e.fillStyle="#0A7AFF",e.fill(),e.setLineDash([10,0]),e.strokeStyle="#fff",e.lineWidth=a,e.stroke(),e.clearRect(0,o-5,10,10),e.clearRect(i-5,n[1]-10,10,10),e.clearRect(n[0]-10,o-5,10,10),t>Math.PI/2&&t<Math.PI?e.fillStyle="#0A7AFF":e.fillStyle="#fff",e.fillRect(0,o-1,10,2),e.fillStyle="#fff",e.fillRect(i-1,n[1]-10,2,10),t>Math.PI&&t<Math.PI/2*3?e.fillStyle="#0A7AFF":e.fillStyle="#fff",e.fillRect(n[0]-10,o-1,10,2)}getImageData(){let{ctx:t}=r,{config:{size:e}}=this;return t.getImageData(0,0,e[0],e[1])}getTexture(t){let{config:{size:e}}=this,n=new le.DataTexture(Uint8Array.from(t.data),e[0],e[1],le.RGBAFormat);return n.format=le.RGBAFormat,n.magFilter=le.LinearFilter,n.minFilter=le.LinearFilter,n.colorSpace="srgb",n.flipY=!0,n}dispose(){var t;super.dispose(),(t=this.spriteIcon)==null||t.material.dispose()}static dispose(){this.textureMap.forEach(t=>{t.dispose()}),this.textureMap.clear(),this.ctx=null,this.canvas=null}constructor(t,e){super(t.context,{icon_size:e.size,collision_enable:!1,level:2}),this.bmap=t,this.config=e,r.canvas.width=e.size[0],r.canvas.height=e.size[1]}};sn.canvas=document.createElement("canvas");sn.ctx=sn.canvas.getContext("2d",{willReadFrequently:!0});sn.textureMap=new Map;var C9={path:{},cheapMaximumDistance:20,needStartPoi:!1,startPoi:{},positionNavigation:{},offsetY:150,directionEmitThreshold:5,disablePathAnimation:!1,speed:1,roadData:[],runAnimationMaxTime:1,navigationCameraBasic:45},jh=class extends Dt{get curFloorPathLength(){var t,e;return(e=(t=this.curFloorPath)==null?void 0:t.distance)!=null?e:0}get curFloorPathPoints(){var t,e;return(e=(t=this.curFloorPath)==null?void 0:t.points)!=null?e:[]}registryEvent(){this.bmap.context.addEventListener("update",this.onUpdate),this.bmap.addEventListener(Mt.SWITCH_FLOOR_AFTER,this.onSwitchFloor),this.positionNavigation.addEventListener("navigation-info",this.onNavigationInfo),this.bmap.context.addEventListener("control-change",this.onControlChangeForStartPoi)}setRoadData(t){this.options.roadData=t,this.positionNavigation.setRoadData(t)}showStartRotateHelperPoi(){var t;if(this.needStartRotateHelperPoi=!0,!this.startPoi||this.startRotateHelperPoi)return;let e=this.startPoi.options.icon_size;this.startRotateHelperPoi=new sn(this.bmap,{size:[e[0]+20,e[1]+20]}),this.startRotateHelperPoi.setAngle(0),this.startRotateHelperPoi.position.setZ(.51),(t=this.bmap.context.currentFloor)==null||t.poiLayer2.pushPoi(this.startRotateHelperPoi)}hideStartRotateHelperPoi(){if(this.needStartRotateHelperPoi=!1,this.startRotateHelperPoi){var t;(t=this.bmap.context.currentFloor)==null||t.poiLayer2.removePoi(this.startRotateHelperPoi),this.startRotateHelperPoi=null}}setStartPoiPosition(t,e){this.startPoi&&(this.startPoi.position.setX(t).setY(e),this.startRotateHelperPoi&&this.startRotateHelperPoi.position.setX(t).setY(e),this.detachLine&&this.detachLine.setPosition(this.startPoi.position,this.detachStartPoi.position))}toPositionByTask(t){var e;let i=(e=this.taskQueue.getTasks().find(s=>s.meta.type==="toPosition"))==null?void 0:e.tid,o={run:()=>this.toPositionBySpeed(t,this.options.speed),meta:{type:"toPosition"}};i?this.taskQueue.replace(i,o):this.taskQueue.add(o)}pauseAnimation(){this.taskQueue.clear(),this.positionNavigation.pause(),this.tweenUtil.pause()}continueAnimation(){this.tweenUtil.continue(),this.positionNavigation.continue()}clearTween(){this.tweenUtil.clear(),this.taskQueue.clear(),this.bmap.context.control.enabled=!0}unRegistryEvent(){this.bmap.context.removeEventListener("update",this.onUpdate),this.bmap.removeEventListener(Mt.SWITCH_FLOOR_AFTER,this.onSwitchFloor),this.positionNavigation.removeEventListener("navigation-info",this.onNavigationInfo),this.bmap.context.removeEventListener("control-change",this.onControlChangeForStartPoi)}clearPath(){if(this.path&&(this.bmap.context.scene.remove(this.path),this.path.dispose(),this.path=null,this.clearTween()),this.startPoi){var t;if((t=this.bmap.context.currentFloor)==null||t.poiLayer2.removePoi(this.startPoi),this.startPoi=null,this.startRotateHelperPoi){var e;(e=this.bmap.context.currentFloor)==null||e.poiLayer2.removePoi(this.startRotateHelperPoi),this.startRotateHelperPoi=null}}this.translatePath=null}setCurFloorPath(t){t===null?(this.curFloorPath=null,this.currentPathPosition=null,this.toPointPosition=null):(this.curFloorPath=t,this.currentPathPosition=t.points[0],this.toPointPosition=t.points[0]),this.movedDistance=0,this.clearTween()}setCurPathIndex(t){var e,n;this.curPathIndex=t,((e=this.paths[t])==null?void 0:e.floor)===((n=this.bmap.context.currentFloor)==null?void 0:n.name)?(this.setCurFloorPath(this.paths[t]),this.renderPath(this.translatePoints(this.curFloorPathPoints))):this.clearPath()}addPath(t,e){e===void 0&&(e=0);var n;this.paths=t,this.curPathIndex=e,this.clearTween();let i=(n=this.bmap.context.currentFloor)==null?void 0:n.name,o=t[e];if(i&&(o==null?void 0:o.floor)===i)if(this.setCurFloorPath(o),this.bmap.currentBuildGround)this.renderPath(this.translatePoints(o.points));else{let s=()=>{this.bmap.removeEventListener("center-change",s),this.renderPath(this.translatePoints(o.points))};this.bmap.addEventListener("center-change",s)}else this.clearPath();this.dispatchEvent({type:"add-path",paths:t})}translatePoints(t){let[e,n]=this.bmap.buildingCenter;return t.map(i=>[i[0]-e,i[1]-n])}renderPath(t){this.translatePath=t;let e=this.catmullRomCurve3(t);if(this.cPath=e,this.animationPathOptions={cPathIndex:0},this.pathStart=e[0],this.path?this.path.updatePoints(e):(this.path=new za(this,this.options.path),this.path.create(e),this.path.position.z=this.bmap.context.currentFloor.groundMaxHeight+.5,this.bmap.context.scene.add(this.path)),this.path.movePath(0),this.startPoi){var n;if((n=this.bmap.context.currentFloor)==null||n.poiLayer2.removePoi(this.startPoi),this.startPoi=null,this.startRotateHelperPoi){var i;(i=this.bmap.context.currentFloor)==null||i.poiLayer2.removePoi(this.startRotateHelperPoi),this.startRotateHelperPoi=null}}if(this.removeDetachStart(),this.showDetachStartState&&this.options.detachStartPoi){var o;this.detachStartPoi=new nt(this.bmap.context,T({},this.options.detachStartPoi,{id:"navigation_detach_start_poi",position:{x:e[0][0],y:e[0][1],z:.51},collision_enable:!1}))||null,(o=this.bmap.context.currentFloor)==null||o.poiLayer2.pushPoi(this.detachStartPoi),this.detachLine=new zr(this.bmap.context,new Xt.Vector3(e[0][0],e[0][1],.51),new Xt.Vector3(e[0][0],e[0][1],.51)),this.bmap.context.scene.add(this.detachLine)}if(this.options.needStartPoi){var s;this.startPoi=new nt(this.bmap.context,T({},this.options.startPoi,{id:"navigation_start_poi",position:{x:e[0][0],y:e[0][1],z:.51},collision_enable:!1}))||null,(s=this.bmap.context.currentFloor)==null||s.poiLayer2.pushPoi(this.startPoi),this.needStartRotateHelperPoi&&this.showStartRotateHelperPoi(),console.log(this.startRotateHelperPoi)}this.dispatchEvent({type:"render-path",path:this.path})}catmullRomCurve3(t){return Wi(t,!1,!0,.1,170,2.5)}getPathDirection(){if(!this.curFloorPath||!this.currentPathPosition||this.curFloorPathPoints.length<2)return null;let t=Ze(this.curFloorPathPoints,this.currentPathPosition),e=this.curFloorPathPoints[t],n=this.curFloorPathPoints[t+1],i=new Xt.Vector3(n[0]-e[0],n[1]-e[1],0).normalize(),o=new Xt.Vector3(0,1,0).normalize(),s=i.angleTo(o),a=new Xt.Vector3().crossVectors(o,i);return(Object.is(a.y,0)?-1:1)*s}getPathDirection2(){if(!this.curFloorPath||!this.toPointPosition||this.curFloorPathPoints.length<2)return null;let t=Ze(this.curFloorPathPoints,this.toPointPosition),e=this.curFloorPathPoints[t],n=this.curFloorPathPoints[t+1];return(new Xt.Vector2(n[0]-e[0],n[1]-e[1]).normalize().angle()*180/Math.PI-90+360)%360}changeCameraToPathUp(t){return j(this,null,function*(){t===void 0&&(t=100);let e=this.getPathDirection();if(e===null)return;let n=this.bmap.context.control.getAzimuthalAngle();Math.abs(n-e)>Math.PI&&(n>0?e=Math.PI*2+e:e=e-Math.PI*2);let i=Math.abs(e-this.bmap.context.control.getAzimuthalAngle());if(i<.01)return;let{control:o}=this.bmap.context,s=t/Math.PI*6*i;return Nt(new Promise(a=>{let u={azimuthal:o.getAzimuthalAngle()},l={azimuthal:e},c=o.getPolarAngle(),{maxPolarAngle:h,minPolarAngle:p}=o;o.maxPolarAngle=c,o.minPolarAngle=c;let m=new kr.Tween(u,this.tweenUtil.group).to(l,s).easing(kr.Easing.Quadratic.InOut).onUpdate(()=>j(this,null,function*(){this.startPoi&&o.target.copy(this.startPoi.position),o.setAzimuthalAngle(u.azimuthal,!0),o.setTargetByOffset(this.options.offsetY)})).onComplete(()=>{o.enabled=!0,this.tweenUtil.remove(m),o.maxPolarAngle=h,o.minPolarAngle=p,a(!0)}).onStart(()=>{o.enabled=!1}).start()}),s+500).finally(()=>{this.bmap.context.control.enabled=!0})})}initNavigationCamera(t){return j(this,null,function*(){t===void 0&&(t=1e3);var e;let i=(e=this.taskQueue.getTasks().find(s=>s.meta.type==="initNavigationCamera"))==null?void 0:e.tid,o={run:()=>Nt(j(this,null,function*(){yield this.initCameraZoom(t/2),yield this.changeCameraToPathUp(t/4),yield this.translateCameraToStartPoi(t/4)}),t+500).finally(()=>{this.bmap.context.control.enabled=!0}),meta:{type:"initNavigationCamera"}};i?this.taskQueue.replace(i,o):this.taskQueue.add(o)})}translateCameraToStartPoi(t){return j(this,null,function*(){if(t===void 0&&(t=100),!this.startPoi)return;let{clientSize:{width:e,height:n},camera:i,control:o}=this.bmap.context,s=Math.round(e/2),a=Math.round(n/2),u=o.target.clone(),l=I(this.startPoi.position,i,e,n),c=l.x-s,h=a-l.y+this.options.offsetY;if(!(Math.abs(c)<=1&&Math.abs(h)<=1)){if(Math.abs(c)>=1){let p=new Xt.Vector3;p.setFromMatrixColumn(i.matrix,0),p.normalize(),p.multiplyScalar(c/i.zoom),u.add(new Xt.Vector3(p.x,p.y,0))}if(Math.abs(h)>=1){let p=new Xt.Vector3;p.setFromMatrixColumn(i.matrix,1),p.normalize(),p.multiplyScalar(h/i.zoom),u.add(new Xt.Vector3(p.x,p.y,0))}return Nt(new Promise(p=>{let m=o.target.clone();console.log(m,u,t);let g=new kr.Tween(m,this.tweenUtil.group).to(u,t).onUpdate(()=>{this.bmap.context.control.setCameraPositionByTarget(m,0)}).onComplete(()=>{this.bmap.context.control.setCameraPositionByTarget(u,0),this.tweenUtil.remove(g),this.bmap.context.control.enabled=!0,p(!0)}).onStart(()=>{this.bmap.context.control.enabled=!1}).start()}),t+500).then(()=>{this.bmap.context.control.enabled=!0})}})}initCameraZoom(t){return j(this,null,function*(){if(t===void 0&&(t=100),!this.startPoi)return;let{clientSize:{width:e,height:n},currentFloor:i}=this.bmap.context,{max:o,min:s}=i.box,u=Math.min(e/(o.x-s.x),n/(o.y-s.y))*(o.x-s.x)/this.options.navigationCameraBasic;return this.bmap.context.setZoom(u,this.startPoi.position,t).finally(()=>{this.bmap.context.control.enabled=!0})})}toPosition(t,e){if(this.paths[this.curPathIndex]&&this.paths[this.curPathIndex].floor===t&&this.detachStartPoi){let n=this.translatePoints([e]);this.detachStartPoi.position.setX(n[0][0]),this.detachStartPoi.position.setY(n[0][1]),this.detachLine&&this.startPoi&&this.detachLine.setPosition(this.startPoi.position,this.detachStartPoi.position)}this.positionNavigation.toPosition(t,e)}startSimulation(){this.positionNavigation.startSimulation()}setSimulationSpeed(t){this.positionNavigation.changeSimulationSpeed(t)}toPositionBySpeed(t,e){return j(this,null,function*(){let{currentPathPosition:n,curFloorPath:i,curFloorPathPoints:o}=this;if(!i||!n)return null;let s=this.movedDistance,a=G0(o,t);if(s===-1||a===-1||a<=s)return null;let u=a-s;if(!u)return;let l=Math.min(u/e,this.options.runAnimationMaxTime);return this.pathTween&&this.clearTween(),Nt(new Promise(c=>{let h=this.pathTween=new kr.Tween({distance:0},this.tweenUtil.group).to({distance:u},l*1e3).onUpdate(p=>j(this,null,function*(){this.moveDistance(p.distance+s,h)})).onComplete(()=>{this.tweenUtil.remove(h),c(!0)}).start()}),l*1e3+500).finally(()=>{this.bmap.context.control.enabled=!0})})}moveDistance(t,e){return j(this,null,function*(){var n;this.movedDistance=t,(n=this.path)==null||n.movePath(this.movedDistance/this.curFloorPathLength);let i=kn(this.curFloorPathPoints,this.movedDistance);if(i===null)return;this.currentPathPosition=i;let o=this.translatePoints([i])[0];this.startPoi&&(this.setStartPoiPosition(o[0],o[1]),this.options.disablePathAnimation||this.bmap.context.control.setTargetByOffset(this.options.offsetY,this.startPoi.position.clone())),this.options.disablePathAnimation||(e==null||e.pause(),yield this.changeCameraToPathUp(500/this.options.speed),e==null||e.resume())})}removeDetachStart(){if(this.detachLine&&(this.bmap.context.scene.remove(this.detachLine),this.detachLine.dispose(),this.detachLine=null),this.detachStartPoi){var t;(t=this.bmap.context.currentFloor)==null||t.poiLayer2.removePoi(this.detachStartPoi),this.detachStartPoi=null}}hideDetachStart(){this.showDetachStartState=!1,this.removeDetachStart()}showDetachStart(){if(this.showDetachStartState=!0,this.path&&this.startPoi&&this.options.detachStartPoi){var t;let e=this.startPoi.position;this.detachStartPoi=new nt(this.bmap.context,T({},this.options.detachStartPoi,{id:"navigation_detach_start_poi",position:e,collision_enable:!1}))||null,(t=this.bmap.context.currentFloor)==null||t.poiLayer2.pushPoi(this.detachStartPoi),this.detachLine=new zr(this.bmap.context,new Xt.Vector3(e.x,e.y,.51),new Xt.Vector3(e.x,e.y,.51)),this.bmap.context.scene.add(this.detachLine)}}setStartPoiRotate(t){this.startPoiRotate=t;let n=(this.bmap.context.control.getAzimuthalAngle()*180/Math.PI+360)%360,i=(360-t-n)%360;this.detachStartPoi&&(this.detachStartPoi.options.icon_rotate=i),this.startPoi&&this.startRotateHelperPoi&&this.startRotateHelperPoi.setAngle(i)}dispose(){var t;if(this.path&&(this.bmap.context.scene.remove(this.path),this.path.dispose()),this.hideDetachStart(),this.startPoi){var e;(e=this.bmap.context.currentFloor)==null||e.poiLayer2.removePoi(this.startPoi),this.startPoi=null}this.tweenUtil.dispose(),this.unRegistryEvent(),(t=this.startRotateHelperPoi)==null||t.dispose(),sn.dispose(),this.positionNavigation.dispose(),this.startRotateHelperPoi=null,super.dispose()}constructor(t,e={},n){super(t),this.path=null,this.fetchRoadStatus=!1,this.paths=[],this.curPathIndex=0,this.curFloorPath=null,this.translatePath=null,this.currentPathPosition=null,this.toPointPosition=null,this.pathTween=null,this.startPoi=null,this.detachStartPoi=null,this.detachLine=null,this.startPoiRotate=0,this.startRotateHelperPoi=null,this.needStartRotateHelperPoi=!1,this.showDetachStartState=!0,this.movedDistance=0,this.pathStart=[0,0],this.tweenUtil=new qe,this.taskQueue=new Jn,this.animationPathOptions={cPathIndex:0},this.cPath=[],this.onNavigationInfo=i=>{let{info:o}=i;if(this.dispatchEvent({type:"navigation-info",info:o}),!o.offset){if(o.routeIndex!==this.curPathIndex)return;this.toPointPosition=o.pos,this.toPositionByTask(o.pos)}},this.onUpdate=()=>{this.tweenUtil.update()},this.onSwitchFloor=i=>{let{data:{curFloor:o}}=i;if(this.clearTween(),this.paths[this.curPathIndex]){let s=this.paths[this.curPathIndex];this.setCurFloorPath(s!=null?s:null),s?this.renderPath(this.translatePoints(s.points)):this.clearPath()}else this.clearPath()},this.onControlChangeForStartPoi=()=>{this.startPoi&&this.setStartPoiRotate(this.startPoiRotate)},!n&&typeof e=="object"&&(n=e),this.options=Object.assign({},C9,n),this.positionNavigation=new Na(this,T({simulationSpeed:this.options.speed},this.options.positionNavigation),this.options.roadData),this.registryEvent()}};var Z8=d(W(),1);var Vr=require("three"),Ah=class extends Dt{show(t){let e=0;t.forEach(o=>{o.poiLayer2.pois.forEach(s=>{let a=new Vr.Vector3().setFromMatrixPosition(s.matrixWorld).z;s.position.setZ(a+e),s.options.depth_test=!0,this.poiLayer.pushPoi(s)}),o.poiLayer2.pois.length=0,o.poiLayer2.dispose(),o.position.z=e,e+=o.userData.height});let{scene:n,currentFloor:i}=this.bmap.context;i&&(n.remove(i),i.dispose()),this.group.add(this.poiLayer,...t),n.add(this.group),this.floors=t,this.fitCamera(),this.bmap.context.cameraBound.updateBox(),this.showStatus=!0}hide(){let{scene:t}=this.bmap.context;t.remove(this.group),this.poiLayer.clear(),this.floors.forEach(e=>{e.dispose()}),this.floors=[],this.group.clear(),this.showStatus=!1}fitCamera(){let{context:t,config:e,type:n}=this.bmap;t.cameraBound.setEnable(!1),t.control.minZoom=0,t.control.maxZoom=1/0,t.camera.zoom=1,t.setAzimuthalAngle(e.control.defaultAzimuthal,0),t.setPolarAngle(e.control.defaultPolar,0),t.fitCameraToObject(this.group,e.defaultPadding,0);let i=t.camera.zoom;t.control.minZoom=i,t.control.maxZoom=i*25,n==="3d"&&t.fitCameraToObject(this.group,e.defaultPadding,0,!1),this.bmap.basicZoom=t.camera.zoom,t.control.addEventListener("change",this.bmap.onControlChange.bind(this.bmap)),this.bmap.onControlChange(),t.cameraBound.setEnable(!0)}dispose(){this.poiLayer.dispose(),this.floors.forEach(t=>t.dispose()),this.floors=[],super.dispose()}constructor(t){super(t),this.floors=[],this.group=new Vr.Group,this.showStatus=!1,this.group.name="mul-floor-group",this.poiLayer=new er(t.context),this.poiLayer.changeParkingSpaceVisibleByZoom=()=>{let e=new Vr.Box3().setFromObject(this.group),{clientSize:{width:n,height:i}}=this.bmap.context,{max:o,min:s}=e,u=Math.min(n/(o.x-s.x),i/(o.y-s.y))*(o.x-s.x)/45;this.poiLayer.pois.filter(l=>l.userData.type==="parkingSpace").map(l=>{let c=this.bmap.context.camera.zoom>=u;l.visible=c,c||l.parentSetVisible(c)})}}};var fT=require("three");function Th(){let r=new Blob([`var xF=Object.create;var $x=Object.defineProperty;var EF=Object.getOwnPropertyDescriptor;var wF=Object.getOwnPropertyNames;var SF=Object.getPrototypeOf,MF=Object.prototype.hasOwnProperty;var at=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var bF=(n,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of wF(t))!MF.call(n,s)&&s!==e&&$x(n,s,{get:()=>t[s],enumerable:!(o=EF(t,s))||o.enumerable});return n};var Ze=(n,t,e)=>(e=n!=null?xF(SF(n)):{},bF(t||!n||!n.__esModule?$x(e,"default",{value:n,enumerable:!0}):e,n));var np=(n,t,e)=>new Promise((o,s)=>{var c=g=>{try{p(e.next(g))}catch(m){s(m)}},h=g=>{try{p(e.throw(g))}catch(m){s(m)}},p=g=>g.done?o(g.value):Promise.resolve(g.value).then(c,h);p((e=e.apply(n,t)).next())});var oo=at((Im,Zx)=>{"use strict";var If=function(n){return n&&n.Math===Math&&n};Zx.exports=If(typeof globalThis=="object"&&globalThis)||If(typeof window=="object"&&window)||If(typeof self=="object"&&self)||If(typeof global=="object"&&global)||If(typeof Im=="object"&&Im)||function(){return this}()||Function("return this")()});var Kx=at((bJ,Jx)=>{"use strict";Jx.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var Di=at((AJ,jx)=>{"use strict";var Rm=typeof document=="object"&&document.all;jx.exports=typeof Rm=="undefined"&&Rm!==void 0?function(n){return typeof n=="function"||n===Rm}:function(n){return typeof n=="function"}});var Ea=at((TJ,Qx)=>{"use strict";var AF=Di();Qx.exports=function(n){return typeof n=="object"?n!==null:AF(n)}});var rp=at((CJ,eE)=>{"use strict";var TF=oo(),tE=Ea(),Lm=TF.document,CF=tE(Lm)&&tE(Lm.createElement);eE.exports=function(n){return CF?Lm.createElement(n):{}}});var iE=at((PJ,rE)=>{"use strict";var PF=rp(),Nm=PF("span").classList,nE=Nm&&Nm.constructor&&Nm.constructor.prototype;rE.exports=nE===Object.prototype?void 0:nE});var gi=at((IJ,oE)=>{"use strict";oE.exports=function(n){try{return!!n()}catch(t){return!0}}});var Rf=at((RJ,sE)=>{"use strict";var IF=gi();sE.exports=!IF(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")})});var mi=at((LJ,lE)=>{"use strict";var aE=Rf(),uE=Function.prototype,Om=uE.call,RF=aE&&uE.bind.bind(Om,Om);lE.exports=aE?RF:function(n){return function(){return Om.apply(n,arguments)}}});var ec=at((NJ,fE)=>{"use strict";var cE=mi(),LF=cE({}.toString),NF=cE("".slice);fE.exports=function(n){return NF(LF(n),8,-1)}});var pE=at((OJ,hE)=>{"use strict";var OF=mi(),DF=gi(),FF=ec(),Dm=Object,UF=OF("".split);hE.exports=DF(function(){return!Dm("z").propertyIsEnumerable(0)})?function(n){return FF(n)==="String"?UF(n,""):Dm(n)}:Dm});var ip=at((DJ,dE)=>{"use strict";dE.exports=function(n){return n==null}});var nc=at((FJ,gE)=>{"use strict";var BF=ip(),zF=TypeError;gE.exports=function(n){if(BF(n))throw new zF("Can't call method on "+n);return n}});var rc=at((UJ,mE)=>{"use strict";var GF=pE(),kF=nc();mE.exports=function(n){return GF(kF(n))}});var Lf=at((BJ,yE)=>{"use strict";yE.exports=!1});var op=at((zJ,_E)=>{"use strict";var vE=oo(),qF=Object.defineProperty;_E.exports=function(n,t){try{qF(vE,n,{value:t,configurable:!0,writable:!0})}catch(e){vE[n]=t}return t}});var sp=at((GJ,wE)=>{"use strict";var HF=Lf(),VF=oo(),WF=op(),xE="__core-js_shared__",EE=wE.exports=VF[xE]||WF(xE,{});(EE.versions||(EE.versions=[])).push({version:"3.39.0",mode:HF?"pure":"global",copyright:"\\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var ap=at((kJ,ME)=>{"use strict";var SE=sp();ME.exports=function(n,t){return SE[n]||(SE[n]=t||{})}});var ic=at((qJ,bE)=>{"use strict";var XF=nc(),YF=Object;bE.exports=function(n){return YF(XF(n))}});var wa=at((HJ,AE)=>{"use strict";var $F=mi(),ZF=ic(),JF=$F({}.hasOwnProperty);AE.exports=Object.hasOwn||function(t,e){return JF(ZF(t),e)}});var Fm=at((VJ,TE)=>{"use strict";var KF=mi(),jF=0,QF=Math.random(),tU=KF(1 .toString);TE.exports=function(n){return"Symbol("+(n===void 0?"":n)+")_"+tU(++jF+QF,36)}});var RE=at((WJ,IE)=>{"use strict";var eU=oo(),CE=eU.navigator,PE=CE&&CE.userAgent;IE.exports=PE?String(PE):""});var BE=at((XJ,UE)=>{"use strict";var FE=oo(),Um=RE(),LE=FE.process,NE=FE.Deno,OE=LE&&LE.versions||NE&&NE.version,DE=OE&&OE.v8,Xs,up;DE&&(Xs=DE.split("."),up=Xs[0]>0&&Xs[0]<4?1:+(Xs[0]+Xs[1]));!up&&Um&&(Xs=Um.match(/Edge\\/(\\d+)/),(!Xs||Xs[1]>=74)&&(Xs=Um.match(/Chrome\\/(\\d+)/),Xs&&(up=+Xs[1])));UE.exports=up});var Bm=at((YJ,GE)=>{"use strict";var zE=BE(),nU=gi(),rU=oo(),iU=rU.String;GE.exports=!!Object.getOwnPropertySymbols&&!nU(function(){var n=Symbol("symbol detection");return!iU(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&zE&&zE<41})});var zm=at(($J,kE)=>{"use strict";var oU=Bm();kE.exports=oU&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Is=at((ZJ,HE)=>{"use strict";var sU=oo(),aU=ap(),qE=wa(),uU=Fm(),lU=Bm(),cU=zm(),oc=sU.Symbol,Gm=aU("wks"),fU=cU?oc.for||oc:oc&&oc.withoutSetter||uU;HE.exports=function(n){return qE(Gm,n)||(Gm[n]=lU&&qE(oc,n)?oc[n]:fU("Symbol."+n)),Gm[n]}});var Sa=at((JJ,VE)=>{"use strict";var hU=Ea(),pU=String,dU=TypeError;VE.exports=function(n){if(hU(n))return n;throw new dU(pU(n)+" is not an object")}});var Ys=at((KJ,WE)=>{"use strict";var gU=gi();WE.exports=!gU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var km=at((jJ,XE)=>{"use strict";var mU=Ys(),yU=gi();XE.exports=mU&&yU(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var qm=at((QJ,YE)=>{"use strict";var vU=Ys(),_U=gi(),xU=rp();YE.exports=!vU&&!_U(function(){return Object.defineProperty(xU("div"),"a",{get:function(){return 7}}).a!==7})});var Rs=at((tK,$E)=>{"use strict";var EU=Rf(),lp=Function.prototype.call;$E.exports=EU?lp.bind(lp):function(){return lp.apply(lp,arguments)}});var sc=at((eK,ZE)=>{"use strict";var Hm=oo(),wU=Di(),SU=function(n){return wU(n)?n:void 0};ZE.exports=function(n,t){return arguments.length<2?SU(Hm[n]):Hm[n]&&Hm[n][t]}});var KE=at((nK,JE)=>{"use strict";var MU=mi();JE.exports=MU({}.isPrototypeOf)});var Vm=at((rK,jE)=>{"use strict";var bU=sc(),AU=Di(),TU=KE(),CU=zm(),PU=Object;jE.exports=CU?function(n){return typeof n=="symbol"}:function(n){var t=bU("Symbol");return AU(t)&&TU(t.prototype,PU(n))}});var tw=at((iK,QE)=>{"use strict";var IU=String;QE.exports=function(n){try{return IU(n)}catch(t){return"Object"}}});var Nf=at((oK,ew)=>{"use strict";var RU=Di(),LU=tw(),NU=TypeError;ew.exports=function(n){if(RU(n))return n;throw new NU(LU(n)+" is not a function")}});var cp=at((sK,nw)=>{"use strict";var OU=Nf(),DU=ip();nw.exports=function(n,t){var e=n[t];return DU(e)?void 0:OU(e)}});var iw=at((aK,rw)=>{"use strict";var Wm=Rs(),Xm=Di(),Ym=Ea(),FU=TypeError;rw.exports=function(n,t){var e,o;if(t==="string"&&Xm(e=n.toString)&&!Ym(o=Wm(e,n))||Xm(e=n.valueOf)&&!Ym(o=Wm(e,n))||t!=="string"&&Xm(e=n.toString)&&!Ym(o=Wm(e,n)))return o;throw new FU("Can't convert object to primitive value")}});var uw=at((uK,aw)=>{"use strict";var UU=Rs(),ow=Ea(),sw=Vm(),BU=cp(),zU=iw(),GU=Is(),kU=TypeError,qU=GU("toPrimitive");aw.exports=function(n,t){if(!ow(n)||sw(n))return n;var e=BU(n,qU),o;if(e){if(t===void 0&&(t="default"),o=UU(e,n,t),!ow(o)||sw(o))return o;throw new kU("Can't convert object to primitive value")}return t===void 0&&(t="number"),zU(n,t)}});var $m=at((lK,lw)=>{"use strict";var HU=uw(),VU=Vm();lw.exports=function(n){var t=HU(n,"string");return VU(t)?t:t+""}});var Pu=at(fw=>{"use strict";var WU=Ys(),XU=qm(),YU=km(),fp=Sa(),cw=$m(),$U=TypeError,Zm=Object.defineProperty,ZU=Object.getOwnPropertyDescriptor,Jm="enumerable",Km="configurable",jm="writable";fw.f=WU?YU?function(t,e,o){if(fp(t),e=cw(e),fp(o),typeof t=="function"&&e==="prototype"&&"value"in o&&jm in o&&!o[jm]){var s=ZU(t,e);s&&s[jm]&&(t[e]=o.value,o={configurable:Km in o?o[Km]:s[Km],enumerable:Jm in o?o[Jm]:s[Jm],writable:!1})}return Zm(t,e,o)}:Zm:function(t,e,o){if(fp(t),e=cw(e),fp(o),XU)try{return Zm(t,e,o)}catch(s){}if("get"in o||"set"in o)throw new $U("Accessors not supported");return"value"in o&&(t[e]=o.value),t}});var pw=at((fK,hw)=>{"use strict";var JU=Math.ceil,KU=Math.floor;hw.exports=Math.trunc||function(t){var e=+t;return(e>0?KU:JU)(e)}});var ml=at((hK,dw)=>{"use strict";var jU=pw();dw.exports=function(n){var t=+n;return t!==t||t===0?0:jU(t)}});var mw=at((pK,gw)=>{"use strict";var QU=ml(),tB=Math.max,eB=Math.min;gw.exports=function(n,t){var e=QU(n);return e<0?tB(e+t,0):eB(e,t)}});var Qm=at((dK,yw)=>{"use strict";var nB=ml(),rB=Math.min;yw.exports=function(n){var t=nB(n);return t>0?rB(t,9007199254740991):0}});var Of=at((gK,vw)=>{"use strict";var iB=Qm();vw.exports=function(n){return iB(n.length)}});var Ew=at((mK,xw)=>{"use strict";var oB=rc(),sB=mw(),aB=Of(),_w=function(n){return function(t,e,o){var s=oB(t),c=aB(s);if(c===0)return!n&&-1;var h=sB(o,c),p;if(n&&e!==e){for(;c>h;)if(p=s[h++],p!==p)return!0}else for(;c>h;h++)if((n||h in s)&&s[h]===e)return n||h||0;return!n&&-1}};xw.exports={includes:_w(!0),indexOf:_w(!1)}});var hp=at((yK,ww)=>{"use strict";ww.exports={}});var e0=at((vK,Mw)=>{"use strict";var uB=mi(),t0=wa(),lB=rc(),cB=Ew().indexOf,fB=hp(),Sw=uB([].push);Mw.exports=function(n,t){var e=lB(n),o=0,s=[],c;for(c in e)!t0(fB,c)&&t0(e,c)&&Sw(s,c);for(;t.length>o;)t0(e,c=t[o++])&&(~cB(s,c)||Sw(s,c));return s}});var pp=at((_K,bw)=>{"use strict";bw.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Tw=at((xK,Aw)=>{"use strict";var hB=e0(),pB=pp();Aw.exports=Object.keys||function(t){return hB(t,pB)}});var Pw=at(Cw=>{"use strict";var dB=Ys(),gB=km(),mB=Pu(),yB=Sa(),vB=rc(),_B=Tw();Cw.f=dB&&!gB?Object.defineProperties:function(t,e){yB(t);for(var o=vB(e),s=_B(e),c=s.length,h=0,p;c>h;)mB.f(t,p=s[h++],o[p]);return t}});var Rw=at((wK,Iw)=>{"use strict";var xB=sc();Iw.exports=xB("document","documentElement")});var dp=at((SK,Nw)=>{"use strict";var EB=ap(),wB=Fm(),Lw=EB("keys");Nw.exports=function(n){return Lw[n]||(Lw[n]=wB(n))}});var Df=at((MK,Gw)=>{"use strict";var SB=Sa(),MB=Pw(),Ow=pp(),bB=hp(),AB=Rw(),TB=rp(),CB=dp(),Dw=">",Fw="<",r0="prototype",i0="script",Bw=CB("IE_PROTO"),n0=function(){},zw=function(n){return Fw+i0+Dw+n+Fw+"/"+i0+Dw},Uw=function(n){n.write(zw("")),n.close();var t=n.parentWindow.Object;return n=null,t},PB=function(){var n=TB("iframe"),t="java"+i0+":",e;return n.style.display="none",AB.appendChild(n),n.src=String(t),e=n.contentWindow.document,e.open(),e.write(zw("document.F=Object")),e.close(),e.F},gp,mp=function(){try{gp=new ActiveXObject("htmlfile")}catch(t){}mp=typeof document!="undefined"?document.domain&&gp?Uw(gp):PB():Uw(gp);for(var n=Ow.length;n--;)delete mp[r0][Ow[n]];return mp()};bB[Bw]=!0;Gw.exports=Object.create||function(t,e){var o;return t!==null?(n0[r0]=SB(t),o=new n0,n0[r0]=null,o[Bw]=t):o=mp(),e===void 0?o:MB.f(o,e)}});var a0=at((bK,kw)=>{"use strict";var IB=Is(),RB=Df(),LB=Pu().f,o0=IB("unscopables"),s0=Array.prototype;s0[o0]===void 0&&LB(s0,o0,{configurable:!0,value:RB(null)});kw.exports=function(n){s0[o0][n]=!0}});var yp=at((AK,qw)=>{"use strict";qw.exports={}});var Ww=at((TK,Vw)=>{"use strict";var NB=oo(),OB=Di(),Hw=NB.WeakMap;Vw.exports=OB(Hw)&&/native code/.test(String(Hw))});var vp=at((CK,Xw)=>{"use strict";Xw.exports=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}}});var ac=at((PK,Yw)=>{"use strict";var DB=Ys(),FB=Pu(),UB=vp();Yw.exports=DB?function(n,t,e){return FB.f(n,t,UB(1,e))}:function(n,t,e){return n[t]=e,n}});var Ep=at((IK,Jw)=>{"use strict";var BB=Ww(),Zw=oo(),zB=Ea(),GB=ac(),u0=wa(),l0=sp(),kB=dp(),qB=hp(),$w="Object already initialized",c0=Zw.TypeError,HB=Zw.WeakMap,_p,Ff,xp,VB=function(n){return xp(n)?Ff(n):_p(n,{})},WB=function(n){return function(t){var e;if(!zB(t)||(e=Ff(t)).type!==n)throw new c0("Incompatible receiver, "+n+" required");return e}};BB||l0.state?($s=l0.state||(l0.state=new HB),$s.get=$s.get,$s.has=$s.has,$s.set=$s.set,_p=function(n,t){if($s.has(n))throw new c0($w);return t.facade=n,$s.set(n,t),t},Ff=function(n){return $s.get(n)||{}},xp=function(n){return $s.has(n)}):(yl=kB("state"),qB[yl]=!0,_p=function(n,t){if(u0(n,yl))throw new c0($w);return t.facade=n,GB(n,yl,t),t},Ff=function(n){return u0(n,yl)?n[yl]:{}},xp=function(n){return u0(n,yl)});var $s,yl;Jw.exports={set:_p,get:Ff,has:xp,enforce:VB,getterFor:WB}});var tS=at(Qw=>{"use strict";var Kw={}.propertyIsEnumerable,jw=Object.getOwnPropertyDescriptor,XB=jw&&!Kw.call({1:2},1);Qw.f=XB?function(t){var e=jw(this,t);return!!e&&e.enumerable}:Kw});var f0=at(nS=>{"use strict";var YB=Ys(),$B=Rs(),ZB=tS(),JB=vp(),KB=rc(),jB=$m(),QB=wa(),tz=qm(),eS=Object.getOwnPropertyDescriptor;nS.f=YB?eS:function(t,e){if(t=KB(t),e=jB(e),tz)try{return eS(t,e)}catch(o){}if(QB(t,e))return JB(!$B(ZB.f,t,e),t[e])}});var d0=at((NK,iS)=>{"use strict";var h0=Ys(),ez=wa(),rS=Function.prototype,nz=h0&&Object.getOwnPropertyDescriptor,p0=ez(rS,"name"),rz=p0&&function(){}.name==="something",iz=p0&&(!h0||h0&&nz(rS,"name").configurable);iS.exports={EXISTS:p0,PROPER:rz,CONFIGURABLE:iz}});var m0=at((OK,oS)=>{"use strict";var oz=mi(),sz=Di(),g0=sp(),az=oz(Function.toString);sz(g0.inspectSource)||(g0.inspectSource=function(n){return az(n)});oS.exports=g0.inspectSource});var lS=at((DK,uS)=>{"use strict";var v0=mi(),uz=gi(),lz=Di(),wp=wa(),y0=Ys(),cz=d0().CONFIGURABLE,fz=m0(),aS=Ep(),hz=aS.enforce,pz=aS.get,sS=String,Sp=Object.defineProperty,dz=v0("".slice),gz=v0("".replace),mz=v0([].join),yz=y0&&!uz(function(){return Sp(function(){},"length",{value:8}).length!==8}),vz=String(String).split("String"),_z=uS.exports=function(n,t,e){dz(sS(t),0,7)==="Symbol("&&(t="["+gz(sS(t),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!wp(n,"name")||cz&&n.name!==t)&&(y0?Sp(n,"name",{value:t,configurable:!0}):n.name=t),yz&&e&&wp(e,"arity")&&n.length!==e.arity&&Sp(n,"length",{value:e.arity});try{e&&wp(e,"constructor")&&e.constructor?y0&&Sp(n,"prototype",{writable:!1}):n.prototype&&(n.prototype=void 0)}catch(s){}var o=hz(n);return wp(o,"source")||(o.source=mz(vz,typeof t=="string"?t:"")),n};Function.prototype.toString=_z(function(){return lz(this)&&pz(this).source||fz(this)},"toString")});var Uf=at((FK,cS)=>{"use strict";var xz=Di(),Ez=Pu(),wz=lS(),Sz=op();cS.exports=function(n,t,e,o){o||(o={});var s=o.enumerable,c=o.name!==void 0?o.name:t;if(xz(e)&&wz(e,c,o),o.global)s?n[t]=e:Sz(t,e);else{try{o.unsafe?n[t]&&(s=!0):delete n[t]}catch(h){}s?n[t]=e:Ez.f(n,t,{value:e,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return n}});var hS=at(fS=>{"use strict";var Mz=e0(),bz=pp(),Az=bz.concat("length","prototype");fS.f=Object.getOwnPropertyNames||function(t){return Mz(t,Az)}});var dS=at(pS=>{"use strict";pS.f=Object.getOwnPropertySymbols});var mS=at((zK,gS)=>{"use strict";var Tz=sc(),Cz=mi(),Pz=hS(),Iz=dS(),Rz=Sa(),Lz=Cz([].concat);gS.exports=Tz("Reflect","ownKeys")||function(t){var e=Pz.f(Rz(t)),o=Iz.f;return o?Lz(e,o(t)):e}});var _S=at((GK,vS)=>{"use strict";var yS=wa(),Nz=mS(),Oz=f0(),Dz=Pu();vS.exports=function(n,t,e){for(var o=Nz(t),s=Dz.f,c=Oz.f,h=0;h<o.length;h++){var p=o[h];!yS(n,p)&&!(e&&yS(e,p))&&s(n,p,c(t,p))}}});var ES=at((kK,xS)=>{"use strict";var Fz=gi(),Uz=Di(),Bz=/#|\\.prototype\\./,Bf=function(n,t){var e=Gz[zz(n)];return e===qz?!0:e===kz?!1:Uz(t)?Fz(t):!!t},zz=Bf.normalize=function(n){return String(n).replace(Bz,".").toLowerCase()},Gz=Bf.data={},kz=Bf.NATIVE="N",qz=Bf.POLYFILL="P";xS.exports=Bf});var Ls=at((qK,wS)=>{"use strict";var Mp=oo(),Hz=f0().f,Vz=ac(),Wz=Uf(),Xz=op(),Yz=_S(),$z=ES();wS.exports=function(n,t){var e=n.target,o=n.global,s=n.stat,c,h,p,g,m,_;if(o?h=Mp:s?h=Mp[e]||Xz(e,{}):h=Mp[e]&&Mp[e].prototype,h)for(p in t){if(m=t[p],n.dontCallGetSet?(_=Hz(h,p),g=_&&_.value):g=h[p],c=$z(o?p:e+(s?".":"#")+p,n.forced),!c&&g!==void 0){if(typeof m==typeof g)continue;Yz(m,g)}(n.sham||g&&g.sham)&&Vz(m,"sham",!0),Wz(h,p,m,n)}}});var MS=at((HK,SS)=>{"use strict";var Zz=gi();SS.exports=!Zz(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype})});var x0=at((VK,AS)=>{"use strict";var Jz=wa(),Kz=Di(),jz=ic(),Qz=dp(),tG=MS(),bS=Qz("IE_PROTO"),_0=Object,eG=_0.prototype;AS.exports=tG?_0.getPrototypeOf:function(n){var t=jz(n);if(Jz(t,bS))return t[bS];var e=t.constructor;return Kz(e)&&t instanceof e?e.prototype:t instanceof _0?eG:null}});var M0=at((WK,PS)=>{"use strict";var nG=gi(),rG=Di(),iG=Ea(),oG=Df(),TS=x0(),sG=Uf(),aG=Is(),uG=Lf(),S0=aG("iterator"),CS=!1,Qa,E0,w0;[].keys&&(w0=[].keys(),"next"in w0?(E0=TS(TS(w0)),E0!==Object.prototype&&(Qa=E0)):CS=!0);var lG=!iG(Qa)||nG(function(){var n={};return Qa[S0].call(n)!==n});lG?Qa={}:uG&&(Qa=oG(Qa));rG(Qa[S0])||sG(Qa,S0,function(){return this});PS.exports={IteratorPrototype:Qa,BUGGY_SAFARI_ITERATORS:CS}});var bp=at((XK,RS)=>{"use strict";var cG=Pu().f,fG=wa(),hG=Is(),IS=hG("toStringTag");RS.exports=function(n,t,e){n&&!e&&(n=n.prototype),n&&!fG(n,IS)&&cG(n,IS,{configurable:!0,value:t})}});var NS=at((YK,LS)=>{"use strict";var pG=M0().IteratorPrototype,dG=Df(),gG=vp(),mG=bp(),yG=yp(),vG=function(){return this};LS.exports=function(n,t,e,o){var s=t+" Iterator";return n.prototype=dG(pG,{next:gG(+!o,e)}),mG(n,s,!1,!0),yG[s]=vG,n}});var b0=at(($K,OS)=>{"use strict";var _G=mi(),xG=Nf();OS.exports=function(n,t,e){try{return _G(xG(Object.getOwnPropertyDescriptor(n,t)[e]))}catch(o){}}});var FS=at((ZK,DS)=>{"use strict";var EG=Ea();DS.exports=function(n){return EG(n)||n===null}});var BS=at((JK,US)=>{"use strict";var wG=FS(),SG=String,MG=TypeError;US.exports=function(n){if(wG(n))return n;throw new MG("Can't set "+SG(n)+" as a prototype")}});var GS=at((KK,zS)=>{"use strict";var bG=b0(),AG=Ea(),TG=nc(),CG=BS();zS.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var n=!1,t={},e;try{e=bG(Object.prototype,"__proto__","set"),e(t,[]),n=t instanceof Array}catch(o){}return function(s,c){return TG(s),CG(c),AG(s)&&(n?e(s,c):s.__proto__=c),s}}():void 0)});var KS=at((jK,JS)=>{"use strict";var PG=Ls(),IG=Rs(),Ap=Lf(),$S=d0(),RG=Di(),LG=NS(),kS=x0(),qS=GS(),NG=bp(),OG=ac(),A0=Uf(),DG=Is(),HS=yp(),ZS=M0(),FG=$S.PROPER,UG=$S.CONFIGURABLE,VS=ZS.IteratorPrototype,Tp=ZS.BUGGY_SAFARI_ITERATORS,zf=DG("iterator"),WS="keys",Gf="values",XS="entries",YS=function(){return this};JS.exports=function(n,t,e,o,s,c,h){LG(e,t,o);var p=function(E){if(E===s&&x)return x;if(!Tp&&E&&E in _)return _[E];switch(E){case WS:return function(){return new e(this,E)};case Gf:return function(){return new e(this,E)};case XS:return function(){return new e(this,E)}}return function(){return new e(this)}},g=t+" Iterator",m=!1,_=n.prototype,S=_[zf]||_["@@iterator"]||s&&_[s],x=!Tp&&S||p(s),b=t==="Array"&&_.entries||S,A,I,w;if(b&&(A=kS(b.call(new n)),A!==Object.prototype&&A.next&&(!Ap&&kS(A)!==VS&&(qS?qS(A,VS):RG(A[zf])||A0(A,zf,YS)),NG(A,g,!0,!0),Ap&&(HS[g]=YS))),FG&&s===Gf&&S&&S.name!==Gf&&(!Ap&&UG?OG(_,"name",Gf):(m=!0,x=function(){return IG(S,this)})),s)if(I={values:p(Gf),keys:c?x:p(WS),entries:p(XS)},h)for(w in I)(Tp||m||!(w in _))&&A0(_,w,I[w]);else PG({target:t,proto:!0,forced:Tp||m},I);return(!Ap||h)&&_[zf]!==x&&A0(_,zf,x,{name:s}),HS[t]=x,I}});var QS=at((QK,jS)=>{"use strict";jS.exports=function(n,t){return{value:n,done:t}}});var oM=at((tj,iM)=>{"use strict";var BG=rc(),T0=a0(),tM=yp(),nM=Ep(),zG=Pu().f,GG=KS(),Cp=QS(),kG=Lf(),qG=Ys(),rM="Array Iterator",HG=nM.set,VG=nM.getterFor(rM);iM.exports=GG(Array,"Array",function(n,t){HG(this,{type:rM,target:BG(n),index:0,kind:t})},function(){var n=VG(this),t=n.target,e=n.index++;if(!t||e>=t.length)return n.target=null,Cp(void 0,!0);switch(n.kind){case"keys":return Cp(e,!1);case"values":return Cp(t[e],!1)}return Cp([e,t[e]],!1)},"values");var eM=tM.Arguments=tM.Array;T0("keys");T0("values");T0("entries");if(!kG&&qG&&eM.name!=="values")try{zG(eM,"name",{value:"values"})}catch(n){}});var Ip=at(()=>{"use strict";var sM=oo(),uM=Kx(),WG=iE(),kf=oM(),aM=ac(),XG=bp(),YG=Is(),C0=YG("iterator"),P0=kf.values,lM=function(n,t){if(n){if(n[C0]!==P0)try{aM(n,C0,P0)}catch(o){n[C0]=P0}if(XG(n,t,!0),uM[t]){for(var e in kf)if(n[e]!==kf[e])try{aM(n,e,kf[e])}catch(o){n[e]=kf[e]}}}};for(Pp in uM)lM(sM[Pp]&&sM[Pp].prototype,Pp);var Pp;lM(WG,"DOMTokenList")});var hM=at((rj,fM)=>{"use strict";var $G=Is(),ZG=$G("toStringTag"),cM={};cM[ZG]="z";fM.exports=String(cM)==="[object z]"});var I0=at((ij,pM)=>{"use strict";var JG=hM(),KG=Di(),Rp=ec(),jG=Is(),QG=jG("toStringTag"),t4=Object,e4=Rp(function(){return arguments}())==="Arguments",n4=function(n,t){try{return n[t]}catch(e){}};pM.exports=JG?Rp:function(n){var t,e,o;return n===void 0?"Undefined":n===null?"Null":typeof(e=n4(t=t4(n),QG))=="string"?e:e4?Rp(t):(o=Rp(t))==="Object"&&KG(t.callee)?"Arguments":o}});var Lp=at((oj,dM)=>{"use strict";var r4=I0(),i4=String;dM.exports=function(n){if(r4(n)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return i4(n)}});var mM=at((sj,gM)=>{"use strict";var o4=Sa();gM.exports=function(){var n=o4(this),t="";return n.hasIndices&&(t+="d"),n.global&&(t+="g"),n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.dotAll&&(t+="s"),n.unicode&&(t+="u"),n.unicodeSets&&(t+="v"),n.sticky&&(t+="y"),t}});var vM=at((aj,yM)=>{"use strict";var R0=gi(),s4=oo(),L0=s4.RegExp,N0=R0(function(){var n=L0("a","y");return n.lastIndex=2,n.exec("abcd")!==null}),a4=N0||R0(function(){return!L0("a","y").sticky}),u4=N0||R0(function(){var n=L0("^r","gy");return n.lastIndex=2,n.exec("str")!==null});yM.exports={BROKEN_CARET:u4,MISSED_STICKY:a4,UNSUPPORTED_Y:N0}});var xM=at((uj,_M)=>{"use strict";var l4=gi(),c4=oo(),f4=c4.RegExp;_M.exports=l4(function(){var n=f4(".","s");return!(n.dotAll&&n.test(\`
|
|
115
115
|
\`)&&n.flags==="s")})});var wM=at((lj,EM)=>{"use strict";var h4=gi(),p4=oo(),d4=p4.RegExp;EM.exports=h4(function(){var n=d4("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"})});var Dp=at((cj,MM)=>{"use strict";var uc=Rs(),Op=mi(),g4=Lp(),m4=mM(),y4=vM(),v4=ap(),_4=Df(),x4=Ep().get,E4=xM(),w4=wM(),S4=v4("native-string-replace",String.prototype.replace),Np=RegExp.prototype.exec,D0=Np,M4=Op("".charAt),b4=Op("".indexOf),A4=Op("".replace),O0=Op("".slice),F0=function(){var n=/a/,t=/b*/g;return uc(Np,n,"a"),uc(Np,t,"a"),n.lastIndex!==0||t.lastIndex!==0}(),SM=y4.BROKEN_CARET,U0=/()??/.exec("")[1]!==void 0,T4=F0||U0||SM||E4||w4;T4&&(D0=function(t){var e=this,o=x4(e),s=g4(t),c=o.raw,h,p,g,m,_,S,x;if(c)return c.lastIndex=e.lastIndex,h=uc(D0,c,s),e.lastIndex=c.lastIndex,h;var b=o.groups,A=SM&&e.sticky,I=uc(m4,e),w=e.source,E=0,R=s;if(A&&(I=A4(I,"y",""),b4(I,"g")===-1&&(I+="g"),R=O0(s,e.lastIndex),e.lastIndex>0&&(!e.multiline||e.multiline&&M4(s,e.lastIndex-1)!==\`
|
|
116
116
|
\`)&&(w="(?: "+w+")",R=" "+R,E++),p=new RegExp("^(?:"+w+")",I)),U0&&(p=new RegExp("^"+w+"$(?!\\\\s)",I)),F0&&(g=e.lastIndex),m=uc(Np,A?p:e,R),A?m?(m.input=O0(m.input,E),m[0]=O0(m[0],E),m.index=e.lastIndex,e.lastIndex+=m[0].length):e.lastIndex=0:F0&&m&&(e.lastIndex=e.global?m.index+m[0].length:g),U0&&m&&m.length>1&&uc(S4,m[0],p,function(){for(_=1;_<arguments.length-2;_++)arguments[_]===void 0&&(m[_]=void 0)}),m&&b)for(m.groups=S=_4(null),_=0;_<b.length;_++)x=b[_],S[x[0]]=m[x[1]];return m});MM.exports=D0});var Fp=at(()=>{"use strict";var C4=Ls(),bM=Dp();C4({target:"RegExp",proto:!0,forced:/./.exec!==bM},{exec:bM})});var Up=at((pj,AM)=>{"use strict";var P4=ec();AM.exports=Array.isArray||function(t){return P4(t)==="Array"}});var CM=at((dj,TM)=>{"use strict";var I4=Ys(),R4=Up(),L4=TypeError,N4=Object.getOwnPropertyDescriptor,O4=I4&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(n){return n instanceof TypeError}}();TM.exports=O4?function(n,t){if(R4(n)&&!N4(n,"length").writable)throw new L4("Cannot set read only .length");return n.length=t}:function(n,t){return n.length=t}});var B0=at((gj,PM)=>{"use strict";var D4=TypeError,F4=9007199254740991;PM.exports=function(n){if(n>F4)throw D4("Maximum allowed index exceeded");return n}});var z0=at(()=>{"use strict";var U4=Ls(),B4=ic(),z4=Of(),G4=CM(),k4=B0(),q4=gi(),H4=q4(function(){return[].push.call({length:4294967296},1)!==4294967297}),V4=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(n){return n instanceof TypeError}},W4=H4||!V4();U4({target:"Array",proto:!0,arity:1,forced:W4},{push:function(t){var e=B4(this),o=z4(e),s=arguments.length;k4(o+s);for(var c=0;c<s;c++)e[o]=arguments[c],o++;return G4(e,o),o}})});var Zs=at((vj,IM)=>{"use strict";var G0=mi(),Bp=Set.prototype;IM.exports={Set,add:G0(Bp.add),has:G0(Bp.has),remove:G0(Bp.delete),proto:Bp}});var Iu=at((_j,RM)=>{"use strict";var X4=Zs().has;RM.exports=function(n){return X4(n),n}});var Ru=at((xj,LM)=>{"use strict";var Y4=Rs();LM.exports=function(n,t,e){for(var o=e?n:n.iterator,s=n.next,c,h;!(c=Y4(s,o)).done;)if(h=t(c.value),h!==void 0)return h}});var lc=at((Ej,UM)=>{"use strict";var NM=mi(),$4=Ru(),OM=Zs(),Z4=OM.Set,DM=OM.proto,J4=NM(DM.forEach),FM=NM(DM.keys),K4=FM(new Z4).next;UM.exports=function(n,t,e){return e?$4({iterator:FM(n),next:K4},t):J4(n,t)}});var zp=at((wj,zM)=>{"use strict";var BM=Zs(),j4=lc(),Q4=BM.Set,tk=BM.add;zM.exports=function(n){var t=new Q4;return j4(n,function(e){tk(t,e)}),t}});var cc=at((Sj,GM)=>{"use strict";var ek=b0(),nk=Zs();GM.exports=ek(nk.proto,"size","get")||function(n){return n.size}});var qM=at((Mj,kM)=>{"use strict";kM.exports=function(n){return{iterator:n,next:n.next,done:!1}}});var Lu=at((bj,$M)=>{"use strict";var HM=Nf(),XM=Sa(),VM=Rs(),rk=ml(),ik=qM(),WM="Invalid size",ok=RangeError,sk=TypeError,ak=Math.max,YM=function(n,t){this.set=n,this.size=ak(t,0),this.has=HM(n.has),this.keys=HM(n.keys)};YM.prototype={getIterator:function(){return ik(XM(VM(this.keys,this.set)))},includes:function(n){return VM(this.has,this.set,n)}};$M.exports=function(n){XM(n);var t=+n.size;if(t!==t)throw new sk(WM);var e=rk(t);if(e<0)throw new ok(WM);return new YM(n,e)}});var jM=at((Aj,KM)=>{"use strict";var uk=Iu(),JM=Zs(),lk=zp(),ck=cc(),fk=Lu(),hk=lc(),pk=Ru(),dk=JM.has,ZM=JM.remove;KM.exports=function(t){var e=uk(this),o=fk(t),s=lk(e);return ck(e)<=o.size?hk(e,function(c){o.includes(c)&&ZM(s,c)}):pk(o.getIterator(),function(c){dk(e,c)&&ZM(s,c)}),s}});var Nu=at((Tj,tb)=>{"use strict";var gk=sc(),QM=function(n){return{size:n,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};tb.exports=function(n){var t=gk("Set");try{new t()[n](QM(0));try{return new t()[n](QM(-1)),!1}catch(e){return!0}}catch(e){return!1}}});var eb=at(()=>{"use strict";var mk=Ls(),yk=jM(),vk=Nu();mk({target:"Set",proto:!0,real:!0,forced:!vk("difference")},{difference:yk})});var ib=at((Ij,rb)=>{"use strict";var _k=Iu(),k0=Zs(),xk=cc(),Ek=Lu(),wk=lc(),Sk=Ru(),Mk=k0.Set,nb=k0.add,bk=k0.has;rb.exports=function(t){var e=_k(this),o=Ek(t),s=new Mk;return xk(e)>o.size?Sk(o.getIterator(),function(c){bk(e,c)&&nb(s,c)}):wk(e,function(c){o.includes(c)&&nb(s,c)}),s}});var ob=at(()=>{"use strict";var Ak=Ls(),Tk=gi(),Ck=ib(),Pk=Nu(),Ik=!Pk("intersection")||Tk(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});Ak({target:"Set",proto:!0,real:!0,forced:Ik},{intersection:Ck})});var q0=at((Nj,ab)=>{"use strict";var Rk=Rs(),sb=Sa(),Lk=cp();ab.exports=function(n,t,e){var o,s;sb(n);try{if(o=Lk(n,"return"),!o){if(t==="throw")throw e;return e}o=Rk(o,n)}catch(c){s=!0,o=c}if(t==="throw")throw e;if(s)throw o;return sb(o),e}});var lb=at((Oj,ub)=>{"use strict";var Nk=Iu(),Ok=Zs().has,Dk=cc(),Fk=Lu(),Uk=lc(),Bk=Ru(),zk=q0();ub.exports=function(t){var e=Nk(this),o=Fk(t);if(Dk(e)<=o.size)return Uk(e,function(c){if(o.includes(c))return!1},!0)!==!1;var s=o.getIterator();return Bk(s,function(c){if(Ok(e,c))return zk(s,"normal",!1)})!==!1}});var cb=at(()=>{"use strict";var Gk=Ls(),kk=lb(),qk=Nu();Gk({target:"Set",proto:!0,real:!0,forced:!qk("isDisjointFrom")},{isDisjointFrom:kk})});var hb=at((Uj,fb)=>{"use strict";var Hk=Iu(),Vk=cc(),Wk=lc(),Xk=Lu();fb.exports=function(t){var e=Hk(this),o=Xk(t);return Vk(e)>o.size?!1:Wk(e,function(s){if(!o.includes(s))return!1},!0)!==!1}});var pb=at(()=>{"use strict";var Yk=Ls(),$k=hb(),Zk=Nu();Yk({target:"Set",proto:!0,real:!0,forced:!Zk("isSubsetOf")},{isSubsetOf:$k})});var gb=at((Gj,db)=>{"use strict";var Jk=Iu(),Kk=Zs().has,jk=cc(),Qk=Lu(),tq=Ru(),eq=q0();db.exports=function(t){var e=Jk(this),o=Qk(t);if(jk(e)<o.size)return!1;var s=o.getIterator();return tq(s,function(c){if(!Kk(e,c))return eq(s,"normal",!1)})!==!1}});var mb=at(()=>{"use strict";var nq=Ls(),rq=gb(),iq=Nu();nq({target:"Set",proto:!0,real:!0,forced:!iq("isSupersetOf")},{isSupersetOf:rq})});var vb=at((Hj,yb)=>{"use strict";var oq=Iu(),H0=Zs(),sq=zp(),aq=Lu(),uq=Ru(),lq=H0.add,cq=H0.has,fq=H0.remove;yb.exports=function(t){var e=oq(this),o=aq(t).getIterator(),s=sq(e);return uq(o,function(c){cq(e,c)?fq(s,c):lq(s,c)}),s}});var _b=at(()=>{"use strict";var hq=Ls(),pq=vb(),dq=Nu();hq({target:"Set",proto:!0,real:!0,forced:!dq("symmetricDifference")},{symmetricDifference:pq})});var Eb=at((Xj,xb)=>{"use strict";var gq=Iu(),mq=Zs().add,yq=zp(),vq=Lu(),_q=Ru();xb.exports=function(t){var e=gq(this),o=vq(t).getIterator(),s=yq(e);return _q(o,function(c){mq(s,c)}),s}});var wb=at(()=>{"use strict";var xq=Ls(),Eq=Eb(),wq=Nu();xq({target:"Set",proto:!0,real:!0,forced:!wq("union")},{union:Eq})});var Mb=at((Zj,Sb)=>{"use strict";var Sq=ec(),Mq=mi();Sb.exports=function(n){if(Sq(n)==="Function")return Mq(n)}});var Tb=at((Jj,Ab)=>{"use strict";var bb=Mb(),bq=Nf(),Aq=Rf(),Tq=bb(bb.bind);Ab.exports=function(n,t){return bq(n),t===void 0?n:Aq?Tq(n,t):function(){return n.apply(t,arguments)}}});var Ib=at((Kj,Pb)=>{"use strict";var Cq=Up(),Pq=Of(),Iq=B0(),Rq=Tb(),Cb=function(n,t,e,o,s,c,h,p){for(var g=s,m=0,_=h?Rq(h,p):!1,S,x;m<o;)m in e&&(S=_?_(e[m],m,t):e[m],c>0&&Cq(S)?(x=Pq(S),g=Cb(n,t,S,x,g,c-1)-1):(Iq(g+1),n[g]=S),g++),m++;return g};Pb.exports=Cb});var Fb=at((jj,Db)=>{"use strict";var Lq=mi(),Nq=gi(),Rb=Di(),Oq=I0(),Dq=sc(),Fq=m0(),Lb=function(){},Nb=Dq("Reflect","construct"),V0=/^\\s*(?:class|function)\\b/,Uq=Lq(V0.exec),Bq=!V0.test(Lb),qf=function(t){if(!Rb(t))return!1;try{return Nb(Lb,[],t),!0}catch(e){return!1}},Ob=function(t){if(!Rb(t))return!1;switch(Oq(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Bq||!!Uq(V0,Fq(t))}catch(e){return!0}};Ob.sham=!0;Db.exports=!Nb||Nq(function(){var n;return qf(qf.call)||!qf(Object)||!qf(function(){n=!0})||n})?Ob:qf});var Gb=at((Qj,zb)=>{"use strict";var Ub=Up(),zq=Fb(),Gq=Ea(),kq=Is(),qq=kq("species"),Bb=Array;zb.exports=function(n){var t;return Ub(n)&&(t=n.constructor,zq(t)&&(t===Bb||Ub(t.prototype))?t=void 0:Gq(t)&&(t=t[qq],t===null&&(t=void 0))),t===void 0?Bb:t}});var qb=at((tQ,kb)=>{"use strict";var Hq=Gb();kb.exports=function(n,t){return new(Hq(n))(t===0?0:t)}});var Hb=at(()=>{"use strict";var Vq=Ls(),Wq=Ib(),Xq=ic(),Yq=Of(),$q=ml(),Zq=qb();Vq({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=Xq(this),o=Yq(e),s=Zq(e,0);return s.length=Wq(s,e,e,o,0,t===void 0?1:$q(t)),s}})});var Vb=at(()=>{"use strict";var Jq=a0();Jq("flat")});var Xb=at((oQ,Wb)=>{var W0=class{constructor(){this.keys=new Set,this.queue=[]}sort(){this.queue.sort((t,e)=>t.priority-e.priority)}set(t,e){let o=Number(e);if(isNaN(o))throw new TypeError('"priority" must be a number');return this.keys.has(t)?this.queue.map(s=>(s.key===t&&Object.assign(s,{priority:o}),s)):(this.keys.add(t),this.queue.push({key:t,priority:o})),this.sort(),this.queue.length}next(){let t=this.queue.shift();return this.keys.delete(t.key),t}isEmpty(){return this.queue.length===0}has(t){return this.keys.has(t)}get(t){return this.queue.find(e=>e.key===t)}};Wb.exports=W0});var Zb=at((sQ,$b)=>{function Yb(n,t){let e=new Map;for(let[o,s]of n)o!==t&&s instanceof Map?e.set(o,Yb(s,t)):o!==t&&e.set(o,s);return e}$b.exports=Yb});var jb=at((aQ,Kb)=>{function Kq(n){let t=Number(n);return!(isNaN(t)||t<=0)}function Jb(n){let t=new Map;return Object.keys(n).forEach(o=>{let s=n[o];if(s!==null&&typeof s=="object"&&!Array.isArray(s))return t.set(o,Jb(s));if(!Kq(s))throw new Error(\`Could not add node at key "\${o}", make sure it's a valid node\`,s);return t.set(o,Number(s))}),t}Kb.exports=Jb});var eA=at((uQ,tA)=>{function Qb(n){if(!(n instanceof Map))throw new Error(\`Invalid graph: Expected Map instead found \${typeof n}\`);n.forEach((t,e)=>{if(typeof t=="object"&&t instanceof Map){Qb(t);return}if(typeof t!="number"||t<=0)throw new Error(\`Values must be numbers greater than 0. Found value \${t} at \${e}\`)})}tA.exports=Qb});var oA=at((lQ,iA)=>{var jq=Xb(),Qq=Zb(),nA=jb(),rA=eA(),X0=class{constructor(t){t instanceof Map?(rA(t),this.graph=t):t?this.graph=nA(t):this.graph=new Map}addNode(t,e){let o;return e instanceof Map?(rA(e),o=e):o=nA(e),this.graph.set(t,o),this}addVertex(t,e){return this.addNode(t,e)}removeNode(t){return this.graph=Qq(this.graph,t),this}path(t,e,o={}){if(!this.graph.size)return o.cost?{path:null,cost:0}:null;let s=new Set,c=new jq,h=new Map,p=[],g=0,m=[];if(o.avoid&&(m=[].concat(o.avoid)),m.includes(t))throw new Error(\`Starting node (\${t}) cannot be avoided\`);if(m.includes(e))throw new Error(\`Ending node (\${e}) cannot be avoided\`);for(c.set(t,0);!c.isEmpty();){let _=c.next();if(_.key===e){g=_.priority;let x=_.key;for(;h.has(x);)p.push(x),x=h.get(x);break}s.add(_.key),(this.graph.get(_.key)||new Map).forEach((x,b)=>{if(s.has(b)||m.includes(b))return null;if(!c.has(b))return h.set(b,_.key),c.set(b,_.priority+x);let A=c.get(b).priority,I=_.priority+x;return I<A?(h.set(b,_.key),c.set(b,I)):null})}return p.length?(o.trim?p.shift():p=p.concat([t]),o.reverse||(p=p.reverse()),o.cost?{path:p,cost:g}:p):o.cost?{path:null,cost:0}:null}shortestPath(...t){return this.path(...t)}};iA.exports=X0});var Ld=at((EQ,jT)=>{"use strict";var KT=Object.getOwnPropertySymbols,h9=Object.prototype.hasOwnProperty,p9=Object.prototype.propertyIsEnumerable;function d9(n){if(n==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}function g9(){try{if(!Object.assign)return!1;var n=new String("abc");if(n[5]="de",Object.getOwnPropertyNames(n)[0]==="5")return!1;for(var t={},e=0;e<10;e++)t["_"+String.fromCharCode(e)]=e;var o=Object.getOwnPropertyNames(t).map(function(c){return t[c]});if(o.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(c){s[c]=c}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch(c){return!1}}jT.exports=g9()?Object.assign:function(n,t){for(var e,o=d9(n),s,c=1;c<arguments.length;c++){e=Object(arguments[c]);for(var h in e)h9.call(e,h)&&(o[h]=e[h]);if(KT){s=KT(e);for(var p=0;p<s.length;p++)p9.call(e,s[p])&&(o[s[p]]=e[s[p]])}}return o}});var Ev=at((_v,xv)=>{(function(n,t){typeof _v=="object"&&typeof xv!="undefined"?xv.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self).RBush=t()})(_v,function(){"use strict";function n(w,E,R,C,F){(function W(X,q,D,xt,B){for(;xt>D;){if(xt-D>600){var j=xt-D+1,J=q-D+1,Dt=Math.log(j),Q=.5*Math.exp(2*Dt/3),At=.5*Math.sqrt(Dt*Q*(j-Q)/j)*(J-j/2<0?-1:1),Mt=Math.max(D,Math.floor(q-J*Q/j+At)),Rt=Math.min(xt,Math.floor(q+(j-J)*Q/j+At));W(X,q,Mt,Rt,B)}var pt=X[q],yt=D,K=xt;for(t(X,D,q),B(X[xt],pt)>0&&t(X,D,xt);yt<K;){for(t(X,yt,K),yt++,K--;B(X[yt],pt)<0;)yt++;for(;B(X[K],pt)>0;)K--}B(X[D],pt)===0?t(X,D,K):t(X,++K,xt),K<=q&&(D=K+1),q<=K&&(xt=K-1)}})(w,E,R||0,C||w.length-1,F||e)}function t(w,E,R){var C=w[E];w[E]=w[R],w[R]=C}function e(w,E){return w<E?-1:w>E?1:0}var o=function(w){w===void 0&&(w=9),this._maxEntries=Math.max(4,w),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(w,E,R){if(!R)return E.indexOf(w);for(var C=0;C<E.length;C++)if(R(w,E[C]))return C;return-1}function c(w,E){h(w,0,w.children.length,E,w)}function h(w,E,R,C,F){F||(F=A(null)),F.minX=1/0,F.minY=1/0,F.maxX=-1/0,F.maxY=-1/0;for(var W=E;W<R;W++){var X=w.children[W];p(F,w.leaf?C(X):X)}return F}function p(w,E){return w.minX=Math.min(w.minX,E.minX),w.minY=Math.min(w.minY,E.minY),w.maxX=Math.max(w.maxX,E.maxX),w.maxY=Math.max(w.maxY,E.maxY),w}function g(w,E){return w.minX-E.minX}function m(w,E){return w.minY-E.minY}function _(w){return(w.maxX-w.minX)*(w.maxY-w.minY)}function S(w){return w.maxX-w.minX+(w.maxY-w.minY)}function x(w,E){return w.minX<=E.minX&&w.minY<=E.minY&&E.maxX<=w.maxX&&E.maxY<=w.maxY}function b(w,E){return E.minX<=w.maxX&&E.minY<=w.maxY&&E.maxX>=w.minX&&E.maxY>=w.minY}function A(w){return{children:w,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function I(w,E,R,C,F){for(var W=[E,R];W.length;)if(!((R=W.pop())-(E=W.pop())<=C)){var X=E+Math.ceil((R-E)/C/2)*C;n(w,X,E,R,F),W.push(E,X,X,R)}}return o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(w){var E=this.data,R=[];if(!b(w,E))return R;for(var C=this.toBBox,F=[];E;){for(var W=0;W<E.children.length;W++){var X=E.children[W],q=E.leaf?C(X):X;b(w,q)&&(E.leaf?R.push(X):x(w,q)?this._all(X,R):F.push(X))}E=F.pop()}return R},o.prototype.collides=function(w){var E=this.data;if(!b(w,E))return!1;for(var R=[];E;){for(var C=0;C<E.children.length;C++){var F=E.children[C],W=E.leaf?this.toBBox(F):F;if(b(w,W)){if(E.leaf||x(w,W))return!0;R.push(F)}}E=R.pop()}return!1},o.prototype.load=function(w){if(!w||!w.length)return this;if(w.length<this._minEntries){for(var E=0;E<w.length;E++)this.insert(w[E]);return this}var R=this._build(w.slice(),0,w.length-1,0);if(this.data.children.length)if(this.data.height===R.height)this._splitRoot(this.data,R);else{if(this.data.height<R.height){var C=this.data;this.data=R,R=C}this._insert(R,this.data.height-R.height-1,!0)}else this.data=R;return this},o.prototype.insert=function(w){return w&&this._insert(w,this.data.height-1),this},o.prototype.clear=function(){return this.data=A([]),this},o.prototype.remove=function(w,E){if(!w)return this;for(var R,C,F,W=this.data,X=this.toBBox(w),q=[],D=[];W||q.length;){if(W||(W=q.pop(),C=q[q.length-1],R=D.pop(),F=!0),W.leaf){var xt=s(w,W.children,E);if(xt!==-1)return W.children.splice(xt,1),q.push(W),this._condense(q),this}F||W.leaf||!x(W,X)?C?(R++,W=C.children[R],F=!1):W=null:(q.push(W),D.push(R),R=0,C=W,W=W.children[0])}return this},o.prototype.toBBox=function(w){return w},o.prototype.compareMinX=function(w,E){return w.minX-E.minX},o.prototype.compareMinY=function(w,E){return w.minY-E.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(w){return this.data=w,this},o.prototype._all=function(w,E){for(var R=[];w;)w.leaf?E.push.apply(E,w.children):R.push.apply(R,w.children),w=R.pop();return E},o.prototype._build=function(w,E,R,C){var F,W=R-E+1,X=this._maxEntries;if(W<=X)return c(F=A(w.slice(E,R+1)),this.toBBox),F;C||(C=Math.ceil(Math.log(W)/Math.log(X)),X=Math.ceil(W/Math.pow(X,C-1))),(F=A([])).leaf=!1,F.height=C;var q=Math.ceil(W/X),D=q*Math.ceil(Math.sqrt(X));I(w,E,R,D,this.compareMinX);for(var xt=E;xt<=R;xt+=D){var B=Math.min(xt+D-1,R);I(w,xt,B,q,this.compareMinY);for(var j=xt;j<=B;j+=q){var J=Math.min(j+q-1,B);F.children.push(this._build(w,j,J,C-1))}}return c(F,this.toBBox),F},o.prototype._chooseSubtree=function(w,E,R,C){for(;C.push(E),!E.leaf&&C.length-1!==R;){for(var F=1/0,W=1/0,X=void 0,q=0;q<E.children.length;q++){var D=E.children[q],xt=_(D),B=(j=w,J=D,(Math.max(J.maxX,j.maxX)-Math.min(J.minX,j.minX))*(Math.max(J.maxY,j.maxY)-Math.min(J.minY,j.minY))-xt);B<W?(W=B,F=xt<F?xt:F,X=D):B===W&&xt<F&&(F=xt,X=D)}E=X||E.children[0]}var j,J;return E},o.prototype._insert=function(w,E,R){var C=R?w:this.toBBox(w),F=[],W=this._chooseSubtree(C,this.data,E,F);for(W.children.push(w),p(W,C);E>=0&&F[E].children.length>this._maxEntries;)this._split(F,E),E--;this._adjustParentBBoxes(C,F,E)},o.prototype._split=function(w,E){var R=w[E],C=R.children.length,F=this._minEntries;this._chooseSplitAxis(R,F,C);var W=this._chooseSplitIndex(R,F,C),X=A(R.children.splice(W,R.children.length-W));X.height=R.height,X.leaf=R.leaf,c(R,this.toBBox),c(X,this.toBBox),E?w[E-1].children.push(X):this._splitRoot(R,X)},o.prototype._splitRoot=function(w,E){this.data=A([w,E]),this.data.height=w.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(w,E,R){for(var C,F,W,X,q,D,xt,B=1/0,j=1/0,J=E;J<=R-E;J++){var Dt=h(w,0,J,this.toBBox),Q=h(w,J,R,this.toBBox),At=(F=Dt,W=Q,X=void 0,q=void 0,D=void 0,xt=void 0,X=Math.max(F.minX,W.minX),q=Math.max(F.minY,W.minY),D=Math.min(F.maxX,W.maxX),xt=Math.min(F.maxY,W.maxY),Math.max(0,D-X)*Math.max(0,xt-q)),Mt=_(Dt)+_(Q);At<B?(B=At,C=J,j=Mt<j?Mt:j):At===B&&Mt<j&&(j=Mt,C=J)}return C||R-E},o.prototype._chooseSplitAxis=function(w,E,R){var C=w.leaf?this.compareMinX:g,F=w.leaf?this.compareMinY:m;this._allDistMargin(w,E,R,C)<this._allDistMargin(w,E,R,F)&&w.children.sort(C)},o.prototype._allDistMargin=function(w,E,R,C){w.children.sort(C);for(var F=this.toBBox,W=h(w,0,E,F),X=h(w,R-E,R,F),q=S(W)+S(X),D=E;D<R-E;D++){var xt=w.children[D];p(W,w.leaf?F(xt):xt),q+=S(W)}for(var B=R-E-1;B>=E;B--){var j=w.children[B];p(X,w.leaf?F(j):j),q+=S(X)}return q},o.prototype._adjustParentBBoxes=function(w,E,R){for(var C=R;C>=0;C--)p(E[C],w)},o.prototype._condense=function(w){for(var E=w.length-1,R=void 0;E>=0;E--)w[E].children.length===0?E>0?(R=w[E-1].children).splice(R.indexOf(w[E]),1):this.clear():c(w[E],this.toBBox)},o})});var QT=at((wv,Sv)=>{(function(n,t){typeof wv=="object"&&typeof Sv!="undefined"?Sv.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.TinyQueue=t())})(wv,function(){"use strict";var n=function(o,s){if(o===void 0&&(o=[]),s===void 0&&(s=t),this.data=o,this.length=this.data.length,this.compare=s,this.length>0)for(var c=(this.length>>1)-1;c>=0;c--)this._down(c)};n.prototype.push=function(o){this.data.push(o),this.length++,this._up(this.length-1)},n.prototype.pop=function(){if(this.length!==0){var o=this.data[0],s=this.data.pop();return this.length--,this.length>0&&(this.data[0]=s,this._down(0)),o}},n.prototype.peek=function(){return this.data[0]},n.prototype._up=function(o){for(var s=this,c=s.data,h=s.compare,p=c[o];o>0;){var g=o-1>>1,m=c[g];if(h(p,m)>=0)break;c[o]=m,o=g}c[o]=p},n.prototype._down=function(o){for(var s=this,c=s.data,h=s.compare,p=this.length>>1,g=c[o];o<p;){var m=(o<<1)+1,_=c[m],S=m+1;if(S<this.length&&h(c[S],_)<0&&(m=S,_=c[S]),h(_,g)>=0)break;c[o]=_,o=m}c[o]=g};function t(e,o){return e<o?-1:e>o?1:0}return n})});var eC=at((TQ,tC)=>{tC.exports=function(t,e,o,s){var c=t[0],h=t[1],p=!1;o===void 0&&(o=0),s===void 0&&(s=e.length);for(var g=(s-o)/2,m=0,_=g-1;m<g;_=m++){var S=e[o+m*2+0],x=e[o+m*2+1],b=e[o+_*2+0],A=e[o+_*2+1],I=x>h!=A>h&&c<(b-S)*(h-x)/(A-x)+S;I&&(p=!p)}return p}});var rC=at((CQ,nC)=>{nC.exports=function(t,e,o,s){var c=t[0],h=t[1],p=!1;o===void 0&&(o=0),s===void 0&&(s=e.length);for(var g=s-o,m=0,_=g-1;m<g;_=m++){var S=e[m+o][0],x=e[m+o][1],b=e[_+o][0],A=e[_+o][1],I=x>h!=A>h&&c<(b-S)*(h-x)/(A-x)+S;I&&(p=!p)}return p}});var sC=at((PQ,Dd)=>{var iC=eC(),oC=rC();Dd.exports=function(t,e,o,s){return e.length>0&&Array.isArray(e[0])?oC(t,e,o,s):iC(t,e,o,s)};Dd.exports.nested=oC;Dd.exports.flat=iC});var uC=at((Fd,aC)=>{(function(n,t){typeof Fd=="object"&&typeof aC!="undefined"?t(Fd):typeof define=="function"&&define.amd?define(["exports"],t):t((n=n||self).predicates={})})(Fd,function(n){"use strict";let e=33306690738754706e-32;function o(b,A,I,w,E){let R,C,F,W,X=A[0],q=w[0],D=0,xt=0;q>X==q>-X?(R=X,X=A[++D]):(R=q,q=w[++xt]);let B=0;if(D<b&&xt<I)for(q>X==q>-X?(F=R-((C=X+R)-X),X=A[++D]):(F=R-((C=q+R)-q),q=w[++xt]),R=C,F!==0&&(E[B++]=F);D<b&&xt<I;)q>X==q>-X?(F=R-((C=R+X)-(W=C-R))+(X-W),X=A[++D]):(F=R-((C=R+q)-(W=C-R))+(q-W),q=w[++xt]),R=C,F!==0&&(E[B++]=F);for(;D<b;)F=R-((C=R+X)-(W=C-R))+(X-W),X=A[++D],R=C,F!==0&&(E[B++]=F);for(;xt<I;)F=R-((C=R+q)-(W=C-R))+(q-W),q=w[++xt],R=C,F!==0&&(E[B++]=F);return R===0&&B!==0||(E[B++]=R),B}function s(b){return new Float64Array(b)}let c=33306690738754716e-32,h=22204460492503146e-32,p=11093356479670487e-47,g=s(4),m=s(8),_=s(12),S=s(16),x=s(4);n.orient2d=function(b,A,I,w,E,R){let C=(A-R)*(I-E),F=(b-E)*(w-R),W=C-F;if(C===0||F===0||C>0!=F>0)return W;let X=Math.abs(C+F);return Math.abs(W)>=c*X?W:-function(q,D,xt,B,j,J,Dt){let Q,At,Mt,Rt,pt,yt,K,Bt,Gt,ae,ut,Ut,jt,ce,te,$t,qt,xe,ft=q-j,We=xt-j,ee=D-J,ge=B-J;pt=(te=(Bt=ft-(K=(yt=134217729*ft)-(yt-ft)))*(ae=ge-(Gt=(yt=134217729*ge)-(yt-ge)))-((ce=ft*ge)-K*Gt-Bt*Gt-K*ae))-(ut=te-(qt=(Bt=ee-(K=(yt=134217729*ee)-(yt-ee)))*(ae=We-(Gt=(yt=134217729*We)-(yt-We)))-(($t=ee*We)-K*Gt-Bt*Gt-K*ae))),g[0]=te-(ut+pt)+(pt-qt),pt=(jt=ce-((Ut=ce+ut)-(pt=Ut-ce))+(ut-pt))-(ut=jt-$t),g[1]=jt-(ut+pt)+(pt-$t),pt=(xe=Ut+ut)-Ut,g[2]=Ut-(xe-pt)+(ut-pt),g[3]=xe;let fe=function(tt,z){let Pt=z[0];for(let Ot=1;Ot<tt;Ot++)Pt+=z[Ot];return Pt}(4,g),Te=h*Dt;if(fe>=Te||-fe>=Te||(Q=q-(ft+(pt=q-ft))+(pt-j),Mt=xt-(We+(pt=xt-We))+(pt-j),At=D-(ee+(pt=D-ee))+(pt-J),Rt=B-(ge+(pt=B-ge))+(pt-J),Q===0&&At===0&&Mt===0&&Rt===0)||(Te=p*Dt+e*Math.abs(fe),(fe+=ft*Rt+ge*Q-(ee*Mt+We*At))>=Te||-fe>=Te))return fe;pt=(te=(Bt=Q-(K=(yt=134217729*Q)-(yt-Q)))*(ae=ge-(Gt=(yt=134217729*ge)-(yt-ge)))-((ce=Q*ge)-K*Gt-Bt*Gt-K*ae))-(ut=te-(qt=(Bt=At-(K=(yt=134217729*At)-(yt-At)))*(ae=We-(Gt=(yt=134217729*We)-(yt-We)))-(($t=At*We)-K*Gt-Bt*Gt-K*ae))),x[0]=te-(ut+pt)+(pt-qt),pt=(jt=ce-((Ut=ce+ut)-(pt=Ut-ce))+(ut-pt))-(ut=jt-$t),x[1]=jt-(ut+pt)+(pt-$t),pt=(xe=Ut+ut)-Ut,x[2]=Ut-(xe-pt)+(ut-pt),x[3]=xe;let be=o(4,g,4,x,m);pt=(te=(Bt=ft-(K=(yt=134217729*ft)-(yt-ft)))*(ae=Rt-(Gt=(yt=134217729*Rt)-(yt-Rt)))-((ce=ft*Rt)-K*Gt-Bt*Gt-K*ae))-(ut=te-(qt=(Bt=ee-(K=(yt=134217729*ee)-(yt-ee)))*(ae=Mt-(Gt=(yt=134217729*Mt)-(yt-Mt)))-(($t=ee*Mt)-K*Gt-Bt*Gt-K*ae))),x[0]=te-(ut+pt)+(pt-qt),pt=(jt=ce-((Ut=ce+ut)-(pt=Ut-ce))+(ut-pt))-(ut=jt-$t),x[1]=jt-(ut+pt)+(pt-$t),pt=(xe=Ut+ut)-Ut,x[2]=Ut-(xe-pt)+(ut-pt),x[3]=xe;let Wt=o(be,m,4,x,_);pt=(te=(Bt=Q-(K=(yt=134217729*Q)-(yt-Q)))*(ae=Rt-(Gt=(yt=134217729*Rt)-(yt-Rt)))-((ce=Q*Rt)-K*Gt-Bt*Gt-K*ae))-(ut=te-(qt=(Bt=At-(K=(yt=134217729*At)-(yt-At)))*(ae=Mt-(Gt=(yt=134217729*Mt)-(yt-Mt)))-(($t=At*Mt)-K*Gt-Bt*Gt-K*ae))),x[0]=te-(ut+pt)+(pt-qt),pt=(jt=ce-((Ut=ce+ut)-(pt=Ut-ce))+(ut-pt))-(ut=jt-$t),x[1]=jt-(ut+pt)+(pt-$t),pt=(xe=Ut+ut)-Ut,x[2]=Ut-(xe-pt)+(ut-pt),x[3]=xe;let Me=o(Wt,_,4,x,S);return S[Me-1]}(b,A,I,w,E,R,X)},n.orient2dfast=function(b,A,I,w,E,R){return(A-R)*(I-E)-(b-E)*(w-R)},Object.defineProperty(n,"__esModule",{value:!0})})});var dC=at((IQ,Tv)=>{"use strict";var lC=Ev(),Bd=QT(),y9=sC(),v9=uC().orient2d;Bd.default&&(Bd=Bd.default);Tv.exports=pC;Tv.exports.default=pC;function pC(n,t,e){t=Math.max(0,t===void 0?2:t),e=e||0;var o=S9(n),s=new lC(16);s.toBBox=function(R){return{minX:R[0],minY:R[1],maxX:R[0],maxY:R[1]}},s.compareMinX=function(R,C){return R[0]-C[0]},s.compareMinY=function(R,C){return R[1]-C[1]},s.load(n);for(var c=[],h=0,p;h<o.length;h++){var g=o[h];s.remove(g),p=hC(g,p),c.push(p)}var m=new lC(16);for(h=0;h<c.length;h++)m.insert(Mv(c[h]));for(var _=t*t,S=e*e;c.length;){var x=c.shift(),b=x.p,A=x.next.p,I=bv(b,A);if(!(I<S)){var w=I/_;g=_9(s,x.prev.p,b,A,x.next.next.p,w,m),g&&Math.min(bv(g,b),bv(g,A))<=w&&(c.push(x),c.push(hC(g,x)),s.remove(g),m.remove(x),m.insert(Mv(x)),m.insert(Mv(x.next)))}}x=p;var E=[];do E.push(x.p),x=x.next;while(x!==p);return E.push(x.p),E}function _9(n,t,e,o,s,c,h){for(var p=new Bd([],x9),g=n.data;g;){for(var m=0;m<g.children.length;m++){var _=g.children[m],S=g.leaf?Av(_,e,o):E9(e,o,_);S>c||p.push({node:_,dist:S})}for(;p.length&&!p.peek().node.children;){var x=p.pop(),b=x.node,A=Av(b,t,e),I=Av(b,o,s);if(x.dist<A&&x.dist<I&&fC(e,b,h)&&fC(o,b,h))return b}g=p.pop(),g&&(g=g.node)}return null}function x9(n,t){return n.dist-t.dist}function E9(n,t,e){if(cC(n,e)||cC(t,e))return 0;var o=Ud(n[0],n[1],t[0],t[1],e.minX,e.minY,e.maxX,e.minY);if(o===0)return 0;var s=Ud(n[0],n[1],t[0],t[1],e.minX,e.minY,e.minX,e.maxY);if(s===0)return 0;var c=Ud(n[0],n[1],t[0],t[1],e.maxX,e.minY,e.maxX,e.maxY);if(c===0)return 0;var h=Ud(n[0],n[1],t[0],t[1],e.minX,e.maxY,e.maxX,e.maxY);return h===0?0:Math.min(o,s,c,h)}function cC(n,t){return n[0]>=t.minX&&n[0]<=t.maxX&&n[1]>=t.minY&&n[1]<=t.maxY}function fC(n,t,e){for(var o=Math.min(n[0],t[0]),s=Math.min(n[1],t[1]),c=Math.max(n[0],t[0]),h=Math.max(n[1],t[1]),p=e.search({minX:o,minY:s,maxX:c,maxY:h}),g=0;g<p.length;g++)if(w9(p[g].p,p[g].next.p,n,t))return!1;return!0}function kc(n,t,e){return v9(n[0],n[1],t[0],t[1],e[0],e[1])}function w9(n,t,e,o){return n!==o&&t!==e&&kc(n,t,e)>0!=kc(n,t,o)>0&&kc(e,o,n)>0!=kc(e,o,t)>0}function Mv(n){var t=n.p,e=n.next.p;return n.minX=Math.min(t[0],e[0]),n.minY=Math.min(t[1],e[1]),n.maxX=Math.max(t[0],e[0]),n.maxY=Math.max(t[1],e[1]),n}function S9(n){for(var t=n[0],e=n[0],o=n[0],s=n[0],c=0;c<n.length;c++){var h=n[c];h[0]<t[0]&&(t=h),h[0]>o[0]&&(o=h),h[1]<e[1]&&(e=h),h[1]>s[1]&&(s=h)}var p=[t,e,o,s],g=p.slice();for(c=0;c<n.length;c++)y9(n[c],p)||g.push(n[c]);return b9(g)}function hC(n,t){var e={p:n,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(e.next=t.next,e.prev=t,t.next.prev=e,t.next=e):(e.prev=e,e.next=e),e}function bv(n,t){var e=n[0]-t[0],o=n[1]-t[1];return e*e+o*o}function Av(n,t,e){var o=t[0],s=t[1],c=e[0]-o,h=e[1]-s;if(c!==0||h!==0){var p=((n[0]-o)*c+(n[1]-s)*h)/(c*c+h*h);p>1?(o=e[0],s=e[1]):p>0&&(o+=c*p,s+=h*p)}return c=n[0]-o,h=n[1]-s,c*c+h*h}function Ud(n,t,e,o,s,c,h,p){var g=e-n,m=o-t,_=h-s,S=p-c,x=n-s,b=t-c,A=g*g+m*m,I=g*_+m*S,w=_*_+S*S,E=g*x+m*b,R=_*x+S*b,C=A*w-I*I,F,W,X,q,D=C,xt=C;C===0?(W=0,D=1,q=R,xt=w):(W=I*R-w*E,q=A*R-I*E,W<0?(W=0,q=R,xt=w):W>D&&(W=D,q=R+I,xt=w)),q<0?(q=0,-E<0?W=0:-E>A?W=D:(W=-E,D=A)):q>xt&&(q=xt,-E+I<0?W=0:-E+I>A?W=D:(W=-E+I,D=A)),F=W===0?0:W/D,X=q===0?0:q/xt;var B=(1-F)*n+F*e,j=(1-F)*t+F*o,J=(1-X)*s+X*h,Dt=(1-X)*c+X*p,Q=J-B,At=Dt-j;return Q*Q+At*At}function M9(n,t){return n[0]===t[0]?n[1]-t[1]:n[0]-t[0]}function b9(n){n.sort(M9);for(var t=[],e=0;e<n.length;e++){for(;t.length>=2&&kc(t[t.length-2],t[t.length-1],n[e])<=0;)t.pop();t.push(n[e])}for(var o=[],s=n.length-1;s>=0;s--){for(;o.length>=2&&kc(o[o.length-2],o[o.length-1],n[s])<=0;)o.pop();o.push(n[s])}return o.pop(),t.pop(),t.concat(o)}});var xC=at((Pv,Iv)=>{(function(n,t){typeof Pv=="object"&&typeof Iv!="undefined"?Iv.exports=t():typeof define=="function"&&define.amd?define(t):n.quickselect=t()})(Pv,function(){"use strict";function n(s,c,h,p,g){t(s,c,h||0,p||s.length-1,g||o)}function t(s,c,h,p,g){for(;p>h;){if(p-h>600){var m=p-h+1,_=c-h+1,S=Math.log(m),x=.5*Math.exp(2*S/3),b=.5*Math.sqrt(S*x*(m-x)/m)*(_-m/2<0?-1:1),A=Math.max(h,Math.floor(c-_*x/m+b)),I=Math.min(p,Math.floor(c+(m-_)*x/m+b));t(s,c,A,I,g)}var w=s[c],E=h,R=p;for(e(s,h,c),g(s[p],w)>0&&e(s,h,p);E<R;){for(e(s,E,R),E++,R--;g(s[E],w)<0;)E++;for(;g(s[R],w)>0;)R--}g(s[h],w)===0?e(s,h,R):(R++,e(s,R,p)),R<=c&&(h=R+1),c<=R&&(p=R-1)}}function e(s,c,h){var p=s[c];s[c]=s[h],s[h]=p}function o(s,c){return s<c?-1:s>c?1:0}return n})});var Ov=at((int,Nv)=>{"use strict";Nv.exports=rh;Nv.exports.default=rh;var B9=xC();function rh(n,t){if(!(this instanceof rh))return new rh(n,t);this._maxEntries=Math.max(4,n||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),t&&this._initFormat(t),this.clear()}rh.prototype={all:function(){return this._all(this.data,[])},search:function(n){var t=this.data,e=[],o=this.toBBox;if(!Gd(n,t))return e;for(var s=[],c,h,p,g;t;){for(c=0,h=t.children.length;c<h;c++)p=t.children[c],g=t.leaf?o(p):p,Gd(n,g)&&(t.leaf?e.push(p):Lv(n,g)?this._all(p,e):s.push(p));t=s.pop()}return e},collides:function(n){var t=this.data,e=this.toBBox;if(!Gd(n,t))return!1;for(var o=[],s,c,h,p;t;){for(s=0,c=t.children.length;s<c;s++)if(h=t.children[s],p=t.leaf?e(h):h,Gd(n,p)){if(t.leaf||Lv(n,p))return!0;o.push(h)}t=o.pop()}return!1},load:function(n){if(!(n&&n.length))return this;if(n.length<this._minEntries){for(var t=0,e=n.length;t<e;t++)this.insert(n[t]);return this}var o=this._build(n.slice(),0,n.length-1,0);if(!this.data.children.length)this.data=o;else if(this.data.height===o.height)this._splitRoot(this.data,o);else{if(this.data.height<o.height){var s=this.data;this.data=o,o=s}this._insert(o,this.data.height-o.height-1,!0)}return this},insert:function(n){return n&&this._insert(n,this.data.height-1),this},clear:function(){return this.data=Vc([]),this},remove:function(n,t){if(!n)return this;for(var e=this.data,o=this.toBBox(n),s=[],c=[],h,p,g,m;e||s.length;){if(e||(e=s.pop(),p=s[s.length-1],h=c.pop(),m=!0),e.leaf&&(g=z9(n,e.children,t),g!==-1))return e.children.splice(g,1),s.push(e),this._condense(s),this;!m&&!e.leaf&&Lv(e,o)?(s.push(e),c.push(h),h=0,p=e,e=e.children[0]):p?(h++,e=p.children[h],m=!1):e=null}return this},toBBox:function(n){return n},compareMinX:EC,compareMinY:wC,toJSON:function(){return this.data},fromJSON:function(n){return this.data=n,this},_all:function(n,t){for(var e=[];n;)n.leaf?t.push.apply(t,n.children):e.push.apply(e,n.children),n=e.pop();return t},_build:function(n,t,e,o){var s=e-t+1,c=this._maxEntries,h;if(s<=c)return h=Vc(n.slice(t,e+1)),Hc(h,this.toBBox),h;o||(o=Math.ceil(Math.log(s)/Math.log(c)),c=Math.ceil(s/Math.pow(c,o-1))),h=Vc([]),h.leaf=!1,h.height=o;var p=Math.ceil(s/c),g=p*Math.ceil(Math.sqrt(c)),m,_,S,x;for(SC(n,t,e,g,this.compareMinX),m=t;m<=e;m+=g)for(S=Math.min(m+g-1,e),SC(n,m,S,p,this.compareMinY),_=m;_<=S;_+=p)x=Math.min(_+p-1,S),h.children.push(this._build(n,_,x,o-1));return Hc(h,this.toBBox),h},_chooseSubtree:function(n,t,e,o){for(var s,c,h,p,g,m,_,S;o.push(t),!(t.leaf||o.length-1===e);){for(_=S=1/0,s=0,c=t.children.length;s<c;s++)h=t.children[s],g=Rv(h),m=G9(n,h)-g,m<S?(S=m,_=g<_?g:_,p=h):m===S&&g<_&&(_=g,p=h);t=p||t.children[0]}return t},_insert:function(n,t,e){var o=this.toBBox,s=e?n:o(n),c=[],h=this._chooseSubtree(s,this.data,t,c);for(h.children.push(n),nh(h,s);t>=0&&c[t].children.length>this._maxEntries;)this._split(c,t),t--;this._adjustParentBBoxes(s,c,t)},_split:function(n,t){var e=n[t],o=e.children.length,s=this._minEntries;this._chooseSplitAxis(e,s,o);var c=this._chooseSplitIndex(e,s,o),h=Vc(e.children.splice(c,e.children.length-c));h.height=e.height,h.leaf=e.leaf,Hc(e,this.toBBox),Hc(h,this.toBBox),t?n[t-1].children.push(h):this._splitRoot(e,h)},_splitRoot:function(n,t){this.data=Vc([n,t]),this.data.height=n.height+1,this.data.leaf=!1,Hc(this.data,this.toBBox)},_chooseSplitIndex:function(n,t,e){var o,s,c,h,p,g,m,_;for(g=m=1/0,o=t;o<=e-t;o++)s=eh(n,0,o,this.toBBox),c=eh(n,o,e,this.toBBox),h=k9(s,c),p=Rv(s)+Rv(c),h<g?(g=h,_=o,m=p<m?p:m):h===g&&p<m&&(m=p,_=o);return _},_chooseSplitAxis:function(n,t,e){var o=n.leaf?this.compareMinX:EC,s=n.leaf?this.compareMinY:wC,c=this._allDistMargin(n,t,e,o),h=this._allDistMargin(n,t,e,s);c<h&&n.children.sort(o)},_allDistMargin:function(n,t,e,o){n.children.sort(o);var s=this.toBBox,c=eh(n,0,t,s),h=eh(n,e-t,e,s),p=zd(c)+zd(h),g,m;for(g=t;g<e-t;g++)m=n.children[g],nh(c,n.leaf?s(m):m),p+=zd(c);for(g=e-t-1;g>=t;g--)m=n.children[g],nh(h,n.leaf?s(m):m),p+=zd(h);return p},_adjustParentBBoxes:function(n,t,e){for(var o=e;o>=0;o--)nh(t[o],n)},_condense:function(n){for(var t=n.length-1,e;t>=0;t--)n[t].children.length===0?t>0?(e=n[t-1].children,e.splice(e.indexOf(n[t]),1)):this.clear():Hc(n[t],this.toBBox)},_initFormat:function(n){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(n[0])),this.compareMinY=new Function("a","b",t.join(n[1])),this.toBBox=new Function("a","return {minX: a"+n[0]+", minY: a"+n[1]+", maxX: a"+n[2]+", maxY: a"+n[3]+"};")}};function z9(n,t,e){if(!e)return t.indexOf(n);for(var o=0;o<t.length;o++)if(e(n,t[o]))return o;return-1}function Hc(n,t){eh(n,0,n.children.length,t,n)}function eh(n,t,e,o,s){s||(s=Vc(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var c=t,h;c<e;c++)h=n.children[c],nh(s,n.leaf?o(h):h);return s}function nh(n,t){return n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY),n}function EC(n,t){return n.minX-t.minX}function wC(n,t){return n.minY-t.minY}function Rv(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function zd(n){return n.maxX-n.minX+(n.maxY-n.minY)}function G9(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function k9(n,t){var e=Math.max(n.minX,t.minX),o=Math.max(n.minY,t.minY),s=Math.min(n.maxX,t.maxX),c=Math.min(n.maxY,t.maxY);return Math.max(0,s-e)*Math.max(0,c-o)}function Lv(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function Gd(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function Vc(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function SC(n,t,e,o,s){for(var c=[t,e],h;c.length;)e=c.pop(),t=c.pop(),!(e-t<=o)&&(h=t+Math.ceil((e-t)/o/2)*o,B9(n,h,t,e,s),c.push(t,h,h,e))}});var PC=at((yrt,Gv)=>{"use strict";Gv.exports=Vd;Gv.exports.default=Vd;function Vd(n,t,e){e=e||2;var o=t&&t.length,s=o?t[0]*e:n.length,c=AC(n,0,s,e,!0),h=[];if(!c||c.next===c.prev)return h;var p,g,m,_,S,x,b;if(o&&(c=K9(n,t,c,e)),n.length>80*e){p=m=n[0],g=_=n[1];for(var A=e;A<s;A+=e)S=n[A],x=n[A+1],S<p&&(p=S),x<g&&(g=x),S>m&&(m=S),x>_&&(_=x);b=Math.max(m-p,_-g),b=b!==0?32767/b:0}return sh(c,h,e,p,g,b,0),h}function AC(n,t,e,o,s){var c,h;if(s===zv(n,t,e,o)>0)for(c=t;c<e;c+=o)h=bC(c,n[c],n[c+1],h);else for(c=e-o;c>=t;c-=o)h=bC(c,n[c],n[c+1],h);return h&&Wd(h,h.next)&&(uh(h),h=h.next),h}function Dl(n,t){if(!n)return n;t||(t=n);var e=n,o;do if(o=!1,!e.steiner&&(Wd(e,e.next)||qr(e.prev,e,e.next)===0)){if(uh(e),e=t=e.prev,e===e.next)break;o=!0}else e=e.next;while(o||e!==t);return t}function sh(n,t,e,o,s,c,h){if(n){!h&&c&&nX(n,o,s,c);for(var p=n,g,m;n.prev!==n.next;){if(g=n.prev,m=n.next,c?$9(n,o,s,c):Y9(n)){t.push(g.i/e|0),t.push(n.i/e|0),t.push(m.i/e|0),uh(n),n=m.next,p=m.next;continue}if(n=m,n===p){h?h===1?(n=Z9(Dl(n),t,e),sh(n,t,e,o,s,c,2)):h===2&&J9(n,t,e,o,s,c):sh(Dl(n),t,e,o,s,c,1);break}}}}function Y9(n){var t=n.prev,e=n,o=n.next;if(qr(t,e,o)>=0)return!1;for(var s=t.x,c=e.x,h=o.x,p=t.y,g=e.y,m=o.y,_=s<c?s<h?s:h:c<h?c:h,S=p<g?p<m?p:m:g<m?g:m,x=s>c?s>h?s:h:c>h?c:h,b=p>g?p>m?p:m:g>m?g:m,A=o.next;A!==t;){if(A.x>=_&&A.x<=x&&A.y>=S&&A.y<=b&&Yc(s,p,c,g,h,m,A.x,A.y)&&qr(A.prev,A,A.next)>=0)return!1;A=A.next}return!0}function $9(n,t,e,o){var s=n.prev,c=n,h=n.next;if(qr(s,c,h)>=0)return!1;for(var p=s.x,g=c.x,m=h.x,_=s.y,S=c.y,x=h.y,b=p<g?p<m?p:m:g<m?g:m,A=_<S?_<x?_:x:S<x?S:x,I=p>g?p>m?p:m:g>m?g:m,w=_>S?_>x?_:x:S>x?S:x,E=Uv(b,A,t,e,o),R=Uv(I,w,t,e,o),C=n.prevZ,F=n.nextZ;C&&C.z>=E&&F&&F.z<=R;){if(C.x>=b&&C.x<=I&&C.y>=A&&C.y<=w&&C!==s&&C!==h&&Yc(p,_,g,S,m,x,C.x,C.y)&&qr(C.prev,C,C.next)>=0||(C=C.prevZ,F.x>=b&&F.x<=I&&F.y>=A&&F.y<=w&&F!==s&&F!==h&&Yc(p,_,g,S,m,x,F.x,F.y)&&qr(F.prev,F,F.next)>=0))return!1;F=F.nextZ}for(;C&&C.z>=E;){if(C.x>=b&&C.x<=I&&C.y>=A&&C.y<=w&&C!==s&&C!==h&&Yc(p,_,g,S,m,x,C.x,C.y)&&qr(C.prev,C,C.next)>=0)return!1;C=C.prevZ}for(;F&&F.z<=R;){if(F.x>=b&&F.x<=I&&F.y>=A&&F.y<=w&&F!==s&&F!==h&&Yc(p,_,g,S,m,x,F.x,F.y)&&qr(F.prev,F,F.next)>=0)return!1;F=F.nextZ}return!0}function Z9(n,t,e){var o=n;do{var s=o.prev,c=o.next.next;!Wd(s,c)&&TC(s,o,o.next,c)&&ah(s,c)&&ah(c,s)&&(t.push(s.i/e|0),t.push(o.i/e|0),t.push(c.i/e|0),uh(o),uh(o.next),o=n=c),o=o.next}while(o!==n);return Dl(o)}function J9(n,t,e,o,s,c){var h=n;do{for(var p=h.next.next;p!==h.prev;){if(h.i!==p.i&&oX(h,p)){var g=CC(h,p);h=Dl(h,h.next),g=Dl(g,g.next),sh(h,t,e,o,s,c,0),sh(g,t,e,o,s,c,0);return}p=p.next}h=h.next}while(h!==n)}function K9(n,t,e,o){var s=[],c,h,p,g,m;for(c=0,h=t.length;c<h;c++)p=t[c]*o,g=c<h-1?t[c+1]*o:n.length,m=AC(n,p,g,o,!1),m===m.next&&(m.steiner=!0),s.push(iX(m));for(s.sort(j9),c=0;c<s.length;c++)e=Q9(s[c],e);return e}function j9(n,t){return n.x-t.x}function Q9(n,t){var e=tX(n,t);if(!e)return t;var o=CC(e,n);return Dl(o,o.next),Dl(e,e.next)}function tX(n,t){var e=t,o=n.x,s=n.y,c=-1/0,h;do{if(s<=e.y&&s>=e.next.y&&e.next.y!==e.y){var p=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(p<=o&&p>c&&(c=p,h=e.x<e.next.x?e:e.next,p===o))return h}e=e.next}while(e!==t);if(!h)return null;var g=h,m=h.x,_=h.y,S=1/0,x;e=h;do o>=e.x&&e.x>=m&&o!==e.x&&Yc(s<_?o:c,s,m,_,s<_?c:o,s,e.x,e.y)&&(x=Math.abs(s-e.y)/(o-e.x),ah(e,n)&&(x<S||x===S&&(e.x>h.x||e.x===h.x&&eX(h,e)))&&(h=e,S=x)),e=e.next;while(e!==g);return h}function eX(n,t){return qr(n.prev,n,t.prev)<0&&qr(t.next,n,n.next)<0}function nX(n,t,e,o){var s=n;do s.z===0&&(s.z=Uv(s.x,s.y,t,e,o)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==n);s.prevZ.nextZ=null,s.prevZ=null,rX(s)}function rX(n){var t,e,o,s,c,h,p,g,m=1;do{for(e=n,n=null,c=null,h=0;e;){for(h++,o=e,p=0,t=0;t<m&&(p++,o=o.nextZ,!!o);t++);for(g=m;p>0||g>0&&o;)p!==0&&(g===0||!o||e.z<=o.z)?(s=e,e=e.nextZ,p--):(s=o,o=o.nextZ,g--),c?c.nextZ=s:n=s,s.prevZ=c,c=s;e=o}c.nextZ=null,m*=2}while(h>1);return n}function Uv(n,t,e,o,s){return n=(n-e)*s|0,t=(t-o)*s|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,n|t<<1}function iX(n){var t=n,e=n;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==n);return e}function Yc(n,t,e,o,s,c,h,p){return(s-h)*(t-p)>=(n-h)*(c-p)&&(n-h)*(o-p)>=(e-h)*(t-p)&&(e-h)*(c-p)>=(s-h)*(o-p)}function oX(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!sX(n,t)&&(ah(n,t)&&ah(t,n)&&aX(n,t)&&(qr(n.prev,n,t.prev)||qr(n,t.prev,t))||Wd(n,t)&&qr(n.prev,n,n.next)>0&&qr(t.prev,t,t.next)>0)}function qr(n,t,e){return(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y)}function Wd(n,t){return n.x===t.x&&n.y===t.y}function TC(n,t,e,o){var s=Hd(qr(n,t,e)),c=Hd(qr(n,t,o)),h=Hd(qr(e,o,n)),p=Hd(qr(e,o,t));return!!(s!==c&&h!==p||s===0&&qd(n,e,t)||c===0&&qd(n,o,t)||h===0&&qd(e,n,o)||p===0&&qd(e,t,o))}function qd(n,t,e){return t.x<=Math.max(n.x,e.x)&&t.x>=Math.min(n.x,e.x)&&t.y<=Math.max(n.y,e.y)&&t.y>=Math.min(n.y,e.y)}function Hd(n){return n>0?1:n<0?-1:0}function sX(n,t){var e=n;do{if(e.i!==n.i&&e.next.i!==n.i&&e.i!==t.i&&e.next.i!==t.i&&TC(e,e.next,n,t))return!0;e=e.next}while(e!==n);return!1}function ah(n,t){return qr(n.prev,n,n.next)<0?qr(n,t,n.next)>=0&&qr(n,n.prev,t)>=0:qr(n,t,n.prev)<0||qr(n,n.next,t)<0}function aX(n,t){var e=n,o=!1,s=(n.x+t.x)/2,c=(n.y+t.y)/2;do e.y>c!=e.next.y>c&&e.next.y!==e.y&&s<(e.next.x-e.x)*(c-e.y)/(e.next.y-e.y)+e.x&&(o=!o),e=e.next;while(e!==n);return o}function CC(n,t){var e=new Bv(n.i,n.x,n.y),o=new Bv(t.i,t.x,t.y),s=n.next,c=t.prev;return n.next=t,t.prev=n,e.next=s,s.prev=e,o.next=e,e.prev=o,c.next=o,o.prev=c,o}function bC(n,t,e,o){var s=new Bv(n,t,e);return o?(s.next=o.next,s.prev=o,o.next.prev=s,o.next=s):(s.prev=s,s.next=s),s}function uh(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function Bv(n,t,e){this.i=n,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Vd.deviation=function(n,t,e,o){var s=t&&t.length,c=s?t[0]*e:n.length,h=Math.abs(zv(n,0,c,e));if(s)for(var p=0,g=t.length;p<g;p++){var m=t[p]*e,_=p<g-1?t[p+1]*e:n.length;h-=Math.abs(zv(n,m,_,e))}var S=0;for(p=0;p<o.length;p+=3){var x=o[p]*e,b=o[p+1]*e,A=o[p+2]*e;S+=Math.abs((n[x]-n[A])*(n[b+1]-n[x+1])-(n[x]-n[b])*(n[A+1]-n[x+1]))}return h===0&&S===0?0:Math.abs((S-h)/h)};function zv(n,t,e,o){for(var s=0,c=t,h=e-o;c<e;c+=o)s+=(n[h]-n[c])*(n[c+1]+n[h+1]),h=c;return s}Vd.flatten=function(n){for(var t=n[0][0].length,e={vertices:[],holes:[],dimensions:t},o=0,s=0;s<n.length;s++){for(var c=0;c<n[s].length;c++)for(var h=0;h<t;h++)e.vertices.push(n[s][c][h]);s>0&&(o+=n[s-1].length,e.holes.push(o))}return e}});var Wv=at(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.earthRadius=63710088e-1;Oe.factors={centimeters:Oe.earthRadius*100,centimetres:Oe.earthRadius*100,degrees:Oe.earthRadius/111325,feet:Oe.earthRadius*3.28084,inches:Oe.earthRadius*39.37,kilometers:Oe.earthRadius/1e3,kilometres:Oe.earthRadius/1e3,meters:Oe.earthRadius,metres:Oe.earthRadius,miles:Oe.earthRadius/1609.344,millimeters:Oe.earthRadius*1e3,millimetres:Oe.earthRadius*1e3,nauticalmiles:Oe.earthRadius/1852,radians:1,yards:Oe.earthRadius*1.0936};Oe.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Oe.earthRadius,yards:1.0936133};Oe.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Ju(n,t,e){e===void 0&&(e={});var o={type:"Feature"};return(e.id===0||e.id)&&(o.id=e.id),e.bbox&&(o.bbox=e.bbox),o.properties=t||{},o.geometry=n,o}Oe.feature=Ju;function lX(n,t,e){switch(e===void 0&&(e={}),n){case"Point":return kv(t).geometry;case"LineString":return Hv(t).geometry;case"Polygon":return qv(t).geometry;case"MultiPoint":return RC(t).geometry;case"MultiLineString":return IC(t).geometry;case"MultiPolygon":return LC(t).geometry;default:throw new Error(n+" is invalid")}}Oe.geometry=lX;function kv(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Xd(n[0])||!Xd(n[1]))throw new Error("coordinates must contain numbers");var o={type:"Point",coordinates:n};return Ju(o,t,e)}Oe.point=kv;function cX(n,t,e){return e===void 0&&(e={}),Yd(n.map(function(o){return kv(o,t)}),e)}Oe.points=cX;function qv(n,t,e){e===void 0&&(e={});for(var o=0,s=n;o<s.length;o++){var c=s[o];if(c.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var h=0;h<c[c.length-1].length;h++)if(c[c.length-1][h]!==c[0][h])throw new Error("First and last Position are not equivalent.")}var p={type:"Polygon",coordinates:n};return Ju(p,t,e)}Oe.polygon=qv;function fX(n,t,e){return e===void 0&&(e={}),Yd(n.map(function(o){return qv(o,t)}),e)}Oe.polygons=fX;function Hv(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var o={type:"LineString",coordinates:n};return Ju(o,t,e)}Oe.lineString=Hv;function hX(n,t,e){return e===void 0&&(e={}),Yd(n.map(function(o){return Hv(o,t)}),e)}Oe.lineStrings=hX;function Yd(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}Oe.featureCollection=Yd;function IC(n,t,e){e===void 0&&(e={});var o={type:"MultiLineString",coordinates:n};return Ju(o,t,e)}Oe.multiLineString=IC;function RC(n,t,e){e===void 0&&(e={});var o={type:"MultiPoint",coordinates:n};return Ju(o,t,e)}Oe.multiPoint=RC;function LC(n,t,e){e===void 0&&(e={});var o={type:"MultiPolygon",coordinates:n};return Ju(o,t,e)}Oe.multiPolygon=LC;function pX(n,t,e){e===void 0&&(e={});var o={type:"GeometryCollection",geometries:n};return Ju(o,t,e)}Oe.geometryCollection=pX;function dX(n,t){if(t===void 0&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var e=Math.pow(10,t||0);return Math.round(n*e)/e}Oe.round=dX;function NC(n,t){t===void 0&&(t="kilometers");var e=Oe.factors[t];if(!e)throw new Error(t+" units is invalid");return n*e}Oe.radiansToLength=NC;function Vv(n,t){t===void 0&&(t="kilometers");var e=Oe.factors[t];if(!e)throw new Error(t+" units is invalid");return n/e}Oe.lengthToRadians=Vv;function gX(n,t){return OC(Vv(n,t))}Oe.lengthToDegrees=gX;function mX(n){var t=n%360;return t<0&&(t+=360),t}Oe.bearingToAzimuth=mX;function OC(n){var t=n%(2*Math.PI);return t*180/Math.PI}Oe.radiansToDegrees=OC;function yX(n){var t=n%360;return t*Math.PI/180}Oe.degreesToRadians=yX;function vX(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return NC(Vv(n,t),e)}Oe.convertLength=vX;function _X(n,t,e){if(t===void 0&&(t="meters"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("area must be a positive number");var o=Oe.areaFactors[t];if(!o)throw new Error("invalid original units");var s=Oe.areaFactors[e];if(!s)throw new Error("invalid final units");return n/o*s}Oe.convertArea=_X;function Xd(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}Oe.isNumber=Xd;function xX(n){return!!n&&n.constructor===Object}Oe.isObject=xX;function EX(n){if(!n)throw new Error("bbox is required");if(!Array.isArray(n))throw new Error("bbox must be an Array");if(n.length!==4&&n.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");n.forEach(function(t){if(!Xd(t))throw new Error("bbox must only contain numbers")})}Oe.validateBBox=EX;function wX(n){if(!n)throw new Error("id is required");if(["string","number"].indexOf(typeof n)===-1)throw new Error("id must be a number or a string")}Oe.validateId=wX});var Yv=at(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});var lo=Wv();function lh(n,t,e){if(n!==null)for(var o,s,c,h,p,g,m,_=0,S=0,x,b=n.type,A=b==="FeatureCollection",I=b==="Feature",w=A?n.features.length:1,E=0;E<w;E++){m=A?n.features[E].geometry:I?n.geometry:n,x=m?m.type==="GeometryCollection":!1,p=x?m.geometries.length:1;for(var R=0;R<p;R++){var C=0,F=0;if(h=x?m.geometries[R]:m,h!==null){g=h.coordinates;var W=h.type;switch(_=e&&(W==="Polygon"||W==="MultiPolygon")?1:0,W){case null:break;case"Point":if(t(g,S,E,C,F)===!1)return!1;S++,C++;break;case"LineString":case"MultiPoint":for(o=0;o<g.length;o++){if(t(g[o],S,E,C,F)===!1)return!1;S++,W==="MultiPoint"&&C++}W==="LineString"&&C++;break;case"Polygon":case"MultiLineString":for(o=0;o<g.length;o++){for(s=0;s<g[o].length-_;s++){if(t(g[o][s],S,E,C,F)===!1)return!1;S++}W==="MultiLineString"&&C++,W==="Polygon"&&F++}W==="Polygon"&&C++;break;case"MultiPolygon":for(o=0;o<g.length;o++){for(F=0,s=0;s<g[o].length;s++){for(c=0;c<g[o][s].length-_;c++){if(t(g[o][s][c],S,E,C,F)===!1)return!1;S++}F++}C++}break;case"GeometryCollection":for(o=0;o<h.geometries.length;o++)if(lh(h.geometries[o],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function SX(n,t,e,o){var s=e;return lh(n,function(c,h,p,g,m){h===0&&e===void 0?s=c:s=t(s,c,h,p,g,m)},o),s}function DC(n,t){var e;switch(n.type){case"FeatureCollection":for(e=0;e<n.features.length&&t(n.features[e].properties,e)!==!1;e++);break;case"Feature":t(n.properties,0);break}}function MX(n,t,e){var o=e;return DC(n,function(s,c){c===0&&e===void 0?o=s:o=t(o,s,c)}),o}function FC(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function bX(n,t,e){var o=e;return FC(n,function(s,c){c===0&&e===void 0?o=s:o=t(o,s,c)}),o}function AX(n){var t=[];return lh(n,function(e){t.push(e)}),t}function Xv(n,t){var e,o,s,c,h,p,g,m,_,S,x=0,b=n.type==="FeatureCollection",A=n.type==="Feature",I=b?n.features.length:1;for(e=0;e<I;e++){for(p=b?n.features[e].geometry:A?n.geometry:n,m=b?n.features[e].properties:A?n.properties:{},_=b?n.features[e].bbox:A?n.bbox:void 0,S=b?n.features[e].id:A?n.id:void 0,g=p?p.type==="GeometryCollection":!1,h=g?p.geometries.length:1,s=0;s<h;s++){if(c=g?p.geometries[s]:p,c===null){if(t(null,x,m,_,S)===!1)return!1;continue}switch(c.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(c,x,m,_,S)===!1)return!1;break}case"GeometryCollection":{for(o=0;o<c.geometries.length;o++)if(t(c.geometries[o],x,m,_,S)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}x++}}function TX(n,t,e){var o=e;return Xv(n,function(s,c,h,p,g){c===0&&e===void 0?o=s:o=t(o,s,c,h,p,g)}),o}function $d(n,t){Xv(n,function(e,o,s,c,h){var p=e===null?null:e.type;switch(p){case null:case"Point":case"LineString":case"Polygon":return t(lo.feature(e,s,{bbox:c,id:h}),o,0)===!1?!1:void 0}var g;switch(p){case"MultiPoint":g="Point";break;case"MultiLineString":g="LineString";break;case"MultiPolygon":g="Polygon";break}for(var m=0;m<e.coordinates.length;m++){var _=e.coordinates[m],S={type:g,coordinates:_};if(t(lo.feature(S,s),o,m)===!1)return!1}})}function CX(n,t,e){var o=e;return $d(n,function(s,c,h){c===0&&h===0&&e===void 0?o=s:o=t(o,s,c,h)}),o}function UC(n,t){$d(n,function(e,o,s){var c=0;if(e.geometry){var h=e.geometry.type;if(!(h==="Point"||h==="MultiPoint")){var p,g=0,m=0,_=0;if(lh(e,function(S,x,b,A,I){if(p===void 0||o>g||A>m||I>_){p=S,g=o,m=A,_=I,c=0;return}var w=lo.lineString([p,S],e.properties);if(t(w,o,s,I,c)===!1)return!1;c++,p=S})===!1)return!1}}})}function PX(n,t,e){var o=e,s=!1;return UC(n,function(c,h,p,g,m){s===!1&&e===void 0?o=c:o=t(o,c,h,p,g,m),s=!0}),o}function BC(n,t){if(!n)throw new Error("geojson is required");$d(n,function(e,o,s){if(e.geometry!==null){var c=e.geometry.type,h=e.geometry.coordinates;switch(c){case"LineString":if(t(e,o,s,0,0)===!1)return!1;break;case"Polygon":for(var p=0;p<h.length;p++)if(t(lo.lineString(h[p],e.properties),o,s,p)===!1)return!1;break}}})}function IX(n,t,e){var o=e;return BC(n,function(s,c,h,p){c===0&&e===void 0?o=s:o=t(o,s,c,h,p)}),o}function RX(n,t){if(t=t||{},!lo.isObject(t))throw new Error("options is invalid");var e=t.featureIndex||0,o=t.multiFeatureIndex||0,s=t.geometryIndex||0,c=t.segmentIndex||0,h=t.properties,p;switch(n.type){case"FeatureCollection":e<0&&(e=n.features.length+e),h=h||n.features[e].properties,p=n.features[e].geometry;break;case"Feature":h=h||n.properties,p=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":p=n;break;default:throw new Error("geojson is invalid")}if(p===null)return null;var g=p.coordinates;switch(p.type){case"Point":case"MultiPoint":return null;case"LineString":return c<0&&(c=g.length+c-1),lo.lineString([g[c],g[c+1]],h,t);case"Polygon":return s<0&&(s=g.length+s),c<0&&(c=g[s].length+c-1),lo.lineString([g[s][c],g[s][c+1]],h,t);case"MultiLineString":return o<0&&(o=g.length+o),c<0&&(c=g[o].length+c-1),lo.lineString([g[o][c],g[o][c+1]],h,t);case"MultiPolygon":return o<0&&(o=g.length+o),s<0&&(s=g[o].length+s),c<0&&(c=g[o][s].length-c-1),lo.lineString([g[o][s][c],g[o][s][c+1]],h,t)}throw new Error("geojson is invalid")}function LX(n,t){if(t=t||{},!lo.isObject(t))throw new Error("options is invalid");var e=t.featureIndex||0,o=t.multiFeatureIndex||0,s=t.geometryIndex||0,c=t.coordIndex||0,h=t.properties,p;switch(n.type){case"FeatureCollection":e<0&&(e=n.features.length+e),h=h||n.features[e].properties,p=n.features[e].geometry;break;case"Feature":h=h||n.properties,p=n.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":p=n;break;default:throw new Error("geojson is invalid")}if(p===null)return null;var g=p.coordinates;switch(p.type){case"Point":return lo.point(g,h,t);case"MultiPoint":return o<0&&(o=g.length+o),lo.point(g[o],h,t);case"LineString":return c<0&&(c=g.length+c),lo.point(g[c],h,t);case"Polygon":return s<0&&(s=g.length+s),c<0&&(c=g[s].length+c),lo.point(g[s][c],h,t);case"MultiLineString":return o<0&&(o=g.length+o),c<0&&(c=g[o].length+c),lo.point(g[o][c],h,t);case"MultiPolygon":return o<0&&(o=g.length+o),s<0&&(s=g[o].length+s),c<0&&(c=g[o][s].length-c),lo.point(g[o][s][c],h,t)}throw new Error("geojson is invalid")}Ei.coordAll=AX;Ei.coordEach=lh;Ei.coordReduce=SX;Ei.featureEach=FC;Ei.featureReduce=bX;Ei.findPoint=LX;Ei.findSegment=RX;Ei.flattenEach=$d;Ei.flattenReduce=CX;Ei.geomEach=Xv;Ei.geomReduce=TX;Ei.lineEach=BC;Ei.lineReduce=IX;Ei.propEach=DC;Ei.propReduce=MX;Ei.segmentEach=UC;Ei.segmentReduce=PX});var zC=at(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});var NX=Yv();function $v(n){var t=[1/0,1/0,-1/0,-1/0];return NX.coordEach(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}$v.default=$v;Zv.default=$v});var Zd=at((Nrt,Jv)=>{var Pa=Ev(),kC=Wv(),qC=Yv(),$c=zC().default,OX=qC.featureEach,Rrt=qC.coordEach,Lrt=kC.polygon,GC=kC.featureCollection;function HC(n){var t=new Pa(n);return t.insert=function(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:$c(e),Pa.prototype.insert.call(this,e)},t.load=function(e){var o=[];return Array.isArray(e)?e.forEach(function(s){if(s.type!=="Feature")throw new Error("invalid features");s.bbox=s.bbox?s.bbox:$c(s),o.push(s)}):OX(e,function(s){if(s.type!=="Feature")throw new Error("invalid features");s.bbox=s.bbox?s.bbox:$c(s),o.push(s)}),Pa.prototype.load.call(this,o)},t.remove=function(e,o){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:$c(e),Pa.prototype.remove.call(this,e,o)},t.clear=function(){return Pa.prototype.clear.call(this)},t.search=function(e){var o=Pa.prototype.search.call(this,this.toBBox(e));return GC(o)},t.collides=function(e){return Pa.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=Pa.prototype.all.call(this);return GC(e)},t.toJSON=function(){return Pa.prototype.toJSON.call(this)},t.fromJSON=function(e){return Pa.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var o;if(e.bbox)o=e.bbox;else if(Array.isArray(e)&&e.length===4)o=e;else if(Array.isArray(e)&&e.length===6)o=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")o=$c(e);else if(e.type==="FeatureCollection")o=$c(e);else throw new Error("invalid geojson");return{minX:o[0],minY:o[1],maxX:o[2],maxY:o[3]}},t}Jv.exports=HC;Jv.exports.default=HC});var n_=at((qot,QC)=>{"use strict";var jC=Object.prototype.toString;QC.exports=function(t){var e=jC.call(t),o=e==="[object Arguments]";return o||(o=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&jC.call(t.callee)==="[object Function]"),o}});var uP=at((Hot,aP)=>{"use strict";var sP;Object.keys||(hh=Object.prototype.hasOwnProperty,r_=Object.prototype.toString,tP=n_(),i_=Object.prototype.propertyIsEnumerable,eP=!i_.call({toString:null},"toString"),nP=i_.call(function(){},"prototype"),ph=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],tg=function(n){var t=n.constructor;return t&&t.prototype===n},rP={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},iP=function(){if(typeof window=="undefined")return!1;for(var n in window)try{if(!rP["$"+n]&&hh.call(window,n)&&window[n]!==null&&typeof window[n]=="object")try{tg(window[n])}catch(t){return!0}}catch(t){return!0}return!1}(),oP=function(n){if(typeof window=="undefined"||!iP)return tg(n);try{return tg(n)}catch(t){return!1}},sP=function(t){var e=t!==null&&typeof t=="object",o=r_.call(t)==="[object Function]",s=tP(t),c=e&&r_.call(t)==="[object String]",h=[];if(!e&&!o&&!s)throw new TypeError("Object.keys called on a non-object");var p=nP&&o;if(c&&t.length>0&&!hh.call(t,0))for(var g=0;g<t.length;++g)h.push(String(g));if(s&&t.length>0)for(var m=0;m<t.length;++m)h.push(String(m));else for(var _ in t)!(p&&_==="prototype")&&hh.call(t,_)&&h.push(String(_));if(eP)for(var S=oP(t),x=0;x<ph.length;++x)!(S&&ph[x]==="constructor")&&hh.call(t,ph[x])&&h.push(ph[x]);return h});var hh,r_,tP,i_,eP,nP,ph,tg,rP,iP,oP;aP.exports=sP});var o_=at((Vot,fP)=>{"use strict";var VX=Array.prototype.slice,WX=n_(),lP=Object.keys,eg=lP?function(t){return lP(t)}:uP(),cP=Object.keys;eg.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(o){return WX(o)?cP(VX.call(o)):cP(o)})}else Object.keys=eg;return Object.keys||eg};fP.exports=eg});var s_=at((Wot,hP)=>{"use strict";hP.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),o=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var s=42;t[e]=s;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var h=Object.getOwnPropertyDescriptor(t,e);if(h.value!==s||h.enumerable!==!0)return!1}return!0}});var ng=at((Xot,pP)=>{"use strict";var XX=s_();pP.exports=function(){return XX()&&!!Symbol.toStringTag}});var gP=at((Yot,dP)=>{"use strict";dP.exports=Error});var yP=at(($ot,mP)=>{"use strict";mP.exports=EvalError});var _P=at((Zot,vP)=>{"use strict";vP.exports=RangeError});var EP=at((Jot,xP)=>{"use strict";xP.exports=ReferenceError});var a_=at((Kot,wP)=>{"use strict";wP.exports=SyntaxError});var Fl=at((jot,SP)=>{"use strict";SP.exports=TypeError});var bP=at((Qot,MP)=>{"use strict";MP.exports=URIError});var CP=at((tst,TP)=>{"use strict";var AP=typeof Symbol!="undefined"&&Symbol,YX=s_();TP.exports=function(){return typeof AP!="function"||typeof Symbol!="function"||typeof AP("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:YX()}});var IP=at((est,PP)=>{"use strict";var u_={__proto__:null,foo:{}},$X=Object;PP.exports=function(){return{__proto__:u_}.foo===u_.foo&&!(u_ instanceof $X)}});var NP=at((nst,LP)=>{"use strict";var ZX="Function.prototype.bind called on incompatible ",JX=Object.prototype.toString,KX=Math.max,jX="[object Function]",RP=function(t,e){for(var o=[],s=0;s<t.length;s+=1)o[s]=t[s];for(var c=0;c<e.length;c+=1)o[c+t.length]=e[c];return o},QX=function(t,e){for(var o=[],s=e||0,c=0;s<t.length;s+=1,c+=1)o[c]=t[s];return o},t7=function(n,t){for(var e="",o=0;o<n.length;o+=1)e+=n[o],o+1<n.length&&(e+=t);return e};LP.exports=function(t){var e=this;if(typeof e!="function"||JX.apply(e)!==jX)throw new TypeError(ZX+e);for(var o=QX(arguments,1),s,c=function(){if(this instanceof s){var _=e.apply(this,RP(o,arguments));return Object(_)===_?_:this}return e.apply(t,RP(o,arguments))},h=KX(0,e.length-o.length),p=[],g=0;g<h;g++)p[g]="$"+g;if(s=Function("binder","return function ("+t7(p,",")+"){ return binder.apply(this,arguments); }")(c),e.prototype){var m=function(){};m.prototype=e.prototype,s.prototype=new m,m.prototype=null}return s}});var rg=at((rst,OP)=>{"use strict";var e7=NP();OP.exports=Function.prototype.bind||e7});var FP=at((ist,DP)=>{"use strict";var n7=Function.prototype.call,r7=Object.prototype.hasOwnProperty,i7=rg();DP.exports=i7.call(n7,r7)});var Qc=at((ost,kP)=>{"use strict";var Vn,o7=gP(),s7=yP(),a7=_P(),u7=EP(),jc=a_(),Kc=Fl(),l7=bP(),GP=Function,l_=function(n){try{return GP('"use strict"; return ('+n+").constructor;")()}catch(t){}},Ul=Object.getOwnPropertyDescriptor;if(Ul)try{Ul({},"")}catch(n){Ul=null}var c_=function(){throw new Kc},c7=Ul?function(){try{return arguments.callee,c_}catch(n){try{return Ul(arguments,"callee").get}catch(t){return c_}}}():c_,Zc=CP()(),f7=IP()(),ki=Object.getPrototypeOf||(f7?function(n){return n.__proto__}:null),Jc={},h7=typeof Uint8Array=="undefined"||!ki?Vn:ki(Uint8Array),Bl={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Vn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Vn:ArrayBuffer,"%ArrayIteratorPrototype%":Zc&&ki?ki([][Symbol.iterator]()):Vn,"%AsyncFromSyncIteratorPrototype%":Vn,"%AsyncFunction%":Jc,"%AsyncGenerator%":Jc,"%AsyncGeneratorFunction%":Jc,"%AsyncIteratorPrototype%":Jc,"%Atomics%":typeof Atomics=="undefined"?Vn:Atomics,"%BigInt%":typeof BigInt=="undefined"?Vn:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Vn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Vn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Vn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o7,"%eval%":eval,"%EvalError%":s7,"%Float32Array%":typeof Float32Array=="undefined"?Vn:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Vn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Vn:FinalizationRegistry,"%Function%":GP,"%GeneratorFunction%":Jc,"%Int8Array%":typeof Int8Array=="undefined"?Vn:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Vn:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Vn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Zc&&ki?ki(ki([][Symbol.iterator]())):Vn,"%JSON%":typeof JSON=="object"?JSON:Vn,"%Map%":typeof Map=="undefined"?Vn:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Zc||!ki?Vn:ki(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Vn:Promise,"%Proxy%":typeof Proxy=="undefined"?Vn:Proxy,"%RangeError%":a7,"%ReferenceError%":u7,"%Reflect%":typeof Reflect=="undefined"?Vn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Vn:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Zc||!ki?Vn:ki(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Vn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Zc&&ki?ki(""[Symbol.iterator]()):Vn,"%Symbol%":Zc?Symbol:Vn,"%SyntaxError%":jc,"%ThrowTypeError%":c7,"%TypedArray%":h7,"%TypeError%":Kc,"%Uint8Array%":typeof Uint8Array=="undefined"?Vn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Vn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Vn:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Vn:Uint32Array,"%URIError%":l7,"%WeakMap%":typeof WeakMap=="undefined"?Vn:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Vn:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Vn:WeakSet};if(ki)try{null.error}catch(n){UP=ki(ki(n)),Bl["%Error.prototype%"]=UP}var UP,p7=function n(t){var e;if(t==="%AsyncFunction%")e=l_("async function () {}");else if(t==="%GeneratorFunction%")e=l_("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=l_("async function* () {}");else if(t==="%AsyncGenerator%"){var o=n("%AsyncGeneratorFunction%");o&&(e=o.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&ki&&(e=ki(s.prototype))}return Bl[t]=e,e},BP={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},dh=rg(),ig=FP(),d7=dh.call(Function.call,Array.prototype.concat),g7=dh.call(Function.apply,Array.prototype.splice),zP=dh.call(Function.call,String.prototype.replace),og=dh.call(Function.call,String.prototype.slice),m7=dh.call(Function.call,RegExp.prototype.exec),y7=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,v7=/\\\\(\\\\)?/g,_7=function(t){var e=og(t,0,1),o=og(t,-1);if(e==="%"&&o!=="%")throw new jc("invalid intrinsic syntax, expected closing \`%\`");if(o==="%"&&e!=="%")throw new jc("invalid intrinsic syntax, expected opening \`%\`");var s=[];return zP(t,y7,function(c,h,p,g){s[s.length]=p?zP(g,v7,"$1"):h||c}),s},x7=function(t,e){var o=t,s;if(ig(BP,o)&&(s=BP[o],o="%"+s[0]+"%"),ig(Bl,o)){var c=Bl[o];if(c===Jc&&(c=p7(o)),typeof c=="undefined"&&!e)throw new Kc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:o,value:c}}throw new jc("intrinsic "+t+" does not exist!")};kP.exports=function(t,e){if(typeof t!="string"||t.length===0)throw new Kc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Kc('"allowMissing" argument must be a boolean');if(m7(/^%?[^%]*%?$/,t)===null)throw new jc("\`%\` may not be present anywhere but at the beginning and end of the intrinsic name");var o=_7(t),s=o.length>0?o[0]:"",c=x7("%"+s+"%",e),h=c.name,p=c.value,g=!1,m=c.alias;m&&(s=m[0],g7(o,d7([0,1],m)));for(var _=1,S=!0;_<o.length;_+=1){var x=o[_],b=og(x,0,1),A=og(x,-1);if((b==='"'||b==="'"||b==="\`"||A==='"'||A==="'"||A==="\`")&&b!==A)throw new jc("property names with quotes must have matching quotes");if((x==="constructor"||!S)&&(g=!0),s+="."+x,h="%"+s+"%",ig(Bl,h))p=Bl[h];else if(p!=null){if(!(x in p)){if(!e)throw new Kc("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ul&&_+1>=o.length){var I=Ul(p,x);S=!!I,S&&"get"in I&&!("originalValue"in I.get)?p=I.get:p=p[x]}else S=ig(p,x),p=p[x];S&&!g&&(Bl[h]=p)}}return p}});var ag=at((sst,qP)=>{"use strict";var E7=Qc(),sg=E7("%Object.defineProperty%",!0)||!1;if(sg)try{sg({},"a",{value:1})}catch(n){sg=!1}qP.exports=sg});var f_=at((ast,HP)=>{"use strict";var w7=Qc(),ug=w7("%Object.getOwnPropertyDescriptor%",!0);if(ug)try{ug([],"length")}catch(n){ug=null}HP.exports=ug});var lg=at((ust,XP)=>{"use strict";var VP=ag(),S7=a_(),tf=Fl(),WP=f_();XP.exports=function(t,e,o){if(!t||typeof t!="object"&&typeof t!="function")throw new tf("\`obj\` must be an object or a function\`");if(typeof e!="string"&&typeof e!="symbol")throw new tf("\`property\` must be a string or a symbol\`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new tf("\`nonEnumerable\`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new tf("\`nonWritable\`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new tf("\`nonConfigurable\`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new tf("\`loose\`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,g=!!WP&&WP(t,e);if(VP)VP(t,e,{configurable:h===null&&g?g.configurable:!h,enumerable:s===null&&g?g.enumerable:!s,value:o,writable:c===null&&g?g.writable:!c});else if(p||!s&&!c&&!h)t[e]=o;else throw new S7("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var cg=at((lst,$P)=>{"use strict";var h_=ag(),YP=function(){return!!h_};YP.hasArrayLengthDefineBug=function(){if(!h_)return null;try{return h_([],"length",{value:1}).length!==1}catch(t){return!0}};$P.exports=YP});var QP=at((cst,jP)=>{"use strict";var M7=Qc(),ZP=lg(),b7=cg()(),JP=f_(),KP=Fl(),A7=M7("%Math.floor%");jP.exports=function(t,e){if(typeof t!="function")throw new KP("\`fn\` is not a function");if(typeof e!="number"||e<0||e>4294967295||A7(e)!==e)throw new KP("\`length\` must be a positive 32-bit integer");var o=arguments.length>2&&!!arguments[2],s=!0,c=!0;if("length"in t&&JP){var h=JP(t,"length");h&&!h.configurable&&(s=!1),h&&!h.writable&&(c=!1)}return(s||c||!o)&&(b7?ZP(t,"length",e,!0,!0):ZP(t,"length",e)),t}});var pg=at((fst,fg)=>{"use strict";var p_=rg(),hg=Qc(),T7=QP(),C7=Fl(),nI=hg("%Function.prototype.apply%"),rI=hg("%Function.prototype.call%"),iI=hg("%Reflect.apply%",!0)||p_.call(rI,nI),tI=ag(),P7=hg("%Math.max%");fg.exports=function(t){if(typeof t!="function")throw new C7("a function is required");var e=iI(p_,rI,arguments);return T7(e,1+P7(0,t.length-(arguments.length-1)),!0)};var eI=function(){return iI(p_,nI,arguments)};tI?tI(fg.exports,"apply",{value:eI}):fg.exports.apply=eI});var d_=at((hst,aI)=>{"use strict";var oI=Qc(),sI=pg(),I7=sI(oI("String.prototype.indexOf"));aI.exports=function(t,e){var o=oI(t,!!e);return typeof o=="function"&&I7(t,".prototype.")>-1?sI(o):o}});var cI=at((pst,lI)=>{"use strict";var R7=ng()(),L7=d_(),g_=L7("Object.prototype.toString"),dg=function(t){return R7&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:g_(t)==="[object Arguments]"},uI=function(t){return dg(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&g_(t)!=="[object Array]"&&g_(t.callee)==="[object Function]"},N7=function(){return dg(arguments)}();dg.isLegacyArguments=uI;lI.exports=N7?dg:uI});var ef=at((dst,dI)=>{"use strict";var O7=o_(),D7=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",F7=Object.prototype.toString,U7=Array.prototype.concat,fI=lg(),B7=function(n){return typeof n=="function"&&F7.call(n)==="[object Function]"},hI=cg()(),z7=function(n,t,e,o){if(t in n){if(o===!0){if(n[t]===e)return}else if(!B7(o)||!o())return}hI?fI(n,t,e,!0):fI(n,t,e)},pI=function(n,t){var e=arguments.length>2?arguments[2]:{},o=O7(t);D7&&(o=U7.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)z7(n,o[s],t[o[s]],e[o[s]])};pI.supportsDescriptors=!!hI;dI.exports=pI});var m_=at((gst,mI)=>{"use strict";var gI=function(n){return n!==n};mI.exports=function(t,e){return t===0&&e===0?1/t===1/e:!!(t===e||gI(t)&&gI(e))}});var y_=at((mst,yI)=>{"use strict";var G7=m_();yI.exports=function(){return typeof Object.is=="function"?Object.is:G7}});var _I=at((yst,vI)=>{"use strict";var k7=y_(),q7=ef();vI.exports=function(){var t=k7();return q7(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var SI=at((vst,wI)=>{"use strict";var H7=ef(),V7=pg(),W7=m_(),xI=y_(),X7=_I(),EI=V7(xI(),Object);H7(EI,{getPolyfill:xI,implementation:W7,shim:X7});wI.exports=EI});var CI=at((_st,TI)=>{"use strict";var v_=d_(),MI=ng()(),bI,AI,__,x_;MI&&(bI=v_("Object.prototype.hasOwnProperty"),AI=v_("RegExp.prototype.exec"),__={},gg=function(){throw __},x_={toString:gg,valueOf:gg},typeof Symbol.toPrimitive=="symbol"&&(x_[Symbol.toPrimitive]=gg));var gg,Y7=v_("Object.prototype.toString"),$7=Object.getOwnPropertyDescriptor,Z7="[object RegExp]";TI.exports=MI?function(t){if(!t||typeof t!="object")return!1;var e=$7(t,"lastIndex"),o=e&&bI(e,"value");if(!o)return!1;try{AI(t,x_)}catch(s){return s===__}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:Y7(t)===Z7}});var II=at((xst,PI)=>{"use strict";var mh=function(){return typeof function(){}.name=="string"},gh=Object.getOwnPropertyDescriptor;if(gh)try{gh([],"length")}catch(n){gh=null}mh.functionsHaveConfigurableNames=function(){if(!mh()||!gh)return!1;var t=gh(function(){},"name");return!!t&&!!t.configurable};var J7=Function.prototype.bind;mh.boundFunctionsHaveNames=function(){return mh()&&typeof J7=="function"&&function(){}.bind().name!==""};PI.exports=mh});var NI=at((Est,LI)=>{"use strict";var RI=lg(),K7=cg()(),j7=II().functionsHaveConfigurableNames(),Q7=Fl();LI.exports=function(t,e){if(typeof t!="function")throw new Q7("\`fn\` is not a function");var o=arguments.length>2&&!!arguments[2];return(!o||j7)&&(K7?RI(t,"name",e,!0,!0):RI(t,"name",e)),t}});var E_=at((wst,OI)=>{"use strict";var tY=NI(),eY=Fl(),nY=Object;OI.exports=tY(function(){if(this==null||this!==nY(this))throw new eY("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0)});var w_=at((Sst,DI)=>{"use strict";var rY=E_(),iY=ef().supportsDescriptors,oY=Object.getOwnPropertyDescriptor;DI.exports=function(){if(iY&&/a/mig.flags==="gim"){var t=oY(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var e="",o={};if(Object.defineProperty(o,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(o,"sticky",{get:function(){e+="y"}}),t.get.call(o),e==="dy")return t.get}}return rY}});var BI=at((Mst,UI)=>{"use strict";var sY=ef().supportsDescriptors,aY=w_(),uY=Object.getOwnPropertyDescriptor,lY=Object.defineProperty,cY=TypeError,FI=Object.getPrototypeOf,fY=/a/;UI.exports=function(){if(!sY||!FI)throw new cY("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=aY(),e=FI(fY),o=uY(e,"flags");return(!o||o.get!==t)&&lY(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}});var qI=at((bst,kI)=>{"use strict";var hY=ef(),pY=pg(),dY=E_(),zI=w_(),gY=BI(),GI=pY(zI());hY(GI,{getPolyfill:zI,implementation:dY,shim:gY});kI.exports=GI});var VI=at((Ast,HI)=>{"use strict";var mY=Date.prototype.getDay,yY=function(t){try{return mY.call(t),!0}catch(e){return!1}},vY=Object.prototype.toString,_Y="[object Date]",xY=ng()();HI.exports=function(t){return typeof t!="object"||t===null?!1:xY?yY(t):vY.call(t)===_Y}});var S_=at((Tst,eR)=>{var WI=o_(),XI=cI(),YI=SI(),$I=CI(),ZI=qI(),JI=VI(),KI=Date.prototype.getTime;function tR(n,t,e){var o=e||{};return(o.strict?YI(n,t):n===t)?!0:!n||!t||typeof n!="object"&&typeof t!="object"?o.strict?YI(n,t):n==t:EY(n,t,o)}function jI(n){return n==null}function QI(n){return!(!n||typeof n!="object"||typeof n.length!="number"||typeof n.copy!="function"||typeof n.slice!="function"||n.length>0&&typeof n[0]!="number")}function EY(n,t,e){var o,s;if(typeof n!=typeof t||jI(n)||jI(t)||n.prototype!==t.prototype||XI(n)!==XI(t))return!1;var c=$I(n),h=$I(t);if(c!==h)return!1;if(c||h)return n.source===t.source&&ZI(n)===ZI(t);if(JI(n)&&JI(t))return KI.call(n)===KI.call(t);var p=QI(n),g=QI(t);if(p!==g)return!1;if(p||g){if(n.length!==t.length)return!1;for(o=0;o<n.length;o++)if(n[o]!==t[o])return!1;return!0}if(typeof n!=typeof t)return!1;try{var m=WI(n),_=WI(t)}catch(S){return!1}if(m.length!==_.length)return!1;for(m.sort(),_.sort(),o=m.length-1;o>=0;o--)if(m[o]!=_[o])return!1;for(o=m.length-1;o>=0;o--)if(s=m[o],!tR(n[s],t[s],e))return!1;return!0}eR.exports=tR});var D_=at((Nut,uR)=>{var f$=S_(),Ia=function(n){this.precision=n&&n.precision?n.precision:17,this.direction=n&&n.direction?n.direction:!1,this.pseudoNode=n&&n.pseudoNode?n.pseudoNode:!1,this.objectComparator=n&&n.objectComparator?n.objectComparator:h$};Ia.prototype.compare=function(n,t){if(n.type!==t.type||!aR(n,t))return!1;switch(n.type){case"Point":return this.compareCoord(n.coordinates,t.coordinates);case"LineString":return this.compareLine(n.coordinates,t.coordinates,0,!1);case"Polygon":return this.comparePolygon(n,t);case"Feature":return this.compareFeature(n,t);default:if(n.type.indexOf("Multi")===0){var e=this,o=sR(n),s=sR(t);return o.every(function(c){return this.some(function(h){return e.compare(c,h)})},s)}}return!1};function sR(n){return n.coordinates.map(function(t){return{type:n.type.replace("Multi",""),coordinates:t}})}function aR(n,t){return n.hasOwnProperty("coordinates")?n.coordinates.length===t.coordinates.length:n.length===t.length}Ia.prototype.compareCoord=function(n,t){if(n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(n[e].toFixed(this.precision)!==t[e].toFixed(this.precision))return!1;return!0};Ia.prototype.compareLine=function(n,t,e,o){if(!aR(n,t))return!1;var s=this.pseudoNode?n:this.removePseudo(n),c=this.pseudoNode?t:this.removePseudo(t);if(!(o&&!this.compareCoord(s[0],c[0])&&(c=this.fixStartIndex(c,s),!c))){var h=this.compareCoord(s[e],c[e]);return this.direction||h?this.comparePath(s,c):this.compareCoord(s[e],c[c.length-(1+e)])?this.comparePath(s.slice().reverse(),c):!1}};Ia.prototype.fixStartIndex=function(n,t){for(var e,o=-1,s=0;s<n.length;s++)if(this.compareCoord(n[s],t[0])){o=s;break}return o>=0&&(e=[].concat(n.slice(o,n.length),n.slice(1,o+1))),e};Ia.prototype.comparePath=function(n,t){var e=this;return n.every(function(o,s){return e.compareCoord(o,this[s])},t)};Ia.prototype.comparePolygon=function(n,t){if(this.compareLine(n.coordinates[0],t.coordinates[0],1,!0)){var e=n.coordinates.slice(1,n.coordinates.length),o=t.coordinates.slice(1,t.coordinates.length),s=this;return e.every(function(c){return this.some(function(h){return s.compareLine(c,h,1,!0)})},o)}else return!1};Ia.prototype.compareFeature=function(n,t){return n.id!==t.id||!this.objectComparator(n.properties,t.properties)||!this.compareBBox(n,t)?!1:this.compare(n.geometry,t.geometry)};Ia.prototype.compareBBox=function(n,t){return!!(!n.bbox&&!t.bbox||n.bbox&&t.bbox&&this.compareCoord(n.bbox,t.bbox))};Ia.prototype.removePseudo=function(n){return n};function h$(n,t){return f$(n,t,{strict:!0})}uR.exports=Ia});var lR=at((Wut,vg)=>{function ju(n,t,e,o){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(n,t,e,o)}ju.prototype.run=function(n,t,e,o){this._init(n,t,e,o);for(var s=0;s<this._datasetLength;s++)if(this._visited[s]!==1){this._visited[s]=1;var c=this._regionQuery(s);if(c.length<this.minPts)this.noise.push(s);else{var h=this.clusters.length;this.clusters.push([]),this._addToCluster(s,h),this._expandCluster(h,c)}}return this.clusters};ju.prototype._init=function(n,t,e,o){if(n){if(!(n instanceof Array))throw Error("Dataset must be of type array, "+typeof n+" given");this.dataset=n,this.clusters=[],this.noise=[],this._datasetLength=n.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}t&&(this.epsilon=t),e&&(this.minPts=e),o&&(this.distance=o)};ju.prototype._expandCluster=function(n,t){for(var e=0;e<t.length;e++){var o=t[e];if(this._visited[o]!==1){this._visited[o]=1;var s=this._regionQuery(o);s.length>=this.minPts&&(t=this._mergeArrays(t,s))}this._assigned[o]!==1&&this._addToCluster(o,n)}};ju.prototype._addToCluster=function(n,t){this.clusters[t].push(n),this._assigned[n]=1};ju.prototype._regionQuery=function(n){for(var t=[],e=0;e<this._datasetLength;e++){var o=this.distance(this.dataset[n],this.dataset[e]);o<this.epsilon&&t.push(e)}return t};ju.prototype._mergeArrays=function(n,t){for(var e=t.length,o=0;o<e;o++){var s=t[o];n.indexOf(s)<0&&n.push(s)}return n};ju.prototype._euclideanDistance=function(n,t){for(var e=0,o=Math.min(n.length,t.length);o--;)e+=(n[o]-t[o])*(n[o]-t[o]);return Math.sqrt(e)};typeof vg!="undefined"&&vg.exports&&(vg.exports=ju)});var cR=at((Xut,_g)=>{function Qu(n,t,e){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(n,t,e)}Qu.prototype.init=function(n,t,e){this.assignments=[],this.centroids=[],typeof n!="undefined"&&(this.dataset=n),typeof t!="undefined"&&(this.k=t),typeof e!="undefined"&&(this.distance=e)};Qu.prototype.run=function(n,t){this.init(n,t);for(var e=this.dataset.length,o=0;o<this.k;o++)this.centroids[o]=this.randomCentroid();for(var s=!0;s;){s=this.assign();for(var c=0;c<this.k;c++){for(var h=new Array(_),p=0,g=0;g<_;g++)h[g]=0;for(var m=0;m<e;m++){var _=this.dataset[m].length;if(c===this.assignments[m]){for(var g=0;g<_;g++)h[g]+=this.dataset[m][g];p++}}if(p>0){for(var g=0;g<_;g++)h[g]/=p;this.centroids[c]=h}else this.centroids[c]=this.randomCentroid(),s=!0}}return this.getClusters()};Qu.prototype.randomCentroid=function(){var n=this.dataset.length-1,t,e;do e=Math.round(Math.random()*n),t=this.dataset[e];while(this.centroids.indexOf(t)>=0);return t};Qu.prototype.assign=function(){for(var n=!1,t=this.dataset.length,e,o=0;o<t;o++)e=this.argmin(this.dataset[o],this.centroids,this.distance),e!=this.assignments[o]&&(this.assignments[o]=e,n=!0);return n};Qu.prototype.getClusters=function(){for(var n=new Array(this.k),t,e=0;e<this.assignments.length;e++)t=this.assignments[e],typeof n[t]=="undefined"&&(n[t]=[]),n[t].push(e);return n};Qu.prototype.argmin=function(n,t,e){for(var o=Number.MAX_VALUE,s=0,c=t.length,h,p=0;p<c;p++)h=e(n,t[p]),h<o&&(o=h,s=p);return s};Qu.prototype.distance=function(n,t){for(var e=0,o=Math.min(n.length,t.length);o--;){var s=n[o]-t[o];e+=s*s}return Math.sqrt(e)};typeof _g!="undefined"&&_g.exports&&(_g.exports=Qu)});var F_=at((Yut,xg)=>{function Ra(n,t,e){this._queue=[],this._priorities=[],this._sorting="desc",this._init(n,t,e)}Ra.prototype.insert=function(n,t){for(var e=this._queue.length,o=e;o--;){var s=this._priorities[o];this._sorting==="desc"?t>s&&(e=o):t<s&&(e=o)}this._insertAt(n,t,e)};Ra.prototype.remove=function(n){for(var t=this._queue.length;t--;){var e=this._queue[t];if(n===e){this._queue.splice(t,1),this._priorities.splice(t,1);break}}};Ra.prototype.forEach=function(n){this._queue.forEach(n)};Ra.prototype.getElements=function(){return this._queue};Ra.prototype.getElementPriority=function(n){return this._priorities[n]};Ra.prototype.getPriorities=function(){return this._priorities};Ra.prototype.getElementsWithPriorities=function(){for(var n=[],t=0,e=this._queue.length;t<e;t++)n.push([this._queue[t],this._priorities[t]]);return n};Ra.prototype._init=function(n,t,e){if(n&&t){if(this._queue=[],this._priorities=[],n.length!==t.length)throw new Error("Arrays must have the same length");for(var o=0;o<n.length;o++)this.insert(n[o],t[o])}e&&(this._sorting=e)};Ra.prototype._insertAt=function(n,t,e){this._queue.length===e?(this._queue.push(n),this._priorities.push(t)):(this._queue.splice(e,0,n),this._priorities.splice(e,0,t))};typeof xg!="undefined"&&xg.exports&&(xg.exports=Ra)});var hR=at(($ut,rf)=>{typeof rf!="undefined"&&rf.exports&&(fR=F_());var fR;function hu(n,t,e,o){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(n,t,e,o)}hu.prototype.run=function(n,t,e,o){this._init(n,t,e,o);for(var s=0,c=this.dataset.length;s<c;s++)if(this._processed[s]!==1){this._processed[s]=1,this.clusters.push([s]);var h=this.clusters.length-1;this._orderedList.push(s);var p=new fR(null,null,"asc"),g=this._regionQuery(s);this._distanceToCore(s)!==void 0&&(this._updateQueue(s,g,p),this._expandCluster(h,p))}return this.clusters};hu.prototype.getReachabilityPlot=function(){for(var n=[],t=0,e=this._orderedList.length;t<e;t++){var o=this._orderedList[t],s=this._reachability[o];n.push([o,s])}return n};hu.prototype._init=function(n,t,e,o){if(n){if(!(n instanceof Array))throw Error("Dataset must be of type array, "+typeof n+" given");this.dataset=n,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}t&&(this.epsilon=t),e&&(this.minPts=e),o&&(this.distance=o)};hu.prototype._updateQueue=function(n,t,e){var o=this;this._coreDistance=this._distanceToCore(n),t.forEach(function(s){if(o._processed[s]===void 0){var c=o.distance(o.dataset[n],o.dataset[s]),h=Math.max(o._coreDistance,c);o._reachability[s]===void 0?(o._reachability[s]=h,e.insert(s,h)):h<o._reachability[s]&&(o._reachability[s]=h,e.remove(s),e.insert(s,h))}})};hu.prototype._expandCluster=function(n,t){for(var e=t.getElements(),o=0,s=e.length;o<s;o++){var c=e[o];if(this._processed[c]===void 0){var h=this._regionQuery(c);this._processed[c]=1,this.clusters[n].push(c),this._orderedList.push(c),this._distanceToCore(c)!==void 0&&(this._updateQueue(c,h,t),this._expandCluster(n,t))}}};hu.prototype._distanceToCore=function(n){for(var t=this.epsilon,e=0;e<t;e++){var o=this._regionQuery(n,e);if(o.length>=this.minPts)return e}};hu.prototype._regionQuery=function(n,t){t=t||this.epsilon;for(var e=[],o=0,s=this.dataset.length;o<s;o++)this.distance(this.dataset[n],this.dataset[o])<t&&e.push(o);return e};hu.prototype._euclideanDistance=function(n,t){for(var e=0,o=Math.min(n.length,t.length);o--;)e+=(n[o]-t[o])*(n[o]-t[o]);return Math.sqrt(e)};typeof rf!="undefined"&&rf.exports&&(rf.exports=hu)});var pR=at((Zut,Eg)=>{typeof Eg!="undefined"&&Eg.exports&&(Eg.exports={DBSCAN:lR(),KMEANS:cR(),OPTICS:hR(),PriorityQueue:F_()})});var U_=at((elt,gR)=>{"use strict";gR.exports={eudist:function(t,e,o){for(var s=t.length,c=0,h=0;h<s;h++){var p=(t[h]||0)-(e[h]||0);c+=p*p}return o?Math.sqrt(c):c},mandist:function(t,e,o){for(var s=t.length,c=0,h=0;h<s;h++)c+=Math.abs((t[h]||0)-(e[h]||0));return o?Math.sqrt(c):c},dist:function(t,e,o){var s=Math.abs(t-e);return o?s:s*s}}});var vR=at((nlt,yR)=>{"use strict";var mR=U_(),v$=mR.eudist,_$=mR.dist;yR.exports={kmrand:function(t,e){for(var o={},s=[],c=e<<2,h=t.length,p=t[0].length>0;s.length<e&&c-- >0;){var g=t[Math.floor(Math.random()*h)],m=p?g.join("_"):""+g;o[m]||(o[m]=!0,s.push(g))}if(s.length<e)throw new Error("Error initializating clusters");return s},kmpp:function(t,e){var o=t[0].length?v$:_$,s=[],c=t.length,h=t[0].length>0,p={},g=t[Math.floor(Math.random()*c)],m=h?g.join("_"):""+g;for(s.push(g),p[m]=!0;s.length<e;){for(var _=[],S=s.length,x=0,b=[],A=0;A<c;A++){for(var I=1/0,w=0;w<S;w++){var E=o(t[A],s[w]);E<=I&&(I=E)}_[A]=I}for(var R=0;R<c;R++)x+=_[R];for(var C=0;C<c;C++)b[C]={i:C,v:t[C],pr:_[C]/x,cs:0};b.sort(function(q,D){return q.pr-D.pr}),b[0].cs=b[0].pr;for(var F=1;F<c;F++)b[F].cs=b[F-1].cs+b[F].pr;for(var W=Math.random(),X=0;X<c-1&&b[X++].cs<W;);s.push(b[X-1].v)}return s}}});var SR=at((olt,wR)=>{"use strict";var B_=U_(),ER=vR(),x$=B_.eudist,rlt=B_.mandist,ilt=B_.dist,E$=ER.kmrand,w$=ER.kmpp,_R=1e4;function xR(n,t,e){e=e||[];for(var o=0;o<n;o++)e[o]=t;return e}function S$(n,t,e,o){var s=[],c=[],h=[],p=[],g=!1,m=o||_R,_=n.length,S=n[0].length,x=S>0,b=[];if(e)e=="kmrand"?s=E$(n,t):e=="kmpp"?s=w$(n,t):s=e;else for(var A={};s.length<t;){var I=Math.floor(Math.random()*_);A[I]||(A[I]=!0,s.push(n[I]))}do{xR(t,0,b);for(var w=0;w<_;w++){for(var E=1/0,R=0,C=0;C<t;C++){var p=x?x$(n[w],s[C]):Math.abs(n[w]-s[C]);p<=E&&(E=p,R=C)}h[w]=R,b[R]++}for(var F=[],c=[],W=0,X=0;X<t;X++)F[X]=x?xR(S,0,F[X]):0,c[X]=s[X];if(x){for(var q=0;q<t;q++)s[q]=[];for(var D=0;D<_;D++)for(var xt=h[D],B=F[xt],j=n[D],J=0;J<S;J++)B[J]+=j[J];g=!0;for(var Dt=0;Dt<t;Dt++){for(var Q=s[Dt],At=F[Dt],Mt=c[Dt],Rt=b[Dt],pt=0;pt<S;pt++)Q[pt]=At[pt]/Rt||0;if(g){for(var yt=0;yt<S;yt++)if(Mt[yt]!=Q[yt]){g=!1;break}}}}else{for(var K=0;K<_;K++){var Bt=h[K];F[Bt]+=n[K]}for(var Gt=0;Gt<t;Gt++)s[Gt]=F[Gt]/b[Gt]||0;g=!0;for(var ae=0;ae<t;ae++)if(c[ae]!=s[ae]){g=!1;break}}g=g||--m<=0}while(!g);return{it:_R-m,k:t,idxs:h,centroids:s}}wR.exports=S$});var lf=at((V_,W_)=>{(function(n,t){typeof V_=="object"&&typeof W_!="undefined"?W_.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self,n.polygonClipping=t())})(V_,function(){"use strict";function n(rt,P){var N={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},k,$,V,ht;return ht={next:st(0),throw:st(1),return:st(2)},typeof Symbol=="function"&&(ht[Symbol.iterator]=function(){return this}),ht;function st(Et){return function(G){return wt([Et,G])}}function wt(Et){if(k)throw new TypeError("Generator is already executing.");for(;N;)try{if(k=1,$&&(V=Et[0]&2?$.return:Et[0]?$.throw||((V=$.return)&&V.call($),0):$.next)&&!(V=V.call($,Et[1])).done)return V;switch($=0,V&&(Et=[Et[0]&2,V.value]),Et[0]){case 0:case 1:V=Et;break;case 4:return N.label++,{value:Et[1],done:!1};case 5:N.label++,$=Et[1],Et=[0];continue;case 7:Et=N.ops.pop(),N.trys.pop();continue;default:if(V=N.trys,!(V=V.length>0&&V[V.length-1])&&(Et[0]===6||Et[0]===2)){N=0;continue}if(Et[0]===3&&(!V||Et[1]>V[0]&&Et[1]<V[3])){N.label=Et[1];break}if(Et[0]===6&&N.label<V[1]){N.label=V[1],V=Et;break}if(V&&N.label<V[2]){N.label=V[2],N.ops.push(Et);break}V[2]&&N.ops.pop(),N.trys.pop();continue}Et=P.call(rt,N)}catch(G){Et=[6,G],$=0}finally{k=V=0}if(Et[0]&5)throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}}var t=function(){function rt(P,N){this.next=null,this.key=P,this.data=N,this.left=null,this.right=null}return rt}();function e(rt,P){return rt>P?1:rt<P?-1:0}function o(rt,P,N){for(var k=new t(null,null),$=k,V=k;;){var ht=N(rt,P.key);if(ht<0){if(P.left===null)break;if(N(rt,P.left.key)<0){var st=P.left;if(P.left=st.right,st.right=P,P=st,P.left===null)break}V.left=P,V=P,P=P.left}else if(ht>0){if(P.right===null)break;if(N(rt,P.right.key)>0){var st=P.right;if(P.right=st.left,st.left=P,P=st,P.right===null)break}$.right=P,$=P,P=P.right}else break}return $.right=P.left,V.left=P.right,P.left=k.right,P.right=k.left,P}function s(rt,P,N,k){var $=new t(rt,P);if(N===null)return $.left=$.right=null,$;N=o(rt,N,k);var V=k(rt,N.key);return V<0?($.left=N.left,$.right=N,N.left=null):V>=0&&($.right=N.right,$.left=N,N.right=null),$}function c(rt,P,N){var k=null,$=null;if(P){P=o(rt,P,N);var V=N(P.key,rt);V===0?(k=P.left,$=P.right):V<0?($=P.right,P.right=null,k=P):(k=P.left,P.left=null,$=P)}return{left:k,right:$}}function h(rt,P,N){return P===null?rt:(rt===null||(P=o(rt.key,P,N),P.left=rt),P)}function p(rt,P,N,k,$){if(rt){k(""+P+(N?"\\u2514\\u2500\\u2500 ":"\\u251C\\u2500\\u2500 ")+$(rt)+\`
|
|
117
117
|
\`);var V=P+(N?" ":"\\u2502 ");rt.left&&p(rt.left,V,!1,k,$),rt.right&&p(rt.right,V,!0,k,$)}}var g=function(){function rt(P){P===void 0&&(P=e),this._root=null,this._size=0,this._comparator=P}return rt.prototype.insert=function(P,N){return this._size++,this._root=s(P,N,this._root,this._comparator)},rt.prototype.add=function(P,N){var k=new t(P,N);this._root===null&&(k.left=k.right=null,this._size++,this._root=k);var $=this._comparator,V=o(P,this._root,$),ht=$(P,V.key);return ht===0?this._root=V:(ht<0?(k.left=V.left,k.right=V,V.left=null):ht>0&&(k.right=V.right,k.left=V,V.right=null),this._size++,this._root=k),this._root},rt.prototype.remove=function(P){this._root=this._remove(P,this._root,this._comparator)},rt.prototype._remove=function(P,N,k){var $;if(N===null)return null;N=o(P,N,k);var V=k(P,N.key);return V===0?(N.left===null?$=N.right:($=o(P,N.left,k),$.right=N.right),this._size--,$):N},rt.prototype.pop=function(){var P=this._root;if(P){for(;P.left;)P=P.left;return this._root=o(P.key,this._root,this._comparator),this._root=this._remove(P.key,this._root,this._comparator),{key:P.key,data:P.data}}return null},rt.prototype.findStatic=function(P){for(var N=this._root,k=this._comparator;N;){var $=k(P,N.key);if($===0)return N;$<0?N=N.left:N=N.right}return null},rt.prototype.find=function(P){return this._root&&(this._root=o(P,this._root,this._comparator),this._comparator(P,this._root.key)!==0)?null:this._root},rt.prototype.contains=function(P){for(var N=this._root,k=this._comparator;N;){var $=k(P,N.key);if($===0)return!0;$<0?N=N.left:N=N.right}return!1},rt.prototype.forEach=function(P,N){for(var k=this._root,$=[],V=!1;!V;)k!==null?($.push(k),k=k.left):$.length!==0?(k=$.pop(),P.call(N,k),k=k.right):V=!0;return this},rt.prototype.range=function(P,N,k,$){for(var V=[],ht=this._comparator,st=this._root,wt;V.length!==0||st;)if(st)V.push(st),st=st.left;else{if(st=V.pop(),wt=ht(st.key,N),wt>0)break;if(ht(st.key,P)>=0&&k.call($,st))return this;st=st.right}return this},rt.prototype.keys=function(){var P=[];return this.forEach(function(N){var k=N.key;return P.push(k)}),P},rt.prototype.values=function(){var P=[];return this.forEach(function(N){var k=N.data;return P.push(k)}),P},rt.prototype.min=function(){return this._root?this.minNode(this._root).key:null},rt.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},rt.prototype.minNode=function(P){if(P===void 0&&(P=this._root),P)for(;P.left;)P=P.left;return P},rt.prototype.maxNode=function(P){if(P===void 0&&(P=this._root),P)for(;P.right;)P=P.right;return P},rt.prototype.at=function(P){for(var N=this._root,k=!1,$=0,V=[];!k;)if(N)V.push(N),N=N.left;else if(V.length>0){if(N=V.pop(),$===P)return N;$++,N=N.right}else k=!0;return null},rt.prototype.next=function(P){var N=this._root,k=null;if(P.right){for(k=P.right;k.left;)k=k.left;return k}for(var $=this._comparator;N;){var V=$(P.key,N.key);if(V===0)break;V<0?(k=N,N=N.left):N=N.right}return k},rt.prototype.prev=function(P){var N=this._root,k=null;if(P.left!==null){for(k=P.left;k.right;)k=k.right;return k}for(var $=this._comparator;N;){var V=$(P.key,N.key);if(V===0)break;V<0?N=N.left:(k=N,N=N.right)}return k},rt.prototype.clear=function(){return this._root=null,this._size=0,this},rt.prototype.toList=function(){return S(this._root)},rt.prototype.load=function(P,N,k){N===void 0&&(N=[]),k===void 0&&(k=!1);var $=P.length,V=this._comparator;if(k&&A(P,N,0,$-1,V),this._root===null)this._root=m(P,N,0,$),this._size=$;else{var ht=b(this.toList(),_(P,N),V);$=this._size+$,this._root=x({head:ht},0,$)}return this},rt.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(rt.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(rt.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),rt.prototype.toString=function(P){P===void 0&&(P=function(k){return String(k.key)});var N=[];return p(this._root,"",!0,function(k){return N.push(k)},P),N.join("")},rt.prototype.update=function(P,N,k){var $=this._comparator,V=c(P,this._root,$),ht=V.left,st=V.right;$(P,N)<0?st=s(N,k,st,$):ht=s(N,k,ht,$),this._root=h(ht,st,$)},rt.prototype.split=function(P){return c(P,this._root,this._comparator)},rt.prototype[Symbol.iterator]=function(){var P,N,k;return n(this,function($){switch($.label){case 0:P=this._root,N=[],k=!1,$.label=1;case 1:return k?[3,6]:P===null?[3,2]:(N.push(P),P=P.left,[3,5]);case 2:return N.length===0?[3,4]:(P=N.pop(),[4,P]);case 3:return $.sent(),P=P.right,[3,5];case 4:k=!0,$.label=5;case 5:return[3,1];case 6:return[2]}})},rt}();function m(rt,P,N,k){var $=k-N;if($>0){var V=N+Math.floor($/2),ht=rt[V],st=P[V],wt=new t(ht,st);return wt.left=m(rt,P,N,V),wt.right=m(rt,P,V+1,k),wt}return null}function _(rt,P){for(var N=new t(null,null),k=N,$=0;$<rt.length;$++)k=k.next=new t(rt[$],P[$]);return k.next=null,N.next}function S(rt){for(var P=rt,N=[],k=!1,$=new t(null,null),V=$;!k;)P?(N.push(P),P=P.left):N.length>0?(P=V=V.next=N.pop(),P=P.right):k=!0;return V.next=null,$.next}function x(rt,P,N){var k=N-P;if(k>0){var $=P+Math.floor(k/2),V=x(rt,P,$),ht=rt.head;return ht.left=V,rt.head=rt.head.next,ht.right=x(rt,$+1,N),ht}return null}function b(rt,P,N){for(var k=new t(null,null),$=k,V=rt,ht=P;V!==null&&ht!==null;)N(V.key,ht.key)<0?($.next=V,V=V.next):($.next=ht,ht=ht.next),$=$.next;return V!==null?$.next=V:ht!==null&&($.next=ht),k.next}function A(rt,P,N,k,$){if(!(N>=k)){for(var V=rt[N+k>>1],ht=N-1,st=k+1;;){do ht++;while($(rt[ht],V)<0);do st--;while($(rt[st],V)>0);if(ht>=st)break;var wt=rt[ht];rt[ht]=rt[st],rt[st]=wt,wt=P[ht],P[ht]=P[st],P[st]=wt}A(rt,P,N,st,$),A(rt,P,st+1,k,$)}}let I=(rt,P)=>rt.ll.x<=P.x&&P.x<=rt.ur.x&&rt.ll.y<=P.y&&P.y<=rt.ur.y,w=(rt,P)=>{if(P.ur.x<rt.ll.x||rt.ur.x<P.ll.x||P.ur.y<rt.ll.y||rt.ur.y<P.ll.y)return null;let N=rt.ll.x<P.ll.x?P.ll.x:rt.ll.x,k=rt.ur.x<P.ur.x?rt.ur.x:P.ur.x,$=rt.ll.y<P.ll.y?P.ll.y:rt.ll.y,V=rt.ur.y<P.ur.y?rt.ur.y:P.ur.y;return{ll:{x:N,y:$},ur:{x:k,y:V}}},E=Number.EPSILON;E===void 0&&(E=Math.pow(2,-52));let R=E*E,C=(rt,P)=>{if(-E<rt&&rt<E&&-E<P&&P<E)return 0;let N=rt-P;return N*N<R*rt*P?0:rt<P?-1:1};class F{constructor(){this.reset()}reset(){this.xRounder=new W,this.yRounder=new W}round(P,N){return{x:this.xRounder.round(P),y:this.yRounder.round(N)}}}class W{constructor(){this.tree=new g,this.round(0)}round(P){let N=this.tree.add(P),k=this.tree.prev(N);if(k!==null&&C(N.key,k.key)===0)return this.tree.remove(P),k.key;let $=this.tree.next(N);return $!==null&&C(N.key,$.key)===0?(this.tree.remove(P),$.key):P}}let X=new F,q=11102230246251565e-32,D=134217729,xt=(3+8*q)*q;function B(rt,P,N,k,$){let V,ht,st,wt,Et=P[0],G=k[0],ot=0,et=0;G>Et==G>-Et?(V=Et,Et=P[++ot]):(V=G,G=k[++et]);let lt=0;if(ot<rt&&et<N)for(G>Et==G>-Et?(ht=Et+V,st=V-(ht-Et),Et=P[++ot]):(ht=G+V,st=V-(ht-G),G=k[++et]),V=ht,st!==0&&($[lt++]=st);ot<rt&&et<N;)G>Et==G>-Et?(ht=V+Et,wt=ht-V,st=V-(ht-wt)+(Et-wt),Et=P[++ot]):(ht=V+G,wt=ht-V,st=V-(ht-wt)+(G-wt),G=k[++et]),V=ht,st!==0&&($[lt++]=st);for(;ot<rt;)ht=V+Et,wt=ht-V,st=V-(ht-wt)+(Et-wt),Et=P[++ot],V=ht,st!==0&&($[lt++]=st);for(;et<N;)ht=V+G,wt=ht-V,st=V-(ht-wt)+(G-wt),G=k[++et],V=ht,st!==0&&($[lt++]=st);return(V!==0||lt===0)&&($[lt++]=V),lt}function j(rt,P){let N=P[0];for(let k=1;k<rt;k++)N+=P[k];return N}function J(rt){return new Float64Array(rt)}let Dt=(3+16*q)*q,Q=(2+12*q)*q,At=(9+64*q)*q*q,Mt=J(4),Rt=J(8),pt=J(12),yt=J(16),K=J(4);function Bt(rt,P,N,k,$,V,ht){let st,wt,Et,G,ot,et,lt,Ft,Kt,me,ve,qe,Ue,Xe,Ke,Er,Zr,nr,Ie=rt-$,rr=N-$,pr=P-V,ar=k-V;Xe=Ie*ar,et=D*Ie,lt=et-(et-Ie),Ft=Ie-lt,et=D*ar,Kt=et-(et-ar),me=ar-Kt,Ke=Ft*me-(Xe-lt*Kt-Ft*Kt-lt*me),Er=pr*rr,et=D*pr,lt=et-(et-pr),Ft=pr-lt,et=D*rr,Kt=et-(et-rr),me=rr-Kt,Zr=Ft*me-(Er-lt*Kt-Ft*Kt-lt*me),ve=Ke-Zr,ot=Ke-ve,Mt[0]=Ke-(ve+ot)+(ot-Zr),qe=Xe+ve,ot=qe-Xe,Ue=Xe-(qe-ot)+(ve-ot),ve=Ue-Er,ot=Ue-ve,Mt[1]=Ue-(ve+ot)+(ot-Er),nr=qe+ve,ot=nr-qe,Mt[2]=qe-(nr-ot)+(ve-ot),Mt[3]=nr;let Qn=j(4,Mt),Si=Q*ht;if(Qn>=Si||-Qn>=Si||(ot=rt-Ie,st=rt-(Ie+ot)+(ot-$),ot=N-rr,Et=N-(rr+ot)+(ot-$),ot=P-pr,wt=P-(pr+ot)+(ot-V),ot=k-ar,G=k-(ar+ot)+(ot-V),st===0&&wt===0&&Et===0&&G===0)||(Si=At*ht+xt*Math.abs(Qn),Qn+=Ie*G+ar*st-(pr*Et+rr*wt),Qn>=Si||-Qn>=Si))return Qn;Xe=st*ar,et=D*st,lt=et-(et-st),Ft=st-lt,et=D*ar,Kt=et-(et-ar),me=ar-Kt,Ke=Ft*me-(Xe-lt*Kt-Ft*Kt-lt*me),Er=wt*rr,et=D*wt,lt=et-(et-wt),Ft=wt-lt,et=D*rr,Kt=et-(et-rr),me=rr-Kt,Zr=Ft*me-(Er-lt*Kt-Ft*Kt-lt*me),ve=Ke-Zr,ot=Ke-ve,K[0]=Ke-(ve+ot)+(ot-Zr),qe=Xe+ve,ot=qe-Xe,Ue=Xe-(qe-ot)+(ve-ot),ve=Ue-Er,ot=Ue-ve,K[1]=Ue-(ve+ot)+(ot-Er),nr=qe+ve,ot=nr-qe,K[2]=qe-(nr-ot)+(ve-ot),K[3]=nr;let ii=B(4,Mt,4,K,Rt);Xe=Ie*G,et=D*Ie,lt=et-(et-Ie),Ft=Ie-lt,et=D*G,Kt=et-(et-G),me=G-Kt,Ke=Ft*me-(Xe-lt*Kt-Ft*Kt-lt*me),Er=pr*Et,et=D*pr,lt=et-(et-pr),Ft=pr-lt,et=D*Et,Kt=et-(et-Et),me=Et-Kt,Zr=Ft*me-(Er-lt*Kt-Ft*Kt-lt*me),ve=Ke-Zr,ot=Ke-ve,K[0]=Ke-(ve+ot)+(ot-Zr),qe=Xe+ve,ot=qe-Xe,Ue=Xe-(qe-ot)+(ve-ot),ve=Ue-Er,ot=Ue-ve,K[1]=Ue-(ve+ot)+(ot-Er),nr=qe+ve,ot=nr-qe,K[2]=qe-(nr-ot)+(ve-ot),K[3]=nr;let Z=B(ii,Rt,4,K,pt);Xe=st*G,et=D*st,lt=et-(et-st),Ft=st-lt,et=D*G,Kt=et-(et-G),me=G-Kt,Ke=Ft*me-(Xe-lt*Kt-Ft*Kt-lt*me),Er=wt*Et,et=D*wt,lt=et-(et-wt),Ft=wt-lt,et=D*Et,Kt=et-(et-Et),me=Et-Kt,Zr=Ft*me-(Er-lt*Kt-Ft*Kt-lt*me),ve=Ke-Zr,ot=Ke-ve,K[0]=Ke-(ve+ot)+(ot-Zr),qe=Xe+ve,ot=qe-Xe,Ue=Xe-(qe-ot)+(ve-ot),ve=Ue-Er,ot=Ue-ve,K[1]=Ue-(ve+ot)+(ot-Er),nr=qe+ve,ot=nr-qe,K[2]=qe-(nr-ot)+(ve-ot),K[3]=nr;let mt=B(Z,pt,4,K,yt);return yt[mt-1]}function Gt(rt,P,N,k,$,V){let ht=(P-V)*(N-$),st=(rt-$)*(k-V),wt=ht-st,Et=Math.abs(ht+st);return Math.abs(wt)>=Dt*Et?wt:-Bt(rt,P,N,k,$,V,Et)}let ae=(rt,P)=>rt.x*P.y-rt.y*P.x,ut=(rt,P)=>rt.x*P.x+rt.y*P.y,Ut=(rt,P,N)=>{let k=Gt(rt.x,rt.y,P.x,P.y,N.x,N.y);return k>0?-1:k<0?1:0},jt=rt=>Math.sqrt(ut(rt,rt)),ce=(rt,P,N)=>{let k={x:P.x-rt.x,y:P.y-rt.y},$={x:N.x-rt.x,y:N.y-rt.y};return ae($,k)/jt($)/jt(k)},te=(rt,P,N)=>{let k={x:P.x-rt.x,y:P.y-rt.y},$={x:N.x-rt.x,y:N.y-rt.y};return ut($,k)/jt($)/jt(k)},$t=(rt,P,N)=>P.y===0?null:{x:rt.x+P.x/P.y*(N-rt.y),y:N},qt=(rt,P,N)=>P.x===0?null:{x:N,y:rt.y+P.y/P.x*(N-rt.x)},xe=(rt,P,N,k)=>{if(P.x===0)return qt(N,k,rt.x);if(k.x===0)return qt(rt,P,N.x);if(P.y===0)return $t(N,k,rt.y);if(k.y===0)return $t(rt,P,N.y);let $=ae(P,k);if($==0)return null;let V={x:N.x-rt.x,y:N.y-rt.y},ht=ae(V,P)/$,st=ae(V,k)/$,wt=rt.x+st*P.x,Et=N.x+ht*k.x,G=rt.y+st*P.y,ot=N.y+ht*k.y,et=(wt+Et)/2,lt=(G+ot)/2;return{x:et,y:lt}};class ft{static compare(P,N){let k=ft.comparePoints(P.point,N.point);return k!==0?k:(P.point!==N.point&&P.link(N),P.isLeft!==N.isLeft?P.isLeft?1:-1:ee.compare(P.segment,N.segment))}static comparePoints(P,N){return P.x<N.x?-1:P.x>N.x?1:P.y<N.y?-1:P.y>N.y?1:0}constructor(P,N){P.events===void 0?P.events=[this]:P.events.push(this),this.point=P,this.isLeft=N}link(P){if(P.point===this.point)throw new Error("Tried to link already linked events");let N=P.point.events;for(let k=0,$=N.length;k<$;k++){let V=N[k];this.point.events.push(V),V.point=this.point}this.checkForConsuming()}checkForConsuming(){let P=this.point.events.length;for(let N=0;N<P;N++){let k=this.point.events[N];if(k.segment.consumedBy===void 0)for(let $=N+1;$<P;$++){let V=this.point.events[$];V.consumedBy===void 0&&k.otherSE.point.events===V.otherSE.point.events&&k.segment.consume(V.segment)}}}getAvailableLinkedEvents(){let P=[];for(let N=0,k=this.point.events.length;N<k;N++){let $=this.point.events[N];$!==this&&!$.segment.ringOut&&$.segment.isInResult()&&P.push($)}return P}getLeftmostComparator(P){let N=new Map,k=$=>{let V=$.otherSE;N.set($,{sine:ce(this.point,P.point,V.point),cosine:te(this.point,P.point,V.point)})};return($,V)=>{N.has($)||k($),N.has(V)||k(V);let{sine:ht,cosine:st}=N.get($),{sine:wt,cosine:Et}=N.get(V);return ht>=0&&wt>=0?st<Et?1:st>Et?-1:0:ht<0&&wt<0?st<Et?-1:st>Et?1:0:wt<ht?-1:wt>ht?1:0}}}let We=0;class ee{static compare(P,N){let k=P.leftSE.point.x,$=N.leftSE.point.x,V=P.rightSE.point.x,ht=N.rightSE.point.x;if(ht<k)return 1;if(V<$)return-1;let st=P.leftSE.point.y,wt=N.leftSE.point.y,Et=P.rightSE.point.y,G=N.rightSE.point.y;if(k<$){if(wt<st&&wt<Et)return 1;if(wt>st&&wt>Et)return-1;let ot=P.comparePoint(N.leftSE.point);if(ot<0)return 1;if(ot>0)return-1;let et=N.comparePoint(P.rightSE.point);return et!==0?et:-1}if(k>$){if(st<wt&&st<G)return-1;if(st>wt&&st>G)return 1;let ot=N.comparePoint(P.leftSE.point);if(ot!==0)return ot;let et=P.comparePoint(N.rightSE.point);return et<0?1:et>0?-1:1}if(st<wt)return-1;if(st>wt)return 1;if(V<ht){let ot=N.comparePoint(P.rightSE.point);if(ot!==0)return ot}if(V>ht){let ot=P.comparePoint(N.rightSE.point);if(ot<0)return 1;if(ot>0)return-1}if(V!==ht){let ot=Et-st,et=V-k,lt=G-wt,Ft=ht-$;if(ot>et&<<Ft)return 1;if(ot<et&<>Ft)return-1}return V>ht?1:V<ht||Et<G?-1:Et>G?1:P.id<N.id?-1:P.id>N.id?1:0}constructor(P,N,k,$){this.id=++We,this.leftSE=P,P.segment=this,P.otherSE=N,this.rightSE=N,N.segment=this,N.otherSE=P,this.rings=k,this.windings=$}static fromRing(P,N,k){let $,V,ht,st=ft.comparePoints(P,N);if(st<0)$=P,V=N,ht=1;else if(st>0)$=N,V=P,ht=-1;else throw new Error(\`Tried to create degenerate segment at [\${P.x}, \${P.y}]\`);let wt=new ft($,!0),Et=new ft(V,!1);return new ee(wt,Et,[k],[ht])}replaceRightSE(P){this.rightSE=P,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let P=this.leftSE.point.y,N=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:P<N?P:N},ur:{x:this.rightSE.point.x,y:P>N?P:N}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(P){return P.x===this.leftSE.point.x&&P.y===this.leftSE.point.y||P.x===this.rightSE.point.x&&P.y===this.rightSE.point.y}comparePoint(P){if(this.isAnEndpoint(P))return 0;let N=this.leftSE.point,k=this.rightSE.point,$=this.vector();if(N.x===k.x)return P.x===N.x?0:P.x<N.x?1:-1;let V=(P.y-N.y)/$.y,ht=N.x+V*$.x;if(P.x===ht)return 0;let st=(P.x-N.x)/$.x,wt=N.y+st*$.y;return P.y===wt?0:P.y<wt?-1:1}getIntersection(P){let N=this.bbox(),k=P.bbox(),$=w(N,k);if($===null)return null;let V=this.leftSE.point,ht=this.rightSE.point,st=P.leftSE.point,wt=P.rightSE.point,Et=I(N,st)&&this.comparePoint(st)===0,G=I(k,V)&&P.comparePoint(V)===0,ot=I(N,wt)&&this.comparePoint(wt)===0,et=I(k,ht)&&P.comparePoint(ht)===0;if(G&&Et)return et&&!ot?ht:!et&&ot?wt:null;if(G)return ot&&V.x===wt.x&&V.y===wt.y?null:V;if(Et)return et&&ht.x===st.x&&ht.y===st.y?null:st;if(et&&ot)return null;if(et)return ht;if(ot)return wt;let lt=xe(V,this.vector(),st,P.vector());return lt===null||!I($,lt)?null:X.round(lt.x,lt.y)}split(P){let N=[],k=P.events!==void 0,$=new ft(P,!0),V=new ft(P,!1),ht=this.rightSE;this.replaceRightSE(V),N.push(V),N.push($);let st=new ee($,ht,this.rings.slice(),this.windings.slice());return ft.comparePoints(st.leftSE.point,st.rightSE.point)>0&&st.swapEvents(),ft.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),k&&($.checkForConsuming(),V.checkForConsuming()),N}swapEvents(){let P=this.rightSE;this.rightSE=this.leftSE,this.leftSE=P,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let N=0,k=this.windings.length;N<k;N++)this.windings[N]*=-1}consume(P){let N=this,k=P;for(;N.consumedBy;)N=N.consumedBy;for(;k.consumedBy;)k=k.consumedBy;let $=ee.compare(N,k);if($!==0){if($>0){let V=N;N=k,k=V}if(N.prev===k){let V=N;N=k,k=V}for(let V=0,ht=k.rings.length;V<ht;V++){let st=k.rings[V],wt=k.windings[V],Et=N.rings.indexOf(st);Et===-1?(N.rings.push(st),N.windings.push(wt)):N.windings[Et]+=wt}k.rings=null,k.windings=null,k.consumedBy=N,k.leftSE.consumedBy=N.leftSE,k.rightSE.consumedBy=N.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let P=this.prev.consumedBy||this.prev;this._beforeState=P.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let P=this.beforeState();this._afterState={rings:P.rings.slice(0),windings:P.windings.slice(0),multiPolys:[]};let N=this._afterState.rings,k=this._afterState.windings,$=this._afterState.multiPolys;for(let st=0,wt=this.rings.length;st<wt;st++){let Et=this.rings[st],G=this.windings[st],ot=N.indexOf(Et);ot===-1?(N.push(Et),k.push(G)):k[ot]+=G}let V=[],ht=[];for(let st=0,wt=N.length;st<wt;st++){if(k[st]===0)continue;let Et=N[st],G=Et.poly;if(ht.indexOf(G)===-1)if(Et.isExterior)V.push(G);else{ht.indexOf(G)===-1&&ht.push(G);let ot=V.indexOf(Et.poly);ot!==-1&&V.splice(ot,1)}}for(let st=0,wt=V.length;st<wt;st++){let Et=V[st].multiPoly;$.indexOf(Et)===-1&&$.push(Et)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let P=this.beforeState().multiPolys,N=this.afterState().multiPolys;switch(dt.type){case"union":{let k=P.length===0,$=N.length===0;this._isInResult=k!==$;break}case"intersection":{let k,$;P.length<N.length?(k=P.length,$=N.length):(k=N.length,$=P.length),this._isInResult=$===dt.numMultiPolys&&k<$;break}case"xor":{let k=Math.abs(P.length-N.length);this._isInResult=k%2===1;break}case"difference":{let k=$=>$.length===1&&$[0].isSubject;this._isInResult=k(P)!==k(N);break}default:throw new Error(\`Unrecognized operation type found \${dt.type}\`)}return this._isInResult}}class ge{constructor(P,N,k){if(!Array.isArray(P)||P.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=N,this.isExterior=k,this.segments=[],typeof P[0][0]!="number"||typeof P[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let $=X.round(P[0][0],P[0][1]);this.bbox={ll:{x:$.x,y:$.y},ur:{x:$.x,y:$.y}};let V=$;for(let ht=1,st=P.length;ht<st;ht++){if(typeof P[ht][0]!="number"||typeof P[ht][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let wt=X.round(P[ht][0],P[ht][1]);wt.x===V.x&&wt.y===V.y||(this.segments.push(ee.fromRing(V,wt,this)),wt.x<this.bbox.ll.x&&(this.bbox.ll.x=wt.x),wt.y<this.bbox.ll.y&&(this.bbox.ll.y=wt.y),wt.x>this.bbox.ur.x&&(this.bbox.ur.x=wt.x),wt.y>this.bbox.ur.y&&(this.bbox.ur.y=wt.y),V=wt)}($.x!==V.x||$.y!==V.y)&&this.segments.push(ee.fromRing(V,$,this))}getSweepEvents(){let P=[];for(let N=0,k=this.segments.length;N<k;N++){let $=this.segments[N];P.push($.leftSE),P.push($.rightSE)}return P}}class fe{constructor(P,N){if(!Array.isArray(P))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new ge(P[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let k=1,$=P.length;k<$;k++){let V=new ge(P[k],this,!1);V.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=V.bbox.ll.x),V.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=V.bbox.ll.y),V.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=V.bbox.ur.x),V.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=V.bbox.ur.y),this.interiorRings.push(V)}this.multiPoly=N}getSweepEvents(){let P=this.exteriorRing.getSweepEvents();for(let N=0,k=this.interiorRings.length;N<k;N++){let $=this.interiorRings[N].getSweepEvents();for(let V=0,ht=$.length;V<ht;V++)P.push($[V])}return P}}class Te{constructor(P,N){if(!Array.isArray(P))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof P[0][0][0]=="number"&&(P=[P])}catch(k){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let k=0,$=P.length;k<$;k++){let V=new fe(P[k],this);V.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=V.bbox.ll.x),V.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=V.bbox.ll.y),V.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=V.bbox.ur.x),V.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=V.bbox.ur.y),this.polys.push(V)}this.isSubject=N}getSweepEvents(){let P=[];for(let N=0,k=this.polys.length;N<k;N++){let $=this.polys[N].getSweepEvents();for(let V=0,ht=$.length;V<ht;V++)P.push($[V])}return P}}class be{static factory(P){let N=[];for(let k=0,$=P.length;k<$;k++){let V=P[k];if(!V.isInResult()||V.ringOut)continue;let ht=null,st=V.leftSE,wt=V.rightSE,Et=[st],G=st.point,ot=[];for(;ht=st,st=wt,Et.push(st),st.point!==G;)for(;;){let et=st.getAvailableLinkedEvents();if(et.length===0){let Kt=Et[0].point,me=Et[Et.length-1].point;throw new Error(\`Unable to complete output ring starting at [\${Kt.x}, \${Kt.y}]. Last matching segment found ends at [\${me.x}, \${me.y}].\`)}if(et.length===1){wt=et[0].otherSE;break}let lt=null;for(let Kt=0,me=ot.length;Kt<me;Kt++)if(ot[Kt].point===st.point){lt=Kt;break}if(lt!==null){let Kt=ot.splice(lt)[0],me=Et.splice(Kt.index);me.unshift(me[0].otherSE),N.push(new be(me.reverse()));continue}ot.push({index:Et.length,point:st.point});let Ft=st.getLeftmostComparator(ht);wt=et.sort(Ft)[0].otherSE;break}N.push(new be(Et))}return N}constructor(P){this.events=P;for(let N=0,k=P.length;N<k;N++)P[N].segment.ringOut=this;this.poly=null}getGeom(){let P=this.events[0].point,N=[P];for(let Et=1,G=this.events.length-1;Et<G;Et++){let ot=this.events[Et].point,et=this.events[Et+1].point;Ut(ot,P,et)!==0&&(N.push(ot),P=ot)}if(N.length===1)return null;let k=N[0],$=N[1];Ut(k,P,$)===0&&N.shift(),N.push(N[0]);let V=this.isExteriorRing()?1:-1,ht=this.isExteriorRing()?0:N.length-1,st=this.isExteriorRing()?N.length:-1,wt=[];for(let Et=ht;Et!=st;Et+=V)wt.push([N[Et].x,N[Et].y]);return wt}isExteriorRing(){if(this._isExteriorRing===void 0){let P=this.enclosingRing();this._isExteriorRing=P?!P.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let P=this.events[0];for(let $=1,V=this.events.length;$<V;$++){let ht=this.events[$];ft.compare(P,ht)>0&&(P=ht)}let N=P.segment.prevInResult(),k=N?N.prevInResult():null;for(;;){if(!N)return null;if(!k)return N.ringOut;if(k.ringOut!==N.ringOut)return k.ringOut.enclosingRing()!==N.ringOut?N.ringOut:N.ringOut.enclosingRing();N=k.prevInResult(),k=N?N.prevInResult():null}}}class Wt{constructor(P){this.exteriorRing=P,P.poly=this,this.interiorRings=[]}addInterior(P){this.interiorRings.push(P),P.poly=this}getGeom(){let P=[this.exteriorRing.getGeom()];if(P[0]===null)return null;for(let N=0,k=this.interiorRings.length;N<k;N++){let $=this.interiorRings[N].getGeom();$!==null&&P.push($)}return P}}class Me{constructor(P){this.rings=P,this.polys=this._composePolys(P)}getGeom(){let P=[];for(let N=0,k=this.polys.length;N<k;N++){let $=this.polys[N].getGeom();$!==null&&P.push($)}return P}_composePolys(P){let N=[];for(let k=0,$=P.length;k<$;k++){let V=P[k];if(!V.poly)if(V.isExteriorRing())N.push(new Wt(V));else{let ht=V.enclosingRing();ht.poly||N.push(new Wt(ht)),ht.poly.addInterior(V)}}return N}}class tt{constructor(P){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.compare;this.queue=P,this.tree=new g(N),this.segments=[]}process(P){let N=P.segment,k=[];if(P.consumedBy)return P.isLeft?this.queue.remove(P.otherSE):this.tree.remove(N),k;let $=P.isLeft?this.tree.add(N):this.tree.find(N);if(!$)throw new Error(\`Unable to find segment #\${N.id} [\${N.leftSE.point.x}, \${N.leftSE.point.y}] -> [\${N.rightSE.point.x}, \${N.rightSE.point.y}] in SweepLine tree.\`);let V=$,ht=$,st,wt;for(;st===void 0;)V=this.tree.prev(V),V===null?st=null:V.key.consumedBy===void 0&&(st=V.key);for(;wt===void 0;)ht=this.tree.next(ht),ht===null?wt=null:ht.key.consumedBy===void 0&&(wt=ht.key);if(P.isLeft){let Et=null;if(st){let ot=st.getIntersection(N);if(ot!==null&&(N.isAnEndpoint(ot)||(Et=ot),!st.isAnEndpoint(ot))){let et=this._splitSafely(st,ot);for(let lt=0,Ft=et.length;lt<Ft;lt++)k.push(et[lt])}}let G=null;if(wt){let ot=wt.getIntersection(N);if(ot!==null&&(N.isAnEndpoint(ot)||(G=ot),!wt.isAnEndpoint(ot))){let et=this._splitSafely(wt,ot);for(let lt=0,Ft=et.length;lt<Ft;lt++)k.push(et[lt])}}if(Et!==null||G!==null){let ot=null;Et===null?ot=G:G===null?ot=Et:ot=ft.comparePoints(Et,G)<=0?Et:G,this.queue.remove(N.rightSE),k.push(N.rightSE);let et=N.split(ot);for(let lt=0,Ft=et.length;lt<Ft;lt++)k.push(et[lt])}k.length>0?(this.tree.remove(N),k.push(P)):(this.segments.push(N),N.prev=st)}else{if(st&&wt){let Et=st.getIntersection(wt);if(Et!==null){if(!st.isAnEndpoint(Et)){let G=this._splitSafely(st,Et);for(let ot=0,et=G.length;ot<et;ot++)k.push(G[ot])}if(!wt.isAnEndpoint(Et)){let G=this._splitSafely(wt,Et);for(let ot=0,et=G.length;ot<et;ot++)k.push(G[ot])}}}this.tree.remove(N)}return k}_splitSafely(P,N){this.tree.remove(P);let k=P.rightSE;this.queue.remove(k);let $=P.split(N);return $.push(k),P.consumedBy===void 0&&this.tree.add(P),$}}let z=typeof process!="undefined"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Pt=typeof process!="undefined"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class Ot{run(P,N,k){dt.type=P,X.reset();let $=[new Te(N,!0)];for(let ot=0,et=k.length;ot<et;ot++)$.push(new Te(k[ot],!1));if(dt.numMultiPolys=$.length,dt.type==="difference"){let ot=$[0],et=1;for(;et<$.length;)w($[et].bbox,ot.bbox)!==null?et++:$.splice(et,1)}if(dt.type==="intersection")for(let ot=0,et=$.length;ot<et;ot++){let lt=$[ot];for(let Ft=ot+1,Kt=$.length;Ft<Kt;Ft++)if(w(lt.bbox,$[Ft].bbox)===null)return[]}let V=new g(ft.compare);for(let ot=0,et=$.length;ot<et;ot++){let lt=$[ot].getSweepEvents();for(let Ft=0,Kt=lt.length;Ft<Kt;Ft++)if(V.insert(lt[Ft]),V.size>z)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}let ht=new tt(V),st=V.size,wt=V.pop();for(;wt;){let ot=wt.key;if(V.size===st){let lt=ot.segment;throw new Error(\`Unable to pop() \${ot.isLeft?"left":"right"} SweepEvent [\${ot.point.x}, \${ot.point.y}] from segment #\${lt.id} [\${lt.leftSE.point.x}, \${lt.leftSE.point.y}] -> [\${lt.rightSE.point.x}, \${lt.rightSE.point.y}] from queue.\`)}if(V.size>z)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(ht.segments.length>Pt)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");let et=ht.process(ot);for(let lt=0,Ft=et.length;lt<Ft;lt++){let Kt=et[lt];Kt.consumedBy===void 0&&V.insert(Kt)}st=V.size,wt=V.pop()}X.reset();let Et=be.factory(ht.segments);return new Me(Et).getGeom()}}let dt=new Ot;var ne={union:function(rt){for(var P=arguments.length,N=new Array(P>1?P-1:0),k=1;k<P;k++)N[k-1]=arguments[k];return dt.run("union",rt,N)},intersection:function(rt){for(var P=arguments.length,N=new Array(P>1?P-1:0),k=1;k<P;k++)N[k-1]=arguments[k];return dt.run("intersection",rt,N)},xor:function(rt){for(var P=arguments.length,N=new Array(P>1?P-1:0),k=1;k<P;k++)N[k-1]=arguments[k];return dt.run("xor",rt,N)},difference:function(rt){for(var P=arguments.length,N=new Array(P>1?P-1:0),k=1;k<P;k++)N[k-1]=arguments[k];return dt.run("difference",rt,N)}};return ne})});var qR=at((bg,kR)=>{(function(n,t){typeof bg=="object"&&typeof kR!="undefined"?t(bg):typeof define=="function"&&define.amd?define(["exports"],t):t(n.jsts={})})(bg,function(n){"use strict";function t(){}function e(r){this.message=r||""}function o(r){this.message=r||""}function s(r){this.message=r||""}function c(){}function h(r){return r===null?Ke:r.color}function p(r){return r===null?null:r.parent}function g(r,i){r!==null&&(r.color=i)}function m(r){return r===null?null:r.left}function _(r){return r===null?null:r.right}function S(){this.root_=null,this.size_=0}function x(){}function b(){this.array_=[],arguments[0]instanceof st&&this.addAll(arguments[0])}function A(){}function I(r){this.message=r||""}function w(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(r){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var i=Object(this),a=Math.max(Math.min(i.length,9007199254740991),0)||0,l=1 in arguments&&parseInt(Number(arguments[1]),10)||0;l=l<0?Math.max(a+l,0):Math.min(l,a);var d=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:a;for(d=d<0?Math.max(a+arguments[2],0):Math.min(d,a);l<d;)i[l]=r,++l;return i},writable:!0}),Number.isFinite=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Number.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(r){return r!=r},Math.trunc=Math.trunc||function(r){return r<0?Math.ceil(r):Math.floor(r)};var E=function(){};E.prototype.interfaces_=function(){return[]},E.prototype.getClass=function(){return E},E.prototype.equalsWithTolerance=function(r,i,a){return Math.abs(r-i)<=a};var R=function(r){function i(a){r.call(this,a),this.name="IllegalArgumentException",this.message=a,this.stack=new r().stack}return r&&(i.__proto__=r),i.prototype=Object.create(r&&r.prototype),i.prototype.constructor=i,i}(Error),C=function(){},F={MAX_VALUE:{configurable:!0}};C.isNaN=function(r){return Number.isNaN(r)},C.doubleToLongBits=function(r){return r},C.longBitsToDouble=function(r){return r},C.isInfinite=function(r){return!Number.isFinite(r)},F.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(C,F);var W=function(){},X=function(){},q=function(){},D=function r(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=r.NULL_ORDINATE;else if(arguments.length===1){var i=arguments[0];this.x=i.x,this.y=i.y,this.z=i.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=r.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},xt={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};D.prototype.setOrdinate=function(r,i){switch(r){case D.X:this.x=i;break;case D.Y:this.y=i;break;case D.Z:this.z=i;break;default:throw new R("Invalid ordinate index: "+r)}},D.prototype.equals2D=function(){if(arguments.length===1){var r=arguments[0];return this.x===r.x&&this.y===r.y}if(arguments.length===2){var i=arguments[0],a=arguments[1];return!!E.equalsWithTolerance(this.x,i.x,a)&&!!E.equalsWithTolerance(this.y,i.y,a)}},D.prototype.getOrdinate=function(r){switch(r){case D.X:return this.x;case D.Y:return this.y;case D.Z:return this.z}throw new R("Invalid ordinate index: "+r)},D.prototype.equals3D=function(r){return this.x===r.x&&this.y===r.y&&(this.z===r.z||C.isNaN(this.z))&&C.isNaN(r.z)},D.prototype.equals=function(r){return r instanceof D&&this.equals2D(r)},D.prototype.equalInZ=function(r,i){return E.equalsWithTolerance(this.z,r.z,i)},D.prototype.compareTo=function(r){var i=r;return this.x<i.x?-1:this.x>i.x?1:this.y<i.y?-1:this.y>i.y?1:0},D.prototype.clone=function(){},D.prototype.copy=function(){return new D(this)},D.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},D.prototype.distance3D=function(r){var i=this.x-r.x,a=this.y-r.y,l=this.z-r.z;return Math.sqrt(i*i+a*a+l*l)},D.prototype.distance=function(r){var i=this.x-r.x,a=this.y-r.y;return Math.sqrt(i*i+a*a)},D.prototype.hashCode=function(){var r=17;return r=37*r+D.hashCode(this.x),r=37*r+D.hashCode(this.y)},D.prototype.setCoordinate=function(r){this.x=r.x,this.y=r.y,this.z=r.z},D.prototype.interfaces_=function(){return[W,X,t]},D.prototype.getClass=function(){return D},D.hashCode=function(){if(arguments.length===1){var r=arguments[0],i=C.doubleToLongBits(r);return Math.trunc((i^i)>>>32)}},xt.DimensionalComparator.get=function(){return B},xt.serialVersionUID.get=function(){return 6683108902428367e3},xt.NULL_ORDINATE.get=function(){return C.NaN},xt.X.get=function(){return 0},xt.Y.get=function(){return 1},xt.Z.get=function(){return 2},Object.defineProperties(D,xt);var B=function(r){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var i=arguments[0];if(i!==2&&i!==3)throw new R("only 2 or 3 dimensions may be specified");this._dimensionsToTest=i}}};B.prototype.compare=function(r,i){var a=r,l=i,d=B.compare(a.x,l.x);if(d!==0)return d;var v=B.compare(a.y,l.y);return v!==0?v:this._dimensionsToTest<=2?0:B.compare(a.z,l.z)},B.prototype.interfaces_=function(){return[q]},B.prototype.getClass=function(){return B},B.compare=function(r,i){return r<i?-1:r>i?1:C.isNaN(r)?C.isNaN(i)?0:-1:C.isNaN(i)?1:0};var j=function(){};j.prototype.create=function(){},j.prototype.interfaces_=function(){return[]},j.prototype.getClass=function(){return j};var J=function(){},Dt={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};J.prototype.interfaces_=function(){return[]},J.prototype.getClass=function(){return J},J.toLocationSymbol=function(r){switch(r){case J.EXTERIOR:return"e";case J.BOUNDARY:return"b";case J.INTERIOR:return"i";case J.NONE:return"-"}throw new R("Unknown location value: "+r)},Dt.INTERIOR.get=function(){return 0},Dt.BOUNDARY.get=function(){return 1},Dt.EXTERIOR.get=function(){return 2},Dt.NONE.get=function(){return-1},Object.defineProperties(J,Dt);var Q=function(r,i){return r.interfaces_&&r.interfaces_().indexOf(i)>-1},At=function(){},Mt={LOG_10:{configurable:!0}};At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},At.log10=function(r){var i=Math.log(r);return C.isInfinite(i)||C.isNaN(i)?i:i/At.LOG_10},At.min=function(r,i,a,l){var d=r;return i<d&&(d=i),a<d&&(d=a),l<d&&(d=l),d},At.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1],a=arguments[2];return r<i?i:r>a?a:r}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var l=arguments[0],d=arguments[1],v=arguments[2];return l<d?d:l>v?v:l}},At.wrap=function(r,i){return r<0?i- -r%i:r%i},At.max=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2],l=r;return i>l&&(l=i),a>l&&(l=a),l}if(arguments.length===4){var d=arguments[0],v=arguments[1],M=arguments[2],L=arguments[3],H=d;return v>H&&(H=v),M>H&&(H=M),L>H&&(H=L),H}},At.average=function(r,i){return(r+i)/2},Mt.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(At,Mt);var Rt=function(r){this.str=r};Rt.prototype.append=function(r){this.str+=r},Rt.prototype.setCharAt=function(r,i){this.str=this.str.substr(0,r)+i+this.str.substr(r+1)},Rt.prototype.toString=function(r){return this.str};var pt=function(r){this.value=r};pt.prototype.intValue=function(){return this.value},pt.prototype.compareTo=function(r){return this.value<r?-1:this.value>r?1:0},pt.isNaN=function(r){return Number.isNaN(r)};var yt=function(){};yt.isWhitespace=function(r){return r<=32&&r>=0||r===127},yt.toUpperCase=function(r){return r.toUpperCase()};var K=function r(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var i=arguments[0];this.init(i)}else if(arguments[0]instanceof r){var a=arguments[0];this.init(a)}else if(typeof arguments[0]=="string"){var l=arguments[0];r.call(this,r.parse(l))}}else if(arguments.length===2){var d=arguments[0],v=arguments[1];this.init(d,v)}},Bt={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};K.prototype.le=function(r){return(this._hi<r._hi||this._hi===r._hi)&&this._lo<=r._lo},K.prototype.extractSignificantDigits=function(r,i){var a=this.abs(),l=K.magnitude(a._hi),d=K.TEN.pow(l);(a=a.divide(d)).gt(K.TEN)?(a=a.divide(K.TEN),l+=1):a.lt(K.ONE)&&(a=a.multiply(K.TEN),l-=1);for(var v=l+1,M=new Rt,L=K.MAX_PRINT_DIGITS-1,H=0;H<=L;H++){r&&H===v&&M.append(".");var it=Math.trunc(a._hi);if(it<0)break;var bt=!1,Tt=0;it>9?(bt=!0,Tt="9"):Tt="0"+it,M.append(Tt),a=a.subtract(K.valueOf(it)).multiply(K.TEN),bt&&a.selfAdd(K.TEN);var Jt=!0,Qt=K.magnitude(a._hi);if(Qt<0&&Math.abs(Qt)>=L-H&&(Jt=!1),!Jt)break}return i[0]=l,M.toString()},K.prototype.sqr=function(){return this.multiply(this)},K.prototype.doubleValue=function(){return this._hi+this._lo},K.prototype.subtract=function(){if(arguments[0]instanceof K){var r=arguments[0];return this.add(r.negate())}if(typeof arguments[0]=="number"){var i=arguments[0];return this.add(-i)}},K.prototype.equals=function(){if(arguments.length===1){var r=arguments[0];return this._hi===r._hi&&this._lo===r._lo}},K.prototype.isZero=function(){return this._hi===0&&this._lo===0},K.prototype.selfSubtract=function(){if(arguments[0]instanceof K){var r=arguments[0];return this.isNaN()?this:this.selfAdd(-r._hi,-r._lo)}if(typeof arguments[0]=="number"){var i=arguments[0];return this.isNaN()?this:this.selfAdd(-i,0)}},K.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},K.prototype.min=function(r){return this.le(r)?this:r},K.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof K){var r=arguments[0];return this.selfDivide(r._hi,r._lo)}if(typeof arguments[0]=="number"){var i=arguments[0];return this.selfDivide(i,0)}}else if(arguments.length===2){var a=arguments[0],l=arguments[1],d=null,v=null,M=null,L=null,H=null,it=null,bt=null,Tt=null;return H=this._hi/a,it=K.SPLIT*H,d=it-H,Tt=K.SPLIT*a,d=it-d,v=H-d,M=Tt-a,bt=H*a,M=Tt-M,L=a-M,Tt=d*M-bt+d*L+v*M+v*L,it=(this._hi-bt-Tt+this._lo-H*l)/a,Tt=H+it,this._hi=Tt,this._lo=H-Tt+it,this}},K.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},K.prototype.divide=function(){if(arguments[0]instanceof K){var r=arguments[0],i=null,a=null,l=null,d=null,v=null,M=null,L=null,H=null;return a=(v=this._hi/r._hi)-(i=(M=K.SPLIT*v)-(i=M-v)),H=i*(l=(H=K.SPLIT*r._hi)-(l=H-r._hi))-(L=v*r._hi)+i*(d=r._hi-l)+a*l+a*d,M=(this._hi-L-H+this._lo-v*r._lo)/r._hi,new K(H=v+M,v-H+M)}if(typeof arguments[0]=="number"){var it=arguments[0];return C.isNaN(it)?K.createNaN():K.copy(this).selfDivide(it,0)}},K.prototype.ge=function(r){return(this._hi>r._hi||this._hi===r._hi)&&this._lo>=r._lo},K.prototype.pow=function(r){if(r===0)return K.valueOf(1);var i=new K(this),a=K.valueOf(1),l=Math.abs(r);if(l>1)for(;l>0;)l%2==1&&a.selfMultiply(i),(l/=2)>0&&(i=i.sqr());else a=i;return r<0?a.reciprocal():a},K.prototype.ceil=function(){if(this.isNaN())return K.NaN;var r=Math.ceil(this._hi),i=0;return r===this._hi&&(i=Math.ceil(this._lo)),new K(r,i)},K.prototype.compareTo=function(r){var i=r;return this._hi<i._hi?-1:this._hi>i._hi?1:this._lo<i._lo?-1:this._lo>i._lo?1:0},K.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},K.prototype.setValue=function(){if(arguments[0]instanceof K){var r=arguments[0];return this.init(r),this}if(typeof arguments[0]=="number"){var i=arguments[0];return this.init(i),this}},K.prototype.max=function(r){return this.ge(r)?this:r},K.prototype.sqrt=function(){if(this.isZero())return K.valueOf(0);if(this.isNegative())return K.NaN;var r=1/Math.sqrt(this._hi),i=this._hi*r,a=K.valueOf(i),l=this.subtract(a.sqr())._hi*(.5*r);return a.add(l)},K.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof K){var r=arguments[0];return this.selfAdd(r._hi,r._lo)}if(typeof arguments[0]=="number"){var i=arguments[0],a=null,l=null,d=null,v=null,M=null,L=null;return d=this._hi+i,M=d-this._hi,v=d-M,v=i-M+(this._hi-v),L=v+this._lo,a=d+L,l=L+(d-a),this._hi=a+l,this._lo=l+(a-this._hi),this}}else if(arguments.length===2){var H=arguments[0],it=arguments[1],bt=null,Tt=null,Jt=null,Qt=null,le=null,Ee=null,On=null;Qt=this._hi+H,Tt=this._lo+it,le=Qt-(Ee=Qt-this._hi),Jt=Tt-(On=Tt-this._lo);var Kn=(bt=Qt+(Ee=(le=H-Ee+(this._hi-le))+Tt))+(Ee=(Jt=it-On+(this._lo-Jt))+(Ee+(Qt-bt))),ci=Ee+(bt-Kn);return this._hi=Kn,this._lo=ci,this}},K.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof K){var r=arguments[0];return this.selfMultiply(r._hi,r._lo)}if(typeof arguments[0]=="number"){var i=arguments[0];return this.selfMultiply(i,0)}}else if(arguments.length===2){var a=arguments[0],l=arguments[1],d=null,v=null,M=null,L=null,H=null,it=null;d=(H=K.SPLIT*this._hi)-this._hi,it=K.SPLIT*a,d=H-d,v=this._hi-d,M=it-a;var bt=(H=this._hi*a)+(it=d*(M=it-M)-H+d*(L=a-M)+v*M+v*L+(this._hi*l+this._lo*a)),Tt=it+(d=H-bt);return this._hi=bt,this._lo=Tt,this}},K.prototype.selfSqr=function(){return this.selfMultiply(this)},K.prototype.floor=function(){if(this.isNaN())return K.NaN;var r=Math.floor(this._hi),i=0;return r===this._hi&&(i=Math.floor(this._lo)),new K(r,i)},K.prototype.negate=function(){return this.isNaN()?this:new K(-this._hi,-this._lo)},K.prototype.clone=function(){},K.prototype.multiply=function(){if(arguments[0]instanceof K){var r=arguments[0];return r.isNaN()?K.createNaN():K.copy(this).selfMultiply(r)}if(typeof arguments[0]=="number"){var i=arguments[0];return C.isNaN(i)?K.createNaN():K.copy(this).selfMultiply(i,0)}},K.prototype.isNaN=function(){return C.isNaN(this._hi)},K.prototype.intValue=function(){return Math.trunc(this._hi)},K.prototype.toString=function(){var r=K.magnitude(this._hi);return r>=-3&&r<=20?this.toStandardNotation():this.toSciNotation()},K.prototype.toStandardNotation=function(){var r=this.getSpecialNumberString();if(r!==null)return r;var i=new Array(1).fill(null),a=this.extractSignificantDigits(!0,i),l=i[0]+1,d=a;if(a.charAt(0)===".")d="0"+a;else if(l<0)d="0."+K.stringOfChar("0",-l)+a;else if(a.indexOf(".")===-1){var v=l-a.length;d=a+K.stringOfChar("0",v)+".0"}return this.isNegative()?"-"+d:d},K.prototype.reciprocal=function(){var r=null,i=null,a=null,l=null,d=null,v=null,M=null,L=null;i=(d=1/this._hi)-(r=(v=K.SPLIT*d)-(r=v-d)),a=(L=K.SPLIT*this._hi)-this._hi;var H=d+(v=(1-(M=d*this._hi)-(L=r*(a=L-a)-M+r*(l=this._hi-a)+i*a+i*l)-d*this._lo)/this._hi);return new K(H,d-H+v)},K.prototype.toSciNotation=function(){if(this.isZero())return K.SCI_NOT_ZERO;var r=this.getSpecialNumberString();if(r!==null)return r;var i=new Array(1).fill(null),a=this.extractSignificantDigits(!1,i),l=K.SCI_NOT_EXPONENT_CHAR+i[0];if(a.charAt(0)==="0")throw new Error("Found leading zero: "+a);var d="";a.length>1&&(d=a.substring(1));var v=a.charAt(0)+"."+d;return this.isNegative()?"-"+v+l:v+l},K.prototype.abs=function(){return this.isNaN()?K.NaN:this.isNegative()?this.negate():new K(this)},K.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},K.prototype.lt=function(r){return(this._hi<r._hi||this._hi===r._hi)&&this._lo<r._lo},K.prototype.add=function(){if(arguments[0]instanceof K){var r=arguments[0];return K.copy(this).selfAdd(r)}if(typeof arguments[0]=="number"){var i=arguments[0];return K.copy(this).selfAdd(i)}},K.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var r=arguments[0];this._hi=r,this._lo=0}else if(arguments[0]instanceof K){var i=arguments[0];this._hi=i._hi,this._lo=i._lo}}else if(arguments.length===2){var a=arguments[0],l=arguments[1];this._hi=a,this._lo=l}},K.prototype.gt=function(r){return(this._hi>r._hi||this._hi===r._hi)&&this._lo>r._lo},K.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},K.prototype.trunc=function(){return this.isNaN()?K.NaN:this.isPositive()?this.floor():this.ceil()},K.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},K.prototype.interfaces_=function(){return[t,W,X]},K.prototype.getClass=function(){return K},K.sqr=function(r){return K.valueOf(r).selfMultiply(r)},K.valueOf=function(){if(typeof arguments[0]=="string"){var r=arguments[0];return K.parse(r)}if(typeof arguments[0]=="number"){var i=arguments[0];return new K(i)}},K.sqrt=function(r){return K.valueOf(r).sqrt()},K.parse=function(r){for(var i=0,a=r.length;yt.isWhitespace(r.charAt(i));)i++;var l=!1;if(i<a){var d=r.charAt(i);d!=="-"&&d!=="+"||(i++,d==="-"&&(l=!0))}for(var v=new K,M=0,L=0,H=0;!(i>=a);){var it=r.charAt(i);if(i++,yt.isDigit(it)){var bt=it-"0";v.selfMultiply(K.TEN),v.selfAdd(bt),M++}else{if(it!=="."){if(it==="e"||it==="E"){var Tt=r.substring(i);try{H=pt.parseInt(Tt)}catch(On){throw On instanceof Error?new Error("Invalid exponent "+Tt+" in string "+r):On}break}throw new Error("Unexpected character '"+it+"' at position "+i+" in string "+r)}L=M}}var Jt=v,Qt=M-L-H;if(Qt===0)Jt=v;else if(Qt>0){var le=K.TEN.pow(Qt);Jt=v.divide(le)}else if(Qt<0){var Ee=K.TEN.pow(-Qt);Jt=v.multiply(Ee)}return l?Jt.negate():Jt},K.createNaN=function(){return new K(C.NaN,C.NaN)},K.copy=function(r){return new K(r)},K.magnitude=function(r){var i=Math.abs(r),a=Math.log(i)/Math.log(10),l=Math.trunc(Math.floor(a));return 10*Math.pow(10,l)<=i&&(l+=1),l},K.stringOfChar=function(r,i){for(var a=new Rt,l=0;l<i;l++)a.append(r);return a.toString()},Bt.PI.get=function(){return new K(3.141592653589793,12246467991473532e-32)},Bt.TWO_PI.get=function(){return new K(6.283185307179586,24492935982947064e-32)},Bt.PI_2.get=function(){return new K(1.5707963267948966,6123233995736766e-32)},Bt.E.get=function(){return new K(2.718281828459045,14456468917292502e-32)},Bt.NaN.get=function(){return new K(C.NaN,C.NaN)},Bt.EPS.get=function(){return 123259516440783e-46},Bt.SPLIT.get=function(){return 134217729},Bt.MAX_PRINT_DIGITS.get=function(){return 32},Bt.TEN.get=function(){return K.valueOf(10)},Bt.ONE.get=function(){return K.valueOf(1)},Bt.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},Bt.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(K,Bt);var Gt=function(){},ae={DP_SAFE_EPSILON:{configurable:!0}};Gt.prototype.interfaces_=function(){return[]},Gt.prototype.getClass=function(){return Gt},Gt.orientationIndex=function(r,i,a){var l=Gt.orientationIndexFilter(r,i,a);if(l<=1)return l;var d=K.valueOf(i.x).selfAdd(-r.x),v=K.valueOf(i.y).selfAdd(-r.y),M=K.valueOf(a.x).selfAdd(-i.x),L=K.valueOf(a.y).selfAdd(-i.y);return d.selfMultiply(L).selfSubtract(v.selfMultiply(M)).signum()},Gt.signOfDet2x2=function(r,i,a,l){return r.multiply(l).selfSubtract(i.multiply(a)).signum()},Gt.intersection=function(r,i,a,l){var d=K.valueOf(l.y).selfSubtract(a.y).selfMultiply(K.valueOf(i.x).selfSubtract(r.x)),v=K.valueOf(l.x).selfSubtract(a.x).selfMultiply(K.valueOf(i.y).selfSubtract(r.y)),M=d.subtract(v),L=K.valueOf(l.x).selfSubtract(a.x).selfMultiply(K.valueOf(r.y).selfSubtract(a.y)),H=K.valueOf(l.y).selfSubtract(a.y).selfMultiply(K.valueOf(r.x).selfSubtract(a.x)),it=L.subtract(H).selfDivide(M).doubleValue(),bt=K.valueOf(r.x).selfAdd(K.valueOf(i.x).selfSubtract(r.x).selfMultiply(it)).doubleValue(),Tt=K.valueOf(i.x).selfSubtract(r.x).selfMultiply(K.valueOf(r.y).selfSubtract(a.y)),Jt=K.valueOf(i.y).selfSubtract(r.y).selfMultiply(K.valueOf(r.x).selfSubtract(a.x)),Qt=Tt.subtract(Jt).selfDivide(M).doubleValue(),le=K.valueOf(a.y).selfAdd(K.valueOf(l.y).selfSubtract(a.y).selfMultiply(Qt)).doubleValue();return new D(bt,le)},Gt.orientationIndexFilter=function(r,i,a){var l=null,d=(r.x-a.x)*(i.y-a.y),v=(r.y-a.y)*(i.x-a.x),M=d-v;if(d>0){if(v<=0)return Gt.signum(M);l=d+v}else{if(!(d<0)||v>=0)return Gt.signum(M);l=-d-v}var L=Gt.DP_SAFE_EPSILON*l;return M>=L||-M>=L?Gt.signum(M):2},Gt.signum=function(r){return r>0?1:r<0?-1:0},ae.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Gt,ae);var ut=function(){},Ut={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Ut.X.get=function(){return 0},Ut.Y.get=function(){return 1},Ut.Z.get=function(){return 2},Ut.M.get=function(){return 3},ut.prototype.setOrdinate=function(r,i,a){},ut.prototype.size=function(){},ut.prototype.getOrdinate=function(r,i){},ut.prototype.getCoordinate=function(){},ut.prototype.getCoordinateCopy=function(r){},ut.prototype.getDimension=function(){},ut.prototype.getX=function(r){},ut.prototype.clone=function(){},ut.prototype.expandEnvelope=function(r){},ut.prototype.copy=function(){},ut.prototype.getY=function(r){},ut.prototype.toCoordinateArray=function(){},ut.prototype.interfaces_=function(){return[X]},ut.prototype.getClass=function(){return ut},Object.defineProperties(ut,Ut);var jt=function(){},ce=function(r){function i(){r.call(this,"Projective point not representable on the Cartesian plane.")}return r&&(i.__proto__=r),i.prototype=Object.create(r&&r.prototype),i.prototype.constructor=i,i.prototype.interfaces_=function(){return[]},i.prototype.getClass=function(){return i},i}(jt),te=function(){};te.arraycopy=function(r,i,a,l,d){for(var v=0,M=i;M<i+d;M++)a[l+v]=r[M],v++},te.getProperty=function(r){return{"line.separator":\`
|