fhj-tools-v3 1.1.10 → 1.1.13

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/fhj-tools.es.js CHANGED
@@ -12258,11 +12258,7 @@ let ni = (Vs = class {
12258
12258
  allowTextureFilterAnisotropic: !0
12259
12259
  }
12260
12260
  });
12261
- V.scene.fxaa = !0, V.scene.postProcessStages.fxaa.enabled = !0, V.imageryLayers.remove(V.imageryLayers.get(0)), V.cesiumWidget.creditContainer.style.display = "none", V.scene.globe.baseColor = Cesium.Color.TRANSPARENT, window.Cesium.FeatureDetection.supportsImageRenderingPixelated() && (V.resolutionScale = window.devicePixelRatio), /Mobi|Android|iPhone/i.test(navigator.userAgent) || (V.scene.screenSpaceCameraController.tiltEventTypes = [window.Cesium.CameraEventType.RIGHT_DRAG], V.scene.screenSpaceCameraController.zoomEventTypes = [window.Cesium.CameraEventType.WHEEL], V.scene.screenSpaceCameraController.rotateEventTypes = [window.Cesium.CameraEventType.LEFT_DRAG]), V.cesiumWidget.screenSpaceEventHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK), this.viewer = V, this.DiXingJianCe = !1, this.setDianJiShanShuo(), V.scene.backgroundColor = new window.Cesium.Color(0, 0, 0, 0), wt.bindProperties(this, new ui(this)), wt.bindProperties(this, new Ki(this)), wt.bindProperties(this, new Hq(this)), wt.bindProperties(this, new Ji(this)), wt.bindProperties(this, new Si(this)), this.mouseEventListen((I) => {
12262
- requestAnimationFrame(() => {
12263
- I.entitiesLX ? (V.enableCursorStyle = !1, V._element.style.cursor = "pointer") : (V.enableCursorStyle = !0, V._element.style.cursor = "");
12264
- });
12265
- }, "MOUSE_MOVE");
12261
+ V.scene.fxaa = !0, V.scene.postProcessStages.fxaa.enabled = !0, V.imageryLayers.remove(V.imageryLayers.get(0)), V.cesiumWidget.creditContainer.style.display = "none", V.scene.globe.baseColor = Cesium.Color.TRANSPARENT, window.Cesium.FeatureDetection.supportsImageRenderingPixelated() && (V.resolutionScale = window.devicePixelRatio), /Mobi|Android|iPhone/i.test(navigator.userAgent) || (V.scene.screenSpaceCameraController.tiltEventTypes = [window.Cesium.CameraEventType.RIGHT_DRAG], V.scene.screenSpaceCameraController.zoomEventTypes = [window.Cesium.CameraEventType.WHEEL], V.scene.screenSpaceCameraController.rotateEventTypes = [window.Cesium.CameraEventType.LEFT_DRAG]), V.cesiumWidget.screenSpaceEventHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK), this.viewer = V, V.scene.backgroundColor = new window.Cesium.Color(0, 0, 0, 0), wt.bindProperties(this, new ui(this)), wt.bindProperties(this, new Ki(this)), wt.bindProperties(this, new Hq(this)), wt.bindProperties(this, new Ji(this)), wt.bindProperties(this, new Si(this));
12266
12262
  }
12267
12263
  set skyBox(A) {
12268
12264
  A ? WA(this, _r, nq(this.viewer)) : f(this, _r) && f(this, _r).remove();
package/fhj-tools.umd.js CHANGED
@@ -113,7 +113,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:B,curr
113
113
  out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.2);
114
114
 
115
115
  }
116
- `;var g=new Cesium.PostProcessStage({name:"hi_snow",fragmentShader:B,uniforms:{highlight:function(){return new Cesium.Color(1,0,0,.5)}}});this.viewer.scene.postProcessStages.add(g);const V=this.viewer;r&&r({entity:g,remove(){g&&V.scene.postProcessStages.remove(g),g=null}})}}class Vi{constructor(A){this.viewer=A.viewer}setCameraHeight(A=0,r=5e3){this.viewer.scene.screenSpaceCameraController.minimumZoomDistance=A,this.viewer.scene.screenSpaceCameraController.maximumZoomDistance=r}}class si{constructor(A){iA(this,Wr,null);VA(this,"offsetFromHeadingPitchRange",(A,r,B,g,V,I)=>{let s=Cesium.Math.toRadians(g),q=Cesium.Math.toRadians(V);q=Cesium.Math.clamp(q,-Cesium.Math.PI_OVER_TWO,Cesium.Math.PI_OVER_TWO),s=Cesium.Math.zeroToTwoPi(s)-Cesium.Math.PI_OVER_TWO;const W=Cesium.Quaternion.fromAxisAngle(Cesium.Cartesian3.UNIT_Y,-q),E=Cesium.Quaternion.fromAxisAngle(Cesium.Cartesian3.UNIT_Z,-s),a=Cesium.Quaternion.multiply(E,W,E),i=Cesium.Matrix3.fromQuaternion(a),k=Cesium.Cartesian3.clone(Cesium.Cartesian3.UNIT_X);Cesium.Matrix3.multiplyByVector(i,k,k),Cesium.Cartesian3.multiplyByScalar(k,I,k);const w=Cesium.Cartesian3.fromDegrees(A,r,B),D=Cesium.Transforms.eastNorthUpToFixedFrame(w),C=Cesium.Matrix4.multiplyByPoint(D,k,new Cesium.Cartesian3),S=Cesium.Cartographic.fromCartesian(C),e=Cesium.Math.toDegrees(S.longitude),Y=Cesium.Math.toDegrees(S.latitude),J=S.height;return[e,Y,J,C]});VA(this,"getLonLatHeight",(A,r)=>{try{let B=this.viewer.scene.sampleHeight(new window.Cesium.Cartographic(window.Cesium.Math.toRadians(A),window.Cesium.Math.toRadians(r)));return B||(B=this.viewer.scene.globe.getHeight(new window.Cesium.Cartographic(window.Cesium.Math.toRadians(A),window.Cesium.Math.toRadians(r)))),B||0}catch{return 0}});VA(this,"mouseEventListen",(A,r="LEFT_CLICK")=>{let B=new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);B.setInputAction(V,Cesium.ScreenSpaceEventType[r]);let g=this;function V(I){try{var s={},q=g.viewer.scene.pick(I.position||I.endPosition),W=g.viewer.scene.camera.pickEllipsoid(I.position||I.endPosition,g.viewer.scene.globe.ellipsoid);if(Cesium.defined(W)){Object.assign(s,W);let E=g.viewer.camera.getPickRay(I.position||I.endPosition),a=g.viewer.scene.globe.pick(E,g.viewer.scene),i=Cesium.Cartographic.fromCartesian(a);s.dbmlog=Cesium.Math.toDegrees(i.longitude),s.dbmlat=Cesium.Math.toDegrees(i.latitude),s.dbmalt=g.viewer.scene.sampleHeight(new Cesium.Cartographic(Cesium.Math.toRadians(s.dbmlog),Cesium.Math.toRadians(s.dbmlat))),s.dbmalt||(s.dbmalt=g.getLonLatHeight(s.dbmlog,s.dbmlat));let k=Cesium.Cartographic.fromCartesian(W);s.tqlog=Cesium.Math.toDegrees(k.longitude),s.tqlat=Cesium.Math.toDegrees(k.latitude),s.tqalt=g.viewer.scene.sampleHeight(new Cesium.Cartographic(Cesium.Math.toRadians(s.tqlog),Cesium.Math.toRadians(s.tqlat)));let w=g.viewer.scene.pickPosition(I.position||I.endPosition);if(w){let D=Cesium.Cartographic.fromCartesian(w);s.cjlog=Cesium.Math.toDegrees(D.longitude),s.cjlat=Cesium.Math.toDegrees(D.latitude),s.cjalt=g.viewer.scene.sampleHeight(new Cesium.Cartographic(Cesium.Math.toRadians(s.cjlog),Cesium.Math.toRadians(s.cjlat)))}s.log=Number(s.cjlog||s.dbmlog),s.lat=Number(s.cjlat||s.dbmlat),s.alt=s.cjalt||s.dbmalt}Cesium.defined(q)&&q.id&&(s.id=q.id._id,s.name=q.id._name,s.entitiesLX=q.id._entitiesLX,s.userDefined=q.id._userDefined,s.pick=q.id),A&&A(s)}catch(E){console.log(E)}}return{removeEvent(){B.removeInputAction(Cesium.ScreenSpaceEventType[r])}}});Object.assign(this,A)}cameraMoveListener(A,r="moveEnd"){const B=this.viewer;function g(){const V=window.Cesium.Math.toDegrees(B.camera.heading),I=window.Cesium.Math.toDegrees(B.camera.pitch),s=window.Cesium.Math.toDegrees(B.camera.roll),q=B.camera.positionCartographic,{height:W,longitude:E,latitude:a}=q;var i={log:Number(window.Cesium.Math.toDegrees(E).toFixed(6)),lat:Number(window.Cesium.Math.toDegrees(a).toFixed(6)),alt:Number(W.toFixed(2)),heading:Number(V.toFixed(2)),pitch:Number(I.toFixed(2)),angle:Number((360-V).toFixed(2)),roll:s};A&&A(i)}return this.viewer.camera[r].addEventListener(g),{remove(){B.camera[r].removeEventListener(g)}}}getCesiumViewerExtend(){return X(this,Wr)?X(this,Wr):(EA(this,Wr,new Promise(A=>{const r=window.Cesium.Math.toDegrees(this.viewer.camera.pitch);let B={maxx:135.08,maxy:53.55,minx:73.55,miny:3.85};function g(s){for(var q=s.scene,W=q.canvas,E=W.clientWidth,a=W.clientHeight,i=[new Cesium.Cartesian2(0,0),new Cesium.Cartesian2(E,0),new Cesium.Cartesian2(E,a),new Cesium.Cartesian2(0,a)],k=q.globe.ellipsoid,w=[],D=0;D<i.length;D++){var C=q.camera.getPickRay(i[D]);if(C){var S=q.globe.pick(C,q);if(S){var e=k.cartesianToCartographic(S);e&&w.push(e)}}}if(w.length===0)return null;for(var Y=w[0].longitude,J=w[0].longitude,u=w[0].latitude,F=w[0].latitude,n=1;n<w.length;n++){var l=w[n].longitude,d=w[n].latitude;Y=Math.min(Y,l),J=Math.max(J,l),u=Math.min(u,d),F=Math.max(F,d)}return{west:Cesium.Math.toDegrees(Y),south:Cesium.Math.toDegrees(u),east:Cesium.Math.toDegrees(J),north:Cesium.Math.toDegrees(F)}}function V(s){let q={},W=s.camera.computeViewRectangle(s.scene.globe.ellipsoid,new Cesium.Rectangle);if(typeof W>"u"){let E=s.scene.canvas,a=new Cesium.Cartesian2(0,0),i=new Cesium.Cartesian2(E.clientWidth,E.clientHeight),k=s.scene.globe.ellipsoid,w=s.camera.pickEllipsoid(a,k),D=s.camera.pickEllipsoid(i,k),C=s.scene.globe.ellipsoid.cartesianToCartographic(w),S=s.scene.globe.ellipsoid.cartesianToCartographic(D),e=Cesium.Math.toDegrees(C.longitude),Y=Cesium.Math.toDegrees(S.longitude),J=Cesium.Math.toDegrees(S.latitude),u=Cesium.Math.toDegrees(C.latitude);q.west=e,q.east=Y,q.south=J,q.north=u}else q.east=Cesium.Math.toDegrees(W.east),q.north=Cesium.Math.toDegrees(W.north),q.west=Cesium.Math.toDegrees(W.west),q.south=Cesium.Math.toDegrees(W.south);return q}const I=()=>{let s=r>=-70?g(this.viewer):V(this.viewer);s||(s=V(this.viewer)),s?(B={maxx:s.east,maxy:s.north,minx:s.west,miny:s.south},A(B)):setTimeout(()=>{I()},500)};I()}).finally(()=>{EA(this,Wr,null)})),X(this,Wr))}}Wr=new WeakMap;class Vt{static bindProperties(A,r){Object.assign(A,r);const B=Object.getPrototypeOf(r),g=Object.getOwnPropertyDescriptors(B);return Object.entries(g).forEach(([V,I])=>{V!=="constructor"&&(I.value&&typeof I.value=="function"?A[V]=I.value.bind(r):(I.get||I.set)&&Object.defineProperty(A,V,{get:I.get?()=>r[V]:void 0,set:I.set?s=>{r[V]=s}:void 0,enumerable:I.enumerable,configurable:!0}))}),Object.keys(r).forEach(V=>{!(V in A)&&typeof r[V]!="function"&&Object.defineProperty(A,V,{get:()=>r[V],set:I=>{r[V]=I},enumerable:!0,configurable:!0})}),A}}function Ii(){try{const t=document.createElement("canvas"),A=t.getContext("webgl")||t.getContext("experimental-webgl");if(!A)return console.error("WebGL不可用"),JB.error("WebGL不可用"),"WebGL不支持或已禁用";const r=A.getShaderPrecisionFormat(A.VERTEX_SHADER,A.HIGH_FLOAT),B=A.getShaderPrecisionFormat(A.FRAGMENT_SHADER,A.HIGH_FLOAT);let g={version:A.getParameter(A.VERSION),vendor:A.getParameter(A.VENDOR),renderer:A.getParameter(A.RENDERER),vertexShaderPrecision:r?r.precision:"unknown",fragmentShaderPrecision:B?B.precision:"unknown"};return console.log("WebGL检查结果:",g),t.remove(),g}catch(t){return console.error("WebGL检查失败:",t),t}}Ii();const{randomStr:SB,convertImgToBase64:Wi,formatDateTime:Ei,to2DArray:qi}=aB;let Ci=(Rs=class{constructor(A,r,B,g){VA(this,"viewer",null);VA(this,"TianDiTuToken","");VA(this,"vueComponent",null);iA(this,vr,null);VA(this,"clippingPolygons",(A,r=!0)=>{var B=[];if(Array.isArray(A[0]))A.forEach(g=>{const V=window.Cesium.Cartesian3.fromDegreesArray(g),I=new window.Cesium.ClippingPolygon({positions:V,edgeWidth:0,edgeColor:Cesium.Color.TRANSPARENT});B.push(I)});else{const g=window.Cesium.Cartesian3.fromDegreesArray(A),V=new window.Cesium.ClippingPolygon({positions:g,edgeWidth:0,edgeColor:Cesium.Color.TRANSPARENT});B.push(V)}this.viewer.scene.globe.clippingPolygons=new window.Cesium.ClippingPolygonCollection({polygons:B,inverse:r})});VA(this,"drawWall",async(A={},r={})=>{var B={positions:[],mins:[],min:0,height:20,stepNum:.25,count:3,color:"#4EEDC6",image:wE,...A},{positions:g,mins:V,height:I,stepNum:s,count:q,color:W}=B;(!V||V.length<=0)&&(V=new Array(g.length/2).fill(B.min));const E=this.viewer;var a=[],i=q;k();function k(){i>0&&w().then(D=>{i--,k()})}function w(){return new Promise(D=>{var C=0,S=V.map(J=>J+C);function e(){return C+=s,C>I&&(C=0),C>I/q&&D(C),S=V.map(J=>J+C),S}const Y=E.entities.add({id:SB(),wall:{show:!0,vertexFormat:window.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT_POSITION_AND_NORMAL,positions:window.Cesium.Cartesian3.fromDegreesArray(g),minimumHeights:V,maximumHeights:q<=1?V.map(J=>J+I):new window.Cesium.CallbackProperty(e,!1),material:new window.Cesium.ImageMaterialProperty({image:B.image,transparent:!0,color:new window.Cesium.CallbackProperty(function(){return window.Cesium.Color.fromCssColorString(W).withAlpha(1-C/I)},!1)}),outLine:!0,...r}});a.push(Y)})}return{entitys:a,remove(){a&&a.forEach(D=>E.entities.remove(D))}}});VA(this,"openSun",(A={})=>{var r={multiplier:4e3,darkness:.6,date:Ei("yyyy-MM-dd"),hours:12,lightCoords:[-52.59777,-12.03883],lightSourceType:[""],...A};if(this.viewer.scene.globe.enableLighting=!0,this.viewer.shadows=!0,this.viewer.clock.multiplier=r.multiplier,this.viewer.scene.shadowMap.maximumDistance=1e4,this.viewer.scene.shadowMap.size=6e3,this.viewer.shadowMap.darkness=r.darkness,this.viewer.scene.shadowMap.softShadow=!0,this.viewer.scene.globe.dynamicAtmosphereLightingFromSun=!0,r.lightSourceType.includes("move")&&new window.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas).setInputAction(g=>{this.viewer.scene.light=new window.Cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC})},window.Cesium.ScreenSpaceEventType.MOUSE_MOVE),r.lightSourceType.includes("coord")&&(this.viewer.scene.light=new window.Cesium.DirectionalLight({direction:window.Cesium.Cartesian3.fromDegrees(...r.lightCoords)})),r.lightSourceType.includes("date")){var B=new Date(new Date(new Date(r.date)).setHours(Number(r.hours)));this.viewer.clock.startTime=window.Cesium.JulianDate.fromDate(B),this.viewer.clock.currentTime=window.Cesium.JulianDate.fromDate(B),this.viewer.clock.stopTime=window.Cesium.JulianDate.fromDate(B)}});VA(this,"getPolygonArea",A=>{!Array.isArray(A[0])&&(A=qi(A,2)),A[0].join(",")==A[A.length-1].join(",")&&(A=A.slice(0,-1));var r=6371e3,B=2*Math.PI*r/360,g=Math.PI/180;function V(s){for(var q=0,W=0;W<s.length;++W){var E=(W+1)%s.length,a=s[W][0]*B*Math.cos(s[W][1]*g),i=s[W][1]*B,k=s[E][0]*B*Math.cos(s[E][1]*g),w=s[E][1]*B;q+=a*w-k*i}return Math.abs(q/2)}var I=0;return A.length>2&&(I=V(A)),I&&I.toFixed(2)});VA(this,"getStartEndLength",(A,r)=>{let B=Cesium.Cartographic.fromCartesian(Cesium.Cartesian3.fromDegrees(Number(A[0]),Number(A[1]),Number(A[2]||0))),g=Cesium.Cartographic.fromCartesian(Cesium.Cartesian3.fromDegrees(Number(r[0]),Number(r[1]),Number(r[2]||0))),V=new Cesium.EllipsoidGeodesic;return V.setEndPoints(B,g),V.surfaceDistance.toFixed(2)});VA(this,"getPolygonPointsCenter",A=>{var r=A.length/2,B=0,g=0,V=0;for(let E=0;E<A.length;E+=2){let a=[A[E],A[E+1]];var I,s;s=parseFloat(a[0])*Math.PI/180,I=parseFloat(a[1])*Math.PI/180,B+=Math.cos(I)*Math.cos(s),g+=Math.cos(I)*Math.sin(s),V+=Math.sin(I)}B=B/r,g=g/r,V=V/r;var q=Math.atan2(g,B),W=Math.atan2(V,Math.sqrt(B*B+g*g));return[q*180/Math.PI,W*180/Math.PI]});VA(this,"addEllipse",(A={},r=!0)=>{var B={position:[],deviationR:1,imageUrl:eE,maxR:200,count:2,type:1,minR:0,rotate:30},g={1:{},2:{count:1},3:{count:1,...!("imageUrl"in A)&&{imageUrl:aE},minR:Cesium.Math.toRadians(B.rotate)}};if(B=Object.assign(B,A,g[A.type||B.type]),B.position.length<=0)return{};var V=Array.from(new Array(B.count)),I=Array.from(new Array(B.count));V=V.map(()=>B.minR),I=I.map((k,w)=>function(D){return function(){return B.type===3?(V[w]+=B.deviationR,V[w]):(V[w]=V[w]+B.deviationR,V[w]>=(B.maxR-B.minR)/B.count+B.minR&&D(),V[w]>=B.maxR&&(V[w]=B.minR),V[w])}});const s=this;var q=[];function W(k){return new Promise(w=>{var D=s.viewer.entities.add({id:SB(),position:Cesium.Cartesian3.fromDegrees(B.position[0],B.position[1],B.position[2]||0),show:!0,zIndex:99,ellipse:{clampToGround:!0,semiMinorAxis:B.type==3?B.maxR:r?new Cesium.CallbackProperty(I[k](w),!1):B.maxR,semiMajorAxis:B.type==3?B.maxR:r?new Cesium.CallbackProperty(I[k](w),!1):B.maxR,height:B.position[2]||0,...B.type==3&&{stRotation:r?new Cesium.CallbackProperty(I[k](w),!1):B.rotate},material:new Cesium.ImageMaterialProperty({image:B.imageUrl,repeat:Cesium.Cartesian2(1,1),transparent:!0,...B.type!=3&&{color:r?new Cesium.CallbackProperty(function(){var C=0;return B.type==1?C=1-(V[k]-B.minR)/B.maxR:C=1,(V[k]+B.deviationR*2>=B.maxR||V[k]-B.deviationR*2<=B.minR)&&(C=0),Cesium.Color.WHITE.withAlpha(C)},!1):Cesium.Color.WHITE.withAlpha(1)}})}});q.push(D)})}var E=0;a();function a(){E>=B.count||W(E).then(()=>{B.type==1&&(E++,a())})}const i=this.viewer;return{entitys:q,remove(){q&&q.forEach(k=>{i.entities.remove(k)})}}});VA(this,"setDianJiShanShuo",(A=!0)=>{A?(this.viewer.scene.pickTranslucentDepth=()=>!1,this.viewer.scene.pickTranslucentGeometry=()=>!1):(this.viewer.scene.pickTranslucentDepth=null,this.viewer.scene.pickTranslucentGeometry=null)});VA(this,"startDynaDrawPolygon",(A,r={},B={},g={})=>{if(this.dynaDrawPolygonReturn)return this.dynaDrawPolygonReturn;this.setDianJiShanShuo(!1);var V=[],I=this.addPolygon({positions:V},{hierarchy:new Cesium.CallbackProperty(()=>new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(V)),!1),...r},{positions:new Cesium.CallbackProperty(()=>Cesium.Cartesian3.fromDegreesArray(V),!1),...B});const s=this.mouseEventListen(i=>{V.push(i.log,i.lat)}),q=this.mouseEventListen(i=>{V.length>=4&&V.splice(-2,2),V.length>=2&&V.push(i.log,i.lat)},"MOUSE_MOVE"),W=this.mouseEventListen(()=>{var i=a();A&&A(i)},"LEFT_DOUBLE_CLICK"),E=this;function a(){if(E.dynaDrawPolygonReturn){s&&s.removeEvent(),q&&q.removeEvent(),W&&W.removeEvent(),V.splice(-2,2),V.push(V[0],V[1]),I.remove();var i=E.addPolygon({positions:V,...g},r,B);return E.dynaDrawPolygonReturn=null,E.setDianJiShanShuo(),{positions:V,entity:i}}}return this.dynaDrawPolygonReturn={finish:a},this.dynaDrawPolygonReturn});VA(this,"addPolygon",(A,r={},B={})=>{this.viewer.entities.getById(A.id)&&this.viewer.entities.removeById(A.id);var g=this.viewer.entities.add({id:A.id||SB(),name:A.name,entitiesLX:A.leixing||"",userDefined:A.userDefined,zIndex:9,polygon:Object.assign({heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,hierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(A.positions)),material:Cesium.Color.fromBytes(255,255,0).withAlpha(.4)},r),polyline:Object.assign({positions:Cesium.Cartesian3.fromDegreesArray(A.positions),width:A.lineWidth||3,material:Cesium.Color.fromBytes(255,150,0).withAlpha(1),clampToGround:!0},B)});const V=this.viewer;return{entity:g,remove(){V.entities.remove(g)}}});VA(this,"addEntities",(A,r=!1,B={},g={})=>{if(!A)return;var V=Object.assign({id:SB(),leixing:"entities",img:YE,width:30,height:30},A);this.viewer.entities.getById(V.id)&&this.viewer.entities.removeById(V.id);var I=this.viewer.entities.add({id:V.id,name:V.name,userDefined:V.userDefined,entitiesLX:V.leixing,position:window.Cesium.Cartesian3.fromDegrees(Number(V.log),Number(V.lat),Number(V.alt||0)),billboard:{show:"billboardShow"in V?V.billboardShow:!0,image:V.img,...r&&{disableDepthTestDistance:Number.POSITIVE_INFINITY},horizontalOrigin:window.Cesium.HorizontalOrigin.CENTER,verticalOrigin:window.Cesium.VerticalOrigin.BOTTOM,scale:1,width:V.width,height:V.height,...B},label:{show:"labelShow"in V?V.labelShow:!0,showBackground:!0,backgroundColor:window.Cesium.Color.fromCssColorString("rgba(13,241,249,0.8)"),...r&&{disableDepthTestDistance:Number.POSITIVE_INFINITY},scale:.5,font:"normal 32px MicroSoft YaHei",text:V.text,fillColor:window.Cesium.Color.fromCssColorString("#04009F"),outlineColor:window.Cesium.Color.fromCssColorString("#04009F"),outlineWidth:4,borderRadius:20,pixelOffset:new window.Cesium.Cartesian2(0,-70),horizontalOrigin:window.Cesium.HorizontalOrigin.CENTER,...g}});const s=this.viewer;return{entity:I,remove(){s.entities.remove(I)}}});VA(this,"reverseSelectionMask",async(A,r={})=>{var B={maskColor:"#243979",maskImg:xE,maskOpacity:.8,lineColor:"#6dcdeb",lineOpacity:1,lineWidth:2};Object.assign(B,r),B.maskImg&&(B.maskImg=await Wi(B.maskImg));let g=new Cesium.Entity({polygon:{heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,clampToGround:!0,hierarchy:{positions:Cesium.Cartesian3.fromDegreesArray([1,0,1,90,179,90,179,0]),holes:[{positions:Cesium.Cartesian3.fromDegreesArray(A)}]},material:new Cesium.ImageMaterialProperty({image:B.maskImg,repeat:new Cesium.Cartesian2(10,30),color:Cesium.Color.fromCssColorString(B.maskColor).withAlpha(B.maskOpacity),transparent:!0})}}),V=new Cesium.Entity({polyline:{positions:Cesium.Cartesian3.fromDegreesArray(A),width:B.lineWidth,height:0,material:Cesium.Color.fromCssColorString(B.lineColor).withAlpha(B.lineOpacity),clampToGround:!0}});return this.viewer.entities.add(g),this.viewer.entities.add(V),{polygonEntity:g,lineEntity:V}});VA(this,"updateHtmlEntities",A=>{if(A)try{requestAnimationFrame(()=>{var r=A.getVm().getAttribute("position").split(",");const B=window.Cesium.Cartesian3.fromDegrees(Number(r[0]),Number(r[1]),Number(r[2]||0));A.setPosition(B)})}catch(r){return r}});VA(this,"addHtmlEntities",(A=void 0,r=1)=>new Promise((B,g)=>{requestAnimationFrame(()=>{if(!this.vueComponent.refs.entitiesRef.children)return g("没有找到插槽");var V=A!==void 0?this.vueComponent.refs.entitiesRef.children[A]:this.vueComponent.refs.entitiesRef,I=[];const s=V;V.children&&V.children.length>0&&Array.from(V.children).forEach(q=>{var W=null;if(q.getAttribute("position")){let a=q.getAttribute("position");var E=Array.isArray(a)?a:a.split(",");const i=window.Cesium.Cartesian3.fromDegrees(Number(E[0]),Number(E[1]),Number(E[2]||0));W=new hs(this.viewer,i,q,this),W&&(W.getVm().style.zIndex=r)}I.push(W)}),B({list:I,parentContainer:s})})}));VA(this,"setCameraView",(A=116.397428,r=39.90923,B=1e4,g=360,V=-90,I=0)=>{this.viewer.camera.setView({destination:window.Cesium.Cartesian3.fromDegrees(A,r,B),orientation:{heading:window.Cesium.Math.toRadians(Number(g)),pitch:window.Cesium.Math.toRadians(Number(V)),roll:Number(I)}})});VA(this,"flyTo",(A=[],r=5,B,g=!0)=>{var V=[116.397428,39.90923,1e4,360,-90,0];function I(s,q){for(;s.length<q;)s.push(null);return s}A=I(A,6),A=A.map((s,q)=>s??V[q]),this.viewer.camera.flyTo({duration:r,destination:Cesium.Cartesian3.fromDegrees(A[0],A[1],A[2]),orientation:{heading:Cesium.Math.toRadians(A[3]),pitch:Cesium.Math.toRadians(A[4]),roll:A[5]},complete:function(){B&&B()},...g&&{easingFunction:Cesium.EasingFunction.LINEAR_NONE}})});this.TianDiTuToken=g,this.vueComponent=r,window.Cesium.Ion.defaultAccessToken=B;const V=new window.Cesium.Viewer(A,{animation:!1,homeButton:!1,fullscreenButton:!1,baseLayerPicker:!1,geocoder:!1,timeline:!1,sceneModePicker:!1,navigationHelpButton:!1,infoBox:!1,requestRenderMode:!1,scene3DOnly:!1,sceneMode:3,fullscreenElement:document.body,selectionIndicator:!1,skyBox:!1,skyAtmosphere:!1,allowDataSourcesToSuspendAnimation:!1,terrainProvider:new window.Cesium.EllipsoidTerrainProvider({}),terrainShadows:Cesium.ShadowMode.ENABLED,orderIndependentTranslucency:!1,contextOptions:{webgl:{alpha:!0,depth:!1,stencil:!0,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!0,powerPreference:"high-performance"},allowTextureFilterAnisotropic:!0}});V.scene.fxaa=!0,V.scene.postProcessStages.fxaa.enabled=!0,V.imageryLayers.remove(V.imageryLayers.get(0)),V.cesiumWidget.creditContainer.style.display="none",V.scene.globe.baseColor=Cesium.Color.TRANSPARENT,window.Cesium.FeatureDetection.supportsImageRenderingPixelated()&&(V.resolutionScale=window.devicePixelRatio),/Mobi|Android|iPhone/i.test(navigator.userAgent)||(V.scene.screenSpaceCameraController.tiltEventTypes=[window.Cesium.CameraEventType.RIGHT_DRAG],V.scene.screenSpaceCameraController.zoomEventTypes=[window.Cesium.CameraEventType.WHEEL],V.scene.screenSpaceCameraController.rotateEventTypes=[window.Cesium.CameraEventType.LEFT_DRAG]),V.cesiumWidget.screenSpaceEventHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this.viewer=V,this.DiXingJianCe=!1,this.setDianJiShanShuo(),V.scene.backgroundColor=new window.Cesium.Color(0,0,0,0),Vt.bindProperties(this,new si(this)),Vt.bindProperties(this,new Vi(this)),Vt.bindProperties(this,new kE(this)),Vt.bindProperties(this,new Bi(this)),Vt.bindProperties(this,new gi(this)),this.mouseEventListen(I=>{requestAnimationFrame(()=>{I.entitiesLX?(V.enableCursorStyle=!1,V._element.style.cursor="pointer"):(V.enableCursorStyle=!0,V._element.style.cursor="")})},"MOUSE_MOVE")}set skyBox(A){A?EA(this,vr,QE(this.viewer)):X(this,vr)&&X(this,vr).remove()}set DiXingJianCe(A){this.viewer.scene.globe.depthTestAgainstTerrain=A}set DaQiCeng(A){this.viewer.scene.globe.showGroundAtmosphere=A}destroy(){this.viewer&&window.Cesium.defined(this.viewer)&&requestAnimationFrame(()=>{this.viewer.clock.onTick.removeEventListener(this.viewer._renderLoop),this.viewer.scene.postRender.removeEventListener(this.viewer._updateThrottle),window.cancelAnimationFrame(this.viewer._renderLoopId),this.viewer.destroy(),this.viewer=null})}},vr=new WeakMap,Rs);const KB=new Map,ii="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNDExNWIzNi1iNjQxLTRkYTQtYTI4OS0yMzM2NTViZDFiNWEiLCJpZCI6MTAyNjEwLCJpYXQiOjE2NTg4MzgyNDl9.ArZHJA0AiPEjCTHaf1uocKICuuinPOFTsWxE_pJOy7w",Qi="a27979cacfb91aca066eb432dea002a7";function ai(t,A,r,B,g){var V=new Ci(t,A,ii,Qi);return KB.set(r,V),V}function ei(t){requestAnimationFrame(()=>{uB(t).then(A=>{A.destroy(),KB.delete(t)})})}function uB(t){var A=0;function r(B,g){if(A++,A>1e3){g("获取失败");return}if(!KB.has(t)){setTimeout(()=>{r(B,g)},0);return}B(KB.get(t))}return new Promise((B,g)=>{r(B,g)})}const rs=(t,A)=>{const r=t.__vccOpts||t;for(const[B,g]of A)r[B]=g;return r},Yi={class:"cesium-container"},bg=rs({__name:"index",props:{cameraPosition:{type:Array,default:()=>[]},emeitName:{type:String,default:""},showCompass:{type:Boolean,default:!0},compassColor:{type:String,default:"78,237,198"},compassPosition:{type:Array,default:()=>["10px","10px"]},isSkybox:{type:Boolean,default:!0}},setup(t,{emit:A}){const r=A,B=t,g=b.useTemplateRef("cesiumContent"),V=b.useTemplateRef("entitiesRef"),I=b.ref(0),s=b.ref(-90);var q=null,W=null,E=null;const a=b.getCurrentInstance();var i=B.emeitName||`myCesium${a.uid}`;return b.watch(()=>B.showCompass,k=>{k?b.nextTick(()=>{W=q&&q.cameraMoveListener(w=>{s.value=w.pitch,I.value=w.angle},"changed"),E=q&&q.cameraMoveListener(w=>{s.value=w.pitch,I.value=w.angle},"moveEnd")}):(W&&W.remove(),E&&E.remove())},{immediate:!0}),b.watch(()=>B.isSkybox,k=>{b.nextTick(()=>{q.skyBox=k})},{immediate:!0}),b.onMounted(()=>{q=ai(g.value,a,i),B.cameraPosition.length>0&&q.setCameraView(...B.cameraPosition),Object.keys(a.attrs).forEach(k=>{let w=k.replace(/^on/,"");const{removeEvent:D}=q.mouseEventListen(C=>{C.removeEvent=D,r(w,C)},w)})}),b.onBeforeUnmount(()=>{setTimeout(()=>{W&&W.remove(),E&&E.remove(),ei(i)},0)}),(k,w)=>(b.openBlock(),b.createElementBlock("div",Yi,[b.createElementVNode("div",{class:"cesium-content",ref_key:"cesiumContent",ref:g},null,512),b.createElementVNode("div",{ref_key:"entitiesRef",ref:V},[b.renderSlot(k.$slots,"entities",{},void 0,!0)],512),t.showCompass?(b.openBlock(),b.createElementBlock("div",{key:0,class:"compass",style:b.normalizeStyle({top:t.compassPosition[0],right:t.compassPosition[1],bottom:t.compassPosition[2]||"auto",left:t.compassPosition[3]||"auto","--compass-color":t.compassColor})},[b.createElementVNode("div",{class:"compass-inner",style:b.normalizeStyle({transform:`rotateX(${90-s.value*-1}deg)`})},[b.createElementVNode("img",{src:wt,style:b.normalizeStyle({transform:`rotateZ(${I.value}deg) scaleX(0.8)`})},null,4)],4)],4)):b.createCommentVNode("",!0)]))}},[["__scopeId","data-v-dc2d7193"]]);function ts(t,A){return function(){return t.apply(A,arguments)}}const{toString:xi}=Object.prototype,{getPrototypeOf:yg}=Object,{iterator:FB,toStringTag:Bs}=Symbol,bB=(t=>A=>{const r=xi.call(A);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ZA=t=>(t=t.toLowerCase(),A=>bB(A)===t),yB=t=>A=>typeof A===t,{isArray:Zr}=Array,st=yB("undefined");function wi(t){return t!==null&&!st(t)&&t.constructor!==null&&!st(t.constructor)&&nA(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const gs=ZA("ArrayBuffer");function ki(t){let A;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?A=ArrayBuffer.isView(t):A=t&&t.buffer&&gs(t.buffer),A}const Di=yB("string"),nA=yB("function"),Vs=yB("number"),nB=t=>t!==null&&typeof t=="object",Ji=t=>t===!0||t===!1,oB=t=>{if(bB(t)!=="object")return!1;const A=yg(t);return(A===null||A===Object.prototype||Object.getPrototypeOf(A)===null)&&!(Bs in t)&&!(FB in t)},Si=ZA("Date"),Ki=ZA("File"),ui=ZA("Blob"),Fi=ZA("FileList"),bi=t=>nB(t)&&nA(t.pipe),yi=t=>{let A;return t&&(typeof FormData=="function"&&t instanceof FormData||nA(t.append)&&((A=bB(t))==="formdata"||A==="object"&&nA(t.toString)&&t.toString()==="[object FormData]"))},ni=ZA("URLSearchParams"),[oi,Mi,li,di]=["ReadableStream","Request","Response","Headers"].map(ZA),Gi=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function It(t,A,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let B,g;if(typeof t!="object"&&(t=[t]),Zr(t))for(B=0,g=t.length;B<g;B++)A.call(null,t[B],B,t);else{const V=r?Object.getOwnPropertyNames(t):Object.keys(t),I=V.length;let s;for(B=0;B<I;B++)s=V[B],A.call(null,t[s],s,t)}}function ss(t,A){A=A.toLowerCase();const r=Object.keys(t);let B=r.length,g;for(;B-- >0;)if(g=r[B],A===g.toLowerCase())return g;return null}const Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Is=t=>!st(t)&&t!==Dr;function ng(){const{caseless:t}=Is(this)&&this||{},A={},r=(B,g)=>{const V=t&&ss(A,g)||g;oB(A[V])&&oB(B)?A[V]=ng(A[V],B):oB(B)?A[V]=ng({},B):Zr(B)?A[V]=B.slice():A[V]=B};for(let B=0,g=arguments.length;B<g;B++)arguments[B]&&It(arguments[B],r);return A}const Ui=(t,A,r,{allOwnKeys:B}={})=>(It(A,(g,V)=>{r&&nA(g)?t[V]=ts(g,r):t[V]=g},{allOwnKeys:B}),t),Hi=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ci=(t,A,r,B)=>{t.prototype=Object.create(A.prototype,B),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:A.prototype}),r&&Object.assign(t.prototype,r)},Pi=(t,A,r,B)=>{let g,V,I;const s={};if(A=A||{},t==null)return A;do{for(g=Object.getOwnPropertyNames(t),V=g.length;V-- >0;)I=g[V],(!B||B(I,t,A))&&!s[I]&&(A[I]=t[I],s[I]=!0);t=r!==!1&&yg(t)}while(t&&(!r||r(t,A))&&t!==Object.prototype);return A},fi=(t,A,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=A.length;const B=t.indexOf(A,r);return B!==-1&&B===r},Ri=t=>{if(!t)return null;if(Zr(t))return t;let A=t.length;if(!Vs(A))return null;const r=new Array(A);for(;A-- >0;)r[A]=t[A];return r},ji=(t=>A=>t&&A instanceof t)(typeof Uint8Array<"u"&&yg(Uint8Array)),Xi=(t,A)=>{const B=(t&&t[FB]).call(t);let g;for(;(g=B.next())&&!g.done;){const V=g.value;A.call(t,V[0],V[1])}},Zi=(t,A)=>{let r;const B=[];for(;(r=t.exec(A))!==null;)B.push(r);return B},Li=ZA("HTMLFormElement"),pi=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,B,g){return B.toUpperCase()+g}),Ws=(({hasOwnProperty:t})=>(A,r)=>t.call(A,r))(Object.prototype),vi=ZA("RegExp"),Es=(t,A)=>{const r=Object.getOwnPropertyDescriptors(t),B={};It(r,(g,V)=>{let I;(I=A(g,V,t))!==!1&&(B[V]=I||g)}),Object.defineProperties(t,B)},Ti=t=>{Es(t,(A,r)=>{if(nA(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const B=t[r];if(nA(B)){if(A.enumerable=!1,"writable"in A){A.writable=!1;return}A.set||(A.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Oi=(t,A)=>{const r={},B=g=>{g.forEach(V=>{r[V]=!0})};return Zr(t)?B(t):B(String(t).split(A)),r},hi=()=>{},Ni=(t,A)=>t!=null&&Number.isFinite(t=+t)?t:A;function mi(t){return!!(t&&nA(t.append)&&t[Bs]==="FormData"&&t[FB])}const zi=t=>{const A=new Array(10),r=(B,g)=>{if(nB(B)){if(A.indexOf(B)>=0)return;if(!("toJSON"in B)){A[g]=B;const V=Zr(B)?[]:{};return It(B,(I,s)=>{const q=r(I,g+1);!st(q)&&(V[s]=q)}),A[g]=void 0,V}}return B};return r(t,0)},_i=ZA("AsyncFunction"),$i=t=>t&&(nB(t)||nA(t))&&nA(t.then)&&nA(t.catch),qs=((t,A)=>t?setImmediate:A?((r,B)=>(Dr.addEventListener("message",({source:g,data:V})=>{g===Dr&&V===r&&B.length&&B.shift()()},!1),g=>{B.push(g),Dr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",nA(Dr.postMessage)),AQ=typeof queueMicrotask<"u"?queueMicrotask.bind(Dr):typeof process<"u"&&process.nextTick||qs,H={isArray:Zr,isArrayBuffer:gs,isBuffer:wi,isFormData:yi,isArrayBufferView:ki,isString:Di,isNumber:Vs,isBoolean:Ji,isObject:nB,isPlainObject:oB,isReadableStream:oi,isRequest:Mi,isResponse:li,isHeaders:di,isUndefined:st,isDate:Si,isFile:Ki,isBlob:ui,isRegExp:vi,isFunction:nA,isStream:bi,isURLSearchParams:ni,isTypedArray:ji,isFileList:Fi,forEach:It,merge:ng,extend:Ui,trim:Gi,stripBOM:Hi,inherits:ci,toFlatObject:Pi,kindOf:bB,kindOfTest:ZA,endsWith:fi,toArray:Ri,forEachEntry:Xi,matchAll:Zi,isHTMLForm:Li,hasOwnProperty:Ws,hasOwnProp:Ws,reduceDescriptors:Es,freezeMethods:Ti,toObjectSet:Oi,toCamelCase:pi,noop:hi,toFiniteNumber:Ni,findKey:ss,global:Dr,isContextDefined:Is,isSpecCompliantForm:mi,toJSONObject:zi,isAsyncFn:_i,isThenable:$i,setImmediate:qs,asap:AQ,isIterable:t=>t!=null&&nA(t[FB])};function N(t,A,r,B,g){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",A&&(this.code=A),r&&(this.config=r),B&&(this.request=B),g&&(this.response=g,this.status=g.status?g.status:null)}H.inherits(N,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Cs=N.prototype,is={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{is[t]={value:t}}),Object.defineProperties(N,is),Object.defineProperty(Cs,"isAxiosError",{value:!0}),N.from=(t,A,r,B,g,V)=>{const I=Object.create(Cs);return H.toFlatObject(t,I,function(q){return q!==Error.prototype},s=>s!=="isAxiosError"),N.call(I,t.message,A,r,B,g),I.cause=t,I.name=t.name,V&&Object.assign(I,V),I};const rQ=null;function og(t){return H.isPlainObject(t)||H.isArray(t)}function Qs(t){return H.endsWith(t,"[]")?t.slice(0,-2):t}function as(t,A,r){return t?t.concat(A).map(function(g,V){return g=Qs(g),!r&&V?"["+g+"]":g}).join(r?".":""):A}function tQ(t){return H.isArray(t)&&!t.some(og)}const BQ=H.toFlatObject(H,{},null,function(A){return/^is[A-Z]/.test(A)});function MB(t,A,r){if(!H.isObject(t))throw new TypeError("target must be an object");A=A||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,C){return!H.isUndefined(C[D])});const B=r.metaTokens,g=r.visitor||E,V=r.dots,I=r.indexes,q=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(A);if(!H.isFunction(g))throw new TypeError("visitor must be a function");function W(w){if(w===null)return"";if(H.isDate(w))return w.toISOString();if(!q&&H.isBlob(w))throw new N("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(w)||H.isTypedArray(w)?q&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function E(w,D,C){let S=w;if(w&&!C&&typeof w=="object"){if(H.endsWith(D,"{}"))D=B?D:D.slice(0,-2),w=JSON.stringify(w);else if(H.isArray(w)&&tQ(w)||(H.isFileList(w)||H.endsWith(D,"[]"))&&(S=H.toArray(w)))return D=Qs(D),S.forEach(function(Y,J){!(H.isUndefined(Y)||Y===null)&&A.append(I===!0?as([D],J,V):I===null?D:D+"[]",W(Y))}),!1}return og(w)?!0:(A.append(as(C,D,V),W(w)),!1)}const a=[],i=Object.assign(BQ,{defaultVisitor:E,convertValue:W,isVisitable:og});function k(w,D){if(!H.isUndefined(w)){if(a.indexOf(w)!==-1)throw Error("Circular reference detected in "+D.join("."));a.push(w),H.forEach(w,function(S,e){(!(H.isUndefined(S)||S===null)&&g.call(A,S,H.isString(e)?e.trim():e,D,i))===!0&&k(S,D?D.concat(e):[e])}),a.pop()}}if(!H.isObject(t))throw new TypeError("data must be an object");return k(t),A}function es(t){const A={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(B){return A[B]})}function Mg(t,A){this._pairs=[],t&&MB(t,this,A)}const Ys=Mg.prototype;Ys.append=function(A,r){this._pairs.push([A,r])},Ys.toString=function(A){const r=A?function(B){return A.call(this,B,es)}:es;return this._pairs.map(function(g){return r(g[0])+"="+r(g[1])},"").join("&")};function gQ(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xs(t,A,r){if(!A)return t;const B=r&&r.encode||gQ;H.isFunction(r)&&(r={serialize:r});const g=r&&r.serialize;let V;if(g?V=g(A,r):V=H.isURLSearchParams(A)?A.toString():new Mg(A,r).toString(B),V){const I=t.indexOf("#");I!==-1&&(t=t.slice(0,I)),t+=(t.indexOf("?")===-1?"?":"&")+V}return t}class ws{constructor(){this.handlers=[]}use(A,r,B){return this.handlers.push({fulfilled:A,rejected:r,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(A){this.handlers[A]&&(this.handlers[A]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(A){H.forEach(this.handlers,function(B){B!==null&&A(B)})}}const ks={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},VQ={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Mg,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},lg=typeof window<"u"&&typeof document<"u",dg=typeof navigator=="object"&&navigator||void 0,sQ=lg&&(!dg||["ReactNative","NativeScript","NS"].indexOf(dg.product)<0),IQ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",WQ=lg&&window.location.href||"http://localhost",JA={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lg,hasStandardBrowserEnv:sQ,hasStandardBrowserWebWorkerEnv:IQ,navigator:dg,origin:WQ},Symbol.toStringTag,{value:"Module"})),...VQ};function EQ(t,A){return MB(t,new JA.classes.URLSearchParams,Object.assign({visitor:function(r,B,g,V){return JA.isNode&&H.isBuffer(r)?(this.append(B,r.toString("base64")),!1):V.defaultVisitor.apply(this,arguments)}},A))}function qQ(t){return H.matchAll(/\w+|\[(\w*)]/g,t).map(A=>A[0]==="[]"?"":A[1]||A[0])}function CQ(t){const A={},r=Object.keys(t);let B;const g=r.length;let V;for(B=0;B<g;B++)V=r[B],A[V]=t[V];return A}function Ds(t){function A(r,B,g,V){let I=r[V++];if(I==="__proto__")return!0;const s=Number.isFinite(+I),q=V>=r.length;return I=!I&&H.isArray(g)?g.length:I,q?(H.hasOwnProp(g,I)?g[I]=[g[I],B]:g[I]=B,!s):((!g[I]||!H.isObject(g[I]))&&(g[I]=[]),A(r,B,g[I],V)&&H.isArray(g[I])&&(g[I]=CQ(g[I])),!s)}if(H.isFormData(t)&&H.isFunction(t.entries)){const r={};return H.forEachEntry(t,(B,g)=>{A(qQ(B),g,r,0)}),r}return null}function iQ(t,A,r){if(H.isString(t))try{return(A||JSON.parse)(t),H.trim(t)}catch(B){if(B.name!=="SyntaxError")throw B}return(r||JSON.stringify)(t)}const Wt={transitional:ks,adapter:["xhr","http","fetch"],transformRequest:[function(A,r){const B=r.getContentType()||"",g=B.indexOf("application/json")>-1,V=H.isObject(A);if(V&&H.isHTMLForm(A)&&(A=new FormData(A)),H.isFormData(A))return g?JSON.stringify(Ds(A)):A;if(H.isArrayBuffer(A)||H.isBuffer(A)||H.isStream(A)||H.isFile(A)||H.isBlob(A)||H.isReadableStream(A))return A;if(H.isArrayBufferView(A))return A.buffer;if(H.isURLSearchParams(A))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),A.toString();let s;if(V){if(B.indexOf("application/x-www-form-urlencoded")>-1)return EQ(A,this.formSerializer).toString();if((s=H.isFileList(A))||B.indexOf("multipart/form-data")>-1){const q=this.env&&this.env.FormData;return MB(s?{"files[]":A}:A,q&&new q,this.formSerializer)}}return V||g?(r.setContentType("application/json",!1),iQ(A)):A}],transformResponse:[function(A){const r=this.transitional||Wt.transitional,B=r&&r.forcedJSONParsing,g=this.responseType==="json";if(H.isResponse(A)||H.isReadableStream(A))return A;if(A&&H.isString(A)&&(B&&!this.responseType||g)){const I=!(r&&r.silentJSONParsing)&&g;try{return JSON.parse(A)}catch(s){if(I)throw s.name==="SyntaxError"?N.from(s,N.ERR_BAD_RESPONSE,this,null,this.response):s}}return A}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:JA.classes.FormData,Blob:JA.classes.Blob},validateStatus:function(A){return A>=200&&A<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],t=>{Wt.headers[t]={}});const QQ=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aQ=t=>{const A={};let r,B,g;return t&&t.split(`
116
+ `;var g=new Cesium.PostProcessStage({name:"hi_snow",fragmentShader:B,uniforms:{highlight:function(){return new Cesium.Color(1,0,0,.5)}}});this.viewer.scene.postProcessStages.add(g);const V=this.viewer;r&&r({entity:g,remove(){g&&V.scene.postProcessStages.remove(g),g=null}})}}class Vi{constructor(A){this.viewer=A.viewer}setCameraHeight(A=0,r=5e3){this.viewer.scene.screenSpaceCameraController.minimumZoomDistance=A,this.viewer.scene.screenSpaceCameraController.maximumZoomDistance=r}}class si{constructor(A){iA(this,Wr,null);VA(this,"offsetFromHeadingPitchRange",(A,r,B,g,V,I)=>{let s=Cesium.Math.toRadians(g),q=Cesium.Math.toRadians(V);q=Cesium.Math.clamp(q,-Cesium.Math.PI_OVER_TWO,Cesium.Math.PI_OVER_TWO),s=Cesium.Math.zeroToTwoPi(s)-Cesium.Math.PI_OVER_TWO;const W=Cesium.Quaternion.fromAxisAngle(Cesium.Cartesian3.UNIT_Y,-q),E=Cesium.Quaternion.fromAxisAngle(Cesium.Cartesian3.UNIT_Z,-s),a=Cesium.Quaternion.multiply(E,W,E),i=Cesium.Matrix3.fromQuaternion(a),k=Cesium.Cartesian3.clone(Cesium.Cartesian3.UNIT_X);Cesium.Matrix3.multiplyByVector(i,k,k),Cesium.Cartesian3.multiplyByScalar(k,I,k);const w=Cesium.Cartesian3.fromDegrees(A,r,B),D=Cesium.Transforms.eastNorthUpToFixedFrame(w),C=Cesium.Matrix4.multiplyByPoint(D,k,new Cesium.Cartesian3),S=Cesium.Cartographic.fromCartesian(C),e=Cesium.Math.toDegrees(S.longitude),Y=Cesium.Math.toDegrees(S.latitude),J=S.height;return[e,Y,J,C]});VA(this,"getLonLatHeight",(A,r)=>{try{let B=this.viewer.scene.sampleHeight(new window.Cesium.Cartographic(window.Cesium.Math.toRadians(A),window.Cesium.Math.toRadians(r)));return B||(B=this.viewer.scene.globe.getHeight(new window.Cesium.Cartographic(window.Cesium.Math.toRadians(A),window.Cesium.Math.toRadians(r)))),B||0}catch{return 0}});VA(this,"mouseEventListen",(A,r="LEFT_CLICK")=>{let B=new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);B.setInputAction(V,Cesium.ScreenSpaceEventType[r]);let g=this;function V(I){try{var s={},q=g.viewer.scene.pick(I.position||I.endPosition),W=g.viewer.scene.camera.pickEllipsoid(I.position||I.endPosition,g.viewer.scene.globe.ellipsoid);if(Cesium.defined(W)){Object.assign(s,W);let E=g.viewer.camera.getPickRay(I.position||I.endPosition),a=g.viewer.scene.globe.pick(E,g.viewer.scene),i=Cesium.Cartographic.fromCartesian(a);s.dbmlog=Cesium.Math.toDegrees(i.longitude),s.dbmlat=Cesium.Math.toDegrees(i.latitude),s.dbmalt=g.viewer.scene.sampleHeight(new Cesium.Cartographic(Cesium.Math.toRadians(s.dbmlog),Cesium.Math.toRadians(s.dbmlat))),s.dbmalt||(s.dbmalt=g.getLonLatHeight(s.dbmlog,s.dbmlat));let k=Cesium.Cartographic.fromCartesian(W);s.tqlog=Cesium.Math.toDegrees(k.longitude),s.tqlat=Cesium.Math.toDegrees(k.latitude),s.tqalt=g.viewer.scene.sampleHeight(new Cesium.Cartographic(Cesium.Math.toRadians(s.tqlog),Cesium.Math.toRadians(s.tqlat)));let w=g.viewer.scene.pickPosition(I.position||I.endPosition);if(w){let D=Cesium.Cartographic.fromCartesian(w);s.cjlog=Cesium.Math.toDegrees(D.longitude),s.cjlat=Cesium.Math.toDegrees(D.latitude),s.cjalt=g.viewer.scene.sampleHeight(new Cesium.Cartographic(Cesium.Math.toRadians(s.cjlog),Cesium.Math.toRadians(s.cjlat)))}s.log=Number(s.cjlog||s.dbmlog),s.lat=Number(s.cjlat||s.dbmlat),s.alt=s.cjalt||s.dbmalt}Cesium.defined(q)&&q.id&&(s.id=q.id._id,s.name=q.id._name,s.entitiesLX=q.id._entitiesLX,s.userDefined=q.id._userDefined,s.pick=q.id),A&&A(s)}catch(E){console.log(E)}}return{removeEvent(){B.removeInputAction(Cesium.ScreenSpaceEventType[r])}}});Object.assign(this,A)}cameraMoveListener(A,r="moveEnd"){const B=this.viewer;function g(){const V=window.Cesium.Math.toDegrees(B.camera.heading),I=window.Cesium.Math.toDegrees(B.camera.pitch),s=window.Cesium.Math.toDegrees(B.camera.roll),q=B.camera.positionCartographic,{height:W,longitude:E,latitude:a}=q;var i={log:Number(window.Cesium.Math.toDegrees(E).toFixed(6)),lat:Number(window.Cesium.Math.toDegrees(a).toFixed(6)),alt:Number(W.toFixed(2)),heading:Number(V.toFixed(2)),pitch:Number(I.toFixed(2)),angle:Number((360-V).toFixed(2)),roll:s};A&&A(i)}return this.viewer.camera[r].addEventListener(g),{remove(){B.camera[r].removeEventListener(g)}}}getCesiumViewerExtend(){return X(this,Wr)?X(this,Wr):(EA(this,Wr,new Promise(A=>{const r=window.Cesium.Math.toDegrees(this.viewer.camera.pitch);let B={maxx:135.08,maxy:53.55,minx:73.55,miny:3.85};function g(s){for(var q=s.scene,W=q.canvas,E=W.clientWidth,a=W.clientHeight,i=[new Cesium.Cartesian2(0,0),new Cesium.Cartesian2(E,0),new Cesium.Cartesian2(E,a),new Cesium.Cartesian2(0,a)],k=q.globe.ellipsoid,w=[],D=0;D<i.length;D++){var C=q.camera.getPickRay(i[D]);if(C){var S=q.globe.pick(C,q);if(S){var e=k.cartesianToCartographic(S);e&&w.push(e)}}}if(w.length===0)return null;for(var Y=w[0].longitude,J=w[0].longitude,u=w[0].latitude,F=w[0].latitude,n=1;n<w.length;n++){var l=w[n].longitude,d=w[n].latitude;Y=Math.min(Y,l),J=Math.max(J,l),u=Math.min(u,d),F=Math.max(F,d)}return{west:Cesium.Math.toDegrees(Y),south:Cesium.Math.toDegrees(u),east:Cesium.Math.toDegrees(J),north:Cesium.Math.toDegrees(F)}}function V(s){let q={},W=s.camera.computeViewRectangle(s.scene.globe.ellipsoid,new Cesium.Rectangle);if(typeof W>"u"){let E=s.scene.canvas,a=new Cesium.Cartesian2(0,0),i=new Cesium.Cartesian2(E.clientWidth,E.clientHeight),k=s.scene.globe.ellipsoid,w=s.camera.pickEllipsoid(a,k),D=s.camera.pickEllipsoid(i,k),C=s.scene.globe.ellipsoid.cartesianToCartographic(w),S=s.scene.globe.ellipsoid.cartesianToCartographic(D),e=Cesium.Math.toDegrees(C.longitude),Y=Cesium.Math.toDegrees(S.longitude),J=Cesium.Math.toDegrees(S.latitude),u=Cesium.Math.toDegrees(C.latitude);q.west=e,q.east=Y,q.south=J,q.north=u}else q.east=Cesium.Math.toDegrees(W.east),q.north=Cesium.Math.toDegrees(W.north),q.west=Cesium.Math.toDegrees(W.west),q.south=Cesium.Math.toDegrees(W.south);return q}const I=()=>{let s=r>=-70?g(this.viewer):V(this.viewer);s||(s=V(this.viewer)),s?(B={maxx:s.east,maxy:s.north,minx:s.west,miny:s.south},A(B)):setTimeout(()=>{I()},500)};I()}).finally(()=>{EA(this,Wr,null)})),X(this,Wr))}}Wr=new WeakMap;class Vt{static bindProperties(A,r){Object.assign(A,r);const B=Object.getPrototypeOf(r),g=Object.getOwnPropertyDescriptors(B);return Object.entries(g).forEach(([V,I])=>{V!=="constructor"&&(I.value&&typeof I.value=="function"?A[V]=I.value.bind(r):(I.get||I.set)&&Object.defineProperty(A,V,{get:I.get?()=>r[V]:void 0,set:I.set?s=>{r[V]=s}:void 0,enumerable:I.enumerable,configurable:!0}))}),Object.keys(r).forEach(V=>{!(V in A)&&typeof r[V]!="function"&&Object.defineProperty(A,V,{get:()=>r[V],set:I=>{r[V]=I},enumerable:!0,configurable:!0})}),A}}function Ii(){try{const t=document.createElement("canvas"),A=t.getContext("webgl")||t.getContext("experimental-webgl");if(!A)return console.error("WebGL不可用"),JB.error("WebGL不可用"),"WebGL不支持或已禁用";const r=A.getShaderPrecisionFormat(A.VERTEX_SHADER,A.HIGH_FLOAT),B=A.getShaderPrecisionFormat(A.FRAGMENT_SHADER,A.HIGH_FLOAT);let g={version:A.getParameter(A.VERSION),vendor:A.getParameter(A.VENDOR),renderer:A.getParameter(A.RENDERER),vertexShaderPrecision:r?r.precision:"unknown",fragmentShaderPrecision:B?B.precision:"unknown"};return console.log("WebGL检查结果:",g),t.remove(),g}catch(t){return console.error("WebGL检查失败:",t),t}}Ii();const{randomStr:SB,convertImgToBase64:Wi,formatDateTime:Ei,to2DArray:qi}=aB;let Ci=(Rs=class{constructor(A,r,B,g){VA(this,"viewer",null);VA(this,"TianDiTuToken","");VA(this,"vueComponent",null);iA(this,vr,null);VA(this,"clippingPolygons",(A,r=!0)=>{var B=[];if(Array.isArray(A[0]))A.forEach(g=>{const V=window.Cesium.Cartesian3.fromDegreesArray(g),I=new window.Cesium.ClippingPolygon({positions:V,edgeWidth:0,edgeColor:Cesium.Color.TRANSPARENT});B.push(I)});else{const g=window.Cesium.Cartesian3.fromDegreesArray(A),V=new window.Cesium.ClippingPolygon({positions:g,edgeWidth:0,edgeColor:Cesium.Color.TRANSPARENT});B.push(V)}this.viewer.scene.globe.clippingPolygons=new window.Cesium.ClippingPolygonCollection({polygons:B,inverse:r})});VA(this,"drawWall",async(A={},r={})=>{var B={positions:[],mins:[],min:0,height:20,stepNum:.25,count:3,color:"#4EEDC6",image:wE,...A},{positions:g,mins:V,height:I,stepNum:s,count:q,color:W}=B;(!V||V.length<=0)&&(V=new Array(g.length/2).fill(B.min));const E=this.viewer;var a=[],i=q;k();function k(){i>0&&w().then(D=>{i--,k()})}function w(){return new Promise(D=>{var C=0,S=V.map(J=>J+C);function e(){return C+=s,C>I&&(C=0),C>I/q&&D(C),S=V.map(J=>J+C),S}const Y=E.entities.add({id:SB(),wall:{show:!0,vertexFormat:window.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT_POSITION_AND_NORMAL,positions:window.Cesium.Cartesian3.fromDegreesArray(g),minimumHeights:V,maximumHeights:q<=1?V.map(J=>J+I):new window.Cesium.CallbackProperty(e,!1),material:new window.Cesium.ImageMaterialProperty({image:B.image,transparent:!0,color:new window.Cesium.CallbackProperty(function(){return window.Cesium.Color.fromCssColorString(W).withAlpha(1-C/I)},!1)}),outLine:!0,...r}});a.push(Y)})}return{entitys:a,remove(){a&&a.forEach(D=>E.entities.remove(D))}}});VA(this,"openSun",(A={})=>{var r={multiplier:4e3,darkness:.6,date:Ei("yyyy-MM-dd"),hours:12,lightCoords:[-52.59777,-12.03883],lightSourceType:[""],...A};if(this.viewer.scene.globe.enableLighting=!0,this.viewer.shadows=!0,this.viewer.clock.multiplier=r.multiplier,this.viewer.scene.shadowMap.maximumDistance=1e4,this.viewer.scene.shadowMap.size=6e3,this.viewer.shadowMap.darkness=r.darkness,this.viewer.scene.shadowMap.softShadow=!0,this.viewer.scene.globe.dynamicAtmosphereLightingFromSun=!0,r.lightSourceType.includes("move")&&new window.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas).setInputAction(g=>{this.viewer.scene.light=new window.Cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC})},window.Cesium.ScreenSpaceEventType.MOUSE_MOVE),r.lightSourceType.includes("coord")&&(this.viewer.scene.light=new window.Cesium.DirectionalLight({direction:window.Cesium.Cartesian3.fromDegrees(...r.lightCoords)})),r.lightSourceType.includes("date")){var B=new Date(new Date(new Date(r.date)).setHours(Number(r.hours)));this.viewer.clock.startTime=window.Cesium.JulianDate.fromDate(B),this.viewer.clock.currentTime=window.Cesium.JulianDate.fromDate(B),this.viewer.clock.stopTime=window.Cesium.JulianDate.fromDate(B)}});VA(this,"getPolygonArea",A=>{!Array.isArray(A[0])&&(A=qi(A,2)),A[0].join(",")==A[A.length-1].join(",")&&(A=A.slice(0,-1));var r=6371e3,B=2*Math.PI*r/360,g=Math.PI/180;function V(s){for(var q=0,W=0;W<s.length;++W){var E=(W+1)%s.length,a=s[W][0]*B*Math.cos(s[W][1]*g),i=s[W][1]*B,k=s[E][0]*B*Math.cos(s[E][1]*g),w=s[E][1]*B;q+=a*w-k*i}return Math.abs(q/2)}var I=0;return A.length>2&&(I=V(A)),I&&I.toFixed(2)});VA(this,"getStartEndLength",(A,r)=>{let B=Cesium.Cartographic.fromCartesian(Cesium.Cartesian3.fromDegrees(Number(A[0]),Number(A[1]),Number(A[2]||0))),g=Cesium.Cartographic.fromCartesian(Cesium.Cartesian3.fromDegrees(Number(r[0]),Number(r[1]),Number(r[2]||0))),V=new Cesium.EllipsoidGeodesic;return V.setEndPoints(B,g),V.surfaceDistance.toFixed(2)});VA(this,"getPolygonPointsCenter",A=>{var r=A.length/2,B=0,g=0,V=0;for(let E=0;E<A.length;E+=2){let a=[A[E],A[E+1]];var I,s;s=parseFloat(a[0])*Math.PI/180,I=parseFloat(a[1])*Math.PI/180,B+=Math.cos(I)*Math.cos(s),g+=Math.cos(I)*Math.sin(s),V+=Math.sin(I)}B=B/r,g=g/r,V=V/r;var q=Math.atan2(g,B),W=Math.atan2(V,Math.sqrt(B*B+g*g));return[q*180/Math.PI,W*180/Math.PI]});VA(this,"addEllipse",(A={},r=!0)=>{var B={position:[],deviationR:1,imageUrl:eE,maxR:200,count:2,type:1,minR:0,rotate:30},g={1:{},2:{count:1},3:{count:1,...!("imageUrl"in A)&&{imageUrl:aE},minR:Cesium.Math.toRadians(B.rotate)}};if(B=Object.assign(B,A,g[A.type||B.type]),B.position.length<=0)return{};var V=Array.from(new Array(B.count)),I=Array.from(new Array(B.count));V=V.map(()=>B.minR),I=I.map((k,w)=>function(D){return function(){return B.type===3?(V[w]+=B.deviationR,V[w]):(V[w]=V[w]+B.deviationR,V[w]>=(B.maxR-B.minR)/B.count+B.minR&&D(),V[w]>=B.maxR&&(V[w]=B.minR),V[w])}});const s=this;var q=[];function W(k){return new Promise(w=>{var D=s.viewer.entities.add({id:SB(),position:Cesium.Cartesian3.fromDegrees(B.position[0],B.position[1],B.position[2]||0),show:!0,zIndex:99,ellipse:{clampToGround:!0,semiMinorAxis:B.type==3?B.maxR:r?new Cesium.CallbackProperty(I[k](w),!1):B.maxR,semiMajorAxis:B.type==3?B.maxR:r?new Cesium.CallbackProperty(I[k](w),!1):B.maxR,height:B.position[2]||0,...B.type==3&&{stRotation:r?new Cesium.CallbackProperty(I[k](w),!1):B.rotate},material:new Cesium.ImageMaterialProperty({image:B.imageUrl,repeat:Cesium.Cartesian2(1,1),transparent:!0,...B.type!=3&&{color:r?new Cesium.CallbackProperty(function(){var C=0;return B.type==1?C=1-(V[k]-B.minR)/B.maxR:C=1,(V[k]+B.deviationR*2>=B.maxR||V[k]-B.deviationR*2<=B.minR)&&(C=0),Cesium.Color.WHITE.withAlpha(C)},!1):Cesium.Color.WHITE.withAlpha(1)}})}});q.push(D)})}var E=0;a();function a(){E>=B.count||W(E).then(()=>{B.type==1&&(E++,a())})}const i=this.viewer;return{entitys:q,remove(){q&&q.forEach(k=>{i.entities.remove(k)})}}});VA(this,"setDianJiShanShuo",(A=!0)=>{A?(this.viewer.scene.pickTranslucentDepth=()=>!1,this.viewer.scene.pickTranslucentGeometry=()=>!1):(this.viewer.scene.pickTranslucentDepth=null,this.viewer.scene.pickTranslucentGeometry=null)});VA(this,"startDynaDrawPolygon",(A,r={},B={},g={})=>{if(this.dynaDrawPolygonReturn)return this.dynaDrawPolygonReturn;this.setDianJiShanShuo(!1);var V=[],I=this.addPolygon({positions:V},{hierarchy:new Cesium.CallbackProperty(()=>new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(V)),!1),...r},{positions:new Cesium.CallbackProperty(()=>Cesium.Cartesian3.fromDegreesArray(V),!1),...B});const s=this.mouseEventListen(i=>{V.push(i.log,i.lat)}),q=this.mouseEventListen(i=>{V.length>=4&&V.splice(-2,2),V.length>=2&&V.push(i.log,i.lat)},"MOUSE_MOVE"),W=this.mouseEventListen(()=>{var i=a();A&&A(i)},"LEFT_DOUBLE_CLICK"),E=this;function a(){if(E.dynaDrawPolygonReturn){s&&s.removeEvent(),q&&q.removeEvent(),W&&W.removeEvent(),V.splice(-2,2),V.push(V[0],V[1]),I.remove();var i=E.addPolygon({positions:V,...g},r,B);return E.dynaDrawPolygonReturn=null,E.setDianJiShanShuo(),{positions:V,entity:i}}}return this.dynaDrawPolygonReturn={finish:a},this.dynaDrawPolygonReturn});VA(this,"addPolygon",(A,r={},B={})=>{this.viewer.entities.getById(A.id)&&this.viewer.entities.removeById(A.id);var g=this.viewer.entities.add({id:A.id||SB(),name:A.name,entitiesLX:A.leixing||"",userDefined:A.userDefined,zIndex:9,polygon:Object.assign({heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,hierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(A.positions)),material:Cesium.Color.fromBytes(255,255,0).withAlpha(.4)},r),polyline:Object.assign({positions:Cesium.Cartesian3.fromDegreesArray(A.positions),width:A.lineWidth||3,material:Cesium.Color.fromBytes(255,150,0).withAlpha(1),clampToGround:!0},B)});const V=this.viewer;return{entity:g,remove(){V.entities.remove(g)}}});VA(this,"addEntities",(A,r=!1,B={},g={})=>{if(!A)return;var V=Object.assign({id:SB(),leixing:"entities",img:YE,width:30,height:30},A);this.viewer.entities.getById(V.id)&&this.viewer.entities.removeById(V.id);var I=this.viewer.entities.add({id:V.id,name:V.name,userDefined:V.userDefined,entitiesLX:V.leixing,position:window.Cesium.Cartesian3.fromDegrees(Number(V.log),Number(V.lat),Number(V.alt||0)),billboard:{show:"billboardShow"in V?V.billboardShow:!0,image:V.img,...r&&{disableDepthTestDistance:Number.POSITIVE_INFINITY},horizontalOrigin:window.Cesium.HorizontalOrigin.CENTER,verticalOrigin:window.Cesium.VerticalOrigin.BOTTOM,scale:1,width:V.width,height:V.height,...B},label:{show:"labelShow"in V?V.labelShow:!0,showBackground:!0,backgroundColor:window.Cesium.Color.fromCssColorString("rgba(13,241,249,0.8)"),...r&&{disableDepthTestDistance:Number.POSITIVE_INFINITY},scale:.5,font:"normal 32px MicroSoft YaHei",text:V.text,fillColor:window.Cesium.Color.fromCssColorString("#04009F"),outlineColor:window.Cesium.Color.fromCssColorString("#04009F"),outlineWidth:4,borderRadius:20,pixelOffset:new window.Cesium.Cartesian2(0,-70),horizontalOrigin:window.Cesium.HorizontalOrigin.CENTER,...g}});const s=this.viewer;return{entity:I,remove(){s.entities.remove(I)}}});VA(this,"reverseSelectionMask",async(A,r={})=>{var B={maskColor:"#243979",maskImg:xE,maskOpacity:.8,lineColor:"#6dcdeb",lineOpacity:1,lineWidth:2};Object.assign(B,r),B.maskImg&&(B.maskImg=await Wi(B.maskImg));let g=new Cesium.Entity({polygon:{heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,clampToGround:!0,hierarchy:{positions:Cesium.Cartesian3.fromDegreesArray([1,0,1,90,179,90,179,0]),holes:[{positions:Cesium.Cartesian3.fromDegreesArray(A)}]},material:new Cesium.ImageMaterialProperty({image:B.maskImg,repeat:new Cesium.Cartesian2(10,30),color:Cesium.Color.fromCssColorString(B.maskColor).withAlpha(B.maskOpacity),transparent:!0})}}),V=new Cesium.Entity({polyline:{positions:Cesium.Cartesian3.fromDegreesArray(A),width:B.lineWidth,height:0,material:Cesium.Color.fromCssColorString(B.lineColor).withAlpha(B.lineOpacity),clampToGround:!0}});return this.viewer.entities.add(g),this.viewer.entities.add(V),{polygonEntity:g,lineEntity:V}});VA(this,"updateHtmlEntities",A=>{if(A)try{requestAnimationFrame(()=>{var r=A.getVm().getAttribute("position").split(",");const B=window.Cesium.Cartesian3.fromDegrees(Number(r[0]),Number(r[1]),Number(r[2]||0));A.setPosition(B)})}catch(r){return r}});VA(this,"addHtmlEntities",(A=void 0,r=1)=>new Promise((B,g)=>{requestAnimationFrame(()=>{if(!this.vueComponent.refs.entitiesRef.children)return g("没有找到插槽");var V=A!==void 0?this.vueComponent.refs.entitiesRef.children[A]:this.vueComponent.refs.entitiesRef,I=[];const s=V;V.children&&V.children.length>0&&Array.from(V.children).forEach(q=>{var W=null;if(q.getAttribute("position")){let a=q.getAttribute("position");var E=Array.isArray(a)?a:a.split(",");const i=window.Cesium.Cartesian3.fromDegrees(Number(E[0]),Number(E[1]),Number(E[2]||0));W=new hs(this.viewer,i,q,this),W&&(W.getVm().style.zIndex=r)}I.push(W)}),B({list:I,parentContainer:s})})}));VA(this,"setCameraView",(A=116.397428,r=39.90923,B=1e4,g=360,V=-90,I=0)=>{this.viewer.camera.setView({destination:window.Cesium.Cartesian3.fromDegrees(A,r,B),orientation:{heading:window.Cesium.Math.toRadians(Number(g)),pitch:window.Cesium.Math.toRadians(Number(V)),roll:Number(I)}})});VA(this,"flyTo",(A=[],r=5,B,g=!0)=>{var V=[116.397428,39.90923,1e4,360,-90,0];function I(s,q){for(;s.length<q;)s.push(null);return s}A=I(A,6),A=A.map((s,q)=>s??V[q]),this.viewer.camera.flyTo({duration:r,destination:Cesium.Cartesian3.fromDegrees(A[0],A[1],A[2]),orientation:{heading:Cesium.Math.toRadians(A[3]),pitch:Cesium.Math.toRadians(A[4]),roll:A[5]},complete:function(){B&&B()},...g&&{easingFunction:Cesium.EasingFunction.LINEAR_NONE}})});this.TianDiTuToken=g,this.vueComponent=r,window.Cesium.Ion.defaultAccessToken=B;const V=new window.Cesium.Viewer(A,{animation:!1,homeButton:!1,fullscreenButton:!1,baseLayerPicker:!1,geocoder:!1,timeline:!1,sceneModePicker:!1,navigationHelpButton:!1,infoBox:!1,requestRenderMode:!1,scene3DOnly:!1,sceneMode:3,fullscreenElement:document.body,selectionIndicator:!1,skyBox:!1,skyAtmosphere:!1,allowDataSourcesToSuspendAnimation:!1,terrainProvider:new window.Cesium.EllipsoidTerrainProvider({}),terrainShadows:Cesium.ShadowMode.ENABLED,orderIndependentTranslucency:!1,contextOptions:{webgl:{alpha:!0,depth:!1,stencil:!0,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!0,powerPreference:"high-performance"},allowTextureFilterAnisotropic:!0}});V.scene.fxaa=!0,V.scene.postProcessStages.fxaa.enabled=!0,V.imageryLayers.remove(V.imageryLayers.get(0)),V.cesiumWidget.creditContainer.style.display="none",V.scene.globe.baseColor=Cesium.Color.TRANSPARENT,window.Cesium.FeatureDetection.supportsImageRenderingPixelated()&&(V.resolutionScale=window.devicePixelRatio),/Mobi|Android|iPhone/i.test(navigator.userAgent)||(V.scene.screenSpaceCameraController.tiltEventTypes=[window.Cesium.CameraEventType.RIGHT_DRAG],V.scene.screenSpaceCameraController.zoomEventTypes=[window.Cesium.CameraEventType.WHEEL],V.scene.screenSpaceCameraController.rotateEventTypes=[window.Cesium.CameraEventType.LEFT_DRAG]),V.cesiumWidget.screenSpaceEventHandler.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this.viewer=V,V.scene.backgroundColor=new window.Cesium.Color(0,0,0,0),Vt.bindProperties(this,new si(this)),Vt.bindProperties(this,new Vi(this)),Vt.bindProperties(this,new kE(this)),Vt.bindProperties(this,new Bi(this)),Vt.bindProperties(this,new gi(this))}set skyBox(A){A?EA(this,vr,QE(this.viewer)):X(this,vr)&&X(this,vr).remove()}set DiXingJianCe(A){this.viewer.scene.globe.depthTestAgainstTerrain=A}set DaQiCeng(A){this.viewer.scene.globe.showGroundAtmosphere=A}destroy(){this.viewer&&window.Cesium.defined(this.viewer)&&requestAnimationFrame(()=>{this.viewer.clock.onTick.removeEventListener(this.viewer._renderLoop),this.viewer.scene.postRender.removeEventListener(this.viewer._updateThrottle),window.cancelAnimationFrame(this.viewer._renderLoopId),this.viewer.destroy(),this.viewer=null})}},vr=new WeakMap,Rs);const KB=new Map,ii="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNDExNWIzNi1iNjQxLTRkYTQtYTI4OS0yMzM2NTViZDFiNWEiLCJpZCI6MTAyNjEwLCJpYXQiOjE2NTg4MzgyNDl9.ArZHJA0AiPEjCTHaf1uocKICuuinPOFTsWxE_pJOy7w",Qi="a27979cacfb91aca066eb432dea002a7";function ai(t,A,r,B,g){var V=new Ci(t,A,ii,Qi);return KB.set(r,V),V}function ei(t){requestAnimationFrame(()=>{uB(t).then(A=>{A.destroy(),KB.delete(t)})})}function uB(t){var A=0;function r(B,g){if(A++,A>1e3){g("获取失败");return}if(!KB.has(t)){setTimeout(()=>{r(B,g)},0);return}B(KB.get(t))}return new Promise((B,g)=>{r(B,g)})}const rs=(t,A)=>{const r=t.__vccOpts||t;for(const[B,g]of A)r[B]=g;return r},Yi={class:"cesium-container"},bg=rs({__name:"index",props:{cameraPosition:{type:Array,default:()=>[]},emeitName:{type:String,default:""},showCompass:{type:Boolean,default:!0},compassColor:{type:String,default:"78,237,198"},compassPosition:{type:Array,default:()=>["10px","10px"]},isSkybox:{type:Boolean,default:!0}},setup(t,{emit:A}){const r=A,B=t,g=b.useTemplateRef("cesiumContent"),V=b.useTemplateRef("entitiesRef"),I=b.ref(0),s=b.ref(-90);var q=null,W=null,E=null;const a=b.getCurrentInstance();var i=B.emeitName||`myCesium${a.uid}`;return b.watch(()=>B.showCompass,k=>{k?b.nextTick(()=>{W=q&&q.cameraMoveListener(w=>{s.value=w.pitch,I.value=w.angle},"changed"),E=q&&q.cameraMoveListener(w=>{s.value=w.pitch,I.value=w.angle},"moveEnd")}):(W&&W.remove(),E&&E.remove())},{immediate:!0}),b.watch(()=>B.isSkybox,k=>{b.nextTick(()=>{q.skyBox=k})},{immediate:!0}),b.onMounted(()=>{q=ai(g.value,a,i),B.cameraPosition.length>0&&q.setCameraView(...B.cameraPosition),Object.keys(a.attrs).forEach(k=>{let w=k.replace(/^on/,"");const{removeEvent:D}=q.mouseEventListen(C=>{C.removeEvent=D,r(w,C)},w)})}),b.onBeforeUnmount(()=>{setTimeout(()=>{W&&W.remove(),E&&E.remove(),ei(i)},0)}),(k,w)=>(b.openBlock(),b.createElementBlock("div",Yi,[b.createElementVNode("div",{class:"cesium-content",ref_key:"cesiumContent",ref:g},null,512),b.createElementVNode("div",{ref_key:"entitiesRef",ref:V},[b.renderSlot(k.$slots,"entities",{},void 0,!0)],512),t.showCompass?(b.openBlock(),b.createElementBlock("div",{key:0,class:"compass",style:b.normalizeStyle({top:t.compassPosition[0],right:t.compassPosition[1],bottom:t.compassPosition[2]||"auto",left:t.compassPosition[3]||"auto","--compass-color":t.compassColor})},[b.createElementVNode("div",{class:"compass-inner",style:b.normalizeStyle({transform:`rotateX(${90-s.value*-1}deg)`})},[b.createElementVNode("img",{src:wt,style:b.normalizeStyle({transform:`rotateZ(${I.value}deg) scaleX(0.8)`})},null,4)],4)],4)):b.createCommentVNode("",!0)]))}},[["__scopeId","data-v-dc2d7193"]]);function ts(t,A){return function(){return t.apply(A,arguments)}}const{toString:xi}=Object.prototype,{getPrototypeOf:yg}=Object,{iterator:FB,toStringTag:Bs}=Symbol,bB=(t=>A=>{const r=xi.call(A);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ZA=t=>(t=t.toLowerCase(),A=>bB(A)===t),yB=t=>A=>typeof A===t,{isArray:Zr}=Array,st=yB("undefined");function wi(t){return t!==null&&!st(t)&&t.constructor!==null&&!st(t.constructor)&&nA(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const gs=ZA("ArrayBuffer");function ki(t){let A;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?A=ArrayBuffer.isView(t):A=t&&t.buffer&&gs(t.buffer),A}const Di=yB("string"),nA=yB("function"),Vs=yB("number"),nB=t=>t!==null&&typeof t=="object",Ji=t=>t===!0||t===!1,oB=t=>{if(bB(t)!=="object")return!1;const A=yg(t);return(A===null||A===Object.prototype||Object.getPrototypeOf(A)===null)&&!(Bs in t)&&!(FB in t)},Si=ZA("Date"),Ki=ZA("File"),ui=ZA("Blob"),Fi=ZA("FileList"),bi=t=>nB(t)&&nA(t.pipe),yi=t=>{let A;return t&&(typeof FormData=="function"&&t instanceof FormData||nA(t.append)&&((A=bB(t))==="formdata"||A==="object"&&nA(t.toString)&&t.toString()==="[object FormData]"))},ni=ZA("URLSearchParams"),[oi,Mi,li,di]=["ReadableStream","Request","Response","Headers"].map(ZA),Gi=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function It(t,A,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let B,g;if(typeof t!="object"&&(t=[t]),Zr(t))for(B=0,g=t.length;B<g;B++)A.call(null,t[B],B,t);else{const V=r?Object.getOwnPropertyNames(t):Object.keys(t),I=V.length;let s;for(B=0;B<I;B++)s=V[B],A.call(null,t[s],s,t)}}function ss(t,A){A=A.toLowerCase();const r=Object.keys(t);let B=r.length,g;for(;B-- >0;)if(g=r[B],A===g.toLowerCase())return g;return null}const Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Is=t=>!st(t)&&t!==Dr;function ng(){const{caseless:t}=Is(this)&&this||{},A={},r=(B,g)=>{const V=t&&ss(A,g)||g;oB(A[V])&&oB(B)?A[V]=ng(A[V],B):oB(B)?A[V]=ng({},B):Zr(B)?A[V]=B.slice():A[V]=B};for(let B=0,g=arguments.length;B<g;B++)arguments[B]&&It(arguments[B],r);return A}const Ui=(t,A,r,{allOwnKeys:B}={})=>(It(A,(g,V)=>{r&&nA(g)?t[V]=ts(g,r):t[V]=g},{allOwnKeys:B}),t),Hi=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ci=(t,A,r,B)=>{t.prototype=Object.create(A.prototype,B),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:A.prototype}),r&&Object.assign(t.prototype,r)},Pi=(t,A,r,B)=>{let g,V,I;const s={};if(A=A||{},t==null)return A;do{for(g=Object.getOwnPropertyNames(t),V=g.length;V-- >0;)I=g[V],(!B||B(I,t,A))&&!s[I]&&(A[I]=t[I],s[I]=!0);t=r!==!1&&yg(t)}while(t&&(!r||r(t,A))&&t!==Object.prototype);return A},fi=(t,A,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=A.length;const B=t.indexOf(A,r);return B!==-1&&B===r},Ri=t=>{if(!t)return null;if(Zr(t))return t;let A=t.length;if(!Vs(A))return null;const r=new Array(A);for(;A-- >0;)r[A]=t[A];return r},ji=(t=>A=>t&&A instanceof t)(typeof Uint8Array<"u"&&yg(Uint8Array)),Xi=(t,A)=>{const B=(t&&t[FB]).call(t);let g;for(;(g=B.next())&&!g.done;){const V=g.value;A.call(t,V[0],V[1])}},Zi=(t,A)=>{let r;const B=[];for(;(r=t.exec(A))!==null;)B.push(r);return B},Li=ZA("HTMLFormElement"),pi=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,B,g){return B.toUpperCase()+g}),Ws=(({hasOwnProperty:t})=>(A,r)=>t.call(A,r))(Object.prototype),vi=ZA("RegExp"),Es=(t,A)=>{const r=Object.getOwnPropertyDescriptors(t),B={};It(r,(g,V)=>{let I;(I=A(g,V,t))!==!1&&(B[V]=I||g)}),Object.defineProperties(t,B)},Ti=t=>{Es(t,(A,r)=>{if(nA(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const B=t[r];if(nA(B)){if(A.enumerable=!1,"writable"in A){A.writable=!1;return}A.set||(A.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Oi=(t,A)=>{const r={},B=g=>{g.forEach(V=>{r[V]=!0})};return Zr(t)?B(t):B(String(t).split(A)),r},hi=()=>{},Ni=(t,A)=>t!=null&&Number.isFinite(t=+t)?t:A;function mi(t){return!!(t&&nA(t.append)&&t[Bs]==="FormData"&&t[FB])}const zi=t=>{const A=new Array(10),r=(B,g)=>{if(nB(B)){if(A.indexOf(B)>=0)return;if(!("toJSON"in B)){A[g]=B;const V=Zr(B)?[]:{};return It(B,(I,s)=>{const q=r(I,g+1);!st(q)&&(V[s]=q)}),A[g]=void 0,V}}return B};return r(t,0)},_i=ZA("AsyncFunction"),$i=t=>t&&(nB(t)||nA(t))&&nA(t.then)&&nA(t.catch),qs=((t,A)=>t?setImmediate:A?((r,B)=>(Dr.addEventListener("message",({source:g,data:V})=>{g===Dr&&V===r&&B.length&&B.shift()()},!1),g=>{B.push(g),Dr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",nA(Dr.postMessage)),AQ=typeof queueMicrotask<"u"?queueMicrotask.bind(Dr):typeof process<"u"&&process.nextTick||qs,H={isArray:Zr,isArrayBuffer:gs,isBuffer:wi,isFormData:yi,isArrayBufferView:ki,isString:Di,isNumber:Vs,isBoolean:Ji,isObject:nB,isPlainObject:oB,isReadableStream:oi,isRequest:Mi,isResponse:li,isHeaders:di,isUndefined:st,isDate:Si,isFile:Ki,isBlob:ui,isRegExp:vi,isFunction:nA,isStream:bi,isURLSearchParams:ni,isTypedArray:ji,isFileList:Fi,forEach:It,merge:ng,extend:Ui,trim:Gi,stripBOM:Hi,inherits:ci,toFlatObject:Pi,kindOf:bB,kindOfTest:ZA,endsWith:fi,toArray:Ri,forEachEntry:Xi,matchAll:Zi,isHTMLForm:Li,hasOwnProperty:Ws,hasOwnProp:Ws,reduceDescriptors:Es,freezeMethods:Ti,toObjectSet:Oi,toCamelCase:pi,noop:hi,toFiniteNumber:Ni,findKey:ss,global:Dr,isContextDefined:Is,isSpecCompliantForm:mi,toJSONObject:zi,isAsyncFn:_i,isThenable:$i,setImmediate:qs,asap:AQ,isIterable:t=>t!=null&&nA(t[FB])};function N(t,A,r,B,g){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",A&&(this.code=A),r&&(this.config=r),B&&(this.request=B),g&&(this.response=g,this.status=g.status?g.status:null)}H.inherits(N,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Cs=N.prototype,is={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{is[t]={value:t}}),Object.defineProperties(N,is),Object.defineProperty(Cs,"isAxiosError",{value:!0}),N.from=(t,A,r,B,g,V)=>{const I=Object.create(Cs);return H.toFlatObject(t,I,function(q){return q!==Error.prototype},s=>s!=="isAxiosError"),N.call(I,t.message,A,r,B,g),I.cause=t,I.name=t.name,V&&Object.assign(I,V),I};const rQ=null;function og(t){return H.isPlainObject(t)||H.isArray(t)}function Qs(t){return H.endsWith(t,"[]")?t.slice(0,-2):t}function as(t,A,r){return t?t.concat(A).map(function(g,V){return g=Qs(g),!r&&V?"["+g+"]":g}).join(r?".":""):A}function tQ(t){return H.isArray(t)&&!t.some(og)}const BQ=H.toFlatObject(H,{},null,function(A){return/^is[A-Z]/.test(A)});function MB(t,A,r){if(!H.isObject(t))throw new TypeError("target must be an object");A=A||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,C){return!H.isUndefined(C[D])});const B=r.metaTokens,g=r.visitor||E,V=r.dots,I=r.indexes,q=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(A);if(!H.isFunction(g))throw new TypeError("visitor must be a function");function W(w){if(w===null)return"";if(H.isDate(w))return w.toISOString();if(!q&&H.isBlob(w))throw new N("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(w)||H.isTypedArray(w)?q&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function E(w,D,C){let S=w;if(w&&!C&&typeof w=="object"){if(H.endsWith(D,"{}"))D=B?D:D.slice(0,-2),w=JSON.stringify(w);else if(H.isArray(w)&&tQ(w)||(H.isFileList(w)||H.endsWith(D,"[]"))&&(S=H.toArray(w)))return D=Qs(D),S.forEach(function(Y,J){!(H.isUndefined(Y)||Y===null)&&A.append(I===!0?as([D],J,V):I===null?D:D+"[]",W(Y))}),!1}return og(w)?!0:(A.append(as(C,D,V),W(w)),!1)}const a=[],i=Object.assign(BQ,{defaultVisitor:E,convertValue:W,isVisitable:og});function k(w,D){if(!H.isUndefined(w)){if(a.indexOf(w)!==-1)throw Error("Circular reference detected in "+D.join("."));a.push(w),H.forEach(w,function(S,e){(!(H.isUndefined(S)||S===null)&&g.call(A,S,H.isString(e)?e.trim():e,D,i))===!0&&k(S,D?D.concat(e):[e])}),a.pop()}}if(!H.isObject(t))throw new TypeError("data must be an object");return k(t),A}function es(t){const A={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(B){return A[B]})}function Mg(t,A){this._pairs=[],t&&MB(t,this,A)}const Ys=Mg.prototype;Ys.append=function(A,r){this._pairs.push([A,r])},Ys.toString=function(A){const r=A?function(B){return A.call(this,B,es)}:es;return this._pairs.map(function(g){return r(g[0])+"="+r(g[1])},"").join("&")};function gQ(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xs(t,A,r){if(!A)return t;const B=r&&r.encode||gQ;H.isFunction(r)&&(r={serialize:r});const g=r&&r.serialize;let V;if(g?V=g(A,r):V=H.isURLSearchParams(A)?A.toString():new Mg(A,r).toString(B),V){const I=t.indexOf("#");I!==-1&&(t=t.slice(0,I)),t+=(t.indexOf("?")===-1?"?":"&")+V}return t}class ws{constructor(){this.handlers=[]}use(A,r,B){return this.handlers.push({fulfilled:A,rejected:r,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(A){this.handlers[A]&&(this.handlers[A]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(A){H.forEach(this.handlers,function(B){B!==null&&A(B)})}}const ks={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},VQ={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Mg,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},lg=typeof window<"u"&&typeof document<"u",dg=typeof navigator=="object"&&navigator||void 0,sQ=lg&&(!dg||["ReactNative","NativeScript","NS"].indexOf(dg.product)<0),IQ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",WQ=lg&&window.location.href||"http://localhost",JA={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lg,hasStandardBrowserEnv:sQ,hasStandardBrowserWebWorkerEnv:IQ,navigator:dg,origin:WQ},Symbol.toStringTag,{value:"Module"})),...VQ};function EQ(t,A){return MB(t,new JA.classes.URLSearchParams,Object.assign({visitor:function(r,B,g,V){return JA.isNode&&H.isBuffer(r)?(this.append(B,r.toString("base64")),!1):V.defaultVisitor.apply(this,arguments)}},A))}function qQ(t){return H.matchAll(/\w+|\[(\w*)]/g,t).map(A=>A[0]==="[]"?"":A[1]||A[0])}function CQ(t){const A={},r=Object.keys(t);let B;const g=r.length;let V;for(B=0;B<g;B++)V=r[B],A[V]=t[V];return A}function Ds(t){function A(r,B,g,V){let I=r[V++];if(I==="__proto__")return!0;const s=Number.isFinite(+I),q=V>=r.length;return I=!I&&H.isArray(g)?g.length:I,q?(H.hasOwnProp(g,I)?g[I]=[g[I],B]:g[I]=B,!s):((!g[I]||!H.isObject(g[I]))&&(g[I]=[]),A(r,B,g[I],V)&&H.isArray(g[I])&&(g[I]=CQ(g[I])),!s)}if(H.isFormData(t)&&H.isFunction(t.entries)){const r={};return H.forEachEntry(t,(B,g)=>{A(qQ(B),g,r,0)}),r}return null}function iQ(t,A,r){if(H.isString(t))try{return(A||JSON.parse)(t),H.trim(t)}catch(B){if(B.name!=="SyntaxError")throw B}return(r||JSON.stringify)(t)}const Wt={transitional:ks,adapter:["xhr","http","fetch"],transformRequest:[function(A,r){const B=r.getContentType()||"",g=B.indexOf("application/json")>-1,V=H.isObject(A);if(V&&H.isHTMLForm(A)&&(A=new FormData(A)),H.isFormData(A))return g?JSON.stringify(Ds(A)):A;if(H.isArrayBuffer(A)||H.isBuffer(A)||H.isStream(A)||H.isFile(A)||H.isBlob(A)||H.isReadableStream(A))return A;if(H.isArrayBufferView(A))return A.buffer;if(H.isURLSearchParams(A))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),A.toString();let s;if(V){if(B.indexOf("application/x-www-form-urlencoded")>-1)return EQ(A,this.formSerializer).toString();if((s=H.isFileList(A))||B.indexOf("multipart/form-data")>-1){const q=this.env&&this.env.FormData;return MB(s?{"files[]":A}:A,q&&new q,this.formSerializer)}}return V||g?(r.setContentType("application/json",!1),iQ(A)):A}],transformResponse:[function(A){const r=this.transitional||Wt.transitional,B=r&&r.forcedJSONParsing,g=this.responseType==="json";if(H.isResponse(A)||H.isReadableStream(A))return A;if(A&&H.isString(A)&&(B&&!this.responseType||g)){const I=!(r&&r.silentJSONParsing)&&g;try{return JSON.parse(A)}catch(s){if(I)throw s.name==="SyntaxError"?N.from(s,N.ERR_BAD_RESPONSE,this,null,this.response):s}}return A}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:JA.classes.FormData,Blob:JA.classes.Blob},validateStatus:function(A){return A>=200&&A<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],t=>{Wt.headers[t]={}});const QQ=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aQ=t=>{const A={};let r,B,g;return t&&t.split(`
117
117
  `).forEach(function(I){g=I.indexOf(":"),r=I.substring(0,g).trim().toLowerCase(),B=I.substring(g+1).trim(),!(!r||A[r]&&QQ[r])&&(r==="set-cookie"?A[r]?A[r].push(B):A[r]=[B]:A[r]=A[r]?A[r]+", "+B:B)}),A},Js=Symbol("internals");function Et(t){return t&&String(t).trim().toLowerCase()}function lB(t){return t===!1||t==null?t:H.isArray(t)?t.map(lB):String(t)}function eQ(t){const A=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B;for(;B=r.exec(t);)A[B[1]]=B[2];return A}const YQ=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Gg(t,A,r,B,g){if(H.isFunction(B))return B.call(this,A,r);if(g&&(A=r),!!H.isString(A)){if(H.isString(B))return A.indexOf(B)!==-1;if(H.isRegExp(B))return B.test(A)}}function xQ(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(A,r,B)=>r.toUpperCase()+B)}function wQ(t,A){const r=H.toCamelCase(" "+A);["get","set","has"].forEach(B=>{Object.defineProperty(t,B+r,{value:function(g,V,I){return this[B].call(this,A,g,V,I)},configurable:!0})})}let oA=class{constructor(A){A&&this.set(A)}set(A,r,B){const g=this;function V(s,q,W){const E=Et(q);if(!E)throw new Error("header name must be a non-empty string");const a=H.findKey(g,E);(!a||g[a]===void 0||W===!0||W===void 0&&g[a]!==!1)&&(g[a||q]=lB(s))}const I=(s,q)=>H.forEach(s,(W,E)=>V(W,E,q));if(H.isPlainObject(A)||A instanceof this.constructor)I(A,r);else if(H.isString(A)&&(A=A.trim())&&!YQ(A))I(aQ(A),r);else if(H.isObject(A)&&H.isIterable(A)){let s={},q,W;for(const E of A){if(!H.isArray(E))throw TypeError("Object iterator must return a key-value pair");s[W=E[0]]=(q=s[W])?H.isArray(q)?[...q,E[1]]:[q,E[1]]:E[1]}I(s,r)}else A!=null&&V(r,A,B);return this}get(A,r){if(A=Et(A),A){const B=H.findKey(this,A);if(B){const g=this[B];if(!r)return g;if(r===!0)return eQ(g);if(H.isFunction(r))return r.call(this,g,B);if(H.isRegExp(r))return r.exec(g);throw new TypeError("parser must be boolean|regexp|function")}}}has(A,r){if(A=Et(A),A){const B=H.findKey(this,A);return!!(B&&this[B]!==void 0&&(!r||Gg(this,this[B],B,r)))}return!1}delete(A,r){const B=this;let g=!1;function V(I){if(I=Et(I),I){const s=H.findKey(B,I);s&&(!r||Gg(B,B[s],s,r))&&(delete B[s],g=!0)}}return H.isArray(A)?A.forEach(V):V(A),g}clear(A){const r=Object.keys(this);let B=r.length,g=!1;for(;B--;){const V=r[B];(!A||Gg(this,this[V],V,A,!0))&&(delete this[V],g=!0)}return g}normalize(A){const r=this,B={};return H.forEach(this,(g,V)=>{const I=H.findKey(B,V);if(I){r[I]=lB(g),delete r[V];return}const s=A?xQ(V):String(V).trim();s!==V&&delete r[V],r[s]=lB(g),B[s]=!0}),this}concat(...A){return this.constructor.concat(this,...A)}toJSON(A){const r=Object.create(null);return H.forEach(this,(B,g)=>{B!=null&&B!==!1&&(r[g]=A&&H.isArray(B)?B.join(", "):B)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([A,r])=>A+": "+r).join(`
118
118
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(A){return A instanceof this?A:new this(A)}static concat(A,...r){const B=new this(A);return r.forEach(g=>B.set(g)),B}static accessor(A){const B=(this[Js]=this[Js]={accessors:{}}).accessors,g=this.prototype;function V(I){const s=Et(I);B[s]||(wQ(g,I),B[s]=!0)}return H.isArray(A)?A.forEach(V):V(A),this}};oA.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(oA.prototype,({value:t},A)=>{let r=A[0].toUpperCase()+A.slice(1);return{get:()=>t,set(B){this[r]=B}}}),H.freezeMethods(oA);function Ug(t,A){const r=this||Wt,B=A||r,g=oA.from(B.headers);let V=B.data;return H.forEach(t,function(s){V=s.call(r,V,g.normalize(),A?A.status:void 0)}),g.normalize(),V}function Ss(t){return!!(t&&t.__CANCEL__)}function Lr(t,A,r){N.call(this,t??"canceled",N.ERR_CANCELED,A,r),this.name="CanceledError"}H.inherits(Lr,N,{__CANCEL__:!0});function Ks(t,A,r){const B=r.config.validateStatus;!r.status||!B||B(r.status)?t(r):A(new N("Request failed with status code "+r.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function kQ(t){const A=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return A&&A[1]||""}function DQ(t,A){t=t||10;const r=new Array(t),B=new Array(t);let g=0,V=0,I;return A=A!==void 0?A:1e3,function(q){const W=Date.now(),E=B[V];I||(I=W),r[g]=q,B[g]=W;let a=V,i=0;for(;a!==g;)i+=r[a++],a=a%t;if(g=(g+1)%t,g===V&&(V=(V+1)%t),W-I<A)return;const k=E&&W-E;return k?Math.round(i*1e3/k):void 0}}function JQ(t,A){let r=0,B=1e3/A,g,V;const I=(W,E=Date.now())=>{r=E,g=null,V&&(clearTimeout(V),V=null),t.apply(null,W)};return[(...W)=>{const E=Date.now(),a=E-r;a>=B?I(W,E):(g=W,V||(V=setTimeout(()=>{V=null,I(g)},B-a)))},()=>g&&I(g)]}const dB=(t,A,r=3)=>{let B=0;const g=DQ(50,250);return JQ(V=>{const I=V.loaded,s=V.lengthComputable?V.total:void 0,q=I-B,W=g(q),E=I<=s;B=I;const a={loaded:I,total:s,progress:s?I/s:void 0,bytes:q,rate:W||void 0,estimated:W&&s&&E?(s-I)/W:void 0,event:V,lengthComputable:s!=null,[A?"download":"upload"]:!0};t(a)},r)},us=(t,A)=>{const r=t!=null;return[B=>A[0]({lengthComputable:r,total:t,loaded:B}),A[1]]},Fs=t=>(...A)=>H.asap(()=>t(...A)),SQ=JA.hasStandardBrowserEnv?((t,A)=>r=>(r=new URL(r,JA.origin),t.protocol===r.protocol&&t.host===r.host&&(A||t.port===r.port)))(new URL(JA.origin),JA.navigator&&/(msie|trident)/i.test(JA.navigator.userAgent)):()=>!0,KQ=JA.hasStandardBrowserEnv?{write(t,A,r,B,g,V){const I=[t+"="+encodeURIComponent(A)];H.isNumber(r)&&I.push("expires="+new Date(r).toGMTString()),H.isString(B)&&I.push("path="+B),H.isString(g)&&I.push("domain="+g),V===!0&&I.push("secure"),document.cookie=I.join("; ")},read(t){const A=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return A?decodeURIComponent(A[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uQ(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function FQ(t,A){return A?t.replace(/\/?\/$/,"")+"/"+A.replace(/^\/+/,""):t}function bs(t,A,r){let B=!uQ(A);return t&&(B||r==!1)?FQ(t,A):A}const ys=t=>t instanceof oA?{...t}:t;function Jr(t,A){A=A||{};const r={};function B(W,E,a,i){return H.isPlainObject(W)&&H.isPlainObject(E)?H.merge.call({caseless:i},W,E):H.isPlainObject(E)?H.merge({},E):H.isArray(E)?E.slice():E}function g(W,E,a,i){if(H.isUndefined(E)){if(!H.isUndefined(W))return B(void 0,W,a,i)}else return B(W,E,a,i)}function V(W,E){if(!H.isUndefined(E))return B(void 0,E)}function I(W,E){if(H.isUndefined(E)){if(!H.isUndefined(W))return B(void 0,W)}else return B(void 0,E)}function s(W,E,a){if(a in A)return B(W,E);if(a in t)return B(void 0,W)}const q={url:V,method:V,data:V,baseURL:I,transformRequest:I,transformResponse:I,paramsSerializer:I,timeout:I,timeoutMessage:I,withCredentials:I,withXSRFToken:I,adapter:I,responseType:I,xsrfCookieName:I,xsrfHeaderName:I,onUploadProgress:I,onDownloadProgress:I,decompress:I,maxContentLength:I,maxBodyLength:I,beforeRedirect:I,transport:I,httpAgent:I,httpsAgent:I,cancelToken:I,socketPath:I,responseEncoding:I,validateStatus:s,headers:(W,E,a)=>g(ys(W),ys(E),a,!0)};return H.forEach(Object.keys(Object.assign({},t,A)),function(E){const a=q[E]||g,i=a(t[E],A[E],E);H.isUndefined(i)&&a!==s||(r[E]=i)}),r}const ns=t=>{const A=Jr({},t);let{data:r,withXSRFToken:B,xsrfHeaderName:g,xsrfCookieName:V,headers:I,auth:s}=A;A.headers=I=oA.from(I),A.url=xs(bs(A.baseURL,A.url,A.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&I.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let q;if(H.isFormData(r)){if(JA.hasStandardBrowserEnv||JA.hasStandardBrowserWebWorkerEnv)I.setContentType(void 0);else if((q=I.getContentType())!==!1){const[W,...E]=q?q.split(";").map(a=>a.trim()).filter(Boolean):[];I.setContentType([W||"multipart/form-data",...E].join("; "))}}if(JA.hasStandardBrowserEnv&&(B&&H.isFunction(B)&&(B=B(A)),B||B!==!1&&SQ(A.url))){const W=g&&V&&KQ.read(V);W&&I.set(g,W)}return A},bQ=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,B){const g=ns(t);let V=g.data;const I=oA.from(g.headers).normalize();let{responseType:s,onUploadProgress:q,onDownloadProgress:W}=g,E,a,i,k,w;function D(){k&&k(),w&&w(),g.cancelToken&&g.cancelToken.unsubscribe(E),g.signal&&g.signal.removeEventListener("abort",E)}let C=new XMLHttpRequest;C.open(g.method.toUpperCase(),g.url,!0),C.timeout=g.timeout;function S(){if(!C)return;const Y=oA.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),u={data:!s||s==="text"||s==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:Y,config:t,request:C};Ks(function(n){r(n),D()},function(n){B(n),D()},u),C=null}"onloadend"in C?C.onloadend=S:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(S)},C.onabort=function(){C&&(B(new N("Request aborted",N.ECONNABORTED,t,C)),C=null)},C.onerror=function(){B(new N("Network Error",N.ERR_NETWORK,t,C)),C=null},C.ontimeout=function(){let J=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const u=g.transitional||ks;g.timeoutErrorMessage&&(J=g.timeoutErrorMessage),B(new N(J,u.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,t,C)),C=null},V===void 0&&I.setContentType(null),"setRequestHeader"in C&&H.forEach(I.toJSON(),function(J,u){C.setRequestHeader(u,J)}),H.isUndefined(g.withCredentials)||(C.withCredentials=!!g.withCredentials),s&&s!=="json"&&(C.responseType=g.responseType),W&&([i,w]=dB(W,!0),C.addEventListener("progress",i)),q&&C.upload&&([a,k]=dB(q),C.upload.addEventListener("progress",a),C.upload.addEventListener("loadend",k)),(g.cancelToken||g.signal)&&(E=Y=>{C&&(B(!Y||Y.type?new Lr(null,t,C):Y),C.abort(),C=null)},g.cancelToken&&g.cancelToken.subscribe(E),g.signal&&(g.signal.aborted?E():g.signal.addEventListener("abort",E)));const e=kQ(g.url);if(e&&JA.protocols.indexOf(e)===-1){B(new N("Unsupported protocol "+e+":",N.ERR_BAD_REQUEST,t));return}C.send(V||null)})},yQ=(t,A)=>{const{length:r}=t=t?t.filter(Boolean):[];if(A||r){let B=new AbortController,g;const V=function(W){if(!g){g=!0,s();const E=W instanceof Error?W:this.reason;B.abort(E instanceof N?E:new Lr(E instanceof Error?E.message:E))}};let I=A&&setTimeout(()=>{I=null,V(new N(`timeout ${A} of ms exceeded`,N.ETIMEDOUT))},A);const s=()=>{t&&(I&&clearTimeout(I),I=null,t.forEach(W=>{W.unsubscribe?W.unsubscribe(V):W.removeEventListener("abort",V)}),t=null)};t.forEach(W=>W.addEventListener("abort",V));const{signal:q}=B;return q.unsubscribe=()=>H.asap(s),q}},nQ=function*(t,A){let r=t.byteLength;if(r<A){yield t;return}let B=0,g;for(;B<r;)g=B+A,yield t.slice(B,g),B=g},oQ=async function*(t,A){for await(const r of MQ(t))yield*nQ(r,A)},MQ=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const A=t.getReader();try{for(;;){const{done:r,value:B}=await A.read();if(r)break;yield B}}finally{await A.cancel()}},os=(t,A,r,B)=>{const g=oQ(t,A);let V=0,I,s=q=>{I||(I=!0,B&&B(q))};return new ReadableStream({async pull(q){try{const{done:W,value:E}=await g.next();if(W){s(),q.close();return}let a=E.byteLength;if(r){let i=V+=a;r(i)}q.enqueue(new Uint8Array(E))}catch(W){throw s(W),W}},cancel(q){return s(q),g.return()}},{highWaterMark:2})},GB=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ms=GB&&typeof ReadableStream=="function",lQ=GB&&(typeof TextEncoder=="function"?(t=>A=>t.encode(A))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ls=(t,...A)=>{try{return!!t(...A)}catch{return!1}},dQ=Ms&&ls(()=>{let t=!1;const A=new Request(JA.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!A}),ds=64*1024,Hg=Ms&&ls(()=>H.isReadableStream(new Response("").body)),UB={stream:Hg&&(t=>t.body)};GB&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(A=>{!UB[A]&&(UB[A]=H.isFunction(t[A])?r=>r[A]():(r,B)=>{throw new N(`Response type '${A}' is not supported`,N.ERR_NOT_SUPPORT,B)})})})(new Response);const GQ=async t=>{if(t==null)return 0;if(H.isBlob(t))return t.size;if(H.isSpecCompliantForm(t))return(await new Request(JA.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(H.isArrayBufferView(t)||H.isArrayBuffer(t))return t.byteLength;if(H.isURLSearchParams(t)&&(t=t+""),H.isString(t))return(await lQ(t)).byteLength},UQ=async(t,A)=>{const r=H.toFiniteNumber(t.getContentLength());return r??GQ(A)},cg={http:rQ,xhr:bQ,fetch:GB&&(async t=>{let{url:A,method:r,data:B,signal:g,cancelToken:V,timeout:I,onDownloadProgress:s,onUploadProgress:q,responseType:W,headers:E,withCredentials:a="same-origin",fetchOptions:i}=ns(t);W=W?(W+"").toLowerCase():"text";let k=yQ([g,V&&V.toAbortSignal()],I),w;const D=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let C;try{if(q&&dQ&&r!=="get"&&r!=="head"&&(C=await UQ(E,B))!==0){let u=new Request(A,{method:"POST",body:B,duplex:"half"}),F;if(H.isFormData(B)&&(F=u.headers.get("content-type"))&&E.setContentType(F),u.body){const[n,l]=us(C,dB(Fs(q)));B=os(u.body,ds,n,l)}}H.isString(a)||(a=a?"include":"omit");const S="credentials"in Request.prototype;w=new Request(A,{...i,signal:k,method:r.toUpperCase(),headers:E.normalize().toJSON(),body:B,duplex:"half",credentials:S?a:void 0});let e=await fetch(w);const Y=Hg&&(W==="stream"||W==="response");if(Hg&&(s||Y&&D)){const u={};["status","statusText","headers"].forEach(d=>{u[d]=e[d]});const F=H.toFiniteNumber(e.headers.get("content-length")),[n,l]=s&&us(F,dB(Fs(s),!0))||[];e=new Response(os(e.body,ds,n,()=>{l&&l(),D&&D()}),u)}W=W||"text";let J=await UB[H.findKey(UB,W)||"text"](e,t);return!Y&&D&&D(),await new Promise((u,F)=>{Ks(u,F,{data:J,headers:oA.from(e.headers),status:e.status,statusText:e.statusText,config:t,request:w})})}catch(S){throw D&&D(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,t,w),{cause:S.cause||S}):N.from(S,S&&S.code,t,w)}})};H.forEach(cg,(t,A)=>{if(t){try{Object.defineProperty(t,"name",{value:A})}catch{}Object.defineProperty(t,"adapterName",{value:A})}});const Gs=t=>`- ${t}`,HQ=t=>H.isFunction(t)||t===null||t===!1,Us={getAdapter:t=>{t=H.isArray(t)?t:[t];const{length:A}=t;let r,B;const g={};for(let V=0;V<A;V++){r=t[V];let I;if(B=r,!HQ(r)&&(B=cg[(I=String(r)).toLowerCase()],B===void 0))throw new N(`Unknown adapter '${I}'`);if(B)break;g[I||"#"+V]=B}if(!B){const V=Object.entries(g).map(([s,q])=>`adapter ${s} `+(q===!1?"is not supported by the environment":"is not available in the build"));let I=A?V.length>1?`since :
119
119
  `+V.map(Gs).join(`
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "main": "fhj-tools.umd.js",
5
5
  "module": "fhj-tools.es.js",
6
- "version": "1.1.10",
6
+ "version": "1.1.13",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./fhj-tools.es.js",
@@ -19,7 +19,7 @@
19
19
  "scripts": {
20
20
  "dev": "vite",
21
21
  "build": "vite build",
22
- "bulid lib": "vite build --mode=lib && node postbuild.js",
22
+ "bulid lib": "vite build --mode=lib && node postbuild.js && publish",
23
23
  "preview": "vite preview"
24
24
  },
25
25
  "dependencies": {