@anov/gis 1.8.7 → 1.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -18009,4 +18009,4 @@ http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:functio
18009
18009
  `);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileShader();return!0};ch.prototype.isDestroyed=function(){return!1};ch.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){Ve.getObservable(e,t).dispose()}),he(this)};var sU=ch;function _H(e,t){e=Pn(e);let n=document.createElement("div"),i=new sU(t);this._viewModel=i,this._container=e,this._element=n;let o=document.createElement("div");o.textContent="Voxel Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),n.appendChild(o),n.className="cesium-cesiumInspector cesium-VoxelInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let r=document.createElement("div");r.className="cesium-cesiumInspector-dropDown",n.appendChild(r);let{createSection:s,createCheckbox:a,createRangeInput:c,createButton:d}=Jd,u=s(r,"Display","displayVisible","toggleDisplay"),m=s(r,"Transform","transformVisible","toggleTransform"),p=s(r,"Clipping","clippingVisible","toggleClipping"),b=s(r,"Shader","shaderVisible","toggleShader");u.appendChild(a("Depth Test","depthTest")),u.appendChild(a("Show","show")),u.appendChild(a("Disable Update","disableUpdate")),u.appendChild(a("Debug Draw","debugDraw")),u.appendChild(a("Jitter","jitter")),u.appendChild(a("Nearest Sampling","nearestSampling")),u.appendChild(c("Screen Space Error","screenSpaceError",0,128)),u.appendChild(c("Step Size","stepSize",0,2));let f=10,y=10,_=W.PI;m.appendChild(c("Translation X","translationX",-f,+f)),m.appendChild(c("Translation Y","translationY",-f,+f)),m.appendChild(c("Translation Z","translationZ",-f,+f)),m.appendChild(c("Scale X","scaleX",0,+y)),m.appendChild(c("Scale Y","scaleY",0,+y)),m.appendChild(c("Scale Z","scaleZ",0,+y)),m.appendChild(c("Heading","angleX",-_,+_)),m.appendChild(c("Pitch","angleY",-_,+_)),m.appendChild(c("Roll","angleZ",-_,+_)),tre("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",p),tre("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",p),tre("Max Radius","Min Radius","Max Angle","Min Angle","Max Height","Min Height","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxAngle","clippingCylinderMinAngle","clippingCylinderMaxHeight","clippingCylinderMinHeight","shapeIsCylinder",p);let S=document.createElement("div");b.appendChild(S);let A=document.createElement("textarea");A.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),S.className="cesium-cesiumInspector-styleEditor",S.appendChild(A);let Z=d("Compile (Ctrl+Enter)","compileShader");S.appendChild(Z);let R=document.createElement("label");R.style.display="block",R.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),S.appendChild(R),Ve.applyBindings(i,n)}Object.defineProperties(_H.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});_H.prototype.isDestroyed=function(){return!1};_H.prototype.destroy=function(){return Ve.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),he(this)};function tre(e,t,n,i,o,r,s,a,c,d,u,m,p,b){let f=Jd.createRangeInputWithDynamicMinMax,y=b.appendChild(document.createElement("div"));y.setAttribute("data-bind",`if: ${p}`),y.appendChild(f(e,s)),y.appendChild(f(t,a)),y.appendChild(f(n,c)),y.appendChild(f(i,d)),y.appendChild(f(o,u)),y.appendChild(f(r,m))}var aU=_H;var g$o=x(T(),1);var wve=new ue;function Uve(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function mNt(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let o=e.getProperty(i);l(o)&&(n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function hNt(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let r=i[t];/^name$/i.test(r)?n[0]=e.getProperty(r):/name/i.test(r)?n[1]=e.getProperty(r):/^title$/i.test(r)?n[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?n[3]=e.getProperty(r):/element/i.test(r)?n[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(n[5]=e.getProperty(r))}let o=n.length;for(t=0;t<o;t++){let r=n[t];if(l(r)&&r!=="")return r}return"Unnamed Feature"}function Mve(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=n.id??n.primitive.id;if(i instanceof Oo)return i;if(n instanceof Ds||n instanceof Y_)return new Oo({name:hNt(n),description:mNt(n),feature:n})}if(l(e.scene.globe))return bNt(e,t.position)}var fNt=new Q;function nre(e,t){if(l(t)){let n=t.clock;if(l(n)&&l(e)){let i=n.startTime,o=n.stopTime;Q.equals(i,o)&&(o=Q.addSeconds(i,W.EPSILON2,fNt)),e.updateFromClock(),e.zoomTo(i,o)}}}var pNt=new h;function bNt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new Oo({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=kve();return}let a=s[0],c=new Oo({id:a.name,description:a.description});if(l(a.position)){let d=e.scene.ellipsoid.cartographicToCartesian(a.position,pNt);c.position=new Al(d)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=kve())}),r}function kve(){return new Oo({id:"None",description:"No features found."})}function gNt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,d=e._fullscreenButton,u=e._infoBox,m=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(d)&&d.viewModel.isFullscreenEnabled&&(d.container.style.visibility=p),l(u)&&(u.container.style.visibility=p),l(m)&&(m.container.style.visibility=p),e._container){let b=t||!l(d)?0:d.container.clientWidth;e._vrButton.container.style.right=`${b}px`,e.forceResize()}}function uo(e,t){e=Pn(e),t=t??B.EMPTY_OBJECT;let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);let r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);let s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);let a=t.scene3DOnly??!1,c,d,u=!1;l(t.clockViewModel)?(d=t.clockViewModel,c=d.clock):(c=new lf,d=new x9(c),u=!0);let m=new Sk(r,{baseLayer:n&&l(t.selectedImageryProviderViewModel)||l(t.baseLayer)||l(t.imageryProvider)?!1:void 0,clock:c,shouldAnimate:t.shouldAnimate,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,ellipsoid:t.ellipsoid,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,automaticallyTrackDataSourceClocks:t.automaticallyTrackDataSourceClocks,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:s,creditViewport:t.creditViewport,dataSources:t.dataSources,scene3DOnly:a,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=m.scene,b=new Fr;b.add(c.onTick,uo.prototype._onTick,this);let f;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let z=document.createElement("div");z.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(z),f=new iU(z,p)}let y;if(!l(t.infoBox)||t.infoBox!==!1){let z=document.createElement("div");z.className="cesium-viewer-infoBoxContainer",o.appendChild(z),y=new B9(z);let K=y.viewModel;b.add(K.cameraClicked,uo.prototype._onInfoBoxCameraClicked,this),b.add(K.closeClicked,uo.prototype._onInfoBoxClockClicked,this)}let _=document.createElement("div");_.className="cesium-viewer-toolbar",o.appendChild(_);let S;if(!l(t.geocoder)||t.geocoder!==!1){let z=document.createElement("div");z.className="cesium-viewer-geocoderContainer",_.appendChild(z);let K;typeof t.geocoder=="string"?K=[new EA({scene:p,geocodeProviderType:t.geocoder})]:l(t.geocoder)&&typeof t.geocoder!="boolean"&&(K=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),S=new N9({container:z,geocoderServices:K,scene:p}),b.add(S.viewModel.search.beforeExecute,uo.prototype._clearObjects,this)}let A;(!l(t.homeButton)||t.homeButton!==!1)&&(A=new k9(_,p),l(S)&&b.add(A.viewModel.command.afterExecute,function(){let z=S.viewModel;z.searchText="",z.isSearchInProgress&&z.search()}),b.add(A.viewModel.command.beforeExecute,uo.prototype._clearTrackedObject,this));let Z;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(Z=new eU(_,p));let R;t.projectionPicker&&(R=new J9(_,p));let G,E;if(n){let z=t.imageryProviderViewModels??L9(),K=t.terrainProviderViewModels??W9();G=new E9(_,{globe:p.globe,imageryProviderViewModels:z,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:K,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),E=_.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.baseLayer)&&t.baseLayer!==!1&&(n&&(G.viewModel.selectedImagery=void 0),p.imageryLayers.removeAll(),p.imageryLayers.add(t.baseLayer)),l(t.terrainProvider)&&(n&&(G.viewModel.selectedTerrain=void 0),p.terrainProvider=t.terrainProvider),l(t.terrain)&&(n&&(p.globe.depthTestAgainstTerrain=!0),p.setTerrain(t.terrain));let v;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let z=!0;try{if(l(window.localStorage)){let K=window.localStorage.getItem("cesium-hasSeenNavHelp");l(K)&&K?z=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}v=new D9({container:_,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??z})}let I;if(!l(t.animation)||t.animation!==!1){let z=document.createElement("div");z.className="cesium-viewer-animationContainer",o.appendChild(z),I=new S9(z,new A9(d))}let X;if(!l(t.timeline)||t.timeline!==!1){let z=document.createElement("div");z.className="cesium-viewer-timelineContainer",o.appendChild(z),X=new q9(z,c),X.addEventListener("settime",Uve,!1),X.zoomTo(c.startTime,c.stopTime)}let Y,g,C;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(C=document.createElement("div"),C.className="cesium-viewer-fullscreenContainer",o.appendChild(C),Y=new X9(C,t.fullscreenElement),g=mc(Y.viewModel,"isFullscreenEnabled",function(z){C.style.display=z?"block":"none",l(X)&&(X.container.style.right=`${C.clientWidth}px`,X.resize())}));let V,L,P;if(t.vrButton){let z=document.createElement("div");z.className="cesium-viewer-vrContainer",o.appendChild(z),V=new rU(z,p,t.fullScreenElement),L=mc(V.viewModel,"isVREnabled",function(K){z.style.display=K?"block":"none",l(Y)&&(z.style.right=`${C.clientWidth}px`),l(X)&&(X.container.style.right=`${z.clientWidth}px`,X.resize())}),P=mc(V.viewModel,"isVRMode",function(K){gNt(i,K)})}this._baseLayerPickerDropDown=E,this._fullscreenSubscription=g,this._vrSubscription=L,this._vrModeSubscription=P,this._dataSourceChangedListeners={},this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=m,this._selectionIndicator=f,this._infoBox=y,this._clockViewModel=d,this._destroyClockViewModel=u,this._toolbar=_,this._homeButton=A,this._sceneModePicker=Z,this._projectionPicker=R,this._baseLayerPicker=G,this._navigationHelpButton=v,this._animation=I,this._timeline=X,this._fullscreenButton=Y,this._vrButton=V,this._geocoder=S,this._eventHelper=b,this._lastWidth=0,this._lastHeight=0,this._enableInfoOrSelection=l(y)||l(f),this._selectedEntity=void 0,this._selectedEntityChanged=new Se;let N=this._cesiumWidget.dataSources,O=this._cesiumWidget.dataSourceDisplay;b.add(N.dataSourceAdded,uo.prototype._onDataSourceAdded,this),b.add(N.dataSourceRemoved,uo.prototype._onDataSourceRemoved,this),b.add(p.postUpdate,uo.prototype.resize,this);let M=N.length;for(let z=0;z<M;z++)this._dataSourceAdded(N,N.get(z));this._dataSourceAdded(void 0,O.defaultDataSource),b.add(N.dataSourceAdded,uo.prototype._dataSourceAdded,this),b.add(N.dataSourceRemoved,uo.prototype._dataSourceRemoved,this);function D(z){let K=Mve(i,z);l(K)?j.getValueOrUndefined(K.position,i.clock.currentTime)?i.trackedEntity=K:i.zoomTo(K):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function w(z){i.selectedEntity=Mve(i,z)}m.screenSpaceEventHandler.setInputAction(w,En.LEFT_CLICK),m.screenSpaceEventHandler.setInputAction(D,En.LEFT_DOUBLE_CLICK),m._canAnimateUpdateCallback=this._updateCanAnimate(this)}Object.defineProperties(uo.prototype,{container:{get:function(){return this._container}},creditDisplay:{get:function(){return this._cesiumWidget.creditDisplay}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._cesiumWidget.dataSourceDisplay}},entities:{get:function(){return this._cesiumWidget.entities}},dataSources:{get:function(){return this._cesiumWidget.dataSources}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},ellipsoid:{get:function(){return this.scene.ellipsoid}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._cesiumWidget.allowDataSourcesToSuspendAnimation},set:function(e){this._cesiumWidget.allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._cesiumWidget.trackedEntity},set:function(e){this._cesiumWidget.trackedEntity=e}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;let t=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(e)?l(t)&&t.animateAppear():l(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._cesiumWidget.trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._cesiumWidget.clockTrackedDataSource},set:function(e){this._cesiumWidget.clockTrackedDataSource!==e&&(this._cesiumWidget.clockTrackedDataSource=e,nre(this._timeline,e))}}});uo.prototype.extend=function(e,t){e(this,t)};uo.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let s=i-125,a=this._baseLayerPickerDropDown;if(l(a)&&(a.style.maxHeight=`${s}px`),l(this._geocoder)){let f=this._geocoder.searchSuggestionsContainer;f.style.maxHeight=`${s}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);let c=this._timeline,d,u=0,m=5,p=3,b=0;if(o&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let f=this._lastWidth;d=this._animation.container,n>900?(u=169,f<=900&&(d.style.width="169px",d.style.height="112px",this._animation.resize())):n>=600?(u=136,(f<600||f>900)&&(d.style.width="136px",d.style.height="90px",this._animation.resize())):(u=106,(f>600||f===0)&&(d.style.width="106px",d.style.height="70px",this._animation.resize())),m=u+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let f=this._fullscreenButton,y=this._vrButton,_=c.container,S=_.style;p=_.clientHeight+3,S.left=`${u}px`;let A=0;l(f)&&(A+=f.container.clientWidth),l(y)&&(A+=y.container.clientWidth),S.right=`${A}px`,c.resize()}!r&&l(this._fullscreenButton)&&(b=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${m}px`,this._bottomContainer.style.bottom=`${p}px`,this._bottomContainer.style.right=`${b}px`,this._lastWidth=n,this._lastHeight=i};uo.prototype.forceResize=function(){this._lastWidth=0,this.resize()};uo.prototype.render=function(){this._cesiumWidget.render()};uo.prototype.isDestroyed=function(){return!1};uo.prototype.destroy=function(){return l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(En.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(En.LEFT_DOUBLE_CLICK)),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),l(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),l(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),l(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),l(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),l(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),l(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),l(this._timeline)&&(this._timeline.removeEventListener("settime",Uve,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),l(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),l(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),l(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),l(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._cesiumWidget=this._cesiumWidget.destroy(),he(this)};uo.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(uo.prototype._onEntityCollectionChanged,this)};uo.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(uo.prototype._onEntityCollectionChanged,this),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};uo.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}};uo.prototype._onTick=function(e){let t=e.currentTime,n,i=!1,o=this.selectedEntity,r=l(o)&&this._enableInfoOrSelection;r&&o.isShowing&&o.isAvailable(t)&&(this._cesiumWidget.dataSourceDisplay.getBoundingSphere(o,!0,wve)!==Vt.FAILED?n=wve.center:l(o.position)&&(n=o.position.getValue(t,n)),i=l(n));let s=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(s)&&(s.position=h.clone(n,s.position),s.showSelection=r&&i,s.update());let a=l(this._infoBox)?this._infoBox.viewModel:void 0;l(a)&&(a.showInfo=r,a.enableCamera=i,a.isCameraTracking=this.trackedEntity===this.selectedEntity,r?(a.titleText=o.name??o.id,a.description=j.getValueOrDefault(o.description,t,"")):(a.titleText="",a.description=""))};uo.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.selectedEntity===r&&(this.selectedEntity=void 0)}};uo.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let n=this.selectedEntity.position;l(n)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};uo.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};uo.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};uo.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};uo.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&nre(this.timeline,e)};uo.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&nre(this._timeline,t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,uo.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};uo.prototype._onDataSourceRemoved=function(e,t){let n=t.entities.id;this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0};uo.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)};uo.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};var ire=uo;var T$o=x(T(),1);function yNt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new V9(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var ore=yNt;var A$o=x(T(),1);function xNt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new I9(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var rre=xNt;var V$o=x(T(),1);function TNt(e,t){t=t??B.EMPTY_OBJECT;let n=!0,i=t.flyToOnDrop??!0,o=new Se,r=t.clearOnDrop??!0,s=t.dropTarget??e.container,a=t.clampToGround??!0,c=t.proxy;s=Pn(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(u){Dve(s,d),s=u,sre(s,d)}},dropEnabled:{get:function(){return n},set:function(u){u!==n&&(u?sre(s,d):Dve(s,d),n=u)}},dropError:{get:function(){return o}},clearOnDrop:{get:function(){return r},set:function(u){r=u}},flyToOnDrop:{get:function(){return i},set:function(u){i=u}},proxy:{get:function(){return c},set:function(u){c=u}},clampToGround:{get:function(){return a},set:function(u){a=u}}});function d(u){UA(u),r&&(e.entities.removeAll(),e.dataSources.removeAll());let m=u.dataTransfer.files,p=m.length;for(let b=0;b<p;b++){let f=m[b],y=new FileReader;y.onload=_Nt(e,f,c,a),y.onerror=SNt(e,f),y.readAsText(f)}}sre(s,d),e.destroy=Ik(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=d}function UA(e){e.stopPropagation(),e.preventDefault()}function Dve(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",UA,!1),n.removeEventListener("dragover",UA,!1),n.removeEventListener("dragexit",UA,!1))}function sre(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",UA,!1),e.addEventListener("dragover",UA,!1),e.addEventListener("dragexit",UA,!1)}function _Nt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=vX.load(JSON.parse(r.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=px.load(JSON.parse(r.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=FS.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=WY.load(t,{sourceUri:s,proxy:n});else{e.dropError.raiseEvent(e,s,`Unrecognized file: ${s}`);return}l(a)&&e.dataSources.add(a).then(function(c){e.flyToOnDrop&&e.flyTo(c)}).catch(function(c){e.dropError.raiseEvent(e,s,c)})}catch(a){e.dropError.raiseEvent(e,s,a)}}}function SNt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var are=TNt;var F$o=x(T(),1);function ANt(e,t){t=t??B.EMPTY_OBJECT;let n=new H9({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var cre=ANt;var X$o=x(T(),1);function ZNt(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new aU(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var lre=ZNt;globalThis.CESIUM_VERSION="1.143.0";var CNt="1.143.0";return Qve(RNt);})();
18010
18010
 
18011
18011
  /* === End Cesium === */
18012
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ANOVGIS=t():e.ANOVGIS=t()}(this,(()=>(()=>{var e={647:(e,t,i)=>{"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===r(t)?t:String(t)}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function a(e,t,i){return t&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}i.r(t),i.d(t,{AroundPoint:()=>cp,Billboard:()=>ji,BillboardPrimitive:()=>Ct,BounceBillboardPrimitive:()=>xt,BounceLabelPrimitive:()=>jt,Box:()=>Di,CesiumHeatMap:()=>mc,CesiumView:()=>lr,CesiumWaterAnalysis:()=>Zu,Cesium_PART:()=>Ro,Circle:()=>Fi,CircleBlurMaterial:()=>bl(),CircleBlurMaterialProperty:()=>su,CircleScanMaterial:()=>Pl(),CircleScanMaterialProperty:()=>uu,CircleWaveMaterialProperty:()=>yu,CloudPrimitive:()=>Dt,ClusterLayer:()=>$o,CoordUtil:()=>_o,CopyRight:()=>Sr,Corridor:()=>Vi,Cylinder:()=>Yi,CzmlLayer:()=>is,DamWaterRelease:()=>Df,DaoHangLineMaterial:()=>hl(),DaoHangLineMaterialProperty:()=>nu,DiffuseWallPrimitive:()=>Ft,DivIcon:()=>ct,DomUtil:()=>de,DrawBase:()=>Du,DrawCircle:()=>qu,DrawPoint:()=>Gu,DrawPolyLine:()=>zu,DrawPolygon:()=>Nu,DrawRectangle:()=>Uu,DynamicLayer:()=>os,EarthGlow:()=>Cp,Effect:()=>Op,ElecEllipsoidPrimitive:()=>Ut,Ellipse:()=>Xi,Ellipsoid:()=>en,Event:()=>le,FeatureGridLayer:()=>hs,FeatureInfoUtil:()=>go,FlowLinePrimitive:()=>Zt,FlyEventType:()=>se,FlyManager:()=>ap,FrameSate:()=>So,GeoJsonLayer:()=>Go,GeocoderFactory:()=>Rr,GeocoderType:()=>Mr,GlobeRotate:()=>ip,GpxLayer:()=>ms,Graphic:()=>qe,GraphicEvent:()=>Jn,GraphicEventType:()=>ee,GraphicType:()=>Ee,GroundPrimitiveLayer:()=>ys,GroundSkyBox:()=>so,HeatMapLayer:()=>cc,HtmlLayer:()=>xs,ImageryLayerFactory:()=>Fo,ImageryThemeGL:()=>Eo,ImageryType:()=>l,KeyboardRoaming:()=>hp,KmlLayer:()=>Ts,Label:()=>sn,LabelLayer:()=>Rs,LabelPrimitive:()=>Tt,LayerControlUitl:()=>To,LayerEvent:()=>Qn,LayerEventType:()=>ie,LayerGroupEvent:()=>Yn,LayerGroupEventType:()=>te,LightCylinderPrimitive:()=>Jt,LocateUtil:()=>uo,MapInfo:()=>bo,Model:()=>mt,ModelPrimitive:()=>ni,MouseEvent:()=>zn,MouseEventType:()=>X,MultiKeyTdtImageryProvider:()=>Uo,NoDepthTestPolylineCollection:()=>Tu,ODLinePrimitive:()=>yi,Parse:()=>De,PathEvent:()=>ir,PathEventType:()=>re,Plane:()=>un,PlotEvent:()=>rr,PlotEventType:()=>oe,PoiSearch:()=>wo,Point:()=>mn,PointPrimitive:()=>ai,Polygon:()=>gn,Polyline:()=>wn,PolylineFlickerMaterial:()=>ul(),PolylineFlickerMaterialProperty:()=>Jl,PolylineFlowMaterialProperty:()=>ql,PolylineGlowMaterial:()=>Xa(),PolylineGlowMaterialProperty:()=>Nl,PolylineGradientMaterial:()=>tl(),PolylineGradientMaterialProperty:()=>Wl,PolylineImageTrailMaterial:()=>Ka(),PolylineImageTrailMaterialProperty:()=>jl,PolylineLightingMaterial:()=>$a(),PolylineLightingMaterialProperty:()=>Dl,PolylineLightingTrailMaterial:()=>Za(),PolylineLightingTrailMaterialProperty:()=>Al,PolylinePrimitive:()=>ci,PolylineTrailMaterialProperty:()=>Ml,PolylineVFlywireMaterial:()=>ol(),PolylineVFlywireMaterialPoperty:()=>Kl,PolylineVolume:()=>En,Position:()=>je,PositonEditor:()=>Fh,PrimitiveLayer:()=>Ls,Rect:()=>Rn,RoamingController:()=>fp,RoamingPath:()=>pp,SATELLITE_CLASSES:()=>Pa,SatelliteLayer:()=>Va,ScanCirclePrimitive:()=>Ci,SceneEvent:()=>qn,SceneEventType:()=>$,ShapeUtil:()=>yo,SplitImageLayer:()=>Vo,State:()=>Ae,TerrainClipping:()=>Oc,TerrainFactory:()=>Zo,TerrainType:()=>qo,ThreeCoordTransform:()=>g,ThreeLayer:()=>Ap,ThreejsTransform:()=>Bn,TiandituGeocoder:()=>Or,TiandituGeocoderService:()=>vr,TiandituGeocoderService_shanxi:()=>gr,TiandituGeocoder_shanxi:()=>kr,Tileset:()=>yt,TilesetEditor:()=>Rf,TilesetLayer:()=>Bs,TopoJsonLayer:()=>Ns,TrackEvent:()=>er,TrackEventType:()=>ne,TrailLinePrimitive:()=>Pi,Transform:()=>He,TranslateLocal:()=>ko,Util:()=>me,VectorLayer:()=>Io,VideoPrimitive:()=>Ei,Viewer:()=>Br,ViewerEvent:()=>Un,ViewerEventType:()=>J,Wall:()=>In,WallFlowMaterialProperty:()=>Cu,WallGradientMaterialProperty:()=>mu,WallImgMaterialProperty:()=>Pu,WallLineFlowMaterialProperty:()=>Eu,WaterMaterialProperty:()=>hu,WaterPrimitive:()=>ki,Weather:()=>Kf,WidgetEventType:()=>ae,WidgetsControl:()=>Mo,WindLayer:()=>jc,WktUtil:()=>vo,area:()=>Ye,bounds:()=>Ke,center:()=>Qe,cesiumMeasureUtil:()=>xe,commonUtil:()=>st,createInstance:()=>jp,curve:()=>Xe,distance:()=>$e,distanceSquared:()=>et,heading:()=>tt,isBetween:()=>it,midCartesian:()=>nt,midPosition:()=>rt,parabola:()=>ot,satelliteClassColor:()=>ka,satelliteClassLabel:()=>Ma,satelliteClassLegend:()=>Sa,satelliteClassOf:()=>Ta,tallySatelliteClasses:()=>Ra});const l={ARCGIS:"arcgis",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms",AMAP:"amap",BAIDU:"baidu",TDT:"tdt",TENCENT:"tencent",Google:"google"};function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var m=52.35987755982988,d=3.141592653589793,v=6378245,y=.006693421622965943;const g=function(){function e(){n(this,e)}return a(e,null,[{key:"BD09ToGCJ02",value:function(e,t){var i=+e-.0065,n=+t-.006,r=Math.sqrt(i*i+n*n)-2e-5*Math.sin(n*m),o=Math.atan2(n,i)-3e-6*Math.cos(i*m);return[r*Math.cos(o),r*Math.sin(o)]}},{key:"GCJ02ToBD09",value:function(e,t){t=+t,e=+e;var i=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*m),n=Math.atan2(t,e)+3e-6*Math.cos(e*m);return[i*Math.cos(n)+.0065,i*Math.sin(n)+.006]}},{key:"WGS84ToGCJ02",value:function(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];var i=this.delta(e,t);return[e+i[0],t+i[1]]}},{key:"GCJ02ToWGS84",value:function(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];var i=this.delta(e,t);return[2*e-(e+i[0]),2*t-(t+i[1])]}},{key:"delta",value:function(e,t){var i=this.transformLng(e-105,t-35),n=this.transformLat(e-105,t-35),r=t/180*d,o=Math.sin(r);o=1-y*o*o;var s=Math.sqrt(o);return[i=180*i/(v/s*Math.cos(r)*d),n=180*n/(v*(1-y)/(o*s)*d)]}},{key:"transformLng",value:function(e,t){var i=300+(e=+e)+2*(t=+t)+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return i+=2*(20*Math.sin(6*e*d)+20*Math.sin(2*e*d))/3,i+=2*(20*Math.sin(e*d)+40*Math.sin(e/3*d))/3,i+=2*(150*Math.sin(e/12*d)+300*Math.sin(e/30*d))/3}},{key:"transformLat",value:function(e,t){var i=2*(e=+e)-100+3*(t=+t)+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return i+=2*(20*Math.sin(6*e*d)+20*Math.sin(2*e*d))/3,i+=2*(20*Math.sin(t*d)+40*Math.sin(t/3*d))/3,i+=2*(160*Math.sin(t/12*d)+320*Math.sin(t*d/30))/3}},{key:"out_of_china",value:function(e,t){return t=+t,!((e=+e)>73.66&&e<135.05&&t>3.86&&t<53.55)}}]),e}();function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const C=function(e){c(i,Cesium.WebMercatorTilingScheme);var t=_(i);function i(e){var r;n(this,i),r=t.call(this,e);var o=new Cesium.WebMercatorProjection;return r._projection.project=function(e,t){return t=g.WGS84ToGCJ02(Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude)),t=o.project(new Cesium.Cartographic(Cesium.Math.toRadians(t[0]),Cesium.Math.toRadians(t[1]))),new Cesium.Cartesian2(t.x,t.y)},r._projection.unproject=function(e,t){var i=o.unproject(e);return t=g.GCJ02ToWGS84(Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude)),new Cesium.Cartographic(Cesium.Math.toRadians(t[0]),Cesium.Math.toRadians(t[1]))},r}return a(i)}();function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const w=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=b(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),e.url="img"===e.style?"https://webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}":"cva"===e.style?"https://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=2&style=8&x={x}&y={y}&z={z}":"https://webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",e.subdomains=e.subdomains||["01","02","03","04"],"WGS84"===e.crs&&(e.tilingScheme=new C),t.call(this,e)}return a(i)}();var P=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],O=[75,60,45,30,15,0],x=[[1.410526172116255e-8,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,17337981.2],[-7.435856389565537e-9,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,6856817.37],[-1.981981304930552e-8,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,4482777.06],[3.09191371068437e-9,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,2555164.4],[2.890871144776878e-9,8983055095805407e-21,-3.068298e-8,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],E=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],A=function(){function e(){n(this,e),this.isWgs84=!1}return a(e,[{key:"getDistanceByMC",value:function(e,t){if(!e||!t)return 0;if(!(e=this.convertMC2LL(e)))return 0;var i=this.toRadians(e.lng),n=this.toRadians(e.lat);if(!(t=this.convertMC2LL(t)))return 0;var r=this.toRadians(t.lng),o=this.toRadians(t.lat);return this.getDistance(i,r,n,o)}},{key:"getDistanceByLL",value:function(e,t){if(!e||!t)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74);var i=this.toRadians(e.lng),n=this.toRadians(e.lat),r=this.toRadians(t.lng),o=this.toRadians(t.lat);return this.getDistance(i,r,n,o)}},{key:"convertMC2LL",value:function(e){if(!e)return{lng:0,lat:0};var t={};if(this.isWgs84){t.lng=e.lng/20037508.34*180;var i=e.lat/20037508.34*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(i*Math.PI/180))-Math.PI/2),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}Math.abs(e.lng);for(var n=Math.abs(e.lat),r=void 0,o=0;o<P.length;o++)if(n>=P[o]){r=x[o];break}return{lng:(t=this.convertor(e,r)).lng.toFixed(6),lat:t.lat.toFixed(6)}}},{key:"convertLL2MC",value:function(e){if(!e)return{lng:0,lat:0};if(e.lng>180||e.lng<-180||e.lat>90||e.lat<-90)return e;if(this.isWgs84){var t={},i=6378137;t.lng=e.lng*Math.PI/180*i;var n=e.lat*Math.PI/180;return t.lat=3189068.5*Math.log((1+Math.sin(n))/(1-Math.sin(n))),{lng:parseFloat(t.lng.toFixed(2)),lat:parseFloat(t.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);e.lng;for(var r=e.lat,o=void 0,s=0;s<O.length;s++)if(r>=O[s]){o=E[s];break}if(!o)for(var a=0;a<O.length;a++)if(r<=-O[a]){o=E[a];break}var l=this.convertor(e,o);return{lng:parseFloat(l.lng.toFixed(2)),lat:parseFloat(l.lat.toFixed(2))}}},{key:"convertor",value:function(e,t){if(!e||!t)return{lng:0,lat:0};var i=t[0]+t[1]*Math.abs(e.lng),n=Math.abs(e.lat)/t[9],r=t[2]+t[3]*n+t[4]*n*n+t[5]*n*n*n+t[6]*n*n*n*n+t[7]*n*n*n*n*n+t[8]*n*n*n*n*n*n;return{lng:i*=e.lng<0?-1:1,lat:r*=e.lat<0?-1:1}}},{key:"getDistance",value:function(e,t,i,n){return 6370996.81*Math.acos(Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos(t-e))}},{key:"toRadians",value:function(e){return Math.PI*e/180}},{key:"toDegrees",value:function(e){return 180*e/Math.PI}},{key:"getRange",value:function(e,t,i){return null!=t&&(e=Math.max(e,t)),null!=i&&(e=Math.min(e,i)),e}},{key:"getLoop",value:function(e,t,i){for(;e>i;)e-=i-t;for(;e<t;)e+=i-t;return e}},{key:"lngLatToMercator",value:function(e){return this.convertLL2MC(e)}},{key:"lngLatToPoint",value:function(e){var t=this.convertLL2MC(e);return{x:t.lng,y:t.lat}}},{key:"mercatorToLngLat",value:function(e){return this.convertMC2LL(e)}},{key:"pointToLngLat",value:function(e){var t={lng:e.x,lat:e.y};return this.convertMC2LL(t)}},{key:"pointToPixel",value:function(e,t,i,n){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);var r=this.getZoomUnits(t);return{x:Math.round((e.lng-i.lng)/r+n.width/2),y:Math.round((i.lat-e.lat)/r+n.height/2)}}},{key:"pixelToPoint",value:function(e,t,i,n){if(!e)return{lng:0,lat:0};var r=this.getZoomUnits(t),o={lng:i.lng+r*(e.x-n.width/2),lat:i.lat-r*(e.y-n.height/2)};return this.mercatorToLngLat(o)}},{key:"getZoomUnits",value:function(e){return Math.pow(2,18-e)}}]),e}();const T=A;function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const M=function(e){c(i,Cesium.WebMercatorTilingScheme);var t=k(i);function i(e){var r;n(this,i),r=t.call(this,e);var o=new T;return r._projection.project=function(e,t){return t=t||{},t=g.WGS84ToGCJ02(Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude)),(t=g.GCJ02ToBD09(t[0],t[1]))[0]=Math.min(t[0],180),t[0]=Math.max(t[0],-180),t[1]=Math.min(t[1],74.000022),t[1]=Math.max(t[1],-71.988531),t=o.lngLatToPoint({lng:t[0],lat:t[1]}),new Cesium.Cartesian2(t.x,t.y)},r._projection.unproject=function(e,t){return t=t||{},t=o.mercatorToLngLat({lng:e.x,lat:e.y}),t=g.BD09ToGCJ02(t.lng,t.lat),t=g.GCJ02ToWGS84(t[0],t[1]),new Cesium.Cartographic(Cesium.Math.toRadians(t[0]),Cesium.Math.toRadians(t[1]))},r.resolutions=e.resolutions||[],r}return a(i,[{key:"tileXYToNativeRectangle",value:function(e,t,i,n){var r=this.resolutions[i],o=e*r,s=(e+1)*r,a=(1+(t=-t))*r,l=t*r;return Cesium.defined(n)?(n.west=o,n.south=l,n.east=s,n.north=a,n):new Cesium.Rectangle(o,l,s,a)}},{key:"positionToTileXY",value:function(e,t,i){var n=this._rectangle;if(Cesium.Rectangle.contains(n,e)){var r=this._projection.project(e);if(Cesium.defined(r)){var o=this.resolutions[t],s=Math.floor(r.x/o),a=-Math.floor(r.y/o);return Cesium.defined(i)?(i.x=s,i.y=a,i):new Cesium.Cartesian2(s,a)}}}}]),i}();const R=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this._url="traffic"===t.style?"http://its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2":"https://maponline{s}.bdimg.com/tile/?qt=vtile&x={x}&y={y}&z={z}&styles=pl&scaler=2&udt=&from=jsapi2_0",this._labelStyle=t.labelStyle||"web2D",this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._crs=t.crs||"BD09","WGS84"===t.crs){for(var i=[],r=0;r<19;r++)i[r]=256*Math.pow(2,18-r);this._tilingScheme=new M({resolutions:i,rectangleSouthwestInMeters:new Cesium.Cartesian2(-20037726.37,-12474104.17),rectangleNortheastInMeters:new Cesium.Cartesian2(20037726.37,12474104.17)})}else this._tilingScheme=new Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new Cesium.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new Cesium.Cartesian2(33554054,33746824)});this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0,this._style=t.style||"normal",this._errorEvent=new Cesium.Event}return a(e,[{key:"url",get:function(){return this._url}},{key:"token",get:function(){return this._token}},{key:"tileWidth",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},{key:"tileHeight",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},{key:"maximumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},{key:"minimumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}},{key:"tilingScheme",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},{key:"rectangle",get:function(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},{key:"ready",get:function(){return!!this._url}},{key:"credit",get:function(){return this._credit}},{key:"errorEvent",get:function(){return this._errorEvent}},{key:"tileDiscardPolicy",get:function(){}},{key:"proxy",get:function(){}},{key:"hasAlphaChannel",get:function(){return!0}},{key:"getTileCredits",value:function(e,t,i){}},{key:"requestImage",value:function(e,t,i,n){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");var r=this._tilingScheme.getNumberOfXTilesAtLevel(i),o=this._tilingScheme.getNumberOfYTilesAtLevel(i),s=this._url.replace("{z}",i).replace("{s}",String(1)).replace("{style}",this._style).replace("{labelStyle}",this._labelStyle).replace("{time}",String((new Date).getTime()));return s="WGS84"===this._crs?s.replace("{x}",String(e)).replace("{y}",String(-t)):s.replace("{x}",String(e-r/2)).replace("{y}",String(o/2-t-1)),Cesium.ImageryProvider.loadImage(this,s)}}]),e}();function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const j=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=S(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),console.log(),t.call(this,{url:[e.protocol||"","//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}".replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],tilingScheme:new Cesium.WebMercatorTilingScheme,maximumLevel:18})}return a(i)}();function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const I=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=L(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,i);var r="img"===e.style?"https://p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400":"https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347";return e.url=r.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],"img"===e.style&&(e.customTags={sx:function(e,t,i,n){return t>>4},sy:function(e,t,i,n){return(1<<n)-i>>4}}),t.call(this,e)}return a(i)}();function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const B=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=D(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,{url:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs={layer}&x={x}&y={y}&z={z}".replace("{layer}",e.lyrs||"s"),tilingScheme:new Cesium.WebMercatorTilingScheme,maximumLevel:25})}return a(i)}();function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const H=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=G(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),e.url||(e.url="https://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}"),e.crs&&"WGS84"!==e.crs||(e.tilingScheme=new C),t.call(this,e)}return a(i)}();function N(){return N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(arguments.length<3?e:i):r.value}},N.apply(this,arguments)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const z=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=F(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._minLevel=r.minLevel,e._maxLevel=r.maxLevel,e.tileLoadEvent=new Cesium.Event,e._ready=!0,e}return a(i,[{key:"ready",get:function(){return this._ready}},{key:"requestImage",value:function(e,t,n,r){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");if(this._minLevel&&n<this._minLevel)this.tileLoadEvent.raiseEvent(e,t,n,void 0);else{if(!(this._maxLevel&&n>this._maxLevel)){var o=N(p(i.prototype),"requestImage",this).call(this,e,t,n,r);return this.tileLoadEvent.raiseEvent(e,t,n,o),o}this.tileLoadEvent.raiseEvent(e,t,n,void 0)}}}]),i}();function W(e,t,i,n,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}function U(e){return function(){var t=this,i=arguments;return new Promise((function(n,r){var o=e.apply(t,i);function s(e){W(o,n,r,s,a,"next",e)}function a(e){W(o,n,r,s,a,"throw",e)}s(void 0)}))}}var V=i(687),q=i.n(V);function Z(e,t,i){return(t=o(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Y(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function K(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Y(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Q={ADD:"add",REMOVE:"remove"},X={LEFT_DOWN:Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:Cesium.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},J={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:Cesium.ScreenSpaceEventType.WHEEL,FLY_COMPLETE:"flyComplete"},$={CAMERA_MOVE_END:"cameraMoveEnd",CAMERA_CHANGED:"cameraChanged",PRE_UPDATE:"preUpdate",POST_UPDATE:"postUpdate",PRE_RENDER:"preRender",POST_RENDER:"postRender",MORPH_COMPLETE:"morphComplete",CLOCK_TICK:"clockTick",RENDER_ERROR:"renderError"},ee=K(K({},Q),{},{LEFT_DOWN:Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:Cesium.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate",BIND_POPUP:"bindPopup"}),te=Q,ie=K(K({},Q),{},{LEFT_DOWN:Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:Cesium.ScreenSpaceEventType.LEFT_CLICK,MOUSE_MOVE:Cesium.ScreenSpaceEventType.MOUSE_MOVE,RIGHT_DOWN:Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_OUT:"mouseout"}),ne=K(K({},Q),{},{POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"}),re=K(K({},Q),{},{POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine",END:"end",STOP_STAY:"stopStay"}),oe={DRAW_START:"drawStart",DRAW_STOP:"drawStop",EDIT_START:"editStart",EDIT_STOP:"editEnd",DRAW_ANCHOR:"drawAnchor",CREATE_ANCHOR:"createAnchor",UPDATE_ANCHOR:"updateAnchor",ANCHOR_MOVING:"anchorMoving",EDIT_ANCHOR_STOP:"editAnchorStop",CLEAR_ANCHOR:"clearAnchor"},se={BEGIN:"flyBegin",END:"flyEnd",STOP_STAY:"stopStay",FLYING:"flying"},ae={OPEN:"show",CLOSE:"close"};const le=function(){function e(t){n(this,e),this._types=t,this._cache={}}return a(e,[{key:"_addEventListener",value:function(e,t,i){var n=this.getEvent(e),r=void 0;return n&&t&&(r=n.addEventListener(t,i||this)),r}},{key:"_removeEventListener",value:function(e,t,i){var n=this.getEvent(e),r=!1;return n&&t&&(r=n.removeEventListener(t,i||this)),r}},{key:"_raiseEvent",value:function(e,t){var i=this.getEvent(e);i&&i.raiseEvent(t)}},{key:"_registerEvent",value:function(){var e=this;Object.keys(this._types).forEach((function(t){var i=e._types[t];e._cache[i]=new Cesium.Event}))}},{key:"addEventListener",value:function(e,t,i){return this._addEventListener(e,t,i)}},{key:"addEventListenerOnce",value:function(e,t,i){var n=this._addEventListener(e,(function(e){t(e),n&&n()}),i)}},{key:"removeEventListener",value:function(e,t,i){return this._removeEventListener(e,t,i)}},{key:"raiseEvent",value:function(e,t){this._raiseEvent(e,t)}},{key:"getEvent",value:function(e){return this._cache[e]||void 0}}]),e}();function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function ce(e,t){if(e){if("string"==typeof e)return ue(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ue(e,t):void 0}}function he(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o,s,a=[],l=!0,u=!1;try{if(o=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=o.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{if(!l&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}(e,t)||ce(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var fe="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),pe=function(){function e(){n(this,e)}return a(e,null,[{key:"uuid",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"D",i=[];i[8]=i[13]=i[18]=i[23]="-",i[14]="4";for(var n=0;n<36;n++)i[n]||(e=0|16*Math.random(),i[n]=fe[19===n?3&e|8:e]);return t+"-"+i.join("")}},{key:"merge",value:function(e){for(var t,i,n,r,o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];for(i=0,n=s.length;i<n;i++)for(t in r=s[i])e[t]=r[t];return e}},{key:"splitWords",value:function(e){return this.trim(e).split(/\s+/)}},{key:"setOptions",value:function(e,t){for(var i in e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{}),t)e.options[i]=t[i];return e.options}},{key:"formatNum",value:function(e,t){var i=Math.pow(10,void 0===t?6:t);return Math.round(e*i)/i}},{key:"trim",value:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}},{key:"emptyImageUrl",value:function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}},{key:"checkPosition",value:function(e){return e&&e.hasOwnProperty("_lng")&&e.hasOwnProperty("_lat")&&e.hasOwnProperty("_alt")}},{key:"debounce",value:function(e,t){var i=null;return function(){i&&clearTimeout(i),i=setTimeout(e,t)}}},{key:"throttle",value:function(e,t){var i=!0;return function(){if(!i)return!1;i=!1,setTimeout((function(){e(),i=!0}),t)}}},{key:"dataURLtoBlob",value:function(e){for(var t=e.split(","),i=t[0].match(/:(.*?);/)[1],n=atob(t[1]),r=n.length,o=new Uint8Array(r);r--;)o[r]=n.charCodeAt(r);return new Blob([o],{type:i})}},{key:"loadText",value:function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(),t.responseText}},{key:"setCurrentTime",value:function(e,t){var i=this.hoursToDate(t),n=Cesium.JulianDate.fromDate(i);e.nativeObjCesium.clockViewModel.currentTime=Cesium.JulianDate.addHours(n,0,new Cesium.JulianDate)}},{key:"hoursToDate",value:function(e){var t=new Date;return t.setHours(0,0,0,0),new Date(t.getTime()+36e5*e)}}]),e}();const me=pe;const de=function(){function e(){n(this,e)}return a(e,null,[{key:"get",value:function(e){return"string"==typeof e?document.getElementById(e):e}},{key:"appendChild",value:function(e,t){if(e&&t)return t&&"string"==typeof t?(e.innerHTML||(e.innerHTML=""),e.innerHTML+=t):t&&t instanceof Element&&e.appendChild(t),e}},{key:"getStyle",value:function(e,t){var i=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(e,null);i=n?n[t]:null}return"auto"===i?null:i}},{key:"create",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=document.createElement(e);return n.className=t||"",i&&i.appendChild(n),n}},{key:"createByID",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=document.createElement(e);return n.id=t||"",i&&i.appendChild(n),n}},{key:"remove",value:function(e){var t=e.parentNode;t&&t.removeChild(e)}},{key:"empty",value:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}},{key:"hasClass",value:function(e,t){if(void 0!==e.classList)return e.classList.contains(t);var i=this.getClass(e);return i.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(i)}},{key:"addClass",value:function(e,t){if(void 0!==e.classList)for(var i=me.splitWords(t),n=0,r=i.length;n<r;n++)e.classList.add(i[n]);else if(!this.hasClass(e,t)){var o=this.getClass(e);this.setClass(e,(o?o+" ":"")+t)}}},{key:"removeClass",value:function(e,t){void 0!==e.classList?e.classList.remove(t):this.setClass(e,me.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}},{key:"setClass",value:function(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}},{key:"getClass",value:function(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}},{key:"createSvg",value:function(e,t,i,n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");r.setAttribute("class","svg-path"),r.setAttribute("width",e),r.setAttribute("height",t),r.setAttribute("viewBox","0 0 ".concat(e," ").concat(t));var o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",i),r.appendChild(o),n&&n.appendChild(r),r}},{key:"parseDom",value:function(e,t,i){var n;t=null!==(n=t)&&void 0!==n&&n;var r=document.createElement("div");return r.className=i||"",r.innerHTML=e,t?r:r.lastElementChild}},{key:"enterFullscreen",value:function(e){e&&(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}},{key:"exitFullscreen",value:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}},{key:"createVideo",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.create("video",t,i),r=this.create("source","",n);r.setAttribute("src",e),r.setAttribute("type","video/map4");var o=this.create("source","",n);return o.setAttribute("src",e),o.setAttribute("type","video/quicktime"),n}}]),e}();function ve(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ye(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var ge="measure-label",_e="__measDivIconLabelCssInjected",Ce=null;const be=function(){function e(t){if(n(this,e),!t)throw new Cesium.DeveloperError("viewer is required");this.viewer=t,this._items=new Map,this._preRenderBound=!1,this._preRenderCb=this._onPreRender.bind(this),this._scratch=new Cesium.Cartesian2}return a(e,[{key:"_ensureCss",value:function(){if("undefined"!=typeof window&&!window[_e]&&document&&"function"==typeof document.createElement){var e=document.createElement("style");e.setAttribute("data-anosgis-measure-label",""),e.textContent=Ce||(Ce=" .".concat(ge,' {\n position: absolute;\n transform: translate(-50%, calc(-100% - 8px));\n background: rgba(23, 49, 71, 0.92);\n color: #ffffff;\n font-size: 13px;\n line-height: 1.4;\n padding: 4px 10px;\n border-radius: 4px;\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n z-index: 9999;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);\n border: 1px solid rgba(255, 255, 255, 0.15);\n font-family: "Microsoft YaHei", Arial, sans-serif;\n display: none;\n }\n .measure-dot {\n position: absolute;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: #FFD93B;\n border: 2px solid #ffffff;\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);\n transform: translate(-50%, -50%);\n pointer-events: none;\n user-select: none;\n z-index: 9999;\n display: none;\n }\n ')),document.head&&document.head.appendChild(e),window[_e]=!0}}},{key:"add",value:function(e,t,i,n){if(!e)return null;this._ensureCss();var r,o=this.viewer.container||this.viewer.scene&&this.viewer.scene.canvas&&this.viewer.scene.canvas.parentElement;if(!o)return console.warn("DivIconLabelManager: viewer.container is not available"),null;var s=!1;if(this._items.has(e)){var a=this._items.get(e);r=a.div,a._visible=!!n}else(r=de.create("div",ge,o)).style.display=n?"block":"none",this._items.set(e,{div:r,position:t?t.clone():new Cesium.Cartesian3,_visible:!!n}),s=!0;if(t&&(this._items.get(e).position=t.clone()),this._writeText(r,i),n&&s){var l=this.viewer&&this.viewer.scene;if(l){var u=l.cartesianToCanvasCoordinates(this._items.get(e).position,this._scratch);u&&(r.style.left=u.x+"px",r.style.top=u.y+"px")}}return this._ensurePreRender(),r}},{key:"addDot",value:function(e,t,i,n){if(!e)return null;this._ensureCss();var r=this.viewer.container||this.viewer.scene&&this.viewer.scene.canvas&&this.viewer.scene.canvas.parentElement;if(!r)return console.warn("DivIconLabelManager: viewer.container is not available"),null;var o,s=i||{},a=s.size||12,l=s.color||"#FFD93B",u=!1;if(this._items.has(e)){var c=this._items.get(e);(o=c.div).style.width=a+"px",o.style.height=a+"px",o.style.background=l,c._visible=!!n}else(o=de.create("div","measure-dot",r)).style.width=a+"px",o.style.height=a+"px",o.style.background=l,o.style.display=n?"block":"none",this._items.set(e,{div:o,position:t?t.clone():new Cesium.Cartesian3,_visible:!!n,_isDot:!0}),u=!0;if(t&&(this._items.get(e).position=t.clone()),n&&u){var h=this.viewer&&this.viewer.scene;if(h){var f=h.cartesianToCanvasCoordinates(this._items.get(e).position,this._scratch);f&&(o.style.left=f.x+"px",o.style.top=f.y+"px"),o.style.display="block"}}return this._ensurePreRender(),o}},{key:"setText",value:function(e,t){var i=this._items.get(e);i&&this._writeText(i.div,t)}},{key:"setShow",value:function(e,t){var i=this._items.get(e);if(i)if(i._visible=!!t,this._ensurePreRender(),t){var n=this.viewer&&this.viewer.scene;if(n){var r=n.cartesianToCanvasCoordinates(i.position,this._scratch);r&&(i.div.style.left=r.x+"px",i.div.style.top=r.y+"px"),i.div.style.display="block"}}else i.div.style.display="none"}},{key:"setPosition",value:function(e,t){var i=this._items.get(e);i&&t&&(i.position=t.clone())}},{key:"remove",value:function(e){var t=this._items.get(e);if(t){try{t.div&&t.div.parentNode&&t.div.parentNode.removeChild(t.div)}catch(e){}this._items.delete(e),0===this._items.size&&this._detachPreRender()}}},{key:"removeAll",value:function(){for(var e=0,t=Array.from(this._items.keys());e<t.length;e++){var i=t[e];this.remove(i)}}},{key:"has",value:function(e){return this._items.has(e)}},{key:"isVisible",value:function(e){var t=this._items.get(e);return!(!t||!t._visible)}},{key:"getDiv",value:function(e){var t=this._items.get(e);return t?t.div:null}},{key:"size",get:function(){return this._items.size}},{key:"_writeText",value:function(e,t){var i=this;if(null!=t){var n=String(t);-1!==n.indexOf("\n")?e.innerHTML=n.split("\n").map((function(e){return i._escapeHtml(e)})).join("<br>"):e.textContent=n}else e.textContent=""}},{key:"_escapeHtml",value:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},{key:"_ensurePreRender",value:function(){this._preRenderBound||this.viewer&&this.viewer.scene&&this.viewer.scene.preRender&&(this.viewer.scene.preRender.addEventListener(this._preRenderCb),this._preRenderBound=!0)}},{key:"_detachPreRender",value:function(){if(this._preRenderBound){try{this.viewer.scene.preRender.removeEventListener(this._preRenderCb)}catch(e){}this._preRenderBound=!1}}},{key:"_onPreRender",value:function(){if(0!==this._items.size){var e=this.viewer.scene;if(e){var t,i=ve(this._items);try{for(i.s();!(t=i.n()).done;){var n=he(t.value,2),r=n[0],o=n[1];if(o.div.isConnected)if(o._visible){var s=e.cartesianToCanvasCoordinates(o.position,this._scratch);s?(o.div.style.left=s.x+"px",o.div.style.top=s.y+"px",o.div.style.display="block"):o.div.style.display="none"}else"none"!==o.div.style.display&&(o.div.style.display="none");else this._items.delete(r)}}catch(e){i.e(e)}finally{i.f()}}}else this._detachPreRender()}},{key:"dispose",value:function(){this.removeAll(),this._detachPreRender();var e="__divIconLabelManagerInstance";this.viewer&&this.viewer[e]===this&&(this.viewer[e]=null)}}],[{key:"getInstance",value:function(t){if(!t)return null;var i="__divIconLabelManagerInstance";return t[i]||(t[i]=new e(t)),t[i]}}]),e}();function we(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Pe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?we(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Oe={getPolylineDistance:function(e){if(!e||!Array.isArray(e)||e.length<2)return 0;for(var t=0,i=e.length,n=0;n<i-1;++n)t+=Cesium.Cartesian3.distance(e[n],e[n+1]);return t},getPolygonArea:function(e){var t=new Cesium.Cartesian3,i=new Cesium.Cartesian3,n=new Cesium.Cartesian3;if(!(e.length<=2)){var r=Cesium.CoplanarPolygonGeometry.fromPositions({positions:e}),o=Cesium.CoplanarPolygonGeometry.createGeometry(r);if(!o||!o.attributes||!o.attributes.position)return 0;for(var s=o.attributes.position.values,a=o.indices,l=a.length/3,u=0,c=0;c<l;++c){var h=Cesium.Cartesian3.fromElements(s[3*a[3*c+0]+0],s[3*a[3*c+0]+1],s[3*a[3*c+0]+2],t),f=Cesium.Cartesian3.fromElements(s[3*a[3*c+1]+0],s[3*a[3*c+1]+1],s[3*a[3*c+1]+2],i),p=Cesium.Cartesian3.fromElements(s[3*a[3*c+2]+0],s[3*a[3*c+2]+1],s[3*a[3*c+2]+2],n);u+=this.getTriangleArea(h,f,p)}return u}},getTriangleArea:function(e,t,i){var n=new Cesium.Cartesian3,r=new Cesium.Cartesian3,o=new Cesium.Cartesian3,s=Cesium.Cartesian3.subtract(t,e,n),a=Cesium.Cartesian3.subtract(i,e,r),l=Cesium.Cartesian3.cross(s,a,o);return.5*Cesium.Cartesian3.magnitude(l)},drawEntityNames:function(){return Pe(Pe(Pe(Pe(Pe({},this.drawEntityNames_Point()),{},{tempPoint:"tempPoint"},this.drawEntityNames_Polyline()),this.drawEntityNames_Polygon()),this.drawEntityNames_Rectangle()),this.drawEntityNames_Circle())},drawEntityNames_Point:function(){return{drawPoint:"drawPoint"}},drawEntityNames_Polyline:function(){return{drawpolyline:"drawpolyline",drawpolylinepoint:"drawpolylinepoint"}},drawEntityNames_Polygon:function(){return{drawpolygon:"drawpolygon",drawpolygonpoint:"drawpolygonpoint"}},drawEntityNames_Rectangle:function(){return{drawRec:"drawRec",drawRecpoint:"drawRecpoint"}},drawEntityNames_Circle:function(){return{drawCircle:"drawCircle",drawCirclepoint:"drawCirclepoint"}},getLabelManager:function(e){return be.getInstance(e)},getPointLableString:function(e){var t=Cesium.Cartographic.fromCartesian(e),i=Cesium.Math.toDegrees,n=i(t.longitude).toFixed(8),r=i(t.latitude).toFixed(8),o=t.height.toFixed(3).slice(-10);return o<=0&&(o=0),"经度:"+n+"°\n纬度:"+r+"°\n高度:"+o+"米"},createPointLabel:function(e,t,i,n,r){r||(r={});var o=be.getInstance(e);if(!o)return null;var s=n||Oe.drawEntityNames().drawpolyline,a=Date.now()+"_"+Math.random().toString(36).slice(2,8),l=s+"_lbl_"+a,u=s+"_dot_"+a,c=!!r.justDraw,h=!(!r||!1===r.show),f=r.color,p=f&&void 0!==f.red?"rgba(".concat(Math.round(255*f.red),", ").concat(Math.round(255*f.green),", ").concat(Math.round(255*f.blue),", ").concat(f.alpha,")"):"#FFD93B",m=null;c||(m=o.add(l,t,i,h));var d=o.addDot(u,t,{color:p,size:r.size||10},h),v={_manager:o,_labelId:l,_dotId:u,_div:m,_dotDiv:d,_justDraw:c,point:{_show:!1,get show(){return this._show},set show(e){this._show=!!e}}};return v.id=l||u,Object.defineProperty(v,"show",{get:function(){return v._manager&&v._labelId?v._manager.isVisible(v._labelId):!(!v._manager||!v._dotId)&&v._manager.isVisible(v._dotId)},set:function(e){v._manager&&(v._labelId&&v._manager.setShow(v._labelId,e),v._dotId&&v._manager.setShow(v._dotId,e))},configurable:!0,enumerable:!0}),v},setPointLabel:function(e,t,i){e&&e._manager&&(e._dotId&&e._manager.setPosition(e._dotId,t),e._labelId&&e._manager.setPosition(e._labelId,t),e._justDraw||e._labelId&&e._manager.setText(e._labelId,i))},setPointPosition:function(e,t){e&&e._manager&&(e._dotId&&e._manager.setPosition(e._dotId,t),e._labelId&&e._manager.setPosition(e._labelId,t))},removePointLabel:function(e){e&&e._manager&&(e._labelId&&e._manager.remove(e._labelId),e._dotId&&e._manager.remove(e._dotId))},createPointLabelsCallback:function(e,t){for(var i=e.length,n=0;n<i-1;++n){var r=e[n],o=e[n+1],s=Cesium.Cartesian3.distance(r,o),a=Cesium.Cartesian3.lerp(r,o,.5,new Cesium.Cartesian3),l=s.toFixed(2)+"米";s>=1e3&&(l=(s/1e3).toFixed(2)+"千米"),t(n,s,a,l)}},pickPosition:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;n||(n=new Cesium.Cartesian3);var r=void 0,o=e.scene;if(o.mode!==Cesium.SceneMode.MORPHING){if(e.drillPick){var s=o.camera.getPickRay(t),a=o.drillPickFromRay(s,1,i);if(a.length>0)for(var l=0;l<a.length;l++)if(a[l]){var u=a[l].object;if(u&&!(u.hasOwnProperty("id")&&u.id instanceof Cesium.Entity&&Oe.drawEntityNames()[u.id.name])){r=a[l].position;break}}}else{var c=3;window.ANOVGIS&&window.ANOVGIS.globalConfig.pickSize&&(c=window.ANOVGIS.globalConfig.pickSize);var h=o.pick(t,c,c);Cesium.defined(h)&&h.id instanceof Cesium.Entity&&h.id.point&&h.id.position&&h.id.position._value?r=h.id.position._value:(h&&h.primitive instanceof Cesium.Cesium3DTileFeature||h&&h.primitive instanceof Cesium.Cesium3DTileset||h&&h.id instanceof Cesium.Entity&&!i.find((function(e){return e.id==h.id.id}))||h&&h.primitive instanceof Cesium.Model)&&(r=o.pickPosition(t))}if(!r)if(e.terrainProvider instanceof Cesium.EllipsoidTerrainProvider)r=o.camera.pickEllipsoid(t,o.globe.ellipsoid);else{var f=o.camera.getPickRay(t);r=o.globe.pick(f,o)}}return r},pickPositionGlobe:function(e,t){var i=void 0,n=e.scene;if(e.terrainProvider instanceof Cesium.EllipsoidTerrainProvider)i=n.camera.pickEllipsoid(t,n.globe.ellipsoid);else{var r=n.camera.getPickRay(t);i=n.globe.pick(r,n)}return i}};const xe=Oe;const Ee={};const Ae={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"};const Te=function(){function e(){n(this,e)}return a(e,null,[{key:"getPopupDefaultDom",value:function(){var e=me.uuid();return'\n <div class="anov-divGraphic" id=\''.concat(e,'\'\n style="visibility:hidden"> \n <div class="anov-popup anov-popup-animation">\n <span class="anov-popup-close-button anov-popup-color closeButton">×</span>\n <div class="anov-popup-content-wrapper anov-popup-background">\n <div id="popup-m-').concat(e,'"\n class="anov-popup-content anov-popup-color">\n\n </div>\n </div>\n <div class="anov-popup-tip-container">\n <div class="anov-popup-tip anov-popup-background"></div>\n </div>\n </div>\n </div>\n ')}},{key:"getTooltipDefaultDom",value:function(){var e=me.uuid();return'\n <div class="anov-divGraphic " id=\''.concat(e,'\'\n style="visibility:hidden">\n <div id="tooltip-m-').concat(e,'" class="anov-tooltip anov-tooltip-top">\n\n </div>\n </div>\n ')}}]),e}();function ke(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Me=function(e){c(i,e);var t=ke(i);function i(){var e;return n(this,i),(e=t.call(this,ae))._registerEvent(),e}return a(i)}(le);const Re=function(){function e(){n(this,e),this._viewer=void 0,this._wrapper=void 0,this.useDefaultHtmlTemplate=!0,this.showTitle=!1,this._event=new Me}return a(e,[{key:"position",get:function(){return this._position}},{key:"hide",value:function(){this._wrapper&&(this._wrapper.style.cssText="\n visibility:hidden !important;\n display:none !important;\n "),this.raiseEvent(ae.CLOSE)}},{key:"setContent",value:function(e){if(e&&"string"==typeof e)this._wrapper.innerHTML=e;else if(e&&e instanceof Element){for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);this._wrapper.appendChild(e)}return this}},{key:"_bindEvent",value:function(){}},{key:"_unbindEvent",value:function(){}},{key:"_mountContent",value:function(){}},{key:"_installHook",value:function(e){}},{key:"install",value:function(e){this._installHook&&this._installHook(e)}},{key:"addEventListener",value:function(e,t,i){return this._event.addEventListener(e,t,i||this),this}},{key:"removeEventListener",value:function(e,t,i){return this._event.removeEventListener(e,t,i||this),this}},{key:"raiseEvent",value:function(e,t){return this._event.raiseEvent(e,t),this}}]),e}();var Se=function(){function e(t,i,r,o,s,a){n(this,e),this._lng=+t||0,this._lat=+i||0,this._alt=+r||0,this._heading=+o||0,this._pitch=+s||0,this._roll=+a||0}return a(e,[{key:"lng",get:function(){return this._lng},set:function(e){this._lng=+e}},{key:"lat",get:function(){return this._lat},set:function(e){this._lat=+e}},{key:"alt",get:function(){return this._alt},set:function(e){this._alt=+e}},{key:"heading",get:function(){return this._heading},set:function(e){this._heading=+e}},{key:"pitch",get:function(){return this._pitch},set:function(e){this._pitch=+e}},{key:"roll",get:function(){return this._roll},set:function(e){this._roll=+e}},{key:"serialize",value:function(){var t=new e(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(t)}},{key:"distance",value:function(t){return t&&t instanceof e?Cesium.Cartesian3.distance(He.transformWGS84ToCartesian(this),He.transformWGS84ToCartesian(t)):0}},{key:"clone",value:function(){var t=new e;return t.lng=this.lng||0,t.lat=this.lat||0,t.alt=this.alt||0,t.heading=this.heading||0,t.pitch=this.pitch||0,t.roll=this.roll||0,t}},{key:"copy",value:function(){return this.clone()}},{key:"toArray",value:function(){return[this.lng,this.lat,this.alt,this.heading,this.pitch,this.roll]}},{key:"toString",value:function(){return"".concat(this.lng,",").concat(this.lat,",").concat(this.alt,",").concat(this.heading,",").concat(this.pitch,",").concat(this.roll)}},{key:"toObject",value:function(){return{lng:this.lng,lat:this.lat,alt:this.alt,heading:this.heading,pitch:this.pitch,roll:this.roll}}}],[{key:"fromArray",value:function(t){var i=new e;return Array.isArray(t)&&(i.lng=t[0]||0,i.lat=t[1]||0,i.alt=t[2]||0,i.heading=t[3]||0,i.pitch=t[4]||-90,i.roll=t[5]||0),i}},{key:"fromString",value:function(t){var i=new e;if(t&&"string"==typeof t){var n=t.split(",");i=this.fromArray(n)}return i}},{key:"fromObject",value:function(t){return t.lng?new e(t.lng,t.lat,t.alt,t.heading,t.pitch,t.roll):t._lng?new e(t._lng,t._lat,t._alt,t._heading,t._pitch,t._roll):new e}},{key:"fromCartesian",value:function(e){return He.transformCartesianToWGS84(e)}},{key:"deserialize",value:function(t){var i=new e,n=JSON.parse(t);return n&&(i.lng=n.lng||0,i.lat=n.lat||0,i.alt=n.alt||0,i.heading=n.heading||0,i.pitch=n.pitch||0,i.roll=n.roll||0),i}}]),e}();const je=Se;function Le(e,t,i){return Le=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&u(r,i.prototype),r},Le.apply(null,arguments)}function Ie(e){return function(e){if(Array.isArray(e))return ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ce(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const De=function(){function e(){n(this,e)}return a(e,null,[{key:"parsePosition",value:function(e){var t=new je;if(!e)return t;if("string"==typeof e)t=je.fromString(e);else if(Array.isArray(e))t=je.fromArray(e);else if(Object(e)instanceof je||!Object(e).hasOwnProperty("lng")||!Object(e).hasOwnProperty("lat"))if(Object(e)instanceof je||!Object(e).hasOwnProperty("_lng")||!Object(e).hasOwnProperty("_lat"))if(e instanceof Cesium.Cartesian3)t=je.fromCartesian(e);else if(!(Object(e)instanceof je)&&Object(e).hasOwnProperty("x")&&Object(e).hasOwnProperty("y")&&Object(e).hasOwnProperty("z")){var i=Le(Cesium.Cartesian3,Ie(Object(e)));t=je.fromCartesian(i)}else Object(e)instanceof je&&(t=e);else t=je.fromObject(e);else t=je.fromObject(e);return t}},{key:"parsePositions",value:function(e){if("string"==typeof e){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e.indexOf(";")>=0&&(e=e.split(";").filter((function(e){return!!e})))}return e.map((function(e){if("string"==typeof e)return je.fromString(e);if(Array.isArray(e))return je.fromArray(e);if(!(Object(e)instanceof je)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat"))return je.fromObject(e);if(!(Object(e)instanceof je)&&Object(e).hasOwnProperty("x")&&Object(e).hasOwnProperty("y")&&Object(e).hasOwnProperty("z")){var t=new Cesium.Cartesian3(e.x,e.y,e.z);return je.fromCartesian(t)}return Object(e)instanceof je?e:void 0}))}},{key:"parsePointCoordToArray",value:function(e){return[(e=this.parsePosition(e)).lng,e.lat]}},{key:"parsePolylineCoordToArray",value:function(e){var t=[];return(e=this.parsePositions(e)).forEach((function(e){t.push([e.lng,e.lat])})),t}},{key:"parsePolygonCoordToArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];return(e=this.parsePositions(e)).forEach((function(e){i.push([e.lng,e.lat])})),t&&i.length>0&&i.push(i[0]),[i]}},{key:"parseOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return["color","backgroundColor","outlineColor","material","depthFailMaterial","fillColor","markerColor","stroke","fill"].forEach((function(t,i){"string"==typeof e[t]&&(e[t]=Cesium.Color.fromCssColorString(e[t]))})),e}}]),e}();var Be=new Cesium.WebMercatorProjection,Ge=function(){function e(){n(this,e)}return a(e,null,[{key:"transformCartesianToWGS84",value:function(e){if(e){var t=Cesium.Ellipsoid.WGS84.cartesianToCartographic(e);return new je(Cesium.Math.toDegrees(t.longitude),Cesium.Math.toDegrees(t.latitude),t.height)}return new je(0,0)}},{key:"addCartesian3Height",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1,n=e.transformCartesianToWGS84(t);return n.alt+=i,e.transformWGS84ToCartesian(n)}},{key:"SetCartesian3Height",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1,n=e.transformCartesianToWGS84(t);return n.alt=i,e.transformWGS84ToCartesian(n)}},{key:"setHeightWGS84",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1;return t.alt=i,e.transformWGS84ToCartesian(t)}},{key:"transformWGS84ToCartesian",value:function(e){return e?Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,Cesium.Ellipsoid.WGS84):Cesium.Cartesian3.ZERO}},{key:"transformCartographicToCartesian",value:function(e){return e?Cesium.Cartesian3.fromRadians(e.longitude,e.latitude,e.height):Cesium.Cartesian3.ZERO}},{key:"transformWGS84ToCartographic",value:function(e){return e?Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt):Cesium.Cartographic.ZERO}},{key:"transformCartesianArrayToWGS84Array",value:function(e){var t=this;return e?e.map((function(e){return t.transformCartesianToWGS84(e)})):[]}},{key:"transformWGS84ArrayToCartesianArray",value:function(e){var t=this,i=De.parsePositions(e);return i?i.map((function(e){return t.transformWGS84ToCartesian(e)})):[]}},{key:"transformWGS84ToMercator",value:function(e){var t=Be.project(Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new je(t.x,t.y,t.z)}},{key:"transformMercatorToWGS84",value:function(e){var t=Be.unproject(new Cesium.Cartesian3(e.lng,e.lat,e.alt));return new je(Cesium.Math.toDegrees(t.longitude),Cesium.Math.toDegrees(t.latitude),t.height)}},{key:"transformWindowToWGS84",value:function(e,t){var i,n=t.scene;if(n.mode===Cesium.SceneMode.SCENE3D){var r=n.camera.getPickRay(e);i=n.globe.pick(r,n)}else i=n.camera.pickEllipsoid(e,Cesium.Ellipsoid.WGS84);return this.transformCartesianToWGS84(i)}},{key:"transformWindowToCartesian3",value:function(e,t){var i=this.transformWindowToWGS84(e,t);return this.transformWGS84ToCartesian(i)}},{key:"transformWGS84ToWindow",value:function(e,t){return t.scene.cartesianToCanvasCoordinates(this.transformWGS84ToCartesian(e),new Cesium.Cartesian2)}},{key:"transformCartesian3ToWindow",value:function(e,t){var i=this.transformCartesianToWGS84(e);return this.transformWGS84ToWindow(i,t)}},{key:"wgs842WebMercator",value:function(e,t){var i=20037508.34*e/180,n=Math.log(Math.tan((90+t)*Math.PI/360))/(Math.PI/180);return{x:i,y:n=20037508.34*n/180}}},{key:"webMercator2WGS84",value:function(e,t){var i=t/20037508.34*180;return{lon:e/20037508.34*180,lat:i=180/Math.PI*(2*Math.atan(Math.exp(i*Math.PI/180))-Math.PI/2)}}},{key:"localToWorldPos",value:function(e,t,i,n){var r=window.Cesium.Transforms.eastNorthUpToFixedFrame(e),o=new window.Cesium.Cartesian3(t,-n,i);return window.Cesium.Matrix4.multiplyByPoint(r,o,new window.Cesium.Cartesian3)}},{key:"worldTolocal",value:function(e,t){var i=window.Cesium.Transforms.eastNorthUpToFixedFrame(e),n=window.Cesium.Matrix4.inverseTransformation(i,new window.Cesium.Matrix4),r=window.Cesium.Matrix4.multiplyByPoint(n,t,new window.Cesium.Cartesian3);return new Cesium.Cartesian3(r.x,-r.z,r.y)}},{key:"updateWinPosition",value:function(e){var t,i,n,r,o,s,a,l,u,c,h,f=null===(t=e.show)||void 0===t||t,p=null!==(i=e.windowCoord)&&void 0!==i?i:null,m=null!==(n=e.scaleByDistance)&&void 0!==n?n:null,d=null!==(r=e.distance)&&void 0!==r?r:0,v=null!==(o=e.dom)&&void 0!==o?o:null,y=null!==(s=e.horizontalOrigin)&&void 0!==s?s:null,g=null!==(a=e.verticalOrigin)&&void 0!==a?a:null,_=null!==(l=e.distanceDisplayCondition)&&void 0!==l?l:null,C=(u=e.isFront,null!==(c=e.offsetX)&&void 0!==c?c:null),b=null!==(h=e.offsetY)&&void 0!==h?h:null,w=e.scaleRatio||1;if(f&&p){var P=p.x-v.offsetWidth/2,O=p.y-v.offsetHeight;if(P<1&&O<1)v&&(v.style.cssText="\n visibility:hidden !important;\n display:none !important;\n ");else{var x="scale3d(1*".concat(w,",1*").concat(w,",1*").concat(w,")"),E=1;if(d&&m){var A=m.near||0,T=m.nearValue||1,k=m.far||Number.MAX_VALUE,M=m.farValue||0;if(d<A)x="scale3d(".concat(T,"*").concat(w,",").concat(T,"*").concat(w,",1)"),E=T;else if(d>k)x="scale3d(".concat(M,"*").concat(w,",").concat(M,"*").concat(w,",1)"),E=M;else{var R=T-(d-A)/(k-A)*(T-M);E=R,x="scale3d(".concat(R,"*").concat(w,",").concat(R,"*").concat(w,",1)")}}if(E<.01)v.style.display="none";else{v.style.display="block","LEFT"===y?P=p.x-v.offsetWidth:"CENTER"===y||"RIGHT"===y&&(P=p.x),"BOTTOM"===g?O=p.y:"CENTER"===g||"TOP"===g&&(O=p.y-v.offsetHeight),C&&(P+=C*E),b&&(O+=b*E),"LEFT"===y?"CENTER"===g?v.style.transformOrigin="right center":"TOP"===g?v.style.transformOrigin="right bottom":"BOTTOM"===g&&(v.style.transformOrigin="right top"):"CENTER"===y?"CENTER"===g?v.style.transformOrigin="center center":"TOP"===g?v.style.transformOrigin="center bottom":"BOTTOM"===g&&(v.style.transformOrigin="center top"):"RIGHT"===y&&("CENTER"===g?v.style.transformOrigin="left center":"TOP"===g?v.style.transformOrigin="left bottom":"BOTTOM"===g&&(v.style.transformOrigin="left top")),v.style.top=O*w+"px",v.style.left=P*w+"px",v.style.visibility="visible",v.style.transform="".concat(x);d&&_&&isBetween(d,_.near||0,_.far||Number.MAX_VALUE)}}}}}]),e}();const He=Ge;function Ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Fe=function(e){c(i,e);var t=Ne(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._init(e),r}return a(i,[{key:"_init",value:function(e){var t,i,n,r,o,s,a,l;if(this._position=void 0,this._viewer=e.viewer||window.viewer,this._viewer){if(this.useDefaultHtmlTemplate=null===(t=e.useDefaultHtmlTemplate)||void 0===t||t,this.showTitle=null!==(i=e.showTitle)&&void 0!==i&&i,this.scaleByDistance=null!==(n=e.scaleByDistance)&&void 0!==n?n:null,this.horizontalOrigin=null!==(r=e.horizontalOrigin)&&void 0!==r?r:null,this.verticalOrigin=null!==(o=e.verticalOrigin)&&void 0!==o?o:null,this.distanceDisplayCondition=null!==(s=e.distanceDisplayCondition)&&void 0!==s?s:null,this.offsetX=null!==(a=e.offsetX)&&void 0!==a?a:null,this.offsetY=null!==(l=e.offsetY)&&void 0!==l?l:null,this.useDefaultHtmlTemplate){var u=Te.getPopupDefaultDom();this._wrapper=de.parseDom(u,!1),this._addDefaultTitleContent(),this._initClose()}else this._wrapper=de.create("div","viewer-widgets anov-infoWin-init");!0===e.pointerEvents?this._wrapper.style.pointerEvents="all":this._wrapper.style.pointerEvents="none"}else console.error("viewer是必须的参数!")}},{key:"_initClose",value:function(){var e=this,t=this._wrapper.querySelector(".closeButton");t&&t.addEventListener("click",(function(){e.hide()}))}},{key:"_addDefaultTitleContent",value:function(){var e=this._wrapper.querySelector(".anov-popup-content");this.showTitle&&de.create("div","anov-template-titile",e),de.create("div","anov-template-content",e)}},{key:"setPosition",value:function(e){return this._position=e,this._wrapper&&(this._wrapper.style.cssText="\n visibility:visible;\n "),this}},{key:"setContent",value:function(e){var t=this._wrapper.querySelector(".anov-popup-content");if(t)for(;t.hasChildNodes();)t.removeChild(t.firstChild);else for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);if(e&&"string"==typeof e)t?t.innerHTML=e:this._wrapper.innerHTML=e;else if(e&&e instanceof Element)t?t.appendChild(e):this._wrapper.appendChild(e);else if(e&&e instanceof Object&&this.useDefaultHtmlTemplate){if(this._addDefaultTitleContent(),this.showTitle){var i=this._wrapper.querySelector(".anov-template-titile");de.appendChild(i,e.title)}var n=this._wrapper.querySelector(".anov-template-content"),r=e.fieldsMap;r&&r.forEach((function(e){var t="<div><label>".concat(e.nameC,"</label>").concat(e.value,"</div>");de.appendChild(n,t)}))}return this}},{key:"show",value:function(e,t){return this.setPosition(e).setContent(t),this}},{key:"_installHook",value:function(e){this._viewer.container.appendChild(this._wrapper),this._bindEvent(),Object.defineProperty(e,"popup",{value:this,writable:!1})}},{key:"_bindEvent",value:function(){var e=this;if(this._viewer&&this._wrapper){var t=this,i=this._viewer.scene;i.postRender.addEventListener((function(){if(t._position&&t._updatePosition&&"visible"===t._wrapper.style.visibility){var n=e._viewer.camera.positionWC,r=e._viewer.camera.direction,o=i.globe.ellipsoid.geodeticSurfaceNormal(t._position,new Cesium.Cartesian3),s=i.cartesianToCanvasCoordinates(t._position,new Cesium.Cartesian2);s&&t._updatePosition(s,Cesium.Cartesian3.distance(t._position,n),Cesium.Cartesian3.dot(r,o)<=0)}}))}}},{key:"_updatePosition",value:function(e,t,i){He.updateWinPosition({windowCoord:e,scaleByDistance:this.scaleByDistance,distance:t,dom:this._wrapper,horizontalOrigin:this.horizontalOrigin,verticalOrigin:this.verticalOrigin,distanceDisplayCondition:this.distanceDisplayCondition,isFront:i,offsetX:this.offsetX,offsetY:this.offsetY,scaleRatio:this._viewer.scaleRatio})}}]),i}(Re);const ze=Fe;function We(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ue=function(e){c(i,e);var t=We(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._init(e),r}return a(i,[{key:"_init",value:function(e){var t,i,n,r,o,s;if(this._position=void 0,this._viewer=e.viewer||window.viewer,this._viewer)if(this.useDefaultHtmlTemplate=null===(t=e.useDefaultHtmlTemplate)||void 0===t||t,this.showTitle=null!==(i=e.showTitle)&&void 0!==i&&i,this.horizontalOrigin=null!==(n=e.horizontalOrigin)&&void 0!==n?n:null,this.verticalOrigin=null!==(r=e.verticalOrigin)&&void 0!==r?r:null,this.offsetX=null!==(o=e.offsetX)&&void 0!==o?o:null,this.offsetY=null!==(s=e.offsetY)&&void 0!==s?s:null,this.useDefaultHtmlTemplate){var a=Te.getTooltipDefaultDom();this._wrapper=de.parseDom(a,!1),this._addDefaultTitleContent()}else this._wrapper=de.create("div","viewer-widgets anov-infoWin-init");else console.error("viewer是必须的参数!")}},{key:"_addDefaultTitleContent",value:function(){var e=this._wrapper.querySelector(".anov-tooltip");this.showTitle&&de.create("div","anov-template-titile",e),de.create("div","anov-template-content",e)}},{key:"setPosition",value:function(e){return this._position=e,this._wrapper&&(this._wrapper.style.cssText="\n visibility:visible !important;\n display:block !important;\n "),this}},{key:"setContent",value:function(e){var t=this._wrapper.querySelector(".anov-tooltip");if(t)for(;t.hasChildNodes();)t.removeChild(t.firstChild);else for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);if(e&&"string"==typeof e)t?t.innerHTML=e:this._wrapper.innerHTML=e;else if(e&&e instanceof Element)t?t.appendChild(e):this._wrapper.appendChild(e),e.style.cssText="\n visibility:visible !important;\n display:block !important;\n ";else if(e&&e instanceof Object&&this.useDefaultHtmlTemplate){if(this._addDefaultTitleContent(),this.showTitle){var i=this._wrapper.querySelector(".anov-template-titile");de.appendChild(i,e.title)}var n=this._wrapper.querySelector(".anov-template-content"),r=e.fieldsMap;r&&r.forEach((function(e){var t="<div><label>".concat(e.nameC,"</label>").concat(e.value,"</div>");de.appendChild(n,t)}))}return this}},{key:"_updatePosition",value:function(e,t,i){He.updateWinPosition({windowCoord:e,scaleByDistance:this.scaleByDistance,distance:t,dom:this._wrapper,horizontalOrigin:this.horizontalOrigin,verticalOrigin:this.verticalOrigin,distanceDisplayCondition:this.distanceDisplayCondition,isFront:i,offsetX:this.offsetX,offsetY:this.offsetY,scaleRatio:this._viewer.scaleRatio})}},{key:"show",value:function(e,t){this.setPosition(e).setContent(t);var i=this._viewer.scene.cartesianToCanvasCoordinates(this.position,new Cesium.Cartesian2);return this._updatePosition(i),this}},{key:"_installHook",value:function(e){this._viewer.container.appendChild(this._wrapper),Object.defineProperty(e,"tooltip",{value:this,writable:!0})}}]),i}(Re);const Ve=Ue;const qe=function(){function e(){var t,i,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._id=me.uuid(),this.businessID=me.uuid(),De.parseOption(r),this._nativeObjCesium=void 0,this._layer=void 0,this._state=void 0,this._show=!0,this._style={},this._attr={},this._allowDrillPicking=!1,this._contextMenu=[],this.infoData=r.infoData,this._graphicEvent=new Jn,this._graphicEvent.addEventListener(ee.ADD,this._onAdd,this),this._graphicEvent.addEventListener(ee.REMOVE,this._onRemove,this),this.originOption=void 0,this._highlight=r.highlight,this._selectedHighlight=r.selectedHighlight,De.parseOption(this._highlight),De.parseOption(this._selectedHighlight),this._popup=void 0,this._pSelected=void 0,this.isHightlighted=!1,this.useDefaultHightedEvent=null===(t=r.useDefaultHightedEvent)||void 0===t||t,this.useDefaultSelectedEvent=null===(i=r.useDefaultSelectedEvent)||void 0===i||i,this.initHighlight(),this.tooltipOptions={}}return a(e,[{key:"boundingSphere",get:function(){return null}},{key:"_computeBoundingSphere",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=this.nativeObjCesium;if(t)try{var i=t.boundingSphere;if(i&&Cesium.defined(i.center))return i}catch(e){}var n=this._position||this._center;return n?new Cesium.BoundingSphere(He.transformWGS84ToCartesian(n),e):this._positions&&this._positions.length>0?Cesium.BoundingSphere.fromPoints(He.transformWGS84ArrayToCartesianArray(this._positions)):null}},{key:"graphicId",get:function(){return this._id}},{key:"type",get:function(){return""}},{key:"id",get:function(){return this.businessID},set:function(e){this.businessID=e}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._nativeObjCesium&&(this._nativeObjCesium.show=this._show)}},{key:"attr",get:function(){return this._attr},set:function(e){this._attr=e}},{key:"allowDrillPicking",get:function(){return this._allowDrillPicking},set:function(e){this._allowDrillPicking=e}},{key:"graphicEvent",get:function(){return this._graphicEvent}},{key:"nativeObjCesium",get:function(){return this._nativeObjCesium}},{key:"state",get:function(){return this._state}},{key:"contextMenu",get:function(){return this._contextMenu},set:function(e){this._contextMenu=e}},{key:"_getLayerCollection",value:function(e){var t=void 0;switch(e){case"point_primitive":t=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":t=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":t=this._layer.labels;break;case"polyline_primitive":t=this._layer.polylines;break;case"flow_line_primitive":case"water_primitive":case"model_primitive":t=this._layer.primitives;break;case"cloud_primitive":t=this._layer.clouds}return t}},{key:"_mountedHook",value:function(){}},{key:"_addedHook",value:function(){var e,t=this;if(!this._nativeObjCesium)return!1;this._nativeObjCesium instanceof Promise?this._nativeObjCesium.then((function(e){var i;e.layerId=null===(i=t._layer)||void 0===i?void 0:i.layerId,e.graphicId=t._id})):(this._nativeObjCesium.layerId=null===(e=this._layer)||void 0===e?void 0:e.layerId,this._nativeObjCesium.graphicId=this._id)}},{key:"_removedHook",value:function(){}},{key:"_onAdd",value:function(e){var t=this;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),this._layer.nativeObjCesium.entities&&this._nativeObjCesium)this._layer.nativeObjCesium.entities.add(this._nativeObjCesium);else if(this._layer.nativeObjCesium.add){var i=this._getLayerCollection(this.type);i?(this._nativeObjCesium&&this._nativeObjCesium.then?this._nativeObjCesium.then((function(e){t._nativeObjCesium=i.add(e)})):this._nativeObjCesium&&(this._nativeObjCesium=i.add(this._nativeObjCesium)),this.update&&this.destroy&&this._layer.nativeObjCesium.add(this)):this._nativeObjCesium.then?this._nativeObjCesium.then((function(e){t._nativeObjCesium=i?i.add(e):t._layer.nativeObjCesium.add(e)})):this._nativeObjCesium.readyEvent?this._nativeObjCesium.readyEvent.addEventListener((function(e){t._layer.nativeObjCesium.add(e)})):this.update&&this.destroy?this._layer.nativeObjCesium.add(this):this._nativeObjCesium&&this._layer.nativeObjCesium.add(this._nativeObjCesium)}this._addedHook&&this._addedHook(),this._state=Ae.ADDED}}},{key:"_onRemove",value:function(){var e=this;if(this._layer){if(this._layer.nativeObjCesium.entities)this._layer.nativeObjCesium.entities.remove(this._nativeObjCesium);else if(this._layer.nativeObjCesium.remove){var t=this._getLayerCollection(this.type);t?(this._nativeObjCesium.then?this._nativeObjCesium.then((function(e){t.remove(e)})):t.remove(this._nativeObjCesium),this.update&&this.destroy&&this._layer.nativeObjCesium.remove(this)):this._nativeObjCesium.then?this._nativeObjCesium.then((function(t){e._layer.nativeObjCesium.remove(t)})):this._nativeObjCesium.readyEvent?this._nativeObjCesium.readyEvent.addEventListener((function(t){e._layer.nativeObjCesium.remove(t)})):this.update&&this.destroy?this._layer.nativeObjCesium.remove(this):this._layer.nativeObjCesium.remove(this._nativeObjCesium)}this._removedHook&&this._removedHook(),this._state=Ae.REMOVED}}},{key:"setBillboard",value:function(e){return e&&e.billboard&&(De.parseOption(e.billboard),this._nativeObjCesium.billboard?me.merge(this._nativeObjCesium.billboard,e):this._nativeObjCesium.billboard=new Cesium.LabelGraphics(e.billboard)),this}},{key:"setLabel",value:function(e){return e&&e.label&&(e.label.fillColor=e.label.color||e.label.fillColor,De.parseOption(e.label),this._nativeObjCesium.label?me.merge(this._nativeObjCesium.label,e.label):this._nativeObjCesium.label=new Cesium.LabelGraphics(e.label)),e&&0==e.label&&(this._nativeObjCesium.label=void 0),this}},{key:"setPolyline",value:function(e){return e&&e.polyline&&(De.parseOption(e.polyline),e.polyline.positions&&(e.polyline.positions=De.parsePositions(e.polyline.positions),e.polyline.positions=He.transformWGS84ArrayToCartesianArray(e.polyline.positions)),this._nativeObjCesium.polyline?me.merge(this._nativeObjCesium.polyline,e.polyline):e.polyline.positions&&(this._nativeObjCesium.polyline=new Cesium.PolylineGraphics(e.polyline))),e&&0==e.polyline&&(this._nativeObjCesium.polyline=void 0),this}},{key:"setOptions",value:function(){return this}},{key:"remove",value:function(){return this._layer&&this._layer.removeGraphic(this),this}},{key:"addTo",value:function(e){return e&&e.addGraphic&&e.addGraphic(this),this}},{key:"addEventListener",value:function(e,t,i){return this._graphicEvent.addEventListener(e,t,i||this),this}},{key:"removeEventListener",value:function(e,t,i){return this._graphicEvent.removeEventListener(e,t,i||this),this}},{key:"raiseEvent",value:function(e,t){return this._graphicEvent.raiseEvent(e,t),this}},{key:"bindPopup",value:function(e){var t=this;this._popup=new ze(e),this._popup.addEventListener(ae.CLOSE,(function(){t.unSelected(t._e)})),this._popup.install(this)}},{key:"bindTooltip",value:function(e){var t=this;new Ve(e).install(this),this.addEventListener(X.MOUSE_OUT,(function(e){t.tooltip.hide()})),this.addEventListener(X.CLICK,(function(e){t.tooltip.hide()}))}},{key:"initHighlight",value:function(){var e=this;this._highlight&&this.useDefaultHightedEvent&&this.addEventListener(X.MOUSE_MOVE,(function(t){e.isHightlighted=!0,e.highlight(t)})),this._selectedHighlight&&this.useDefaultSelectedEvent&&this.addEventListener(X.CLICK,(function(t){e.unSelected(),e.selectedHighlight(t)})),this._highlight&&this.useDefaultHightedEvent&&this.addEventListener(X.MOUSE_OUT,(function(t){e.isHightlighted=!1,e.unHighlight(t)}));var t=this;this._selectedHighlight&&this.addEventListener(ee.BIND_POPUP,(function(){e._layer&&e._layer&&e._layer._popup.addEventListener(ae.CLOSE,(function(){e.unSelected(t._pSelected)}))}))}},{key:"highlight",value:function(e){}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){}},{key:"unSelected",value:function(e){}}],[{key:"registerType",value:function(e){e&&(Ee[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}},{key:"getGraphicType",value:function(e){return Ee[e.toLocaleUpperCase()]||void 0}}]),e}();function Ze(e,t,i){var n=Cesium.Cartesian3.subtract(e,t,new Cesium.Cartesian3),r=Cesium.Cartesian3.subtract(i,t,new Cesium.Cartesian3),o=Cesium.Cartesian3.cross(n,r,n);return.5*Cesium.Cartesian3.magnitude(o)}function Ye(e){var t=0;if(!Array.isArray(e))return t;e[0]instanceof Cesium.Cartesian3||(e=He.transformWGS84ArrayToCartesianArray(e));var i=Cesium.CoplanarPolygonGeometry.createGeometry(Cesium.CoplanarPolygonGeometry.fromPositions({positions:e,vertexFormat:Cesium.VertexFormat.POSITION_ONLY}));if(!i)return t;for(var n=i.attributes.position.values,r=i.indices,o=0;o<r.length;o+=3){t+=Ze(Cesium.Cartesian3.unpack(n,3*r[o],new Cesium.Cartesian3),Cesium.Cartesian3.unpack(n,3*r[o+1],new Cesium.Cartesian3),Cesium.Cartesian3.unpack(n,3*r[o+2],new Cesium.Cartesian3))}return t}function Ke(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=180,i=90,n=-180,r=-90;if((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e){t=Math.min(t,e.lng||e.x),i=Math.min(i,e.lat||e.y),n=Math.max(n,e.lng||e.x),r=Math.max(r,e.lat||e.y)})),e>0){var o=Math.abs(n-n),s=Math.abs(r-i);t-=o*e,i-=s*e,n+=o*e,r+=s*e}return{west:t,south:i,east:n,north:r}}function Qe(e){if(e&&Array.isArray(e)){var t=Cesium.BoundingSphere.fromPoints(He.transformWGS84ArrayToCartesianArray(e));return He.transformCartesianToWGS84(t.center)}return new je}function Xe(e,t){t=t||{};for(var i=[],n=0;n<e.length-1;n++){var r=Je(e[n],e[n+1],t.count);r&&r.length>0&&(i=i.concat(r))}return i}function Je(e,t,i){if(!e||!t)return null;var n=[];i=i||40;var r,o,s,a,l,u,c=function(e){return 1-2*e+e*e},h=function(e){return 2*e-2*e*e},f=function(e){return e*e},p=0,m=parseFloat(e.lat),d=parseFloat(t.lat),v=parseFloat(e.lng),y=parseFloat(t.lng);y>v&&y-v>180&&v<0&&(v=360+v,y=360+y),u=0,d===m?(r=0,o=v-y):y===v?(r=Math.PI/2,o=m-d):(r=Math.atan((d-m)/(y-v)),o=(d-m)/Math.sin(r)),0===u&&(u=r+Math.PI/5),l=(s=o/2)*Math.cos(u)+v,a=s*Math.sin(u)+m;for(var g=0;g<i+1;g++){var _=v*c(p)+l*h(p)+y*f(p),C=m*c(p)+a*h(p)+d*f(p),b=e.lng,w=t.lng;n.push([b<0&&w>0?_-360:_,C]),p+=1/i}return n}function $e(e){var t=0;if(e&&Array.isArray(e))for(var i=0;i<e.length-1;i++){var n=He.transformWGS84ToCartographic(e[i]),r=He.transformWGS84ToCartographic(e[i+1]),o=new Cesium.EllipsoidGeodesic;o.setEndPoints(n,r);var s=o.surfaceDistance;t+=s=Math.sqrt(Math.pow(s,2)+Math.pow(r.height-n.height,2))}return t.toFixed(3)}function et(e){var t=0;if(e&&Array.isArray(e))for(var i=0;i<e.length-1;i++){t+=Cesium.Cartesian3.distanceSquared(e[i],e[i+1])}return t}function tt(e,t){var i=e,n=t;if(!i||!n)return 0;e instanceof Cesium.Cartesian3||(i=De.parsePosition(e),i=He.transformWGS84ToCartesian(i)),t instanceof Cesium.Cartesian3||(n=De.parsePosition(t),n=He.transformWGS84ToCartesian(n));var r=Cesium.Transforms.eastNorthUpToFixedFrame(i),o=Cesium.Cartesian3.subtract(n,i,new Cesium.Cartesian3),s=Cesium.Matrix4.multiplyByPointAsVector(Cesium.Matrix4.inverse(r,new Cesium.Matrix4),o,new Cesium.Cartesian3),a=Math.atan2(s.y,s.x)-Cesium.Math.PI_OVER_TWO;return a=Cesium.Math.TWO_PI-Cesium.Math.zeroToTwoPi(a),isNaN(a)?0:a}function it(e,t,i){return(e=parseFloat(e)||0)>=parseFloat(t)&&e<=parseFloat(i)}function nt(e,t){var i=Cesium.Ellipsoid.WGS84.cartesianToCartographic(e),n=Cesium.Ellipsoid.WGS84.cartesianToCartographic(t),r=new Cesium.EllipsoidGeodesic(i,n).interpolateUsingFraction(.5);return Cesium.Ellipsoid.WGS84.cartographicToCartesian(r)}function rt(e,t){var i=De.parsePosition(e),n=De.parsePosition(t);i=He.transformWGS84ToCartographic(i),n=He.transformWGS84ToCartographic(n);var r=new Cesium.EllipsoidGeodesic(i,n).interpolateUsingFraction(.5);return new je(Cesium.Math.toDegrees(r.longitude),Cesium.Math.toDegrees(r.latitude),r.height)}function ot(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:50,r=[];i=Math.max(+i,100),n=Math.max(+n,50);var o=Math.abs(e.lng-t.lng),s=Math.abs(e.lat-t.lat),a=Math.max(o,s),l=a/n;if(o>s){var u=(t.lat-e.lat)/n;e.lng-t.lng>0&&(l=-l);for(var c=0;c<n;c++){var h=i-4*Math.pow(-.5*a+Math.abs(l)*c,2)*i/Math.pow(a,2),f=e.lng+l*c,p=e.lat+u*c;r.push([f,p,h])}}else{var m=(t.lng-e.lng)/n;e.lat-t.lat>0&&(l=-l);for(var d=0;d<n;d++){var v=i-4*Math.pow(-.5*a+Math.abs(l)*d,2)*i/Math.pow(a,2),y=e.lng+m*d,g=e.lat+l*d;r.push([y,g,v])}}return r.push([t.lng,t.lat,t.alt||0]),r}const st={getScreenCenterCoordinates:function(e){var t=e.scene,i=t.canvas,n=new Cesium.Cartesian2(i.clientWidth/2,i.clientHeight/2),r=t.globe.ellipsoid;return t.camera.pickEllipsoid(n,r)}};function at(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ut=function(e){c(i,e);var t=lt(i);function i(e,r){var o;return n(this,i),o=t.call(this),r?(o._nativeObjCesium=de.create("div","anov-div-icon anov-infoWin-init"),o._position=De.parsePosition(e),o.content=r,o._state=Ae.INITIALIZED,o):(console.error("没有传入内容,无法显示!"),f(o))}return a(i,[{key:"type",get:function(){return qe.getGraphicType("div_icon")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._nativeObjCesium.style.display=this._show?"block":"none"}},{key:"position",get:function(){return this._position},set:function(e){this._position=De.parsePosition(e)}},{key:"content",get:function(){return this._nativeObjCesium.childNodes||[]},set:function(e){if(e&&"string"==typeof e)this._nativeObjCesium.innerHTML=e;else if(e&&e instanceof Element){for(;this._nativeObjCesium.hasChildNodes();)this._nativeObjCesium.removeChild(this._nativeObjCesium.firstChild);this._nativeObjCesium.appendChild(e)}}},{key:"_updateStyle",value:function(e,t,i,n){if(this._show&&e){var r="scale3d(1,1,1)",o=this._style.scaleByDistance,s=1;if(t&&o){var a=o.near||0,l=o.nearValue||1,u=o.far||Number.MAX_VALUE,c=o.farValue||0;if(t<a)r="scale3d(".concat(l,",").concat(l,",1)"),s=l;else if(t>u)r="scale3d(".concat(c,",").concat(c,",1)"),s=c;else{var h=l-(t-a)/(u-a)*(l-c);s=h,r="scale3d(".concat(h,",").concat(h,",1)")}}if(s<.01)this._nativeObjCesium.style.display="none";else{this._nativeObjCesium.style.display="block";var f=e.x-this._nativeObjCesium.offsetWidth/2,p=e.y-this._nativeObjCesium.offsetHeight;"LEFT"===this._style.horizontalOrigin?f=e.x-this._nativeObjCesium.offsetWidth:"CENTER"===this._style.horizontalOrigin||"RIGHT"===this._style.horizontalOrigin&&(f=e.x),"BOTTOM"===this._style.verticalOrigin?p=e.y:"CENTER"===this._style.verticalOrigin||"TOP"===this._style.verticalOrigin&&(p=e.y-this._nativeObjCesium.offsetHeight),this._style.offsetX&&(f+=this._style.offsetX*s),this._style.offsetY&&(p+=this._style.offsetY*s),"LEFT"===this._style.horizontalOrigin?"CENTER"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="right center":"TOP"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="right bottom":"BOTTOM"===this._style.verticalOrigin&&(this._nativeObjCesium.style.transformOrigin="right top"):"CENTER"===this._style.horizontalOrigin?"CENTER"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="center center":"TOP"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="center bottom":"BOTTOM"===this._style.verticalOrigin&&(this._nativeObjCesium.style.transformOrigin="center top"):"RIGHT"===this._style.horizontalOrigin&&("CENTER"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="left center":"TOP"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="left bottom":"BOTTOM"===this._style.verticalOrigin&&(this._nativeObjCesium.style.transformOrigin="left top")),this._nativeObjCesium.style.top=p+"px",this._nativeObjCesium.style.left=f+"px",this._nativeObjCesium.style.transform="".concat(r);var m=!0,d=this._style.distanceDisplayCondition;t&&d&&(m=it(t,d.near||0,d.far||Number.MAX_VALUE)),this._nativeObjCesium.style.display=m&&i?"block":"none"}}}},{key:"_onAdd",value:function(e){var t=this;this._layer=e,de.addClass(this.nativeObjCesium,e.layerName),this._layer.nativeObjCesium.appendChild(this._nativeObjCesium);var i={layer:e,graphic:this,position:He.transformWGS84ToCartesian(this._position)};this._nativeObjCesium.addEventListener("click",(function(){t._graphicEvent.raiseEvent(X.CLICK,i)})),this._nativeObjCesium.addEventListener("mouseover",(function(){t._graphicEvent.raiseEvent(X.MOUSE_OVER,i)})),this._nativeObjCesium.addEventListener("mouseout",(function(){t._graphicEvent.raiseEvent(X.MOUSE_OUT,i)})),this._state=Ae.ADDED}},{key:"_onRemove",value:function(){this._layer&&(this._layer.nativeObjCesium.removeChild(this._nativeObjCesium),this._state=Ae.REMOVED)}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(me.merge(this._style,e),!0===e.pointerEvents?this._nativeObjCesium.style.pointerEvents="all":this._nativeObjCesium.style.pointerEvents="none",this._style.className&&de.addClass(this._nativeObjCesium,this._style.className),this):this}}],[{key:"fromEntity",value:function(e,t){var n,r=Cesium.JulianDate.now();return n=new i(He.transformCartesianToWGS84(e.position.getValue(r)),t),e.billboard&&(n.attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?at(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):at(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(r))),n}}]),i}(qe);qe.registerType("div_icon");const ct=ut;function ht(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var pt=function(e){c(i,e);var t=ft(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.Entity({model:{}}),r._position=De.parsePosition(e.position),r._modelUrl=e.url,r._rotateAmountHeading=0,r._rotateAmountPitch=0,r._rotateAmountRoll=0,r._state=Ae.INITIALIZED,me.merge(r._style,e),r.setOptions(e),r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("model")}},{key:"position",get:function(){return this._position},set:function(e){this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position)}},{key:"modelUrl",get:function(){return this._modelUrl},set:function(e){this._modelUrl=e,this._nativeObjCesium.model.uri=this._modelUrl}},{key:"rotateAmountHeading",get:function(){return this._rotateAmountHeading},set:function(e){this._rotateAmountHeading=+e,this._position.heading+=this._rotateAmountHeading,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(He.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll)))}},{key:"rotateAmountPitch",get:function(){return this._rotateAmountPitch},set:function(e){this._rotateAmountPitch=+e,this._position.pitch+=this._rotateAmountPitch,(this._position.pitch>=90||this._position.pitch<=-90)&&(this._position.pitch=0),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(He.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll)))}},{key:"rotateAmountRoll",get:function(){return this._rotateAmountRoll},set:function(e){this._rotateAmountRoll=+e,this._position.roll+=this._rotateAmountRoll,(this._position.roll>=90||this._position.roll<=-90)&&(this._position.roll=0),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(He.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll)))}},{key:"_mountedHook",value:function(){this.position=this._position,this.modelUrl=this._modelUrl}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.uri,me.merge(this._style,e),me.merge(this._nativeObjCesium.model,e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){De.parseOption(this._highlight),me.merge(this._nativeObjCesium.model,this._highlight),this.setLabel(this._style)}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){De.parseOption(this._selectedHighlight),me.merge(this._nativeObjCesium.model,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e,t){var n=Cesium.JulianDate.now(),r=new i(He.transformCartesianToWGS84(e.position.getValue(n)),t);return r.attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ht(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)),r}}]),i}(qe);qe.registerType("model");const mt=pt;function dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var vt=function(e){c(i,e);var t=dt(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,i),e=t.call(this,r);var o=r.url;if(!o)throw new Error("Tileset: url参数不能为空");return e._nativeObjCesium=Cesium.Cesium3DTileset.fromUrl(o,r),e._tileVisibleCallback=void 0,e._properties=void 0,e._state=Ae.INITIALIZED,e.selected={feature:void 0,originalColor:new Cesium.Color},e.highlighted={feature:void 0,originalColor:new Cesium.Color},e}return a(i,[{key:"type",get:function(){return qe.getGraphicType("tileset")}},{key:"ready",value:function(e){return this._whenReady(e),this}},{key:"_whenReady",value:function(e){if(!e)return this;var t=this._nativeObjCesium;return t&&"function"==typeof t.then?t.then(e):t&&e(t),this}},{key:"show",set:function(e){this._show=e,this._whenReady((function(t){t.show=e}))}},{key:"_bindVisibleEvent",value:function(){var e=this;this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._whenReady((function(t){t.tileVisible.addEventListener(e._updateTile,e)}))}},{key:"_updateTile",value:function(e){for(var t=this,i=e.content,n=function(){var e=i.getFeature(r);t._properties&&t._properties.length&&t._properties.forEach((function(t){e.hasProperty(t.key)&&e.getProperty(t.key)===t.keyValue&&e.setProperty(t.propertyName,t.propertyValue)}))},r=0;r<i.featuresLength;r++)n()}},{key:"setPosition",value:function(e){return e=De.parsePosition(e),this._whenReady((function(t){var i=Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),n=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(e.heading),Cesium.Math.toRadians(e.pitch),Cesium.Math.toRadians(e.roll))));Cesium.Matrix4.multiply(i,n,i),t.root.transform=i})),this}},{key:"setHeadingPitchRoll",value:function(e,t,i){return this._whenReady((function(n){var r=n.root.transform,o=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(e||0),Cesium.Math.toRadians(t||0),Cesium.Math.toRadians(i||0))));Cesium.Matrix4.multiply(r,o,r),n.root.transform=r})),this}},{key:"setLabel",value:function(e,t){return this}},{key:"clampToGround",value:function(){return this._whenReady((function(e){var t=Cesium.Cartographic.fromCartesian(e.boundingSphere.center),i=Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),n=Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,0),r=Cesium.Cartesian3.subtract(n,i,new Cesium.Cartesian3);e.modelMatrix=Cesium.Matrix4.fromTranslation(r)})),this}},{key:"setHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._whenReady((function(i){var n=Cesium.Cartographic.fromCartesian(i.boundingSphere.center),r=Cesium.Cartesian3.fromRadians(n.longitude,n.latitude,n.height),o=Cesium.Cartesian3.fromRadians(n.longitude,n.latitude,t?e:n.height+e),s=Cesium.Cartesian3.subtract(o,r,new Cesium.Cartesian3);i.modelMatrix=Cesium.Matrix4.fromTranslation(s)})),this}},{key:"setScale",value:function(e){return this._whenReady((function(t){var i=t.root.transform;e>0&&1!==e&&Cesium.Matrix4.multiplyByUniformScale(i,e,i),t.root.transform=i})),this}},{key:"setProperties",value:function(e){return this._properties=e,this._bindVisibleEvent(),this}},{key:"setSplitDirection",value:function(e){return this._whenReady((function(t){t.splitDirection=e})),this}},{key:"setCustomShader",value:function(e){return this._whenReady((function(t){t.customShader=e})),this}},{key:"setStyle",value:function(e){return e&&e instanceof Cesium.Cesium3DTileStyle&&(this._style=e,this._whenReady((function(t){t.style=e}))),this}},{key:"clip",value:function(e){var t=this;this._whenReady((function(i){t._clip(i,e)}))}},{key:"_clip",value:function(e,t){if(t&&Array.isArray(t)&&0!=t.length){for(var i=this.getInverseTransform(e),n=[],r=0;r<t.length-1;r++){var o=this.createClippingPlane(t[r],t[r+1],i);n.push(o)}e.clippingPlanes=new Cesium.ClippingPlaneCollection({planes:n,edgeWidth:0,edgeColor:Cesium.Color.WHITE.withAlpha(.7),unionClippingRegions:!1})}else e.clippingPlanes=null}},{key:"createClippingPlane",value:function(e,t,i){var n=this.getOriginCoordinateSystemPoint(e,i),r=this.getOriginCoordinateSystemPoint(t,i),o=null;o=this.unionClippingRegions?new Cesium.Cartesian3(0,0,-1):new Cesium.Cartesian3(0,0,1);var s=Cesium.Cartesian3.subtract(r,n,new Cesium.Cartesian3),a=Cesium.Cartesian3.cross(s,o,new Cesium.Cartesian3);a=Cesium.Cartesian3.normalize(a,a);var l=Cesium.Plane.fromPointNormal(n,a);return Cesium.ClippingPlane.fromPlane(l)}},{key:"getOriginCoordinateSystemPoint",value:function(e,t){var i=Cesium.Cartesian3.fromDegrees(e[0],e[1]);return Cesium.Matrix4.multiplyByPoint(t,i,new Cesium.Cartesian3(0,0,0))}},{key:"getInverseTransform",value:function(e){var t,i=e.root.transform;return t=i&&i.equals(Cesium.Matrix4.IDENTITY)||!i?Cesium.Transforms.eastNorthUpToFixedFrame(e.boundingSphere.center):Cesium.Matrix4.fromArray(e.root.transform),Cesium.Matrix4.inverseTransformation(t,new Cesium.Matrix4)}},{key:"cancelClipping",value:function(){this._whenReady((function(e){e.clippingPlanes=new Cesium.ClippingPlaneCollection({planes:[new Cesium.ClippingPlane(new Cesium.Cartesian3(0,0,-1),1e3)],edgeColor:Cesium.Color.RED,edgeWidth:0})}))}},{key:"isPointInsidePolygon",value:function(e,t){for(var i=e[0],n=e[1],r=!1,o=0,s=t.length-1;o<t.length;s=o++){var a=t[o][0],l=t[o][1],u=t[s][0],c=t[s][1];l>n!=c>n&&i<(u-a)*(n-l)/(c-l)+a&&(r=!r)}return r}},{key:"concavePolygonToConvexPolygons",value:function(e){for(var t,i=[],n=0;n<e.length;n++){var r=e[(n-1+e.length)%e.length],o=e[n],s=e[(n+1)%e.length];this.isPointInsidePolygon(o,[r,s])?t.push(o):(t&&i.push(t),t=[r,o,s])}t&&i.push(t);for(var a=[],l=1;l<i.length-1;l++){var u=i[l];a.push(u)}return a}},{key:"highlight",value:function(e){this.unHighlight(e),e.feature&&e.feature!==this.selected.feature&&(this.highlighted.feature=e.feature,this.highlighted.originalColor=Cesium.clone(e.feature.color),me.merge(e.feature,this._highlight))}},{key:"unHighlight",value:function(e){Cesium.defined(this.highlighted.feature)&&(this.highlighted.feature.color=this.highlighted.originalColor,this.highlighted.feature=void 0)}},{key:"selectedHighlight",value:function(e){e&&e.feature&&(this.selected.feature=e.feature,e.feature===this.highlighted.feature?(this.selected.originalColor=Cesium.clone(this.highlighted.originalColor),this.highlighted.feature=void 0):this.selected.originalColor=Cesium.clone(e.feature.color),this._pSelected=Cesium.clone(this.selected),me.merge(e.feature,this._selectedHighlight))}},{key:"unSelected",value:function(e){Cesium.defined(this.selected.feature)&&(this.selected.feature.color=this.selected.originalColor,this.selected.feature=void 0),e&&e.feature&&e.originalColor&&(e.feature.color=e.originalColor,e.feature=void 0)}}]),i}(qe);qe.registerType("tileset");const yt=vt;function gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var _t=function(e){c(i,e);var t=gt(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=De.parsePosition(e),o._icon=r,o._size=[32,32],o._nativeObjCesium={position:void 0,image:void 0,width:0,height:0},o.position=o._positions,o._state=Ae.INITIALIZED,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("billboard_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"position",get:function(){return this._position},set:function(e){this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position)}},{key:"icon",get:function(){return this._icon},set:function(e){this._icon=e,this._nativeObjCesium.image=this._icon}},{key:"size",get:function(){return this._size},set:function(e){if(!Array.isArray(e))throw new Error("Billboard Primitive: the size invalid");this._size=e,this._nativeObjCesium.width=this._size[0]||32,this._nativeObjCesium.height=this._size[1]||32}},{key:"_mountedHook",value:function(){this.position=this._position,this.icon=this._icon,this.size=this._size}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position&&delete e.image&&delete e.width&&delete e.height,me.merge(this._style,e),me.merge(this._nativeObjCesium,e),this):this}}]),i}(qe);qe.registerType("billboard_primitive");const Ct=_t;function bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var wt=10,Pt=.1,Ot=function(e){c(i,e);var t=bt(i);function i(e,r){var o;return n(this,i),(o=t.call(this,e,r))._currentOffset=new Cesium.Cartesian2(0,0),o._isUp=!0,o._state=Ae.INITIALIZED,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("bounce_billboard_primitive")}},{key:"update",value:function(){if(this._show){var e=this._style.maxOffsetY||wt,t=this._style.offsetAmount||Pt;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-e&&(this._isUp=!1),this._currentOffset.y+=t*(this._isUp?-1:1),this._nativeObjCesium.pixelOffset=this._currentOffset}}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(Ct);qe.registerType("bounce_billboard_primitive");const xt=Ot;function Et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var At=function(e){c(i,e);var t=Et(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=De.parsePosition(e),o._text=r,o._nativeObjCesium={position:void 0,text:void 0},o._state=Ae.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("label_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"position",get:function(){return this._position},set:function(e){this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position)}},{key:"text",get:function(){return this._text},set:function(e){this._text=e,this._nativeObjCesium.text=this._text}},{key:"_mountedHook",value:function(){this.position=this._position,this.text=this._text}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position&&delete e.text,me.merge(this._style,e),me.merge(this._nativeObjCesium,e),this):this}}]),i}(qe);qe.registerType("label_primitive");const Tt=At;function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Mt=10,Rt=.1,St=function(e){c(i,e);var t=kt(i);function i(e,r){var o;return n(this,i),(o=t.call(this,e,r))._currentOffset=new Cesium.Cartesian2(0,0),o._isUp=!0,o._state=Ae.INITIALIZED,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("bounce_label_primitive")}},{key:"update",value:function(){if(this._show){var e=this._style.maxOffsetY||Mt,t=this._style.offsetAmount||Rt;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-e&&(this._isUp=!1),this._currentOffset.y+=t*(this._isUp?-1:1),this._nativeObjCesium.pixelOffset=this._currentOffset}}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(Tt);qe.registerType("bounce_label_primitive");const jt=St;function Lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var It=function(e){c(i,e);var t=Lt(i);function i(e){var r;return n(this,i),(r=t.call(this))._position=De.parsePosition(e),r._nativeObjCesium={position:void 0,scale:{x:12,y:8}},r._state=Ae.INITIALIZED,r.position=r._positions,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("cloud_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"position",get:function(){return this._position},set:function(e){this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position)}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position,me.merge(this._style,e),me.merge(this._nativeObjCesium,e),this):this}}]),i}(qe);qe.registerType("cloud_primitive");const Dt=It;function Bt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ht={minRadius:10,minHeight:30,color:Cesium.Color.RED,slices:128,speed:10},Nt=function(e){c(i,e);var t=Gt(i);function i(e,r,o){var s;return n(this,i),(s=t.call(this))._center=De.parsePosition(e),s._nativeObjCesium=void 0,s._height=o,s._radius=r,s._currentHeight=o||0,s._currentRadius=10,s._style=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Bt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Ht),s._state=Ae.INITIALIZED,s}return a(i,[{key:"type",get:function(){return qe.getGraphicType("diffuse_wall_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere(Math.max(this._radius||0,this._height||0,10))}},{key:"center",get:function(){return this._center},set:function(e){return this._center=De.parsePosition(e),this}},{key:"radius",get:function(){return this._radius},set:function(e){return this._radius=e,this}},{key:"height",get:function(){return this._height},set:function(e){return this._height=e,this}},{key:"_getPositions",value:function(){for(var e=[],t=Cesium.Transforms.eastNorthUpToFixedFrame(He.transformWGS84ToCartesian(this._center)),i=0;i<this._style.slices;i++){var n=i/this._style.slices*Cesium.Math.TWO_PI,r=Math.cos(n),o=Math.sin(n),s=new Cesium.Cartesian3(r*this._currentRadius,o*this._currentRadius,0);e.push(Cesium.Matrix4.multiplyByPoint(t,s,new Cesium.Cartesian3))}return e.push(e[0]),e}},{key:"_getHeights",value:function(e,t){for(var i=[],n=0;n<e;n++)i.push(t);return i}},{key:"update",value:function(e){if(this._nativeObjCesium=this._nativeObjCesium&&this._nativeObjCesium.destroy(),this._currentRadius+=this._radius/this._style.speed/20,this._currentHeight-=this._height/this._style.speed/20,(this._currentRadius>this._radius||this._currentHeight<this._style.minHeight)&&(this._currentRadius=this._style.minRadius,this._currentHeight=this._height),!this._style.slices||this._style.slices<3)return!1;var t=this._getPositions();if(!t||!t.length)return!1;var i=new Cesium.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:i}),appearance:new Cesium.MaterialAppearance({material:Cesium.Material.fromType("WallDiffuse",{color:this._style.color}),flat:!0}),asynchronous:!1}),this._nativeObjCesium.update(e)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(me.merge(this._style,e),this):this}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(qe);qe.registerType("diffuse_wall_primitive");const Ft=Nt;function zt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Wt=function(e){c(i,e);var t=zt(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=De.parsePosition(e),o._radius=r||{x:10,y:10,z:10},o._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o.position=o._positions,o._state=Ae.INITIALIZED,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("elec_ellipsoid_primitive")}},{key:"boundingSphere",get:function(){var e=this._radius||{};return this._computeBoundingSphere(Math.max(e.x||0,e.y||0,e.z||0,10))}},{key:"position",get:function(){return this._position},set:function(e){this._position=De.parsePosition(e),this._nativeObjCesium.geometryInstances.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(He.transformWGS84ToCartesian(this._position))}},{key:"radius",get:function(){return this._radius},set:function(e){this._radius=e,this._nativeObjCesium.geometryInstances.geometry=new Cesium.EllipsoidGeometry({radii:this._radius,maximumCone:Cesium.Math.PI_OVER_TWO})}},{key:"_setAppearance",value:function(){this._style&&(this._nativeObjCesium.appearance=new Cesium.MaterialAppearance({material:Cesium.Material.fromType("EllipsoidElectric",{color:this._style.color||Cesium.Color.GREEN,speed:this._style.speed||5})}))}},{key:"_mountedHook",value:function(){this.radius=this._radius,this.position=this._position,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(me.merge(this._style,e),this._setAppearance(),this):this}}]),i}(qe);qe.registerType("elec_ellipsoid_primitive");const Ut=Wt;function Vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var qt=function(e){c(i,e);var t=Vt(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return n(this,i),(r=t.call(this))._positions=De.parsePositions(e),r._width=o,r._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}}),compressVertices:!1,allowPicking:!1}),r.positions=r._positions,r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("flow_line_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=De.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolylineGeometry({positions:He.transformWGS84ArrayToCartesianArray(this._positions),width:this._width,vertexFormat:Cesium.PolylineMaterialAppearance.VERTEX_FORMAT})}},{key:"_setAppearance",value:function(){this._nativeObjCesium.appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineFlowType,{color:this._style.color||new Cesium.Color(1,0,0,.7),speed:this._style.speed||1,percent:this._style.percent||.03,gradient:this._style.gradient||.1})})}},{key:"_mountedHook",value:function(){this.positions=this._positions,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(me.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(qe);qe.registerType("flow_line_primitive");const Zt=qt;function Yt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Qt={color:Cesium.Color.ORANGE},Xt=function(e){c(i,e);var t=Kt(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._center=De.parsePosition(e),a._length=r||100,a._topRadius=o||1,a._bottomRadius=s||50,a._nativeObjCesium=new Cesium.PrimitiveCollection,a.center=a._center,a._style=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Yt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Qt),a._state=Ae.INITIALIZED,a}return a(i,[{key:"type",get:function(){return qe.getGraphicType("light-cylinder-primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere(Math.max(this._length||0,this._bottomRadius||0,10))}},{key:"center",get:function(){return this._center},set:function(e){this._center=De.parsePosition(e),this._updatePrimitives()}},{key:"length",get:function(){return this._length},set:function(e){this._length=e,this._updatePrimitives()}},{key:"topRadius",get:function(){return this._topRadius},set:function(e){this._topRadius=e,this._updatePrimitives()}},{key:"bottomRadius",get:function(){return this._bottomRadius},set:function(e){this._bottomRadius=e,this._updatePrimitives()}},{key:"_computeEllipsePositions",value:function(e,t){var i=Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:He.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),n=Cesium.Cartesian3.unpackArray(i.outerPositions);return n.push(n[0]),n}},{key:"_createCylinderInstance",value:function(e,t,i){for(var n=t.slice(),r=t.length,o=2*r,s=[],a=1/(r-1),l=[],u=[],c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Cesium.Cartographic.fromCartesian(e);return i.height+=t,Cesium.Cartographic.toCartesian(i)},h=0;h<r;h++){u.push(c(e[h],i)),s.push(h*a,0);var f=(h+1)%r,p=o-(h+1);l.push.apply(l,[p-1,p,h]),l.push.apply(l,[h,f,p-1])}for(var m in u)n.push(u[r-m-1]),s.push(1-m*a,1);var d=Cesium.PolygonGeometry.createGeometry(new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(n),perPositionHeight:!0}));return d.indices=l,d.attributes.st.values=s,new Cesium.GeometryInstance({geometry:d})}},{key:"_getCircleImage",value:function(){var e=document.createElement("canvas");e.width=512,e.height=512;var t=e.getContext("2d");return t.fillStyle="rgba(255,255,255,0)",t.strokeStyle="rgba(255, 255, 255,255)",t.setLineDash([50,50]),t.lineWidth=30,t.beginPath(),t.arc(256,256,150,0,2*Math.PI,!0),t.stroke(),t.restore(),e}},{key:"_getParticlesImage",value:function(e){var t=document.createElement("canvas");t.width=64,t.height=256;var i=t.getContext("2d");return i.clearRect(0,0,64,256),i.drawImage(e,0,0),i.drawImage(e,33,0),t}},{key:"_updatePrimitives",value:function(){var e=this;this._nativeObjCesium.removeAll();var t=0===this._center.alt,i=this._computeEllipsePositions(this._center,this._topRadius),n=this._computeEllipsePositions(this._center,.7*this._bottomRadius),r=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(this._computeEllipsePositions(this._center,2*this._bottomRadius)),perPositionHeight:!t}),asynchronous:!1})},s=t?new Cesium.GroundPrimitive(o):new Cesium.Primitive(o);s.appearance=new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType(Cesium.Material.CircleRingType,{color:this._style.color})});var a=t?new Cesium.GroundPrimitive(o):new Cesium.Primitive(o);a.appearance=new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType(Cesium.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});var l=new Cesium.Primitive({geometryInstances:this._createCylinderInstance(i,n,this._length),appearance:new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType(Cesium.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});t?Cesium.GroundPrimitive.initializeTerrainHeights().then((function(){e._nativeObjCesium.add(s),e._nativeObjCesium.add(a),e._nativeObjCesium.add(l)})):(this._nativeObjCesium.add(s),this._nativeObjCesium.add(a),this._nativeObjCesium.add(l)),Cesium.Resource.fetchImage({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjExQTg0NDEyMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjExQTg0NDEzMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTFBODQ0MTAwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTFBODQ0MTEwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz41vRwAAAAE90lEQVR42uydyW4UMRCG3T2dgYSAEGs4sp44cCJBcGUJbwCvALwWPAI8ABwAiUVwgLBdkEikJEiAGMhkZqhfU1aa1sy0g+yaJPyWSupOpPjz0uVyucrJer2eG2fJ3ZgLAQhAgC0PgN8XIlkqgGLE75oih0WmRVZEvop0rHog18rnRe6IzInsthyCXFt+TuSKyGmRXZZDgK5eFrkv8l7kiUhrxN/JSo3pigSvcNmI1bCh3b5LK2+NqHyvyEF9x3z5HgqRRViOAXhW5JrCoNdei/y20gMYxhmRSyIXRY6JTMT4DENLW+SdyD19x/NajDmwmYIW79Hnn+MA4GJEAAIQgABJbMJB+n5Sl9zWZvR9DABUfkJkVt8fi3zUldAEoKl24Y2S1fPZEmBdZFHkkb4vxTLRQ5djbyUf0ncYrD/UADUB8MZno2Q19yx7gIqIAAQgAAEIQIAtYZT+85LvRnjQCoPKR3rQUgN4Y3ZeK30g8qps0qeeAzDn4TWD9+ySG+BBS90DaGnVg9a2tgnR4il9/jkOACoiAhCAAASIZpAAFl6yulO0JACo/IDrn6CedP1zxOciv6wAYNnAP3RVBeWtJQCWzG8iL/X9g4vkqNzMctzUXtintt2KM/aS+bmQaY90rb8CF6tSKiICEIAABCAAAQiwbfcFIWVCbUcc9bZDLKiYAKj4uOv7Bb+ILLj+8W7PCgC7Jhzv44Qdh9yrru8V61jPgd645gD2io+15RiC5ZA5ENNPmGmDmtrta9YAVEQE2FlrQUM/J6efU8cSAD87ojodBaccS6kgiiErGiq/qe93XT+3oGU5BJnbyKrIUs6BQZoQUEcrQ7CYagiGqeKiMgnXLXsg5uJUm/RQJKy8fGS7PMw6SgVQPrJFGZr0kCfUL/7IFjIzrLGpemBQ0kPbehL6I9vMjUh6oEVEAAIQgAAEIAABdpyj0qcK71YrqGUJANNrv+sHOcAiRpDDM1cTY1BEHk7kqyP/2Ac5vLEEQEG8aDnIoTb5ObZRWg5ywG5o1dX4ClNYxT7IISgJPsXGpLut9MCWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII="}).then((function(t){var n=new Cesium.Primitive({geometryInstances:e._createCylinderInstance(i,r,e._length),appearance:new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType(Cesium.Material.CylinderParticlesType,{color:e._style.color,image:e._getParticlesImage(t)})}),asynchronous:!1});e._nativeObjCesium.add(n)}))}},{key:"_mountedHook",value:function(){this.center=this._center}},{key:"update",value:function(e){this._nativeObjCesium.update(e)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(me.merge(this._style,e),this):this}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(qe);qe.registerType("light-cylinder-primitive");const Jt=Xt;function $t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}function ei(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ti(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ei(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var ii=function(e){c(i,e);var t=$t(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,i),e=t.call(this),!Cesium.defined(r.url)&&!Cesium.defined(r.gltf))throw new Error("one of parameters url or gltf must be provided.");e._position=Cesium.defined(r.position)?De.parsePosition(r.position):null,e._modelUrl=r.url,e._state=Ae.INITIALIZED,e._nativeModel=null;var o=function(e){return Cesium.defined(e.modelMatrix)?e:Cesium.defined(e.position)?(e.position instanceof Cesium.Cartesian3?t=e.position:e.position instanceof je&&(t=He.transformWGS84ToCartesian(e.position)),t?ti(ti({},e),{},{modelMatrix:Cesium.Transforms.eastNorthUpToFixedFrame(t)}):e):e;var t}(r);if(Cesium.defined(r.gltf))e._nativeObjCesium=new Cesium.Model(o),e._readyPromise=Promise.resolve(e._nativeObjCesium),e._nativeModel=e._nativeObjCesium;else{var s=Cesium.Model.fromGltfAsync(o);e._readyPromise=s,e._nativeObjCesium=s,s.then((function(t){e._nativeModel=t,e._state=Ae.ADDED}))}return e}return a(i,[{key:"type",get:function(){return qe.getGraphicType("model_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"ready",get:function(){return!(!this._nativeModel||!this._nativeModel._ready)}},{key:"readyPromise",get:function(){return this._readyPromise}},{key:"nativeObjCesium",get:function(){return this._nativeModel}},{key:"position",get:function(){return this._position},set:function(e){if(this._position=e?De.parsePosition(e):null,this._nativeModel&&this._position){var t=He.transformWGS84ToCartesian(this._position);this._nativeModel.modelMatrix=Cesium.Transforms.headingPitchRollToFixedFrame(t,new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll)))}}},{key:"modelUrl",get:function(){return this._modelUrl},set:function(e){var t=this;this._modelUrl=e;var i=Cesium.Model.fromGltfAsync({url:e});this._nativeObjCesium=i,this._readyPromise=i,i.then((function(e){t._nativeModel=e,t._layer&&t._layer.nativeObjCesium&&t._layer.nativeObjCesium.add&&t._layer.nativeObjCesium.add(e)})),this.position=this._position}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"getMaterial",value:function(e){return this._nativeModel&&this._nativeModel.getMaterial(e)}},{key:"getMesh",value:function(e){return this._nativeModel&&this._nativeModel.getMesh(e)}},{key:"getNode",value:function(e){return this._nativeModel&&this._nativeModel.getNode(e)}},{key:"getNodes",value:function(){return this._nativeModel&&this._nativeModel._runtime?this._nativeModel._runtime.nodes:void 0}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(me.merge(this._style,e),this._nativeModel&&me.merge(this._nativeModel,e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){De.parseOption(this._highlight),this._nativeModel&&me.merge(this._nativeModel,this._highlight),this.setLabel(this._style)}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){De.parseOption(this._selectedHighlight),this._nativeModel&&me.merge(this._nativeModel,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}]),i}(qe);qe.registerType("model_primitive");const ni=ii;function ri(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var oi={pixelSize:8,outlineColor:Cesium.Color.BLUE,outlineWidth:2},si=function(e){c(i,e);var t=ri(i);function i(e){var r;return n(this,i),(r=t.call(this))._position=De.parsePosition(e),r._nativeObjCesium={position:void 0},r._state=Ae.INITIALIZED,r.position=r._position,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("point_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"position",get:function(){return this._position},set:function(e){this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position)}},{key:"_mountedHook",value:function(){this.position=this._position,me.merge(this._nativeObjCesium,oi,this._style)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position,me.merge(this._style,e),me.merge(this._nativeObjCesium,oi,this._style),this):this}}]),i}(qe);qe.registerType("point_primitive");const ai=si;function li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ui=function(e){c(i,e);var t=li(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=De.parsePositions(e),r._nativeObjCesium={positions:[]},r.positions=r._positions,r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("polyline_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=De.parsePositions(e),this._nativeObjCesium.positions=He.transformWGS84ArrayToCartesianArray(this._positions)}},{key:"center",get:function(){return Qe(this._positions)}},{key:"distance",get:function(){return $e(this._positions)}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.positions,me.merge(this._style,e),me.merge(this._nativeObjCesium,e),this):this}}]),i}(qe);qe.registerType("polyline_primitive");const ci=ui;var hi=["czm_material czm_getMaterial(czm_materialInput materialInput) {"," czm_material material = czm_getDefaultMaterial(materialInput);"," vec2 st = materialInput.st;"," float t = fract(startTime + czm_frameNumber * speed / 1000.0);"," t *= 1.03;"," float alpha = smoothstep(t - pointWidth, t, st.s) * step(st.s, t);"," material.diffuse = color.rgb * alpha + bgColor.rgb * (1.0 - alpha);"," material.alpha = (color.a * alpha + bgColor.a * (1.0 - alpha)) * globalAlpha;"," return material;","}"].join("\n"),fi=["czm_material czm_getMaterial(czm_materialInput materialInput) {"," czm_material material = czm_getDefaultMaterial(materialInput);"," material.diffuse = color.rgb;"," material.alpha = color.a;"," return material;","}"].join("\n"),pi=[.02,.012,.008,.005],mi=[2e6,6e6,12e6];function di(e,t){var i=e.replace("#",""),n=parseInt(i.substr(0,2),16)/255,r=parseInt(i.substr(2,2),16)/255,o=parseInt(i.substr(4,2),16)/255;return new Cesium.Color(n,r,o,t)}var vi={lineColor:"#6984a0",lineAlpha:.45,lineWidth:1,dotColor:"#8ca8c7",dotAlpha:.5,dotWidth:2.5,speed:2,dotLength:1,globalAlpha:1,bidirectional:!1,height:100,showLine:!0,showDot:!0};const yi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this._viewer=t.viewer,!this._viewer)throw new Error("ODLinePrimitive: viewer is required");this._id=me.uuid(),this._state=Ae.INITIALIZED,this._options=me.merge({},vi,t),this._lineMaterial=null,this._linePrimitive=null,this._dotMaterials=[],this._dotPrimitives=[],this._dataSnapshot=t.data||t.geojson,this._build()}return a(e,[{key:"id",get:function(){return this._id}},{key:"type",get:function(){return"od_line_primitive"}},{key:"state",get:function(){return this._state}},{key:"options",get:function(){return Object.assign({},this._options)}},{key:"show",get:function(){return void 0===this._show||this._show},set:function(e){this._show=e,this._linePrimitive&&(this._linePrimitive.show=e&&this._options.showLine),this._dotPrimitives.forEach((function(t){t.show=e&&this._options.showDot}))}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e||0===Object.keys(e).length)return this;(("data"in e||"geojson"in e)&&(this._dataSnapshot=e.data||e.geojson),me.merge(this._options,e),["lineWidth","dotWidth","bidirectional","height"].some((function(t){return t in e}))||"data"in e||"geojson"in e)?this._rebuild():["lineColor","lineAlpha","dotColor","dotAlpha","speed","dotLength","globalAlpha"].some((function(t){return t in e}))&&this._applyLiveParams();return["showLine","showDot"].some((function(t){return t in e}))&&this._applyShowFlags(),this}},{key:"setLineColor",value:function(e){this.setOptions({lineColor:e})}},{key:"setLineAlpha",value:function(e){this.setOptions({lineAlpha:e})}},{key:"setLineWidth",value:function(e){this.setOptions({lineWidth:e})}},{key:"setDotColor",value:function(e){this.setOptions({dotColor:e})}},{key:"setDotAlpha",value:function(e){this.setOptions({dotAlpha:e})}},{key:"setDotWidth",value:function(e){this.setOptions({dotWidth:e})}},{key:"setSpeed",value:function(e){this.setOptions({speed:e})}},{key:"setDotLength",value:function(e){this.setOptions({dotLength:e})}},{key:"setGlobalAlpha",value:function(e){this.setOptions({globalAlpha:e})}},{key:"setBidirectional",value:function(e){this.setOptions({bidirectional:e})}},{key:"flyTo",value:function(e){if(this._linePrimitive){var t=this._linePrimitive.boundingSphere;t&&this._viewer.camera.flyToBoundingSphere(t,{duration:void 0!==e?e:1.5})}}},{key:"setData",value:function(e){this._dataSnapshot=e,this._rebuild()}},{key:"destroy",value:function(){this._linePrimitive&&(this._viewer.scene.primitives.remove(this._linePrimitive),this._linePrimitive=null),this._dotPrimitives.forEach((function(e){this._viewer.scene.primitives.remove(e)}),this),this._lineMaterial=null,this._dotPrimitives=[],this._dotMaterials=[],this._state=Ae.REMOVED}},{key:"_applyLiveParams",value:function(){if(this._lineMaterial&&("lineColor"in this._options||"lineAlpha"in this._options)&&(this._lineMaterial.uniforms.color=this._makeLineColor()),("dotColor"in this._options||"dotAlpha"in this._options)&&this._dotMaterials.length){var e=this._makeDotColor();this._dotMaterials.forEach((function(t){t.uniforms.color=e}))}"speed"in this._options&&this._dotMaterials.forEach((function(e){e.uniforms.speed=this._options.speed}),this),"dotLength"in this._options&&this._dotMaterials.forEach((function(e,t){e.uniforms.pointWidth=pi[t]*this._options.dotLength}),this),"globalAlpha"in this._options&&this._dotMaterials.forEach((function(e){e.uniforms.globalAlpha=this._options.globalAlpha}),this)}},{key:"_applyShowFlags",value:function(){this._linePrimitive&&(this._linePrimitive.show=this.show&&this._options.showLine),this._dotPrimitives.forEach((function(e){e.show=this.show&&this._options.showDot}),this)}},{key:"_makeLineColor",value:function(){return di(this._options.lineColor,this._options.lineAlpha)}},{key:"_makeDotColor",value:function(){return di(this._options.dotColor,this._options.dotAlpha)}},{key:"_build",value:function(){var e=this._dataSnapshot;if(e&&e.features){var t=this._viewer.scene,i=this._options,n=[],r=[[],[],[],[]];e.features.forEach((function(e){var t=e.geometry;t&&("LineString"===t.type?[t.coordinates]:t.coordinates).forEach((function(e){if(e&&!(e.length<2)){var t=[];e.forEach((function(e){t.push(e[0],e[1],i.height)}));var o=Cesium.Cartesian3.fromDegreesArrayHeights(t);n.push(new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:o,width:i.lineWidth,vertexFormat:Cesium.PolylineMaterialAppearance.VERTEX_FORMAT})}));for(var s=0,a=0;a<e.length-1;a++){s+=new Cesium.EllipsoidGeodesic(Cesium.Cartographic.fromDegrees(e[a][0],e[a][1]),Cesium.Cartographic.fromDegrees(e[a+1][0],e[a+1][1])).surfaceDistance}for(var l=3,u=0;u<mi.length;u++)if(s<mi[u]){l=u;break}r[l].push(new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:o,width:i.dotWidth,vertexFormat:Cesium.PolylineMaterialAppearance.VERTEX_FORMAT})}))}}))})),this._lineMaterial=new Cesium.Material({fabric:{type:"ODLineBase_"+Date.now(),uniforms:{color:this._makeLineColor()},source:fi},translucent:!0}),this._linePrimitive=new Cesium.Primitive({geometryInstances:n,appearance:new Cesium.PolylineMaterialAppearance({material:this._lineMaterial,translucent:!0}),releaseGeometryInstances:!1,asynchronous:!1}),t.primitives.add(this._linePrimitive),this._linePrimitive.show=this.show&&i.showLine;var o=this._makeDotColor(),s=new Cesium.Color(0,0,0,0);r.forEach((function(e,n){if(e.length){var r=new Cesium.Material({fabric:{type:"ODLineDot_"+n,uniforms:{color:o,bgColor:s,speed:i.speed,startTime:Math.random(),bidirectional:i.bidirectional?1:0,globalAlpha:i.globalAlpha,pointWidth:pi[n]*i.dotLength},source:hi},translucent:!0}),a=new Cesium.Primitive({geometryInstances:e,appearance:new Cesium.PolylineMaterialAppearance({material:r,translucent:!0}),releaseGeometryInstances:!0,asynchronous:!1});t.primitives.add(a),a.show=this.show&&i.showDot,this._dotMaterials.push(r),this._dotPrimitives.push(a)}}),this),this._state=Ae.ADDED}else console.warn("ODLinePrimitive: missing data")}},{key:"_rebuild",value:function(){this._dataSnapshot&&(this.destroy(),this._build())}}]),e}();function gi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var _i=function(e){c(i,e);var t=gi(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=De.parsePosition(e),o._radius=r,o._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o._state=Ae.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("scan_circle_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere(this._radius||10)}},{key:"position",get:function(){return this._position},set:function(e){this._position=De.parsePosition(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.EllipseGeometry({center:He.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}},{key:"radius",get:function(){return this._radius},set:function(e){this._radius=e,this._nativeObjCesium.geometryInstances.geometry.semiMajorAxis=this._radius,this._nativeObjCesium.geometryInstances.geometry.semiMinorAxis=this._radius}},{key:"_setAppearance",value:function(){this._style&&(this._nativeObjCesium.appearance=new Cesium.MaterialAppearance({material:Cesium.Material.fromType("CircleScan",{color:this._style.color||Cesium.Color.WHITE,speed:this._style.speed||10})}))}},{key:"_mountedHook",value:function(){this.position=this._position,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(me.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(qe);qe.registerType("scan_circle_primitive");const Ci=_i;function bi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var wi=function(e){c(i,e);var t=bi(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return n(this,i),(r=t.call(this))._positions=De.parsePositions(e),r._width=o,r._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),r._state=Ae.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("trail_line_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=De.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolylineGeometry({positions:He.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}},{key:"_setAppearance",value:function(){this._nativeObjCesium.appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType("PolylineTrail",{color:this._style.color||new Cesium.Color(1,0,0,.7),speed:this._style.speed||5})})}},{key:"_mountedHook",value:function(){this.positions=this._positions,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(me.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(qe);qe.registerType("trail_line_primitive");const Pi=wi;function Oi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var xi=function(e){c(i,e);var t=Oi(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._positions=De.parsePositions(e),o._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o._video=r,o._state=Ae.INITIALIZED,o.positions=o._positions,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("video_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=De.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=Cesium.PolygonGeometry.fromPositions({positions:He.transformWGS84ArrayToCartesianArray(this._positions),height:this._style.height,extrudedHeight:this._style.extrudedHeight,closeTop:this._style.closeTop,closeBottom:this._style.closeBottom,vertexFormat:Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}},{key:"video",get:function(){return this._video},set:function(e){this._video=e,this._setAppearance()}},{key:"_setAppearance",value:function(){this._nativeObjCesium.appearance=new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType("Image",{image:this._video})})}},{key:"_mountedHook",value:function(){this.positions=this._positions,this.video=this._video}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(me.merge(this._style,e),this._style.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType)),this}}]),i}(qe);qe.registerType("video_primitive");const Ei=xi;function Ai(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ti=function(e){c(i,e);var t=Ai(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n(this,i),(r=t.call(this))._positions=De.parsePositions(e),r._holes=o.map((function(e){return De.parsePositions(e)})),r._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),r._state=Ae.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("water_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=De.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(He.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map((function(e){return new Cesium.PolygonHierarchy(He.transformWGS84ArrayToCartesianArray(e))}))),height:this._style.height||0,extrudedHeight:this._style.extrudedHeight||0,closeTop:this._style.closeTop||!0,closeBottom:this._style.closeBottom||!0,vertexFormat:Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}},{key:"_setAppearance",value:function(){this._style&&(this._nativeObjCesium.appearance=new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType("Water",{baseWaterColor:this._style.baseWaterColor||new Cesium.Color(.2,.3,.6,1),blendColor:this._style.blendColor||new Cesium.Color(0,1,.699,1),specularMap:this._style.specularMap||Cesium.Material.DefaultImageId,normalMap:this._style.normalMap||Cesium.buildModuleUrl("static/images/water/waterNormalsSmall.jpg"),frequency:this._style.frequency||1e3,animationSpeed:this._style.animationSpeed||.01,amplitude:this._style.amplitude||10,specularIntensity:this._style.specularIntensity||.5})}))}},{key:"_mountedHook",value:function(){this.positions=this._positions,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e)return 0===Object.keys(e).length||(me.merge(this._style,e),this._style.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(qe);qe.registerType("water_primitive");const ki=Ti;function Mi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ri(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Si=function(e){c(i,e);var t=Ri(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._nativeObjCesium=new Cesium.Entity({billboard:{}}),r._position=De.parsePosition(e),r.position=r._position,me.merge(r._style,o),r.setOptions(o),r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("billboard")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position),this}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(me.merge(this._style,e),me.merge(this._nativeObjCesium.billboard,e),this.setLabel(this._style),this.originOption=Cesium.clone(this._style,!1),this):this}},{key:"highlight",value:function(){De.parseOption(this._highlight),me.merge(this._nativeObjCesium.billboard,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){De.parseOption(this._selectedHighlight),me.merge(this._nativeObjCesium.billboard,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now(),r=He.transformCartesianToWGS84(e.position.getValue(n));return e.billboard&&((t=new i(r,{image:e.billboard.image.getValue(n)})).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Mi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Mi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n))),t}}]),i}(qe);qe.registerType("billboard");const ji=Si;function Li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ii=function(e){c(i,e);var t=Li(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._position=De.parsePosition(e),a._length=r,a._width=o,a._height=s,a._nativeObjCesium=new Cesium.Entity({box:{dimensions:{x:+a._length,y:+a._width,z:+a._height}}}),a.position=a._position,a._state=Ae.INITIALIZED,a}return a(i,[{key:"type",get:function(){return qe.getGraphicType("box")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(He.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"length",get:function(){return this._length},set:function(e){return this._length=e||0,this._nativeObjCesium.box.dimensions.x=+this._length,this}},{key:"width",get:function(){return this._width},set:function(e){return this._width=e||0,this._nativeObjCesium.box.dimensions.y=+this._width,this}},{key:"height",get:function(){return this._height},set:function(e){return this._height=e||0,this._nativeObjCesium.box.dimensions.z=+this._height,this}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.length&&delete e.width&&delete e.height,me.merge(this._style,e),me.merge(this._nativeObjCesium.box,e)),this}}]),i}(qe);qe.registerType("box");const Di=Ii;function Bi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Gi(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Bi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Bi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Hi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ni=function(e){c(i,e);var t=Hi(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._nativeObjCesium=new Cesium.Entity({polygon:{}}),o._center=De.parsePosition(e),o._radius=+r||0,o._rotateAmount=0,o._stRotation=0,o._state=Ae.INITIALIZED,o.center=o._center,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("circle")}},{key:"center",get:function(){return this._center},set:function(e){return this._center=De.parsePosition(e),this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy(),this}},{key:"radius",get:function(){return this._radius},set:function(e){return this._radius=+e,this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy(),this}},{key:"rotateAmount",get:function(){return this._rotateAmount},set:function(e){var t=this;return this._rotateAmount=+e,this._nativeObjCesium.polygon.stRotation=new Cesium.CallbackProperty((function(){return t._stRotation+=t._rotateAmount,(t._stRotation>=360||t._stRotation<=-360)&&(t._stRotation=0),Cesium.Math.toRadians(t._stRotation)}),!1),this}},{key:"_computeHierarchy",value:function(){var e=new Cesium.PolygonHierarchy,t=Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:He.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),i=Cesium.Cartesian3.unpackArray(t.outerPositions);return i.push(i[0]),e.positions=i,e}},{key:"_mountedHook",value:function(){this.center=this._center}},{key:"setLabel",value:function(e,t){return this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._center),this._nativeObjCesium.label=Gi(Gi({},t),{},{text:e}),this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.positions,me.merge(this._style,e),me.merge(this._nativeObjCesium.polygon,e),this):this}}]),i}(qe);qe.registerType("circle");const Fi=Ni;function zi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Wi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ui=function(e){c(i,e);var t=Wi(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=De.parsePositions(e),r._nativeObjCesium=new Cesium.Entity({corridor:{}}),r._state=Ae.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("corridor")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=De.parsePositions(e),this._nativeObjCesium.corridor.positions=He.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.positions,me.merge(this._style,e),me.merge(this._nativeObjCesium.corridor,e)),this}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polyline&&((t=new i(He.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(n)))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?zi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):zi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(qe);qe.registerType("corridor");const Vi=Ui;function qi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Zi=function(e){c(i,e);var t=qi(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._position=De.parsePosition(e),a._length=+r||0,a._topRadius=+o||0,a._bottomRadius=+s||0,a._nativeObjCesium=new Cesium.Entity({cylinder:{}}),a._state=Ae.INITIALIZED,a.position=a._position,a}return a(i,[{key:"type",get:function(){return qe.getGraphicType("cylinder")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(He.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"length",get:function(){return this._length},set:function(e){return this._length=+e||0,this._nativeObjCesium.cylinder.length=this._length,this}},{key:"topRadius",get:function(){return this._topRadius},set:function(e){return this._topRadius=+e||0,this._nativeObjCesium.cylinder.topRadius=this._topRadius,this}},{key:"bottomRadius",get:function(){return this._bottomRadius},set:function(e){return this._bottomRadius=+e||0,this._nativeObjCesium.cylinder.bottomRadius=this._bottomRadius,this}},{key:"_mountedHook",value:function(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.length&&delete e.topRadius&&delete e.bottomRadius,me.merge(this._style,e),me.merge(this._nativeObjCesium.cylinder,e)),this}}]),i}(qe);qe.registerType("cylinder");const Yi=Zi;function Ki(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Qi=function(e){c(i,e);var t=Ki(i);function i(e,r,o){var s;return n(this,i),(s=t.call(this))._position=De.parsePosition(e),s._semiMajorAxis=+r||0,s._semiMinorAxis=+o||0,s._nativeObjCesium=new Cesium.Entity({ellipse:{}}),s._state=Ae.INITIALIZED,s.position=s._position,s}return a(i,[{key:"type",get:function(){return qe.getGraphicType("ellipse")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(He.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"semiMajorAxis",get:function(){return this._semiMajorAxis},set:function(e){return this._semiMajorAxis=+e||0,this._nativeObjCesium.ellipse.semiMajorAxis=this._semiMajorAxis,this}},{key:"semiMinorAxis",get:function(){return this._semiMinorAxis},set:function(e){return this._semiMinorAxis=+e||0,this._nativeObjCesium.ellipse.semiMinorAxis=this._semiMinorAxis,this}},{key:"_mountedHook",value:function(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.semiMajorAxis&&delete e.semiMinorAxis,me.merge(this._style,e),me.merge(this._nativeObjCesium.ellipse,e)),this}}]),i}(qe);qe.registerType("ellipse");const Xi=Qi;function Ji(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var $i=function(e){c(i,e);var t=Ji(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=De.parsePosition(e),o._radius=r||{x:10,y:10,z:10},o._nativeObjCesium=new Cesium.Entity({ellipsoid:{}}),o._state=Ae.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("ellipsoid")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(He.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"radius",get:function(){return this._radius},set:function(e){return this._radius=e||{x:10,y:10,z:10},this._nativeObjCesium.ellipsoid.radii=this._radius,this}},{key:"_mountedHook",value:function(){this.position=this._position,this.radius=this._radius}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.radius,me.merge(this._style,e),me.merge(this._nativeObjCesium.ellipsoid,e)),this}}]),i}(qe);qe.registerType("ellipsoid");const en=$i;function tn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function nn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var rn={text:"test",color:"#ffff00"},on=function(e){c(i,e);var t=nn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this))._nativeObjCesium=new Cesium.Entity({label:{}}),r._position=De.parsePosition(e),r._state=Ae.INITIALIZED,r.position=r._position,r._style=me.merge(r._style,rn,o),r.setOptions(r._style),r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("label")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position),this}},{key:"text",get:function(){return this._text},set:function(e){return this._text=e,this._nativeObjCesium.label.text=this._text,this}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"highlight",value:function(){De.parseOption(this._highlight),me.merge(this._nativeObjCesium.label,this._highlight)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position,De.parseOption(e),e.fillColor=e.color,me.merge(this._style,e),me.merge(this._nativeObjCesium.label,e),this):this}}],[{key:"fromEntity",value:function(e){var t=Cesium.JulianDate.now(),n=He.transformCartesianToWGS84(e.position.getValue(t)),r=void 0;return e.billboard&&((r=new i(n,e.name)).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?tn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):tn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(t))),r}}]),i}(qe);qe.registerType("label");const sn=on;function an(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ln=function(e){c(i,e);var t=an(i);function i(e,r,o){var s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(n(this,i),(s=t.call(this))._position=De.parsePosition(e),s._width=+r||0,s._height=+o||0,a.normal&&"string"==typeof a.normal){var l=String(a.normal).toLocaleUpperCase();a.normal="X"===l?Cesium.Cartesian3.UNIT_X:"Y"===l?Cesium.Cartesian3.UNIT_Y:Cesium.Cartesian3.UNIT_Z}else a.normal=Cesium.Cartesian3.UNIT_Z;return s._normal=a.normal,s._distance=a.distance||0,s._nativeObjCesium=new Cesium.Entity({plane:{dimensions:{x:s._width,y:s._height},plane:new Cesium.Plane(s._normal,s._distance)}}),s.position=s._position,s._state=Ae.INITIALIZED,s}return a(i,[{key:"type",get:function(){return qe.getGraphicType("plane")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(He.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"width",get:function(){return this._width},set:function(e){return this._width=+e||0,this._nativeObjCesium.plan.dimensions.x=this._width,this}},{key:"height",get:function(){return this._height},set:function(e){return this._height=+e||0,this._nativeObjCesium.plan.dimensions.y=this._height,this}},{key:"distance",get:function(){return this._distance},set:function(e){return this._distance=e,this._nativeObjCesium.plane.plane.distance=e,this}},{key:"_mountedHook",value:function(){this.position=this._position,this.distance=this._distance}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.dimensions,me.merge(this._style,e),me.merge(this._nativeObjCesium.plane,e)),this}}]),i}(qe);qe.registerType("plane");const un=ln;function cn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function hn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var fn={pixelSize:8,outlineColor:Cesium.Color.BLUE,outlineWidth:2},pn=function(e){c(i,e);var t=hn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._nativeObjCesium=new Cesium.Entity({point:{}}),r._position=De.parsePosition(e),r.position=r._position,me.merge(r._style,fn,o),r.setOptions(o),r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("point")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=De.parsePosition(e),this._nativeObjCesium.position=He.transformWGS84ToCartesian(this._position),this}},{key:"label",get:function(){return this._nativeObjCesium.label}},{key:"_mountedHook",value:function(){this.position=this._position,me.merge(this._nativeObjCesium.point,fn,this._style)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position,De.parseOption(e),me.merge(this._style,e),me.merge(this._nativeObjCesium.point,this._style),this.setLabel(e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){De.parseOption(this._highlight),me.merge(this._nativeObjCesium.point,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){De.parseOption(this._selectedHighlight),me.merge(this._nativeObjCesium.point,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();return(t=new i(He.transformCartesianToWGS84(e.position.getValue(n)))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):cn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)),t}}]),i}(qe);qe.registerType("point");const mn=pn;function dn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var yn=function(e){c(i,e);var t=vn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._nativeObjCesium=new Cesium.Entity({polygon:{}}),r._positions=De.parsePositions(e),r._holes=[],r._state=Ae.INITIALIZED,r.positions=r._positions,r.position=He.transformWGS84ToCartesian(r.center),r._nativeObjCesium.position=r.position,De.parseOption(o),me.merge(r._style,o),r.setOptions(r._style),r}return a(i,[{key:"position",get:function(){return this._position},set:function(e){return this._position=e,this._nativeObjCesium.position=e,this}},{key:"type",get:function(){return qe.getGraphicType("polygon")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=De.parsePositions(e),this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy(),this}},{key:"holes",get:function(){return this._holes},set:function(e){return e&&e.length&&(this._holes=e.map((function(e){return De.parsePositions(e)})),this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy()),this}},{key:"center",get:function(){var e=Qe([].concat(Ie(this._positions),[this._positions[0]])),t=He.setHeightWGS84(e,.5);return He.transformCartesianToWGS84(t)}},{key:"area",get:function(){return Ye(this._positions)}},{key:"_computeHierarchy",value:function(){var e=new Cesium.PolygonHierarchy;return e.positions=He.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map((function(e){return new Cesium.PolygonHierarchy(He.transformWGS84ArrayToCartesianArray(e))})),e}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.positions,De.parseOption(e),me.merge(this._style,e),me.merge(this._nativeObjCesium.polygon,e),this.setLabel(e),this.setBillboard(e),this.setPolyline(e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){De.parseOption(this._highlight),me.merge(this._nativeObjCesium.polygon,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){De.parseOption(this._selectedHighlight),me.merge(this._nativeObjCesium.polygon,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polygon&&((t=new i(He.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(n).positions))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?dn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):dn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(qe);qe.registerType("polygon");const gn=yn;function _n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var bn=function(e){c(i,e);var t=Cn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._positions=De.parsePositions(e),r._positions.length<2?(console.error("polyline必须至少两个点!"),f(r)):(r._nativeObjCesium=new Cesium.Entity({polyline:{}}),r.positions=r._positions,r._state=Ae.INITIALIZED,De.parseOption(o),me.merge(r._style,o),r.position=He.transformWGS84ToCartesian(Qe([r._positions[0],r._positions[1]])),r._nativeObjCesium.position=r.position,r.setOptions(r._style),r)}return a(i,[{key:"position",get:function(){return this._position},set:function(e){return this._position=e,this}},{key:"type",get:function(){return qe.getGraphicType("polyline")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=De.parsePositions(e),this._nativeObjCesium.polyline.positions=He.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"center",get:function(){return Qe(this._positions)}},{key:"distance",get:function(){return $e(this._positions)}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"highlight",value:function(){De.parseOption(this._highlight),me.merge(this._nativeObjCesium.polyline,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){De.parseOption(this._selectedHighlight),me.merge(this._nativeObjCesium.polyline,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.positions,De.parseOption(e),me.merge(this._style,e),me.merge(this._nativeObjCesium.polyline,e),this.setLabel(e),this.setBillboard(e),this.originOption=Cesium.clone(this._style,!1),this):this}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polyline&&((t=new i(He.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(n)))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(qe);qe.registerType("polyline");const wn=bn;function Pn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function On(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var xn=function(e){c(i,e);var t=On(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._positions=De.parsePositions(e),o._shape=r||[],o._nativeObjCesium=new Cesium.Entity({polylineVolume:{}}),o._state=Ae.INITIALIZED,o.positions=o._positions,o}return a(i,[{key:"type",get:function(){return qe.getGraphicType("polyline_volume")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=De.parsePositions(e),this._nativeObjCesium.polylineVolume.positions=He.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"shape",get:function(){return this._shape},set:function(e){return this._shape=e||[],this._nativeObjCesium.polylineVolume.shape=this._shape,this}},{key:"_mountedHook",value:function(){this.positions=this._positions,this.shape=this._shape}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.positions&&delete e.shape,me.merge(this._style,e),me.merge(this._nativeObjCesium.polylineVolume,e)),this}}],[{key:"fromEntity",value:function(e,t){var n=void 0,r=Cesium.JulianDate.now();e.polyline&&((n=new i(He.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r)),t)).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Pn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Pn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(r)));return n}}]),i}(qe);qe.registerType("polyline_volume");const En=xn;function An(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Tn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?An(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):An(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function kn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Mn=function(e){c(i,e);var t=kn(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=De.parsePositions(e),r._nativeObjCesium=new Cesium.Entity({rectangle:{}}),r._state=Ae.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("rectangle")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=De.parsePositions(e),this._nativeObjCesium.rectangle.coordinates=Cesium.Rectangle.fromCartesianArray(He.transformWGS84ArrayToCartesianArray(this._positions)),this}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setLabel",value:function(e,t){return this._nativeObjCesium.position=Cesium.Cartographic.toCartesian(Cesium.Rectangle.center(this._nativeObjCesium.rectangle,new Cesium.Cartographic)),this._nativeObjCesium.label=Tn(Tn({},t),{},{text:e}),this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.positions,me.merge(this._style,e),me.merge(this._nativeObjCesium.rectangle,e)),this}}]),i}(qe);qe.registerType("rectangle");const Rn=Mn;function Sn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ln=function(e){c(i,e);var t=jn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._nativeObjCesium=new Cesium.Entity({wall:{}}),r._positions=De.parsePositions(e),r.positions=r._positions,console.log(r._style),console.log(me.merge),me.merge(r._style,o),r.setOptions(o),r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return qe.getGraphicType("wall")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=De.parsePositions(e),this._nativeObjCesium.wall.positions=He.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(me.merge(this._style,e),me.merge(this._nativeObjCesium.wall,e),this.setLabel(this._style),this.originOption=Cesium.clone(this._style)),this}},{key:"highlight",value:function(){De.parseOption(this._highlight),me.merge(this._nativeObjCesium.wall,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){De.parseOption(this._selectedHighlight),me.merge(this._nativeObjCesium.wall,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polyline&&((t=new i(He.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(n)))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Sn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Sn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(qe);qe.registerType("wall");const In=Ln;var Dn=function(){function e(t){var i,r;n(this,e),this.syncMode=null!==(i=t.syncMode)&&void 0!==i?i:1,this.autoSyncMode=null===(r=t.autoSyncMode)||void 0===r||r,this.viewer=t.viewer,this.worldCoorOriginCesium=t.worldCoorOriginCesium,this.threeCamera=t.threeCamera,this.Vector3=t.Vector3,this.Matrix4=t.Matrix4,this.Group=t.Group,this.threeRenderer=t.threeRenderer,this.threeScene=t.threeScene,this.threeControls=t.threeControls,this.threeExtent=t.threeExtent||{minLon:116.3895764,minLat:39.9395754,maxLon:116.4019169,maxLat:39.9469879,maxHeight:2e4},this.threeContainer=t.threeContainer,this.cesiumContainer=t.cesiumContainer,this.init()}return a(e,[{key:"setWorldCoorOriginCesium",value:function(e){this.worldCoorOriginCesium=e}},{key:"setThreeExtent",value:function(e){this.threeExtent=e}},{key:"init",value:function(){var e=this;this.viewer.scene.postUpdate.addEventListener((function(){1==e.syncMode&&e.updateCamera()})),this.autoSyncMode&&this.initMouseEvent()}},{key:"initMouseEvent",value:function(){if(this.autoSyncMode){1===this.syncMode?(this.threeContainer.style.pointerEvents="none",this.viewer.scene.screenSpaceCameraController.enableInputs=!0):(this.threeContainer.style.pointerEvents="auto",this.viewer.scene.screenSpaceCameraController.enableInputs=!1);var e=this;document.addEventListener("mousemove",(function(t){if(e.autoSyncMode&&e.threeCamera){var i=t.pageX,n=t.pageY,r=new Cesium.Cartesian2(i,n),o=He.transformWindowToWGS84(r,window.viewer),s=e.viewer.scene.camera.positionCartographic.height;if(o.lng>e.threeExtent.minLon&&o.lng<e.threeExtent.maxLon&&o.lat>e.threeExtent.minLat&&o.lat<e.threeExtent.maxLat&&s<e.threeExtent.maxHeight){if(e.threeContainer.style.pointerEvents="auto",e.viewer.scene.screenSpaceCameraController.enableInputs=!1,2===e.syncMode)return;e.threeCamera&&(e.syncMode=2)}else{if(e.threeContainer.style.pointerEvents="none",e.viewer.scene.screenSpaceCameraController.enableInputs=!0,1===e.syncMode)return;e.threeCamera&&(e.syncMode=1)}}}))}}},{key:"resetOrigin",value:function(e){this.threeExtent=e.threeExtent,this.worldCoorOriginCesium=e.worldCoorOriginCesium}},{key:"getPointOnRay",value:function(e,t,i){return{x:e.x+t.x*i,y:e.y+t.y*i,z:e.z+t.z*i}}},{key:"localThreeToWorldPosCesium",value:function(e,t,i){var n=window.Cesium.Transforms.eastNorthUpToFixedFrame(this.worldCoorOriginCesium),r=new window.Cesium.Cartesian3(e,-i,t);return window.Cesium.Matrix4.multiplyByPoint(n,r,new window.Cesium.Cartesian3)}},{key:"worldCesiumTolocalThree",value:function(e){var t=window.Cesium.Transforms.eastNorthUpToFixedFrame(this.worldCoorOriginCesium),i=window.Cesium.Matrix4.inverseTransformation(t,new window.Cesium.Matrix4),n=window.Cesium.Matrix4.multiplyByPoint(i,e,new window.Cesium.Cartesian3);return new Cesium.Cartesian3(n.x,n.z,-n.y)}},{key:"getCesiumDirectionFromThree",value:function(e,t,i){var n=this.getPointOnRay(t,i,1),r=this.localThreeToWorldPosCesium(n.x,n.y,n.z),o=new Cesium.Cartesian3;return Cesium.Cartesian3.subtract(r,e,o),Cesium.Cartesian3.normalize(o,o),o}},{key:"getThreeDirectionFromCesium",value:function(e,t,i){var n=this.getPointOnRay(t,i,1),r=this.worldCesiumTolocalThree(n),o=new Cesium.Cartesian3;return Cesium.Cartesian3.subtract(r,e,o),Cesium.Cartesian3.normalize(o,o),o}},{key:"frustumFromThreeToCesium",value:function(){if(!this.threeCamera)return null;var e={},t=Cesium.Math.toRadians(this.threeCamera.fov),i=2*Math.atan(Math.tan(.5*t)*this.threeCamera.aspect);return this.threeCamera.aspect<=1&&(i=t),e.near=this.threeCamera.near,e.far=this.threeCamera.far,e.aspectRatio=this.threeCamera.aspect,e.fov=i,e}},{key:"frustumFromCesiumToThree",value:function(){var e=this.viewer.camera;if(!e)return null;var t={};return t.fov=window.Cesium.Math.toDegrees(e.frustum.fovy),t.near=e.frustum.near,t.far=e.frustum.far,t.aspect=e.frustum.aspectRatio,t}},{key:"syncCesiumCameraToThree",value:function(){viewer.nativeObjCesium.render(),this.threeRenderer.setPixelRatio(window.devicePixelRatio),this.threeControls.enabled=!1;var e=this.viewer.scene.camera,t=e.positionWC,i=e.directionWC,n=e.upWC,r=this.worldCesiumTolocalThree(t),o=this.getThreeDirectionFromCesium(r,t,i),s=this.getThreeDirectionFromCesium(r,t,n),a=this.frustumFromCesiumToThree();this.threeCamera.aspect=a.aspect,this.threeCamera.near=a.near,this.threeCamera.far=a.far,this.threeCamera.fov=a.fov,this.threeCamera.position.x=r.x,this.threeCamera.position.y=r.y,this.threeCamera.position.z=r.z,window.cameraRigY||(window.cameraRigY=new this.Group,cameraRigY.add(this.threeCamera),this.threeScene.add(cameraRigY)),this.viewer.scene.camera.positionCartographic.height>5e4?(this.threeCamera.up.x=s.x,this.threeCamera.up.y=s.y,this.threeCamera.up.z=s.z):(this.threeCamera.up.x=0,this.threeCamera.up.y=1,this.threeCamera.up.z=0);var l=new this.Vector3;this.threeCamera.getWorldPosition(l);var u=this.getControsTarget(l,o);if(0==o.y&&(o.y=1),-l.y/o.y<0){var c=this.getPointOnRay(t,i,1);u=this.worldCesiumTolocalThree(c)}u&&this.threeControls.target.copy(u),this.threeControls.enabled=!0,this.threeCamera.aspect=this.threeContainer.clientWidth/this.threeContainer.clientHeight,this.threeCamera.updateProjectionMatrix(),this.threeRenderer.setSize(this.threeContainer.clientWidth,this.threeContainer.clientHeight),this.threeControls.update()}},{key:"syncThreeCameraToCesium",value:function(){window.cameraRigY||(window.cameraRigY=new this.Group,cameraRigY.add(this.threeCamera),this.threeScene.add(cameraRigY));var e=new this.Vector3,t=new this.Vector3;this.threeCamera.getWorldDirection(e),this.threeCamera.getWorldPosition(t);var i=(new this.Matrix4).makeRotationFromQuaternion(this.threeCamera.quaternion),n=new this.Vector3(0,1,0).clone().applyMatrix4(i),r=this.localThreeToWorldPosCesium(t.x,t.y,t.z),o=this.getCesiumDirectionFromThree(r,t,e),s=this.getCesiumDirectionFromThree(r,t,n),a=this.frustumFromThreeToCesium();this.viewer.scene.camera.frustum.aspectRatio=a.aspectRatio,this.viewer.scene.camera.frustum.near=a.near,this.viewer.scene.camera.frustum.far=a.far,this.viewer.scene.camera.frustum.fov=a.fov,this.viewer.scene.camera.setView({destination:r,orientation:{direction:o,up:s}}),this.viewer.nativeObjCesium.render()}},{key:"getControsTarget",value:function(e,t){0==t.y&&(t.y=1);var i=-e.y/t.y,n=(new this.Vector3).copy(t).multiplyScalar(i).add(e);return n.y=0,n}},{key:"calculateAnglesWithAxes",value:function(e){var t=new this.Vector3(e.x,e.y,e.z),i=new this.Vector3(1,0,0),n=new this.Vector3(0,1,0),r=new this.Vector3(0,0,1),o=t.dot(i)/1,s=t.dot(n)/1,a=t.dot(r)/1;return{thetaX:Math.acos(o),thetaY:Math.acos(s),thetaZ:Math.acos(a)}}},{key:"updateControls",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e||(e=new this.Vector3,this.threeCamera.getWorldDirection(e));var t=new this.Vector3;this.threeCamera.getWorldPosition(t);var i=this.getControsTarget(t,e);i&&this.threeControls.target.copy(i)}},{key:"updateCamera",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-88,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:90,i=Cesium.Math.toDegrees(this.viewer.camera.pitch);if(!(i>e&&i<t)){this.viewer.scene.screenSpaceCameraController.enableTilt=!1;var n=this.viewer.camera.position,r=this.viewer.camera.heading,o=this.viewer.camera.roll;i<e&&(i=e),i>t&&(i=t),i=Cesium.Math.toRadians(i),this.viewer.camera.setView({destination:n,orientation:{heading:r,pitch:i,roll:o}}),viewer.scene.screenSpaceCameraController.enableTilt=!0}}}]),e}();const Bn=Dn;function Gn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Hn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Gn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Nn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Fn=function(e){c(f,e);var t,i,r,o,s,l,u,h=Nn(f);function f(e){var t;return n(this,f),(t=h.call(this,X))._viewer=e,t._selected=void 0,t._mouseInfo=void 0,t._preTime=Cesium.JulianDate.now(),t._registerEvent(),t._addDefaultEvent(),t}return a(f,[{key:"_registerEvent",value:function(){var e=this,t=new Cesium.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(Cesium.ScreenSpaceEventType).forEach((function(i){var n=Cesium.ScreenSpaceEventType[i];e._cache[n]=new Cesium.Event,t.setInputAction((function(t){e._cache[n].raiseEvent(t)}),n)}))}},{key:"_addDefaultEvent",value:function(){this.addEventListener(this._types.CLICK,this._clickHandler,this),this.addEventListener(this._types.RIGHT_CLICK,this._rightClickHandler,this),this.addEventListener(this._types.MOUSE_MOVE,this._mouseMoveHandler,this)}},{key:"_getMouseInfo",value:(u=U(q().mark((function e(t,i){var n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mouseInfo||!this._mouseInfo.target||i==X.MOUSE_MOVE){e.next=2;break}return e.abrupt("return",this._mouseInfo);case 2:if(r=Cesium.JulianDate.now(),o=Cesium.JulianDate.secondsDifference(r,this._preTime),!((s=this._viewer.mouseSensitivity||(null===(n=this._viewer.wrap)||void 0===n?void 0:n.mouseSensitivity))&&o<s&&this._mouseInfo)){e.next=7;break}return e.abrupt("return",this._mouseInfo);case 7:if(this._preTime=r,a=this._viewer.scene,l=3,window.ANOVGIS&&window.ANOVGIS.globalConfig.pickSize&&(l=window.ANOVGIS.globalConfig.pickSize),(u=a.pick(t,l,l))||i==X.MOUSE_MOVE){e.next=21;break}if(c=this._viewer.camera.getPickRay(t),h=this._viewer.imageryLayers.pickImageryLayerFeatures(c,this._viewer.scene),Cesium.defined(h)){e.next=19;break}console.log("No features picked."),e.next=21;break;case 19:return e.next=21,Promise.resolve(h).then((function(e){0!=e.length&&(u=e[0],f=He.transformCartographicToCartesian(u.position))}));case 21:return f=void 0,u&&u.id instanceof Cesium.Entity&&(p=this._viewer.getLayers().filter((function(e){return e.layerId===u.id.layerId}))[0])&&p.getGraphic&&((m=p.getGraphic(u.id.graphicId))instanceof mn||m instanceof ji||m instanceof sn)&&(f=u.id.position._value),f||(f=xe.pickPosition(this._viewer,t)),d=void 0,v=void 0,y=void 0,f&&(g=Cesium.Ellipsoid.WGS84.cartesianToCartographic(f))&&(v={lng:Cesium.Math.toDegrees(g.longitude),lat:Cesium.Math.toDegrees(g.latitude),alt:g.height}),a.mode!==Cesium.SceneMode.SCENE3D||this._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider?d=a.camera.pickEllipsoid(t,Cesium.Ellipsoid.WGS84):(_=a.camera.getPickRay(t),d=a.globe.pick(_,a)),d&&(C=Cesium.Ellipsoid.WGS84.cartesianToCartographic(d))&&(y={lng:Cesium.Math.toDegrees(C.longitude),lat:Cesium.Math.toDegrees(C.latitude),alt:C.height}),b={target:u,windowPosition:t,position:f,wgs84Position:v,surfacePosition:d,wgs84SurfacePosition:y},e.abrupt("return",b);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"_getDrillInfos",value:function(e){var t=this,i=[],n=this._viewer.scene.drillPick(e);return n&&n.length&&n.forEach((function(e){i.push(t._getTargetInfo(e))})),i}},{key:"_getGraphicId",value:function(e){var t=void 0;if(e)return e.id instanceof Cesium.Entity?t=e.id.graphicId:e instanceof Cesium.Cesium3DTileFeature?t=e.tileset.graphicId:(e.primitive instanceof Cesium.Cesium3DTileset||e.primitive)&&(t=e.primitive.graphicId),t}},{key:"_getTargetInfo",value:function(e){var t=void 0,i=void 0,n=void 0,r=void 0;if(e&&e.id instanceof Cesium.Entity)(i=this._viewer.getLayers().filter((function(t){return t.layerId===e.id.layerId}))[0])&&i.getGraphic&&(t=i.getGraphic(e.id.graphicId));else if(e&&e instanceof Cesium.Cesium3DTileFeature){if(i=this._viewer.getLayers().filter((function(t){return t.layerId===e.tileset.layerId}))[0],n=e,i&&i.getGraphic)if(t=i.getGraphic(e.tileset.graphicId),n&&n.getPropertyNames)n.getPropertyNames().forEach((function(e){t.attr[e]=n.getProperty(e)}))}else e&&e.primitive instanceof Cesium.Cesium3DTileset?(i=this._viewer.getLayers().filter((function(t){return t.layerId===e.primitive.layerId}))[0])&&i.getGraphic&&(t=i.getGraphic(e.primitive.graphicId)):e&&e.primitive?((i=this._viewer.getLayers().filter((function(t){return t.layerId===e.primitive.layerId}))[0])&&i.getGraphic&&(t=i.getGraphic(e.primitive.graphicId)),(e.primitive instanceof Cesium.Label||e.primitive instanceof Cesium.Billboard)&&(r=e.primitive)):e instanceof Cesium.ImageryLayerFeatureInfo&&(i=e.imageryLayer,n=e);return{layer:i,graphic:t,feature:n,clusterEntity:r,instanceId:e?e.instanceId:null}}},{key:"_raiseEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,n=this._getTargetInfo(t.target),r=n?n.graphic:null,o=n?n.layer:null;(r&&r.graphicEvent&&((i=r.graphicEvent.getEvent(e))&&i.numberOfListeners>0&&i.raiseEvent(Hn(Hn({},n),t)),i=void 0),i&&0!==i.numberOfListeners||!o||!o.layerEvent||(i=o.layerEvent.getEvent(e)),(!i||0===i.numberOfListeners)&&o&&o.imageryProvider&&o.imageryProvider.layerEvent&&(i=o.imageryProvider.layerEvent.getEvent(e)),i&&0!==i.numberOfListeners||!this._viewer.viewerEvent||(i=this._viewer.viewerEvent.getEvent(e)),i&&i.numberOfListeners>0&&i.raiseEvent(Hn(Hn({},n),t)),r&&r.allowDrillPicking)&&this._getDrillInfos(t.windowPosition).forEach((function(n){var o=n.graphic,s=n.layer;o.graphicId!==r.graphicId&&o.graphicEvent&&((i=o.graphicEvent.getEvent(e))&&0!==i.numberOfListeners||!s.layerEvent||(i=s.layerEvent.getEvent(e)),i&&i.numberOfListeners>0&&i.raiseEvent(Hn(Hn({},n),t)))}))}},{key:"_clickHandler",value:(l=U(q().mark((function e(t){var i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.position){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this._getMouseInfo(t.position);case 4:i=e.sent,this._raiseEvent(X.CLICK,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"_dbClickHandler",value:(s=U(q().mark((function e(t){var i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.position){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this._getMouseInfo(t.position);case 4:i=e.sent,this._raiseEvent(X.DB_CLICK,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"_rightClickHandler",value:(o=U(q().mark((function e(t){var i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.position){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this._getMouseInfo(t.position);case 4:i=e.sent,this._raiseEvent(X.RIGHT_CLICK,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_mouseMoveHandler",value:(r=U(q().mark((function e(t){var i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.endPosition){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this._getMouseInfo(t.endPosition,X.MOUSE_MOVE);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:this._viewer.mapInfo&&this._viewer.mapInfo.setPos(i.wgs84Position),this._mouseInfo=i,this._viewer.canvas.style.cursor=i.target||i.pickImageryLayers?"pointer":"default",this._raiseEvent(X.MOUSE_MOVE,i),this._selected&&this._getGraphicId(this._selected.target)===this._getGraphicId(i.target)||(this._raiseEvent(X.MOUSE_OUT,this._selected),this._raiseEvent(X.MOUSE_OVER,i),this._selected=i);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_leftDownHandler",value:(i=U(q().mark((function e(t){var i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.position){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this._getMouseInfo(t.position);case 4:i=e.sent,this._raiseEvent(X.LEFT_DOWN,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_leftUpHandler",value:function(e){this._raiseEvent(X.LEFT_UP,{movement:e})}},{key:"_rightDownHandler",value:(t=U(q().mark((function e(t){var i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.position){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this._getMouseInfo(t.position);case 4:i=e.sent,this._raiseEvent(X.RIGHT_DOWN,i);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_rightUpHandler",value:function(e){this._raiseEvent(X.RIGHT_UP,{movement:e})}},{key:"_mouseWheelHandler",value:function(e){this._raiseEvent(X.WHEEL,{movement:e})}}]),f}(le);const zn=Fn;function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Un=function(e){c(i,e);var t=Wn(i);function i(){var e;return n(this,i),(e=t.call(this,J))._registerEvent(),e}return a(i)}(le);function Vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const qn=function(e){c(i,e);var t=Vn(i);function i(e){var r;return n(this,i),(r=t.call(this,$))._camera=e.camera,r._scene=e.scene,r._clock=e.clock,r}return a(i,[{key:"addEventListener",value:function(e,t,i){var n=void 0;switch(e){case $.CAMERA_MOVE_END:n=this._camera.moveEnd.addEventListener(t,i||this);break;case $.CAMERA_CHANGED:n=this._camera.changed.addEventListener(t,i||this);break;case $.PRE_UPDATE:n=this._scene.preUpdate.addEventListener(t,i||this);break;case $.POST_UPDATE:n=this._scene.postUpdate.addEventListener(t,i||this);break;case $.PRE_RENDER:n=this._scene.preRender.addEventListener(t,i||this);break;case $.POST_RENDER:n=this._scene.postRender.addEventListener(t,i||this);break;case $.MORPH_COMPLETE:n=this._scene.morphComplete.addEventListener(t,i||this);break;case $.CLOCK_TICK:n=this._clock.onTick.addEventListener(t,i||this);break;case $.RENDER_ERROR:n=this._scene.renderError.addEventListener(t,i||this)}return n}},{key:"removeEventListener",value:function(e,t,i){var n=!1;switch(e){case $.CAMERA_MOVE_END:n=this._camera.moveEnd.removeEventListener(t,i||this);break;case $.CAMERA_CHANGED:n=this._camera.changed.removeEventListener(t,i||this);break;case $.PRE_UPDATE:n=this._scene.preUpdate.removeEventListener(t,i||this);break;case $.POST_UPDATE:n=this._scene.postUpdate.removeEventListener(t,i||this);break;case $.PRE_RENDER:n=this._scene.preRender.removeEventListener(t,i||this);break;case $.POST_RENDER:n=this._scene.postRender.removeEventListener(t,i||this);break;case $.MORPH_COMPLETE:n=this._scene.morphComplete.removeEventListener(t,i||this);break;case $.CLOCK_TICK:n=this._clock.onTick.removeEventListener(t,i||this);break;case $.RENDER_ERROR:n=this._scene.renderError.removeEventListener(t,i||this)}return n}}]),i}(le);function Zn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Yn=function(e){c(i,e);var t=Zn(i);function i(){var e;return n(this,i),(e=t.call(this,te))._registerEvent(),e}return a(i)}(le);function Kn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Qn=function(e){c(i,e);var t=Kn(i);function i(){var e;return n(this,i),(e=t.call(this,ie))._registerEvent(),e}return a(i)}(le);function Xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Jn=function(e){c(i,e);var t=Xn(i);function i(){var e;return n(this,i),(e=t.call(this,ee))._registerEvent(),e}return a(i)}(le);function $n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const er=function(e){c(i,e);var t=$n(i);function i(){var e;return n(this,i),(e=t.call(this,ne))._registerEvent(),e}return a(i)}(le);function tr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const ir=function(e){c(i,e);var t=tr(i);function i(){var e;return n(this,i),(e=t.call(this,re))._registerEvent(),e}return a(i)}(le);function nr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const rr=function(e){c(i,e);var t=nr(i);function i(){var e;return n(this,i),(e=t.call(this,oe))._registerEvent(),e}return a(i)}(le);function or(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function sr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?or(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):or(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var ar={vrButton:!0,animation:!1,baseLayerPicker:!1,baseLayer:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!1,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,navigationInstructionsInitiallyVisible:!1,creditContainer:void 0,shouldAnimate:!0};const lr=function(){function e(){n(this,e)}return a(e,null,[{key:"init",value:function(t){var i,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||"string"==typeof t&&!document.getElementById(t))throw new Error("Viewer:必须传入放置三维球的dom id");o.changeDeaultView=null===(i=o.changeDeaultView)||void 0===i||i,o.changeDeaultView&&e.setDeaultView(),o.changeDefaultAccessToken=null===(n=o.changeDefaultAccessToken)||void 0===n||n,o.changeDefaultAccessToken&&e.setDefaultAccessToken();var s=new Cesium.Viewer(t,sr(sr({},ar),o));return s._cesiumWidget._creditContainer.style.display="none",o.noNight=null===(r=o.noNight)||void 0===r||r,o.noNight&&e.setNoNight(!0),s}},{key:"setDeaultView",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:78,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:23,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:140,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:60;Cesium.Camera.DEFAULT_VIEW_RECTANGLE=Cesium.Rectangle.fromDegrees(e,t,i,n)}},{key:"settianditu_key",value:function(e){return this._tianditu_key=e}},{key:"setDefaultAccessToken",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Cesium.Ion.defaultAccessToken=e}},{key:"setNoNight",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];viewer.scene.light=e?new Cesium.DirectionalLight({direction:new Cesium.Cartesian3(.35492591601301104,-.8909182691839401,-.2833588392420772)}):new Cesium.SunLight}}]),e}();const ur={};const cr=function(){function e(t){n(this,e),t=t||{},this._id=me.uuid(),this.layerName=t.layerName||me.uuid(),this.businessID=t.id||me.uuid(),this._nativeObjCesium=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},De.parseOption(t),this._layerEvent=new Qn,this._layerEvent.addEventListener(ie.ADD,this._onAdd,this),this._layerEvent.addEventListener(ie.REMOVE,this._onRemove,this),this._popup=void 0}return a(e,[{key:"boundingSphere",get:function(){return null}},{key:"layerId",get:function(){return this._id}},{key:"id",get:function(){return this.businessID}},{key:"nativeObjCesium",get:function(){return this._nativeObjCesium}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._nativeObjCesium&&(this._nativeObjCesium.show=this._show)}},{key:"layerEvent",get:function(){return this._layerEvent}},{key:"attr",get:function(){return this._attr},set:function(e){this._attr=e}},{key:"state",get:function(){return this._state}},{key:"_addedHook",value:function(){}},{key:"_removedHook",value:function(){this.clear()}},{key:"_onAdd",value:function(e){this._viewer=e,this._nativeObjCesium&&(this._nativeObjCesium instanceof Cesium.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._nativeObjCesium):this._viewer.scene.primitives.add(this._nativeObjCesium):this._viewer.dataSources.add(this._nativeObjCesium),this._addedHook&&this._addedHook(),this._state=Ae.ADDED)}},{key:"_onRemove",value:function(){this._nativeObjCesium&&this._viewer&&(this._cache={},this._nativeObjCesium instanceof Cesium.PrimitiveCollection?(this._nativeObjCesium.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._nativeObjCesium):this._viewer.scene.primitives.remove(this._nativeObjCesium)):this._nativeObjCesium.then?(this._nativeObjCesium.then((function(e){e.entities.removeAll()})),this._viewer.dataSources.remove(this._nativeObjCesium)):(this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._viewer.dataSources.remove(this._nativeObjCesium)),this._removedHook&&this._removedHook(),this._state=Ae.REMOVED)}},{key:"_addGraphic",value:function(e){this._cache.hasOwnProperty(e.graphicId)||(this._cache[e.graphicId]=e,this._nativeObjCesium&&e.raiseEvent(ee.ADD,this),this._state===Ae.CLEARED&&(this._state=Ae.ADDED))}},{key:"_removeGraphic",value:function(e){this._cache.hasOwnProperty(e.graphicId)&&(this._nativeObjCesium&&e.raiseEvent(ee.REMOVE,this),delete this._cache[e.graphicId])}},{key:"addGraphic",value:function(e){return this._addGraphic(e),this}},{key:"addGraphics",value:function(e){var t=this;return Array.isArray(e)&&e.forEach((function(e){t._addGraphic(e)})),this}},{key:"removeGraphic",value:function(e){return this._removeGraphic(e),this}},{key:"getGraphic",value:function(e){return this._cache[e]||void 0}},{key:"getGraphicById",value:function(e){var t=this,i=void 0;return Object.keys(this._cache).forEach((function(n){t._cache[n].id===e&&(i=t._cache[n])})),i}},{key:"getGraphicsByAttr",value:function(e,t){var i=[];return this.eachGraphic((function(n){n.attr[e]===t&&i.push(n)}),this),i}},{key:"eachGraphic",value:function(e,t){var i=this;return Object.keys(this._cache).forEach((function(n){e&&e.call(t||i,i._cache[n])})),this}},{key:"getGraphics",value:function(){var e=this,t=[];return Object.keys(this._cache).forEach((function(i){t.push(e._cache[i])})),t}},{key:"clear",value:function(){}},{key:"remove",value:function(){this._viewer&&this._viewer.removeLayer(this)}},{key:"addTo",value:function(e){return e.addLayer&&e.addLayer(this),this}},{key:"setOptions",value:function(e){}},{key:"addEventListener",value:function(e,t,i){return this._layerEvent.addEventListener(e,t,i||this),this}},{key:"removeEventListener",value:function(e,t,i){return this._layerEvent.removeEventListener(e,t,i||this),this}},{key:"raiseEvent",value:function(e,t){return this._layerEvent.raiseEvent(e,t),this}},{key:"bindPopup",value:function(e){var t=this;this._popup=new ze(e),this._popup.install(this),this.eachGraphic((function(e){e.raiseEvent(ee.BIND_POPUP,t)}))}},{key:"bindTooltip",value:function(e){var t=this;new Ve(e).install(this),this.addEventListener(X.MOUSE_OUT,(function(e){t.tooltip.hide()})),this.addEventListener(X.CLICK,(function(e){t.tooltip.hide()}))}}],[{key:"registerType",value:function(e){e&&(ur[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}},{key:"getLayerType",value:function(e){return ur[e.toLocaleUpperCase()]||void 0}}]),e}();function hr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function fr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):hr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const pr=function(){function e(t){n(this,e),this._viewer=t,this._options={}}return a(e,[{key:"_setViewerOption",value:function(){var e,t,i,n,r;Cesium.defined(null===(e=this._options)||void 0===e?void 0:e.shadows)&&(this._viewer.nativeObjCesium.shadows=null!==(i=null===(n=this._options)||void 0===n?void 0:n.shadows)&&void 0!==i&&i);Cesium.defined(null===(t=this._options)||void 0===t?void 0:t.resolutionScale)&&(this._viewer.nativeObjCesium.resolutionScale=(null===(r=this._options)||void 0===r?void 0:r.resolutionScale)||1);return this}},{key:"_setCanvasOption",value:function(){return Cesium.defined(this._options.tabIndex)&&this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}},{key:"_setSceneOption",value:function(){var e,t,i,n,r=this._viewer.scene;Cesium.defined(this._options.showAtmosphere)&&(r.skyAtmosphere.show=null===(e=this._options.showAtmosphere)||void 0===e||e);Cesium.defined(this._options.showSun)&&(r.sun.show=null===(t=this._options.showSun)||void 0===t||t);Cesium.defined(this._options.showMoon)&&(r.moon.show=null===(i=this._options.showMoon)||void 0===i||i);Cesium.defined(this._options.enableFxaa)&&(r.postProcessStages.fxaa.enabled=null!==(n=this._options.enableFxaa)&&void 0!==n&&n);return Cesium.defined(this._options.shadowMap)&&me.merge(r.shadowMap,this._options.shadowMap),r.msaaSupported&&Cesium.defined(this._options.msaaSamples)&&(r.msaaSamples=+this._options.msaaSamples||1),this}},{key:"_setSkyBoxOption",value:function(){if(!this._options.skyBox)return this;var e=this._options.skyBox;if(e instanceof Cesium.SkyBox)this._viewer.scene.skyBox=e;else{var t,i=this._viewer.scene.skyBox;i.show=null===(t=e.show)||void 0===t||t,e.offsetAngle&&(i.offsetAngle=e.offsetAngle),null!=e&&e.sources&&(i.sources=e.sources)}return this}},{key:"_setGlobeOption",value:function(){var e,t,i,n,r,o,s,a,l,u,c,h;if(!this._options.globe)return this;var f=this._viewer.scene.globe,p=this._options.globe;return me.merge(f,{show:null===(e=null==p?void 0:p.show)||void 0===e||e,showGroundAtmosphere:null===(t=null==p?void 0:p.showGroundAtmosphere)||void 0===t||t,enableLighting:null===(i=null==p?void 0:p.enableLighting)||void 0===i||i,depthTestAgainstTerrain:null!==(n=null==p?void 0:p.depthTestAgainstTerrain)&&void 0!==n&&n,tileCacheSize:+(null==p?void 0:p.tileCacheSize)||100,preloadSiblings:null!==(r=null==p?void 0:p.preloadSiblings)&&void 0!==r&&r,showSkirts:null===(o=null==p?void 0:p.showSkirts)||void 0===o||o,baseColor:(null==p?void 0:p.baseColor)||new Cesium.Color(0,0,.5,1),terrainExaggeration:(null==p?void 0:p.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(null==p?void 0:p.terrainExaggerationRelativeHeight)||0}),me.merge(f.translucency,{enabled:null!==(s=null==p||null===(a=p.translucency)||void 0===a?void 0:a.enabled)&&void 0!==s&&s,backFaceAlpha:+(null==p||null===(l=p.translucency)||void 0===l?void 0:l.backFaceAlpha)||1,backFaceAlphaByDistance:null==p||null===(u=p.translucency)||void 0===u?void 0:u.backFaceAlphaByDistance,frontFaceAlpha:+(null==p||null===(c=p.translucency)||void 0===c?void 0:c.frontFaceAlpha)||1,frontFaceAlphaByDistance:null==p||null===(h=p.translucency)||void 0===h?void 0:h.frontFaceAlphaByDistance}),this}},{key:"_setCameraController",value:function(){var e,t,i,n,r,o,s;if(null===(e=this._options)||void 0===e||!e.cameraController)return this;var a=this._viewer.scene.screenSpaceCameraController,l=this._options.cameraController;return me.merge(a,{enableInputs:null===(t=null==l?void 0:l.enableInputs)||void 0===t||t,enableRotate:null===(i=null==l?void 0:l.enableRotate)||void 0===i||i,enableTilt:null===(n=null==l?void 0:l.enableTilt)||void 0===n||n,enableTranslate:null===(r=null==l?void 0:l.enableTranslate)||void 0===r||r,enableZoom:null===(o=null==l?void 0:l.enableZoom)||void 0===o||o,enableCollisionDetection:null===(s=null==l?void 0:l.enableCollisionDetection)||void 0===s||s,minimumZoomDistance:+(null==l?void 0:l.minimumZoomDistance)||1,maximumZoomDistance:+(null==l?void 0:l.maximumZoomDistance)||40489014}),this}},{key:"setOptions",value:function(e){return 0===Object.keys(e).length||(this._options=fr(fr({},this._options),e),this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController()),this}}]),e}();var mr=i(506);function dr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}const vr=function(){function e(t,i,r){n(this,e),this._url=t||"https://api.tianditu.gov.cn/v2/search",this.apiKey=i||"b832b9764939cbb0919148c548b669ba",this._params=null!=r?r:{}}return a(e,[{key:"geocode",value:function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):dr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({keyWord:e,level:11,mapBound:"-180,-90,180,90",queryType:4,start:0,count:10},this._params);return new Cesium.Resource({url:this._url,queryParameters:{format:"json",postStr:JSON.stringify(t),tk:this.apiKey,type:"query"}}).fetchJson().then((function(e){if(!e.count||0==e.count)return[];var t=e.suggests,i=[];return t.forEach((function(e){i.push({displayName:e.name,destination:e.gbCode+""})})),i}))}}]),e}();function yr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}const gr=function(){function e(t,i,r){n(this,e),this._url=t,this.apiKey=i,this._params=null!=r?r:{}}return a(e,[{key:"geocode",value:function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?yr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):yr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({keyword:e,pageIndex:1,pageSize:10,returnGeometry:!0,searchField:"NAME",f:"json"},this._params);return new Cesium.Resource({url:this._url.replace("token",this.apiKey),queryParameters:t}).fetchJson().then((function(e){if(!e.featuresTotal||0==e.featuresTotal)return[];var t=e.features,i=[];return t.forEach((function(e){i.push({displayName:e.NAME,destination:e.coor})})),i}))}}]),e}();const _r=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),!t.viewer)throw new Error("必须传入viewer");this.viewer=t.viewer,this.flyComplete=new Cesium.Event,this._init(t)}return a(e,[{key:"_init",value:function(e){}},{key:"_blurInput",value:function(){(document.querySelector(".cesium-geocoder-input").blur(),window.getSelection)?window.getSelection().removeAllRanges():document.selection&&document.selection.empty&&document.selection.empty()}},{key:"_clearInput",value:function(){document.querySelector(".cesium-geocoder-input").value=""}},{key:"_getContainer",value:function(e){var t=document.createElement("div");return t.setAttribute("class","cesium-viewer-geocoderContainer"),"string"==typeof e&&(e=document.getElementById(e)),e.appendChild(t),t}},{key:"tanslate",value:function(){for(var e=document.getElementsByClassName("cesium-geocoder-input"),t=0;t<e.length;t++)e[t].setAttribute("placeholder","请输入地名...")}}]),e}();const Cr=function(){function e(t){n(this,e),this._presetPois=t.presetPois||[],this._presetLength=t.presetLength||4}return a(e,[{key:"setPresetPois",value:function(e){this._presetPois=e}},{key:"geocode",value:function(e){var t=[];if(e.length>=this._presetLength)for(var i=0;i<this._presetPois.length;i++){var n=this._presetPois[i];n.name.trim().startsWith(e)&&t.push({displayName:n.name,destination:{type:"preset",id:n.id,lon:n.lon,lat:n.lat}})}return new Promise((function(e,i){e(t)})).then((function(e){return e}))}}]),e}();function br(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function wr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?br(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):br(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Or=function(e){c(i,e);var t=Pr(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"_init",value:function(e){var t,i=e.url||"https://api.tianditu.gov.cn/v2/search",n=e.apiKey||"b832b9764939cbb0919148c548b669ba";this._scaleRatio=e.scaleRatio||1,this._params=null!==(t=e.params)&&void 0!==t?t:{};var r=new vr(i,n,this._params),o=new Cr(e);this._tinadituService=r,this._staticService=o;var s=this._getContainer(e.container),a=new Cesium.Geocoder(wr(wr({},e),{},{container:s,geocoderServices:[o,r],destinationFound:this.flyToDestination.bind(this)}));a.viewModel.flyStart=new Cesium.Event,a.viewModel.flyStart.addEventListener(this._blurInput),a.viewModel.complete.addEventListener(this._clearInput),a.viewModel.complete.addEventListener(this._blurInput),this.tanslate()}},{key:"setPresetPois",value:function(e){this._staticService.setPresetPois(e)}},{key:"flyToDestination",value:function(e,t){var i=this;if(e.flyStart.raiseEvent(),"object"!=r(t)){var n=wr({specify:t,keyWord:e._searchText,level:11,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10},this._params),o=new Cesium.Resource({url:this._tinadituService._url,queryParameters:{format:"json",postStr:JSON.stringify(n),tk:this._tinadituService.apiKey,type:"query"}});o.fetchJson().then((function(t){if(t.count&&0!=o.count)if(1==t.resultType){var n=t.pois[0];uo.flyToPosition(i.viewer,n.lonlat,0,-90,1/i._scaleRatio*1500,e._flightDuration,(function(){e._complete.raiseEvent()}))}else{if(3!=t.resultType)return;var r=t.area;if(!r)return;for(var s=r.bound.split(","),a=[],l=0;l<s.length;l++)if((l+1)%2==0){var u=s[l-1]+","+s[l];a.push(u)}if(a.length<2)return;uo.flyToPositions(i.viewer,a,0,-90,1/i._scaleRatio*.8,e._flightDuration,(function(){e._complete.raiseEvent()}))}}))}else uo.flyToPosition(this.viewer,t.lon+","+t.lat,0,-90,1/this._scaleRatio*1500,e._flightDuration,(function(){e._complete.raiseEvent(t),i.flyComplete.raiseEvent(t)}))}}]),i}(_r);function xr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Er(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Tr=function(e){c(i,e);var t=Ar(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"_init",value:function(e){var t,i=e.url||"https://shaanxi.tianditu.gov.cn/ServiceSystem/MapSearch/rest/service/searchPOI/token/SearchServer/0/fuzzy",n=e.apiKey||"04x-Fu5nGOnU7RY7";this._scaleRatio=e.scaleRatio||1,this._params=null!==(t=e.params)&&void 0!==t?t:{};var r=new gr(i,n,this._params),o=this._getContainer(e.container),s=new Cesium.Geocoder(Er(Er({},e),{},{container:o,geocoderServices:[r],destinationFound:this.flyToDestination.bind(this)}));s.viewModel.flyStart=new Cesium.Event,s.viewModel.flyStart.addEventListener(this._blurInput),s.viewModel.complete.addEventListener(this._clearInput),s.viewModel.complete.addEventListener(this._blurInput),this.tanslate()}},{key:"flyToDestination",value:function(e,t){e.flyStart.raiseEvent(),uo.flyToPosition(this.viewer,t,0,-90,1/this._scaleRatio*1500,e._flightDuration,(function(){e._complete.raiseEvent()}))}}]),i}(_r);const kr=Tr;const Mr=Object.freeze({TIANDITU:0,TIANDITU_SHANXI:1,STATIC_PRESET:2});const Rr=function(){function e(){n(this,e)}return a(e,null,[{key:"createGeocoder",value:function(e,t){var i=void 0;switch(e){case Mr.TIANDITU:i=new Or(t);break;case Mr.TIANDITU_SHANXI:i=new kr(t);break;case Mr.STATIC_PRESET:i=new Cr(t)}return i}}]),e}();var Sr=function(){function e(){n(this,e)}return a(e,null,[{key:"_setContent",value:function(t){e.content=e.content.replace("{{__VERSION__}}",t.version).replace("{{__TIME__}}",e._getTime()).replace("{{__AUTHOR__}}",t.author).replace("{{__HOME_PAGE__}}",t.home_page)}},{key:"_getTime",value:function(){var e=new Date,t=e.getMonth()+1;t=t<10?"0"+t:t;var i=e.getDate();return i=i<10?"0"+i:i,"".concat(e.getFullYear(),"-").concat(t,"-").concat(i)}},{key:"consoleOut",value:function(){setTimeout((function(){console.clear(),console.log(e.content,"font-size:20px;padding-left:70px;color:#FF3300;","font-size:14px;padding-left:50px;color:#3366FF;font-style:oblique;","font-size:12px;color:#3366FF;")}),2e3)}}]),e}();function jr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Lr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):jr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Z(Sr,"content","%c \n @anov/gis \n %c \n 三维WebGIS二次开发SDK %c \n\n 版本: {{__VERSION__}}\n 编译日期:{{__TIME__}}\n npm地址: https://www.npmjs.com/package/@anov/gis\n 开发作者: {{__AUTHOR__}}\n 网站主页: {{__HOME_PAGE__}} \n\n\n 微信:drmj2022\n QQ:1621018105\n 手机号:16619716371 \n \n\n 版权声明:\n 任何个人和机构在遵守下列条件的前提下可以永久免费使用:\n 1)程序包完整引用;\n 2)保留此版权信息在控制台输出。\n 我方保留对此版权信息的最终解释权。");var Ir={vrButton:!1,animation:!1,baseLayerPicker:!1,baseLayer:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!1,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,navigationInstructionsInitiallyVisible:!1,creditContainer:void 0,shouldAnimate:!0,showFPS:!1,flyDuration:3,language:"chinese",copyRight:!1,scaleRatio:1,drillPick:!1,DEFAULT_VIEW_FACTOR:1,imageryProviderViewModels:[],minZoom:0,maxZoom:20,minPitch:-90,maxPitch:0,pitch:-90,zoom:void 0,center:void 0},Dr=function(){function e(t){var i,r,o,s,a=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,e),!t||"string"==typeof t&&!document.getElementById(t))throw new Error("Viewer:必须传入放置三维球的dom id");if(l.changeDeaultView=null===(i=l.changeDeaultView)||void 0===i||i,l.defaultView=null!==(r=l.defaultView)&&void 0!==r?r:[78,23,140,60],l.changeDeaultView&&this.setDeaultView(l.defaultView),l.changeDefaultAccessToken=null===(o=l.changeDefaultAccessToken)||void 0===o||o,l.changeDefaultAccessToken&&this.setDefaultAccessToken(),this.initEnvironment(),this._options=Lr(Lr(Lr({},Ir),l),{},{geocoder:!1}),Cesium.Camera.DEFAULT_VIEW_FACTOR=this._options.DEFAULT_VIEW_FACTOR,this._nativeObjCesium=new Cesium.Viewer(t,this._options),this._nativeObjCesium.wrap=this,this._options.showFPS&&(this._nativeObjCesium.scene.debugShowFramesPerSecond=!0),this._initCameraInteraction(),this._scaleRatio=this._options.scaleRatio,new zn(this),this._viewerEvent=new Un,this._sceneEvent=new qn(this),this._viewerOption=new pr(this),this._layerContainer=de.create("div","viewer-layers","string"==typeof t?document.getElementById(t):t),this._layerCache={},this._nativeObjCesium._cesiumWidget._creditContainer.style.display="none",setTimeout((function(){a.createDefaultGeocoderContainer(l.geocoderType)}),0),this._options.baseLayerPicker){var u=l.tiandituKey;To.init(this,u)}this._options.showMapInfo&&new bo(this),"chinese"==this._options.language&&new ko(this).toChinese(),this._options.copyRight&&Sr.consoleOut(),this.drillPick=this.nativeObjCesium.drillPick=this._options.drillPick,this._sensitivity=null!==(s=l.sensitivity)&&void 0!==s?s:.15,this._initView(l)}return a(e,[{key:"_initCameraInteraction",value:function(){var e=this._nativeObjCesium.scene.screenSpaceCameraController;return e.rotateEventTypes=[Cesium.CameraEventType.LEFT_DRAG],e.translateEventTypes=[Cesium.CameraEventType.LEFT_DRAG],e.tiltEventTypes=[Cesium.CameraEventType.RIGHT_DRAG],e.zoomEventTypes=[Cesium.CameraEventType.MIDDLE_DRAG,Cesium.CameraEventType.WHEEL,Cesium.CameraEventType.PINCH],this}},{key:"_initView",value:function(e){var t,i,n,r,o,s=this;if(this._minZoom=null!==(t=e.minZoom)&&void 0!==t?t:0,this._maxZoom=null!==(i=e.maxZoom)&&void 0!==i?i:20,this._minPitch=null!==(n=e.minPitch)&&void 0!==n?n:-90,this._maxPitch=null!==(r=e.maxPitch)&&void 0!==r?r:0,this._defaultPitch=null!==(o=e.pitch)&&void 0!==o?o:-90,this._minPitch>this._maxPitch){var a=[this._maxPitch,this._minPitch];this._minPitch=a[0],this._maxPitch=a[1]}if(this._minZoom>this._maxZoom){var l=[this._maxZoom,this._minZoom];this._minZoom=l[0],this._maxZoom=l[1]}if(this._options.center){var u,c,h=null!==(u=null!==(c=this._options.center.pitch)&&void 0!==c?c:this._options.pitch)&&void 0!==u?u:this._defaultPitch;("number"!=typeof h||isNaN(h))&&(h=-90),h=Math.max(this._minPitch,Math.min(this._maxPitch,h));var f=this._options.zoom,p=this._options.center.range||this._options.center.alt;if(void 0===f||isNaN(f))p||(p=20037508.34/Math.pow(2,8));else{var m=Math.max(this._minZoom,Math.min(this._maxZoom,f));p=20037508.34/Math.pow(2,m-2)}var d=Math.abs(Cesium.Math.toRadians(h)),v=d>.001?p/Math.abs(Math.sin(d)):p;uo.flyToPosition(this,this._options.center,this._options.center.heading||0,h,v,this._options.flyDuration,(function(){s.raiseEvent(J.FLY_COMPLETE),s._options.completeCallback&&s._options.completeCallback()}))}else if(void 0!==this._options.zoom){Math.max(this._minPitch,Math.min(this._maxPitch,this._defaultPitch));this.setZoom(this._options.zoom,!0,this._options.flyDuration||3),this.raiseEvent(J.FLY_COMPLETE)}}},{key:"scaleRatio",get:function(){return this._scaleRatio}},{key:"nativeObjCesium",get:function(){return this._nativeObjCesium}},{key:"container",get:function(){return this._nativeObjCesium.container}},{key:"extend",get:function(){return this._nativeObjCesium.extend}},{key:"sceneModePicker",get:function(){return this._nativeObjCesium.sceneModePicker}},{key:"navigationHelpButton",get:function(){return this._nativeObjCesium.navigationHelpButton}},{key:"baseLayerPicker",get:function(){return this._nativeObjCesium.baseLayerPicker}},{key:"fullscreenButton",get:function(){return this._nativeObjCesium.fullscreenButton}},{key:"layerContainer",get:function(){return this._layerContainer}},{key:"scene",get:function(){return this._nativeObjCesium.scene}},{key:"camera",get:function(){return this._nativeObjCesium.camera}},{key:"canvas",get:function(){return this._nativeObjCesium.scene.canvas}},{key:"dataSources",get:function(){return this._nativeObjCesium.dataSources}},{key:"imageryLayers",get:function(){return this._nativeObjCesium.imageryLayers}},{key:"terrainProvider",get:function(){return this._nativeObjCesium.terrainProvider},set:function(e){e&&(e instanceof Cesium.Terrain?this._nativeObjCesium.scene.setTerrain(e):this._nativeObjCesium.terrainProvider=e)}},{key:"entities",get:function(){return this._nativeObjCesium.entities}},{key:"postProcessStages",get:function(){return this._nativeObjCesium.scene.postProcessStages}},{key:"clock",get:function(){return this._nativeObjCesium.clock}},{key:"viewerEvent",get:function(){return this._viewerEvent}},{key:"screenSpaceEventHandler",get:function(){return this._nativeObjCesium.screenSpaceEventHandler}},{key:"cameraPosition",get:function(){var e=He.transformCartesianToWGS84(this.camera.positionWC);return e&&(e.heading=Cesium.Math.toDegrees(this.camera.heading),e.pitch=Cesium.Math.toDegrees(this.camera.pitch),e.roll=Cesium.Math.toDegrees(this.camera.roll)),e}},{key:"resolution",get:function(){var e=this.scene.canvas.width,t=this.scene.canvas.height,i=He.transformWindowToWGS84(new Cesium.Cartesian2(e/2|0,t-1),this),n=He.transformWindowToWGS84(new Cesium.Cartesian2(1+e/2|0,t-1),this);return i&&n?Math.abs(i.lng-n.lng):1}},{key:"viewBoundsRectangle",get:function(){var e=this.scene.canvas.width,t=this.scene.canvas.height,i=He.transformWindowToWGS84(new Cesium.Cartesian2(0,t),this),n=He.transformWindowToWGS84(new Cesium.Cartesian2(e,0),this);return i&&n?Cesium.Rectangle.fromDegrees(i.lng,i.lat,n.lng,n.lat):Cesium.Rectangle.MAX_VALUE}},{key:"level",get:function(){return this._nativeObjCesium.scene.globe._surface._debug.maxDepthVisited}},{key:"mouseSensitivity",get:function(){return this._sensitivity},set:function(e){this._sensitivity=e}},{key:"extendCesium",value:function(){var e=Cesium.ImageryLayer.prototype.removeImageryFromCache;Cesium.ImageryLayer.prototype.tileRemoved=new Cesium.Event,Cesium.ImageryLayer.prototype.removeImageryFromCache=function(t){e.call(this,t),Cesium.ImageryLayer.prototype.tileRemoved.raiseEvent(t)}}},{key:"initEnvironment",value:function(){mr.Z.initEnvironment(),this.extendCesium(),window.anovgis_applyfn&&mr.Z.install(anovgis_applyfn),window.ANOVCITY&&mr.Z.install(ANOVCITY)}},{key:"setOptions",value:function(e){return this._viewerOption.setOptions(e),this}},{key:"createDefaultGeocoderContainer",value:function(e){if(Cesium.defined(e)){var t=document.querySelector(".cesium-viewer-toolbar"),i=(t.offsetHeight,t.offsetWidth),n=document.createElement("div");n.setAttribute("class","geocoderContainerDefault"),n.style.right=i+7+"px",this.container.appendChild(n),Rr.createGeocoder(e,{viewer:this,container:n,scene:this.scene})}}},{key:"setDeaultView",value:function(e){var t;Cesium.Camera.DEFAULT_VIEW_RECTANGLE=(t=Cesium.Rectangle).fromDegrees.apply(t,Ie(e))}},{key:"setDefaultAccessToken",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZDE4NjNiNC1jZDY5LTQ4MjctOTdjMi1iYTJiNzRmNDc3YmUiLCJpZCI6MTY1MzEsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzA2OTQ4NDJ9.dOY7whEypIg6v8dbIFQdd5NeQZRLM2po13XAJBMpuRs";Cesium.Ion.defaultAccessToken=e}},{key:"setNoNight",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scene.light=e?new Cesium.DirectionalLight({direction:new Cesium.Cartesian3(.35492591601301104,-.8909182691839401,-.2833588392420772)}):new Cesium.SunLight}},{key:"_addLayer",value:function(e){!this._layerCache[e.type]&&(this._layerCache[e.type]={}),Object(this._layerCache[e.type]).hasOwnProperty(e.id)||(e.raiseEvent(ie.ADD,this),this._layerCache[e.type][e.id]=e)}},{key:"_removeLayer",value:function(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.raiseEvent(ie.REMOVE,this),delete this._layerCache[e.type][e.id])}},{key:"changeSceneMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 2===e?this._nativeObjCesium.scene.morphTo2D(t):3===e?this._nativeObjCesium.scene.morphTo3D(t):2.5===e&&this._nativeObjCesium.scene.morphToColumbusView(t),this}},{key:"getImageryLayerInfo",value:function(e){var t=this._nativeObjCesium.camera.getPickRay(e);return this._nativeObjCesium.imageryLayers.pickImageryLayerFeatures(t)}},{key:"addBaseImageryLayer",value:function(e){return e?(this.imageryLayers.addImageryProvider(e),this):this}},{key:"addTerrain",value:function(e){return this}},{key:"removeTerrain",value:function(){return this._nativeObjCesium.terrainProvider=new Cesium.EllipsoidTerrainProvider,this}},{key:"addLayer",value:function(e){return this._addLayer(e),this}},{key:"removeLayer",value:function(e){return this._removeLayer(e),this}},{key:"hasLayer",value:function(e){return Object(this._layerCache[e.type]).hasOwnProperty(e.id)}},{key:"getLayer",value:function(e){var t=this.getLayers().filter((function(t){return t.id===e}));return t&&t.length?t[0]:void 0}},{key:"getLayers",value:function(){var e=this,t=[];return Object.keys(this._layerCache).forEach((function(i){var n=e._layerCache[i];Object.keys(n).forEach((function(e){t.push(n[e])}))})),t}},{key:"eachLayer",value:function(e,t){var i=this;return Object.keys(this._layerCache).forEach((function(n){var r=i._layerCache[n];Object.keys(r).forEach((function(i){e.call(t,r[i])}))})),this}},{key:"flyTo",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2.2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0;if(e)if(e instanceof cr&&e.flyTo)e.flyTo(n,r,o,s);else{var a=function(e){e&&Cesium.defined(e.center)&&t._nativeObjCesium.camera.flyToBoundingSphere(e,{duration:i,offset:new Cesium.HeadingPitchRange(Cesium.Math.toRadians(n),Cesium.Math.toRadians(r),o),complete:function(){s&&s()}})};if(e.boundingSphere)a(e.boundingSphere);else if(e._readyPromise&&e._readyPromise.then)e._readyPromise.then((function(){var i=t._nativeObjCesium.scene,n=120,r=i.postRender.addEventListener((function(){var t=e.boundingSphere;if(t&&Cesium.defined(t.center))r(),a(t);else{if(--n>0)return;r()}}))}));else{var l=e.nativeObjCesium||e;if(l)try{var u=l.boundingSphere;if(u&&Cesium.defined(u.center))return void a(u)}catch(e){}var c=this._nativeObjCesium.flyTo(l,{duration:i,offset:new Cesium.HeadingPitchRange(Cesium.Math.toRadians(n),Cesium.Math.toRadians(r),o)});c&&c.then((function(){s&&s()}))}}}},{key:"flyToTileset",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-60;if(this._nativeObjCesium&&e){var o=function(){var o=e.boundingSphere;o&&Cesium.defined(o.center)&&t._nativeObjCesium.camera.flyToBoundingSphere(o,{duration:i,offset:new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(r),o.radius*n)})};if(e.boundingSphere)o();else if(e._readyPromise&&e._readyPromise.then)e._readyPromise.then((function(){var i=t._nativeObjCesium.scene,n=120,r=i.postRender.addEventListener((function(){var t=e.boundingSphere;if(t&&Cesium.defined(t.center))r(),o();else{if(--n>0)return;r()}}))}));else{var s=e.nativeObjCesium||e;if(s){var a=this._nativeObjCesium,l=function(e){var t=e.boundingSphere.radius;a.flyTo(e,{duration:i,offset:new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(r),t*n)})};return s.then?s.then(l):s.readyEvent?s.readyEvent.addEventListener(l):void l(s)}}}}},{key:"flyToPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(e){var n=(e=De.parsePosition(e)).alt||0,r=new je(e.lng,e.lat,0),o=He.transformWGS84ToCartesian(r),s=e.heading||0,a=e.pitch||-90;return uo.flyToPoint(this,o,s,a,n,t,i),this}}},{key:"flyToPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-90,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:3,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(e){e=De.parsePosition(e);var s=He.transformWGS84ToCartesian(e);return uo.flyToPoint(this,s,t,i,n,r,o),this}}},{key:"zoomTo",value:function(e){if(e&&e.boundingSphere&&Cesium.defined(e.boundingSphere.center)){var t=e.boundingSphere;return this._nativeObjCesium.camera.viewBoundingSphere(t,new Cesium.HeadingPitchRange(0,-.5,t.radius)),this}return this._nativeObjCesium.zoomTo(e.nativeObjCesium||e)}},{key:"addEventListener",value:function(e,t,i){return[this._viewerEvent.addEventListener(e,t,i||this),this._sceneEvent.addEventListener(e,t,i||this)]}},{key:"addEventListenerOnce",value:function(e,t,i){return this._viewerEvent.addEventListenerOnce(e,t,i||this)}},{key:"raiseEvent",value:function(e,t){return this._viewerEvent.raiseEvent(e,t),this}},{key:"removeEventListener",value:function(e,t,i){return this._viewerEvent.removeEventListener(e,t,i||this),this._sceneEvent.removeEventListener(e,t,i||this),this}},{key:"destroy",value:function(){var e=this;return Object.keys(this._layerCache).forEach((function(t){var i=e._layerCache[t];Object.keys(i).forEach((function(t){e._removeLayer(i[t])}))})),this._nativeObjCesium.destroy(),de.empty(this.container),this._nativeObjCesium=void 0,this._baseLayerPicker=void 0,this._layerCache={},mr.Z.Initialized=!1,this}},{key:"exportScene",value:function(e){this.scene.render();var t=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),i=document.createElement("a"),n=me.dataURLtoBlob(t),r=URL.createObjectURL(n);return i.download="".concat(e||"scene",".png"),i.href=r,i.click(),this}},{key:"showFrames",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scene.debugShowFramesPerSecond=e}},{key:"_computeRangeFromHeight",value:function(e,t){var i=Math.abs(Cesium.Math.toRadians(t)),n=Math.max(i,Cesium.Math.toRadians(10));return e/Math.sin(n)}},{key:"getRangeToCenter",value:function(){var e=this.getCenter();if(!e)return this.camera.positionCartographic.height;var t=He.transformWGS84ToCartesian(e);return Cesium.Cartesian3.distance(this.camera.positionWC,t)}},{key:"getPitch",value:function(){return Cesium.Math.toDegrees(this.camera.pitch)}},{key:"setPitch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5;if("number"!=typeof e)return this;var i=Math.max(this._minPitch,Math.min(this._maxPitch,e)),n=this.getCenter()||this.cameraPosition,r=this.getRangeToCenter();return this.flyToPoint({lng:n.lng,lat:n.lat,alt:0},Cesium.Math.toDegrees(this.camera.heading),i,r,t||.5,null),this}},{key:"getZoomRange",value:function(){return{min:this._minZoom,max:this._maxZoom}}},{key:"setZoomRange",value:function(e,t){this._minZoom=Math.max(0,e),this._maxZoom=Math.max(0,t);var i=this.getZoom();return i<this._minZoom?this.setZoom(this._minZoom,!0,.3):i>this._maxZoom&&this.setZoom(this._maxZoom,!0,.3),this}},{key:"getPitchRange",value:function(){return{min:this._minPitch,max:this._maxPitch}}},{key:"setPitchRange",value:function(e,t){if(this._minPitch=Math.max(-90,Math.min(e,0)),this._maxPitch=Math.max(-90,Math.min(t,0)),this._minPitch>this._maxPitch){var i=[this._maxPitch,this._minPitch];this._minPitch=i[0],this._maxPitch=i[1]}var n=this.getPitch();return(n<this._minPitch||n>this._maxPitch)&&this.setPitch(Math.max(this._minPitch,Math.min(this._maxPitch,n)),!0,.3),this}},{key:"setCenterAndZoom",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(!e)return this;var n=De.parsePosition(e);if(!n)throw new Error("Invalid center position");var r=void 0!==t?t:this.getZoom(),o=Math.max(this._minZoom,Math.min(this._maxZoom,r)),s=20037508.34/Math.pow(2,o-2),a=this.getPitch(),l=this._computeRangeFromHeight(s,a);return this.flyToPoint({lng:n.lng,lat:n.lat,alt:0},Cesium.Math.toDegrees(this.camera.heading),a,l,i,null),this}},{key:"getCenter",value:function(){var e=this.canvas,t=new Cesium.Cartesian2(e.clientWidth/2,e.clientHeight/2),i=this.camera.getPickRay(t);if(i){var n=this.globe&&this.globe.pick(i,this.scene);if(n){var r=He.transformCartesianToWGS84(n);return r?new je(r.lng,r.lat,r.alt):void 0}}var o=this.globe?this.globe.ellipsoid:Cesium.Ellipsoid.WGS84,s=this.camera.pickEllipsoid(t,o);if(s){var a=o.cartesianToCartographic(s);return new je(Cesium.Math.toDegrees(a.longitude),Cesium.Math.toDegrees(a.latitude),a.height)}var l=this.camera.positionCartographic;return new je(Cesium.Math.toDegrees(l.longitude),Cesium.Math.toDegrees(l.latitude),0)}},{key:"setCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e)return this;var i=De.parsePosition(e);if(!i)throw new Error("Invalid center position");var n=this.getPitch(),r=this.getRangeToCenter();return this.flyToPoint({lng:i.lng,lat:i.lat,alt:0},Cesium.Math.toDegrees(this.camera.heading),n,r,t||.5,null),this}},{key:"zoomIn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.3;return this.getZoom()>=this._maxZoom?this:this.setZoom(Math.min(this.getZoom()+1,this._maxZoom),e)}},{key:"zoomOut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.3;return this.getZoom()<=this._minZoom?this:this.setZoom(Math.max(this.getZoom()-1,this._minZoom),e)}},{key:"getZoom",value:function(){try{var e=this.getCenter();if(!e)throw new Error("No center");var t=He.transformWGS84ToCartesian(e),i=Cesium.Cartesian3.distance(this.camera.positionWC,t),n=Math.abs(this.camera.pitch),r=Math.max(n,.001),o=i*Math.sin(r),s=Math.log2(20037508.34/Math.max(o,1))+2;return Math.round(10*s)/10}catch(e){var a=Math.max(this.camera.positionCartographic.height,1),l=Math.log2(20037508.34/a)+2;return Math.round(10*l)/10}}},{key:"getClampedZoom",value:function(){var e=this.getZoom();return Math.max(this._minZoom,Math.min(this._maxZoom,e))}},{key:"setZoom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5;if("number"!=typeof e)return this;var i=Math.max(this._minZoom,Math.min(this._maxZoom,e)),n=20037508.34/Math.pow(2,i-2),r=this.getCenter()||this.cameraPosition,o=this.getPitch(),s=this._computeRangeFromHeight(n,o);return this.flyToPoint({lng:r.lng,lat:r.lat,alt:0},Cesium.Math.toDegrees(this.camera.heading),o,s,t,null),this}},{key:"getView",value:function(){var e=this.getCenter();return{center:e?{lng:e.lng,lat:e.lat,alt:e.alt}:null,zoom:this.getZoom(),pitch:this.getPitch(),heading:Cesium.Math.toDegrees(this.camera.heading),zoomRange:this.getZoomRange(),pitchRange:this.getPitchRange()}}},{key:"setView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(null==e||!e.center)return this;var i=De.parsePosition(e.center),n=Math.max(this._minZoom,Math.min(this._maxZoom,void 0!==e.zoom?e.zoom:10)),r=Math.max(this._minPitch,Math.min(this._maxPitch,void 0!==e.pitch?e.pitch:this._defaultPitch)),o=20037508.34/Math.pow(2,n-2),s=this._computeRangeFromHeight(o,r);return this.flyToPoint({lng:i.lng,lat:i.lat,alt:0},void 0!==e.heading?e.heading:0,r,s,t,null),this}}]),e}();const Br=Dr;function Gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Hr=Cesium,Nr=Hr.BoxGeometry,Fr=Hr.Cartesian3,zr=Hr.defined,Wr=Hr.DeveloperError,Ur=Hr.GeometryPipeline,Vr=Hr.Matrix3,qr=Hr.Matrix4,Zr=Hr.Transforms,Yr=Hr.VertexFormat,Kr=Hr.BufferUsage,Qr=Hr.CubeMap,Xr=Hr.loadCubeMap,Jr=Hr.RenderState,$r=Hr.VertexArray,eo=Hr.BlendingState,to=Hr.SceneMode,io=Hr.ShaderProgram,no=Hr.ShaderSource,ro=Hr.SkyBox,oo=function(e){c(i,e);var t=Gr(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r)).offsetAngle=(null==r?void 0:r.offsetAngle)||0,e}return a(i,[{key:"update",value:function(e,t){var i=this;if(this.show&&(e.mode===to.SCENE3D||e.mode===to.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var o=this.sources;if(!(zr(o.positiveX)&&zr(o.negativeX)&&zr(o.positiveY)&&zr(o.negativeY)&&zr(o.positiveZ)&&zr(o.negativeZ)))throw new Wr("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(r(o.positiveX)!==r(o.negativeX)||r(o.positiveX)!==r(o.positiveY)||r(o.positiveX)!==r(o.negativeY)||r(o.positiveX)!==r(o.positiveZ)||r(o.positiveX)!==r(o.negativeZ))throw new Wr("this.sources properties must all be the same type.");"string"==typeof o.positiveX?Xr(n,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Qr({context:n,source:o}))}var s=this._command;if(s.modelMatrix=Zr.eastNorthUpToFixedFrame(e.camera.positionWC),0!==this.offsetAngle&&qr.multiply(s.modelMatrix,qr.fromRotationTranslation(Vr.fromRotationZ(this.offsetAngle/180*Math.PI)),s.modelMatrix),!zr(s.vertexArray)){s.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return qr.getMatrix3(s.modelMatrix,new Vr)}};var a=Nr.createGeometry(Nr.fromDimensions({dimensions:new Fr(2,2,2),vertexFormat:Yr.POSITION_ONLY})),l=this._attributeLocations=Ur.createAttributeLocations(a);s.vertexArray=$r.fromGeometry({context:n,geometry:a,attributeLocations:l,bufferUsage:Kr._DRAW}),s.renderState=Jr.fromCache({blending:eo.ALPHA_BLEND})}if(!zr(s.shaderProgram)||this._useHdr!==t){var u=new no({defines:[t?"HDR":""],sources:["\n uniform samplerCube u_cubeMap;\n in vec3 v_texCoord;\n void main()\n {\n vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));\n out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n }\n"]});s.shaderProgram=io.fromCache({context:n,vertexShaderSource:"\n in vec3 position;\n in vec3 v_texCoord;\n uniform mat3 u_rotateMatrix;\n void main()\n {\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n }\n",fragmentShaderSource:u,attributeLocations:this._attributeLocations}),this._useHdr=t}if(zr(this._cubeMap))return s}}}]),i}(ro);const so=oo;function ao(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}var lo=function(){function e(){n(this,e)}return a(e,null,[{key:"flyToPoint",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{};if(!e)throw new Cesium.DeveloperError("viewer参数是必须的!");if(e=e.nativeObjCesium||e,!t)throw new Cesium.DeveloperError("destination参数是必须的!");var u=new Cesium.BoundingSphere(t,0);e.camera.flyToBoundingSphere(u,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ao(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ao(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({duration:o,maximumHeight:void 0,complete:function(){s&&"function"==typeof s&&s()},cancel:function(){console.log("定位取消!")},offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:r},easingFunction:a},l))}},{key:"flyToPosition",value:function(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{};if(i){i=De.parsePosition(i);var c=He.transformWGS84ToCartesian(i);e.flyToPoint(t,c,n,r,o,s,a,l,u)}}},{key:"centerAt",value:function(e,t,i,n){var r=Cesium.Cartesian3.fromDegrees(t,i,0);this.flyToPoint(e.nativeObjCesium||e,r,0,-90,n||500,0)}},{key:"flyToRectangle",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;if(!e)throw new Cesium.DeveloperError("viewer参数是必须的!");if(e=e.nativeObjCesium||e,!Array.isArray(t)||2!=t.length)throw new Cesium.DeveloperError("cartesians必须为两个笛卡尔Cartesian3坐标!");var a=Cesium.Rectangle.fromCartesianArray(t),l=Cesium.BoundingSphere.fromRectangle3D(a);e.camera.flyToBoundingSphere(l,{duration:o,maximumHeight:void 0,complete:function(){s&&"function"==typeof s&&s()},cancel:function(){console.log("定位取消!")},offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:r}})}},{key:"flyToPoints",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-60,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;e=e.nativeObjCesium||e;var a=Cesium.BoundingSphere.fromPoints(t);a.radius=1*a.radius,e.camera.flyToBoundingSphere(a,{duration:o,complete:function(){s&&"function"==typeof s&&s()},offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:r}})}},{key:"flyToPositions",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-60,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;e=e.nativeObjCesium||e;var a=De.parsePositions(t),l=He.transformWGS84ArrayToCartesianArray(a),u=Cesium.BoundingSphere.fromPoints(l);u.radius=u.radius*r,e.camera.flyToBoundingSphere(u,{duration:o,complete:function(){s&&"function"==typeof s&&s()},offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:0}})}},{key:"flyToTarget",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6?arguments[6]:void 0;if(t){if(!(t instanceof cr&&t.flyTo)){var a=(e.nativeObjCesium||e).flyTo(t.nativeObjCesium||t,{duration:o,offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:r}});return a&&a.then((function(){s&&s()})),a}t.flyTo(i,n,r,s)}}}]),e}();const uo=lo;var co=i(545);function ho(e,t,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=t||{},n.geometry=e,n}function fo(e,t){void 0===t&&(t={});var i={type:"FeatureCollection"};return t.id&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.features=e,i}function po(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return mo(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return mo(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}const vo=function(){function e(){n(this,e)}return a(e,null,[{key:"wktArrToEarthPosArr",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0;if(i&&"string"==typeof i)return t.forEach((function(t){var n=e.recurObjKey(t,i),r=n.obj,o=n.value;r.earthPos=e.wktStrToEarthPos(o)})),t}},{key:"wktStrToEarthPos",value:function(e){var t,i=[],n=po(e.slice(e.search(/\d+/g),e.search(/\)/g)).split(","));try{for(n.s();!(t=n.n()).done;){var r=t.value.split(" ");if(2!==r.length)throw new Error("WKT格式不正确");var o,s=po(r);try{for(s.s();!(o=s.n()).done;){var a=o.value;i.push(Cesium.Math.toRadians(parseFloat(a)))}}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}if(i.length<2)throw new Error("将WKT转化为Cesium.Cartesian3结果为空,转换失败");return i}},{key:"wktArrToCartesian3Arr",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(i&&"string"==typeof i)return t.forEach((function(t){var r=e.recurObjKey(t,i),o=r.obj,s=r.value;o.cartesian3=e.wktStrToCartesian3(s,n)})),t}},{key:"wktStrToCartesian3",value:function(e,t){var i,n=[],r=!1,o=po(e.slice(e.search(/\d+/g),e.search(/\)/g)).split(","));try{for(o.s();!(i=o.n()).done;){var s=i.value.split(" "),a=s.length;if(a<2||a>3)throw new Error("WKT格式不正确");if(void 0!==t&&"string"!=typeof t&&"number"!=typeof t||"number"==typeof t&&t!=t)throw new Error("高度参数{height}必须为字符串或者数字或者undefined类型");2!==a||"string"!=typeof t&&"number"!=typeof t||s.push(parseFloat(t)),3===s.length&&(r=!0);var l,u=po(s);try{for(u.s();!(l=u.n()).done;){var c=l.value;n.push(parseFloat(c))}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}if(n.length<2)throw new Error("将WKT转化为Cesium.Cartesian3结果为空,转换失败");return r?Cesium.Cartesian3.fromDegreesArrayHeights(n):Cesium.Cartesian3.fromDegreesArray(n)}},{key:"wktArrToGeoJson",value:function(){var e=this,t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(t&&"string"==typeof t){var n=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(r){var o=e.recurObjKey(r,t),s=o.obj,a=o.value,l=ho((0,co.parse)(a));l.properties=s,l.properties.stroke="#555555",l.properties["stroke-opacity"]=1,l.properties["stroke-width"]=2,l.properties.fill="#555555",l.properties["fill-opacity"]=.5,i&&(l=i(l)),n.push(l)})),fo(n)}}},{key:"recurObjKey",value:function(e,t){var i=t.split("."),n=i.pop(),r=e;return i.forEach((function(e){return r=r[e]})),{obj:r,value:r[n]}}}]),e}();const yo=function(){function e(){n(this,e)}return a(e,null,[{key:"drawCanvalCircle",value:function(e,t,i,n,r){if(!e||!t||!Array.isArray(i)||i.length<1)return console.error("传入参数错误!"),"";"string"==typeof e&&(e=Cesium.Color.fromCssColorString(e)),n||(n=[{key:0,value:e.withAlpha(.3).toCssColorString()},{key:.8,value:e.withAlpha(.6).toCssColorString()},{key:1,value:e.withAlpha(.9).toCssColorString()}]);var o=document.createElement("canvas");o.width=t,o.height=t;var s=o.getContext("2d"),a=o.width/2,l=o.height/2,u=o.width/2,c=s.createRadialGradient(a,l,1,a,l,u);n.forEach((function(e){c.addColorStop(e.key,e.value)})),s.beginPath(),s.arc(a,l,u,0,2*Math.PI,!1),s.fillStyle=c,s.fill(),s.closePath(),s.restore(),s.fillStyle=Cesium.Color.WHITE.toCssColorString();var h=15*t/60;return r&&(h=r),s.font="bold ".concat(h,"px sans-serif"),s.textAlign="center",s.textBaseline="bottom",i.length>1?(s.fillText(i[0]+"",t/2,t/2),s.fillText(i[1]+"",t/2,t/4*3.1)):s.fillText(i[0]+"",t/2,t/2),o.toDataURL()}}]),e}();const go=function(){function e(){n(this,e)}return a(e,null,[{key:"imageryLayerFeatureInfo2Geojson",value:function(e){return e?{type:"FeatureCollection",features:[e.data]}:null}}]),e}();const _o=function(){function e(){n(this,e)}return a(e,null,[{key:"inRing",value:function(e,t,i){if(i&&!1===this.inBBox(e,i))return!1;var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var r=0,o=t.length-1;r<t.length;o=r++){var s=t[r][0],a=t[r][1],l=t[o][0],u=t[o][1];a>e[1]!=u>e[1]&&e[0]<(l-s)*(e[1]-a)/(u-a)+s&&(n=!n)}return n}},{key:"inBBox",value:function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}},{key:"isPolygonsIntersect",value:function(e,t){var i=Cesium.Rectangle.fromCartesianArray(e),n=Cesium.Rectangle.fromCartesianArray(t),r=[],o=[];r.push(Cesium.Math.toDegrees(i.west),Cesium.Math.toDegrees(i.south),Cesium.Math.toDegrees(i.east),Cesium.Math.toDegrees(i.north)),o.push(Cesium.Math.toDegrees(n.west),Cesium.Math.toDegrees(n.south),Cesium.Math.toDegrees(n.east),Cesium.Math.toDegrees(n.north));for(var s=He.transformCartesianArrayToWGS84Array(e),a=He.transformCartesianArrayToWGS84Array(t),l=s.map((function(e){return[e.lng,e.lat]})),u=a.map((function(e){return[e.lng,e.lat]})),c=0;c<l.length;c++)for(var h=l[c],f=0;f<u.length;f++){var p=u[f];if(this.inRing(h,u,o)||this.inRing(p,l,r))return!0}return!1}},{key:"isPolygonsIntersect2",value:function(e,t,i,n){for(var r=0;r<e.length;r++)for(var o=e[r],s=0;s<t.length;s++){var a=t[s];if(this.inRing(o,t,n)||this.inRing(a,e,i))return!0}return!1}},{key:"isPolygonContainsPolygon",value:function(e,t,i){for(var n=0;n<e.length;n++)for(var r=0;r<t.length;r++){var o=t[r];if(!this.inRing(o,e,i))return!1}return!0}}]),e}();var Co=function(){function e(t){n(this,e),this.viewer=t,t.mapInfo=this,this._level=void 0,this._fpsEl=void 0,this._msEl=void 0,this._fpsFrameCount=0,this._msFrameCount=0,this._lastFpsSampleTime=Cesium.getTimestamp(),this._lastMsSampleTime=Cesium.getTimestamp();var i=document.createElement("div");i.setAttribute("id","anov-mapinfo-container"),i.style.textIndent="20px",i.style.backgroundColor="rgba(0, 0, 0, 0.4)",i.style.width="calc(100% - 30px)",i.style.height="30px",i.style.lineHeight="30px",i.style.position="absolute",i.style.bottom=0,i.style.color="white",t.container.appendChild(i),this._fpsEl=de.create("span","fps-bar",i),this._fpsEl.style.marginRight="15px";var r=document.createElement("span");r.setAttribute("id","anov-mapinfo-lon"),r.innerHTML="经度:";var o=document.createElement("span");o.style.marginRight="15px",i.appendChild(r),i.appendChild(o),this.lonSpan=o;var s=document.createElement("span");s.setAttribute("id","anov-mapinfo-lat"),s.innerHTML="纬度:";var a=document.createElement("span");a.style.marginRight="15px",i.appendChild(s),i.appendChild(a),this.latSpan=a;var l=document.createElement("span");l.setAttribute("id","anov-mapinfo-heading"),l.innerHTML="偏航角:";var u=document.createElement("span");u.style.marginRight="15px",i.appendChild(l),i.appendChild(u);var c=document.createElement("span");c.setAttribute("id","anov-mapinfo-pitch"),c.innerHTML="视角:";var h=document.createElement("span");h.style.marginRight="15px",i.appendChild(c),i.appendChild(h);var f=document.createElement("span");f.setAttribute("id","anov-mapinfo-height"),f.innerHTML="视高:";var p=document.createElement("span"),m=document.createElement("span");m.setAttribute("id","anov-mapinfo-unit"),m.innerHTML="米",m.style.marginRight="15px",i.appendChild(f),i.appendChild(p),i.appendChild(m),this._level=de.create("span","level-bar",i),this._level.style.marginRight="15px";new Cesium.ScreenSpaceEventHandler(t.scene.canvas);var d=function(e){var i=Math.ceil(t.camera.positionCartographic.height);i>1e3?(i/=1e3,m.innerHTML="千米"):m.innerHTML="米",p.innerText=i;var n=Number(t.scene.camera.pitch).toFixed(4);n=-(57.29578*n).toFixed(0),h.innerText=n+"°";var r=Number(t.scene.camera.heading).toFixed(4);r=(57.29578*r).toFixed(0),u.innerText=r+"°"};d(),t.camera.changed.addEventListener((function(){d()})),t.addEventListener($.POST_UPDATE,this._onPostUpdate,this)}return a(e,[{key:"destory",value:function(){}},{key:"setPos",value:function(e){e&&(this.lonSpan.innerText=e.lng.toFixed(7),this.latSpan.innerText=e.lat.toFixed(7))}},{key:"_onPostUpdate",value:function(){var e=Cesium.getTimestamp();this._fpsFrameCount++;var t=e-this._lastFpsSampleTime;if(t>1e3){var i=1e3*this._fpsFrameCount/t|0;this._fpsEl.innerHTML="<span>帧率:".concat(i," FPS</span>"),this._lastFpsSampleTime=e,this._fpsFrameCount=0}this._level.innerHTML="<span>层级:".concat(this.viewer.level,"</span>")}}]),e}();const bo=Co;const wo=a((function e(t,i){n(this,e),this.viewer=i;var r=document.getElementById(t),o=document.createElement("div");o.setAttribute("class","anov-poisearch_searchDiv"),o.innerHTML='<input placeholder="地名搜索" id="anov-poisearch_searchGaode" class="anov-poisearch_searchGaode">';var s=document.createElement("div");s.innerHTML="x",s.setAttribute("class","anov-poisearch_close"),s.style.display="none",o.appendChild(s);var a=document.createElement("div");a.setAttribute("class","anov-poisearch_resultList"),r.appendChild(o),r.appendChild(a);var l=document.getElementById("anov-poisearch_searchGaode");o.oninput=function(){c||(clearTimeout(u),u=setTimeout((function(){var e=l.value;s.style.display=e?"block":"none",h(e)}),1e3))},s.onclick=function(){s.style.display="none",l.value="",h("")};var u,c=!1;function h(e){a.innerHTML="",fetch("https://restapi.amap.com/v3/place/text?key=c8a650173d583fb038c7c2d1278e7cd8&&offset=10&&keywords="+e).then((function(e){return e.text()})).then((function(e){if((e=JSON.parse(e)).pois.length>0){var t="";e.pois.forEach((function(e){var i=e.location.split(","),n=i[0],r=i[1];t+='<div class="anov-poisearch_locationItem" lat='+r+" lon="+n+" title="+e.name+">"+e.name+"</div>"})),a.innerHTML=t}})).catch((function(e){return console.log(e)}))}a.onclick=function(e){l.value=e.target.getAttribute("title");var t=Number(e.target.getAttribute("lon")),n=Number(e.target.getAttribute("lat"));a.innerHTML="",uo.flyToPosition(i,[t,n],0,-90,3e3,2,null)}}));function Po(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Oo(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Po(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Po(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var xo=function(){function e(){n(this,e),this.params={},this.bgFS="\n uniform sampler2D u_map;\n uniform vec4 u_bgColor;\n layout(location = 0) out vec4 out_FragColor;\n in vec2 v_textureCoordinates;\n void main(){\n vec2 uv = v_textureCoordinates;\n vec4 bgColor = u_bgColor;\n vec4 color = texture(u_map, uv);\n if (color.a > 0.) {\n out_FragColor = bgColor;\n } else {\n out_FragColor = vec4(0.0);\n }\n } ",this.mainFS="\n uniform sampler2D u_map;\n uniform bool u_invert;\n uniform float u_alpha;\n layout(location = 0) out vec4 out_FragColor;\n in vec2 v_textureCoordinates;\n void main(){\n vec2 uv = v_textureCoordinates;\n vec4 color = texture( u_map , uv );\n float grayVal =( color.r + color.g + color.b ) / 3.;\n if(u_invert){\n grayVal = 1. - grayVal;\n }\n float alpha = color.a * u_alpha;\n out_FragColor=vec4( vec3( grayVal ) , alpha );\n }"}return a(e,[{key:"setTheme",value:function(e){var t,i,n,r,o;this.params=Oo(Oo({},this.params),e);var s=Cesium.Color;if(this.layer=null!==(t=this.params.layer)&&void 0!==t?t:null,this.layer){this.params.bgColor=null!==(i=this.params.bgColor)&&void 0!==i?i:s.TRANSPARENT,this.params.alpha=null!==(n=this.params.alpha)&&void 0!==n?n:1,this.params.invert=null!==(r=this.params.invert)&&void 0!==r&&r,this.params.preMultiplyAlpha=null===(o=this.params.preMultiplyAlpha)||void 0===o||o;var a=this;this.shaders={bgFS:a.bgFS,mainFS:a.mainFS,uniformMap:{u_invert:function(){return a.params.invert},u_alpha:function(){return a.params.alpha},u_bgColor:function(){return a.params.bgColor}}};var l=this.layer._createTextureWebGL;this.layer._createTextureWebGL=function(e,t){var i=l.bind(this)(e,t);return a.processTexture(e,i)||i}}}},{key:"processTexture",value:function(e,t){var i=this.params,n=this.shaders,r=t.sampler,o=Cesium,s=o.Texture,a=o.PixelFormat,l=o.PixelDatatype,u=o.WebGLConstants,c=o.Framebuffer,h=o.RenderState,f=o.BlendingState,p=o.Color,m=(o.defined,new s({context:e,pixelFormat:a.RGBA,pixelDatatype:l.UNSIGNED_BYTE,sampler:r,width:t.width,height:t.height,flipY:t.flipY,target:u.TEXTURE_2D,preMultiplyAlpha:i.preMultiplyAlpha})),d=new c({context:e,colorTextures:[m],destroyAttachments:!1}),v=h.fromCache({depthTest:{enabled:!1},blending:i.preMultiplyAlpha?f.PRE_MULTIPLIED_ALPHA_BLEND:f.ALPHA_BLEND,viewport:{x:0,y:0,width:t.width,height:t.height}});(n.uniformMap.u_map=function(){return t},p.equals(i.bgColor,p.TRANSPARENT))||e.createViewportQuadCommand(n.bgFS,{framebuffer:d,renderState:v,uniformMap:n.uniformMap}).execute(e);return e.createViewportQuadCommand(n.mainFS,{framebuffer:d,renderState:v,uniformMap:n.uniformMap}).execute(e),d.destroy(),t.destroy(),m}}]),e}();const Eo=xo;var Ao=function(){function e(){n(this,e)}return a(e,null,[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"b832b9764939cbb0919148c548b669ba",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.preID=n;var o=[],s=Fo.createTdtImageryLayer({style:"img",key:i}),a=Fo.createTdtImageryLayer({key:i}),l=Fo.createTdtImageryLayer({key:i});l.nameC="tiandituDianzi_Dark";var u=Fo.createArcGisImageryLayer({style:"dark"}),c=new Cesium.MapboxStyleImageryProvider({styleId:"dark-v11",accessToken:"pk.eyJ1Ijoib2xkZG9nc2QiLCJhIjoiY2x4eDgxNGd3MWhwMjJrc2Q2djRjamU1NyJ9.QPCS0n3ss-WuQ7qcXe_Y-w"}),h=Fo.createAmapImageryLayer({style:"cva",crs:"WGS84"});h.nameC="gaode";var f=Fo.createTdtImageryLayer({style:"cia",key:i}),p=new Cesium.ProviderViewModel({name:"天地图影像",iconUrl:Cesium.buildModuleUrl("Widgets/Images/ImageryProviders/mapboxSatellite.png"),tooltip:"天地图影像",creationFunction:function(){return[s]}}),m=new Cesium.ProviderViewModel({name:"天地图影像(含注记)",iconUrl:Cesium.buildModuleUrl("static/images/bingAerialLabels.png"),tooltip:"天地图影像(含注记)",creationFunction:function(){return[s,f]}}),d=new Cesium.ProviderViewModel({name:"天地图-电子地图",iconUrl:Cesium.buildModuleUrl("static/images/tdt_vec.png"),tooltip:"天地图-电子地图",creationFunction:function(){return[a,f]}}),v=new Cesium.ProviderViewModel({name:"天地图-暗色系",iconUrl:Cesium.buildModuleUrl("static/images/blueblack.png"),tooltip:"天地图-暗色系",creationFunction:function(){return[l,f]}}),y=(new Cesium.ProviderViewModel({name:"蓝黑色系影像",iconUrl:Cesium.buildModuleUrl("static/images/blueblack.png"),tooltip:"蓝黑色系影像",creationFunction:function(){return[u]}}),new Cesium.ProviderViewModel({name:"Mapbox暗色",iconUrl:Cesium.buildModuleUrl("static/images/blueblack.png"),tooltip:"Mapbox暗色影像",creationFunction:function(){return[c]}}),new Cesium.ProviderViewModel({name:"高德综合",iconUrl:Cesium.buildModuleUrl("static/images/blueblack.png"),tooltip:"高德综合",creationFunction:function(){return[h]}}));o.push(p),o.push(m),o.push(d),o.push(v),o.push(y),e.baseLayerPicker.viewModel.imageryProviderViewModels=o,n<1&&(n=1),n>o.length&&(n=o.length),e.baseLayerPicker.viewModel.selectedImagery=e.baseLayerPicker.viewModel.imageryProviderViewModels[n-1],e.baseLayerPicker.viewModel.terrainProviderViewModels[0].name="无地形",e.baseLayerPicker.viewModel.terrainProviderViewModels[1].name="DEM地形",r<1&&(r=1),r>e.baseLayerPicker.viewModel.terrainProviderViewModels.length&&(r=e.baseLayerPicker.viewModel.terrainProviderViewModels.length),e.baseLayerPicker.viewModel.selectedTerrain=e.baseLayerPicker.viewModel.terrainProviderViewModels[r-1];var g=function(i){if(i.imageryProvider)if("gaode"==i.imageryProvider.nameC)t.setViewerTheme(e,{layer:i});else if("tiandituDianzi_Dark"==i.imageryProvider.nameC){i.show=!1,t.imageryThemeGL||(t.imageryThemeGL=new Eo);var n=[20,29,43,1];t.imageryThemeGL.setTheme({layer:i,bgColor:new Cesium.Color(n[0]/255,n[1]/255,n[2]/255,1),alpha:.1,invert:!0,preMultiplyAlpha:!0}),setTimeout((function(){i.show=!0}),100)}else t.goadeDarkShader&&t.resetTheme(e)};e.imageryLayers.layerAdded.addEventListener((function(e){if(e.imageryProvider)g(e);else var t=e.readyEvent.addEventListener((function(){g(e),t()}))}))}},{key:"setSelectedImagery",value:function(e,t){e.baseLayerPicker.viewModel.selectedImagery=e.baseLayerPicker.viewModel.imageryProviderViewModels[t-1]}},{key:"setSelectedTerrain",value:function(e,t){e.baseLayerPicker.viewModel.selectedTerrain=e.baseLayerPicker.viewModel.terrainProviderViewModels[t-1]}},{key:"resetTheme",value:function(e){for(var t=e.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources,i=0;i<t.length;i++){t[i]=t[i].replace(this.goadeDarkShader,"color = czm_saturation(color, textureSaturation);\n#endif\n")}}},{key:"setViewerTheme",value:function(e){var t,i,n,r,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null!==(t=s.layer)&&void 0!==t?t:e.imageryLayers.get(0);if(a){a.brightness=null!==(i=s.brightness)&&void 0!==i?i:.6,a.contrast=null!==(n=s.contrast)&&void 0!==n?n:1.8,a.gamma=null!==(r=s.gamma)&&void 0!==r?r:.3,a.hue=null!==(o=s.hue)&&void 0!==o?o:1,a.saturation=s.saturation||0;for(var l=e.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources,u=0;u<l.length;u++){var c,h,f,p="color = czm_saturation(color, textureSaturation);\n#endif\n";s.invertColor||(p+="\n color.r = 1.0 - color.r;\n color.g = 1.0 - color.g;\n color.b = 1.0 - color.b;\n "),p+="\n color.r = color.r * ".concat(null!==(c=s.filterRGB_R)&&void 0!==c?c:100,".0/255.0;\n color.g = color.g * ").concat(null!==(h=s.filterRGB_G)&&void 0!==h?h:138,".0/255.0;\n color.b = color.b * ").concat(null!==(f=s.filterRGB_B)&&void 0!==f?f:230,".0/255.0;\n "),l[u]=l[u].replace("color = czm_saturation(color, textureSaturation);\n#endif\n",p),this.goadeDarkShader||(this.goadeDarkShader=p)}}}}]),e}();Z(Ao,"preID",1),Z(Ao,"goadeDarkShader",""),Z(Ao,"imageryThemeGL",null);const To=Ao;const ko=function(){function e(t){n(this,e),this._viewer=t,this.dog=0,this._langChinese={Imagery:"影像",Terrain:"地形",GeocodersPlaceholder:"请输入地名...",HomeButtonToolTip:"回到全球",SceneModePickerToolTip2D:"二维",SceneModePickerToolTip3D:"三维",SceneModePickerToolTipView:"哥伦布视图",NavigationHelpButtonToolTip:"操作指南",navigationHelp_Touch:">手势",navigationHelp_Mouse:">鼠标",navigationHelp_Mouse_Pan:"平移",navigationHelp_Mouse_Pan_details:"按下左键+ 拖动",navigationHelp_Mouse_Zoom:"缩放",navigationHelp_Mouse_Zoom_details0:"按下右键+ 拖动,或者",navigationHelp_Mouse_Zoom_details1:"滚动鼠标滚轮",navigationHelp_Mouse_Rotate:"旋转",navigationHelp_Mouse_Rotate_details0:"按下中键+ 拖动,或者",navigationHelp_Mouse_Rotate_details1:"按下CTRL + 左键/右键 +拖动",navigationHelp_Touch_Pan:"平移",navigationHelp_Touch_Pan_details:"单指拖动",navigationHelp_Touch_Zoom:"缩放",navigationHelp_Touch_Zoom_details:"双指捏合",navigationHelp_Touch_Rotate:"旋转",navigationHelp_Touch_Rotate_details:"双指反向拖动",navigationHelp_Touch_Tilt:"俯仰",navigationHelp_Touch_Tilt_details:"双指同向拖动",enterFullScreen:"全屏",exitFullScreen:"退出全屏",lon:"经度:",lat:"纬度:",heading:"偏航角:",pitch:"视角:",height:"视高:",tianditu_img2:"天地图影像",tianditu_img:"天地图影像(含注记)",tianditu_img3:"天地图-电子地图"},this._langEnglish={Imagery:"Imagery",Terrain:"Terrain",GeocodersPlaceholder:"Enter an address or landmark...",HomeButtonToolTip:"View Home",SceneModePickerToolTip2D:"2D",SceneModePickerToolTip3D:"3D",SceneModePickerToolTipView:"Columbus View",NavigationHelpButtonToolTip:"Navigation Instructions",enterFullScreen:"Full screen",exitFullScreen:"Exit full screen",navigationHelp_Touch:">手势",navigationHelp_Mouse:">鼠标",navigationHelp_Mouse_Pan:"平移",navigationHelp_Mouse_Pan_details:"按下左键+ 拖动",navigationHelp_Mouse_Zoom:"缩放",navigationHelp_Mouse_Zoom_details0:"按下右键+ 拖动,或者",navigationHelp_Mouse_Zoom_details1:"滚动鼠标滚轮",navigationHelp_Mouse_Rotate:"旋转",navigationHelp_Mouse_Rotate_details0:"按下中键+ 拖动,或者",navigationHelp_Mouse_Rotate_details1:"按下CTRL + 左键/右键 +拖动",navigationHelp_Touch_Pan:"平移",navigationHelp_Touch_Pan_details:"单指拖动",navigationHelp_Touch_Zoom:"缩放",navigationHelp_Touch_Zoom_details:"双指捏合",navigationHelp_Touch_Rotate:"旋转",navigationHelp_Touch_Rotate_details:"双指反向拖动",navigationHelp_Touch_Tilt:"俯仰",navigationHelp_Touch_Tilt_details:"双指同向拖动",lon:"lon:",lat:"lat:",heading:"heading:",pitch:"pitch:",height:"height:",tianditu_img2:"Tianditu imagery",tianditu_img:"Tianditu imagery with annotation",tianditu_img3:"Tianditu electronic map"},this._lang=Object.assign({},this._langChinese)}return a(e,[{key:"viewer",get:function(){return this._viewer}},{key:"lang",get:function(){return this._lang}},{key:"toChinese",value:function(){this.dog=1,this._lang=Object.assign({},this._langChinese),this.init()}},{key:"toEnglish",value:function(){this.dog=0,this._lang=Object.assign({},this._langEnglish),this.init()}},{key:"init",value:function(){var e=this;e._baseLayerPickerSectionTitleLang(),e._homeButtonLang(),e._geocoderLang(),e._sceneModePickerButtonLang(),e._mapInfoLang(),e._layerControlLang(),e._navigationHelpButtonLang()}},{key:"_mapInfoLang",value:function(){var e=this;document.getElementById("anov-mapinfo-container")&&(0==this.dog?(document.getElementById("anov-mapinfo-lon").innerHTML=e._langEnglish.lon,document.getElementById("anov-mapinfo-lat").innerHTML=e._langEnglish.lat,document.getElementById("anov-mapinfo-heading").innerHTML=e._langEnglish.heading,document.getElementById("anov-mapinfo-pitch").innerHTML=e._langEnglish.pitch,document.getElementById("anov-mapinfo-height").innerHTML=e._langEnglish.height,document.getElementById("anov-mapinfo-unit").innerHTML="m"):(document.getElementById("anov-mapinfo-lon").innerHTML=e._langChinese.lon,document.getElementById("anov-mapinfo-lat").innerHTML=e._langChinese.lat,document.getElementById("anov-mapinfo-heading").innerHTML=e._langChinese.heading,document.getElementById("anov-mapinfo-pitch").innerHTML=e._langChinese.pitch,document.getElementById("anov-mapinfo-height").innerHTML=e._langChinese.height,document.getElementById("anov-mapinfo-unit").innerHTML="米"))}},{key:"_layerControlLang",value:function(){for(var e=this,t=e.viewer.container.getElementsByClassName("cesium-baseLayerPicker-itemLabel"),i=0;i<t.length;i++)1==this.dog?(t[i].innerHTML=t[i].innerHTML.replace(e._langEnglish.tianditu_img,e._langChinese.tianditu_img),t[i].innerHTML=t[i].innerHTML.replace(e._langEnglish.tianditu_img2,e._langChinese.tianditu_img2),t[i].innerHTML=t[i].innerHTML.replace(e._langEnglish.tianditu_img3,e._langChinese.tianditu_img3),e.viewer.container.getElementsByClassName("cesium-baseLayerPicker-categoryTitle")[1].style.display="none"):(t[i].innerHTML=t[i].innerHTML.replace(e._langChinese.tianditu_img,e._langEnglish.tianditu_img),t[i].innerHTML=t[i].innerHTML.replace(e._langChinese.tianditu_img2,e._langEnglish.tianditu_img2),t[i].innerHTML=t[i].innerHTML.replace(e._langChinese.tianditu_img3,e._langEnglish.tianditu_img3),e.viewer.container.getElementsByClassName("cesium-baseLayerPicker-categoryTitle")[1].style.display="block")}},{key:"_baseLayerPickerSectionTitleLang",value:function(){for(var e=this,t=e.viewer.container.getElementsByClassName("cesium-baseLayerPicker-sectionTitle"),i=0;i<t.length;i++)1==this.dog?t[i].innerHTML=t[i].innerHTML.replace(e._langEnglish.Imagery,e._langChinese.Imagery).replace(e._langEnglish.Terrain,e._langChinese.Terrain):t[i].innerHTML=t[i].innerHTML.replace(e._langChinese.Imagery,e._langEnglish.Imagery).replace(e._langChinese.Terrain,e._langEnglish.Terrain)}},{key:"_homeButtonLang",value:function(){var e=this;Cesium.defined(e.viewer.nativeObjCesium.homeButton)&&(e.viewer.nativeObjCesium.homeButton.viewModel.tooltip=e.lang.HomeButtonToolTip)}},{key:"_geocoderLang",value:function(){for(var e=this.viewer.container.getElementsByClassName("cesium-geocoder-input"),t=0;t<e.length;t++)e[t].setAttribute("placeholder",this.lang.GeocodersPlaceholder);for(var i=document.getElementsByClassName("cesium-geocoder-input"),n=0;n<i.length;n++)i[n].setAttribute("placeholder",this.lang.GeocodersPlaceholder)}},{key:"_sceneModePickerButtonLang",value:function(){var e=this;Cesium.defined(e.viewer.nativeObjCesium.sceneModePicker)&&(e.viewer.sceneModePicker.viewModel.tooltip2D=e.lang.SceneModePickerToolTip2D,e.viewer.sceneModePicker.viewModel.tooltip3D=e.lang.SceneModePickerToolTip3D,e.viewer.sceneModePicker.viewModel.tooltipColumbusView=e.lang.SceneModePickerToolTipView)}},{key:"_navigationHelpButtonLang",value:function(){var e=this;if(Cesium.defined(e.viewer.navigationHelpButton)){e.viewer.navigationHelpButton.viewModel.tooltip=e.lang.NavigationHelpButtonToolTip;var t=e.viewer.navigationHelpButton.container.getElementsByClassName("cesium-click-navigation-help")[0],i=e.viewer.navigationHelpButton.container.getElementsByClassName("cesium-touch-navigation-help")[0],n=e.viewer.navigationHelpButton.container.getElementsByClassName("cesium-navigation-button-right")[0];n.innerHTML=n.innerHTML.replace(">Touch",e.lang.navigationHelp_Touch),(n=e.viewer.navigationHelpButton.container.getElementsByClassName("cesium-navigation-button-left")[0]).innerHTML=n.innerHTML.replace(">Mouse",e.lang.navigationHelp_Mouse);var r=t.getElementsByClassName("cesium-navigation-help-pan")[0];r.innerHTML=e.lang.navigationHelp_Mouse_Pan,r.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Mouse_Pan_details;var o=t.getElementsByClassName("cesium-navigation-help-zoom")[0];o.innerHTML=e.lang.navigationHelp_Mouse_Zoom,o.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Mouse_Zoom_details0,o.parentNode.getElementsByClassName("cesium-navigation-help-details")[1].innerHTML=e.lang.navigationHelp_Mouse_Zoom_details1;var s=t.getElementsByClassName("cesium-navigation-help-rotate")[0];s.innerHTML=e.lang.navigationHelp_Mouse_Rotate,s.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Mouse_Rotate_details0,s.parentNode.getElementsByClassName("cesium-navigation-help-details")[1].innerHTML=e.lang.navigationHelp_Mouse_Rotate_details1;var a=i.getElementsByClassName("cesium-navigation-help-pan")[0];a.innerHTML=e.lang.navigationHelp_Touch_Pan,a.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Touch_Pan_details;var l=i.getElementsByClassName("cesium-navigation-help-zoom")[0];l.innerHTML=e.lang.navigationHelp_Touch_Zoom,l.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Touch_Zoom_details;var u=i.getElementsByClassName("cesium-navigation-help-rotate")[0];u.innerHTML=e.lang.navigationHelp_Touch_Tilt,u.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Touch_Tilt_details;var c=i.getElementsByClassName("cesium-navigation-help-tilt")[0];c.innerHTML=e.lang.navigationHelp_Touch_Rotate,c.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Touch_Rotate_details}}},{key:"_fullScreenButtonLang",value:function(){var e=this;if(Cesium.defined(e.viewer.fullscreenButton)){var t=Cesium.knockout.getObservable(e.viewer.fullscreenButton.viewModel,"isFullscreen");delete e.viewer.fullscreenButton.viewModel.tooltip,Cesium.knockout.defineProperty(e.viewer.fullscreenButton.viewModel,"tooltip",(function(){return e.viewer.fullscreenButton.viewModel.isFullscreenEnabled?t()?e.lang.exitFullScreen:e.lang.enterFullScreen:"Full screen unavailable"}));var i=e.viewer.fullscreenButton.container.getElementsByClassName("cesium-fullscreenButton")[0];Cesium.knockout.cleanNode(i),Cesium.knockout.applyBindings(e.viewer.fullscreenButton.viewModel,i)}}}]),e}();const Mo=function(){function e(){n(this,e)}return a(e,null,[{key:"showAllControls",value:function(e){}},{key:"showMapInfo",value:function(e){new bo(e)}},{key:"showPoiSearch",value:function(e){}},{key:"showLayerControl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"b832b9764939cbb0919148c548b669ba",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3?arguments[3]:void 0;e.nativeObjCesium.baseLayerPicker||console.error("baseLayerPicker未开启,无法显示该控件!"),To.init(e,t,i,n)}},{key:"toChinese",value:function(e){var t=new ko(e);t&&t.toChinese()}}]),e}();var Ro={Cartesian2:Cesium.Cartesian2,Cartesian3:Cesium.Cartesian3,Matrix3:Cesium.Matrix3,Matrix4:Cesium.Matrix4,Material:Cesium.Material,SceneMode:Cesium.SceneMode,SkyBox:Cesium.SkyBox,Color:Cesium.Color,Rectangle:Cesium.Rectangle,ShadowMode:Cesium.ShadowMode,JulianDate:Cesium.JulianDate,HeightReference:Cesium.HeightReference,HorizontalOrigin:Cesium.HorizontalOrigin,VerticalOrigin:Cesium.VerticalOrigin,CallbackProperty:Cesium.CallbackProperty,ClassificationType:Cesium.ClassificationType,TilesetStyle:Cesium.Cesium3DTileStyle,GeographicTilingScheme:Cesium.GeographicTilingScheme,WebMercatorTilingScheme:Cesium.WebMercatorTilingScheme,ColorMaterialProperty:Cesium.ColorMaterialProperty,ImageMaterialProperty:Cesium.ImageMaterialProperty,PolylineDashMaterialProperty:Cesium.PolylineDashMaterialProperty,PolylineGlowMaterialProperty:Cesium.PolylineGlowMaterialProperty,PolylineOutlineMaterialProperty:Cesium.PolylineOutlineMaterialProperty,PolylineArrowMaterialProperty:Cesium.PolylineArrowMaterialProperty,writeTextToCanvas:Cesium.writeTextToCanvas,CustomShaderMode:Cesium.CustomShaderMode,CustomShaderTranslucencyMode:Cesium.CustomShaderTranslucencyMode,CustomShader:Cesium.CustomShader,UniformType:Cesium.UniformType,Math:Cesium.Math,NearFarScalar:Cesium.NearFarScalar,DistanceDisplayCondition:Cesium.DistanceDisplayCondition,Resource:Cesium.Resource,useDefaultRenderLoop:Cesium.useDefaultRenderLoop,ScreenSpaceEventHandler:Cesium.ScreenSpaceEventHandler,ScreenSpaceEventType:Cesium.ScreenSpaceEventType,Transforms:Cesium.Transforms,CameraEventType:Cesium.CameraEventType,defined:Cesium.defined,Event:Cesium.Event};const So=function(){function e(t){n(this,e),this.viewer=t}return a(e,[{key:"getCommondInfo",value:function(){for(var e=performance.memory.usedJSHeapSize,t=this.viewer.scene.frameState.commandList.length,i=0,n=0,r=0;r<this.viewer.scene.frameState.commandList.length;r++){var o=this.viewer.scene.frameState.commandList[r];if(o&&o.vertexArray){var s=o.instanceCount||1;i+=o.vertexArray.numberOfVertices*s;var a=1;o.vertexArray.indexBuffer&&(a=o.vertexArray.indexBuffer.numberOfIndices),n+=a*s}}return{trianglesCount:n/3,verticesCount:i,drawCall:t,memorySize:e}}}]),e}();function jo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Lo=function(e){c(i,e);var t=jo(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return cr.getLayerType("vector")}},{key:"clear",value:function(){return this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=Ae.CLEARED,this}}]),i}(cr);cr.registerType("vector");const Io=Lo;function Do(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Bo=function(e){c(o,e);var t,i,r=Do(o);function o(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,o),!e)throw new Error("GeoJsonLayer:data数据源必选传入!");return(t=r.call(this,i))._nativeObjCesium=Cesium.GeoJsonDataSource.load(e,i),t._state=Ae.INITIALIZED,t}return a(o,[{key:"type",get:function(){return cr.getLayerType("geojson")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium&&this._nativeObjCesium.then((function(e){e.show=t._show}))}},{key:"_createBillboard",value:function(e){if(e.position&&e.billboard)return ji.fromEntity(e)}},{key:"_createPoint",value:function(e){if(e.position&&e.point)return mn.fromEntity(e)}},{key:"_createLabel",value:function(e){if(e.position&&e.label)return sn.fromEntity(e)}},{key:"_createPolyline",value:function(e){if(e.polyline)return wn.fromEntity(e)}},{key:"_createPolygon",value:function(e){if(e.polygon)return gn.fromEntity(e)}},{key:"_createModel",value:function(e,t){if(e)return mt.fromEntity(e,t)}},{key:"eachGraphic",value:(i=U(q().mark((function e(t,i){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._nativeObjCesium){e.next=3;break}return e.next=3,this._nativeObjCesium.then((function(e){e.entities.values.forEach((function(e){t.call(i,e)}))}));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"toVectorLayer",value:(t=U(q().mark((function e(){var t,i=this;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Io(this.id),e.next=3,this.eachGraphic((function(e){e.billboard?t.addGraphic(i._createBillboard(e)):e.polyline?t.addGraphic(i._createPolyline(e)):e.polygon&&t.addGraphic(i._createPolygon(e))}),this);case 3:return e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"toModelLayer",value:function(e){var t=this,i=new ModelLayer(this.id);return this.eachGraphic((function(n){i.addGraphic(t._createModel(n,e))}),this),i}}]),o}(cr);cr.registerType("geojson");const Go=Bo,Ho={bindPopup_highlight_tooltip:(No=U(q().mark((function e(t,i){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.bindPopup=function(e){if(t.viewer=e.viewer||window.viewer,t.viewer){var i=new ze(e);i.install(t),i.addEventListener(ae.CLOSE,(function(){t.removeHighlight()}))}else console.error("必须传入三维球对象!")},t.removeHighlight=function(){t.selected&&(t.viewer.removeLayer(t.selected.layer),t.selected=null)},t.layerEvent=new Qn,t.addEventListener=function(e,i,n){return t.layerEvent.addEventListener(e,i,n||t),t},t.viewer&&t.viewer.addEventListener(X.CLICK,(function(e){t.removeHighlight()})),t.addEventListener(X.CLICK,function(){var e=U(q().mark((function e(n){var r,o,s;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.removeHighlight(),n.feature){e.next=3;break}return e.abrupt("return");case 3:return r=go.imageryLayerFeatureInfo2Geojson(n.feature),o=new Go(r,{}),e.next=7,o.toVectorLayer();case 7:s=e.sent,t.selected={layer:s},t.viewer&&t.viewer.addLayer(s),s.eachGraphic((function(e){e._selectedHighlight=i.selectedHighlight,e.selectedHighlight()}));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 6:case"end":return e.stop()}}),e)}))),function(e,t){return No.apply(this,arguments)})};var No;const Fo=function(){function e(){n(this,e)}return a(e,null,[{key:"createAmapImageryLayer",value:function(){return new w(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createBaiduImageryLayer",value:function(){return new R(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createTdtImageryLayer",value:function(){return new j(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createTencentImageryLayer",value:function(){return new I(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createArcGisImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"dark"===e.style?new H(e):(e.url||(e.url="https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),Cesium.ArcGisMapServerImageryProvider.fromUrl(e.url,e))}},{key:"createSingleTileImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.SingleTileImageryProvider(e)}},{key:"createWMSImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.WebMapServiceImageryProvider(e)}},{key:"createWMTSImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.WebMapTileServiceImageryProvider(e)}},{key:"createXYZImageryLayer",value:function(){return new z(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createUrlTemplateImageryLayer",value:function(){return new z(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createCoordImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.TileCoordinatesImageryProvider(e)}},{key:"createGridImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.GridImageryProvider(e)}},{key:"createMapboxImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.MapboxImageryProvider(e)}},{key:"createMapboxStyleImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.MapboxStyleImageryProvider(e)}},{key:"createTMSImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.TileMapServiceImageryProvider(e)}},{key:"createGoogleImageryImageryLayer",value:function(){return new B(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createImageryLayer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0;switch(e){case l.AMAP:i=this.createAmapImageryLayer(t);break;case l.BAIDU:i=this.createBaiduImageryLayer(t);break;case l.TDT:i=this.createTdtImageryLayer(t);break;case l.TENCENT:i=this.createTencentImageryLayer(t);break;case l.ARCGIS:i=this.createArcGisImageryLayer(t);break;case l.SINGLE_TILE:i=this.createSingleTileImageryLayer(t);break;case l.WMS:i=this.createWMSImageryLayer(t);break;case l.WMTS:i=this.createWMTSImageryLayer(t);break;case l.XYZ:i=this.createXYZImageryLayer(t);break;case l.COORD:i=this.createCoordImageryLayer(t);break;case l.GRID:i=this.createGridImageryLayer(t);break;case l.MAPBOX:i=this.createMapboxImageryLayer(t);break;case l.MAPBOX_STYLE:i=this.createMapboxStyleImageryLayer(t);break;case l.TMS:i=this.createTMSImageryLayer(t);break;case l.Google:i=this.createGoogleImageryImageryLayer(t)}return Ho.bindPopup_highlight_tooltip(i,t),i}}]),e}();function zo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Wo="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}";const Uo=function(e){c(i,e);var t=zo(i);function i(){var e,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,i);var s=Array.isArray(o.keys)?o.keys.filter(Boolean):[];if(0===s.length)throw new Error("[MultiKeyTdtImageryProvider] keys 至少需要一个元素");var a=o.style||"vec";return(r=t.call(this,{url:[o.protocol||"",Wo].join(""),subdomains:["0","1","2","3","4","5","6","7"],tilingScheme:new Cesium.WebMercatorTilingScheme,maximumLevel:18,customTags:{style:function(){return r._style},key:function(){return r._keys[r._currentKeyIndex]}}}))._keys=s,r._currentKeyIndex=0,r._style=a,r._errorThreshold=o.errorThreshold||5,r._errorResetMs=o.errorResetMs||3e4,r._minAutoSwitchIntervalMs=null!==(e=o.minAutoSwitchIntervalMs)&&void 0!==e?e:0,r._consecutiveErrorCount=0,r._lastErrorTime=0,r._lastAutoSwitchTime=0,r.keySwitched=new Cesium.Event,r.errorEvent.addEventListener((function(e){return r._onError(e)})),r}return a(i,[{key:"currentKey",get:function(){return this._keys[this._currentKeyIndex]}},{key:"currentKeyIndex",get:function(){return this._currentKeyIndex}},{key:"consecutiveErrorCount",get:function(){return this._consecutiveErrorCount}},{key:"keys",get:function(){return this._keys.slice()}},{key:"_onError",value:function(){var e=Date.now();if(this._lastErrorTime&&e-this._lastErrorTime>this._errorResetMs&&(this._consecutiveErrorCount=0),this._lastErrorTime=e,this._consecutiveErrorCount++,this._consecutiveErrorCount>=this._errorThreshold){if(this._minAutoSwitchIntervalMs>0&&this._lastAutoSwitchTime>0&&e-this._lastAutoSwitchTime<this._minAutoSwitchIntervalMs)return void(this._consecutiveErrorCount=0);this._switchToNextKey("error-threshold")}}},{key:"_switchToNextKey",value:function(e){var t=this._currentKeyIndex;this._currentKeyIndex=(this._currentKeyIndex+1)%this._keys.length,this._consecutiveErrorCount=0,this._lastAutoSwitchTime=Date.now(),this.keySwitched.raiseEvent({fromIndex:t,toIndex:this._currentKeyIndex,fromKey:this._keys[t],toKey:this._keys[this._currentKeyIndex],reason:e})}},{key:"nextKey",value:function(){this._switchToNextKey("manual-next")}},{key:"prevKey",value:function(){var e=this._currentKeyIndex;this._currentKeyIndex=(this._currentKeyIndex-1+this._keys.length)%this._keys.length,this._consecutiveErrorCount=0,this.keySwitched.raiseEvent({fromIndex:e,toIndex:this._currentKeyIndex,fromKey:this._keys[e],toKey:this._keys[this._currentKeyIndex],reason:"manual-prev"})}},{key:"resetErrorCount",value:function(){this._consecutiveErrorCount=0}}]),i}(z);const Vo=function(){function e(t,i){n(this,e),t||console.error("viewer是必传参数!"),2!==i.length&&console.error("layersArr参数长度必须为2"),this.viewer=t,this.layer1=null,this.layer2=null,this.slider=null,this.handler=null,this.slider=document.createElement("div");var r=this.slider;r.style.position="absolute",r.style.left="50%",r.style.top="0",r.style.backgroundColor="#d3d3d3",r.style.width="5px",r.style.height="100%",r.style.zIndex=9999,r.onmouseover=function(){r.style.cursor="ew-resize"},t.container.appendChild(r),t.scene.splitPosition=r.offsetLeft/r.parentElement.offsetWidth,this.handler=new Cesium.ScreenSpaceEventHandler(r);var o=this.handler,s=!1;function a(e){if(s){var i=e.endPosition.x,n=(r.offsetLeft+i)/r.parentElement.offsetWidth;r.style.left=100*n+"%",t.scene.splitDirection=n}}o.setInputAction((function(){s=!0}),Cesium.ScreenSpaceEventType.LEFT_DOWN),o.setInputAction((function(){s=!0}),Cesium.ScreenSpaceEventType.PINCH_START),o.setInputAction(a,Cesium.ScreenSpaceEventType.MOUSE_MOVE),o.setInputAction(a,Cesium.ScreenSpaceEventType.PINCH_MOVE),o.setInputAction((function(){s=!1}),Cesium.ScreenSpaceEventType.LEFT_UP),o.setInputAction((function(){s=!1}),Cesium.ScreenSpaceEventType.PINCH_END),this.changeLayers(i)}return a(e,[{key:"changeLayers",value:function(e){this.viewer.imageryLayers.removeAll(),this.layer1=this.viewer.imageryLayers.addImageryProvider(e[0]),this.layer2=this.viewer.imageryLayers.addImageryProvider(e[1]),this.layer2.splitDirection=Cesium.SplitDirection.LEFT}},{key:"destroy",value:function(){this.viewer.imageryLayers.remove(this.layer2),this.slider.parentNode.removeChild(this.slider),this.handler=null}},{key:"changeLeftRight",value:function(){this.layer2.splitDirection=-this.layer2.splitDirection}}]),e}();const qo={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"};const Zo=function(){function e(){n(this,e)}return a(e,null,[{key:"createEllipsoidTerrain",value:function(e){return new Cesium.EllipsoidTerrainProvider(e)}},{key:"createUrlTerrain",value:function(e){return Cesium.CesiumTerrainProvider.fromUrl(e.url,e)}},{key:"createGoogleTerrain",value:function(e){return console.warn("[TerrainFactory] GoogleEarthEnterprise is no longer supported in Cesium 1.143. Falling back to EllipsoidTerrainProvider."),new Cesium.EllipsoidTerrainProvider(e)}},{key:"createArcgisTerrain",value:function(e){return Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}},{key:"createVRTerrain",value:function(e){return console.warn("[TerrainFactory] VRTheWorld is no longer supported in Cesium 1.143. Falling back to EllipsoidTerrainProvider."),new Cesium.EllipsoidTerrainProvider(e)}},{key:"createTerrain",value:function(e,t){var i=void 0;switch(e){case qo.NONE:i=this.createEllipsoidTerrain(t);break;case qo.XYZ:i=this.createUrlTerrain(t);break;case qo.GOOGLE:i=this.createGoogleTerrain(t);break;case qo.ARCGIS:i=this.createArcgisTerrain(t);break;case qo.VR:i=this.createVRTerrain(t)}return i}}]),e}();function Yo(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ko(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Yo(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Yo(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Qo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Xo={size:18,pixelRange:40,gradient:{1e-4:Cesium.Color.DEEPSKYBLUE,.001:Cesium.Color.GREEN,.01:Cesium.Color.ORANGE,.1:Cesium.Color.RED},outColor:null,boderColor:null,fontSize:12,fontColor:Cesium.Color.BLACK,style:"circle",height:-1e3},Jo=function(e){c(i,e);var t=Qo(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._nativeObjCesium=new Cesium.CustomDataSource(r.name),e._options=Ko(Ko({},Xo),r),e._nativeObjCesium.clustering.enabled=!0,e._nativeObjCesium.clustering.clusterEvent.addEventListener(e._clusterEventHandler,h(e)),e._nativeObjCesium.clustering.pixelRange=e._options.pixelRange,e._state=Ae.INITIALIZED,e}return a(i,[{key:"type",get:function(){return cr.getLayerType("cluster")}},{key:"enableCluster",set:function(e){this._nativeObjCesium.clustering.enabled=e}},{key:"setHeight",value:function(e,t){var i=Cesium.Cartographic.fromCartesian(e);return i.height=t,Cesium.Cartographic.toCartesian(i)}},{key:"_drawCircle",value:function(e,t){var i=this._options.size*(t+1),n=e.toCssColorString()+"-"+i;if(!this._cache[n]){var r,o=document.createElement("canvas");o.width=i,o.height=i;var s,a=o.getContext("2d");if(a.save(),a.scale(i/24,i/24),a.fillStyle=(null===(r=this._options.outColor)||void 0===r?void 0:r.toCssColorString())||e.withAlpha(.2).toCssColorString(),a.beginPath(),a.arc(12,12,this._options.boderColor?12:11,0,2*Math.PI),a.closePath(),a.fill(),this._options.boderColor)a.beginPath(),a.arc(12,12,10,0,2*Math.PI),a.fillStyle=null===(s=this._options.boderColor)||void 0===s?void 0:s.toCssColorString(),a.fill(),a.closePath();a.beginPath(),a.arc(12,12,8,0,2*Math.PI),a.fillStyle=e.toCssColorString(),a.fill(),a.closePath(),a.restore(),this._cache[n]=o.toDataURL()}return this._cache[n]}},{key:"_drawClustering",value:function(e,t){var i=this._options.size*(t+1),n=e.toCssColorString()+"-"+i,r=-Math.PI/12,o=Math.PI/2,s=Math.PI/6;if(!this._cache[n]){var a=document.createElement("canvas");a.width=i,a.height=i;var l=a.getContext("2d");l.save(),l.scale(i/24,i/24),l.beginPath(),l.arc(12,12,6,0,2*Math.PI),l.fillStyle=e.toCssColorString(),l.fill(),l.closePath(),l.lineWidth=2;for(var u=0;u<3;u++)l.beginPath(),l.arc(12,12,8,r,r+o,!1),l.strokeStyle=e.withAlpha(.4).toCssColorString(),l.stroke(),l.arc(12,12,11,r,r+o,!1),l.strokeStyle=e.withAlpha(.2).toCssColorString(),l.stroke(),l.closePath(),r=r+o+s;l.restore(),this._cache[n]=a.toDataURL()}return this._cache[n]}},{key:"_clusterEventHandler",value:function(e,t){if(this._nativeObjCesium.clustering.enabled&&(t.billboard.show=!0,t.label.font="bold ".concat(this._options.fontSize,"px sans-serif"),t.label.fillColor=this._options.fontColor,t.label.disableDepthTestDistance=Number.POSITIVE_INFINITY,this._nativeObjCesium.entities.values.length)){var i=this._nativeObjCesium.entities.values.length||0;for(var n in this._options.gradient)if(e.length>=i*n){var r=String(e.length).length;"circle"===this._options.style?t.billboard.image=this._drawCircle(this._options.gradient[n],r):"custom"===this._options.style?t.billboard.image=this._options.gradient[n]:t.billboard.image=this._drawClustering(this._options.gradient[n],r),t.billboard.label=t.label,t.billboard.eyeOffset.z=-1,t.label.show=!0,t.label.pixelOffset=1===r?new Cesium.Cartesian2(-2,3):new Cesium.Cartesian2(-5*(r-1),5)}else e.length<=1&&(t.label.show=!1)}}},{key:"clear",value:function(){return this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=Ae.CLEARED,this}}]),i}(cr);cr.registerType("cluster");const $o=Jo;function es(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ts=function(e){c(i,e);var t=es(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._nativeObjCesium=Cesium.CzmlDataSource.load(r.url,r),e._state=Ae.INITIALIZED,e}return a(i,[{key:"type",get:function(){return cr.getLayerType("czml")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium&&this._nativeObjCesium.then((function(e){e.show=t._show}))}},{key:"eachGraphic",value:function(e,t){if(this._nativeObjCesium)return this._nativeObjCesium.then((function(i){i.entities.values.forEach((function(i){e.call(t,i)}))})),this}}]),i}(cr);cr.registerType("czml");const is=ts;function ns(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var rs=function(e){c(i,e);var t=ns(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return cr.getLayerType("dynamic")}},{key:"clear",value:function(){return this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=Ae.CLEARED,this}}]),i}(cr);cr.registerType("dynamic");const os=rs;function ss(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function as(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ss(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ss(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function ls(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var us={name:"",count:10,maximumLevel:21,dataProperty:"",callback:function(){return null}},cs=function(e){c(i,e);var t=ls(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,i),(e=t.call(this,r))._url=r.url,e._options=as(as({},us),r),e._levelLayers={},e._tileWidth=256,e._tileHeight=256,e._maximumLevel=e._options.maximumLevel,e._tilingScheme=e._options.tilingScheme||new Cesium.GeographicTilingScheme,e._rectangle=e._tilingScheme.rectangle,e._credit=void 0,e._token=void 0;for(var o=0;o<e.maximumLevel;o++)e._levelLayers[String(o)]=new Io(e.businessID+"-grid-"+o);return e._viewer=void 0,e._imageryLayer=void 0,e._imagery=document.createElement("canvas"),e._imagery.width=e._tileWidth,e._imagery.height=e._tileHeight,e._state=Ae.INITIALIZED,e}return a(i,[{key:"type",get:function(){return cr.getLayerType("feature_grid")}},{key:"url",get:function(){return this._url}},{key:"show",get:function(){return this._show},set:function(e){var t=this;return this._show=e,Object.keys(this._levelLayers).forEach((function(i){t._levelLayers[i].show=e})),this}},{key:"token",get:function(){return this._token}},{key:"tileWidth",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},{key:"tileHeight",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},{key:"maximumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},{key:"minimumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}},{key:"tilingScheme",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},{key:"rectangle",get:function(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},{key:"ready",get:function(){return!!this._url}},{key:"credit",get:function(){return this._credit}},{key:"hasAlphaChannel",get:function(){return!0}},{key:"_onAdd",value:function(e){var t=this;this._viewer=e,this._imageryLayer=this._viewer.imageryLayers.addImageryProvider(this),Object.keys(this._levelLayers).forEach((function(e){t._viewer.addLayer(t._levelLayers[e])})),this._state=Ae.ADDED}},{key:"_onRemove",value:function(){var e=this;this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach((function(t){e._viewer.removeLayer(e._levelLayers[t])})),this._state=Ae.REMOVED}},{key:"getTileCredits",value:function(e,t,i){}},{key:"requestImage",value:function(e,t,i,n){var r=this,o=this._levelLayers[String(i)],s=this._tilingScheme.tileXYToRectangle(e,t,i);return this._viewer&&s&&o&&Cesium.Rectangle.intersection(s,this._viewer.viewBoundsRectangle)&&Cesium.Resource.fetchJson({url:this._url,queryParameters:{minX:Cesium.Math.toDegrees(s.west),minY:Cesium.Math.toDegrees(s.south),maxX:Cesium.Math.toDegrees(s.east),maxY:Cesium.Math.toDegrees(s.north),count:this._options.count}}).then((function(e){var t=e;if(r._options.dataProperty&&(t=e[r._options.dataProperty]),t&&t.length){for(var n=i+3;n<r._maximumLevel;n++)r._levelLayers[String(n)]&&r._levelLayers[String(n)].clear();t.forEach((function(e){var t=r._options.callback(e);t&&o.addGraphic(t)}))}})),this._imagery}},{key:"clear",value:function(){var e=this;Object.keys(this._levelLayers).forEach((function(t){e._levelLayers[t].clear()})),this._state=Ae.CLEARED}}]),i}(cr);cr.registerType("feature_grid");const hs=cs;function fs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ps=function(e){c(i,e);var t=fs(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,i),!r.url)throw new Error("GpxLayer: url不能为空!");return(e=t.call(this,r))._nativeObjCesium=Cesium.GpxDataSource.load(r.url,r),e._state=Ae.INITIALIZED,e}return a(i,[{key:"type",get:function(){return cr.getLayerType("gpx")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium&&this._nativeObjCesium.then((function(e){e.show=t._show}))}},{key:"eachGraphic",value:function(e,t){if(this._nativeObjCesium)return this._nativeObjCesium.then((function(i){i.entities.values.forEach((function(i){e.call(t,i)}))})),this}}]),i}(cr);cr.registerType("gpx");const ms=ps;function ds(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var vs=function(e){c(i,e);var t=ds(i);function i(){var e;return n(this,i),(e=t.call(this))._nativeObjCesium=new Cesium.PrimitiveCollection,e._isGround=!0,e._state=Ae.INITIALIZED,e}return a(i,[{key:"type",get:function(){return cr.getLayerType("ground_primitive")}},{key:"clear",value:function(){return this._nativeObjCesium&&this._nativeObjCesium.removeAll(),this._cache={},this._state=Ae.CLEARED,this}}]),i}(cr);cr.registerType("ground_primitive");const ys=vs;function gs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var _s=new Cesium.Cartesian3,Cs=new Cesium.Cartesian3,bs=new Cesium.Cartesian3,ws=!1,Ps=new WeakMap,Os=function(e){c(i,e);var t=gs(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=de.create("div","html-layer",void 0),r._nativeObjCesium.setAttribute("id",r.businessID),r._renderRemoveCallback=void 0,r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return cr.getLayerType("html")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium.style.visibility=this._show?"visible":"hidden",Object.keys(this._cache).forEach((function(i){t._cache[i].show=e}))}},{key:"_onAdd",value:function(e){var t=this;this._viewer=e,this._viewer.layerContainer.appendChild(this._nativeObjCesium);var i=this._viewer.scene;this._renderRemoveCallback=i.postRender.addEventListener((function(){var n=t._viewer.camera.positionWC,r=t._viewer.camera.direction,o=t._viewer.scene.mode===Cesium.SceneMode.SCENE3D;o||(n=He.transformCartographicToCartesian(t._viewer.camera.positionCartographic));var s=!0;ws&&(s=!Cesium.Cartesian3.equalsEpsilon(n,Cs,.01)||Cesium.Cartesian3.dot(r,bs)<=.99999),s&&(Cesium.Cartesian3.clone(n,Cs),Cesium.Cartesian3.clone(r,bs),ws=!0);var a=o&&!(t._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider);t.eachGraphic((function(t){if(t&&t.position){var r=He.transformWGS84ToCartesian(t.position),l=i.globe.ellipsoid.geodeticSurfaceNormal(r,new Cesium.Cartesian3),u=i.cartesianToCanvasCoordinates(r,new Cesium.Cartesian2),c=!0;if(o){var h=t._style||{},f=!0===h.backFaceCulling,p=!0===h.terrainOcclusion;if(s){if(f&&(Cesium.Cartesian3.subtract(n,r,_s),Cesium.Cartesian3.dot(l,_s)<=0&&(c=!1)),c&&p&&a){Cesium.Cartesian3.subtract(r,n,_s),Cesium.Cartesian3.normalize(_s,_s);var m=new Cesium.Ray(n,_s),d=i.globe.pick(m,i);if(d)Cesium.Cartesian3.distance(n,d)<Cesium.Cartesian3.distance(n,r)&&(c=!1)}Ps.set(t,c)}else{var v=Ps.get(t);c=void 0===v||v}}t._updateStyle(u,Cesium.Cartesian3.distance(r,n),c,e)}}),t)}),this),this._state=Ae.ADDED}},{key:"_onRemove",value:function(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._nativeObjCesium),this._state=Ae.REMOVED}},{key:"clear",value:function(){for(;this._nativeObjCesium.hasChildNodes();)this._nativeObjCesium.removeChild(this._nativeObjCesium.firstChild);return this._cache={},this._state=Ae.CLEARED,this}},{key:"flyTo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-90,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=[];this.eachGraphic((function(t){if(t&&t.position&&e._viewer){var i=He.transformWGS84ToCartesian(t.position);s.push(i)}})),s.length>0&&uo.flyToPoints(this._viewer,s,t,i,n,r,o)}}]),i}(cr);cr.registerType("html");const xs=Os;function Es(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var As=function(e){c(i,e);var t=Es(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,i),!e)throw new Error("KmlLayer: data不能为空!");return(r=t.call(this,o))._nativeObjCesium=Cesium.KmlDataSource.load(e,o),r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return cr.getLayerType("kml")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium&&this._nativeObjCesium.then((function(e){e.show=t._show}))}},{key:"eachGraphic",value:function(e,t){if(this._nativeObjCesium)return this._nativeObjCesium.then((function(i){i.entities.values.forEach((function(i){e.call(t,i)}))})),this}}]),i}(cr);cr.registerType("kml");const Ts=As;function ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ms=function(e){c(i,e);var t=ks(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._dataSource=Cesium.GeoJsonDataSource.load(e.url),r._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._initLabel(),r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return cr.getLayerType("label")}},{key:"_createLabel",value:function(e){if(e.position&&e.name)return sn.fromEntity(e)}},{key:"_initLabel",value:function(){var e=this;this._dataSource.then((function(t){t.entities.values.forEach((function(t){var i=e._createLabel(t);e.addGraphic(i)}))}))}}]),i}(cr);cr.registerType("label");const Rs=Ms;function Ss(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var js=function(e){c(i,e);var t=Ss(i);function i(){var e;return n(this,i),(e=t.call(this))._nativeObjCesium=new Cesium.PrimitiveCollection,e._points=e._nativeObjCesium.add(new Cesium.PointPrimitiveCollection),e._labels=e._nativeObjCesium.add(new Cesium.LabelCollection),e._billboards=e._nativeObjCesium.add(new Cesium.BillboardCollection),e._polylines=e._nativeObjCesium.add(new Cesium.PolylineCollection),e._primitives=e._nativeObjCesium.add(new Cesium.PrimitiveCollection),Cesium.CloudCollection&&(e._clouds=e._nativeObjCesium.add(new Cesium.CloudCollection)),e._state=Ae.INITIALIZED,e}return a(i,[{key:"type",get:function(){return cr.getLayerType("primitive")}},{key:"points",get:function(){return this._points}},{key:"labels",get:function(){return this._labels}},{key:"billboards",get:function(){return this._billboards}},{key:"polylines",get:function(){return this._polylines}},{key:"primitives",get:function(){return this._primitives}},{key:"clouds",get:function(){return this._clouds}},{key:"clear",value:function(){return this._nativeObjCesium&&this._nativeObjCesium.removeAll(),this._points=this._nativeObjCesium.add(new Cesium.PointPrimitiveCollection),this._labels=this._nativeObjCesium.add(new Cesium.LabelCollection),this._billboards=this._nativeObjCesium.add(new Cesium.BillboardCollection),this._polylines=this._nativeObjCesium.add(new Cesium.PolylineCollection),Cesium.CloudCollection&&(this._clouds=this._nativeObjCesium.add(new Cesium.CloudCollection)),this._cache={},this._state=Ae.CLEARED,this}}]),i}(cr);cr.registerType("primitive");const Ls=js;function Is(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ds=function(e){c(i,e);var t=Is(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.PrimitiveCollection,r._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return cr.getLayerType("tileset")}},{key:"clear",value:function(){return this._nativeObjCesium.removeAll(),this._cache={},this._state=Ae.CLEARED,this}},{key:"flyTo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-90,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=[];this.eachGraphic((function(t){if(t&&t.position&&e._viewer){var i=Transform.transformWGS84ToCartesian(t.position);s.push(i)}})),s.length>0&&LocateUtil.flyToPoints(this._viewer,s,t,i,n,r,o)}}]),i}(cr);cr.registerType("tileset");const Bs=Ds;function Gs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Hs=function(e){c(i,e);var t=Gs(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,i),!e)throw new Error("TopoJsonLayer:the data invalid");return(r=t.call(this,e,o))._state=Ae.INITIALIZED,r}return a(i,[{key:"type",get:function(){return cr.getLayerType("topojson")}}]),i}(Go);Go.registerType("topojson");const Ns=Hs;var Fs=i(929),zs=Math.PI,Ws=2*zs,Us=zs/180,Vs=180/zs,qs=1440,Zs=398600.8,Ys=6378.135,Ks=60/Math.sqrt(Ys*Ys*Ys/Zs),Qs=Ys*Ks/60,Xs=1/Ks,Js=.001082616,$s=-253881e-11,ea=-165597e-11,ta=$s/Js,ia=2/3;function na(e,t){for(var i=[31,e%4==0?29:28,31,30,31,30,31,31,30,31,30,31],n=Math.floor(t),r=1,o=0;n>o+i[r-1]&&r<12;)o+=i[r-1],r+=1;var s=r,a=n-o,l=24*(t-n),u=Math.floor(l);l=60*(l-u);var c=Math.floor(l);return{mon:s,day:a,hr:u,minute:c,sec:60*(l-c)}}function ra(e,t,i,n,r,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return 367*e-Math.floor(7*(e+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+i+1721013.5+((s/6e4+o/60+r)/60+n)/24}function oa(e,t,i,n,r,o,s){if(e instanceof Date){var a=e;return ra(a.getUTCFullYear(),a.getUTCMonth()+1,a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())}return ra(e,t,i,n,r,o,s)}function sa(e,t){var i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C=e.e3,b=e.ee2,w=e.peo,P=e.pgho,O=e.pho,x=e.pinco,E=e.plo,A=e.se2,T=e.se3,k=e.sgh2,M=e.sgh3,R=e.sgh4,S=e.sh2,j=e.sh3,L=e.si2,I=e.si3,D=e.sl2,B=e.sl3,G=e.sl4,H=e.t,N=e.xgh2,F=e.xgh3,z=e.xgh4,W=e.xh2,U=e.xh3,V=e.xi2,q=e.xi3,Z=e.xl2,Y=e.xl3,K=e.xl4,Q=e.zmol,X=e.zmos,J=t.init,$=t.opsmode,ee=t.ep,te=t.inclp,ie=t.nodep,ne=t.argpp,re=t.mp;_=X+119459e-10*H,"y"===J&&(_=X),g=_+.0335*Math.sin(_);var oe=A*(l=.5*(d=Math.sin(g))*d-.25)+T*(u=-.5*d*Math.cos(g)),se=L*l+I*u,ae=D*l+B*u+G*d,le=k*l+M*u+R*d,ue=S*l+j*u;return _=Q+.00015835218*H,"y"===J&&(_=Q),g=_+.1098*Math.sin(_),c=oe+(b*(l=.5*(d=Math.sin(g))*d-.25)+C*(u=-.5*d*Math.cos(g))),p=se+(V*l+q*u),m=ae+(Z*l+Y*u+K*d),h=le+(N*l+F*u+z*d),f=ue+(W*l+U*u),"n"===J&&(m-=E,h-=P,f-=O,te+=p-=x,ee+=c-=w,o=Math.sin(te),r=Math.cos(te),te>=.2?(ne+=h-=r*(f/=o),ie+=f,re+=m):(i=o*(a=Math.sin(ie)),n=o*(s=Math.cos(ie)),i+=f*s+p*r*a,n+=-f*a+p*r*s,(ie%=Ws)<0&&"a"===$&&(ie+=Ws),v=re+ne+r*ie,v+=m+h-p*ie*o,y=ie,(ie=Math.atan2(i,n))<0&&"a"===$&&(ie+=Ws),Math.abs(y-ie)>zs&&(ie<y?ie+=Ws:ie-=Ws),ne=v-(re+=m)-r*ie)),{ep:ee,inclp:te,nodep:ie,argpp:ne,mp:re}}function aa(e){var t=(e-2451545)/36525,i=-62e-7*t*t*t+.093104*t*t+3164400184.812866*t+67310.54841;return(i=i*Us/240%Ws)<0&&(i+=Ws),i}function la(){return(arguments.length<=0?void 0:arguments[0])instanceof Date||arguments.length>1?aa(oa.apply(void 0,arguments)):aa.apply(void 0,arguments)}function ua(e,t){var i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O,x,E,A;e.t=t,e.error=0;var T=e.mo+e.mdot*e.t,k=e.argpo+e.argpdot*e.t,M=e.nodeo+e.nodedot*e.t;u=k,b=T;var R=e.t*e.t;if(P=M+e.nodecf*R,y=1-e.cc1*e.t,g=e.bstar*e.cc4*e.t,_=e.t2cof*R,1!==e.isimp){a=e.omgcof*e.t;var S=1+e.eta*Math.cos(T);b=T+(v=a+e.xmcof*(S*S*S-e.delmo)),u=k-v,p=(f=R*e.t)*e.t,y=y-e.d2*R-e.d3*f-e.d4*p,g+=e.bstar*e.cc5*(Math.sin(b)-e.sinmao),_=_+e.t3cof*f+p*(e.t4cof+e.t*e.t5cof)}w=e.no;var j=e.ecco;if(C=e.inclo,"d"===e.method){m=e.t;var L=function(e){var t,i,n,r,o,s,a,l,u=e.irez,c=e.d2201,h=e.d2211,f=e.d3210,p=e.d3222,m=e.d4410,d=e.d4422,v=e.d5220,y=e.d5232,g=e.d5421,_=e.d5433,C=e.dedt,b=e.del1,w=e.del2,P=e.del3,O=e.didt,x=e.dmdt,E=e.dnodt,A=e.domdt,T=e.argpo,k=e.argpdot,M=e.t,R=e.tc,S=e.gsto,j=e.xfact,L=e.xlamo,I=e.no,D=e.atime,B=e.em,G=e.argpm,H=e.inclm,N=e.xli,F=e.mm,z=e.xni,W=e.nodem,U=e.nm,V=.13130908,q=2.8843198,Z=.37448087,Y=5.7686396,K=.95240898,Q=1.8014998,X=1.050833,J=4.4108898,$=259200,ee=0,te=0,ie=(S+.0043752690880113*R)%Ws;if(B+=C*M,H+=O*M,G+=A*M,W+=E*M,F+=x*M,0!==u){(0===D||M*D<=0||Math.abs(M)<Math.abs(D))&&(D=0,z=I,N=L),t=M>0?720:-720;for(var ne=381;381===ne;)2!==u?(a=b*Math.sin(N-V)+w*Math.sin(2*(N-q))+P*Math.sin(3*(N-Z)),o=z+j,s=b*Math.cos(N-V)+2*w*Math.cos(2*(N-q))+3*P*Math.cos(3*(N-Z)),s*=o):(n=(l=T+k*D)+l,i=N+N,a=c*Math.sin(n+N-Y)+h*Math.sin(N-Y)+f*Math.sin(l+N-K)+p*Math.sin(-l+N-K)+m*Math.sin(n+i-Q)+d*Math.sin(i-Q)+v*Math.sin(l+N-X)+y*Math.sin(-l+N-X)+g*Math.sin(l+i-J)+_*Math.sin(-l+i-J),o=z+j,s=c*Math.cos(n+N-Y)+h*Math.cos(N-Y)+f*Math.cos(l+N-K)+p*Math.cos(-l+N-K)+v*Math.cos(l+N-X)+y*Math.cos(-l+N-X)+2*(m*Math.cos(n+i-Q)+d*Math.cos(i-Q)+g*Math.cos(l+i-J)+_*Math.cos(-l+i-J)),s*=o),Math.abs(M-D)>=720?ne=381:(te=M-D,ne=0),381===ne&&(N+=o*t+a*$,z+=a*t+s*$,D+=t);U=z+a*te+s*te*te*.5,r=N+o*te+a*te*te*.5,1!==u?(F=r-2*W+2*ie,ee=U-I):(F=r-W-G+ie,ee=U-I),U=I+ee}return{atime:D,em:B,argpm:G,inclm:H,xli:N,mm:F,xni:z,nodem:W,dndt:ee,nm:U}}({irez:e.irez,d2201:e.d2201,d2211:e.d2211,d3210:e.d3210,d3222:e.d3222,d4410:e.d4410,d4422:e.d4422,d5220:e.d5220,d5232:e.d5232,d5421:e.d5421,d5433:e.d5433,dedt:e.dedt,del1:e.del1,del2:e.del2,del3:e.del3,didt:e.didt,dmdt:e.dmdt,dnodt:e.dnodt,domdt:e.domdt,argpo:e.argpo,argpdot:e.argpdot,t:e.t,tc:m,gsto:e.gsto,xfact:e.xfact,xlamo:e.xlamo,no:e.no,atime:e.atime,em:j,argpm:u,inclm:C,xli:e.xli,mm:b,xni:e.xni,nodem:P,nm:w});j=L.em,u=L.argpm,C=L.inclm,b=L.mm,P=L.nodem,w=L.nm}if(w<=0)return e.error=2,[!1,!1];var I=Math.pow(Ks/w,ia)*y*y;if(w=Ks/Math.pow(I,1.5),(j-=g)>=1||j<-.001)return e.error=1,[!1,!1];j<1e-6&&(j=1e-6),x=(b+=e.no*_)+u+P;var D=j;if(O=C,c=u%=Ws,A=P%=Ws,E=b=((x%=Ws)-u-P)%Ws,o=Math.sin(C),r=Math.cos(C),"d"===e.method){var B=sa(e,{inclo:e.inclo,init:"n",ep:D,inclp:O,nodep:A,argpp:c,mp:E,opsmode:e.operationmode});if(D=B.ep,A=B.nodep,c=B.argpp,E=B.mp,(O=B.inclp)<0&&(O=-O,A+=zs,c-=zs),D<0||D>1)return e.error=3,[!1,!1]}"d"===e.method&&(o=Math.sin(O),r=Math.cos(O),e.aycof=-.5*ta*o,Math.abs(r+1)>15e-13?e.xlcof=-.25*ta*o*(3+5*r)/(1+r):e.xlcof=-.25*ta*o*(3+5*r)/15e-13);var G=D*Math.cos(c);v=1/(I*(1-D*D));var H=D*Math.sin(c)+v*e.aycof,N=(E+c+A+v*e.xlcof*G-A)%Ws;l=N,d=9999.9;for(var F=1;Math.abs(d)>=1e-12&&F<=10;)n=Math.sin(l),d=(N-H*(i=Math.cos(l))+G*n-l)/(d=1-i*G-n*H),Math.abs(d)>=.95&&(d=d>0?.95:-.95),l+=d,F+=1;var z=G*i+H*n,W=G*n-H*i,U=G*G+H*H,V=I*(1-U);if(V<0)return e.error=4,[!1,!1];var q=I*(1-z),Z=Math.sqrt(I)*W/q,Y=Math.sqrt(V)/q,K=Math.sqrt(1-U),Q=I/q*(n-H-G*(v=W/(1+K))),X=I/q*(i-G+H*v);h=Math.atan2(Q,X);var J=(X+X)*Q,$=1-2*Q*Q,ee=.5*Js*(v=1/V),te=ee*v;"d"===e.method&&(s=r*r,e.con41=3*s-1,e.x1mth2=1-s,e.x7thm1=7*s-1);var ie=q*(1-1.5*te*K*e.con41)+.5*ee*e.x1mth2*$;if(ie<1)return e.error=6,{position:!1,velocity:!1};h-=.25*te*e.x7thm1*J;var ne=A+1.5*te*r*J,re=O+1.5*te*r*o*$,oe=Z-w*ee*e.x1mth2*J/Ks,se=Y+w*ee*(e.x1mth2*$+1.5*e.con41)/Ks,ae=Math.sin(h),le=Math.cos(h),ue=Math.sin(ne),ce=Math.cos(ne),he=Math.sin(re),fe=Math.cos(re),pe=-ue*fe,me=ce*fe,de=pe*ae+ce*le,ve=me*ae+ue*le,ye=he*ae;return{position:{x:ie*de*Ys,y:ie*ve*Ys,z:ie*ye*Ys},velocity:{x:(oe*de+se*(pe*le-ce*ae))*Qs,y:(oe*ve+se*(me*le-ue*ae))*Qs,z:(oe*ye+se*(he*le))*Qs}}}function ca(e,t){var i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O,x,E,A,T,k,M,R,S,j,L,I,D,B,G,H,N,F,z,W,U,V,q,Z,Y,K,Q,X,J,$,ee=t.opsmode,te=t.satn,ie=t.epoch,ne=t.xbstar,re=t.xecco,oe=t.xargpo,se=t.xinclo,ae=t.xmo,le=t.xno,ue=t.xnodeo;e.isimp=0,e.method="n",e.aycof=0,e.con41=0,e.cc1=0,e.cc4=0,e.cc5=0,e.d2=0,e.d3=0,e.d4=0,e.delmo=0,e.eta=0,e.argpdot=0,e.omgcof=0,e.sinmao=0,e.t=0,e.t2cof=0,e.t3cof=0,e.t4cof=0,e.t5cof=0,e.x1mth2=0,e.x7thm1=0,e.mdot=0,e.nodedot=0,e.xlcof=0,e.xmcof=0,e.nodecf=0,e.irez=0,e.d2201=0,e.d2211=0,e.d3210=0,e.d3222=0,e.d4410=0,e.d4422=0,e.d5220=0,e.d5232=0,e.d5421=0,e.d5433=0,e.dedt=0,e.del1=0,e.del2=0,e.del3=0,e.didt=0,e.dmdt=0,e.dnodt=0,e.domdt=0,e.e3=0,e.ee2=0,e.peo=0,e.pgho=0,e.pho=0,e.pinco=0,e.plo=0,e.se2=0,e.se3=0,e.sgh2=0,e.sgh3=0,e.sgh4=0,e.sh2=0,e.sh3=0,e.si2=0,e.si3=0,e.sl2=0,e.sl3=0,e.sl4=0,e.gsto=0,e.xfact=0,e.xgh2=0,e.xgh3=0,e.xgh4=0,e.xh2=0,e.xh3=0,e.xi2=0,e.xi3=0,e.xl2=0,e.xl3=0,e.xl4=0,e.xlamo=0,e.zmol=0,e.zmos=0,e.atime=0,e.xli=0,e.xni=0,e.bstar=ne,e.ecco=re,e.argpo=oe,e.inclo=se,e.mo=ae,e.no=le,e.nodeo=ue,e.operationmode=ee;var ce=78/Ys+1,he=42/Ys,fe=he*he*he*he;e.init="y",e.t=0;var pe=function(e){var t=e.ecco,i=e.epoch,n=e.inclo,r=e.opsmode,o=e.no,s=t*t,a=1-s,l=Math.sqrt(a),u=Math.cos(n),c=u*u,h=Math.pow(Ks/o,ia),f=.75*Js*(3*c-1)/(l*a),p=f/(h*h),m=h*(1-p*p-p*(1/3+134*p*p/81));o/=1+(p=f/(m*m));var d,v=Math.pow(Ks/o,ia),y=Math.sin(n),g=v*a,_=1-5*c,C=-_-c-c,b=1/v,w=g*g,P=v*(1-t);if("a"===r){var O=i-7305,x=Math.floor(O+1e-8),E=.017202791694070362;(d=(1.7321343856509375+E*x+(E+Ws)*(O-x)+O*O*5075514194322695e-30)%Ws)<0&&(d+=Ws)}else d=la(i+2433281.5);return{no:o,method:"n",ainv:b,ao:v,con41:C,con42:_,cosio:u,cosio2:c,eccsq:s,omeosq:a,posq:w,rp:P,rteosq:l,sinio:y,gsto:d}}({satn:te,ecco:e.ecco,epoch:ie,inclo:e.inclo,no:e.no,method:e.method,opsmode:e.operationmode}),me=pe.ao,de=pe.con42,ve=pe.cosio,ye=pe.cosio2,ge=pe.eccsq,_e=pe.omeosq,Ce=pe.posq,be=pe.rp,we=pe.rteosq,Pe=pe.sinio;if(e.no=pe.no,e.con41=pe.con41,e.gsto=pe.gsto,e.a=Math.pow(e.no*Xs,-2/3),e.alta=e.a*(1+e.ecco)-1,e.altp=e.a*(1-e.ecco)-1,e.error=0,_e>=0||e.no>=0){if(e.isimp=0,be<220/Ys+1&&(e.isimp=1),x=ce,_=fe,(v=(be-1)*Ys)<156){x=v-78,v<98&&(x=20);var Oe=(120-x)/Ys;_=Oe*Oe*Oe*Oe,x=x/Ys+1}y=1/Ce,W=1/(me-x),e.eta=me*e.ecco*W,p=e.eta*e.eta,f=e.ecco*e.eta,g=Math.abs(1-p),o=(l=(a=_*Math.pow(W,4))/Math.pow(g,3.5))*e.no*(me*(1+1.5*p+f*(4+p))+.375*Js*W/g*e.con41*(8+3*p*(8+p))),e.cc1=e.bstar*o,s=0,e.ecco>1e-4&&(s=-2*a*W*ta*e.no*Pe/e.ecco),e.x1mth2=1-ye,e.cc4=2*e.no*l*me*_e*(e.eta*(2+.5*p)+e.ecco*(.5+2*p)-Js*W/(me*g)*(-3*e.con41*(1-2*f+p*(1.5-.5*f))+.75*e.x1mth2*(2*p-f*(1+p))*Math.cos(2*e.argpo))),e.cc5=2*l*me*_e*(1+2.75*(p+f)+f*p),u=ye*ye,F=.5*(N=1.5*Js*y*e.no)*Js*y,z=-.46875*ea*y*y*e.no,e.mdot=e.no+.5*N*we*e.con41+.0625*F*we*(13-78*ye+137*u),e.argpdot=-.5*N*de+.0625*F*(7-114*ye+395*u)+z*(3-36*ye+49*u),V=-N*ve,e.nodedot=V+(.5*F*(4-19*ye)+2*z*(3-7*ye))*ve,U=e.argpdot+e.nodedot,e.omgcof=e.bstar*s*Math.cos(e.argpo),e.xmcof=0,e.ecco>1e-4&&(e.xmcof=-ia*a*e.bstar/f),e.nodecf=3.5*_e*V*e.cc1,e.t2cof=1.5*e.cc1,Math.abs(ve+1)>15e-13?e.xlcof=-.25*ta*Pe*(3+5*ve)/(1+ve):e.xlcof=-.25*ta*Pe*(3+5*ve)/15e-13,e.aycof=-.5*ta*Pe;var xe=1+e.eta*Math.cos(e.mo);if(e.delmo=xe*xe*xe,e.sinmao=Math.sin(e.mo),e.x7thm1=7*ye-1,2*zs/e.no>=225){e.method="d",e.isimp=1,0,m=e.inclo;var Ee=function(e){var t,i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O,x,E,A,T,k,M,R,S,j,L,I,D,B,G,H,N,F,z,W,U,V,q,Z,Y,K,Q,X,J,$,ee,te,ie,ne,re,oe,se,ae,le,ue,ce=e.epoch,he=e.ep,fe=e.argpp,pe=e.tc,me=e.inclp,de=e.nodep,ve=.01675,ye=.0549,ge=e.np,_e=he,Ce=Math.sin(de),be=Math.cos(de),we=Math.sin(fe),Pe=Math.cos(fe),Oe=Math.sin(me),xe=Math.cos(me),Ee=_e*_e,Ae=1-Ee,Te=Math.sqrt(Ae),ke=ce+18261.5+pe/1440,Me=(4.523602-.00092422029*ke)%Ws,Re=Math.sin(Me),Se=Math.cos(Me),je=.91375164-.03568096*Se,Le=Math.sqrt(1-je*je),Ie=.089683511*Re/Le,De=Math.sqrt(1-Ie*Ie),Be=5.8351514+.001944368*ke,Ge=.39785416*Re/Le,He=De*Se+.91744867*Ie*Re;Ge=Math.atan2(Ge,He),Ge+=Be-Me;var Ne=Math.cos(Ge),Fe=Math.sin(Ge);C=.1945905,b=-.98088458,O=.91744867,x=.39785416,w=be,P=Ce,h=29864797e-13;for(var ze=1/ge,We=0;We<2;)te=-6*(t=C*w+b*O*P)*(o=-Oe*(a=-C*P+b*O*w)+xe*(l=b*x))+Ee*(-24*(f=t*Pe+(i=xe*a+Oe*l)*we)*(g=o*Pe)-6*(m=-t*we+i*Pe)*(v=o*we)),ie=-6*(t*(s=-Oe*(u=b*P+C*O*w)+xe*(c=C*x))+(n=-b*w+C*O*P)*o)+Ee*(-24*((p=n*Pe+(r=xe*u+Oe*c)*we)*g+f*(_=s*Pe))+-6*(m*(y=s*we)+(d=-n*we+r*Pe)*v)),ne=-6*n*s+Ee*(-24*p*_-6*d*y),re=6*i*o+Ee*(24*f*v-6*m*g),oe=6*(r*o+i*s)+Ee*(24*(p*v+f*y)-6*(d*g+m*_)),se=6*r*s+Ee*(24*p*y-6*d*_),J=(J=3*(t*t+i*i)+(ae=12*f*f-3*m*m)*Ee)+J+Ae*ae,$=($=6*(t*n+i*r)+(le=24*f*p-6*m*d)*Ee)+$+Ae*le,ee=(ee=3*(n*n+r*r)+(ue=12*p*p-3*d*d)*Ee)+ee+Ae*ue,q=-.5*(Z=h*ze)/Te,V=-15*_e*(Y=Z*Te),K=f*m+p*d,Q=p*m+f*d,X=p*d-f*m,1===(We+=1)&&(E=V,A=q,T=Z,k=Y,M=K,R=Q,S=X,j=J,L=$,I=ee,D=te,B=ie,G=ne,H=re,N=oe,F=se,z=ae,W=le,U=ue,C=Ne,b=Fe,O=je,x=Le,w=De*be+Ie*Ce,P=Ce*De-be*Ie,h=4.7968065e-7);return{snodm:Ce,cnodm:be,sinim:Oe,cosim:xe,sinomm:we,cosomm:Pe,day:ke,e3:2*V*X,ee2:2*V*Q,em:_e,emsq:Ee,gam:Be,peo:0,pgho:0,pho:0,pinco:0,plo:0,rtemsq:Te,se2:2*E*R,se3:2*E*S,sgh2:2*k*W,sgh3:2*k*(U-z),sgh4:-18*k*ve,sh2:-2*A*N,sh3:-2*A*(F-H),si2:2*A*B,si3:2*A*(G-D),sl2:-2*T*L,sl3:-2*T*(I-j),sl4:-2*T*(-21-9*Ee)*ve,s1:V,s2:q,s3:Z,s4:Y,s5:K,s6:Q,s7:X,ss1:E,ss2:A,ss3:T,ss4:k,ss5:M,ss6:R,ss7:S,sz1:j,sz2:L,sz3:I,sz11:D,sz12:B,sz13:G,sz21:H,sz22:N,sz23:F,sz31:z,sz32:W,sz33:U,xgh2:2*Y*le,xgh3:2*Y*(ue-ae),xgh4:-18*Y*ye,xh2:-2*q*oe,xh3:-2*q*(se-re),xi2:2*q*ie,xi3:2*q*(ne-te),xl2:-2*Z*$,xl3:-2*Z*(ee-J),xl4:-2*Z*(-21-9*Ee)*ye,nm:ge,z1:J,z2:$,z3:ee,z11:te,z12:ie,z13:ne,z21:re,z22:oe,z23:se,z31:ae,z32:le,z33:ue,zmol:(.2299715*ke-Be+4.7199672)%Ws,zmos:(6.2565837+.017201977*ke)%Ws}}({epoch:ie,ep:e.ecco,argpp:e.argpo,tc:0,inclp:e.inclo,nodep:e.nodeo,np:e.no,e3:e.e3,ee2:e.ee2,peo:e.peo,pgho:e.pgho,pho:e.pho,pinco:e.pinco,plo:e.plo,se2:e.se2,se3:e.se3,sgh2:e.sgh2,sgh3:e.sgh3,sgh4:e.sgh4,sh2:e.sh2,sh3:e.sh3,si2:e.si2,si3:e.si3,sl2:e.sl2,sl3:e.sl3,sl4:e.sl4,xgh2:e.xgh2,xgh3:e.xgh3,xgh4:e.xgh4,xh2:e.xh2,xh3:e.xh3,xi2:e.xi2,xi3:e.xi3,xl2:e.xl2,xl3:e.xl3,xl4:e.xl4,zmol:e.zmol,zmos:e.zmos});e.e3=Ee.e3,e.ee2=Ee.ee2,e.peo=Ee.peo,e.pgho=Ee.pgho,e.pho=Ee.pho,e.pinco=Ee.pinco,e.plo=Ee.plo,e.se2=Ee.se2,e.se3=Ee.se3,e.sgh2=Ee.sgh2,e.sgh3=Ee.sgh3,e.sgh4=Ee.sgh4,e.sh2=Ee.sh2,e.sh3=Ee.sh3,e.si2=Ee.si2,e.si3=Ee.si3,e.sl2=Ee.sl2,e.sl3=Ee.sl3,e.sl4=Ee.sl4,n=Ee.sinim,i=Ee.cosim,c=Ee.em,h=Ee.emsq,C=Ee.s1,b=Ee.s2,w=Ee.s3,P=Ee.s4,O=Ee.s5,E=Ee.ss1,A=Ee.ss2,T=Ee.ss3,k=Ee.ss4,M=Ee.ss5,R=Ee.sz1,S=Ee.sz3,j=Ee.sz11,L=Ee.sz13,I=Ee.sz21,D=Ee.sz23,B=Ee.sz31,G=Ee.sz33,e.xgh2=Ee.xgh2,e.xgh3=Ee.xgh3,e.xgh4=Ee.xgh4,e.xh2=Ee.xh2,e.xh3=Ee.xh3,e.xi2=Ee.xi2,e.xi3=Ee.xi3,e.xl2=Ee.xl2,e.xl3=Ee.xl3,e.xl4=Ee.xl4,e.zmol=Ee.zmol,e.zmos=Ee.zmos,d=Ee.nm,q=Ee.z1,Z=Ee.z3,Y=Ee.z11,K=Ee.z13,Q=Ee.z21,X=Ee.z23,J=Ee.z31,$=Ee.z33;var Ae=sa(e,{inclo:m,init:e.init,ep:e.ecco,inclp:e.inclo,nodep:e.nodeo,argpp:e.argpo,mp:e.mo,opsmode:e.operationmode});e.ecco=Ae.ep,e.inclo=Ae.inclp,e.nodeo=Ae.nodep,e.argpo=Ae.argpp,e.mo=Ae.mp,0,0,0;var Te=function(e){var t,i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g=e.cosim,_=e.argpo,C=e.s1,b=e.s2,w=e.s3,P=e.s4,O=e.s5,x=e.sinim,E=e.ss1,A=e.ss2,T=e.ss3,k=e.ss4,M=e.ss5,R=e.sz1,S=e.sz3,j=e.sz11,L=e.sz13,I=e.sz21,D=e.sz23,B=e.sz31,G=e.sz33,H=e.t,N=e.tc,F=e.gsto,z=e.mo,W=e.mdot,U=e.no,V=e.nodeo,q=e.nodedot,Z=e.xpidot,Y=e.z1,K=e.z3,Q=e.z11,X=e.z13,J=e.z21,$=e.z23,ee=e.z31,te=e.z33,ie=e.ecco,ne=e.eccsq,re=e.emsq,oe=e.em,se=e.argpm,ae=e.inclm,le=e.mm,ue=e.nm,ce=e.nodem,he=e.irez,fe=e.atime,pe=e.d2201,me=e.d2211,de=e.d3210,ve=e.d3222,ye=e.d4410,ge=e.d4422,_e=e.d5220,Ce=e.d5232,be=e.d5421,we=e.d5433,Pe=e.dedt,Oe=e.didt,xe=e.dmdt,Ee=e.dnodt,Ae=e.domdt,Te=e.del1,ke=e.del2,Me=e.del3,Re=e.xfact,Se=e.xlamo,je=e.xli,Le=e.xni,Ie=.0043752690880113,De=.00015835218,Be=119459e-10;he=0,ue<.0052359877&&ue>.0034906585&&(he=1),ue>=.00826&&ue<=.00924&&oe>=.5&&(he=2);var Ge=-Be*A*(I+D);(ae<.052359877||ae>zs-.052359877)&&(Ge=0),0!==x&&(Ge/=x);var He=-De*b*(J+$);(ae<.052359877||ae>zs-.052359877)&&(He=0),Ae=k*Be*(B+G-6)-g*Ge+P*De*(ee+te-6),Ee=Ge,0!==x&&(Ae-=g/x*He,Ee+=He/x);var Ne=(F+N*Ie)%Ws;if(oe+=(Pe=E*Be*M+C*De*O)*H,ae+=(Oe=A*Be*(j+L)+b*De*(Q+X))*H,se+=Ae*H,ce+=Ee*H,le+=(xe=-Be*T*(R+S-14-6*re)-De*w*(Y+K-14-6*re))*H,0!==he){if(d=Math.pow(ue/Ks,ia),2===he){var Fe=oe,ze=re;y=(oe=ie)*(re=ne),oe<=.65?(n=3.616-13.247*oe+16.29*re,r=117.39*oe-19.302-228.419*re+156.591*y,o=109.7927*oe-18.9068-214.6334*re+146.5816*y,s=242.694*oe-41.122-471.094*re+313.953*y,a=841.88*oe-146.407-1629.014*re+1083.435*y,l=3017.977*oe-532.114-5740.032*re+3708.276*y):(n=331.819*oe-72.099-508.738*re+266.724*y,r=1582.851*oe-346.844-2415.925*re+1246.113*y,o=1554.908*oe-342.585-2366.899*re+1215.972*y,s=4758.686*oe-1052.797-7193.992*re+3651.957*y,a=16178.11*oe-3581.69-24462.77*re+12422.52*y,l=oe>.715?29936.92*oe-5149.66-54087.36*re+31324.56*y:1464.74-4664.75*oe+3763.64*re),oe<.7?(h=4988.61*oe-919.2277-9064.77*re+5542.21*y,u=4568.6173*oe-822.71072-8491.4146*re+5337.524*y,c=4690.25*oe-853.666-8624.77*re+5341.4*y):(h=161616.52*oe-37995.78-229838.2*re+109377.94*y,u=218913.95*oe-51752.104-309468.16*re+146349.42*y,c=170470.89*oe-40023.88-242699.48*re+115605.82*y),pe=(p=17891679e-13*(m=ue*ue*3*(d*d)))*(t=.75*(1+2*g+(v=g*g)))*(-.306-.44*(oe-.64)),me=p*(1.5*(f=x*x))*n,de=(p=3.7393792e-7*(m*=d))*(1.875*x*(1-2*g-3*v))*r,ve=p*(-1.875*x*(1+2*g-3*v))*o,ye=(p=2*(m*=d)*7.3636953e-9)*(35*f*t)*s,ge=p*(39.375*f*f)*a,_e=(p=1.1428639e-7*(m*=d))*(9.84375*x*(f*(1-2*g-5*v)+.33333333*(4*g-2+6*v)))*l,Ce=p*(x*(4.92187512*f*(-2-4*g+10*v)+6.56250012*(1+2*g-3*v)))*c,be=(p=2*m*2.1765803e-9)*(29.53125*x*(2-8*g+v*(8*g-12+10*v)))*u,we=p*(29.53125*x*(-2-8*g+v*(12+8*g-10*v)))*h,Se=(z+V+V-(Ne+Ne))%Ws,Re=W+xe+2*(q+Ee-Ie)-U,oe=Fe,re=ze}1===he&&(i=1+g,ke=2*(Te=3*ue*ue*d*d)*(t=.75*(1+g)*(1+g))*(1+re*(.8125*re-2.5))*17891679e-13,Me=3*Te*(i*=1.875*i*i)*(1+re*(6.60937*re-6))*2.2123015e-7*d,Te=Te*(.9375*x*x*(1+3*g)-.75*(1+g))*(r=1+2*re)*21460748e-13*d,Se=(z+V+_-Ne)%Ws,Re=W+Z+xe+Ae+Ee-(U+Ie)),je=Se,Le=U,fe=0,ue=U+0}return{em:oe,argpm:se,inclm:ae,mm:le,nm:ue,nodem:ce,irez:he,atime:fe,d2201:pe,d2211:me,d3210:de,d3222:ve,d4410:ye,d4422:ge,d5220:_e,d5232:Ce,d5421:be,d5433:we,dedt:Pe,didt:Oe,dmdt:xe,dndt:0,dnodt:Ee,domdt:Ae,del1:Te,del2:ke,del3:Me,xfact:Re,xlamo:Se,xli:je,xni:Le}}({cosim:i,emsq:h,argpo:e.argpo,s1:C,s2:b,s3:w,s4:P,s5:O,sinim:n,ss1:E,ss2:A,ss3:T,ss4:k,ss5:M,sz1:R,sz3:S,sz11:j,sz13:L,sz21:I,sz23:D,sz31:B,sz33:G,t:e.t,tc:0,gsto:e.gsto,mo:e.mo,mdot:e.mdot,no:e.no,nodeo:e.nodeo,nodedot:e.nodedot,xpidot:U,z1:q,z3:Z,z11:Y,z13:K,z21:Q,z23:X,z31:J,z33:$,ecco:e.ecco,eccsq:ge,em:c,argpm:0,inclm:m,mm:0,nm:d,nodem:0,irez:e.irez,atime:e.atime,d2201:e.d2201,d2211:e.d2211,d3210:e.d3210,d3222:e.d3222,d4410:e.d4410,d4422:e.d4422,d5220:e.d5220,d5232:e.d5232,d5421:e.d5421,d5433:e.d5433,dedt:e.dedt,didt:e.didt,dmdt:e.dmdt,dnodt:e.dnodt,domdt:e.domdt,del1:e.del1,del2:e.del2,del3:e.del3,xfact:e.xfact,xlamo:e.xlamo,xli:e.xli,xni:e.xni});e.irez=Te.irez,e.atime=Te.atime,e.d2201=Te.d2201,e.d2211=Te.d2211,e.d3210=Te.d3210,e.d3222=Te.d3222,e.d4410=Te.d4410,e.d4422=Te.d4422,e.d5220=Te.d5220,e.d5232=Te.d5232,e.d5421=Te.d5421,e.d5433=Te.d5433,e.dedt=Te.dedt,e.didt=Te.didt,e.dmdt=Te.dmdt,e.dnodt=Te.dnodt,e.domdt=Te.domdt,e.del1=Te.del1,e.del2=Te.del2,e.del3=Te.del3,e.xfact=Te.xfact,e.xlamo=Te.xlamo,e.xli=Te.xli,e.xni=Te.xni}1!==e.isimp&&(r=e.cc1*e.cc1,e.d2=4*me*W*r,H=e.d2*W*e.cc1/3,e.d3=(17*me+x)*H,e.d4=.5*H*me*W*(221*me+31*x)*e.cc1,e.t3cof=e.d2+2*r,e.t4cof=.25*(3*e.d3+e.cc1*(12*e.d2+10*r)),e.t5cof=.2*(3*e.d4+12*e.cc1*e.d3+6*e.d2*e.d2+15*r*(2*e.d2+r)))}ua(e,0),e.init="n"}function ha(e,t){var i=1440/(2*zs),n=0,r={error:0};r.satnum=e.substring(2,7),r.epochyr=parseInt(e.substring(18,20),10),r.epochdays=parseFloat(e.substring(20,32)),r.ndot=parseFloat(e.substring(33,43)),r.nddot=parseFloat(".".concat(parseInt(e.substring(44,50),10),"E").concat(e.substring(50,52))),r.bstar=parseFloat("".concat(e.substring(53,54),".").concat(parseInt(e.substring(54,59),10),"E").concat(e.substring(59,61))),r.inclo=parseFloat(t.substring(8,16)),r.nodeo=parseFloat(t.substring(17,25)),r.ecco=parseFloat(".".concat(t.substring(26,33))),r.argpo=parseFloat(t.substring(34,42)),r.mo=parseFloat(t.substring(43,51)),r.no=parseFloat(t.substring(52,63)),r.no/=i,r.inclo*=Us,r.nodeo*=Us,r.argpo*=Us,r.mo*=Us;var o=na(n=r.epochyr<57?r.epochyr+2e3:r.epochyr+1900,r.epochdays),s=o.mon,a=o.day,l=o.hr,u=o.minute,c=o.sec;return r.jdsatepoch=oa(n,s,a,l,u,c),ca(r,{opsmode:"i",satn:r.satnum,epoch:r.jdsatepoch-2433281.5,xbstar:r.bstar,xecco:r.ecco,xargpo:r.argpo,xinclo:r.inclo,xmo:r.mo,xno:r.no,xnodeo:r.nodeo}),r}function fa(e){return function(e){if(Array.isArray(e))return pa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return pa(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return pa(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pa(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function ma(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],r=Array.prototype.slice.call(t,1);return ua(n,(oa.apply(void 0,fa(r))-n.jdsatepoch)*qs)}function da(e){return e*Vs}function va(e){if(e<-zs/2||e>zs/2)throw new RangeError("Latitude radians must be in range [-pi/2; pi/2].");return da(e)}function ya(e){if(e<-zs||e>zs)throw new RangeError("Longitude radians must be in range [-pi; pi].");return da(e)}function ga(e,t){for(var i=6378.137,n=Math.sqrt(e.x*e.x+e.y*e.y),r=(i-6356.7523142)/i,o=2*r-r*r,s=Math.atan2(e.y,e.x)-t;s<-zs;)s+=Ws;for(;s>zs;)s-=Ws;for(var a,l=0,u=Math.atan2(e.z,Math.sqrt(e.x*e.x+e.y*e.y));l<20;)a=1/Math.sqrt(1-o*(Math.sin(u)*Math.sin(u))),u=Math.atan2(e.z+i*a*o*Math.sin(u),n),l+=1;return{longitude:s,latitude:u,height:n/Math.cos(u)-i*a}}function _a(e){for(var t=String(e).trim().split("\n").map((function(e){return e.trim()})).filter((function(e){return e.length>0})),i=[],n=0;n<t.length-2;n+=3){var r=t[n],o=t[n+1],s=t[n+2];o.startsWith("1 ")&&s.startsWith("2 ")&&i.push({name:r,line1:o,line2:s})}return i}function Ca(e,t){try{var i=ma(e,t);if(!i.position||"boolean"==typeof i.position)return null;var n=la(t),r=ga(i.position,n),o=i.velocity&&"boolean"!=typeof i.velocity?i.velocity:null,s=o?1e3*Math.hypot(o.x,o.y,o.z):null;return{longitude:ya(r.longitude),latitude:va(r.latitude),altitude:1e3*r.height,speedMps:Number.isFinite(s)?s:null}}catch(e){return null}}function ba(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return wa(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return wa(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function wa(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Pa=Object.freeze({station:Object.freeze({label:"STATION",color:"#fff6e5",blurb:"空间站及关联飞行器"}),nav:Object.freeze({label:"NAV",color:"#4fd8ff",blurb:"导航星座 — GPS、GLONASS、Galileo"}),geo:Object.freeze({label:"GEO",color:"#c89bff",blurb:"地球同步轨道 — 通信和气象卫星"}),visual:Object.freeze({label:"VISUAL",color:"#9fb3c4",blurb:"裸眼可见天体 — CelesTrak visual 组"}),comms:Object.freeze({label:"COMMS",color:"#54697f",blurb:"宽带星座 — Starlink 壳层 (DENSE 模式)"})}),Oa=Object.freeze(["station","nav","geo","visual","comms"]),xa=Object.freeze({stations:Object.freeze({klass:"station",subtype:null}),visual:Object.freeze({klass:"visual",subtype:null}),"gps-ops":Object.freeze({klass:"nav",subtype:"GPS"}),glonass:Object.freeze({klass:"nav",subtype:"GLONASS"}),galileo:Object.freeze({klass:"nav",subtype:"GALILEO"}),geo:Object.freeze({klass:"geo",subtype:null}),dense:Object.freeze({klass:"comms",subtype:"STARLINK"})}),Ea=Object.freeze({klass:"visual",subtype:null}),Aa=Object.freeze({klass:"station",subtype:"ISS"});function Ta(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isIss;return void 0!==t&&t?Aa:xa[e]||Ea}function ka(e){return Pa[Ta(e).klass].color}function Ma(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isIss,i=Ta(e,{isIss:void 0!==t&&t}),n=i.klass,r=i.subtype,o=Pa[n].label;return r?"".concat(o," · ").concat(r):o}function Ra(e){var t,i=Object.create(null),n=ba(e||[]);try{for(n.s();!(t=n.n()).done;){var o=t.value,s=o&&"object"===r(o)?o:{group:o},a=Ta(s.group,{isIss:s.isIss}).klass;i[a]=(i[a]||0)+1}}catch(e){n.e(e)}finally{n.f()}return i}function Sa(e){var t,i=[],n=ba(Oa);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=null==e?void 0:e[r];if(o>0){var s=Pa[r];i.push({klass:r,label:s.label,color:s.color,blurb:s.blurb,count:o})}}}catch(e){n.e(e)}finally{n.f()}return i}function ja(e,t){for(var i=function(e){var t=e.no*(1440/(2*Math.PI));return 86400/Math.max(t,.1)}(e),n=i/180,r=[],o=t.getTime(),s=la(t),a=0;a<=180;a++){var l=new Date(o+a*n*1e3);try{var u=ma(e,l);if(!u.position||"boolean"==typeof u.position)continue;var c=ga(u.position,s);r.push(Fs.Cartesian3.fromDegrees(ya(c.longitude),va(c.latitude),1e3*c.height))}catch(e){continue}}return r}function La(e,t,i){i||(i=new Fs.Matrix4);var n=la(t)-e,r=Fs.Matrix3.fromRotationZ(-n,new Fs.Matrix3);return Fs.Matrix4.fromRotationTranslation(r,Fs.Cartesian3.ZERO,i)}function Ia(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Da(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ia(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ia(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ba(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Ga(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ga(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function Ha(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Na=25544,Fa=[{tag:"stations",path:"stations"},{tag:"visual",path:"visual"},{tag:"gps-ops",path:"gps-ops"},{tag:"glonass",path:"glo-ops"},{tag:"galileo",path:"galileo"},{tag:"geo",path:"geo"}],za=Fs.Color.WHITE.withAlpha(.3),Wa={iss:{pixelSize:12,color:Fs.Color.fromCssColorString("#ff4444"),outlineColor:za,outlineWidth:2},stations:{pixelSize:8,color:Fs.Color.fromCssColorString(ka("stations")),outlineColor:za,outlineWidth:0},visual:{pixelSize:6,color:Fs.Color.fromCssColorString(ka("visual")),outlineColor:za,outlineWidth:0},"gps-ops":{pixelSize:6,color:Fs.Color.fromCssColorString(ka("gps-ops")),outlineColor:za,outlineWidth:0},glonass:{pixelSize:6,color:Fs.Color.fromCssColorString(ka("glonass")),outlineColor:za,outlineWidth:0},galileo:{pixelSize:6,color:Fs.Color.fromCssColorString(ka("galileo")),outlineColor:za,outlineWidth:0},geo:{pixelSize:5,color:Fs.Color.fromCssColorString(ka("geo")),outlineColor:za,outlineWidth:0}},Ua=function(e){c(s,e);var t,i,r,o=Ha(s);function s(e){var t;return n(this,s),(t=o.call(this,e))._catalog=new Map,t._pointCollection=null,t._points=new Map,t._orbitPaths=new Map,t._preRenderListener=null,t._lastPropagation=0,t._lastRingRotation=0,t._enabled=!1,t._issLabelEntity=null,t._showOrbits=!0,t._showPoints=!0,t._autoRefreshTimeout=null,t._refreshInterval=72e5,t._lastError=null,t._activeControllers=new Set,t}return a(s,[{key:"count",get:function(){return this._catalog.size}},{key:"lastError",get:function(){return this._lastError}},{key:"getEntries",value:function(){var e,t=[],i=Ba(this._catalog);try{for(i.s();!(e=i.n()).done;){var n=he(e.value,2),r=n[0],o=n[1];t.push({noradId:r,name:o.name,group:o.group})}}catch(e){i.e(e)}finally{i.f()}return t}},{key:"showOrbits",get:function(){return this._showOrbits},set:function(e){this._showOrbits=!!e;var t,i=Ba(this._orbitPaths);try{for(i.s();!(t=i.n()).done;){var n=he(t.value,2)[1];n.primitive&&(n.primitive.show=this._showOrbits)}}catch(e){i.e(e)}finally{i.f()}}},{key:"showPoints",get:function(){return this._showPoints},set:function(e){this._showPoints=!!e,this._pointCollection&&(this._pointCollection.show=this._showPoints)}},{key:"_fetchGroup",value:(r=U(q().mark((function e(t,i){var n,r,o;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="/api/celestrak/".concat(t),e.next=3,fetch(n,{signal:i});case 3:if(!(r=e.sent).ok){e.next=10;break}return e.next=7,r.text();case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0="";case 11:return o=e.t0,null==i||i.throwIfAborted(),e.abrupt("return",{ok:r.ok,status:r.status,text:o});case 14:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)})},{key:"_loadCatalog",value:(i=U(q().mark((function e(t){var i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b=this;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new AbortController,this._activeControllers.add(i),n=t?AbortSignal.any([t,i.signal]):i.signal,e.prev=3,e.next=6,Promise.all(Fa.map(function(){var e=U(q().mark((function e(t){var i,r;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b._fetchGroup(t.path,n);case 3:if((i=e.sent).ok){e.next=6;break}return e.abrupt("return",Da(Da({},t),{},{entries:[],ok:!1}));case 6:return r=_a(i.text),n.throwIfAborted(),e.abrupt("return",Da(Da({},t),{},{entries:r,ok:r.length>0}));case 11:if(e.prev=11,e.t0=e.catch(0),!n.aborted&&"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=15;break}throw e.t0;case 15:return e.abrupt("return",Da(Da({},t),{},{entries:[],ok:!1}));case 16:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r=e.sent,n.throwIfAborted(),o=r.filter((function(e){return!e.ok})).map((function(e){return e.path})),o.length>0&&console.warn("[SatelliteLayer] 组加载失败: ".concat(o.join(", "))),!r.every((function(e){return!e.ok}))){e.next=13;break}return this._lastError="CelesTrak 不可达",e.abrupt("return");case 13:this._lastError=o.length>0?"".concat(o.length," 个 CelesTrak 组不可用"):null,this._clearAllPrimitives(),s=new Date,a=new Set,l=Ba(r),e.prev=18,l.s();case 20:if((u=l.n()).done){e.next=54;break}c=u.value,h=Ba(c.entries),e.prev=23,h.s();case 25:if((f=h.n()).done){e.next=44;break}if(p=f.value,(m=ha(p.line1,p.line2))&&0===m.error){e.next=30;break}return e.abrupt("continue",42);case 30:if(d=Number(m.satnum),!a.has(d)){e.next=33;break}return e.abrupt("continue",42);case 33:if(a.add(d),this._catalog.set(d,{name:p.name,satrec:m,group:c.tag}),v=Ca(m,s)){e.next=38;break}return e.abrupt("continue",42);case 38:y=Fs.Cartesian3.fromDegrees(v.longitude,v.latitude,v.altitude),g=this._getPointStyle(d,c.tag),_=this._pointCollection.add({position:y,pixelSize:g.pixelSize,color:g.color,outlineColor:g.outlineColor,outlineWidth:g.outlineWidth,scaleByDistance:new Fs.NearFarScalar(1e6,1.5,2e7,.6),id:d}),this._points.set(d,_);case 42:e.next=25;break;case 44:e.next=49;break;case 46:e.prev=46,e.t0=e.catch(23),h.e(e.t0);case 49:return e.prev=49,h.f(),e.finish(49);case 52:e.next=20;break;case 54:e.next=59;break;case 56:e.prev=56,e.t1=e.catch(18),l.e(e.t1);case 59:return e.prev=59,l.f(),e.finish(59);case 62:this._catalog.has(Na)&&(this._showOrbitPath(Na,Wa.iss.color),(C=this._orbitPaths.get(Na))&&(C.primitive.show=this._showOrbits),this._addIssLabel()),console.log("[SatelliteLayer] 已加载 ".concat(this._points.size," 颗卫星")),e.next=72;break;case 66:if(e.prev=66,e.t2=e.catch(3),!n.aborted&&"AbortError"!==(null===e.t2||void 0===e.t2?void 0:e.t2.name)){e.next=70;break}return e.abrupt("return");case 70:console.warn("[SatelliteLayer] 加载失败:",e.t2),this._lastError="加载失败";case 72:return e.prev=72,this._activeControllers.delete(i),e.finish(72);case 75:case"end":return e.stop()}}),e,this,[[3,66,72,75],[18,56,59,62],[23,46,49,52]])}))),function(e){return i.apply(this,arguments)})},{key:"_getPointStyle",value:function(e,t){return e===Na?Wa.iss:Wa[t]||Wa.visual}},{key:"_showOrbitPath",value:function(e,t){if(!this._orbitPaths.has(e)){var i=this._catalog.get(e);if(i&&this._viewer){var n=new Date,r=ja(i.satrec,n);if(!(r.length<2)){var o=t||Fs.Color.CYAN,s=e===Na?2.5:2,a=new Fs.Primitive({geometryInstances:new Fs.GeometryInstance({geometry:new Fs.PolylineGeometry({positions:r,width:s,vertexFormat:Fs.PolylineColorAppearance.VERTEX_FORMAT}),attributes:{color:Fs.ColorGeometryInstanceAttribute.fromColor(o.withAlpha(.6)),depthFailColor:Fs.ColorGeometryInstanceAttribute.fromColor(o.withAlpha(.35))}}),appearance:new Fs.PolylineColorAppearance({translucent:!0}),depthFailAppearance:new Fs.PolylineColorAppearance({translucent:!0}),asynchronous:!1,allowPicking:!1});this._viewer.scene.primitives.add(a),this._orbitPaths.set(e,{primitive:a,gmstAtBake:la(n)})}}}}},{key:"_hideOrbitPath",value:function(e){var t=this._orbitPaths.get(e);t&&(this._viewer&&this._viewer.scene.primitives.remove(t.primitive),this._orbitPaths.delete(e))}},{key:"_addIssLabel",value:function(){if(this._viewer&&!this._issLabelEntity){var e=this._catalog.get(Na);if(e){var t=Ca(e.satrec,new Date);t&&(this._issLabelEntity=this._viewer.entities.add({position:Fs.Cartesian3.fromDegrees(t.longitude,t.latitude,t.altitude),label:{text:"ISS",font:"12px sans-serif",fillColor:Fs.Color.fromCssColorString("#ff4444"),outlineColor:Fs.Color.BLACK,outlineWidth:1,style:Fs.LabelStyle.FILL,verticalOrigin:Fs.VerticalOrigin.BOTTOM,pixelOffset:new Fs.Cartesian2(0,-10),scaleByDistance:new Fs.NearFarScalar(1e6,.8,2e7,.3),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))}}}},{key:"_updateIssLabel",value:function(){if(this._issLabelEntity){var e=this._catalog.get(Na);if(e){var t=Ca(e.satrec,new Date);t&&(this._issLabelEntity.position=Fs.Cartesian3.fromDegrees(t.longitude,t.latitude,t.altitude))}}}},{key:"_propagateAll",value:function(){var e,t=new Date,i=0,n=Ba(this._catalog);try{for(n.s();!(e=n.n()).done;){var r=he(e.value,2),o=r[0],s=r[1];if("dense"!==s.group){var a=Ca(s.satrec,t);if(a){var l=Fs.Cartesian3.fromDegrees(a.longitude,a.latitude,a.altitude),u=this._points.get(o);u&&(u.position=l,i++)}}}}catch(e){n.e(e)}finally{n.f()}return this._updateIssLabel(),i}},{key:"_updateOrbitPathRotations",value:function(e){if(0!==this._orbitPaths.size){var t,i=Ba(this._orbitPaths);try{for(i.s();!(t=i.n()).done;){var n=he(t.value,2)[1];n.primitive&&La(n.gmstAtBake,e,n.primitive.modelMatrix)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"_preRenderTick",value:function(){if(this._enabled){var e=Date.now();this._showPoints&&e-this._lastPropagation>=1e3&&(this._propagateAll(),this._lastPropagation=e),e-this._lastRingRotation>=1e3&&(this._updateOrbitPathRotations(new Date(e)),this._lastRingRotation=e)}}},{key:"_clearAllPrimitives",value:function(){this._pointCollection&&this._pointCollection.removeAll(),this._points.clear();var e,t=Ba(this._orbitPaths);try{for(t.s();!(e=t.n()).done;){var i=he(e.value,1)[0];if(this._viewer){var n=this._orbitPaths.get(i);n&&this._viewer.scene.primitives.remove(n.primitive)}}}catch(e){t.e(e)}finally{t.f()}this._orbitPaths.clear(),this._issLabelEntity&&this._viewer&&(this._viewer.entities.remove(this._issLabelEntity),this._issLabelEntity=null),this._catalog.clear()}},{key:"_startAutoRefresh",value:function(){var e=this;this._stopAutoRefresh(),this._autoRefreshTimeout=setTimeout((function(){e._enabled&&e._loadCatalog().then((function(){return e._startAutoRefresh()}))}),this._refreshInterval)}},{key:"_stopAutoRefresh",value:function(){this._autoRefreshTimeout&&(clearTimeout(this._autoRefreshTimeout),this._autoRefreshTimeout=null)}},{key:"_addedHook",value:function(){}},{key:"_onAdd",value:function(e){var t=this;this._viewer=e,this._pointCollection=new Fs.PointPrimitiveCollection,this._pointCollection.show=this._showPoints,this._primitiveCollection=new Fs.PrimitiveCollection,this._primitiveCollection.add(this._pointCollection),this._nativeObjCesium=this._primitiveCollection,N(p(s.prototype),"_onAdd",this).call(this,e),this._enabled=!0,this._preRenderListener=e.scene.preRender.addEventListener((function(){t._preRenderTick()})),this._loadCatalog().then((function(){return t._startAutoRefresh()}))}},{key:"_onRemove",value:function(){this._enabled=!1,this._stopAutoRefresh();var e,t=Ba(this._activeControllers);try{for(t.s();!(e=t.n()).done;){e.value.abort()}}catch(e){t.e(e)}finally{t.f()}this._activeControllers.clear(),this._preRenderListener&&this._viewer&&(this._preRenderListener(),this._preRenderListener=null),this._clearAllPrimitives(),N(p(s.prototype),"_onRemove",this).call(this),this._pointCollection=null,this._primitiveCollection=null}},{key:"_removedHook",value:function(){this.clear()}},{key:"refresh",value:(t=U(q().mark((function e(){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._loadCatalog();case 2:this._startAutoRefresh();case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"toggleOrbitPath",value:function(e,t){if(t){if(!this._orbitPaths.has(e)){var i=this._getPointStyle(e,"visual").color;this._showOrbitPath(e,i)}var n=this._orbitPaths.get(e);n&&(n.primitive.show=!0)}else this._hideOrbitPath(e)}},{key:"getSatelliteInfo",value:function(e){var t=this._catalog.get(e);if(!t)return null;var i=Ca(t.satrec,new Date);return{name:t.name,group:t.group,position:i}}},{key:"clear",value:function(){this._stopAutoRefresh(),this._clearAllPrimitives()}}]),s}(cr);const Va=Ua;var qa=i(852),Za=i.n(qa),Ya=i(529),Ka=i.n(Ya),Qa=i(885),Xa=i.n(Qa),Ja=i(139),$a=i.n(Ja),el=i(450),tl=i.n(el),il=i(162),nl=i.n(il),rl=i(750),ol=i.n(rl),sl=i(601),al=i.n(sl),ll=i(454),ul=i.n(ll),cl=i(253),hl=i.n(cl);Cesium.Material.PolylineFlickerType="PolylineFlicker",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineFlickerType,{fabric:{type:Cesium.Material.PolylineFlickerType,uniforms:{color:new Cesium.Color(1,0,0,.7),speed:1},source:ul()},translucent:function(e){return!0}}),Cesium.Material.PolylineTrailType="PolylineTrail",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineTrailType,{fabric:{type:Cesium.Material.PolylineTrailType,uniforms:{color:new Cesium.Color(1,0,0,.7),image:Cesium.Material.DefaultImageId,speed:1,repeat:new Cesium.Cartesian2(1,1)},source:al()},translucent:function(e){return!0}}),Cesium.Material.PolylineLightingTrailType="PolylineLightingTrail",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineLightingTrailType,{fabric:{type:Cesium.Material.PolylineLightingTrailType,uniforms:{color:new Cesium.Color(1,0,0,.7),image:Cesium.Material.DefaultImageId,speed:3},source:Za()},translucent:function(e){return!0}}),Cesium.Material.PolylineImageTrailType="PolylineImageTrail",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineImageTrailType,{fabric:{type:Cesium.Material.PolylineImageTrailType,uniforms:{color:new Cesium.Color(1,0,0,.7),image:Cesium.Material.DefaultImageId,speed:1,repeat:new Cesium.Cartesian2(1,1)},source:Ka()},translucent:function(e){return!0}}),Cesium.Material.PolylineLightingType="PolylineLighting",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineLightingType,{fabric:{type:Cesium.Material.PolylineLightingType,uniforms:{color:new Cesium.Color(1,0,0,.7),image:Cesium.Material.DefaultImageId},source:$a()},translucent:function(e){return!0}}),Cesium.Material.PolylineGlowType="PolylineGlow",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineGlowType,{fabric:{type:Cesium.Material.PolylineGlowType,uniforms:{color:new Cesium.Color(1,.27,0,.9),glowPower:.06,taperPower:1},source:Xa()},translucent:function(e){return!0}}),Cesium.Material.PolylineGradientType="PolylineGradient",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineGradientType,{fabric:{type:Cesium.Material.PolylineGradientType,uniforms:{color:new Cesium.Color(1,0,0,.5),image:"",transparent:!0,time:20},source:tl()},translucent:function(){return!0}}),Cesium.Material.PolylineFlowType="PolylineFlow",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineFlowType,{fabric:{type:Cesium.Material.PolylineFlowType,uniforms:{color:new Cesium.Color(1,0,0,.7),speed:1,percent:.03,gradient:.1},source:nl()},translucent:function(e){return!0}}),Cesium.Material.PolylineVFlywireType="PolylineVFlywire",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineVFlywireType,{fabric:{type:Cesium.Material.PolylineVFlywireType,uniforms:{color:new Cesium.Color(1,0,0,1),speed:10,percent:.1,gradient:.01},source:ol()},translucent:function(e){return!0}}),Cesium.Material.DaoHangLineType="DaoHangLine",Cesium.Material._materialCache.addMaterial(Cesium.Material.DaoHangLineType,{fabric:{type:Cesium.Material.DaoHangLineType,uniforms:{color1:new Cesium.Color(1,1,1,1),color2:new Cesium.Color(0,1,0,1),whiteLength:10,greenLength:40,lineWidth:.45,speed:1,direction:-1,arrowLengthRatio:.8,arrowWidthRatio:.9},source:hl()},translucent:function(e){return!0}});var fl=i(724),pl=i.n(fl),ml=i(719),dl=i.n(ml),vl=i(433),yl=i.n(vl);Cesium.Material.WallGradientType="WallGradient",Cesium.Material._materialCache.addMaterial(Cesium.Material.WallGradientType,{fabric:{type:Cesium.Material.WallGradientType,uniforms:{color:new Cesium.Color(1,1,1,1),image:Cesium.Material.DefaultImageId,time:0,brightness:1,speed:1,rep:1},source:pl()},translucent:function(e){return!0}}),Cesium.Material.WallFlowType="WallFlow",Cesium.Material._materialCache.addMaterial(Cesium.Material.WallFlowType,{fabric:{type:Cesium.Material.WallFlowType,uniforms:{color:new Cesium.Color(1,1,1,1),image:Cesium.Material.DefaultImageId,time:0,brightness:1,speed:2,rep:1},source:pl()},translucent:function(e){return!0}}),Cesium.Material.WallImgType="WallImg",Cesium.Material._materialCache.addMaterial(Cesium.Material.WallImgType,{fabric:{type:Cesium.Material.WallImgType,uniforms:{color:new Cesium.Color(1,1,1,1),image:Cesium.Material.DefaultImageId,time:0,brightness:1,isTranslucent:!1},source:dl()},translucent:function(e){return e.uniforms.isTranslucent}}),Cesium.Material.WallLineFlowType="WallLineFlow",Cesium.Material._materialCache.addMaterial(Cesium.Material.WallLineFlowType,{fabric:{type:Cesium.Material.WallLineFlowType,uniforms:{color:Cesium.Color.fromCssColorString("rgba(10,231,241,1)"),image:Cesium.Material.DefaultImageId,speed:100,copy:{x:1,y:1}},source:yl()},translucent:function(e){return!0}});var gl=i(586),_l=i.n(gl);Cesium.Material.CircleWaveMaterialType="CircleWaveMaterial",Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleWaveMaterialType,{fabric:{type:Cesium.Material.CircleWaveMaterialType,uniforms:{color:new Cesium.Color(1,0,0,1),time:1,count:1,gradient:.1},source:_l()},translucent:function(e){return!0}});var Cl=i(486),bl=i.n(Cl),wl=i(671),Pl=i.n(wl);Cesium.Material.CircleBlurType="CircleBlur",Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleBlurType,{fabric:{type:Cesium.Material.CircleBlurType,uniforms:{color:new Cesium.Color(1,0,0,.7),speed:3},source:bl()},translucent:function(e){return!0}}),Cesium.Material.CircleScanType="CircleScan",Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleScanType,{fabric:{type:Cesium.Material.CircleScanType,uniforms:{color:new Cesium.Color(1,0,0,.7),speed:1},source:Pl()},translucent:function(e){return!0}});const Ol=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._definitionChanged=new Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=t.color||Cesium.Color.fromBytes(0,255,255,255),this.speed=t.speed||1}return a(e,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(e){return null}},{key:"getValue",value:function(e,t){var i;return t=null!==(i=t)&&void 0!==i?i:{}}},{key:"equals",value:function(e){return this===e}}]),e}();function xl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var El=function(e){c(i,e);var t=xl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e.image=Cesium.buildModuleUrl("static/images/lighting.png"),e}return a(i,[{key:"getType",value:function(e){return"PolylineLightingTrail"}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.image=Cesium.Property.getValueOrUndefined(this._image,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(Ol);Object.defineProperties(El.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),image:Cesium.createPropertyDescriptor("image")});const Al=El;function Tl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var kl=function(e){c(i,e);var t=Tl(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"getType",value:function(e){return"PolylineTrail"}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(Ol);Object.defineProperties(kl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const Ml=kl;function Rl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Sl=function(e){c(i,e);var t=Rl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e._repeat=void 0,e._repeatSubscription=void 0,e.image=r.image,r.repeat||(r.repeat={x:1,y:1}),e.repeat=new Cesium.Cartesian2(r.repeat.x,r.repeat.y),e}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineImageTrailType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.image=Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._image,e._image)&&Cesium.Property.equals(this._repeat,e._repeat)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(Ol);Object.defineProperties(Sl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),image:Cesium.createPropertyDescriptor("image"),repeat:Cesium.createPropertyDescriptor("repeat")});const jl=Sl;function Ll(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Il=function(e){c(i,e);var t=Ll(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e.image=Cesium.buildModuleUrl("static/images/lighting.png"),e}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineLightingType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.image=Cesium.Property.getValueOrUndefined(this._image,e),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._image,e._image)}}]),i}(Ol);Object.defineProperties(Il.prototype,{color:Cesium.createPropertyDescriptor("color"),image:Cesium.createPropertyDescriptor("image")});const Dl=Il;function Bl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Gl=Cesium.Color.WHITE,Hl=function(e){c(i,e);var t=Bl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._glowPower=void 0,e._glowPowerSubscription=void 0,e._taperPower=void 0,e._taperPowerSubscription=void 0,e.color=r.color,e.glowPower=r.glowPower,e.taperPower=r.taperPower,e}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineGlowType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Gl,t.color),t.glowPower=Cesium.Property.getValueOrDefault(this._glowPower,e,.25,t.glowPower),t.taperPower=Cesium.Property.getValueOrDefault(this._taperPower,e,1,t.taperPower),t}},{key:"equals",value:function(e){return!1}}]),i}(Ol);Object.defineProperties(Hl.prototype,{color:Cesium.createPropertyDescriptor("color"),glowPower:Cesium.createPropertyDescriptor("glowPower"),taperPower:Cesium.createPropertyDescriptor("taperPower")});const Nl=Hl;function Fl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var zl=function(e){c(i,e);var t=Fl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._time=performance.now(),e.duration=r.duration,e.image=Cesium.buildModuleUrl("static/images/linegradient.png"),e}return a(i,[{key:"getType",value:function(e){return"PolylineGradient"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.image=this.image,t.time=(performance.now()-this._time)%this.duration/this.duration,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&this.duration===e.duration}}]),i}(Ol);Object.defineProperties(zl.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration")});const Wl=zl;function Ul(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Vl=function(e){c(i,e);var t=Ul(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._percent=void 0,e._percentSubscription=void 0,e._gradient=void 0,e._gradientSubscription=void 0,e.percent=r.percent||.03,e.gradient=r.gradient||.1,e}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineFlowType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t.percent=this._percent,t.gradient=this._gradient,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)&&Cesium.Property.equals(this._percent,e._percent)&&Cesium.Property.equals(this._gradient,e._gradient)}}]),i}(Ol);Object.defineProperties(Vl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),percent:Cesium.createPropertyDescriptor("percent"),gradient:Cesium.createPropertyDescriptor("gradient")});const ql=Vl;function Zl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Yl=function(e){c(i,e);var t=Zl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._percent=void 0,e._gradient=void 0,e.color=r.color,e.speed=r.speed,e.percent=r.percent,e.gradient=r.gradient,e}return a(i,[{key:"getType",value:function(e){return"PolylineVFlywire"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrDefault(this._color,e,Cesium.Color.RED,t.color),t.speed=Cesium.Property.getValueOrDefault(this._speed,e,5,t.speed),t.percent=Cesium.Property.getValueOrDefault(this._percent,e,.1,t.percent),t.gradient=Cesium.Property.getValueOrDefault(this._gradient,e,.01,t.gradient),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)&&Cesium.Property.equals(this._percent,e._percent)&&Cesium.Property.equals(this._gradient,e._gradient)}}]),i}(Ol);Object.defineProperties(Yl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),percent:Cesium.createPropertyDescriptor("percent"),gradient:Cesium.createPropertyDescriptor("gradient")});const Kl=Yl;function Ql(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Xl=function(e){c(i,e);var t=Ql(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineFlickerType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=Cesium.Property.getValueOrUndefined(this._speed,e),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(Ol);Object.defineProperties(Xl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const Jl=Xl;function $l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var eu=Cesium.Color.WHITE,tu=Cesium.Color.fromCssColorString("#0aed8b"),iu=function(e){c(i,e);var t=$l(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._color1=void 0,e._color1Subscription=void 0,e._color2=void 0,e._color2Subscription=void 0,e._whiteLength=void 0,e._whiteLengthSubscription=void 0,e._greenLength=void 0,e._greenLengthSubscription=void 0,e._lineWidth=void 0,e._lineWidthSubscription=void 0,e._speed=void 0,e._speedSubscription=void 0,e._direction=void 0,e._directionSubscription=void 0,e._arrowLengthRatio=void 0,e._arrowLengthRatioSubscription=void 0,e._arrowWidthRatio=void 0,e._arrowWidthRatioSubscription=void 0,e.color1=r.color1,e.color2=r.color2,e.whiteLength=r.whiteLength,e.greenLength=r.greenLength,e.lineWidth=r.lineWidth,e.speed=r.speed,e.direction=r.direction,e.arrowLengthRatio=r.arrowLengthRatio,e.arrowWidthRatio=r.arrowWidthRatio,e}return a(i,[{key:"getType",value:function(e){return"DaoHangLine"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color1=Cesium.Property.getValueOrDefault(this._color1,e,eu,t.color1),t.color2=Cesium.Property.getValueOrDefault(this._color2,e,tu,t.color2),t.whiteLength=Cesium.Property.getValueOrDefault(this._whiteLength,e,10,t.whiteLength),t.greenLength=Cesium.Property.getValueOrDefault(this._greenLength,e,40,t.greenLength),t.lineWidth=Cesium.Property.getValueOrDefault(this._lineWidth,e,.45,t.lineWidth),t.speed=Cesium.Property.getValueOrDefault(this._speed,e,1,t.speed),t.direction=Cesium.Property.getValueOrDefault(this._direction,e,-1,t.direction),t.arrowLengthRatio=Cesium.Property.getValueOrDefault(this._arrowLengthRatio,e,.8,t.arrowLengthRatio),t.arrowWidthRatio=Cesium.Property.getValueOrDefault(this._arrowWidthRatio,e,.9,t.arrowWidthRatio),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color1,e._color1)&&Cesium.Property.equals(this._color2,e._color2)&&Cesium.Property.equals(this._whiteLength,e._whiteLength)&&Cesium.Property.equals(this._greenLength,e._greenLength)&&Cesium.Property.equals(this._lineWidth,e._lineWidth)&&Cesium.Property.equals(this._speed,e._speed)&&Cesium.Property.equals(this._direction,e._direction)&&Cesium.Property.equals(this._arrowLengthRatio,e._arrowLengthRatio)&&Cesium.Property.equals(this._arrowWidthRatio,e._arrowWidthRatio)}}]),i}(Ol);Object.defineProperties(iu.prototype,{color1:Cesium.createPropertyDescriptor("color1"),color2:Cesium.createPropertyDescriptor("color2"),whiteLength:Cesium.createPropertyDescriptor("whiteLength"),greenLength:Cesium.createPropertyDescriptor("greenLength"),lineWidth:Cesium.createPropertyDescriptor("lineWidth"),speed:Cesium.createPropertyDescriptor("speed"),direction:Cesium.createPropertyDescriptor("direction"),arrowLengthRatio:Cesium.createPropertyDescriptor("arrowLengthRatio"),arrowWidthRatio:Cesium.createPropertyDescriptor("arrowWidthRatio")});const nu=iu;function ru(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ou=function(e){c(i,e);var t=ru(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"getType",value:function(e){return Cesium.Material.CircleBlurType}},{key:"getValue",value:function(e,t){var i;return(t=null!==(i=t)&&void 0!==i?i:{}).color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(Ol);Object.defineProperties(ou.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const su=ou;function au(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var lu=function(e){c(i,e);var t=au(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"getType",value:function(e){return Cesium.Material.CircleScanType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(Ol);Object.defineProperties(lu.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const uu=lu;var cu=function(){function e(t){var i,r,o,s;n(this,e),t=t||{},this._definitionChanged=new Cesium.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=t.baseWaterColor||new Cesium.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=t.blendColor||new Cesium.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=t.specularMap||Cesium.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=t.normalMap||Cesium.buildModuleUrl("static/images/water/waterNormalsSmall.jpg"),this.frequency=null!==(i=t.frequency)&&void 0!==i?i:1e3,this.animationSpeed=null!==(r=t.animationSpeed)&&void 0!==r?r:.01,this.amplitude=null!==(o=t.amplitude)&&void 0!==o?o:10,this.specularIntensity=null!==(s=t.specularIntensity)&&void 0!==s?s:.5}return a(e,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(e){return Cesium.Material.WaterType}},{key:"getValue",value:function(e,t){return t||(t={}),t.baseWaterColor=Cesium.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=Cesium.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=Cesium.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=Cesium.Property.getValueOrUndefined(this._normalMap,e),t.frequency=this.frequency,t.animationSpeed=this.animationSpeed,t.amplitude=this.amplitude,t.specularIntensity=this.specularIntensity,t}},{key:"equals",value:function(t){return this===t||t instanceof e&&Cesium.Property.equals(this._baseWaterColor,t._baseWaterColor)}}]),e}();Object.defineProperties(cu.prototype,{baseWaterColor:Cesium.createPropertyDescriptor("baseWaterColor"),blendColor:Cesium.createPropertyDescriptor("blendColor"),specularMap:Cesium.createPropertyDescriptor("specularMap"),normalMap:Cesium.createPropertyDescriptor("normalMap")});const hu=cu;function fu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var pu=function(e){c(i,e);var t=fu(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,r.direction&&1==r.direction?e.image=Cesium.buildModuleUrl("static/images/wallgradients.png"):e.image=Cesium.buildModuleUrl("static/images/wall1.png"),e.duration=r.duration,e.brightness=r.brightness?r.brightness:1,e._time=(new Date).getTime(),e}return a(i,[{key:"getType",value:function(e){return"WallGradient"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.image=this.image,this.duration&&(t.time=((new Date).getTime()-this._time)%this.duration/this.duration),t.brightness=this.brightness,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(Ol);Object.defineProperties(pu.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness")});const mu=pu;function du(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var vu=function(e){c(i,e);var t=du(i);function i(){var e,r,o,s,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(s=t.call(this,a)).duration=null!==(e=a.duration)&&void 0!==e?e:1e3,s.count=null!==(r=a.count)&&void 0!==r?r:2,s.color=a.color,s._time=(new Date).getTime(),s.count<=0&&(s.count=1),s.gradient=null!==(o=a.gradient)&&void 0!==o?o:.1,0===s.gradient&&(s.gradient=0),s.gradient>1&&(s.gradient=1),s}return a(i,[{key:"getType",value:function(e){return"CircleWaveMaterial"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.time=((new Date).getTime()-this._time)%this.duration/this.duration,t.count=this.count,t.gradient=1+10*(1-this.gradient),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(Ol);Object.defineProperties(vu.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration"),count:Cesium.createPropertyDescriptor("count")});const yu=vu;function gu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var _u=function(e){c(i,e);var t=gu(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._color=void 0,e._brightness=r.brightness?r.brightness:1,e._imageSubscription=void 0,e.image=r.image||Cesium.buildModuleUrl("static/images/wall2.png"),e.duration=r.duration,e.trailImage=r.trailImage,e.brightness=r.brightness?r.brightness:1,e.speed=r.speed?r.speed:3,e.rep=r.rep?r.rep:4,e.color=r.color,e._time=(new Date).getTime(),e}return a(i,[{key:"getType",value:function(e){return"WallFlow"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.image=this.image,this.duration&&(t.time=((new Date).getTime()-this._time)%this.duration/this.duration),t.brightness=Cesium.Property.getValueOrClonedDefault(this._brightness,e,2,t.brightness),t.speed=this.speed,t.rep=this.rep,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(Ol);Object.defineProperties(_u.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness"),speed:Cesium.createPropertyDescriptor("speed"),rep:Cesium.createPropertyDescriptor("rep")});const Cu=_u;function bu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var wu=function(e){c(i,e);var t=bu(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e.image=r.image?r.image:Cesium.buildModuleUrl("static/images/walltest.png"),e.duration=r.duration,e.brightness=r.brightness?r.brightness:1,e._time=(new Date).getTime(),e.isTranslucent=!!r.isTranslucent&&r.isTranslucent,e.color=r.color,e}return a(i,[{key:"getType",value:function(e){return"WallImg"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.image=this.image,this.duration&&(t.time=((new Date).getTime()-this._time)%this.duration/this.duration),t.brightness=this.brightness,t.isTranslucent=this.isTranslucent,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(Ol);Object.defineProperties(wu.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness")});const Pu=wu;function Ou(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var xu=function(e){c(i,e);var t=Ou(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e.image=Cesium.buildModuleUrl("static/images/wallline.png"),e.speed=r.speed?r.speed:100,e.copy=r.copy?r.copy:{x:1,y:1},e.color=r.color?r.color:Cesium.Color.fromCssColorString("rgba(40,227,243,1)"),e._time=(new Date).getTime(),e}return a(i,[{key:"getType",value:function(e){return"WallLineFlow"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=this.color,t.image=this.image,t.speed=this.speed,t.copy=this.copy,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(Ol);Object.defineProperties(xu.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),copy:Cesium.createPropertyDescriptor("copy")});const Eu=xu;function Au(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Tu=function(e){c(i,Cesium.PolylineCollection);var t=Au(i);function i(e){return n(this,i),t.call(this,e)}return a(i,[{key:"update",value:function(e){var t=Cesium.PolylineCollection.prototype.update,i=e.morphTime;e.morphTime=0,t.call(this,e),e.morphTime=i}},{key:"createPolyline",value:function(e,t){var i,n,r;if(!Array.isArray(e))throw new Cesium.DeveloperError("必须传入positions数组!");if(!(e.length<2)){var o=null!==(i=t.loop)&&void 0!==i&&i,s=null!==(n=t.width)&&void 0!==n?n:2,a=new Cesium.Material({fabric:{type:"Color",uniforms:{color:new Cesium.Color(1,1,1,1)}}}),l=null!==(r=t.material)&&void 0!==r?r:a;if(e.length>=2){var u=e.map((function(e){return Cesium.Cartesian3.clone(e)}));return this.add({material:l,positions:u,width:s,loop:o})}}}}]),i}();function ku(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Mu(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Mu(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Mu(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Ru="measure-close-btn",Su="__measCloseBtnCssInjected";const ju=function(){function e(t){if(n(this,e),!t)throw new Cesium.DeveloperError("viewer 参数是必须的");this.viewer=t,this._items=new Map,this._preRenderBound=!1,this._preRenderCb=this._onPreRender.bind(this),this._scratch=new Cesium.Cartesian2}return a(e,[{key:"_ensureCss",value:function(){if("undefined"!=typeof window&&!window[Su]&&document&&"function"==typeof document.createElement){var e="\n .".concat(Ru," {\n position: absolute;\n width: 18px;\n height: 18px;\n line-height: 16px;\n border-radius: 50%;\n background: rgba(255, 77, 79, 0.92);\n color: #fff;\n font-size: 13px;\n font-weight: 700;\n text-align: center;\n cursor: pointer;\n z-index: 10001;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n user-select: none;\n border: 1px solid #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n font-family: Arial, sans-serif;\n }\n .").concat(Ru,":hover { background: #ff7875; }\n "),t=document.createElement("style");t.setAttribute("data-anosgis-measure-close-btn",""),t.textContent=e,document.head&&document.head.appendChild(t),window[Su]=!0}}},{key:"add",value:function(e,t,i){var n=this;if(e&&t){this._items.has(e)&&this.remove(e),this._ensureCss();var r=this.viewer.container||this.viewer.scene&&this.viewer.scene.canvas&&this.viewer.scene.canvas.parentElement;if(r){var o=de.create("div",Ru,r);o.innerHTML="×",o.title="删除该测量";var s=function(e){return e.stopPropagation()};o.addEventListener("mousedown",s),o.addEventListener("dblclick",s),o.addEventListener("click",(function(t){t.stopPropagation();try{"function"==typeof i&&i()}catch(e){console.error("[FloatingCloseBtn] onClose error:",e)}n.remove(e)})),this._items.set(e,{btn:o,anchor:t}),this._ensurePreRender()}else console.warn("FloatingCloseButtonManager: viewer.container 不可用,无法挂载按钮")}}},{key:"remove",value:function(e){var t=this._items.get(e);if(t){try{t.btn&&t.btn.parentNode&&t.btn.parentNode.removeChild(t.btn)}catch(e){}this._items.delete(e),0===this._items.size&&this._detachPreRender()}}},{key:"removeAll",value:function(){for(var e=0,t=Array.from(this._items.keys());e<t.length;e++){var i=t[e];this.remove(i)}}},{key:"_ensurePreRender",value:function(){this._preRenderBound||this.viewer&&this.viewer.scene&&this.viewer.scene.preRender&&(this.viewer.scene.preRender.addEventListener(this._preRenderCb),this._preRenderBound=!0)}},{key:"_detachPreRender",value:function(){if(this._preRenderBound){try{this.viewer.scene.preRender.removeEventListener(this._preRenderCb)}catch(e){}this._preRenderBound=!1}}},{key:"_onPreRender",value:function(){if(0!==this._items.size){var e=this.viewer.scene;if(e){var t,i=ku(this._items);try{for(i.s();!(t=i.n()).done;){var n=he(t.value,2),r=n[0],o=n[1];if(o.btn.isConnected){var s=e.cartesianToCanvasCoordinates(o.anchor,this._scratch);s?(o.btn.style.left=s.x+6+"px",o.btn.style.top=s.y+6+"px",o.btn.style.display="flex"):o.btn.style.display="none"}else this._items.set(r,o),this._items.delete(r)}}catch(e){i.e(e)}finally{i.f()}}}else this._detachPreRender()}},{key:"dispose",value:function(){this.removeAll(),this._detachPreRender()}}]),e}();function Lu(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Iu(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Iu(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Iu(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}const Du=function(){function e(t,i){var r,o,s,a,l,u,c;if(n(this,e),!t)throw new Cesium.DeveloperError("viewer参数是必须的!");t=t.nativeObjCesium||t,this.outline=null!==(r=i.outline)&&void 0!==r&&r,this.justDraw=i.justDraw||!1,this.pointColor=i.pointColor||Cesium.Color.RED,this.pointSize=i.pointSize||6,this.outlineColor=i.outlineColor||Cesium.Color.CHARTREUSE,this.outlineWidth=i.outlineWidth||3,this.billboard=null!==(o=i.billboard)&&void 0!==o?o:void 0,this.pointParas={color:this.pointColor,size:this.pointSize,outlineColor:this.outlineColor,outlineWidth:this.outlineWidth,show:null===(s=i.pointShow)||void 0===s||s,billboard:this.billboard,justDraw:this.justDraw},this.tempPointParas={size:i.tempPoint_size||10,color:i.tempPoint_color||Cesium.Color.YELLOW,show:null===(a=i.tempPoint_show)||void 0===a||a,justDraw:!(null!==(l=i.tempPoint_showLabel)&&void 0!==l&&l)},this.lineColor=i.lineColor||Cesium.Color.CHARTREUSE,this.lineWidth=i.lineWidth||3,this.showToolTip=null===(u=i.showToolTip)||void 0===u||u,this.lastLeftClickPoint=void 0,this.viewer=t,this.ismeare=i.ismeare||!1,this.positions=[],this.cartesian=null,this.mouseHandler=null,this.onCompleted=i.onCompleted,this._pointLabels=[],this._totalLengthPointLabel=void 0,this._originCursor=void 0,this.polygonPoint=null,this.poly=null,this.showToolTip&&this._addToolTip();var h=xe.createPointLabel(this.viewer,new Cesium.Cartesian3(0,0,0),"",xe.drawEntityNames().tempPoint,this.tempPointParas);h.point.show=!1,h.show=!1,this._tempPoint=h,this.clampToGround=null!==(c=i.clampToGround)&&void 0!==c&&c,this._preTime=Cesium.JulianDate.now(),this._currentSessionId=null,this._sessions={},this._enableFloatingCloseButton=!(i&&!1===i.enableFloatingCloseButton),this._closeBtnManager=null}return a(e,[{key:"_getCloseAnchor",value:function(e){return e?Array.isArray(e)&&e.length>0?e[e.length-1]:e:null}},{key:"_showFloatingCloseBtn",value:function(e,t){var i=this;if(this._enableFloatingCloseButton&&e){this._closeBtnManager||(this._closeBtnManager=new ju(this.viewer));var n=this._getCloseAnchor(t);n&&this._closeBtnManager.add(e,n,(function(){i._clearBySessionId(e)}))}}},{key:"_removeAllFloatingCloseBtns",value:function(){this._closeBtnManager&&this._closeBtnManager.removeAll()}},{key:"destroy",value:function(){this._removeAllFloatingCloseBtns(),this._closeBtnManager&&(this._closeBtnManager.dispose(),this._closeBtnManager=null);try{this.end()}catch(e){}}},{key:"_beginSession",value:function(){var e;return e="undefined"!=typeof crypto&&crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"session_".concat(Date.now(),"_").concat(Math.random().toString(36).slice(2,8)),this._currentSessionId=e,this._sessions[e]={entities:[],primitives:[],labels:[]},e}},{key:"_beginSubSession",value:function(){var e="undefined"!=typeof crypto&&crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"sub_".concat(Date.now(),"_").concat(Math.random().toString(36).slice(2,8));return this._sessions[e]={entities:[],primitives:[],labels:[]},e}},{key:"_registerEntity",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"entities",i=(arguments.length>2?arguments[2]:void 0)||this._currentSessionId;i&&this._sessions[i]&&this._sessions[i][t].push(e)}},{key:"_clearBySessionId",value:function(e){var t=this._sessions[e];if(t){if(this.polyLinePrimitives&&t.primitives&&t.primitives.length){var i,n=Lu(t.primitives);try{for(n.s();!(i=n.n()).done;){var r=i.value;try{this.polyLinePrimitives.remove(r)}catch(a){}}}catch(e){n.e(e)}finally{n.f()}}if(t.entities&&t.entities.length){var o,s=Lu(t.entities);try{for(s.s();!(o=s.n()).done;){var a=o.value;try{this.viewer.entities.remove(a)}catch(a){}}}catch(e){s.e(e)}finally{s.f()}}if(t.labels&&t.labels.length){var l,u=Lu(t.labels);try{for(u.s();!(l=u.n()).done;){var c=l.value;try{xe.removePointLabel(c)}catch(a){}}}catch(e){u.e(e)}finally{u.f()}}delete this._sessions[e]}}},{key:"clearBySessionId",value:function(e){this._clearBySessionId(e),this._closeBtnManager&&this._closeBtnManager.remove(e)}},{key:"_isMouseNewPosition",value:function(){var e,t=this.viewer.mouseSensitivity||(null===(e=this.viewer.wrap)||void 0===e?void 0:e.mouseSensitivity);if(!t)return!0;var i=Cesium.JulianDate.now();return!(Cesium.JulianDate.secondsDifference(i,this._preTime)<t)&&(this._preTime=i,!0)}},{key:"_addToolTip",value:function(){this.tooltip||(0!=this.showToolTip?(this.tooltip=de.create("div","as-measure",this.viewer.container),this.tooltip.style.borderRadius="5px",this.tooltip.style.position="absolute",this.tooltip.style.color="#c3cbd3",this.tooltip.style.background="#336666",this.tooltip.innerHTML=this.tooltip.innerHTML||"<div>左键单击选点,双击结束绘制,右键取消</div>",this.tooltip.style.display="none",window._drawToolTips=window._drawToolTips||[],window._drawToolTips.push(this.tooltip)):this._removeToolTips())}},{key:"_removeToolTips",value:function(){window._drawToolTips&&window._drawToolTips.forEach((function(e){de.remove(e)})),this.tooltip=void 0,window._drawToolTips=[]}},{key:"_notrackPos",value:function(){this.viewer.selectedEntity=void 0,this.viewer.trackedEntity=void 0}},{key:"_removeFloatPoint",value:function(e){var t=this,i=e.findIndex((function(e){return e.equals(t.lastLeftClickPoint)}));return i>-1&&e.splice(i+1,e.length-i-1),e}},{key:"_removeSamePoint",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(e.length<2)return e;for(var t=0;t<e.length-1;t++){var i=e[t],n=e[t+1];"function"==typeof i.equals&&i.equals(n)&&(console.log("element",i),console.log("element",n),e.splice(t,1),t--)}return e}},{key:"startDraw",value:function(){}},{key:"clearAll",value:function(){var e=this;Object.keys(this._sessions).forEach((function(t){return e._clearBySessionId(t)})),this._removeAllFloatingCloseBtns(),this._pointLabels=[],this.end()}},{key:"clear",value:function(e){var t=this;if(Object.keys(this._sessions).forEach((function(e){return t._clearBySessionId(e)})),this._removeAllFloatingCloseBtns(),e){for(var i=Object.values(e),n=0;n<this.viewer.entities.values.length;n++){var r=this.viewer.entities.values[n];i.indexOf(r.name)>-1&&(this.viewer.entities.removeById(r.id),n--)}this._removeToolTips()}else this._removeToolTips()}},{key:"end",value:function(){this._removeToolTips(),this.ismeare=!1,this.positions=[],this.poly=null,this.cartesian=null,this.tooltip&&(this.tooltip.style.display="none"),this.mouseHandler&&(this.mouseHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK),this.mouseHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this.mouseHandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.mouseHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK),this.mouseHandler.destroy(),this.mouseHandler=null),this._totalLengthPointLabel=void 0,this.viewer.scene.canvas.style.cursor="",this.viewer.selectedEntity=null,this.viewer.trackedEntity=null,"function"==typeof this._preUpdateListener&&(this._preUpdateListener(),this._preUpdateListener=void 0),this._tempPoint&&(this._tempPoint.show=!1,this._tempPoint.point.show=!1),this.polygonPoint=null}},{key:"updateNoDepthTestPolyline",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this;void 0!==this._polyline&&this._polylineCollection&&(this._polylineCollection.remove(this._polyline),this._polyline=void 0),t._polylineCollection&&(t._polyline=t._polylineCollection.createPolyline(t.positions,{loop:e,width:t.lineWidth,material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:t.lineColor}}})}))}},{key:"initNoDepthTestPolyline",value:function(){this._polylineCollection||(this._polyline=void 0,this._polylineCollection=new Tu,this.viewer.scene.primitives.add(this._polylineCollection))}},{key:"clearNoDepthTestPolyline",value:function(){this._polylineCollection&&(this._polyline=void 0,this.viewer.scene.primitives.remove(this._polylineCollection),this._polylineCollection=this._polylineCollection&&!this._polylineCollection.isDestroyed()&&this._polylineCollection.destroy(),this._polylineCollection=void 0)}},{key:"createPolylinePrimitive",value:function(e,t,i){if(Array.isArray(e)&&!(e.length<2))return t||(t=Cesium.Color.RED),new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:e,width:i||2,vertexFormat:Cesium.PolylineMaterialAppearance.VERTEX_FORMAT})}),appearance:new Cesium.PolylineMaterialAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:t||new Cesium.Color(1,1,1,1)}}}),renderState:new Cesium.RenderState({polygonOffset:{enabled:!0,factor:-100,units:-100},depthTest:{enabled:!0,func:Cesium.WebGLConstants.LEQUAL}})}),depthFailAppearance:new Cesium.PolylineMaterialAppearance({material:new Cesium.Material({fabric:{type:"PolylineDash",uniforms:{color:t||new Cesium.Color(1,1,1,1)}}})}),allowPicking:!1});console.log("点数少于2,无法绘制线!")}},{key:"_addPolyLinePrimitives",value:function(){this.polyLinePrimitives||(this.polyLinePrimitives=new Cesium.PrimitiveCollection,this.viewer.scene.primitives.add(this.polyLinePrimitives))}},{key:"_clearPolyLinePrimitives",value:function(){this.polyLinePrimitives&&(this.viewer.scene.primitives.remove(this.polyLinePrimitives),this.polyLinePrimitives=this.polyLinePrimitives&&!this.polyLinePrimitives.isDestroyed()&&this.polyLinePrimitives.destroy(),this.polyLinePrimitives=void 0)}},{key:"_getObjectsToExclude",value:function(){var e=[];this.polyLinePrimitives&&e.push(this.polyLinePrimitives),this._polyline&&e.push(this._polyline),this._polylineCollection&&e.push(this._polylineCollection);var t=this.viewer.entities.values.filter((function(e){return xe.drawEntityNames()[e.name]}));return e.push.apply(e,Ie(t)),e}}]),e}();function Bu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Gu=function(e){c(i,e);var t=Bu(i);function i(e,r){var o;return n(this,i),r.tempPoint_showLabel=null===(o=r.tempPoint_showLabel)||void 0===o||o,t.call(this,e,r)}return a(i,[{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,xe.drawEntityNames_Point()),this.end()}},{key:"_addToolTip",value:function(){N(p(i.prototype),"_addToolTip",this).call(this),this.tooltip&&(this.tooltip.innerHTML="<p>左键单击选点,右键结束</p>")}},{key:"startDraw",value:function(){var e=this;this.end(),this._addToolTip(),this.ismeare=!0;var t=this._beginSession(),i=this.ismeare,n=this.viewer;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(n.scene.canvas);var r=this.mouseHandler,o=this;this._originCursor=n.scene.canvas.style.cursor,n.scene.canvas.style.cursor="crosshair";var s=new Cesium.Cartesian2,a=!1,l=Cesium.JulianDate.now();r.setInputAction((function(r){if(n.selectedEntity=null,n.trackedEntity=null,o._tempPoint.point.show=!1,i){var a=xe.pickPosition(n,s,e._getObjectsToExclude());if(a){var l=xe.getPointLableString(a),u=xe.createPointLabel(n,a,l,xe.drawEntityNames().drawPoint,e.pointParas);o._pointLabels.push(u),o._registerEntity(u,"labels"),o._tempPoint.show=!1;var c=o._beginSubSession();o._registerEntity(u,"labels",c),o._showFloatingCloseBtn(c,a),o.onCompleted&&o.onCompleted(a,t)}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),r.setInputAction((function(e){o.end()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK),r.setInputAction((function(e){o.end()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),o.mouseHandler.setInputAction((function(e){var t=Cesium.JulianDate.now();Cesium.JulianDate.secondsDifference(t,l)<.03||(l=t,o.tooltip&&(o.justDraw||(o.tooltip.style.display="block"),o.tooltip.style.left=e.endPosition.x+25+"px",o.tooltip.style.top=e.endPosition.y-30+"px"),a=!0,s=Cesium.Cartesian2.clone(e.endPosition,s))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.tempPointParas.show&&(this._preUpdateListener=n.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&a){a=!1;var t=xe.pickPosition(n,s,e._getObjectsToExclude());if(t)if(o._tempPoint.show=!0,o._tempPoint.point.show=!0,o.justDraw)xe.setPointPosition(o._tempPoint,t);else{var i=xe.getPointLableString(t);xe.setPointLabel(o._tempPoint,t,i)}else o._tempPoint.show=!1,o._tempPoint.point.show=!1}})))}}]),i}(Du);function Hu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Nu=function(e){c(i,e);var t=Hu(i);function i(e,r){var o,s,a;return n(this,i),(a=t.call(this,e,r)).perPositionHeight=null===(o=r.perPositionHeight)||void 0===o||o,a.fillColor=r.fillColor||new Cesium.Color(59,179,249,.5),a.fill=null===(s=r.fill)||void 0===s||s,a}return a(i,[{key:"_getCloseAnchor",value:function(e){if(!e||0===e.length)return null;Cesium.PolygonPipeline.removeDuplicates;var t=Cesium.BoundingSphere.fromPoints(e);return t?t.center:e[e.length-1]}},{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,xe.drawEntityNames_Polygon()),N(p(i.prototype),"clearNoDepthTestPolyline",this).call(this),N(p(i.prototype),"_clearPolyLinePrimitives",this).call(this),this.end()}},{key:"_removeFloatPoint",value:function(e){return N(p(i.prototype),"_removeFloatPoint",this).call(this,e),e.length<3&&this.clear(),!this.justDraw&&e.length>=3&&this.showAreaLabel(),e}},{key:"startDraw",value:function(){var e=this;this.end(),this._addToolTip(),this._addPolyLinePrimitives(),this.initNoDepthTestPolyline();var t=this.tooltip;this.ismeare=!0;var i=this._beginSession(),n=this.ismeare,r=this.viewer,o=this.cartesian,s=this.positions;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(r.scene.canvas);var a=this.mouseHandler,l=this.poly,u=this;this._originCursor=r.scene.canvas.style.cursor,r.scene.canvas.style.cursor="crosshair";var c=new Cesium.Cartesian2,h=!1;this._preUpdateListener=r.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&h){if(h=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=c.x+25+"px",e.tooltip.style.top=c.y-25+"px"),!(o=xe.pickPosition(r,c,e._getObjectsToExclude())))return e._tempPoint.show=!1,void(e._tempPoint.point.show=!1);if(e._tempPoint.show=!0,e._tempPoint.point.show=!0,e.justDraw)xe.setPointPosition(e._tempPoint,o);else{var t=xe.getPointLableString(o);xe.setPointLabel(e._tempPoint,o,t)}if(Cesium.defined(l))null!=o&&(s.pop(),s.push(o));else{l=new Object;var i=new Cesium.CallbackProperty((function(){return s.length>2?new Cesium.PolygonHierarchy(s):null}),!1),n=new Cesium.CallbackProperty((function(){if(s.length>1){var e=[].concat(s),t=s[0];return e.push(t),e}return null}),!1),a={name:xe.drawEntityNames().drawpolygon,polygon:{hierarchy:i,fill:u.fill,material:u.fillColor,perPositionHeight:u.perPositionHeight,heightReference:u.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}};e.clampToGround&&(a.polyline={positions:n,width:u.lineWidth,material:u.lineColor,clampToGround:u.clampToGround});var f=r.entities.add(a);u._registerEntity(f)}!e.clampToGround&&e.updateNoDepthTestPolyline(),s.length>2&&!u.justDraw&&u.showAreaLabel()}})),a.setInputAction((function(e){n&&(h=!0,c=Cesium.Cartesian2.clone(e.endPosition,c))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),a.setInputAction((function(i){if(e._tempPoint.point.show=!1,e._tempPoint.show=!1,n&&o&&n){if(t.style.display="none",!o)return;0==s.length&&s.push(o.clone()),s.push(o),u.lastLeftClickPoint=s[s.length-1];var a=r.entities.add({name:xe.drawEntityNames().drawpolygonpoint,position:s[s.length-1],point:{pixelSize:u.pointSize,color:u.pointColor,disableDepthTestDistance:1e9}});u._registerEntity(a)}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),a.setInputAction((function(t){if(u._notrackPos(),(s=u._removeSamePoint(s)).length<3)u.end();else{var n=[].concat(s),r=s[0];if(n.push(r),!e.clampToGround){var o=u.createPolylinePrimitive(n,u.lineColor,u.lineWidth);o&&u.polyLinePrimitives&&(u.polyLinePrimitives.add(o),u._registerEntity(o,"primitives")),u.clearNoDepthTestPolyline()}u._showFloatingCloseBtn(i,s),u.onCompleted&&u.onCompleted(n,i),u.end()}}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),a.setInputAction((function(t){if(u._notrackPos(),s=u._removeFloatPoint(s),(s=u._removeSamePoint(s)).length<3)u.end();else{var n=[].concat(s),r=s[0];if(n.push(r),!e.clampToGround){var o=u.createPolylinePrimitive(n,u.lineColor,u.lineWidth);o&&u.polyLinePrimitives&&(u.polyLinePrimitives.add(o),u._registerEntity(o,"primitives")),u.clearNoDepthTestPolyline()}u._showFloatingCloseBtn(i,s),u.onCompleted&&u.onCompleted(n,i),u.end()}}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"showAreaLabel",value:function(){var e=xe.getPolygonArea(this.positions),t="面积:"+(e=e||0).toFixed(2)+"平方米";e>=1e4&&(t="面积:"+(e/1e6).toFixed(2)+"平方千米"),e>=1e10&&(t="面积:"+(e/1e10).toFixed(2)+"万平方千米");var i=Cesium.BoundingSphere.fromPoints(this.positions);void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=xe.createPointLabel(this.viewer,i.center,t,xe.drawEntityNames().drawpolygon),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):xe.setPointLabel(this._totalLengthPointLabel,i.center,t)}}]),i}(Du);function Fu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const zu=function(e){c(i,e);var t=Fu(i);function i(e,r){return n(this,i),t.call(this,e,r)}return a(i,[{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,xe.drawEntityNames_Polyline()),N(p(i.prototype),"clearNoDepthTestPolyline",this).call(this),N(p(i.prototype),"_clearPolyLinePrimitives",this).call(this),this.end()}},{key:"_removeFloatPoint",value:function(e){return N(p(i.prototype),"_removeFloatPoint",this).call(this,e),e.length<2&&this.clear(),e.length>=2&&this.viewer.entities.remove(this._pointLabels_son.pop()),!this.justDraw&&this.showLengthLabel(e),e}},{key:"startDraw",value:function(){var e=this;this._addPolyLinePrimitives(),this.end(),this._addToolTip(),this.initNoDepthTestPolyline(),this._pointLabels_son=[],this.ismeare=!0;var t=this._beginSession(),i=this.ismeare,n=this.viewer,r=this.cartesian,o=this.positions;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(n.scene.canvas);var s=this.mouseHandler,a=this;this._originCursor=n.scene.canvas.style.cursor,n.scene.canvas.style.cursor="crosshair";var l=new Cesium.Cartesian2,u=!1;this._preUpdateListener=n.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&u){if(u=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=l.x+25+"px",e.tooltip.style.top=l.y-25+"px"),!(r=xe.pickPosition(n,l,e._getObjectsToExclude())))return a._tempPoint.show=!1,void(a._tempPoint.point.show=!1);if(a._tempPoint.show=!0,a._tempPoint.point.show=!0,a.justDraw)xe.setPointPosition(a._tempPoint,r);else{var t=xe.getPointLableString(r);xe.setPointLabel(a._tempPoint,r,t)}o.length>=2&&(Cesium.defined(e.poly)?(o.pop(),o.push(r)):e.poly=new Object,!a.justDraw&&a.showLengthLabel(o)),e.updateNoDepthTestPolyline(!1)}})),s.setInputAction((function(e){i&&(u=!0,l=Cesium.Cartesian2.clone(e.endPosition,l))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),s.setInputAction((function(t){if(a._tempPoint.point.show=!1,a._tempPoint.show=!1,i&&r){0==o.length&&o.push(r.clone()),o.push(r.clone()),e.lastLeftClickPoint=o[o.length-1];var s=n.entities.add({name:xe.drawEntityNames().drawpolylinepoint,position:r,point:{pixelSize:e.pointSize,color:e.pointColor,outlineColor:e.outlineColor,outlineWidth:e.outlineWidth,disableDepthTestDistance:1e9}});e._registerEntity(s),a._tempPoint.show=!1}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),s.setInputAction((function(i){if(a._notrackPos(),o.length<2)a.end();else{if(e.clampToGround)new c(o)._init();else{var n=a.createPolylinePrimitive(a._removeSamePoint(o),a.lineColor,a.lineWidth);n&&a.polyLinePrimitives&&(a.polyLinePrimitives.add(n),a._registerEntity(n,"primitives"))}a.clearNoDepthTestPolyline();var r=a._removeSamePoint(o);a._showFloatingCloseBtn(t,r),a.onCompleted&&a.onCompleted(r,t),a.end()}}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),s.setInputAction((function(i){if(a._notrackPos(),o=e._removeFloatPoint(o),(o=e._removeSamePoint(o)).length<2)a.end();else{if(e.clampToGround)new c(o)._init();else{var n=a.createPolylinePrimitive(a._removeSamePoint(o),a.lineColor,a.lineWidth);n&&a.polyLinePrimitives&&(a.polyLinePrimitives.add(n),a._registerEntity(n,"primitives"))}a.clearNoDepthTestPolyline();var r=a._removeSamePoint(o);a._showFloatingCloseBtn(t,r),a.onCompleted&&a.onCompleted(r,t),a.end()}}),Cesium.ScreenSpaceEventType.RIGHT_CLICK);var c=function(){function e(e){this.options={name:xe.drawEntityNames().drawpolyline,polyline:{width:a.lineWidth,arcType:Cesium.ArcType.RHUMB,clampToGround:a.clampToGround,material:a.lineColor,depthFailMaterial:new Cesium.PolylineDashMaterialProperty({color:a.lineColor})}},this.positions=e,this._init()}return e.prototype._init=function(){var e=this;this.options.polyline.positions=new Cesium.CallbackProperty((function(){return e.positions}),!1),this.polyLine=n.entities.add(this.options);try{a._registerEntity&&a._registerEntity(this.polyLine)}catch(e){}},e.prototype.remove=function(){this.polyLine&&n.entities.remove(this.polyLine),this.polyLine=void 0},e}()}},{key:"showEachsegLengthLabel",value:function(e){var t=this,i=e.length;xe.createPointLabelsCallback(e,(function(e,i,n,r){void 0===t._pointLabels_son[e]?(t._pointLabels_son[e]=xe.createPointLabel(t.viewer,n,r),t._pointLabels_son[e].point.show=!1,t._registerEntity(t._pointLabels_son[e],"labels")):xe.setPointLabel(t._pointLabels_son[e],n,r),t._pointLabels_son[e].show=!0}));for(var n=i-1<0?0:i-1;n<this._pointLabels_son.length;++n)this._pointLabels_son[n].show=!1}},{key:"_showStartPointLabel",value:function(e){if(e&&!(e.length<1)){var t=e[0];void 0===this._startPointLabel?(this._startPointLabel=xe.createPointLabel(this.viewer,t,"起点"),this._startPointLabel.point.show=!1,this._registerEntity(this._startPointLabel,"labels")):xe.setPointLabel(this._startPointLabel,t,"起点")}}},{key:"showTotalLength",value:function(e){var t=xe.getPolylineDistance(e),i="总长:"+t.toFixed(2)+"米";t>=1e3&&(i="总长:"+(t/1e3).toFixed(2)+"千米");var n=e[e.length-1];void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=xe.createPointLabel(this.viewer,n,i),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):xe.setPointLabel(this._totalLengthPointLabel,n,i)}},{key:"showLengthLabel",value:function(e){this.showEachsegLengthLabel(e),this.showTotalLength(e),e&&e.length>=1&&this._showStartPointLabel(e)}},{key:"updatePolyLine",value:function(){}}]),i}(Du);function Wu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Uu=function(e){c(i,e);var t=Wu(i);function i(e,r){var o,s,a;return n(this,i),(a=t.call(this,e,r)).CLAMP_TO_GROUND=r.CLAMP_TO_GROUND||!0,a.fillColor=r.fillColor||Cesium.Color.YELLOW.withAlpha(.5),a.fill=null===(o=r.fill)||void 0===o||o,a.showPoint=null===(s=r.showPoint)||void 0===s||s,a}return a(i,[{key:"_getCloseAnchor",value:function(e){if(!e||0===e.length)return null;var t=Cesium.BoundingSphere.fromPoints(e);return t?t.center:e[e.length-1]}},{key:"_addToolTip",value:function(){N(p(i.prototype),"_addToolTip",this).call(this),this.tooltip&&(this.tooltip.innerHTML="<div>左键单击选点</div>")}},{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,xe.drawEntityNames_Rectangle()),this.end()}},{key:"_removeFloatPoint",value:function(e){return N(p(i.prototype),"_removeFloatPoint",this).call(this,e),e.length<2&&this.clear(),e}},{key:"startDraw",value:function(){var e=this;this.end(),this._addToolTip();var t=this.tooltip;this.ismeare=!0;var i=this._beginSession(),n=this.ismeare,r=this.viewer,o=this.cartesian,s=this.positions,a=this.polygonPoint;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(r.scene.canvas);var l=this.mouseHandler,u=this.poly,c=this;this._originCursor=r.scene.canvas.style.cursor,r.scene.canvas.style.cursor="crosshair";Cesium.JulianDate.now();l.setInputAction((function(i){if(e._isMouseNewPosition()&&n){if(t.style.display="block",t.style.left=i.endPosition.x+25+"px",t.style.top=i.endPosition.y-25+"px",null!=(o=xe.pickPosition(r,i.endPosition,e._getObjectsToExclude()))&&(s.length>1&&s.pop(),s.length>0&&s.push(o)),!Cesium.defined(u)){u=new Object;var l=new Cesium.CallbackProperty((function(){return s.length>1?Cesium.Rectangle.fromCartesianArray(s):null}),!1);a=r.entities.add({name:xe.drawEntityNames().drawRec,rectangle:{coordinates:l,material:c.fillColor,fill:c.fill,outline:c.outline,outlineWidth:c.outlineWidth,outlineColor:c.outlineColor,heightReference:c.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}}),c._registerEntity(a),c.polygonPoint=a}s.length>1&&!c.justDraw&&c.showAreaLabel()}}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),l.setInputAction((function(a){if(n&&(o=xe.pickPosition(r,a.position))&&n){if(t.style.display="none",!o)return;if(s.push(o),c.lastLeftClickPoint=s[s.length-1],e.showPoint){var l=r.entities.add({name:xe.drawEntityNames().drawRecpoint,position:s[s.length-1],point:{pixelSize:4,color:Cesium.Color.RED,outlineColor:Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:1e9}});c._registerEntity(l)}if(s.length>=2){if(c.polygonPoint){var u=Cesium.Rectangle.subsample(c.polygonPoint.rectangle.coordinates.getValue());u&&u.length>0&&(u.push(u[0]),c._showFloatingCloseBtn(i,u),c.onCompleted&&c.onCompleted(u,i))}c.end()}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),l.setInputAction((function(e){if(s.length<2||!c.polygonPoint)c.end();else{var t=Cesium.Rectangle.subsample(c.polygonPoint.rectangle.coordinates.getValue());t&&t.length>0&&(t.push(t[0]),c._showFloatingCloseBtn(i,t),c.onCompleted&&c.onCompleted(t,i)),c.end(),c._notrackPos()}}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),l.setInputAction((function(t){if((s=e._removeFloatPoint(s)).length<2)c.end();else{if(c.polygonPoint){var n=Cesium.Rectangle.subsample(c.polygonPoint.rectangle.coordinates.getValue());n&&n.length>0&&(n.push(n[0]),c._showFloatingCloseBtn(i,n),c.onCompleted&&c.onCompleted(n,i))}c.end()}}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"showAreaLabel",value:function(){var e=Cesium.Rectangle.northeast(this.polygonPoint.rectangle._coordinates.getValue()),t=Cesium.Rectangle.southwest(this.polygonPoint.rectangle._coordinates.getValue()),i=Cesium.Rectangle.northwest(this.polygonPoint.rectangle._coordinates.getValue()),n=Cesium.Rectangle.southeast(this.polygonPoint.rectangle._coordinates.getValue());e=Cesium.Cartographic.toCartesian(e),t=Cesium.Cartographic.toCartesian(t),i=Cesium.Cartographic.toCartesian(i),n=Cesium.Cartographic.toCartesian(n);var r=xe.getPolygonArea([t,n,e,i]),o="面积:"+(r=r||0).toFixed(2)+"平方米";r>=1e4&&(o="面积:"+(r/1e6).toFixed(2)+"平方千米");var s=Cesium.BoundingSphere.fromPoints(this.positions);void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=xe.createPointLabel(this.viewer,s.center,o,xe.drawEntityNames().drawRec),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):xe.setPointLabel(this._totalLengthPointLabel,s.center,o)}}]),i}(Du);function Vu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const qu=function(e){c(i,e);var t=Vu(i);function i(e,r){var o,s,a,l;return n(this,i),(l=t.call(this,e,r)).perPositionHeight=null!==(o=r.perPositionHeight)&&void 0!==o&&o,l.fillColor=r.fillColor||new Cesium.Color(59,179,249,.5),l.fill=null===(s=r.fill)||void 0===s||s,l._radius=0,l._center=void 0,l._outlinePositions=[],l.granularity=null!==(a=r.granularity)&&void 0!==a?a:.01,l}return a(i,[{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,xe.drawEntityNames_Circle()),N(p(i.prototype),"clearNoDepthTestPolyline",this).call(this),N(p(i.prototype),"_clearPolyLinePrimitives",this).call(this),this._outlinePositions=[],this.end()}},{key:"_removeFloatPoint",value:function(e){return N(p(i.prototype),"_removeFloatPoint",this).call(this,e),e.length<2&&this.clear(),!this.justDraw&&e.length>=2&&this.showAreaLabel(),e}},{key:"_getCloseAnchor",value:function(e){if(!e||0===e.length)return null;var t=Cesium.BoundingSphere.fromPoints(e);return t?t.center:e[e.length-1]}},{key:"startDraw",value:function(){var e=this;this.end(),this._addToolTip(),this._addPolyLinePrimitives(),this.initNoDepthTestPolyline();var t=this.tooltip;this.ismeare=!0;var i=this._beginSession(),n=this.ismeare,r=this.viewer,o=this.cartesian,s=this.positions;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(r.scene.canvas);var a=this.mouseHandler,l=this.poly,u=this;this._originCursor=r.scene.canvas.style.cursor,r.scene.canvas.style.cursor="crosshair";var c=new Cesium.Cartesian2,h=!1;this._preUpdateListener=r.scene.preUpdate.addEventListener((function(){if(h){if(h=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=c.x+25+"px",e.tooltip.style.top=c.y-25+"px"),!(o=xe.pickPosition(r,c,e._getObjectsToExclude())))return e._tempPoint.show=!1,void(e._tempPoint.point.show=!1);if(e._tempPoint.show=!0,e._tempPoint.point.show=!0,e.justDraw)xe.setPointPosition(e._tempPoint,o);else{var t=xe.getPointLableString(o);xe.setPointLabel(e._tempPoint,o,t)}if(null!=o&&(s.length>1&&s.pop(),s.length>0&&s.push(o)),!Cesium.defined(l)){l=new Object;var i=new Cesium.CallbackProperty((function(){if(s.length>1){if(e._radius=Cesium.Cartesian3.distance(s[0],s[1]),e._radius<=0)return null;var t=Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:s[0],semiMajorAxis:e._radius,semiMinorAxis:e._radius,rotation:0,granularity:e.granularity},!1,!0),i=Cesium.Cartesian3.unpackArray(t.outerPositions);return i.push(i[0]),e._outlinePositions=i,new Cesium.PolygonHierarchy(i)}return null}),!1),n=new Cesium.CallbackProperty((function(){return e._outlinePositions}),!1),a={name:xe.drawEntityNames().drawCircle,polygon:{hierarchy:i,fill:u.fill,material:u.fillColor,perPositionHeight:u.perPositionHeight,outline:u.outline,outlineWidth:u.outlineWidth,outlineColor:u.outlineColor,heightReference:u.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}};a.polyline={positions:n,width:u.outlineWidth,material:u.outlineColor,clampToGround:u.clampToGround};var f=r.entities.add(a);u._registerEntity(f)}s.length>1&&!u.justDraw&&u.showAreaLabel()}})),a.setInputAction((function(e){n&&(h=!0,c=Cesium.Cartesian2.clone(e.endPosition,c))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),a.setInputAction((function(r){e._tempPoint.point.show=!1,e._tempPoint.show=!1,n&&o&&(t.style.display="none",s.push(o),u.lastLeftClickPoint=s[s.length-1],s.length>=2&&e._outlinePositions&&e._outlinePositions.length>0&&(u._showFloatingCloseBtn(i,e._outlinePositions),u.onCompleted&&u.onCompleted(e._outlinePositions,i),u.end()),u._notrackPos())}),Cesium.ScreenSpaceEventType.LEFT_CLICK),a.setInputAction((function(e){u.outlinePositions&&u.outlinePositions.length>0&&(u._showFloatingCloseBtn(i,u.outlinePositions),u.onCompleted&&u.onCompleted(u.outlinePositions,i)),u.end(),u._notrackPos()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),a.setInputAction((function(e){u.outlinePositions&&u.outlinePositions.length>0&&(u._showFloatingCloseBtn(i,u.outlinePositions),u.onCompleted&&u.onCompleted(u.outlinePositions,i)),u.end(),u._notrackPos()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"showAreaLabel",value:function(){var e=xe.getPolygonArea(this._outlinePositions),t="面积:"+(e=e||0).toFixed(2)+"平方米";e>=1e4&&(t="面积:"+(e/1e6).toFixed(2)+"平方千米"),e>=1e10&&(t="面积:"+(e/1e10).toFixed(2)+"万平方千米");var i=Cesium.BoundingSphere.fromPoints(this._outlinePositions);void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=xe.createPointLabel(this.viewer,i.center,t,xe.drawEntityNames().drawpolygon),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):xe.setPointLabel(this._totalLengthPointLabel,i.center,t)}}]),i}(Du);var Zu=function(){function e(t,i){n(this,e),Cesium&&t&&(this.viewer=t,this._polygon=void 0,this._show=!1,this._init(i))}return a(e,[{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._polygon&&(this._polygon.show=e)}},{key:"_drawPolygon",value:function(e){var t=this,i=this.viewer.entities.add({show:this.show,polygon:{hierarchy:new Cesium.PolygonHierarchy(e),material:Cesium.Color.fromBytes(64,157,253,100),perPositionHeight:!1,extrudedHeight:new Cesium.CallbackProperty((function(){return t._extrudedHeight}),!1)}});return this._polygon=i,i}},{key:"_init",value:function(e){var t;e=null!==(t=e)&&void 0!==t?t:Cesium.EMPTY_OBJECT,this._minHeight=e.minHeight||0,this._maxHeight=e.maxHeight||2e3,this._extrudedHeight=this.minHeight,this._speed=e.speed||10,this._polygon=null,this._interval=void 0,this._intervalStep=e.intervalStep||500}},{key:"start",value:function(e,t){var i=this;this._polygon||this._drawPolygon(e),this.show=!0,this._interval=window.setInterval((function(){i._maxHeight>i._extrudedHeight&&i._extrudedHeight>=i._minHeight?i._extrudedHeight+=i._speed:i._extrudedHeight=i._minHeight,t&&t(i._extrudedHeight)}),this._intervalStep),this.viewer.scene.globe.depthTestAgainstTerrain=!0}},{key:"noAuto",value:function(e,t){this._polygon||this._drawPolygon(e),this.show=!0,this._maxHeight>this._extrudedHeight&&this._extrudedHeight>=this._minHeight?this._extrudedHeight=t:this._extrudedHeight=this._minHeight,this.viewer.scene.globe.depthTestAgainstTerrain=!0}},{key:"stop",value:function(){this._polygon&&(this.viewer.entities.remove(this._polygon),this._polygon=null),this._interval&&(clearInterval(this._interval),this._interval=void 0),this.viewer.scene.globe.depthTestAgainstTerrain=!1}},{key:"pause",value:function(){this._interval&&(clearInterval(this._interval),this._interval=void 0)}},{key:"resetParas",value:function(e){var t;e=null!==(t=e)&&void 0!==t?t:Cesium.EMPTY_OBJECT,this._minHeight=e.minHeight||0,this._maxHeight=e.maxHeight||2e3,this._speed=e.setpHeight||10}}]),e}(),Yu=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},Ku="attribute vec4 position;\nvarying vec2 texcoord;\nvoid main(){\n texcoord = position.xy*0.5+0.5;\n gl_Position = position;\n}",Qu="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp int;\n precision highp float;\n#else\n precision mediump int;\n precision mediump float;\n#endif\nuniform sampler2D source;\nvarying vec2 texcoord;";!function(){var e,t,i,n;if(null!=window.WebGLRenderingContext)n=["WEBKIT","MOZ","MS","O"],i=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,e=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(t){var r,o,s,a,l;if(null!==(o=t.match(i))&&(t=o[1]),null===(r=e.call(this,t))){for(a=0,l=n.length;a<l;a++)if(s=n[a],null!==(r=e.call(this,s+"_"+t)))return r;return null}return r},t=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){var e,n,r,o,s,a;for(r=[],s=0,a=(o=t.call(this)).length;s<a;s++)null!==(n=(e=o[s]).match(i))&&(e=n[1]),Yu.call(r,e)<0&&r.push(e);return r}}(),function(){var e,t,i,n,r,o,s,a,l,u,c,h,f,p;if((r=function(){var e,t,i;return(e=document.createElement("canvas")).width=2,e.height=2,(i=(t=e.getContext("2d")).getImageData(0,0,2,2)).data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),t.putImageData(i,0,0),e})(),t=function(e,t){var i,n,o,s,a,l,u,c,h,f,p,m,d,v;if(l=e.createProgram(),d=e.createShader(e.VERTEX_SHADER),e.attachShader(l,d),e.shaderSource(d,"attribute vec2 position;\nvoid main(){\n gl_Position = vec4(position, 0.0, 1.0);\n}"),e.compileShader(d),!e.getShaderParameter(d,e.COMPILE_STATUS))throw e.getShaderInfoLog(d);if(o=e.createShader(e.FRAGMENT_SHADER),e.attachShader(l,o),e.shaderSource(o,"uniform sampler2D source;\nvoid main(){\n gl_FragColor = texture2D(source, vec2(1.0, 1.0));\n}"),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS))throw e.getShaderInfoLog(o);if(e.linkProgram(l),!e.getProgramParameter(l,e.LINK_STATUS))throw e.getProgramInfoLog(l);return e.useProgram(l),n=function(){return e.deleteShader(o),e.deleteShader(d),e.deleteProgram(l),e.deleteBuffer(i),e.deleteTexture(h),e.deleteTexture(m),e.deleteFramebuffer(s),e.bindBuffer(e.ARRAY_BUFFER,null),e.useProgram(null),e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null)},m=e.createTexture(),e.bindTexture(e.TEXTURE_2D,m),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,2,2,0,e.RGBA,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),s=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,s),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,m,0),f=r(),h=e.createTexture(),e.bindTexture(e.TEXTURE_2D,h),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,t,f),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),v=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),i=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,v,e.STATIC_DRAW),a=e.getAttribLocation(l,"position"),p=e.getUniformLocation(l,"source"),e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0),e.uniform1i(p,0),e.drawArrays(e.TRIANGLES,0,6),u=new Uint8Array(16),e.readPixels(0,0,2,2,e.RGBA,e.UNSIGNED_BYTE,u),c=Math.abs(u[0]-127)<10,n(),c},n=function(e,t){var i;return i=e.createTexture(),e.bindTexture(e.TEXTURE_2D,i),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,2,2,0,e.RGBA,t,null),0===e.getError()?(e.deleteTexture(i),!0):(e.deleteTexture(i),!1)},e=function(e,t){var i,n,r;return r=e.createTexture(),e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,2,2,0,e.RGBA,t,null),n=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0),i=e.checkFramebufferStatus(e.FRAMEBUFFER),e.deleteTexture(r),e.deleteFramebuffer(n),e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),i===e.FRAMEBUFFER_COMPLETE},l=[],u={},c=[],i=function(){var i,r,o,s,a;i=document.createElement("canvas"),r=null;try{null===(r=i.getContext("experimental-webgl"))&&(r=i.getContext("webgl"))}catch(e){}if(null!=r&&(null===r.getExtension("OES_texture_float")?n(r,r.FLOAT)?(a=!0,l.push("OES_texture_float"),u.OES_texture_float={shim:!0}):(a=!1,c.push("OES_texture_float")):n(r,r.FLOAT)?(a=!0,l.push("OES_texture_float")):(a=!1,c.push("OES_texture_float")),a&&(null===r.getExtension("WEBGL_color_buffer_float")?e(r,r.FLOAT)?(l.push("WEBGL_color_buffer_float"),u.WEBGL_color_buffer_float={shim:!0,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):c.push("WEBGL_color_buffer_float"):e(r,r.FLOAT)?l.push("WEBGL_color_buffer_float"):c.push("WEBGL_color_buffer_float"),null===r.getExtension("OES_texture_float_linear")?t(r,r.FLOAT)?(l.push("OES_texture_float_linear"),u.OES_texture_float_linear={shim:!0}):c.push("OES_texture_float_linear"):t(r,r.FLOAT)?l.push("OES_texture_float_linear"):c.push("OES_texture_float_linear")),null===(o=r.getExtension("OES_texture_half_float"))?n(r,36193)?(s=!0,l.push("OES_texture_half_float"),o=u.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(s=!1,c.push("OES_texture_half_float")):n(r,o.HALF_FLOAT_OES)?(s=!0,l.push("OES_texture_half_float")):(s=!1,c.push("OES_texture_half_float")),s))return null===r.getExtension("EXT_color_buffer_half_float")?e(r,o.HALF_FLOAT_OES)?(l.push("EXT_color_buffer_half_float"),u.EXT_color_buffer_half_float={shim:!0,RGBA16F_EXT:34842,RGB16F_EXT:34843,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):c.push("EXT_color_buffer_half_float"):e(r,o.HALF_FLOAT_OES)?l.push("EXT_color_buffer_half_float"):c.push("EXT_color_buffer_half_float"),null===r.getExtension("OES_texture_half_float_linear")?t(r,o.HALF_FLOAT_OES)?(l.push("OES_texture_half_float_linear"),u.OES_texture_half_float_linear={shim:!0}):c.push("OES_texture_half_float_linear"):t(r,o.HALF_FLOAT_OES)?l.push("OES_texture_half_float_linear"):c.push("OES_texture_half_float_linear")},null!=window.WebGLRenderingContext){for(i(),h={},f=0,p=c.length;f<p;f++)a=c[f],h[a]=!0;o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(e){var t;return void 0===(t=u[e])?h[e]?null:o.call(this,e):t},s=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){var e,t,i,n,r,o,a;for(t=[],n=0,o=(i=s.call(this)).length;n<o;n++)e=i[n],void 0===h[e]&&t.push(e);for(r=0,a=l.length;r<a;r++)e=l[r],Yu.call(t,e)<0&&t.push(e);return t},WebGLRenderingContext.prototype.getFloatExtension=function(e){var t,i,n,r,o,s,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O,x,E,A;for(null==e.prefer&&(e.prefer=["half"]),null==e.require&&(e.require=[]),null==e.throws&&(e.throws=!0),d=this.getExtension("OES_texture_float"),s=this.getExtension("OES_texture_half_float"),p=this.getExtension("WEBGL_color_buffer_float"),r=this.getExtension("EXT_color_buffer_half_float"),m=this.getExtension("OES_texture_float_linear"),o=this.getExtension("OES_texture_half_float_linear"),f={texture:null!==d,filterable:null!==m,renderable:null!==p,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},n={texture:null!==s,filterable:null!==o,renderable:null!==r,score:0,precision:"half",half:!0,single:!1,type:null!=(x=null!=s?s.HALF_FLOAT_OES:void 0)?x:null},i=[],f.texture&&i.push(f),n.texture&&i.push(n),h=[],y=0,C=i.length;y<C;y++){for(t=i[y],v=!0,g=0,b=(E=e.require).length;g<b;g++)!1===t[a=E[g]]&&(v=!1);v&&h.push(t)}for(_=0,w=h.length;_<w;_++)for(t=h[_],l=O=0,P=(A=e.prefer).length;O<P;l=++O)c=A[l],u=Math.pow(2,e.prefer.length-l-1),t[c]&&(t.score+=u);if(h.sort((function(e,t){return e.score===t.score?0:e.score<t.score?1:e.score>t.score?-1:void 0})),0===h.length){if(e.throws)throw"No floating point texture support that is "+e.require.join(", ");return null}return{filterable:(h=h[0]).filterable,renderable:h.renderable,type:h.type,precision:h.precision}}}}();var Xu=function(){function e(e,t){var i,n;this.gl=e,n=t.vertex,i=t.fragment,this.program=this.gl.createProgram(),this.vs=this.gl.createShader(this.gl.VERTEX_SHADER),this.fs=this.gl.createShader(this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vs),this.gl.attachShader(this.program,this.fs),this.compileShader(this.vs,n),this.compileShader(this.fs,i),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return e.prototype.attribLocation=function(e){var t=this.attribCache[e];return void 0===t&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},e.prototype.compileShader=function(e,t){if(this.gl.shaderSource(e,t),this.gl.compileShader(e),!this.gl.getShaderParameter(e,this.gl.COMPILE_STATUS))throw"Shader Compile Error: "+this.gl.getShaderInfoLog(e)},e.prototype.link=function(){if(this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw"Shader Link Error: "+this.gl.getProgramInfoLog(this.program)},e.prototype.use=function(){return this.gl.useProgram(this.program),this},e.prototype.uniformLoc=function(e){var t=this.uniform_cache[e];return void 0===t&&(t=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),t},e.prototype.int=function(e,t){var i;return this.value_cache[e]!==t&&(this.value_cache[e]=t,(i=this.uniformLoc(e))&&this.gl.uniform1i(i,t)),this},e.prototype.vec2=function(e,t,i){var n;return(n=this.uniformLoc(e))&&this.gl.uniform2f(n,t,i),this},e.prototype.float=function(e,t){var i;return this.value_cache[e]!==t&&(this.value_cache[e]=t,(i=this.uniformLoc(e))&&this.gl.uniform1f(i,t)),this},e}(),Ju=function(){function e(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return e.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},e.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},e.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},e.prototype.check=function(){switch(this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER)){case this.gl.FRAMEBUFFER_UNSUPPORTED:throw"Framebuffer is unsupported";case this.gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Framebuffer incomplete attachment";case this.gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Framebuffer incomplete dimensions";case this.gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Framebuffer incomplete missing attachment"}return this},e.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},e.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},e.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},e}(),$u=function(){function e(e,t){var i,n;switch(this.gl=e,null==t&&(t={}),this.channels=this.gl[(null!=(i=t.channels)?i:"rgba").toUpperCase()],"number"==typeof t.type?this.type=t.type:this.type=this.gl[(null!=(n=t.type)?n:"unsigned_byte").toUpperCase()],this.channels){case this.gl.RGBA:this.chancount=4;break;case this.gl.RGB:this.chancount=3;break;case this.gl.LUMINANCE_ALPHA:this.chancount=2;break;default:this.chancount=1}this.target=this.gl.TEXTURE_2D,this.handle=this.gl.createTexture()}return e.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},e.prototype.bind=function(e){if(null==e&&(e=0),e>15)throw"Texture unit too large: "+e;return this.gl.activeTexture(this.gl.TEXTURE0+e),this.gl.bindTexture(this.target,this.handle),this},e.prototype.setSize=function(e,t){return this.width=e,this.height=t,this.gl.texImage2D(this.target,0,this.channels,this.width,this.height,0,this.channels,this.type,null),this},e.prototype.upload=function(e){return this.width=e.width,this.height=e.height,this.gl.texImage2D(this.target,0,this.channels,this.channels,this.type,e),this},e.prototype.linear=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this},e.prototype.nearest=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this},e.prototype.clampToEdge=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this},e.prototype.repeat=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT),this},e}(),ec=function(){function e(e,t,i){var n;this.gl=e,this.width=t,this.height=i,n=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new $u(this.gl,{type:n.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new Ju(this.gl).bind().color(this.texture).unbind()}return e.prototype.use=function(){return this.fbo.bind()},e.prototype.bind=function(e){return this.texture.bind(e)},e.prototype.end=function(){return this.fbo.unbind()},e.prototype.resize=function(e,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},e}(),tc=function(){function e(e,t,i,n){var r,o,s;for(this.heatmap=e,this.gl=t,this.width=i,this.height=n,this.shader=new Xu(this.gl,{vertex:"attribute vec4 position, intensity;\nvarying vec2 off, dim;\nvarying float vIntensity;\nuniform vec2 viewport;\n\nvoid main(){\n dim = abs(position.zw);\n off = position.zw;\n vec2 pos = position.xy + position.zw;\n vIntensity = intensity.x;\n gl_Position = vec4((pos/viewport)*2.0-1.0, 0.0, 1.0);\n}",fragment:"#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp int;\n precision highp float;\n#else\n precision mediump int;\n precision mediump float;\n#endif\nvarying vec2 off, dim;\nvarying float vIntensity;\nvoid main(){\n float falloff = (1.0 - smoothstep(0.0, 1.0, length(off/dim)));\n float intensity = falloff*vIntensity;\n gl_FragColor = vec4(intensity);\n}"}),this.clampShader=new Xu(this.gl,{vertex:Ku,fragment:Qu+"uniform float low, high;\nvoid main(){\n gl_FragColor = vec4(clamp(texture2D(source, texcoord).rgb, low, high), 1.0);\n}"}),this.multiplyShader=new Xu(this.gl,{vertex:Ku,fragment:Qu+"uniform float value;\nvoid main(){\n gl_FragColor = vec4(texture2D(source, texcoord).rgb*value, 1.0);\n}"}),this.blurShader=new Xu(this.gl,{vertex:Ku,fragment:Qu+"uniform vec2 viewport;\nvoid main(){\n vec4 result = vec4(0.0);\n for(int x=-1; x<=1; x++){\n for(int y=-1; y<=1; y++){\n vec2 off = vec2(x,y)/viewport;\n //float factor = 1.0 - smoothstep(0.0, 1.5, length(off));\n float factor = 1.0;\n result += vec4(texture2D(source, texcoord+off).rgb*factor, factor);\n }\n }\n gl_FragColor = vec4(result.rgb/result.w, 1.0);\n}"}),this.nodeBack=new ec(this.gl,this.width,this.height),this.nodeFront=new ec(this.gl,this.width,this.height),this.vertexBuffer=this.gl.createBuffer(),this.vertexSize=8,this.maxPointCount=10240,this.vertexBufferData=new Float32Array(this.maxPointCount*this.vertexSize*6),this.vertexBufferViews=[],r=o=0,s=this.maxPointCount;0<=s?o<s:o>s;r=0<=s?++o:--o)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,r*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return e.prototype.resize=function(e,t){return this.width=e,this.height=t,this.nodeBack.resize(this.width,this.height),this.nodeFront.resize(this.width,this.height)},e.prototype.update=function(){var e,t;if(this.pointCount>0)return this.gl.enable(this.gl.BLEND),this.nodeFront.use(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.vertexBufferViews[this.pointCount],this.gl.STREAM_DRAW),t=this.shader.attribLocation("position"),e=this.shader.attribLocation("intensity"),this.gl.enableVertexAttribArray(1),this.gl.vertexAttribPointer(t,4,this.gl.FLOAT,!1,32,0),this.gl.vertexAttribPointer(e,4,this.gl.FLOAT,!1,32,16),this.shader.use().vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6*this.pointCount),this.gl.disableVertexAttribArray(1),this.pointCount=0,this.bufferIndex=0,this.nodeFront.end(),this.gl.disable(this.gl.BLEND)},e.prototype.clear=function(){return this.nodeFront.use(),this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.nodeFront.end()},e.prototype.clamp=function(e,t){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.clampShader.use().int("source",0).float("low",e).float("high",t),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},e.prototype.multiply=function(e){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.multiplyShader.use().int("source",0).float("value",e),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},e.prototype.blur=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.blurShader.use().int("source",0).vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},e.prototype.swap=function(){var e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},e.prototype.addVertex=function(e,t,i,n,r){return this.vertexBufferData[this.bufferIndex++]=e,this.vertexBufferData[this.bufferIndex++]=t,this.vertexBufferData[this.bufferIndex++]=i,this.vertexBufferData[this.bufferIndex++]=n,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=r},e.prototype.addPoint=function(e,t,i,n){var r;return null==i&&(i=50),null==n&&(n=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,r=i/2,this.addVertex(e,t,-r,-r,n),this.addVertex(e,t,+r,-r,n),this.addVertex(e,t,-r,+r,n),this.addVertex(e,t,-r,+r,n),this.addVertex(e,t,+r,-r,n),this.addVertex(e,t,+r,+r,n),this.pointCount+=1},e}(),ic=function(){function e(e){var t,i,n,r,o,s,a,l,u,c,h,f;h=null!=e?e:{},this.canvas=h.canvas,this.width=h.width,this.height=h.height,a=h.intensityToAlpha,o=h.gradientTexture,i=h.alphaRange,this.canvas||(this.canvas=document.createElement("canvas"));try{if(this.gl=this.canvas.getContext("experimental-webgl",{depth:!1,antialias:!1}),null===this.gl&&(this.gl=this.canvas.getContext("webgl",{depth:!1,antialias:!1}),null===this.gl))throw"WebGL not supported"}catch(e){throw e,"WebGL not supported"}null!=window.WebGLDebugUtils&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,(function(e,t,i){throw window.WebGLDebugUtils.glEnumToString(e)+" was caused by call to: "+t}))),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),o?(c=this.gradientTexture=new $u(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),"string"==typeof o?((s=new Image).onload=function(){return c.bind().upload(s)},s.src=o):o.width>0&&o.height>0?c.upload(o):o.onload=function(){return c.upload(o)},r="uniform sampler2D gradientTexture;\nvec3 getColor(float intensity){\n return texture2D(gradientTexture, vec2(intensity, 0.0)).rgb;\n}"):(c=null,r="vec3 getColor(float intensity){\n vec3 blue = vec3(0.0, 0.0, 1.0);\n vec3 cyan = vec3(0.0, 1.0, 1.0);\n vec3 green = vec3(0.0, 1.0, 0.0);\n vec3 yellow = vec3(1.0, 1.0, 0.0);\n vec3 red = vec3(1.0, 0.0, 0.0);\n\n vec3 color = (\n fade(-0.25, 0.25, intensity)*blue +\n fade(0.0, 0.5, intensity)*cyan +\n fade(0.25, 0.75, intensity)*green +\n fade(0.5, 1.0, intensity)*yellow +\n smoothstep(0.75, 1.0, intensity)*red\n );\n return color;\n}"),null==a&&(a=!0),a?(n=(f=null!=i?i:[0,1])[0],t=f[1],l="vec4 alphaFun(vec3 color, float intensity){\n float alpha = smoothstep("+n.toFixed(8)+", "+t.toFixed(8)+", intensity);\n return vec4(color*alpha, alpha);\n}"):l="vec4 alphaFun(vec3 color, float intensity){\n return vec4(color, 1.0);\n}",this.shader=new Xu(this.gl,{vertex:Ku,fragment:Qu+"float linstep(float low, float high, float value){\n return clamp((value-low)/(high-low), 0.0, 1.0);\n}\n\nfloat fade(float low, float high, float value){\n float mid = (low+high)*0.5;\n float range = (high-low)*0.5;\n float x = 1.0 - clamp(abs(mid-value)/range, 0.0, 1.0);\n return smoothstep(0.0, 1.0, x);\n}\n\n"+r+"\n"+l+"\n\nvoid main(){\n float intensity = smoothstep(0.0, 1.0, texture2D(source, texcoord).r);\n vec3 color = getColor(intensity);\n gl_FragColor = alphaFun(color, intensity);\n}"}),null==this.width&&(this.width=this.canvas.offsetWidth||2),null==this.height&&(this.height=this.canvas.offsetHeight||2),this.canvas.width=this.width,this.canvas.height=this.height,this.gl.viewport(0,0,this.width,this.height),this.quad=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),u=new Float32Array([-1,-1,0,1,1,-1,0,1,-1,1,0,1,-1,1,0,1,1,-1,0,1,1,1,0,1]),this.gl.bufferData(this.gl.ARRAY_BUFFER,u,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.heights=new tc(this,this.gl,this.width,this.height)}return e.prototype.adjustSize=function(){var e,t;if(t=this.canvas.offsetWidth||2,e=this.canvas.offsetHeight||2,this.width!==t||this.height!==e)return this.gl.viewport(0,0,t,e),this.canvas.width=t,this.canvas.height=e,this.width=t,this.height=e,this.heights.resize(this.width,this.height)},e.prototype.display=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.heights.nodeFront.bind(0),this.gradientTexture&&this.gradientTexture.bind(1),this.shader.use().int("source",0).int("gradientTexture",1),this.gl.drawArrays(this.gl.TRIANGLES,0,6)},e.prototype.update=function(){return this.heights.update()},e.prototype.clear=function(){return this.heights.clear()},e.prototype.clamp=function(e,t){return null==e&&(e=0),null==t&&(t=1),this.heights.clamp(e,t)},e.prototype.multiply=function(e){return null==e&&(e=.95),this.heights.multiply(e)},e.prototype.blur=function(){return this.heights.blur()},e.prototype.addPoint=function(e,t,i,n){return this.heights.addPoint(e,t,i,n)},e.prototype.addPoints=function(e){var t,i,n,r;for(r=[],i=0,n=e.length;i<n;i++)t=e[i],r.push(this.addPoint(t.x,t.y,t.size,t.intensity));return r},e}();function nc(e){return new ic(e)}function rc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function oc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?rc(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):rc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function sc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ac=new Cesium.WebMercatorProjection,lc={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},uc=function(e){c(i,e);var t=sc(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._options=oc(oc({},lc),r),e._nativeObjCesium=new Cesium.PrimitiveCollection,e._isGround=e._options.useGround,e._canvas=document.createElement("canvas"),e._canvas.setAttribute("id",e.id),e._heat=void 0,e._scale=1,e._points=[],e._bounds=new Cesium.Rectangle,e._boundsInMeter=void 0,e._primitive=e._nativeObjCesium.add(e._isGround?new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}}),classificationType:e._options.classificationType}):new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})})),e._state=Ae.INITIALIZED,e}return a(i,[{key:"type",get:function(){return cr.getLayerType("heat-map")}},{key:"_addedHook",value:function(){this._canvas.style.cssText="\n visibility:hidden;\n width:".concat(this._viewer.canvas.width,"px;\n height:").concat(this._viewer.canvas.height,"px;\n "),this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=nc({canvas:this._canvas,gradientTexture:this._createGradientTexture()}),this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update())}},{key:"_createGradientTexture",value:function(){if(this._options.gradient){var e=document.createElement("canvas");e.width=200,e.height=10;var t=e.getContext("2d"),i=t.createLinearGradient(0,0,200,0);for(var n in this._options.gradient)i.addColorStop(+n,this._options.gradient[n]);return t.fillStyle=i,t.fillRect(0,0,200,10),e}}},{key:"_parsePoints",value:function(e){var t=this;return e.map((function(e){var i=ac.project(Cesium.Cartographic.fromDegrees(e.lng,e.lat));return{x:(i.x-t._boundsInMeter.west)/t._scale,y:(i.y-t._boundsInMeter.south)/t._scale,size:t._options.radius,intensity:e.value||Math.random()}}))}},{key:"_computeBounds",value:function(){Cesium.Rectangle.fromCartographicArray(this._points.map((function(e){return Cesium.Cartographic.fromDegrees(e.lng,e.lat)})),this._bounds)}},{key:"_computeBoundsInMeter",value:function(){var e=ac.project(Cesium.Rectangle.southwest(this._bounds)),t=ac.project(Cesium.Rectangle.northeast(this._bounds));this._boundsInMeter=new Cesium.Rectangle(e.x,e.y,t.x,t.y)}},{key:"_update",value:function(){if(!this._points||!this._points.length)return!1;this._heat.adjustSize(),this._heat.update(),this._heat.display(),this._primitive&&this._primitive.geometryInstances&&(this._primitive.geometryInstances.geometry=new Cesium.RectangleGeometry({rectangle:this._bounds,height:this._options.height})),this._primitive.appearance=new Cesium.MaterialAppearance({material:new Cesium.Material({fabric:{type:"Heat-Image",uniforms:{image:this._canvas},source:"\n uniform sampler2D image;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 colorImage = texture2D(image,st);\n if(colorImage.rgb == vec3(1.0) || colorImage.rgb == vec3(0.0)){\n discard;\n }\n material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a;\n return material;\n }\n "},translucent:function(e){return!0}}),flat:!0})}},{key:"setPoints",value:function(e){return this._points=e,this._computeBounds(),this._computeBoundsInMeter(),this._viewer&&(this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat=nc({canvas:this._canvas,gradientTexture:this._createGradientTexture()})),this._heat&&(this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update()),this}},{key:"clear",value:function(){return this._heat.clear(),this._points=[],this._state=Ae.CLEARED,this}}]),i}(cr);cr.registerType("heat-map");const cc=uc;var hc={defaults:{useEntitiesIfAvailable:!0,minCanvasSize:700,maxCanvasSize:2e3,radiusFactor:60,spacingFactor:1.5,maxOpacity:.8,minOpacity:.1,blur:.85,gradient:{".3":"blue",".65":"yellow",".8":"orange",".95":"red"},backgroundColor:"rgba(0,0,0,0)"},create:function(e,t,i){return new pc(e,t,i)},_getContainer:function(e,t,i){var n=document.createElement("div");return i&&n.setAttribute("id",i),n.setAttribute("style","width: "+e+"px; height: "+t+"px; margin: 0px; display: none;"),document.body.appendChild(n),n},_getImageryProvider:function(e){var t=e._heatmap.getDataURL(),i=new Cesium.SingleTileImageryProvider({url:t,rectangle:e._rectangle});return i._tilingScheme=new Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new Cesium.Cartesian2(e._mbounds.west,e._mbounds.south),rectangleNortheastInMeters:new Cesium.Cartesian2(e._mbounds.east,e._mbounds.north)}),i},_getID:function(e){for(var t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<(e||8);n++)t+=i.charAt(Math.floor(62*Math.random()));return t}},fc=new Cesium.WebMercatorProjection;function pc(e,t,i){if(!t)return null;i||(i={}),this._cesium=e,this._options=i,this._id=hc._getID(),this._options.gradient=this._options.gradient?this._options.gradient:hc.defaults.gradient,this._options.maxOpacity=this._options.maxOpacity?this._options.maxOpacity:hc.defaults.maxOpacity,this._options.minOpacity=this._options.minOpacity?this._options.minOpacity:hc.defaults.minOpacity,this._options.blur=this._options.blur?this._options.blur:hc.defaults.blur,this._options.backgroundColor=this._options.backgroundColor?this._options.backgroundColor:hc.defaults.backgroundColor,this._mbounds=hc.wgs84ToMercatorBB(t),this._setWidthAndHeight(this._mbounds),this._options.radius=Math.round(this._options.radius?this._options.radius:this.width>this.height?this.width/hc.defaults.radiusFactor:this.height/hc.defaults.radiusFactor),this._spacing=this._options.radius*hc.defaults.spacingFactor,this._xoffset=this._mbounds.west,this._yoffset=this._mbounds.south,this.width=Math.round(this.width+2*this._spacing),this.height=Math.round(this.height+2*this._spacing),this._mbounds.west-=this._spacing*this._factor,this._mbounds.east+=this._spacing*this._factor,this._mbounds.south-=this._spacing*this._factor,this._mbounds.north+=this._spacing*this._factor,this.bounds=hc.mercatorToWgs84BB(this._mbounds),this._rectangle=Cesium.Rectangle.fromDegrees(this.bounds.west,this.bounds.south,this.bounds.east,this.bounds.north),this._container=hc._getContainer(this.width,this.height,this._id),this._options.container=this._container,this._heatmap=h337.create(this._options),this._container.children[0].setAttribute("id",this._id+"-hm"),this._newEntity=null,this._oldEntity=null}hc.wgs84ToMercator=function(e){var t=fc.project(Cesium.Cartographic.fromDegrees(e.x,e.y));return{x:t.x,y:t.y}},hc.wgs84ToMercatorBB=function(e){var t=fc.project(Cesium.Cartographic.fromDegrees(e.west,e.south)),i=fc.project(Cesium.Cartographic.fromDegrees(e.east,e.north));return{north:i.y,east:i.x,south:t.y,west:t.x}},hc.mercatorToWgs84=function(e){var t=fc.unproject(new Cesium.Cartesian3(e.x,e.y));return{x:t.longitude,y:t.latitude}},hc.mercatorToWgs84BB=function(e){var t=fc.unproject(new Cesium.Cartesian3(e.west,e.south)),i=fc.unproject(new Cesium.Cartesian3(e.east,e.north));return{north:this.rad2deg(i.latitude),east:this.rad2deg(i.longitude),south:this.rad2deg(t.latitude),west:this.rad2deg(t.longitude)}},hc.deg2rad=function(e){return e*(Math.PI/180)},hc.rad2deg=function(e){return e/(Math.PI/180)},pc.prototype.wgs84PointToHeatmapPoint=function(e){return this.mercatorPointToHeatmapPoint(hc.wgs84ToMercator(e))},pc.prototype.mercatorPointToHeatmapPoint=function(e){var t={};return t.x=Math.round((e.x-this._xoffset)/this._factor+this._spacing),t.y=Math.round((e.y-this._yoffset)/this._factor+this._spacing),t.y=this.height-t.y,t},pc.prototype._setWidthAndHeight=function(e){this.width=e.east>0&&e.west<0?e.east+Math.abs(e.west):Math.abs(e.east-e.west),this.height=e.north>0&&e.south<0?e.north+Math.abs(e.south):Math.abs(e.north-e.south),this._factor=1,this.width>this.height&&this.width>hc.defaults.maxCanvasSize?(this._factor=this.width/hc.defaults.maxCanvasSize,this.height/this._factor<hc.defaults.minCanvasSize&&(this._factor=this.height/hc.defaults.minCanvasSize)):this.height>this.width&&this.height>hc.defaults.maxCanvasSize?(this._factor=this.height/hc.defaults.maxCanvasSize,this.width/this._factor<hc.defaults.minCanvasSize&&(this._factor=this.width/hc.defaults.minCanvasSize)):this.width<this.height&&this.width<hc.defaults.minCanvasSize?(this._factor=this.width/hc.defaults.minCanvasSize,this.height/this._factor>hc.defaults.maxCanvasSize&&(this._factor=this.height/hc.defaults.maxCanvasSize)):this.height<this.width&&this.height<hc.defaults.minCanvasSize&&(this._factor=this.height/hc.defaults.minCanvasSize,this.width/this._factor>hc.defaults.maxCanvasSize&&(this._factor=this.width/hc.defaults.maxCanvasSize)),this.width=this.width/this._factor,this.height=this.height/this._factor},pc.prototype.setData=function(e,t,i){return!!(i&&i.length>0&&null!==e&&!1!==e&&null!==t&&!1!==t)&&(this._heatmap.setData({min:e,max:t,data:i}),this.updateLayer(),!0)},pc.prototype.setWGS84Data=function(e,t,i){if(i&&i.length>0&&null!==e&&!1!==e&&null!==t&&!1!==t){for(var n=[],r=0;r<i.length;r++){var o=i[r],s=this.wgs84PointToHeatmapPoint(o);(o.value||0===o.value)&&(s.value=o.value),n.push(s)}return this.setData(e,t,n)}return!1},pc.prototype.show=function(e){(this._oldEntity||this._newEntity)&&(this._oldEntity.show=e,this._newEntity.show=e)},pc.prototype.updateLayer=function(){var e=this;hc.defaults.useEntitiesIfAvailable&&this._cesium.entities?this._oldEntity?(this._newEntity=this._cesium.entities.add({show:!1,name:"heatEntities_ts",rectangle:{coordinates:this._rectangle,material:this._heatmap._renderer.canvas}}),setTimeout((function(){e._cesium.entities.remove(e._oldEntity),e._newEntity.show=!0,e._oldEntity=e._newEntity,e._cesium.entities._entities._array.forEach((function(t){"heatEntities_ts"==t.name&&t.id!==e._newEntity.id&&e._cesium.entities.remove(t)}))}),300)):(this._newEntity=this._cesium.entities.add({show:!0,rectangle:{coordinates:this._rectangle,material:this._heatmap._renderer.canvas}}),this._oldEntity=this._newEntity):(this._layer&&this._cesium.scene.imageryLayers.remove(this._layer),this._layer=this._cesium.scene.imageryLayers.addImageryProvider(hc._getImageryProvider(this)))};const mc=hc;const dc={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",FRONT:"front",BACK:"back",NONE:"none"};function vc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function yc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?vc(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):vc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var gc={edgeWidth:0,edgeColor:Cesium.Color.WHITE,unionClippingRegions:!1};function _c(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Cc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_c(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_c(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function bc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var wc={lerpInterval:50,bottomImage:"",sideImage:""},Pc=function(e){c(i,e);var t=bc(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,Cc(Cc({},wc),o)))._viewer=e,r._viewer.scene.globe.clippingPlanes=r._planeCollection,r._height=5,r._layer=new Cesium.PrimitiveCollection,r._viewer.scene.primitives.add(r._layer),r}return a(i,[{key:"height",get:function(){return this._height},set:function(e){this._height=e,this._layer.removeAll(),this._drawPrimitive()}},{key:"_enableHook",value:function(){this._layer.show=this._enable}},{key:"_drawPrimitive",value:function(){var e=this;if(this._planeCollection.length)if(this._createBottomPolygon(),!this._viewer.terrainProvider||this._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider)this._createSideWall(this._positions.map((function(e){return He.transformWGS84ToCartesian(e)})),this._positions.map((function(e){return e.alt})));else{for(var t=[],i=this._positions.length,n=this._options.lerpInterval,r=0;r<i;r++)for(var o=(r+1)%i,s=He.transformWGS84ToCartographic(this._positions[r]),a=He.transformWGS84ToCartographic(this._positions[o]),l=0;l<n;l++){var u=Cesium.Math.lerp(s.longitude,a.longitude,l/n),c=Cesium.Math.lerp(s.latitude,a.latitude,l/n);t.push(new Cesium.Cartographic(u,c))}Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,t).then((function(t){e._createSideWall(t.map((function(e){return Cesium.Cartesian3.fromRadians(e.longitude,e.latitude)})),t.map((function(e){return e.height})))}))}}},{key:"_mountPlanes",value:function(){var e=this;this._layer.removeAll(),this._planeCollection.removeAll(),this.computeGlobePlanes().forEach((function(t){e._planeCollection.add(t)})),this._drawPrimitive()}},{key:"_getMinHeight",value:function(){var e=this._positions[0].alt;return this._positions.forEach((function(t){e=Math.min(e,t.alt)})),e-this._height}},{key:"_createBottomPolygon",value:function(){var e=this._getMinHeight(),t=this._positions.map((function(t){return{lng:t.lng,lat:t.lat,alt:e}})),i=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(He.transformWGS84ArrayToCartesianArray(t)),perPositionHeight:!0}),n=Cesium.PolygonGeometry.createGeometry(i);this._layer.add(new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:n}),appearance:new Cesium.MaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.ImageType,{image:this._options.bottomImage,repeat:new Cesium.Cartesian2(5,5)})}),asynchronous:!1}))}},{key:"_createSideWall",value:function(e,t){var i=this._getMinHeight(),n=e.map((function(){return i})),r=new Cesium.WallGeometry({positions:e.concat(e[0]),maximumHeights:n.concat(n[0]),minimumHeights:t.concat(t[0])}),o=Cesium.WallGeometry.createGeometry(r);this._layer.add(new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:o}),appearance:new Cesium.MaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.ImageType,{image:this._options.sideImage,repeat:new Cesium.Cartesian2(10,1)})}),asynchronous:!1}))}}]),i}(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._options=yc(yc({},gc),t),this._direction=void 0,this._distance=0,this._angle=0,this._positions=void 0,this._planeCollection=new Cesium.ClippingPlaneCollection({edgeWidth:this._options.edgeWidth,edgeColor:this._options.edgeColor,unionClippingRegions:this._options.unionClippingRegions}),this._enable=!1}return a(e,[{key:"positions",get:function(){return this._positions},set:function(e){this._positions=De.parsePositions(e),this._direction=void 0,this._mountPlanes()}},{key:"direction",get:function(){return this._direction},set:function(e){this._positions=[],this._direction=e,this._mountPlanes()}},{key:"distance",get:function(){return this._distance},set:function(e){this._distance=+e,this._planeCollection._planes.forEach((function(t){t.distance=+e}))}},{key:"angle",get:function(){return this._angle},set:function(e){this._angle=+e,this._planeCollection._planes.forEach((function(t){if(e){var i=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(+e));Cesium.Matrix3.multiplyByVector(i,t.normal,t.normal)}}))}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable!==e&&(this._enable=e,this._planeCollection.enabled=this._enable,this._state=this._enable?Ae.ENABLED:Ae.DISABLED,this._enableHook&&this._enableHook())}},{key:"state",get:function(){return this._state}},{key:"_enableHook",value:function(){}},{key:"_mountPlanes",value:function(){}},{key:"_getDirectionNoraml",value:function(e){var t=void 0;switch(e){case dc.UP:t=new Cesium.Cartesian3(0,0,1);break;case dc.DOWN:t=new Cesium.Cartesian3(0,0,-1);break;case dc.LEFT:t=new Cesium.Cartesian3(-1,0,0);break;case dc.RIGHT:t=new Cesium.Cartesian3(1,0,0);break;case dc.FRONT:t=new Cesium.Cartesian3(0,-1,0);break;case dc.BACK:t=new Cesium.Cartesian3(0,1,0)}return t}},{key:"_isCcw",value:function(e){if(!e||e.length<3)return!1;var t=He.transformWGS84ToCartesian(this._positions[0]),i=He.transformWGS84ToCartesian(this._positions[1]),n=He.transformWGS84ToCartesian(this._positions[2]);return(n.y-i.y)*(i.x-t.x)-(i.y-t.y)*(n.x-i.x)>0}},{key:"computeGlobePlanes",value:function(){var e=[];if(this._positions&&this._positions.length>=3)for(var t=this._isCcw(this._positions),i=this._positions.length,n=0;n<i;n++){var r=(n+1)%i;if(this._positions[n].lng!==this._positions[r].lng||this._positions[n].lat!==this._positions[r].lat||this._positions[n].alt!==this._positions[r].lat){var o=He.transformWGS84ToCartesian(this._positions[n]),s=He.transformWGS84ToCartesian(this._positions[r]),a=Cesium.Cartesian3.cross(o,t?Cesium.Cartesian3.subtract(o,s,new Cesium.Cartesian3):Cesium.Cartesian3.subtract(s,o,new Cesium.Cartesian3),new Cesium.Cartesian3);Cesium.Cartesian3.normalize(a,a),e.push(new Cesium.ClippingPlane(a,this._distance||0))}}return e}},{key:"computeModelPlanes",value:function(e){var t=[],i=Cesium.Matrix4.inverseTransformation(e,new Cesium.Matrix4);if(this._positions&&2===this._positions.length){var n=Cesium.Cartesian3.UNIT_Z,r=Cesium.Matrix4.multiplyByPoint(i,He.transformWGS84ToCartesian(this._positions[0]),new Cesium.Cartesian3),o=Cesium.Matrix4.multiplyByPoint(i,He.transformWGS84ToCartesian(this._positions[1]),new Cesium.Cartesian3),s=Cesium.Cartesian3.subtract(o,r,new Cesium.Cartesian3);Cesium.Cartesian3.normalize(s,s);var a=Cesium.Cartesian3.cross(n,s,new Cesium.Cartesian3);t.push(new Cesium.ClippingPlane(a,this._distance||0))}else if(this._positions&&this._positions.length>=3)for(var l=Cesium.Cartesian3.UNIT_Z,u=this._isCcw(this._positions),c=this._positions.length,h=0;h<c;h++){var f=(h+1)%c;if(this._positions[h].lng!==this._positions[f].lng||this._positions[h].lat!==this._positions[f].lat||this._positions[h].alt!==this._positions[f].lat){var p=Cesium.Matrix4.multiplyByPoint(i,He.transformWGS84ToCartesian(this._positions[h]),new Cesium.Cartesian3),m=Cesium.Matrix4.multiplyByPoint(i,He.transformWGS84ToCartesian(this._positions[f]),new Cesium.Cartesian3),d=Cesium.Cartesian3.cross(l,Cesium.Cartesian3.normalize(u?Cesium.Cartesian3.subtract(p,m,new Cesium.Cartesian3):Cesium.Cartesian3.subtract(m,p,new Cesium.Cartesian3),new Cesium.Cartesian3),new Cesium.Cartesian3);t.push(new Cesium.ClippingPlane(d,this._distance||0))}}else if(this._direction&&this._direction!==ClippingDirection_default.NONE){var v=this._getDirectionNoraml(this._direction);if(this._angle){var y=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(this._angle));Cesium.Matrix3.multiplyByVector(y,v,v)}v&&t.push(new Cesium.ClippingPlane(v,this._distance||0))}return t}}]),e}());const Oc=Pc;const xc=function(){function e(t,i){n(this,e),this.u=t,this.v=i,this.m=this.magnitude()}return a(e,[{key:"magnitude",value:function(){return Math.sqrt(this.u*this.u+this.v*this.v)}},{key:"directionTo",value:function(){var e=Math.atan2(this.u,this.v)*(180/Math.PI);return e<0&&(e+=360),e}},{key:"directionFrom",value:function(){return(this.directionTo()+180)%360}}]),e}();const Ec=function(){function e(t){n(this,e),this.grid=[],this.xmin=t.xmin,this.xmax=t.xmax,this.ymin=t.ymin,this.ymax=t.ymax,this.cols=t.cols,this.rows=t.rows,this.us=t.us,this.vs=t.vs,this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaY<0&&this.ymin<this.ymax?console.warn("[wind-core]: The data is flipY"):(this.ymin=Math.min(t.ymax,t.ymin),this.ymax=Math.max(t.ymax,t.ymin)),this.isFields=!0;var i=Math.ceil((this.xmax-this.xmin)/t.deltaX),r=Math.ceil((this.ymax-this.ymin)/t.deltaY);i===this.cols&&r===this.rows||console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*t.deltaX)>=360,this.wrappedX="wrappedX"in t?t.wrappedX:this.xmax>180,this.grid=this.buildGrid(),this.range=this.calculateRange()}return a(e,[{key:"buildGrid",value:function(){for(var e=[],t=0,i=this,n=i.rows,r=i.cols,o=i.us,s=i.vs,a=0;a<n;a++){for(var l=[],u=0;u<r;u++,t++){var c=o[t],h=s[t],f=this.isValid(c)&&this.isValid(h);l[u]=f?new xc(c,h):null}this.isContinuous&&l.push(l[0]),e[a]=l}return e}},{key:"release",value:function(){this.grid=[]}},{key:"extent",value:function(){return[this.xmin,this.ymin,this.xmax,this.ymax]}},{key:"bilinearInterpolateVector",value:function(e,t,i,n,r,o){var s=1-e,a=1-t,l=s*a,u=e*a,c=s*t,h=e*t,f=i.u*l+n.u*u+r.u*c+o.u*h,p=i.v*l+n.v*u+r.v*c+o.v*h;return new xc(f,p)}},{key:"calculateRange",value:function(){if(this.grid&&this.grid[0]){for(var e,t,i=this.grid.length,n=this.grid[0].length,r=0;r<i;r++)for(var o=0;o<n;o++){var s=this.grid[r][o];if(null!==s){var a=s.m||s.magnitude();void 0===e?e=a:void 0===t?(t=a,e=Math.min(e,t),t=Math.max(e,t)):(e=Math.min(a,e),t=Math.max(a,t))}}return[e,t]}}},{key:"isValid",value:function(e){return null!=e}},{key:"getWrappedLongitudes",value:function(){var e=this.xmin,t=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,t=180):(t=this.xmax-360,e=this.xmin-360)),[e,t]}},{key:"contains",value:function(e,t){var i,n=this.getWrappedLongitudes(),r=n[0],o=n[1],s=e>=r&&e<=o;return i=this.deltaY>=0?t>=this.ymin&&t<=this.ymax:t>=this.ymax&&t<=this.ymin,s&&i}},{key:"floorMod",value:function(e,t){return e-t*Math.floor(e/t)}},{key:"getDecimalIndexes",value:function(e,t){return[this.floorMod(e-this.xmin,360)/this.deltaX,(this.ymax-t)/this.deltaY]}},{key:"valueAt",value:function(e,t){if(!this.contains(e,t))return null;var i=this.getDecimalIndexes(e,t),n=Math.floor(i[0]),r=Math.floor(i[1]),o=this.clampColumnIndex(n),s=this.clampRowIndex(r);return this.valueAtIndexes(o,s)}},{key:"interpolatedValueAt",value:function(e,t){if(!this.contains(e,t))return null;var i=this.getDecimalIndexes(e,t),n=i[0],r=i[1];return this.interpolatePoint(n,r)}},{key:"hasValueAt",value:function(e,t){return null!==this.valueAt(e,t)}},{key:"interpolatePoint",value:function(e,t){var i=this.getFourSurroundingIndexes(e,t),n=i[0],r=i[1],o=i[2],s=i[3],a=this.getFourSurroundingValues(n,r,o,s);if(a){var l=a[0],u=a[1],c=a[2],h=a[3];return this.bilinearInterpolateVector(e-n,t-o,l,u,c,h)}return null}},{key:"clampColumnIndex",value:function(e){var t=e;e<0&&(t=0);var i=this.cols-1;return e>i&&(t=i),t}},{key:"clampRowIndex",value:function(e){var t=e;e<0&&(t=0);var i=this.rows-1;return e>i&&(t=i),t}},{key:"getFourSurroundingIndexes",value:function(e,t){var i=Math.floor(e),n=i+1;this.isContinuous&&n>=this.cols&&(n=0),n=this.clampColumnIndex(n);var r=this.clampRowIndex(Math.floor(t));return[i,n,r,this.clampRowIndex(r+1)]}},{key:"getFourSurroundingValues",value:function(e,t,i,n){var r;if(r=this.grid[i]){var o=r[e],s=r[t];if(this.isValid(o)&&this.isValid(s)&&(r=this.grid[n])){var a=r[e],l=r[t];if(this.isValid(a)&&this.isValid(l))return[o,s,a,l]}}return null}},{key:"valueAtIndexes",value:function(e,t){return this.grid[t][e]}},{key:"lonLatAtIndexes",value:function(e,t){return[this.longitudeAtX(e),this.latitudeAtY(t)]}},{key:"longitudeAtX",value:function(e){var t=this.deltaX/2,i=this.xmin+t+e*this.deltaX;return this.wrappedX&&(i=i>180?i-360:i),i}},{key:"latitudeAtY",value:function(e){var t=this.deltaY/2;return this.ymax-t-e*this.deltaY}},{key:"randomize",value:function(e,t,i,n){void 0===e&&(e={});var r=Math.random()*(t||this.cols)|0,o=Math.random()*(i||this.rows)|0,s=n([r,o]);return null!==s?(e.x=s[0],e.y=s[1]):(e.x=this.longitudeAtX(r),e.y=this.latitudeAtY(o)),e}},{key:"checkFields",value:function(){return this.isFields}}]),e}();const Ac=function(){function e(t){n(this,e),this.options={},this.particles=[],this.ctx=t,this.animationLoop=void 0,this.animate=this.animate.bind(this)}return a(e,[{key:"_indexFor",value:function(e,t,i,n){return Math.max(0,Math.min(n.length-1,Math.round((e-t)/(i-t)*(n.length-1))))}},{key:"_moveParticles",value:function(){if(this.particles&&this.particles.length)for(var e=this.ctx.canvas.width,t=this.ctx.canvas.height,i=this.particles,n=this.options.maxAge,r="function"==typeof this.options.velocityScale?this.options.velocityScale():this.options.velocityScale,o=0;o<i.length;o++){var s=i[o];s.age>n&&(s.age=0,this.field.randomize(s,e,t,this.unProject));var a=s.x,l=s.y,u=this.field.interpolatedValueAt(a,l);if(null===u)s.age=n;else{var c=a+u.u*r,h=l+u.v*r;this.field.hasValueAt(c,h)?(s.xt=c,s.yt=h,s.m=u.m):(s.x=c,s.y=h,s.age=n)}s.age++}}},{key:"_drawParticles",value:function(){if(this.particles&&this.particles.length){var e=this.particles,t=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=t,this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle="rgba(0, 0, 0, "+this.options.globalAlpha+")",this.ctx.lineWidth=this.options.lineWidth?this.options.lineWidth:1,this.ctx.strokeStyle=this.options.colorScale?this.options.colorScale:"#fff";var i=0,n=e.length;if(this.field&&n>0){var r=void 0,o=void 0;if(this.options.minVelocity&&this.options.maxVelocity)r=this.options.minVelocity,o=this.options.maxVelocity;else{var s=this.field.range;r=s[0],o=s[1]}for(;i<n;i++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[i],r,o)}}}},{key:"_drawPixelParticle",value:function(e,t,i){var n=[e.x,e.y],r=[e.xt,e.yt],o=e.xt-e.x,s=e.yt-e.y;o*o+s*s>400||r&&n&&r[0]&&r[1]&&n[0]&&n[1]&&e.age<=this.options.maxAge&&this._drawStroke(n,r,e,t,i)}},{key:"_drawCoordsParticle",value:function(e,t,i){var n=[e.x,e.y],r=[e.xt,e.yt];if(r&&n&&r[0]&&r[1]&&n[0]&&n[1]&&this.intersectsCoordinate(r)&&e.age<=this.options.maxAge){var o=this.project(n),s=this.project(r);this._drawStroke(o,s,e,t,i)}}},{key:"_drawStroke",value:function(e,t,i,n,r){if(e&&t){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(t[0],t[1]),"function"==typeof this.options.colorScale)this.ctx.strokeStyle=this.options.colorScale(i.m);else if(Array.isArray(this.options.colorScale)){var o=this._indexFor(i.m,n,r,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[o]}"function"==typeof this.options.lineWidth&&(this.ctx.lineWidth=this.options.lineWidth(i.m)),i.x=i.xt,i.y=i.yt,this.ctx.stroke()}}},{key:"_prepareParticlePaths",value:function(){var e=this.ctx.canvas.width,t=this.ctx.canvas.height,i="function"==typeof this.options.paths?this.options.paths(this):this.options.paths,n=[];if(!this.field)return[];for(var r=0;r<i;r++)n.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,t,this.unProject));return n}},{key:"project",value:function(){throw new Error("project must be override")}},{key:"unProject",value:function(){throw new Error("unProject must be override")}},{key:"intersectsCoordinate",value:function(e){throw new Error("must be override")}},{key:"prerender",value:function(){this.field&&(this.particles=this._prepareParticlePaths(),this.starting||this.forceStop||(this.starting=!0,this._then=Date.now(),this.animate()))}},{key:"render",value:function(){return this._moveParticles(),this._drawParticles(),this}},{key:"clearCanvas",value:function(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}},{key:"start",value:function(){this.starting=!0,this.forceStop=!1,this._then=Date.now(),this.animate()}},{key:"stop",value:function(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}},{key:"animate",value:function(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);var e=Date.now(),t=e-this._then;t>this.options.frameRate&&(this._then=e-t%this.options.frameRate,this.render())}},{key:"setData",value:function(e){return this.field=e,this}},{key:"setOptions",value:function(e){var t,i,n,r;return this.options=e,null!==(t=this.options)&&void 0!==t&&t.maxAge||null===(i=this.options)||void 0===i||!i.particleAge||(this.options.maxAge=Number(this.options.particleAge)),null!==(n=this.options)&&void 0!==n&&n.paths||null===(r=this.options)||void 0===r||!r.particleMultiplier||(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}}]),e}();function Tc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function kc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Tc(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Tc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Mc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Rc={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:.04,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},Sc=function(e){c(i,e);var t=Mc(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._options=kc(kc({},Rc),r),e._data=void 0,e._canvas=document.createElement("canvas"),e._state=Ae.INITIALIZED,e}return a(i,[{key:"type",get:function(){return cr.getLayerType("wind")}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}},{key:"_formatData",value:function(e){var t,i;if(e.forEach((function(e){switch(e.header.parameterCategory+","+e.header.parameterNumber){case"1,2":case"2,2":t=e;break;case"1,3":case"2,3":i=e}})),i&&t){var n=t.header;return new Ec({xmin:n.lo1,ymin:n.la1,xmax:n.lo2,ymax:n.la2,deltaX:n.dx,deltaY:n.dy,cols:n.nx,rows:n.ny,us:t.data,vs:i.data})}}},{key:"_mountCanvas",value:function(){if(this._viewer&&this._canvas){this._canvas.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",this._canvas.className="dc-wind-layer";var e=this._viewer.canvas,t=e.width,i=e.height;this._canvas.width=t,this._canvas.height=i,this._canvas.style.width=t+"px",this._canvas.style.height=i+"px",this._viewer.layerContainer.appendChild(this._canvas)}}},{key:"_addedHook",value:function(){var e=this._viewer.scene,t=this._viewer.camera,i=Cesium.Ellipsoid.WGS84;this._nativeObjCesium.intersectsCoordinate=function(n){if(e.mode===Cesium.SceneMode.SCENE3D){var r=new Cesium.EllipsoidalOccluder(i,t.position),o=Cesium.Cartesian3.fromDegrees(n[0],n[1]);return r.isPointVisible(o)}return e.mode!==Cesium.SceneMode.SCENE2D||!(-180===n[0]||180===n[0])},this._nativeObjCesium.project=function(t){var i=Cesium.Cartesian3.fromDegrees(t[0],t[1]),n=e.cartesianToCanvasCoordinates(i,new Cesium.Cartesian2);return n?[n.x,n.y]:(console.log("this._nativeObjCesium.project",t,n),null)},this._nativeObjCesium.unProject=function(n){var r=new Cesium.Cartesian2(n[0],n[1]),o=void 0;if(!(o=e.mode===Cesium.SceneMode.SCENE3D?e.globe.pick(t.getPickRay(r),e):e.camera.pickEllipsoid(r,i)))return null;var s=i.cartesianToCartographic(o),a=Cesium.Math.toDegrees(s.latitude);return[Cesium.Math.toDegrees(s.longitude),a]}}},{key:"_onAdd",value:function(e){this._viewer=e,this._mountCanvas();var t=this._canvas.getContext("2d");this._nativeObjCesium||(this._nativeObjCesium=new Ac(t),this._nativeObjCesium.setOptions(this._options),this._addedHook()),this._data&&(this._nativeObjCesium.setData(this._data),this._nativeObjCesium.prerender(),this._nativeObjCesium.render())}},{key:"_onRemove",value:function(){this._nativeObjCesium&&this._nativeObjCesium.stop(),this._canvas&&this._viewer.layerContainer.removeChild(this._canvas),delete this._canvas}},{key:"setData",value:function(e,t){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._nativeObjCesium&&(this._nativeObjCesium.setData(this._data),t&&(this._options=kc(kc({},this._options),t),this._nativeObjCesium.setOptions(this._options)),this._nativeObjCesium.prerender(),this._nativeObjCesium.render()),this}},{key:"setOptions",value:function(e){return this._options=kc(kc({},this._options),e),this._nativeObjCesium&&(this._nativeObjCesium.setOptions(this._options),this._nativeObjCesium.prerender(),this._nativeObjCesium.render()),this}}]),i}(cr);cr.registerType("wind");const jc=Sc;var Lc=Cesium,Ic=Lc.Cartesian3,Dc=Lc.Primitive,Bc=Lc.Material,Gc=Lc.Geometry,Hc=Lc.MaterialAppearance,Nc=Lc.GeometryAttribute,Fc=Lc.ComponentDatatype,zc=Lc.PrimitiveType,Wc=Lc.BoundingSphere,Uc=Lc.VertexFormat,Vc=Lc.GeometryAttributes,qc=Lc.Check,Zc=new Uc,Yc=new Ic,Kc=function(){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._normal=i.normal,this._radius=i.radius,this._center=i.center;var r=null!==(t=i.vertexFormat)&&void 0!==t?t:Uc.DEFAULT;this._vertexFormat=r}return a(e,null,[{key:"pack",value:function(e,t,i){var n;return qc.typeOf.object("value",e),qc.defined("array",t),i=null!==(n=i)&&void 0!==n?n:0,Uc.pack(e._vertexFormat,t,i),i+=Uc.packedLength,Ic.pack(e._normal,t,i),i+=Ic.packedLength,t[i++]=e._radius,t}},{key:"unpack",value:function(e,t,i){var n;qc.defined("array",e),t=null!==(n=t)&&void 0!==n?n:0;var r=Uc.unpack(e,t,Zc);t+=Uc.packedLength;var o=Ic.unpack(e,t,Yc),s=e[t+=Ic.packedLength];return defined(i)?(i._vertexFormat=Uc.clone(r,i._vertexFormat),i._normal=Ic.clone(o,i._normal),i._radius=s,i):new PlaneGeometry({vertexFormat:r,normal:o,radius:s})}},{key:"createGeometry",value:function(e){var t,i=Math.max(1,.02*e._radius),n=Math.max(.2*e._radius,2*i),r=[],o=[],s=e._center,a=s.x,l=s.y,u=s.z;Ic.equals(e._normal,Ic.UNIT_X)?(r=[a,-i+l,i+u,a,-n+l,i+u,a,-n+l,n+u,a,-i+l,n+u],t=new Ic(a,-(i+n)/2+l,(i+n)/2+u),o=[1,0,0,1,0,0,1,0,0,1,0,0]):Ic.equals(e._normal,Ic.UNIT_Y)?(r=[i+a,l,i+u,n+a,l,i+u,n+a,l,n+u,i+a,l,n+u],t=new Ic((i+n)/2+a,l,(i+n)/2+u),o=[0,1,0,0,1,0,0,1,0,0,1,0]):Ic.equals(e._normal,Ic.UNIT_Z)&&(r=[i+a,-i+l,u,n+a,-i+l,u,n+a,-n+l,u,i+a,-n+l,u],t=new Ic((i+n)/2+a,-(i+n)/2+l,u),o=[0,0,1,0,0,1,0,0,1,0,0,1]),r=new Float32Array(Ie(r));var c=new Float32Array([0,0,1,0,1,1,0,1]),h=new Uint16Array([0,1,2,2,3,0]);return new Gc({attributes:new Vc({position:new Nc({componentDatatype:Fc.DOUBLE,componentsPerAttribute:3,values:r}),normal:new Nc({componentDatatype:Fc.FLOAT,componentsPerAttribute:3,values:o}),st:new Nc({componentDatatype:Fc.FLOAT,componentsPerAttribute:2,values:c})}),indices:h,primitiveType:zc.TRIANGLES,boundingSphere:new Wc(t,(i+n)/2)})}}]),e}();Z(Kc,"packedLength",Uc.packedLength+Ic.packedLength+1);const Qc=a((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._center=t.center,this._modelMatrix=t.modelMatrix,this._color=t.color;var i=t.radius;this._normal=t.normal;var r=new Kc({normal:this._normal,radius:i,vertexFormat:Uc.DEFAULT,center:this._center}),o=new Cesium.GeometryInstance({geometry:Kc.createGeometry(r)}),s=new Dc({asynchronous:!1,geometryInstances:o,modelMatrix:this._modelMatrix,appearance:new Hc({material:Bc.fromType("Color",{color:this._color})})});return s.isAxisPlane=!0,s.normal=this._normal,s.axis=t.axis,s.color=this._color,s}));const Xc="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nin float v_polylineAngle;\n\nconst float maskLength = 16.0;\n\nmat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // dashLength <= 0 时按实线绘制,避免除零导致 alpha=NaN、axis 不可见\n vec4 fragColor = color;\n if (dashLength > 0.0) {\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\n float maskIndex = floor(dashPosition * maskLength);\n float maskTest = floor(dashPattern / pow(2.0, maskIndex));\n fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n }\n if (fragColor.a < 0.005) {\n discard;\n }\n\n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n}\n";function Jc(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return $c(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return $c(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function $c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var eh=Cesium,th=eh.PrimitiveCollection,ih=eh.PolylineCollection,nh=eh.Material,rh=eh.Color,oh=eh.Cartesian3,sh=eh.Cartesian2,ah=eh.Matrix4,lh=eh.Matrix3,uh=eh.Quaternion,ch=eh.PointPrimitiveCollection,hh=eh.ScreenSpaceEventHandler,fh=eh.ScreenSpaceEventType,ph=eh.Polyline,mh=eh.Primitive,dh=eh.Math,vh=eh.Plane,yh=eh.Model,gh=eh.IntersectionTests,_h=eh.Transforms,Ch=eh.PointPrimitive,bh=eh.Event,wh=eh.Cartographic,Ph=eh.HeadingPitchRoll,Oh=new oh,xh=new uh,Eh=new lh,Ah=new oh,Th=(new oh,new ah),kh=new ah;function Mh(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function Rh(e,t){e instanceof ph?e.material.uniforms.color=t:e instanceof mh?e.appearance.material.uniforms.color=t:e instanceof Ch&&(e.color=t)}function Sh(e,t){var i=new oh,n=viewer.camera.getPickRay(e),r=new vh(oh.UNIT_X,0);return vh.fromPointNormal(t.center,t.activePrimitive.normal,r),vh.transform(r,t._modelMatrix,r),gh.rayPlane(n,r,i)?(ah.multiplyByPoint(t._inverseModelMatrix,i,i),i):(oh.clone(t.center,i),i)}var jh=new sh,Lh=new sh;function Ih(e,t,i,n){var r=e.activePrimitive.relativeAxis||[e.activePrimitive];if(Array.isArray(r)){var o,s,a,l=e._viewer.camera.positionCartographic.height/1047,u=Jc(r);try{for(u.s();!(o=u.n()).done;){var c=o.value,h=c.positions.map((function(t){return ah.multiplyByPoint(e._modelMatrix,t,new oh)})).map((function(t){return ANOVGIS.Transform.transformCartesian3ToWindow(t,e._viewer)})),f=(s=sh.subtract.apply(sh,Ie(h).concat([jh])),a=sh.subtract(i,t,Lh),sh.normalize(s,s),sh.dot(s,a));n[c.axis.toLowerCase()]=f*l}}catch(e){u.e(e)}finally{u.f()}return n}}var Dh="None",Bh="T",Gh="R",Hh="S",Nh=function(){function e(){var t,i,r,o,s,a,l,u,c,h,f,p,m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.lineWidth=null!==(t=m.lineWidth)&&void 0!==t?t:15,this.xAxisColor=null!==(i=m.xAxisColor)&&void 0!==i?i:rh.RED,this.yAxisColor=null!==(r=m.yAxisColor)&&void 0!==r?r:rh.GREEN,this.zAxisColor=null!==(o=m.zAxisColor)&&void 0!==o?o:rh.BLUE,this.scaleAxisColor=null!==(s=m.scaleAxisColor)&&void 0!==s?s:rh.WHITE,this.activeAxisColor=null!==(a=m.activeAxisColor)&&void 0!==a?a:rh.YELLOW,this.originColor=null!==(l=m.originColor)&&void 0!==l?l:rh.WHITE,this._translateEnabled=null===(u=m.translateEnabled)||void 0===u||u,this._rotateEnabled=null!==(c=m.rotateEnabled)&&void 0!==c&&c,this._scaleEnabled=null!==(h=m.scaleEnabled)&&void 0!==h&&h,this._radiusRatio=null!==(f=m.radiusRatio)&&void 0!==f?f:1,this.xAxisLength=m.xAxisLength,this.yAxisLength=m.yAxisLength,this.zAxisLength=m.zAxisLength,this.scaleAxisLength=m.scaleAxisLength,this.root=new th,this.object=null,this._modelMatrix=void 0,this._primitives=[],this._center=new oh,this._radius=0,this._originOffset=null!==(p=m.originOffset)&&void 0!==p?p:new oh,this._selectedPrimitives=[],this._offset=new oh(0,0,0),this._angle=0,this.rotatePlaneRadius=m.rotatePlaneRadius,this._mode=Dh,this.preTranformEvent=new bh,this.postTransformEvent=new bh,this.postRoatationEvent=new bh,this.postScaleEvent=new bh}return a(e,[{key:"translateEnabled",get:function(){return this._translateEnabled},set:function(e){this._translateEnabled=e;var t,i=Jc(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Gh)||r.includes(Hh)||(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"rotateEnabled",get:function(){return this._rotateEnabled},set:function(e){this._rotateEnabled=e;var t,i=Jc(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Gh)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"scaleEnabled",get:function(){return this._scaleEnabled},set:function(e){this._scaleEnabled=e;var t,i=Jc(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Hh)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"center",get:function(){return oh.add(this._center,this._originOffset,new oh)}},{key:"modelMatrix",get:function(){return this._modelMatrix},set:function(e){if(!e)return this._modelMatrix=void 0,void(this._inverseModelMatrix=void 0);this._modelMatrix=e,this._inverseModelMatrix=ah.inverse(e,new ah)}},{key:"createMoveAxis",value:function(){var e,t,i;if(this.center){var n=this._radius*this._radiusRatio,r=this.axisRoot,o=this.center,s=[o,new oh((null!==(e=this.xAxisLength)&&void 0!==e?e:n)+o.x,o.y,o.z)];this.xAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.xAxisColor)}),this.xNormal=new oh,oh.subtract(s[1],s[0],this.xNormal),oh.normalize(this.xNormal,this.xNormal),this.xAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.xAxis.axis="X",this.xAxis.color=this.xAxisColor,s=[o,new oh(o.x,-(null!==(t=this.yAxisLength)&&void 0!==t?t:n)+o.y,o.z)],this.yAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.yAxisColor)}),this.yNormal=new oh,oh.subtract(s[1],s[0],this.yNormal),oh.normalize(this.yNormal,this.yNormal),this.yAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.yAxis.axis="Y",this.yAxis.color=this.yAxisColor,s=[o,new oh(o.x,o.y,(null!==(i=this.zAxisLength)&&void 0!==i?i:n)+o.z)],this.zAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.zAxisColor)}),this.zNormal=new oh,oh.subtract(s[1],s[0],this.zNormal),oh.normalize(this.zNormal,this.zNormal),this.zAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.zAxis.axis="Z",this.zAxis.color=this.zAxisColor,this._primitives.push(this.xAxis,this.yAxis,this.zAxis)}}},{key:"createAxisPlane",value:function(){this.XOYPlane=this.root.add(new Qc({color:this.zAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new oh(0,0,1),axis:"XY"})),this.XOYPlane.relativeAxis=[this.xAxis,this.yAxis],this.XOZPlane=this.root.add(new Qc({color:this.yAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new oh(0,1,0),axis:"XZ"})),this.XOZPlane.relativeAxis=[this.xAxis,this.zAxis],this.YOZPlane=this.root.add(new Qc({color:this.xAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new oh(1,0,0),axis:"YZ"})),this.YOZPlane.relativeAxis=[this.yAxis,this.zAxis],this._primitives.push(this.XOYPlane,this.YOZPlane,this.XOZPlane)}},{key:"createOrignPoint",value:function(){var e=new ch({modelMatrix:this.modelMatrix});this.origin=e.add({show:!0,position:this.center,pixelSize:1.5*this.lineWidth,color:this.originColor}),this.origin.axis="XYZ",this.origin.pcolor=this.originColor,this.root.add(e),this._primitives.push(this.origin)}},{key:"getAxisMaterial",value:function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16;return new nh(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{fabric:{type:"dasharrow",source:Xc,uniforms:{color:e,gapColor:rh.TRANSPARENT,dashLength:t,dashPattern:255}}}:{fabric:{type:"PolylineArrow",uniforms:{color:e}}})}},{key:"createRotateAxis",value:function(){for(var e=[],t=this.rotatePlaneRadius||this._radius*this._radiusRatio,i=this.center,n=0;n<=360;n++){var r=n/180*Math.PI;e.push(new oh(i.x+t*Math.cos(r),i.y+t*Math.sin(r),i.z))}this.zRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.zAxisColor,!0,0)}),this.zRotate.axis="RZ",this.zRotate.color=this.zAxisColor,this.zRotate.normal=new oh(0,0,1),e.splice(0);for(var o=0;o<=360;o++){var s=o/180*Math.PI;e.push(new oh(i.x+t*Math.cos(s),i.y,i.z+t*Math.sin(s)))}this.yRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.yAxisColor,!0,0)}),this.yRotate.axis="RY",this.yRotate.color=this.yAxisColor,this.yRotate.normal=new oh(0,1,0),e.splice(0);for(var a=0;a<=360;a++){var l=a/180*Math.PI;e.push(new oh(i.x,i.y+t*Math.cos(l),i.z+t*Math.sin(l)))}this.xRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.xAxisColor,!0,0)}),this.xRotate.axis="RX",this.xRotate.color=this.xAxisColor,this.xRotate.normal=new oh(-1,0,0),this.rAxuStart=this.axisRoot.add({positions:[],width:this.lineWidth/2,material:this.getAxisMaterial(this.activeAxisColor,!0,0)}),this.rAxuEnd=this.axisRoot.add({positions:[],width:this.lineWidth/2,material:this.getAxisMaterial(this.activeAxisColor,!0,0)}),this._primitives.push(this.xRotate,this.yRotate,this.zRotate,this.rAxuStart,this.rAxuEnd)}},{key:"createScaleAxis",value:function(){var e,t=this._radius*this._radiusRatio,i=new oh(1,1,1);this.xNormal&&this.yNormal&&this.zNormal&&(oh.add(this.xNormal,this.yNormal,i),oh.add(i,this.zNormal,i)),oh.normalize(i,i);var n=null!==(e=this.scaleAxisLength)&&void 0!==e?e:t,r=new oh;oh.multiplyByScalar(i,n,r),oh.add(this._center,r,r),this.scaleAxis=this.axisRoot.add({positions:[this._center,r],width:this.lineWidth,material:this.getAxisMaterial(this.scaleAxisColor)}),this._primitives.push(this.scaleAxis),this.scaleAxis.axis="SXYZ",this.scaleAxis.color=this.scaleAxisColor}},{key:"bind",value:function(e){var t=this;if(!this._viewer)throw new Error("please call addTo method to add to viewer");if(this.unbind(),this._hasBindObject=!0,this.object=e,e instanceof yh!=!1){this.modelMatrix=e.modelMatrix;var i=function(){ah.multiplyByPoint(t._inverseModelMatrix,e.boundingSphere.center,t._center),t._radius=e.boundingSphere.radius,t.createPrimitive()};e.ready?i():e.readyEvent.addEventListener(i)}else this.bindPosition(e)}},{key:"bindPosition",value:function(e){if("function"==typeof e.getValue&&(e=e.getValue(this._viewer.clock.currentTime)),e instanceof oh==!1)throw new Error("position is invalid");this._hasBindObject=!0,this.modelMatrix=_h.eastNorthUpToFixedFrame(e),this._center=new oh,oh.clone(this.originOffset,this._center),this._radius=10,this.createPrimitive()}},{key:"createPrimitive",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=new ih({modelMatrix:this.modelMatrix});this.axisRoot=t,this.root.add(t),this.createOrignPoint(),this.translateEnabled&&this.createMoveAxis(),this.translateEnabled&&this.createAxisPlane(),e&&this.rotateEnabled&&this.createRotateAxis(),e&&this.scaleEnabled&&this.createScaleAxis()}},{key:"unbind",value:function(){this.object=void 0,this.root.removeAll(),this.origon=void 0,this.xAxis=void 0,this.yAxis=void 0,this.zAxis=void 0,this.modelMatrix=void 0,this._hasBindObject=!1}},{key:"addTo",value:function(e){this._viewer=e,e.scene.primitives.add(this.root),this.addEventListener()}},{key:"addEventListener",value:function(){var e=this,t=this._viewer,i=new hh(t.canvas);i.setInputAction((function(n){if(e._hasBindObject){var r=t.scene.pick(n.position);r&&e._primitives.includes(r.primitive)&&(e._mousedownPixel=n.position,e.active(r.primitive),e._offset=new oh,e._angle=0,i.setInputAction((function(t){var i=t.startPosition,n=t.endPosition;e.transform(i,n)}),fh.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!1)}}),fh.LEFT_DOWN),i.setInputAction((function(n){e._hasBindObject&&(e.active(null),i.removeInputAction(fh.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!0,e.translateEnabled&&(e.xAux.positions=[],e.yAux.positions=[],e.zAux.positions=[]),e.rotateEnabled&&(e.rAxuStart.positions=[],e.rAxuEnd.positions=[]))}),fh.LEFT_UP),this._removeEventListener=function(){i.removeInputAction(fh.LEFT_DOWN),i.removeInputAction(fh.LEFT_UP),i.removeInputAction(fh.MOUSE_MOVE)}}},{key:"active",value:function(e){if(e||this.activePrimitive){if(!e&&this.activePrimitive){if(Rh(this.activePrimitive,this.activePrimitive.pcolor||this.activePrimitive.color),this.activePrimitive.isAxisPlane){var t,i=Jc(this.activePrimitive.relativeAxis);try{for(i.s();!(t=i.n()).done;){var n=t.value;Rh(n,n.color)}}catch(e){i.e(e)}finally{i.f()}}return this.activePrimitive=void 0,void(this._mode=Dh)}if(e.isAxisPlane){var r,o=Jc(e.relativeAxis);try{for(o.s();!(r=o.n()).done;){Rh(r.value,this.activeAxisColor)}}catch(e){o.e(e)}finally{o.f()}}if(this.activePrimitive=e,Rh(this.activePrimitive,this.activeAxisColor),e.axis)if(e.axis.includes("R")){this._mode=Gh;var s=Sh(this._mousedownPixel,this);this.rAxuStart.positions=[this.center,s],this._startLocalPosition=s}else e.axis.includes("S")?this._mode=Hh:this._mode=Bh}}},{key:"remove",value:function(){this._viewer.scene.primitives.remove(this.root),this._removeEventListener(),this._primitives.splice(0)}},{key:"getTransform",value:function(){if(!this._modelMatrix)return null;var e=function(e){var t=ah.getTranslation(e,new oh),i=wh.fromCartesian(t),n=dh.toDegrees(i.longitude),r=dh.toDegrees(i.latitude),o=i.height,s=ah.getMatrix3(e,new lh),a=lh.getColumn(s,0,new oh),l=oh.magnitude(a);if(l<1e-9)return null;lh.multiplyByScalar(s,1/l,s);var u=uh.fromRotationMatrix(s),c=Ph.fromQuaternion(u);return{position:{lng:Mh(n,6),lat:Mh(r,6),alt:Mh(o,2)},orientation:{heading:Mh(dh.toDegrees(c.heading),2),pitch:Mh(dh.toDegrees(c.pitch),2),roll:Mh(dh.toDegrees(c.roll),2)},scale:Mh(l,3)}}(this._modelMatrix);return e?(this.object&&"number"==typeof this.object.scale&&1!==this.object.scale&&(e.scale=Mh(e.scale*this.object.scale,3)),e):null}},{key:"getModelMatrix",value:function(){if(!this._modelMatrix)return null;for(var e=new Array(16),t=0;t<16;t++)if(e[t]=this._modelMatrix[t],!isFinite(e[t]))return null;return e}},{key:"transform",value:function(e,t){if(this.preTranformEvent.raiseEvent(ah.clone(this.modelMatrix,{})),this.activePrimitive===this.origin){var i=ANOVGIS.Transform.transformWindowToCartesian3(t,this._viewer);ah.setTranslation(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=Jc(this.root._primitives);try{for(r.s();!(n=r.n()).done;){n.value.modelMatrix=this.modelMatrix}}catch(e){r.e(e)}finally{r.f()}}else if(this._mode===Bh)Ih(this,e,t,Oh),this.translate(Oh);else if(this._mode===Gh){var o=function(e,t,i){var n=e.center;oh.subtract(t,n,t),oh.subtract(i,n,i);var r=oh.dot(t,t),o=oh.dot(i,i);if(r<1e-12||o<1e-12)return 0;var s=oh.dot(oh.normalize(t,t),oh.normalize(i,i)),a=oh.subtract(t,i,Ah),l=t,u=oh.cross(a,l,Ah),c=e.activePrimitive.normal,h=dh.sign(oh.dot(u,c));return isFinite(s)?Math.acos(Math.max(-1,Math.min(1,s)))*h:0}(this,Sh(e,this),Sh(t,this));this.rotate(o)}else if(this._mode=Hh){Ih(this,e,t,Oh);var s=oh.distance.apply(oh,Ie(this.scaleAxis.positions));if(!isFinite(s)||s<1e-9)return;var a=-Oh.sxyz/s+1;this.scale(new oh(a,a,a))}this.postTransformEvent.raiseEvent(ah.clone(this.modelMatrix,{}))}},{key:"scale",value:function(e){var t=ah.fromScale(e,Th);ah.multiply(this._modelMatrix,t,this._modelMatrix),this.modelMatrix=this._modelMatrix;var i,n=Jc(this.root._primitives);try{for(n.s();!(i=n.n()).done;){var r=i.value;ah.multiply(r.modelMatrix,t,r.modelMatrix)}}catch(e){n.e(e)}finally{n.f()}this.postScaleEvent.raiseEvent(e,ah.clone(this.modelMatrix,{}))}},{key:"rotate",value:function(e){this._angle+=e;var t=this.activePrimitive.normal,i=ah.fromTranslation(this.center,Th),n=uh.fromAxisAngle(t,e,xh),r=lh.fromQuaternion(n,Eh),o=ah.fromTranslation(oh.negate(this.center,Ah),kh);ah.multiply(this.modelMatrix,i,this.modelMatrix),ah.multiplyByMatrix3(this.modelMatrix,r,this.modelMatrix),ah.multiply(this.modelMatrix,o,this.modelMatrix);var s,a=Jc(this.root._primitives);try{for(a.s();!(s=a.n()).done;){var l=s.value;ah.multiply(l.modelMatrix,i,l.modelMatrix),ah.multiplyByMatrix3(l.modelMatrix,r,l.modelMatrix),ah.multiply(l.modelMatrix,o,l.modelMatrix)}}catch(e){a.e(e)}finally{a.f()}this.postRoatationEvent.raiseEvent(e,t,ah.clone(this.modelMatrix,{})),this.modelMatrix=this._modelMatrix,this.createRotateAux(this._startLocalPosition,this._angle)}},{key:"translate",value:function(e){if(this.activePrimitive){var t=this.activePrimitive.axis;-1===t.indexOf("X")&&(e.x=0),-1===t.indexOf("Y")&&(e.y=0),-1===t.indexOf("Z")&&(e.z=0),e.x=-e.x,e.z=-e.z,oh.add(this._offset,e,this._offset);var i=ah.fromTranslation(e);ah.multiply(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=Jc(this.root._primitives);try{for(r.s();!(n=r.n()).done;){var o=n.value;ah.multiply(o.modelMatrix,i,o.modelMatrix)}}catch(e){r.e(e)}finally{r.f()}this.createAux(this._offset,i)}}},{key:"createAux",value:function(e){if(e.x>0){var t=oh.clone(this.xAxis.positions[0]),i=oh.clone(this.xAxis.positions[0]);i.x+=-e.x,this.xAux.positions=[t,i]}else{var n=oh.clone(this.xAxis.positions[1]),r=oh.clone(this.xAxis.positions[1]);r.x+=-e.x,this.xAux.positions=[n,r]}if(e.y<0){var o=oh.clone(this.yAxis.positions[0]),s=oh.clone(this.yAxis.positions[0]);s.y+=-e.y,this.yAux.positions=[o,s]}else{var a=oh.clone(this.yAxis.positions[1]),l=oh.clone(this.yAxis.positions[1]);l.y+=-e.y,this.yAux.positions=[a,l]}if(e.z>0){var u=oh.clone(this.zAxis.positions[0]),c=oh.clone(this.zAxis.positions[0]);c.z+=-e.z,this.zAux.positions=[u,c]}else{var h=oh.clone(this.zAxis.positions[1]),f=oh.clone(this.zAxis.positions[1]);f.z+=-e.z,this.zAux.positions=[h,f]}}},{key:"createRotateAux",value:function(e,t){if(this._startLocalPosition){var i=uh.fromAxisAngle(this.activePrimitive.normal,-t),n=lh.fromQuaternion(i,Eh),r=ah.fromRotation(n,Th),o=oh.subtract(e,this.center,Ah);ah.multiplyByPoint(r,o,o),oh.add(this.center,o,o),this.rAxuEnd.positions=[this.center,o]}}}]),e}();const Fh=Nh;function zh(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Wh(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Wh(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Wh(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Uh=Cesium,Vh=Uh.PrimitiveCollection,qh=Uh.PolylineCollection,Zh=Uh.Material,Yh=Uh.Color,Kh=Uh.Cartesian3,Qh=Uh.Cartesian2,Xh=Uh.Matrix4,Jh=Uh.Matrix3,$h=Uh.Quaternion,ef=Uh.PointPrimitiveCollection,tf=Uh.ScreenSpaceEventHandler,nf=Uh.ScreenSpaceEventType,rf=Uh.Polyline,of=Uh.Primitive,sf=Uh.Math,af=Uh.Plane,lf=(Uh.Model,Uh.IntersectionTests),uf=Uh.Transforms,cf=Uh.PointPrimitive,hf=Uh.Event,ff=Uh.Cartographic,pf=Uh.HeadingPitchRoll,mf=new Kh,df=new $h,vf=new Jh,yf=new Kh,gf=(new Kh,new Xh),_f=new Xh;function Cf(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function bf(e,t){e instanceof rf?e.material.uniforms.color=t:e instanceof of?e.appearance.material.uniforms.color=t:e instanceof cf&&(e.color=t)}function wf(e,t){var i=new Kh,n=viewer.camera.getPickRay(e),r=new af(Kh.UNIT_X,0);return af.fromPointNormal(t.center,t.activePrimitive.normal,r),af.transform(r,t._modelMatrix,r),lf.rayPlane(n,r,i)?(Xh.multiplyByPoint(t._inverseModelMatrix,i,i),i):(Kh.clone(t.center,i),i)}var Pf=new Qh,Of=new Qh;function xf(e,t,i,n){var r=e.activePrimitive.relativeAxis||[e.activePrimitive];if(Array.isArray(r)){var o,s,a,l=e._viewer.camera.positionCartographic.height/1047,u=zh(r);try{for(u.s();!(o=u.n()).done;){var c=o.value,h=c.positions.map((function(t){return Xh.multiplyByPoint(e._modelMatrix,t,new Kh)})).map((function(t){return ANOVGIS.Transform.transformCartesian3ToWindow(t,e._viewer)})),f=(s=Qh.subtract.apply(Qh,Ie(h).concat([Pf])),a=Qh.subtract(i,t,Of),Qh.normalize(s,s),Qh.dot(s,a));n[c.axis.toLowerCase()]=f*l}}catch(e){u.e(e)}finally{u.f()}return n}}var Ef="None",Af="T",Tf="R",kf="S",Mf=function(){function e(){var t,i,r,o,s,a,l,u,c,h,f,p,m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.lineWidth=null!==(t=m.lineWidth)&&void 0!==t?t:15,this.xAxisColor=null!==(i=m.xAxisColor)&&void 0!==i?i:Yh.RED,this.yAxisColor=null!==(r=m.yAxisColor)&&void 0!==r?r:Yh.GREEN,this.zAxisColor=null!==(o=m.zAxisColor)&&void 0!==o?o:Yh.BLUE,this.scaleAxisColor=null!==(s=m.scaleAxisColor)&&void 0!==s?s:Yh.WHITE,this.activeAxisColor=null!==(a=m.activeAxisColor)&&void 0!==a?a:Yh.YELLOW,this.originColor=null!==(l=m.originColor)&&void 0!==l?l:Yh.WHITE,this._translateEnabled=null===(u=m.translateEnabled)||void 0===u||u,this._rotateEnabled=null!==(c=m.rotateEnabled)&&void 0!==c&&c,this._scaleEnabled=null!==(h=m.scaleEnabled)&&void 0!==h&&h,this._radiusRatio=null!==(f=m.radiusRatio)&&void 0!==f?f:1,this.xAxisLength=m.xAxisLength,this.yAxisLength=m.yAxisLength,this.zAxisLength=m.zAxisLength,this.scaleAxisLength=m.scaleAxisLength,this.root=new Vh,this.object=null,this._modelMatrix=void 0,this._primitives=[],this._center=new Kh,this._radius=0,this._originOffset=null!==(p=m.originOffset)&&void 0!==p?p:new Kh,this._selectedPrimitives=[],this._offset=new Kh(0,0,0),this._angle=0,this.rotatePlaneRadius=m.rotatePlaneRadius,this._mode=Ef,this.preTranformEvent=new hf,this.postTransformEvent=new hf,this.postRoatationEvent=new hf,this.postScaleEvent=new hf}return a(e,[{key:"translateEnabled",get:function(){return this._translateEnabled},set:function(e){this._translateEnabled=e;var t,i=zh(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Tf)||r.includes(kf)||(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"rotateEnabled",get:function(){return this._rotateEnabled},set:function(e){this._rotateEnabled=e;var t,i=zh(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Tf)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"scaleEnabled",get:function(){return this._scaleEnabled},set:function(e){this._scaleEnabled=e;var t,i=zh(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(kf)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"center",get:function(){return Kh.add(this._center,this._originOffset,new Kh)}},{key:"modelMatrix",get:function(){return this._modelMatrix},set:function(e){if(!e)return this._modelMatrix=void 0,void(this._inverseModelMatrix=void 0);this._modelMatrix=e,this._inverseModelMatrix=Xh.inverse(e,new Xh)}},{key:"createMoveAxis",value:function(){var e,t,i;if(this.center){var n=this._radius*this._radiusRatio,r=this.axisRoot,o=this.center,s=[o,new Kh((null!==(e=this.xAxisLength)&&void 0!==e?e:n)+o.x,o.y,o.z)];this.xAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.xAxisColor)}),this.xNormal=new Kh,Kh.subtract(s[1],s[0],this.xNormal),Kh.normalize(this.xNormal,this.xNormal),this.xAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.xAxis.axis="X",this.xAxis.color=this.xAxisColor,s=[o,new Kh(o.x,-(null!==(t=this.yAxisLength)&&void 0!==t?t:n)+o.y,o.z)],this.yAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.yAxisColor)}),this.yNormal=new Kh,Kh.subtract(s[1],s[0],this.yNormal),Kh.normalize(this.yNormal,this.yNormal),this.yAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.yAxis.axis="Y",this.yAxis.color=this.yAxisColor,s=[o,new Kh(o.x,o.y,(null!==(i=this.zAxisLength)&&void 0!==i?i:n)+o.z)],this.zAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.zAxisColor)}),this.zNormal=new Kh,Kh.subtract(s[1],s[0],this.zNormal),Kh.normalize(this.zNormal,this.zNormal),this.zAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.zAxis.axis="Z",this.zAxis.color=this.zAxisColor,this._primitives.push(this.xAxis,this.yAxis,this.zAxis)}}},{key:"createAxisPlane",value:function(){this.XOYPlane=this.root.add(new Qc({color:this.zAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Kh(0,0,1),axis:"XY"})),this.XOYPlane.relativeAxis=[this.xAxis,this.yAxis],this.XOZPlane=this.root.add(new Qc({color:this.yAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Kh(0,1,0),axis:"XZ"})),this.XOZPlane.relativeAxis=[this.xAxis,this.zAxis],this.YOZPlane=this.root.add(new Qc({color:this.xAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Kh(1,0,0),axis:"YZ"})),this.YOZPlane.relativeAxis=[this.yAxis,this.zAxis],this._primitives.push(this.XOYPlane,this.YOZPlane,this.XOZPlane)}},{key:"createOrignPoint",value:function(){var e=new ef({modelMatrix:this.modelMatrix});this.origin=e.add({show:!0,position:this.center,pixelSize:1.5*this.lineWidth,color:this.originColor}),this.origin.axis="XYZ",this.origin.pcolor=this.originColor,this.root.add(e),this._primitives.push(this.origin)}},{key:"getAxisMaterial",value:function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16;return new Zh(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{fabric:{type:"dasharrow",source:Xc,uniforms:{color:e,gapColor:Yh.TRANSPARENT,dashLength:t,dashPattern:255}}}:{fabric:{type:"PolylineArrow",uniforms:{color:e}}})}},{key:"createRotateAxis",value:function(){for(var e=[],t=this.rotatePlaneRadius||this._radius*this._radiusRatio,i=this.center,n=0;n<=360;n++){var r=n/180*Math.PI;e.push(new Kh(i.x+t*Math.cos(r),i.y+t*Math.sin(r),i.z))}this.zRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.zAxisColor,!0,0)}),this.zRotate.axis="RZ",this.zRotate.color=this.zAxisColor,this.zRotate.normal=new Kh(0,0,1),e.splice(0);for(var o=0;o<=360;o++){var s=o/180*Math.PI;e.push(new Kh(i.x+t*Math.cos(s),i.y,i.z+t*Math.sin(s)))}this.yRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.yAxisColor,!0,0)}),this.yRotate.axis="RY",this.yRotate.color=this.yAxisColor,this.yRotate.normal=new Kh(0,1,0),e.splice(0);for(var a=0;a<=360;a++){var l=a/180*Math.PI;e.push(new Kh(i.x,i.y+t*Math.cos(l),i.z+t*Math.sin(l)))}this.xRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.xAxisColor,!0,0)}),this.xRotate.axis="RX",this.xRotate.color=this.xAxisColor,this.xRotate.normal=new Kh(-1,0,0),this.rAxuStart=this.axisRoot.add({positions:[],width:this.lineWidth/2,material:this.getAxisMaterial(this.activeAxisColor,!0,0)}),this.rAxuEnd=this.axisRoot.add({positions:[],width:this.lineWidth/2,material:this.getAxisMaterial(this.activeAxisColor,!0,0)}),this._primitives.push(this.xRotate,this.yRotate,this.zRotate,this.rAxuStart,this.rAxuEnd)}},{key:"createScaleAxis",value:function(){var e,t=this._radius*this._radiusRatio,i=new Kh(1,1,1);this.xNormal&&this.yNormal&&this.zNormal&&(Kh.add(this.xNormal,this.yNormal,i),Kh.add(i,this.zNormal,i)),Kh.normalize(i,i);var n=null!==(e=this.scaleAxisLength)&&void 0!==e?e:t,r=new Kh;Kh.multiplyByScalar(i,n,r),Kh.add(this._center,r,r),this.scaleAxis=this.axisRoot.add({positions:[this._center,r],width:this.lineWidth,material:this.getAxisMaterial(this.scaleAxisColor)}),this._primitives.push(this.scaleAxis),this.scaleAxis.axis="SXYZ",this.scaleAxis.color=this.scaleAxisColor}},{key:"bind",value:function(e){var t=this;if(!this._viewer)throw new Error("please call addTo method to add to viewer");if(this.unbind(),this._hasBindObject=!0,this.object=e,!!(!e||!e.root||void 0===e.root.transform))throw new Error("TilesetEditor 仅支持 cesium3DTileset, 请传入 tileset.nativeObjCesium");this.modelMatrix=e.root.transform;var i=function(){Xh.multiplyByPoint(t._inverseModelMatrix,e.boundingSphere.center,t._center),t._radius=e.boundingSphere.radius,t.createPrimitive()};e.readyPromise&&"function"==typeof e.readyPromise.then?e.readyPromise.then(i):i()}},{key:"bindPosition",value:function(e){if("function"==typeof e.getValue&&(e=e.getValue(this._viewer.clock.currentTime)),e instanceof Kh==!1)throw new Error("position is invalid");this._hasBindObject=!0,this.modelMatrix=uf.eastNorthUpToFixedFrame(e),this._center=new Kh,Kh.clone(this.originOffset,this._center),this._radius=10,this.createPrimitive()}},{key:"createPrimitive",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=new qh({modelMatrix:this.modelMatrix});this.axisRoot=t,this.root.add(t),this.createOrignPoint(),this.translateEnabled&&this.createMoveAxis(),this.translateEnabled&&this.createAxisPlane(),e&&this.rotateEnabled&&this.createRotateAxis(),e&&this.scaleEnabled&&this.createScaleAxis()}},{key:"unbind",value:function(){this.object=void 0,this.root.removeAll(),this.origon=void 0,this.xAxis=void 0,this.yAxis=void 0,this.zAxis=void 0,this.modelMatrix=void 0,this._hasBindObject=!1}},{key:"addTo",value:function(e){this._viewer=e,e.scene.primitives.add(this.root),this.addEventListener()}},{key:"addEventListener",value:function(){var e=this,t=this._viewer,i=new tf(t.canvas);i.setInputAction((function(n){if(e._hasBindObject){var r=t.scene.pick(n.position);r&&e._primitives.includes(r.primitive)&&(e._mousedownPixel=n.position,e.active(r.primitive),e._offset=new Kh,e._angle=0,i.setInputAction((function(t){var i=t.startPosition,n=t.endPosition;e.transform(i,n)}),nf.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!1)}}),nf.LEFT_DOWN),i.setInputAction((function(n){e._hasBindObject&&(e.active(null),i.removeInputAction(nf.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!0,e.translateEnabled&&(e.xAux.positions=[],e.yAux.positions=[],e.zAux.positions=[]),e.rotateEnabled&&(e.rAxuStart.positions=[],e.rAxuEnd.positions=[]))}),nf.LEFT_UP),this._removeEventListener=function(){i.removeInputAction(nf.LEFT_DOWN),i.removeInputAction(nf.LEFT_UP),i.removeInputAction(nf.MOUSE_MOVE)}}},{key:"active",value:function(e){if(e||this.activePrimitive){if(!e&&this.activePrimitive){if(bf(this.activePrimitive,this.activePrimitive.pcolor||this.activePrimitive.color),this.activePrimitive.isAxisPlane){var t,i=zh(this.activePrimitive.relativeAxis);try{for(i.s();!(t=i.n()).done;){var n=t.value;bf(n,n.color)}}catch(e){i.e(e)}finally{i.f()}}return this.activePrimitive=void 0,void(this._mode=Ef)}if(e.isAxisPlane){var r,o=zh(e.relativeAxis);try{for(o.s();!(r=o.n()).done;){bf(r.value,this.activeAxisColor)}}catch(e){o.e(e)}finally{o.f()}}if(this.activePrimitive=e,bf(this.activePrimitive,this.activeAxisColor),e.axis)if(e.axis.includes("R")){this._mode=Tf;var s=wf(this._mousedownPixel,this);this.rAxuStart.positions=[this.center,s],this._startLocalPosition=s}else e.axis.includes("S")?this._mode=kf:this._mode=Af}}},{key:"remove",value:function(){this._viewer.scene.primitives.remove(this.root),this._removeEventListener(),this._primitives.splice(0)}},{key:"getTransform",value:function(){if(!this._modelMatrix)return null;var e=function(e){var t=Xh.getTranslation(e,new Kh),i=ff.fromCartesian(t),n=sf.toDegrees(i.longitude),r=sf.toDegrees(i.latitude),o=i.height,s=Xh.getMatrix3(e,new Jh),a=Jh.getColumn(s,0,new Kh),l=Kh.magnitude(a);if(l<1e-9)return null;Jh.multiplyByScalar(s,1/l,s);var u=$h.fromRotationMatrix(s),c=pf.fromQuaternion(u);return{position:{lng:Cf(n,6),lat:Cf(r,6),alt:Cf(o,2)},orientation:{heading:Cf(sf.toDegrees(c.heading),2),pitch:Cf(sf.toDegrees(c.pitch),2),roll:Cf(sf.toDegrees(c.roll),2)},scale:Cf(l,3)}}(this._modelMatrix);return e?(this.object&&"number"==typeof this.object.scale&&1!==this.object.scale&&(e.scale=Cf(e.scale*this.object.scale,3)),e):null}},{key:"getModelMatrix",value:function(){if(!this._modelMatrix)return null;for(var e=new Array(16),t=0;t<16;t++)if(e[t]=this._modelMatrix[t],!isFinite(e[t]))return null;return e}},{key:"transform",value:function(e,t){if(this.preTranformEvent.raiseEvent(Xh.clone(this.modelMatrix,{})),this.activePrimitive===this.origin){var i=ANOVGIS.Transform.transformWindowToCartesian3(t,this._viewer);Xh.setTranslation(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=zh(this.root._primitives);try{for(r.s();!(n=r.n()).done;){n.value.modelMatrix=this.modelMatrix}}catch(e){r.e(e)}finally{r.f()}}else if(this._mode===Af)xf(this,e,t,mf),this.translate(mf);else if(this._mode===Tf){var o=function(e,t,i){var n=e.center;Kh.subtract(t,n,t),Kh.subtract(i,n,i);var r=Kh.dot(t,t),o=Kh.dot(i,i);if(r<1e-12||o<1e-12)return 0;var s=Kh.dot(Kh.normalize(t,t),Kh.normalize(i,i)),a=Kh.subtract(t,i,yf),l=t,u=Kh.cross(a,l,yf),c=e.activePrimitive.normal,h=sf.sign(Kh.dot(u,c));return isFinite(s)?Math.acos(Math.max(-1,Math.min(1,s)))*h:0}(this,wf(e,this),wf(t,this));this.rotate(o)}else if(this._mode=kf){xf(this,e,t,mf);var s=Kh.distance.apply(Kh,Ie(this.scaleAxis.positions));if(!isFinite(s)||s<1e-9)return;var a=-mf.sxyz/s+1;this.scale(new Kh(a,a,a))}this.postTransformEvent.raiseEvent(Xh.clone(this.modelMatrix,{}))}},{key:"scale",value:function(e){var t=Xh.fromScale(e,gf);Xh.multiply(this._modelMatrix,t,this._modelMatrix),this.modelMatrix=this._modelMatrix;var i,n=zh(this.root._primitives);try{for(n.s();!(i=n.n()).done;){var r=i.value;Xh.multiply(r.modelMatrix,t,r.modelMatrix)}}catch(e){n.e(e)}finally{n.f()}this.postScaleEvent.raiseEvent(e,Xh.clone(this.modelMatrix,{}))}},{key:"rotate",value:function(e){this._angle+=e;var t=this.activePrimitive.normal,i=Xh.fromTranslation(this.center,gf),n=$h.fromAxisAngle(t,e,df),r=Jh.fromQuaternion(n,vf),o=Xh.fromTranslation(Kh.negate(this.center,yf),_f);Xh.multiply(this.modelMatrix,i,this.modelMatrix),Xh.multiplyByMatrix3(this.modelMatrix,r,this.modelMatrix),Xh.multiply(this.modelMatrix,o,this.modelMatrix);var s,a=zh(this.root._primitives);try{for(a.s();!(s=a.n()).done;){var l=s.value;Xh.multiply(l.modelMatrix,i,l.modelMatrix),Xh.multiplyByMatrix3(l.modelMatrix,r,l.modelMatrix),Xh.multiply(l.modelMatrix,o,l.modelMatrix)}}catch(e){a.e(e)}finally{a.f()}this.postRoatationEvent.raiseEvent(e,t,Xh.clone(this.modelMatrix,{})),this.modelMatrix=this._modelMatrix,this.createRotateAux(this._startLocalPosition,this._angle)}},{key:"translate",value:function(e){if(this.activePrimitive){var t=this.activePrimitive.axis;-1===t.indexOf("X")&&(e.x=0),-1===t.indexOf("Y")&&(e.y=0),-1===t.indexOf("Z")&&(e.z=0),e.x=-e.x,e.z=-e.z,Kh.add(this._offset,e,this._offset);var i=Xh.fromTranslation(e);Xh.multiply(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=zh(this.root._primitives);try{for(r.s();!(n=r.n()).done;){var o=n.value;Xh.multiply(o.modelMatrix,i,o.modelMatrix)}}catch(e){r.e(e)}finally{r.f()}this.createAux(this._offset,i)}}},{key:"createAux",value:function(e){if(e.x>0){var t=Kh.clone(this.xAxis.positions[0]),i=Kh.clone(this.xAxis.positions[0]);i.x+=-e.x,this.xAux.positions=[t,i]}else{var n=Kh.clone(this.xAxis.positions[1]),r=Kh.clone(this.xAxis.positions[1]);r.x+=-e.x,this.xAux.positions=[n,r]}if(e.y<0){var o=Kh.clone(this.yAxis.positions[0]),s=Kh.clone(this.yAxis.positions[0]);s.y+=-e.y,this.yAux.positions=[o,s]}else{var a=Kh.clone(this.yAxis.positions[1]),l=Kh.clone(this.yAxis.positions[1]);l.y+=-e.y,this.yAux.positions=[a,l]}if(e.z>0){var u=Kh.clone(this.zAxis.positions[0]),c=Kh.clone(this.zAxis.positions[0]);c.z+=-e.z,this.zAux.positions=[u,c]}else{var h=Kh.clone(this.zAxis.positions[1]),f=Kh.clone(this.zAxis.positions[1]);f.z+=-e.z,this.zAux.positions=[h,f]}}},{key:"createRotateAux",value:function(e,t){if(this._startLocalPosition){var i=$h.fromAxisAngle(this.activePrimitive.normal,-t),n=Jh.fromQuaternion(i,vf),r=Xh.fromRotation(n,gf),o=Kh.subtract(e,this.center,yf);Xh.multiplyByPoint(r,o,o),Kh.add(this.center,o,o),this.rAxuEnd.positions=[this.center,o]}}}]),e}();const Rf=Mf;var Sf={CONE:"cone",CIRCLE:"circle",BOX:"box"},jf={light:{emissionRate:80,minSpeed:14,maxSpeed:22,endScale:3.5,lifeMin:.4,lifeMax:.9},medium:{emissionRate:160,minSpeed:20,maxSpeed:30,endScale:4.5,lifeMin:.35,lifeMax:.8},heavy:{emissionRate:260,minSpeed:26,maxSpeed:40,endScale:5.5,lifeMin:.3,lifeMax:.7},flood:{emissionRate:400,minSpeed:34,maxSpeed:52,endScale:7,lifeMin:.25,lifeMax:.6}},Lf={damCenter:[115.602,32.432],gateCount:13,gateHeight:28,gateSpacing:65,gatePositions:null,sprayHeading:180,sprayPitch:105,emitterType:Sf.CONE,coneAngle:15,circleRadius:3,boxWidth:4,boxHeight:1.5,particleImageSize:24,startColor:null,endColor:null,startScale:.8,flowPreset:"medium",systemLifetime:16},If=function(e,t){if(!e)throw new Error("DamWaterRelease: viewer is required");this._viewer=e,this._options=Object.assign({},Lf,t||{}),this._particleSystems=[],this._gatePositions=[],this._flowLevel=this._options.flowPreset,this._destroyed=!1,this._mainImage=this._createWaterTexture(this._options.particleImageSize),this._computeGatePositions()};Object.defineProperties(If.prototype,{gatePositions:{get:function(){return this._gatePositions}},flowLevel:{get:function(){return this._flowLevel}},currentFlowParams:{get:function(){return jf[this._flowLevel]||jf.medium}},emitterType:{get:function(){return this._options.emitterType}}}),If.prototype._computeGatePositions=function(){var e=this._options;if(e.gatePositions&&e.gatePositions.length>0)return this._gatePositions=e.gatePositions.map((function(t){return{lon:t[0],lat:t[1],height:t[2]||e.gateHeight,worldPos:Cesium.Cartesian3.fromDegrees(t[0],t[1],t[2]||e.gateHeight)}})),void(e.gateCount=this._gatePositions.length);var t=e.gateSpacing;this._gatePositions=[];for(var i=0;i<e.gateCount;i++){var n=(i-(e.gateCount-1)/2)*t,r=e.damCenter[0]+9e-6*n,o=e.damCenter[1]-2e-5;this._gatePositions.push({lon:r,lat:o,height:e.gateHeight,worldPos:Cesium.Cartesian3.fromDegrees(r,o,e.gateHeight)})}},If.prototype._createWaterTexture=function(e){var t=document.createElement("canvas");t.width=e,t.height=e;var i=t.getContext("2d"),n=e/2,r=i.createRadialGradient(n,.7*n,0,n,n,n);return r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.02,"rgba(255, 255, 255, 1)"),r.addColorStop(.06,"rgba(255, 255, 255, 0.85)"),r.addColorStop(.15,"rgba(250, 252, 255, 0.45)"),r.addColorStop(.3,"rgba(220, 235, 250, 0.12)"),r.addColorStop(.5,"rgba(180, 200, 230, 0.02)"),r.addColorStop(1,"rgba(100, 130, 180, 0)"),i.fillStyle=r,i.fillRect(0,0,e,e),t.toDataURL()},If.prototype._createEmitter=function(){var e=this._options;switch(e.emitterType){case Sf.CONE:return new Cesium.ConeEmitter(Cesium.Math.toRadians(e.coneAngle));case Sf.CIRCLE:return new Cesium.CircleEmitter(e.circleRadius);case Sf.BOX:return new Cesium.BoxEmitter(new Cesium.Cartesian3(e.boxWidth,e.boxHeight,.1));default:return new Cesium.ConeEmitter(Cesium.Math.toRadians(e.coneAngle))}},If.prototype._buildEmitterTransform=function(e,t,i,n,r){var o=Cesium.Math.toRadians(e),s=Cesium.Math.toRadians(t),a=Cesium.Matrix3.fromRotationZ(Cesium.Math.PI_OVER_TWO-o),l=Cesium.Matrix3.fromRotationY(s),u=new Cesium.Matrix3;return Cesium.Matrix3.multiply(a,l,u),Cesium.Matrix4.fromRotationTranslation(u,new Cesium.Cartesian3(i||0,n||0,r||0))},If.prototype._createParticleSystem=function(e){var t=this._gatePositions[e],i=this._options,n=this.currentFlowParams,r=Cesium.Transforms.eastNorthUpToFixedFrame(t.worldPos),o=this._buildEmitterTransform(i.sprayHeading,i.sprayPitch,0,-2,0);return this._viewer.scene.primitives.add(new Cesium.ParticleSystem({image:this._mainImage,startColor:i.startColor||Cesium.Color.WHITE.withAlpha(.55),endColor:i.endColor||Cesium.Color.WHITE.withAlpha(0),startScale:i.startScale,endScale:n.endScale,minimumParticleLife:n.lifeMin,maximumParticleLife:n.lifeMax,minimumSpeed:n.minSpeed,maximumSpeed:n.maxSpeed,imageSize:new Cesium.Cartesian2(i.particleImageSize,i.particleImageSize),emissionRate:n.emissionRate,emitter:this._createEmitter(),bursts:[new Cesium.ParticleBurst({time:0,minimum:40,maximum:80})],lifetime:i.systemLifetime,loop:!0,modelMatrix:r,emitterModelMatrix:o}))},If.prototype.addToScene=function(){if(!this._destroyed){this._viewer.scene.globe.depthTestAgainstTerrain=!0;for(var e=0;e<this._options.gateCount;e++)this._particleSystems.push(this._createParticleSystem(e))}},If.prototype.openGate=function(e){var t=this._particleSystems[e];t&&(t.show=!0,t.emissionRate=this.currentFlowParams.emissionRate,t.bursts=[new Cesium.ParticleBurst({time:0,minimum:20,maximum:40})])},If.prototype.closeGate=function(e){var t=this._particleSystems[e];t&&(t.show=!1,t.emissionRate=0)},If.prototype.setGateOpen=function(e,t){t?this.openGate(e):this.closeGate(e)},If.prototype.openAllGates=function(){for(var e=0;e<this._particleSystems.length;e++)this.openGate(e)},If.prototype.closeAllGates=function(){for(var e=0;e<this._particleSystems.length;e++)this.closeGate(e)},If.prototype.setFlowLevel=function(e){if(jf[e]){this._flowLevel=e;for(var t=jf[e],i=0;i<this._particleSystems.length;i++){var n=this._particleSystems[i];n&&(n.endScale=t.endScale,n.minimumSpeed=t.minSpeed,n.maximumSpeed=t.maxSpeed,n.minimumParticleLife=t.lifeMin,n.maximumParticleLife=t.lifeMax,n.emissionRate>0&&(n.emissionRate=t.emissionRate))}}},If.prototype.updateEmitterShape=function(e){var t=this._options;void 0!==e.emitterType&&(t.emitterType=e.emitterType),void 0!==e.coneAngle&&(t.coneAngle=e.coneAngle),void 0!==e.circleRadius&&(t.circleRadius=e.circleRadius),void 0!==e.boxWidth&&(t.boxWidth=e.boxWidth),void 0!==e.boxHeight&&(t.boxHeight=e.boxHeight);for(var i=this._createEmitter(),n=0;n<this._particleSystems.length;n++)this._particleSystems[n]&&(this._particleSystems[n].emitter=i)},If.prototype.updateSprayDirection=function(e,t){var i=this._options;void 0!==e&&(i.sprayHeading=e),void 0!==t&&(i.sprayPitch=t);for(var n=this._buildEmitterTransform(i.sprayHeading,i.sprayPitch,0,-2,0),r=0;r<this._particleSystems.length;r++)this._particleSystems[r]&&(this._particleSystems[r].emitterModelMatrix=n)},If.prototype.updateAppearance=function(e){for(var t=0;t<this._particleSystems.length;t++){var i=this._particleSystems[t];i&&(e.startColor&&(i.startColor=e.startColor),e.endColor&&(i.endColor=e.endColor),void 0!==e.startScale&&(i.startScale=e.startScale),void 0!==e.imageSize&&(i.imageSize=new Cesium.Cartesian2(e.imageSize,e.imageSize)))}},If.prototype.setParticleImage=function(e){for(var t=0;t<this._particleSystems.length;t++)this._particleSystems[t]&&(this._particleSystems[t].image=e)},If.prototype.getParticleSystem=function(e){return this._particleSystems[e]||null},If.prototype.getAllParticleSystems=function(){return this._particleSystems.slice()},If.prototype.removeFromScene=function(){for(var e=0;e<this._particleSystems.length;e++)this._particleSystems[e]&&this._viewer.scene.primitives.remove(this._particleSystems[e]);this._particleSystems=[]},If.prototype.destroy=function(){this.removeFromScene(),this._mainImage=null,this._gatePositions=[],this._destroyed=!0},If.EmitterType=Sf,If.FLOW_PRESETS=jf,If.DEFAULT_OPTIONS=Lf;const Df=If;var Bf=i(797),Gf=i.n(Bf);const Hf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._id=me.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._fogByDistance=t.fogByDistance||{near:20,nearValue:0,far:2e4,farValue:1},this._color=t.color||new Cesium.Color(0,0,0,.3),this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"fog"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,e&&this._viewer&&!this._nativeObjCesium&&this._createPostProcessStage(),this._nativeObjCesium&&(this._nativeObjCesium.enabled=e)}},{key:"fogByDistance",get:function(){return this._fogByDistance},set:function(e){var t,i,n,r;this._fogByDistance=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.fogByDistance=new Cesium.Cartesian4((null===(t=this._fogByDistance)||void 0===t?void 0:t.near)||10,(null===(i=this._fogByDistance)||void 0===i?void 0:i.nearValue)||0,(null===(n=this._fogByDistance)||void 0===n?void 0:n.far)||2e3,(null===(r=this._fogByDistance)||void 0===r?void 0:r.farValue)||1))}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.fogColor=e)}},{key:"_createPostProcessStage",value:function(){var e,t,i,n;this._nativeObjCesium=new Cesium.PostProcessStage({name:this._id,fragmentShader:Gf(),uniforms:{fogByDistance:new Cesium.Cartesian4((null===(e=this._fogByDistance)||void 0===e?void 0:e.near)||10,(null===(t=this._fogByDistance)||void 0===t?void 0:t.nearValue)||0,(null===(i=this._fogByDistance)||void 0===i?void 0:i.far)||200,(null===(n=this._fogByDistance)||void 0===n?void 0:n.farValue)||1),fogColor:this._color}}),this._viewer.scene.postProcessStages.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._state=Ae.ADDED,this):this}}]),e}();var Nf=i(802),Ff=i.n(Nf);const zf=function(){function e(){n(this,e),this._id=me.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"rain"}},{key:"enable",get:function(){return this._enable},set:function(e){return this._enable=e,e&&this._viewer&&!this._nativeObjCesium&&this._createPostProcessStage(),this._nativeObjCesium&&(this._nativeObjCesium.enabled=e),this}},{key:"speed",get:function(){return this._speed},set:function(e){this._speed=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.speed=e)}},{key:"mixNum",get:function(){return this._mixNum},set:function(e){this._mixNum=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.mixNum=e)}},{key:"_createPostProcessStage",value:function(){this._nativeObjCesium=new Cesium.PostProcessStage({name:this._id,fragmentShader:Ff(),uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._state=Ae.ADDED,this):this}}]),e}();var Wf=i(87),Uf=i.n(Wf);const Vf=function(){function e(){n(this,e),this._id=me.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._speed=10,this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"snow"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,e&&this._viewer&&!this._nativeObjCesium&&this._createPostProcessStage(),this._nativeObjCesium&&(this._nativeObjCesium.enabled=e)}},{key:"speed",get:function(){return this._speed},set:function(e){this._speed=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.speed=e)}},{key:"_createPostProcessStage",value:function(){this._nativeObjCesium=new Cesium.PostProcessStage({name:this._id,fragmentShader:Uf(),uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._state=Ae.ADDED,this):this}}]),e}();var qf=i(35),Zf=i.n(qf);const Yf=function(){function e(t){n(this,e),this._id=me.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._rotateAmount=.04,this._enable=!1,this._heading=0,this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"cloud"}},{key:"enable",get:function(){return this._enable},set:function(e){!this._viewer.scene.mode!==Cesium.SceneMode.SCENE3D&&(this._enable=this._nativeObjCesium.show=e,this._enable?this._viewer.scene.postUpdate.addEventListener(this._onRotate,this):this._viewer.scene.postUpdate.removeEventListener(this._onRotate,this))}},{key:"rotateAmount",get:function(){return this._rotateAmount},set:function(e){this._rotateAmount=e}},{key:"_onRotate",value:function(e,t){0!==this._rotateAmount&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._nativeObjCesium.modelMatrix=Cesium.Transforms.headingPitchRollToFixedFrame(new Cesium.Cartesian3,new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._heading),0,0)))}},{key:"_createPrimitive",value:function(){this._nativeObjCesium=new Cesium.Primitive({appearance:new Cesium.EllipsoidSurfaceAppearance({material:new Cesium.Material({fabric:{type:"Image",uniforms:{color:new Cesium.Color(1,1,1,1),image:Zf()},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})});var e=new Cesium.Cartesian3(this._viewer.scene.globe.ellipsoid.radii.x+1e4,this._viewer.scene.globe.ellipsoid.radii.y+1e4,this._viewer.scene.globe.ellipsoid.radii.z+1e4);this._nativeObjCesium.geometryInstances=new Cesium.GeometryInstance({geometry:new Cesium.EllipsoidGeometry({vertexFormat:Cesium.VertexFormat.POSITION_AND_ST,radii:e}),id:this._id}),this._nativeObjCesium.show=this._enable,this._viewer.scene.primitives.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._createPrimitive(),this._state=Ae.ADDED,this):this}}]),e}();const Kf=function(){function e(t){if(n(this,e),!t)throw new Error("Viewer:必须传入三维球对象");this._comps={fog:new Hf,rain:new zf,snow:new Vf,cloud:new Yf},this.install(t)}return a(e,[{key:"fog",get:function(){return this._comps.fog}},{key:"rain",get:function(){return this._comps.rain}},{key:"snow",get:function(){return this._comps.snow}},{key:"cloud",get:function(){return this._comps.cloud}},{key:"install",value:function(e){var t=this;Object.keys(this._comps).forEach((function(i){t._comps[i].addTo(e)})),Object.defineProperty(e,"weather",{value:this,writable:!1})}}]),e}();const Qf={};function Xf(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Jf(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Xf(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Xf(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const $f=function(){function e(t){n(this,e),this._viewer=t,this._options={}}return a(e,[{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._options=Jf(Jf({},this._options),e)}},{key:"_bindEvent",value:function(){}},{key:"_unbindEvent",value:function(){}},{key:"start",value:function(){var e=this;if(this._viewer.clock.shouldAnimate=!0,this._unbindEvent(),this._options.duration)var t=setTimeout((function(){e._unbindEvent(),e._options.callback&&e._options.callback.call(e._options.context||e),clearTimeout(t)}),1e3*Number(this._options.duration));return this._bindEvent(),this}},{key:"stop",value:function(){return this._unbindEvent(),this}}]),e}();function ep(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var tp=function(e){c(i,e);var t=ep(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,e))._options=o,r}return a(i,[{key:"type",get:function(){return Qf.GLOBE_ROTATE}},{key:"_icrf",value:function(e,t){if(e.mode!==Cesium.SceneMode.SCENE3D)return!0;var i=Cesium.Transforms.computeIcrfToFixedMatrix(t);if(i){var n=this._viewer.camera,r=Cesium.Cartesian3.clone(n.position),o=Cesium.Matrix4.fromRotationTranslation(i);n.lookAtTransform(o,r)}}},{key:"_bindEvent",value:function(){this._viewer.clock.multiplier=this._options.speed||12e3,this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}},{key:"_unbindEvent",value:function(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}}]),i}($f);Qf.GLOBE_ROTATE="globe_rotate";const ip=tp;function np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const rp=function(e){c(i,e);var t=np(i);function i(){var e;return n(this,i),(e=t.call(this,se))._registerEvent(),e}return a(i)}(le);function op(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var sp=function(e){c(i,e);var t=op(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,e))._routeStops=o.routeStops,r._loop=o.loop||!1,r._routeStops?(r._routeStops=r._routeStops.map((function(e){return e.position=De.parsePosition(e.position),e})),r._currentIndex=0,r._timer=void 0,r._flyEvent=new rp,r):(console.error("未定义路线!"),f(r))}return a(i,[{key:"type",get:function(){return Qf.FLYING}},{key:"_cameraFly",value:function(){var e=this,t=this,i=this._routeStops[this._currentIndex];this.raiseEvent(se.FLYING,i),i.position&&this._viewer.flyToPoint(i.position,i.heading,i.pitch,i.range,i.duration,(function(){e.raiseEvent(se.STOP_STAY,i),t._currentIndex++,t._currentIndex<=t._routeStops.length-1?(i=e._routeStops[t._currentIndex],t._timer=setTimeout((function(){t._cameraFly()}),1e3*i.stopStayTime)):e._loop&&(t._currentIndex=0,i=e._routeStops[t._currentIndex],t._timer=setTimeout((function(){t._cameraFly()}),1e3*t._routeStops[t._routeStops.length-1].stopStayTime))}))}},{key:"start",value:function(){return this._routeStops&&(this._currentIndex=0,this._cameraFly()),this}},{key:"pause",value:function(){return this._viewer.camera.cancelFlight(),this._timer&&clearTimeout(this._timer),this}},{key:"continueFly",value:function(){return this._routeStops&&this._cameraFly(),this}},{key:"addEventListener",value:function(e,t,i){return this._flyEvent.addEventListener(e,t,i||this),this}},{key:"removeEventListener",value:function(e,t,i){return this._flyEvent.removeEventListener(e,t,i||this),this}},{key:"raiseEvent",value:function(e,t){return this._flyEvent.raiseEvent(e,t),this}}]),i}($f);Qf.FlyManager="FlyManager";const ap=sp;function lp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var up=function(e){c(i,e);var t=lp(i);function i(e,r){var o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n(this,i),(o=t.call(this,e))._position=r,o._options=s,o._heading=e.camera.heading,o._aroundAmount=.2,o}return a(i,[{key:"type",get:function(){return Qf.AROUND_POINT}},{key:"position",set:function(e){this._position=e}},{key:"aroundAmount",set:function(e){this._aroundAmount=e}},{key:"_bindEvent",value:function(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}},{key:"_unbindEvent",value:function(){this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}},{key:"start",value:function(){var e=st.getScreenCenterCoordinates(this._viewer),t=Cesium.Cartesian3.distance(e,this._viewer.camera.positionWC),n={pitch:this._viewer.camera.pitch,range:t};this.setOptions(n),this.position=e,N(p(i.prototype),"start",this).call(this)}},{key:"_onAround",value:function(e,t){this._heading+=Cesium.Math.toRadians(this._aroundAmount),(this._heading>=2*Math.PI||this._heading<=2*-Math.PI)&&(this._heading=0),this._viewer.camera.lookAt(this._position,new Cesium.HeadingPitchRange(this._heading,this._options.pitch||this._viewer.camera.pitch,this._options.range||this._viewer.camera.positionCartographic.height))}}]),i}($f);Qf.AROUND_POINT="around_point";const cp=up;const hp=function(){function e(t){n(this,e),this._viewer=t,this._enable=!1,this._moveRate=100,this._rotateRate=.01,this._flags={moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,turnLeft:!1,turnRight:!1}}return a(e,[{key:"enable",get:function(){return this._enable},set:function(e){this._enable!==e&&this._viewer.scene.mode===Cesium.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}},{key:"moveRate",get:function(){return this._moveRate},set:function(e){this._moveRate=e}},{key:"rotateRate",get:function(){return this._rotateRate},set:function(e){this._rotateRate=e}},{key:"_bindEvent",value:function(){var e=this._viewer.scene.canvas;e.setAttribute("tabindex","0"),e.addEventListener("click",this._onClick.bind(this),!1),this._viewer.clock.onTick.addEventListener(this._onTick,this),document.addEventListener("keydown",this._onKeydown.bind(this),!1),document.addEventListener("keyup",this._onKeyup.bind(this),!1)}},{key:"_unbindEvent",value:function(){var e=this;Object.keys(this._flags).forEach((function(t){e._flags[t]=!1}));var t=this._viewer.scene.canvas;t.removeAttribute("tabindex"),t.removeEventListener("click",this._onClick,!1),this._viewer.clock.onTick.removeEventListener(this._onTick,this),document.removeEventListener("keydown",this._onKeydown,!1),document.removeEventListener("keyup",this._onKeyup,!1)}},{key:"_getFlagForKeyCode",value:function(e){var t=void 0;switch(e.keyCode){case"W".charCodeAt(0):case 38:t=e.shiftKey?"moveUp":"moveForward";break;case"S".charCodeAt(0):case 40:t=e.shiftKey?"moveDown":"moveBackward";break;case"A".charCodeAt(0):case 37:t="moveLeft";break;case"D".charCodeAt(0):case 39:t="moveRight";break;case"Q".charCodeAt(0):t="turnLeft";break;case"E".charCodeAt(0):t="turnRight"}return t}},{key:"_onClick",value:function(){this._viewer.scene.canvas.focus()}},{key:"_onKeydown",value:function(e){var t=this._getFlagForKeyCode(e);t&&(this._flags[t]=!0)}},{key:"_onKeyup",value:function(e){var t=this;Object.keys(this._flags).forEach((function(e){t._flags[e]=!1}))}},{key:"_onTick",value:function(){var e=this._viewer.scene.camera,t=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,i=Cesium.Cartesian3.clone(e.position,new Cesium.Cartesian3);this._flags.moveForward&&e.moveForward(t),this._flags.moveBackward&&e.moveBackward(t),this._flags.moveUp&&e.moveUp(t),this._flags.moveDown&&e.moveDown(t),this._flags.moveLeft&&e.moveLeft(t),this._flags.moveRight&&e.moveRight(t),this._flags.turnLeft&&e.rotate(i,-this._rotateRate),this._flags.turnRight&&e.rotate(i,this._rotateRate)}}]),e}();const fp=function(){function e(t){n(this,e),this._viewer=t,this._viewOption={},this._cache={},this._activedPath=void 0}return a(e,[{key:"_onPostRender",value:function(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.raiseEvent(re.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}},{key:"addPath",value:function(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.raiseEvent(re.ADD),this._cache[e.pathId]=e),this}},{key:"addPaths",value:function(e){var t=this;return Array.isArray(e)&&e.forEach((function(e){t.addPath(e)})),this}},{key:"removePath",value:function(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.raiseEvent(re.REMOVE)),this}},{key:"getPath",value:function(e){var t=this.getPaths().filter((function(t){return t.id===e}));return t&&t.length?t[0]:void 0}},{key:"getPaths",value:function(){var e=this,t=[];return Object.keys(this._cache).forEach((function(i){t.push(e._cache[i])})),t}},{key:"start",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e&&(null==e?void 0:e.pathId)!==(null===(t=this._activedPath)||void 0===t?void 0:t.pathId)&&this._cache.hasOwnProperty(null==e?void 0:e.pathId)?(this._viewOption=i,this._activedPath&&this.stop(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.raiseEvent(re.RESET_TIME_LINE),this._viewer.addEventListener($.POST_RENDER,this._onPostRender,this),this):this}},{key:"stop",value:function(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.removeEventListener($.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this}},{key:"clear",value:function(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.removeEventListener($.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this}}]),e}();const pp=function(){function e(t,i,r){n(this,e),this._id=me.uuid(),this._bid=void 0,this._positions=De.parsePositions(t),this._duration=i||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=Cesium.JulianDate.now(),this._pathEvent=new ir,this._pathEvent.addEventListener(re.ADD,this._onAdd,this),this._pathEvent.addEventListener(re.REMOVE,this._onRemove,this),this._pathEvent.addEventListener(re.POST_RENDER,this._onPostRender,this),this._pathEvent.addEventListener(re.RESET_TIME_LINE,this._resetTimeLine,this),this._state=Ae.INITIALIZED}return a(e,[{key:"pathId",get:function(){return this._id}},{key:"id",get:function(){return this._bid},set:function(e){this._bid=e}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=De.parsePositions(e)}},{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e}},{key:"pathMode",get:function(){return this._pathMode},set:function(e){this._pathMode=e}},{key:"pathEvent",get:function(){return this._pathEvent}},{key:"actived",get:function(){return this._actived},set:function(e){this._actived=e}},{key:"state",get:function(){return this._state}},{key:"_onAdd",value:function(){this._state=Ae.ADDED}},{key:"_onRemove",value:function(){this._state=Ae.REMOVED}},{key:"_onPostRender",value:function(e){var t=e.viewer,i=e.viewOption;if(!this.actived)return!1;var n=Cesium.JulianDate.now();if(Cesium.JulianDate.lessThan(n,this._endTime)&&this._sampledPosition){var r=this._sampledPosition.getValue(n),o=this._sampledPosition.getValue(Cesium.JulianDate.addSeconds(n,.001,new Cesium.JulianDate));r&&o&&t.camera.lookAt(r,new Cesium.HeadingPitchRange(tt(r,o),Cesium.Math.toRadians((null==i?void 0:i.pitch)||-20),(null==i?void 0:i.height)||2e3))}else t.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this._actived=!1,this._pathEvent.raiseEvent(re.END,this._positions[this._positions.length-1])}},{key:"_resetTimeLine",value:function(){if(!this._positions||!this._positions.length)return!1;var e=Cesium.JulianDate.now(),t=0,i=[];if("speed"===this._pathMode){var n=$e(this._positions)/this._duration;i=this._positions.map((function(i,r,o){return 0!==r&&(t+=$e([o[r-1],i])/n),Cesium.JulianDate.addSeconds(e,t,new Cesium.JulianDate)}))}else{var r=this._positions.length,o=(this._duration-this._duration%r)/r;i=this._positions.map((function(t,i){return Cesium.JulianDate.addSeconds(e,i*o,new Cesium.JulianDate)}))}this._sampledPosition=new Cesium.SampledPositionProperty,this._sampledPosition.addSamples(i,He.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=Cesium.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}),this._endTime=i[i.length-1],this._actived=!0}}]),e}();const mp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"black_and_white"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?Ae.ENABLED:Ae.DISABLED}},{key:"gradations",get:function(){return this._gradations},set:function(e){this._gradations=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.gradations=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createBlackAndWhiteStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();const dp=function(){function e(t){n(this,e),this._viewer=t,this._enable=!1,this._contrast=128,this._brightness=-.3,this._glowOnly=!1,this._delta=1,this._sigma=3.8,this._stepSize=5,this._selected=[],this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"bloom"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?Ae.ENABLED:Ae.DISABLED}},{key:"contrast",get:function(){return this._contrast},set:function(e){this._contrast=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.contrast=e)}},{key:"brightness",get:function(){return this._brightness},set:function(e){this._brightness=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.brightness=e)}},{key:"glowOnly",get:function(){return this._glowOnly},set:function(e){this._glowOnly=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.glowOnly=e)}},{key:"delta",get:function(){return this._delta},set:function(e){this._delta=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.delta=e)}},{key:"sigma",get:function(){return this._sigma},set:function(e){this._sigma=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.sigma=e)}},{key:"stepSize",get:function(){return this._stepSize},set:function(e){this._stepSize=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.stepSize=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=this._viewer.scene.postProcessStages.bloom,this.__nativeObjCesium.uniforms.contrast=this._contrast,this.__nativeObjCesium.uniforms.brightness=this._brightness,this.__nativeObjCesium.uniforms.glowOnly=this._glowOnly,this.__nativeObjCesium.uniforms.delta=this._delta,this.__nativeObjCesium.uniforms.sigma=this._sigma,this.__nativeObjCesium.uniforms.stepSize=this._stepSize}}]),e}();const vp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"brightness"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?Ae.ENABLED:Ae.DISABLED}},{key:"intensity",get:function(){return this._intensity},set:function(e){this._intensity=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.brightness=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createBrightnessStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();const yp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._focalDistance=87,this._delta=1,this._sigma=3.8,this._stepSize=2.5,this._selected=[],this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"depth_of_field"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this.__nativeObjCesium&&this._createPostProcessStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.enabled=e),this._state=e?Ae.ENABLED:Ae.DISABLED}},{key:"focalDistance",get:function(){return this._focalDistance},set:function(e){this._focalDistance=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.focalDistance=e)}},{key:"delta",get:function(){return this._delta},set:function(e){this._delta=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.delta=e)}},{key:"sigma",get:function(){return this._sigma},set:function(e){this._sigma=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.sigma=e)}},{key:"stepSize",get:function(){return this._stepSize},set:function(e){this._stepSize=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.stepSize=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createDepthOfFieldStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.focalDistance=this._focalDistance,this.__nativeObjCesium.uniforms.delta=this._delta,this.__nativeObjCesium.uniforms.sigma=this._sigma,this.__nativeObjCesium.uniforms.stepSize=this._stepSize,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();var gp={intensity:1.6,scatterColor:{r:.45,g:.7,b:1},scatterRadiusFactor:1.12,coreRingWidth:.006,coreRingStrength:.5,coreRingVisible:!0,outerGlowWidth:.45,outerGlowStrength:.35,outerGlowExponent:2,outerGlowVisible:!0,innerGlowWidth:.35,innerGlowStrength:.6,innerGlowExponent:2,innerGlowVisible:!0},_p=6371e3;const Cp=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,e),!t)throw Error("missing viewer param");this._viewer=t,this._enable=!1,this._state=Ae.INITIALIZED,this.__nativeObjCesium=void 0,this._options=Object.assign({},gp,i)}return a(e,[{key:"type",get:function(){return"earthGlow"}},{key:"options",get:function(){return this._options}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPrimitive(),this.__nativeObjCesium.show=e,this._state=e?Ae.ENABLED:Ae.DISABLED}},{key:"intensity",get:function(){return this._options.intensity},set:function(e){this._options.intensity=e;var t=this._material();t&&(t.uniforms.intensity=e)}},{key:"scatterColor",get:function(){return this._options.scatterColor},set:function(e){this._options.scatterColor={r:e.r,g:e.g,b:e.b};var t=this._material();if(t){var i=window.Cesium;t.uniforms.scatterColor=new i.Color(e.r,e.g,e.b,1)}}},{key:"scatterRadiusFactor",get:function(){return this._options.scatterRadiusFactor},set:function(e){var t=this;this._options.scatterRadiusFactor=e,this.__nativeObjCesium&&this._enable&&(this._radiusTimer&&clearTimeout(this._radiusTimer),this._radiusTimer=setTimeout((function(){t._radiusTimer=null,t.__nativeObjCesium&&t._enable&&(t.destroy(),t._createPrimitive(),t.__nativeObjCesium.show=!0)}),50))}},{key:"coreRingWidth",get:function(){return this._options.coreRingWidth},set:function(e){this._options.coreRingWidth=e;var t=this._material();t&&(t.uniforms.coreRingWidth=e)}},{key:"coreRingStrength",get:function(){return this._options.coreRingStrength},set:function(e){this._options.coreRingStrength=e;var t=this._material();t&&(t.uniforms.coreRingStrength=e)}},{key:"coreRingVisible",get:function(){return this._options.coreRingVisible},set:function(e){this._options.coreRingVisible=!!e;var t=this._material();t&&(t.uniforms.coreRingVisible=this._options.coreRingVisible?1:0)}},{key:"outerGlowWidth",get:function(){return this._options.outerGlowWidth},set:function(e){this._options.outerGlowWidth=e;var t=this._material();t&&(t.uniforms.outerGlowWidth=e)}},{key:"outerGlowStrength",get:function(){return this._options.outerGlowStrength},set:function(e){this._options.outerGlowStrength=e;var t=this._material();t&&(t.uniforms.outerGlowStrength=e)}},{key:"outerGlowExponent",get:function(){return this._options.outerGlowExponent},set:function(e){this._options.outerGlowExponent=e;var t=this._material();t&&(t.uniforms.outerGlowExponent=e)}},{key:"outerGlowVisible",get:function(){return this._options.outerGlowVisible},set:function(e){this._options.outerGlowVisible=!!e;var t=this._material();t&&(t.uniforms.outerGlowVisible=this._options.outerGlowVisible?1:0)}},{key:"innerGlowWidth",get:function(){return this._options.innerGlowWidth},set:function(e){this._options.innerGlowWidth=e;var t=this._material();t&&(t.uniforms.innerGlowWidth=e)}},{key:"innerGlowStrength",get:function(){return this._options.innerGlowStrength},set:function(e){this._options.innerGlowStrength=e;var t=this._material();t&&(t.uniforms.innerGlowStrength=e)}},{key:"innerGlowVisible",get:function(){return this._options.innerGlowVisible},set:function(e){this._options.innerGlowVisible=!!e;var t=this._material();t&&(t.uniforms.innerGlowVisible=this._options.innerGlowVisible?1:0)}},{key:"destroy",value:function(){this.__nativeObjCesium&&!this.__nativeObjCesium.isDestroyed()&&this._viewer.scene.primitives.remove(this.__nativeObjCesium),this._radiusTimer&&(clearTimeout(this._radiusTimer),this._radiusTimer=null),this.__nativeObjCesium=void 0,this._state=Ae.REMOVED}},{key:"_material",value:function(){if(this.__nativeObjCesium&&this.__nativeObjCesium.appearance)return this.__nativeObjCesium.appearance.material}},{key:"_createPrimitive",value:function(){var e=window.Cesium,t=this._options,i=_p*t.scatterRadiusFactor,n=t.scatterColor,r=new e.Material({fabric:{type:"EarthScatter",uniforms:{scatterColor:new e.Color(n.r,n.g,n.b,1),intensity:t.intensity,coreRingWidth:t.coreRingWidth,coreRingStrength:t.coreRingStrength,coreRingVisible:t.coreRingVisible?1:0,outerGlowWidth:t.outerGlowWidth,outerGlowStrength:t.outerGlowStrength,outerGlowExponent:t.outerGlowExponent,outerGlowVisible:t.outerGlowVisible?1:0,innerGlowWidth:t.innerGlowWidth,innerGlowStrength:t.innerGlowStrength,innerGlowExponent:t.innerGlowExponent,innerGlowVisible:t.innerGlowVisible?1:0},source:["uniform vec4 scatterColor;","uniform float intensity;","uniform float coreRingWidth;","uniform float coreRingStrength;","uniform float coreRingVisible;","uniform float outerGlowWidth;","uniform float outerGlowStrength;","uniform float outerGlowExponent;","uniform float outerGlowVisible;","uniform float innerGlowWidth;","uniform float innerGlowStrength;","uniform float innerGlowExponent;","uniform float innerGlowVisible;","czm_material czm_getMaterial(czm_materialInput materialInput) {"," czm_material material = czm_getDefaultMaterial(materialInput);"," float R1 = "+_p.toFixed(1)+";"," float R2 = "+i.toFixed(1)+";"," float t = abs(dot(normalize(materialInput.normalEC), normalize(materialInput.positionToEyeEC)));"," float tLimb = sqrt(max(1.0 - (R1 * R1) / (R2 * R2), 0.0));"," float distFromLimb = abs(t - tLimb);"," float coreRing = (1.0 - smoothstep(0.0, coreRingWidth, distFromLimb)) * coreRingStrength * coreRingVisible;"," float outerGlowWidthEff = clamp(outerGlowWidth, 0.0, tLimb);"," float tOuterStart = tLimb - max(outerGlowWidthEff, 1e-6);"," float outerGlow = pow(smoothstep(tOuterStart, tLimb, t), outerGlowExponent) * step(t, tLimb) * outerGlowStrength * outerGlowVisible * step(0.0001, outerGlowWidth);"," float innerGlow = pow(1.0 - smoothstep(tLimb, tLimb + innerGlowWidth, t), innerGlowExponent) * step(tLimb, t) * innerGlowStrength * innerGlowVisible;"," float halo = coreRing + outerGlow + innerGlow;"," material.diffuse = vec3(0.0);"," material.emission = scatterColor.rgb * halo * intensity;"," material.alpha = halo;"," return material;","}"].join("\n")},translucent:!0});this.__nativeObjCesium=this._viewer.scene.primitives.add(new e.Primitive({geometryInstances:new e.GeometryInstance({geometry:new e.EllipsoidGeometry({radii:new e.Cartesian3(i,i,i)})}),appearance:new e.MaterialAppearance({material:r,flat:!0,translucent:!0,closed:!0}),asynchronous:!1}))}}]),e}();const bp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._intensity=6,this._distortion=61,this._dirtAmount=.4,this._haloWidth=.4,this._selected=[],this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"lens_flare"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?Ae.ENABLED:Ae.DISABLED}},{key:"intensity",get:function(){return this._intensity},set:function(e){this._intensity=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.intensity=e)}},{key:"distortion",get:function(){return this._distortion},set:function(e){this._distortion=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.distortion=e)}},{key:"dirtAmount",get:function(){return this._dirtAmount},set:function(e){this._dirtAmount=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.dirtAmount=e)}},{key:"haloWidth",get:function(){return this._haloWidth},set:function(e){this._haloWidth=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.haloWidth=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createLensFlareStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.intensity=this._intensity,this.__nativeObjCesium.uniforms.distortion=this._distortion,this.__nativeObjCesium.uniforms.dirtAmount=this._dirtAmount,this.__nativeObjCesium.uniforms.haloWidth=this._haloWidth,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();const wp=function(){function e(t){n(this,e),this._viewer=t,this._enable=!1,this._selected=[],this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"night"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?Ae.ENABLED:Ae.DISABLED}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createNightVisionStage(),this.__nativeObjCesium&&this._viewer.scene.postProcessStages.add(this.__nativeObjCesium)}}]),e}();const Pp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._color=Cesium.Color.GREEN,this._length=.5,this._selected=[],this._state=Ae.INITIALIZED}return a(e,[{key:"type",get:function(){return"silhouette"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,Cesium.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this.__nativeObjCesium&&this._createPostProcessStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.enabled=e),this._state=e?Ae.ENABLED:Ae.DISABLED}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.color=e)}},{key:"length",get:function(){return this._length},set:function(e){this._length=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.length=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createSilhouetteStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.color=this._color,this.__nativeObjCesium.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();const Op=function(){function e(t){if(n(this,e),!t)throw Error("missing viewer param");this._blackAndWhite=new mp(t),this._bloom=new dp(t),this._brightness=new vp(t),this._depthOfField=new yp(t),this._earthGlow=new Cp(t),this._lensFlare=new bp(t),this._night=new wp(t),this._silhouette=new Pp(t)}return a(e,[{key:"blackAndWhite",get:function(){return this._blackAndWhite}},{key:"bloom",get:function(){return this._bloom}},{key:"brightness",get:function(){return this._brightness}},{key:"depthOfField",get:function(){return this._depthOfField}},{key:"earthGlow",get:function(){return this._earthGlow}},{key:"lensFlare",get:function(){return this._lensFlare}},{key:"night",get:function(){return this._night}},{key:"silhouette",get:function(){return this._silhouette}}]),e}();function xp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ep=function(e){c(i,e);var t=xp(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this))._pointerEvents=r.pointerEvents,e._show=!0,e._threejsContainer=void 0,e._threeCanvas=void 0,e._animateFrame=void 0,e.renderer=void 0,e.camera=void 0,e.scene=void 0,e}return a(i,[{key:"show",get:function(){return this._show},set:function(e){this._threejsContainer.style.visibility=e?"visible":"hidden"}},{key:"_addedHook",value:function(){}},{key:"_onAdd",value:function(e){this._viewer=e,this.initThree(),this._initMouse(),this.renderThreeJS(),this._viewer.nativeObjCesium.useDefaultRenderLoop=!1;var t=this;this.indexa=0,function e(){t._animateFrame=window.requestAnimationFrame(e),t.update()}()}},{key:"_removedHook",value:function(){window.cancelAnimationFrame(this._animateFrame),delete this._animateFrame,this._viewer.nativeObjCesium.useDefaultRenderLoop=!0,this._threeCanvas&&(this._viewer.container.removeChild(this._threeCanvas),delete this._threeCanvas)}},{key:"_initMouse",value:function(){var e=this;this.controls=new window.OrbitControls(this.camera,this.renderer.domElement),console.log(this.controls),new Cesium.ScreenSpaceEventHandler(this._viewer.canvas).setInputAction((function(t){console.log("Cesium.ScreenSpaceEventType.LEFT_DOWN");e.getThreeClick(e._viewer,e,t.position)}),Cesium.ScreenSpaceEventType.LEFT_DOWN),this.renderer.domElement.addEventListener("click",(function(t){var i=e.renderer.domElement.getBoundingClientRect(),n=i.width,r=i.height,o=(i.top,i.left,t.offsetX/n*2-1),s=-t.offsetY/r*2+1,a=new THREE.Raycaster;a.setFromCamera(new THREE.Vector2(o,s),e.camera);var l=a.intersectObjects(e.scene.children);console.log("射线器返回的对象",l),l.length}))}},{key:"getThreeClick",value:function(e,t,i){var n=new THREE.Raycaster,r=new THREE.Vector2,o=e.scene.canvas.getBoundingClientRect(),s=t.renderer.domElement.getBoundingClientRect(),a=s.width,l=s.height,u=s.top,c=s.left,h=t.renderer.domElement.offsetLeft,f=t.renderer.domElement.offsetTop,p=i.x+o.x-c+h,m=i.y+o.y-u+f;r.x=p/a*2-1,r.y=-m/l*2+1;var d=t.scene.children;n.setFromCamera(r,t.camera);var v=n.intersectObjects(d);return console.log(v),!!v[0]}},{key:"initThree",value:function(){if(!THREE)throw new Error("请引入 three.js 库 ");var e=this._viewer.scene.canvas.clientWidth,t=this._viewer.scene.canvas.clientHeight,i=de.create("canvas","anov-gis-threejs",document.body);i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.width=e+"px",i.style.height=t+"px",i.style.pointerEvents=this._pointerEvents?"auto":"none",this._threeCanvas=i;var n=e/t;this.renderer=new THREE.WebGLRenderer({canvas:i,alpha:!0,logarithmicDepthBuffer:!0,antialias:!0}),this.camera=new THREE.PerspectiveCamera(45,n,1,1e7),this.scene=new THREE.Scene}},{key:"update",value:function(){this.renderCesium(),this.renderThreeJS(),this.indexa++}},{key:"renderCesium",value:function(){this._viewer.nativeObjCesium.render()}},{key:"renderThreeJS",value:function(){this.camera.matrixAutoUpdate=!1;var e=this._viewer.nativeObjCesium.camera.viewMatrix,t=this._viewer.nativeObjCesium.camera.inverseViewMatrix;console.log("cvm",e),console.log("civm",t),console.log("this.camera",this.camera),this.camera.lookAt(new THREE.Vector3(0,0,0)),this.camera.matrixWorld.set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]),this.camera.matrixWorldInverse.set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]),console.log("this.camera",this.camera),console.log(this._viewer.nativeObjCesium.camera),this.renderer.setPixelRatio(window.devicePixelRatio);var i=this._viewer.nativeObjCesium.scene.canvas.clientWidth,n=this._viewer.nativeObjCesium.scene.canvas.clientHeight,r=this.renderer.domElement;(r.width!==i||r.height!==n)&&(this.resize(),this.renderer.setSize(i,n,!1)),this.camera.aspect=i/n,this.camera.fov=Cesium.Math.toDegrees(viewer.nativeObjCesium.camera.frustum.fovy),this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera)}},{key:"resize",value:function(){if(this._threeCanvas){var e=this._viewer.nativeObjCesium.scene.canvas.clientWidth,t=this._viewer.nativeObjCesium.scene.canvas.clientHeight,i=this._threeCanvas;i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.width=e+"px",i.style.height=t+"px"}}}]),i}(cr);const Ap=Ep;var Tp=200,kp={200:"成功响应"},Mp={Event:"Event",Api:"Api"},Rp=function(e,t,i,n,r){var o,s=me.uuid(),a=function(e){var t;return null!==(t=kp[e])&&void 0!==t?t:"未知错误"}(i);return{id:null!=n?n:s,name:t,code:i,msg:null!==(o=null==r?void 0:r.failMessage)&&void 0!==o?o:a,result:r}},Sp=function(){function e(t){n(this,e),this.event=new le(Mp),this.resMessage={},this.viewer=void 0,this.resMessage=Rp(0,"engineReady",Tp)}return a(e,[{key:"sendMessage",value:function(){var e,t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.name,r=i.id,o=i.params;if("ANOVGIS.init"===n||"anovgis.init"===n)return this.viewer=new Br(o.container,o),this.viewer.scene.camera.isFlying=!1,this.resMessage=Rp(0,n,Tp,r),void this.event.raiseEvent(Mp.Api,this.resMessage);"viewer.scene.camera.focus"==n&&(this.viewer.scene.camera.isFlying=!0,this.viewer.camera.flyTo({destination:new Cesium.Cartesian3(o.position.x,o.position.y,o.position.z),orientation:{direction:new Cesium.Cartesian3(o.direction.x,o.direction.y,o.direction.z),up:new Cesium.Cartesian3(o.up.x,o.up.y,o.up.z)},duration:null!==(e=i.duration)&&void 0!==e?e:void 0,complete:function(){setTimeout((function(){t.viewer.scene.camera.isFlying=!1}),200),t.resMessage=Rp(0,n,Tp,r,{name:"聚焦完成"}),t.event.raiseEvent(Mp.Api,t.resMessage)}}))}},{key:"receiveMessage",value:function(e){this.event.addEventListener(Mp.Api,e),this.event.addEventListener(Mp.Event,e)}}]),e}();const jp=function(e){return new Sp(e)}},506:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(929),r=["version","accessToken","baseUrl","author","home_page","init","ready","use","mixin","Namespace","Initialized"],o={version:"1.8.7",accessToken:"",baseUrl:"/anov-gis-sdk/resources/",author:"zhf",home_page:"http://192.168.11.164:9999/anov-gis2",Namespace:{},Initialized:!1,globalConfig:{}};o.setBaseUrl=function(e){e&&(o.baseUrl=e,n&&n.buildModuleUrl.setBaseUrl(o.baseUrl))},o.mixin=function(e){for(var t in e)r.indexOf(t)<0&&(o[t]=e[t]);return this},o.install=function(e){var t=[];return t.unshift(this),"function"==typeof e.install?e.install.apply(e,t):"function"==typeof e&&e.apply(null,t),this};window.Cesium=n,Object.keys(n).forEach((function(e){e.startsWith("_")||(o[e]=n[e])})),o.mixin(i(647)),o.CopyRight._setContent(o),o.initEnvironment=function(){if(!o.Initialized){if(n.buildModuleUrl.setBaseUrl(o.baseUrl),window.location.origin.startsWith("http"));else if(self&&self!=top&&window.parent&&window.parent.location.origin.startsWith("http")){for(var e=document.getElementsByTagName("script"),t=0;t<e.length;t++){var r=e[t].src;if(r&&-1!==r.indexOf("/anov-gis-sdk/")){var s=r.indexOf("/anov-gis-sdk/"),a=r.substring(0,s),l=(a.startsWith("http")?"":window.parent.location.origin)+a+"/anov-gis-sdk/resources/";console.log("[initEnv] setting baseUrl from script src:",l),o.setBaseUrl(l);break}}!function(){var e=window.parent.location.href,t=Object.getOwnPropertyDescriptor(HTMLAnchorElement.prototype,"href");if(t&&t.set){var i=t.set;Object.defineProperty(HTMLAnchorElement.prototype,"href",{get:t.get,set:function(t){"about:srcdoc"===t||t===window.location.href?i.call(this,e):i.call(this,t)},configurable:!0})}}()}if(self&&self!=top)-1===function(){var e=null;if(parent!==window)try{e=parent.location.href}catch(t){e=document.referrer}return e}().indexOf(location.origin)||window.parent&&window.parent.location.pathname&&window.parent.location.pathname.startsWith("/anov-gis-sdk/")&&o.baseUrl.indexOf("/anov-gis-sdk")>-1&&o.setBaseUrl(window.parent.location.origin+"/anov-gis-sdk/anov-gis-sdk/resources/");o.mixin(i(647)),o.Initialized=!0}},o.ready=function(e){};const s=o},35:e=>{e.exports="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQACAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDABQQEBkSGScXFycyJh8mMi4mJiYmLj41NTU1NT5EQUFBQUFBRERERERERERERERERERERERERERERERERERERET/2wBDARUZGSAcICYYGCY2JiAmNkQ2Kys2REREQjVCRERERERERERERERERERERERERERERERERERERERERERERERERET/3QAEACD/2gAMAwEAAhEDEQA/AOQHWp41JqFetXYBnigCWKHNWlts1ZtoQa1IrYGgDG+y0v2Q10AtBS/ZBQBz32Q0v2M10H2QUotRQBz32M0fYjXSfZlpv2daAOd+xGl+xGuhFv7UfZRQBz32I0n2Guj+ygUfZgelAHO/YSKPsNdF9mApPIWgDnvsNH2Gt824ppgFAGH9io+xe1bXkijyqAMX7FSfYa3ViFP8gUAc8bIim/YzXSCAGg2qmgDmjZmk+yGum+yLSGyBoA5n7IaPsprpPsIpDY+lAHO/ZDR9lNb5syKYbXHagDD+zGk+ymtz7NQbbFAGEbU0n2at77PUbW9AGJ9no+zmtZoAOtJ5Y7UAZJtiKQwVqhRSeWvUUAZf2c0fZzWn5RFL5VAGX5BpfsxrUEYHUVKIh1H60AY/2Wj7Ka2PJ7kCjyVPegDH+ymk+zmtsQA0fZx6UAYn2Y0otSa2zbD6U5bfHSgDD+xGj7JjvW4YPaomjHcUAZH2Sj7HWp5SnpSeVigDM+x0n2P61p7P85prBR1NAGabT0Bpv2NvStlPLHWpQ0YoAwDaMO1N8jHUGt92Vvu5/DFQtGSMbj+QoAxfK9KXyj6VqPa55yfxqu0JU0AUjDULpitPyt1QSx4oAynGKiPWrcq1UbrQB//Q5OPrWjbD0rNXrV+2ODzQB0Fpt71qxlRWFDOsYz/SrsV9k4oA2PMFNL1WWYHrxVhBnrQAvWkwP71SkIOvFUprkAHA5HI9xQBPlO7UfL2asU3xzjFWA7Y6/kKANESDsaeHNY5cg981YiuCgyRn1yaANBjxSK2BVAX2/t9BTvtB/wDrUAXS1KBmqQuD6VJ5xPQUAWjgVEcGoWkYioV470AWyMcU5Y81WDEdDinrMw4/nQBcWML1qTy1FVEkJqdeetADiBUbGpgnHFMdggzQBXZ2HQUqlz2NMa/UHA61Mt0VHP8AOgCOUygdMVAtwe5xj1q6bzPDLx+dRGSB+DjNAEP2k9TjH1pDcr7UktorDclU9pU4xQBd89T6UjSe4qqFY807JXrQBIXXrTDMD92oyxY4Uc9KtR6fIeT0PPFAFY7mpy2zt0BrUt7XHVaubQvAoAxBp8h6j86kGmt3IrVKL61FJGPX9aAM5tPI/iFN+wsO4q15bA/KQP1qVVbuaAKP2QL96nbEStAxr0JqrJAr+9AFTg8iklQYzTXAjGZG/AVUeeJz97HbgHFADwoPsfYmmOXXhWNPUgjAOfwxTXj2/MWoAarMP4jmnCVx0aoiSeagkl29aAL4mf8AiI+nSmmZiMYHPvWc10KkjlJGRmgC6i568mj7OD1aq3mkc5qzFtfnrigB4tkPekaCFOCTmp44xjJ6elUbpz5gZemOKAJTDGvQmmuAvBOM/wB6qpO7r1+tMLkcf/XNAFzmPuKeJTjA5rP3O3vUiqce5oAnEhBweanVVYdsVBHsjHzmka5RQQn60AEqhfu1UkOacXLHIyfWoJGPTBoAqTiqLdatzE96qN1oA//R5FTzVqJjVQdatRcHmgDRhkx1GfrWvAsDAE9frWPHU6NjkUAao2h9wbkdjT5bx1G5VyO9ZjTb8Fuo6H1qwl+FGH6Ede9AF6O8MwAYHB659KoxyvDIU6pnHNKsySdG/BhgfmKeUHbjvt6/lQBFd2gz5kfQ9u2aignK/I3I9K1IM4ODkVU1C1BTzUGCOuKAI2kz0pNmep/Wszzj3yacszH7uc0Aa6REc5z2qYLzycVnwymLJYEN2zxV60mZgWf86AJhge9CzA//AF6sIABz37VVlUSnaNy49uKALC4brUEzpGeepqpKuxvlJOe+eKjbcWy3WgCd5ttLHdAnA6+9VXJAxUKt5fJ70AbEc/PNTq5ZuvFYiXGPmqzFehU6/NQBuq/HWmMhbr26Vlx6gD1P51YXV4l4b8wc0AVZrJ0ffEMr97HepUvUHytnHtV1L2CfhGGT0HQ1l6hbtGxdR8p6+1AFw3Ct9wioXy3OQfwrNjmx0NTi6x1oAuQymNiM8dKe0qv1HuD3qibndwMU15COT19qAL2N/wB3rUhQ4GaopdP0HTvTzcM3JoAXkNnpWrZXwX5JCPY1jbsimbe/NAHW+enQEVHI5HT9K5fc3vTGmlU/KxH40Aa9xeiM/NwaptqGTjjFVDcyMMMxP1qE/NzQBsxXsXc4p8lxtwcZB7isIJnkH8KninMSlDye1AGvHcMzdOPUmntcJHwzY544qjHexhf9r0qG6vN5CbQ2Tx649aAI798sdpz1qsrBACnynj3zT7jZCcvz/s4/rVfaj5MWcenp+FAFppVXB3ZPtSecH6nmqWxh68dqmjbaO2fagCcnFVnUcnqacz5puRQBWzg5I6VYV8jil8sGhYyD7UASZBGD+ladsIgDt4PoTWYSEGe9OFyAeRzQBpXRdRmPn1rLmkY/eGOeK0baMsMliRS3sO6MhQM+poAzNpcZXk+gp4KhcqOehzVMSNE3UgirAui53Hr0OPSgCVnG3jP0zUHzH2qxHJGRgYB/2hTpYWRN4GV9VNAEUVsZDgdffitG3sVU4bBPcdaoWrsXBA4q/bS+U5Dkj60AXmtkQZxisu6ETE4IzWnM3mKQprmblHhJB/OgCndrtJqgxzVudy3WqTdaAP/S5AdasRnd1NQKeamVM9KALsT4HNWA4qgAR1qTPHNAFjzecdR600uXOKgIIG7HHvVmzSNn/fZ56AcfnQA5CV/wq5DdjZsfPHQjtVwaZARvw23jo1MudLjVcxnaR2JzQAqzmHDZypON1X45BKMjHI5Brmo7loyUbpnDA+1X47hYwXVuQePp/wDWoAdqGnJxJFwD17iobdobbc2dxHQ+9a1tOs44PUcisXUNNa2JkX7hPPtQBBLcNNIXbufXgVrWL4X5cc9cnJrCGBViCTY4OeDQBsfbliJBBI9c/wAqja/DHjp2/wDr1FPFGUG1vm6565z2FUfMK8UAannluePyqGWdzyQMetUvOPrSGfPWgCwZc1AzetMBJ6UhYJ9aAHEnv0pyR8ZpI2Lc4J/CrH75+injsBxigCCTd2FRyZxz1qT7a8XBA/GnQuZz8yrj+I45oAqFyOlatnqLqAJfmU8epFWINMtQu5mLZ6AU59HA+a3bBHO1un50AVr2AKPOi5U8kDt71R80d6svPJA5SQYzwyn3qrNAV+ZOUP6UAWU2u+3OBj8ePSkdlDfKCB6E5qjvOcg804zEnNAGmG9+varcNuZBk1g+cT1PHtW3aXkSqBvAPTBNAFgokY+dD+HNQtfQL8ozn6Vb84MD83sG7VWl8nGZMZ/vY4/+tQBVluA3OSo7VVlkXsc+9LdBP4SfXnkGqhOOhzQBN5mKC2TxTEi3Ak8envTN6rwwIPfmgC6JARgfnULgqTk4pn2hF5SmSXYlGG5PbFAEkc0cYOclqFkCuHbIHoTmqRI/AVf+yyTIHSNtvbHP/wBegCvcSh2wvSrdrHFgOwJIPJbp9Kr+SUzlHDf7h/njFRpA/wB7afz6fhQBoELIrSdEBwpJJ/Ws5ZDmrd2skUSqRwe9Z4Rj60AXw0Y4LYP0Jpkqx4yCD9Kp4xwamjZP4uPp1NAD1Hp0qcHA68VUeQfwZ2+9M3mgC1JLnpSpMFxuGe9V0NK3FAGvZXw3BG5yePatCdN33Tg+39a5hTjkVuaZdh28p/vEfL+FAFK6txGfmGCe3tVUIp+4eT2PFdO9urjLAFuxFczeQtbykNyevHvQA1gVJU9RU0c5ClT9Qf8A61Uyx608Op60AXBOeowKje4ZxhuagDAdDT+ooAEneP7pxUc90z8NSPUDnsaAI3YdqqucmpWNVz1oA//T48HBq1HKAMN371UpxII5oAtjduwjc+mamjuJAdsiqffFZ25sEfnmpYCzHJPAoA0mj3feOPYCq8ymL5kO78MUokGDnOex9KGjZQS3TOB70AW9KuZZW8tCcAFm4/LPt+tOkvXywLHjgY/lj/Jp2mWkwjMqMURgwye+fQd/Y9KfeQ/ZLXbEMM2AW6En0H0FAGa0pk+Y9afCRnDdDVeJGGQ/Tse9SKgHfpwKANJFSHDpIR7HpV6DU1ceTPjB4DDoaw1b1ppO3pQBZvoPIk+X7p5FVgwqX7SJE2SdO31qs2VPP50AWBIR04+lBbPPeoA2akBoAfk04Sew/KowSaXbQBN5tG7NRgU/pQBMrKO/Ipz3UiMDG5HvVYmmk0AW3uEm+aUDI6EYBzVWeaNFwjZ59MDmq0k2Bz0qo7+YfQUAbEOqhfk+6Dzyf8it8ysqBohkYySD29cd64Nu3p2rcs9b8oIp4weSfT/IoA0dXkE8ayoBuHf19v8A6xrPtrgg88Z6+la/9oW91H0Aye/U/h6VjSWLI4MXKNnAH/16AC+RYiGXhW/Q1VDU+STepif1+X8KpFyvynqKALe7NOCk1UWfHWrqSK/AoAlj82P7pOP0/Kpt7zDG3PrmnK0qRl0HAGcHvmoLedpThThuSxHAHOB+dAEaBwTjPFTRRCRgN3NS7Ul/dqRnvzkn/wCvUyoFIPy7s4Ibg4+h4oAnY+WqhsYHdo8isy+OW3KBz6Dj8K3Y/mQk8Y4AI4/xrDvroSvgjHHbpQBTE3mfKcD68UrtjtwfSqUshY7l7fnTDcOe/wCVAF5zGWA3Ed+lbdvdrtCRSFHA4yBg1yiuVOaDISP1zQB0V1q1y3ybtpHB296oxzlWz3rPScr15/GrEUm/mgDYn1EOmMbT7c0y2lg7jJPqelZjPuPNMLY6fpQBvNbRXAJjGD7VlzQtC2Dn8ahh1Fo2BHP44rTmuluYgxOSORgcigDOFOwRUS3AY4PGemehqeGLzXCg4J6E9M0AA9MflSE806aGWE5dWHb5Rkcd81UNyDQBZ8zHFWbSQiZCPXH51mGTI46noK3dI04sRNMDgfdHr/WgDcurj7PEXHJAyBXKzXhuG3PgZrrXijlBV1DDpWJdeHxktbvgf3X5A/Hr+eaAMhCpOGOB64zUhCDgP+lJNpl1DyVDD1Q5/wAKbDbSuehU/wC0CKAJVgfG8D5RxuPAzTGYjg/pVt2eFNjgEg5Hp/8AXqjLcmQnJ+g9PpQA0monOadv4IqNjQBC9RHrUrc1EetAH//U47vR0pcZptACk561PE+1P1qtT88YoAtW8jeYCfung/jWo0vmRlUAJPAz0rBEjA59K0DJ5iiSPhhwR60AdLp8yPti+X7u75eOnH4Vnavc7pdg6IT1PfArFgvpbeQOvUZBJHOD1FJdXXmSGQdT19/egC4zq3zYwPQVCXyc1V+0e1NacnpxQBM85Vsdu9WAQw9jWaWJ5NW4ZcrzxigCPPlnB5UnpTvMMZAHIPY0jFA28fl700y7+SOnNAEyMjnjKkelWFUjoc1RKhmBU9euDzUvzoeGz6cUAW92OCKUOO1U1uiCQ/NTBlbkGgCcvTS9R596Q80ASGQDrVu2kgYbWxuP97oPxrMIbvjHvUJfccHpnGBQBrSadFOCY3BxwcHGP6Vlm0kDEEYA4Ocf5P4VOspjQrG20Z7dz34+laOn+XJGIZVyGHHP48f0oAwJAAcDqOtR1oXflwyvGq8KcLx/OqLHPPc0AAbGPaphduQQxz3HsfWq9FAF5pluBk8ODyP7w9R7j9e1V3OPlbt0NNhOHBzjkc+nNXbrazEdx6d/cfWgCoFx833h7VNDOFwMGqvKnjinBnHOaANT+1jt2jIGMY/+tWYWZsgDHsKQM1SRo7c4z9aALNs4jG0Z3HknpirRnAXcWJPXOc/pVJVC9SAfY1G8gG7BwfYdaANew1ptxjl5B6Edaz9QJSTC9OSp9QeaoZIOR1qd5/OTD8svQ0AVycnJopSxIxSUABOetAGaSnlzjA4+lADT6VbtFOCw7VTrQgG2Ljj1oAqSOQ5pvmNnNSzpzkVCgyQKAHqoPLfpUyy+VypyOmKlRAoxSeWvUUAOjmjlwJBnHTNWIZxEVSQ8A5Q+1Z7Q7RuHXuKdv4BJ+X9RQBeuNTZMxfeXOTz144rJ346VNIEdNyjBBqtQBKsm05HX1rRjvPKQbnO49gTxWUKkjQucfligDaTU2XDR52njqTz71fttY3YEmCD3rCjt2QDcSB1Ix2od1A3RqVGfvE9fwoA6drgSD5CAfpmkabZ8xIPbpXMrOW/iA6Y78+4qWO7mcBcA9+KAOgf58ZAIrMudPjk+Zcg/pT7aeYBWZQAePX/9VackJ2htuR3xQBzTWrJ7/SomUjqOPWtuS2BO5cg+lQzExnDdD3oAxG+lREYrQmINUXoA/9XjicGm0pooASnbTTakMhIA9KAGlcCnq4Vcrw1RkmkoAe7bjmm0lFABRRS0AJS0UYoAUdzT44y7YBoiQyHaP8itS3sHkIQnEecBgOp/mT7UAZ00JjApglJ4NdinhpRhnbf14PvVC/8ADgHzxkIAOjdKAMBY42PLf0qbyFxlCarY8tiMg449qcLgjAHH0oAkYyR9eR6igXGKSW4DDAqtnB4oAulw4wOvXBFQIjbgTwCaZGWByOTTvMcjB5FADrg7SF9OauademIbCO42n/P+eaoP87HJ5oQ7Tgj0/nQBtXdoblzMuNpGSMcg96xJY2Q8jpxmugtJ8Dy26HvWXcxbmYZ4z8vp9PrQBn0UpGOtJQAtWo334Pfp+VVKkibafSgCxIgYe9V3TYcGrasCKY4/EelAFXp0p+4j3pXjA6VGUIoAXcc00nNJS0AKBSZp284wOBTaAEpccZozxikoAKKcy4OAc/SkxigBKuW8ygbDnBqnS0AaLAryelMAHUfnVaOdlPJyPSpt4jO3t1B+tAEwozTN3pUcku360ATHjkVXmXI3Dqe1IZ8rjoag3H1oAASORTjgnP6UynKpPI7UAGMVIHAyQPxz/hUWaXOT6UAXLe6HKuT0wCDx+NRyiNmwuAD1JNViMUUATS25TkHcv94ZxUYkKjjg+o4qWC6kgyFPDAgjsahwTQBcsblkf2P1rq7KVkVd44kOQTx9DzXHWrLG4kfHy849far11rUt03zgBcbQFGMc+vqPWgDpr+DaNwIwOw71zl23OCeevNbuiypcW3lSNlgMgdTg1j6rblHKjDE84OMj86AMhnI460wtmkKFTig8UAf/1uNNGaXGTSlCpx3oAQAN1/xoAGM1q6bYw3GQ5bcfu4GPr9fTH41dttBmbJiPy5wScfj7Z96AMaMpIMSDGO9SDTxK5SCRXI6DOCfpnr+YrYbSVgG18Mxzk7ckeufoO9YTofM2wAnByCOScHg0ATf2PciMyshVByS3HHrjrVFhtOOtaU17c+SbeRuM7mHcknue+OwFVLkxNt8pSvHzA88/WgCuoz7UE9vSjHenA5GMD1zQA5IXlbagyfQVcksxEMSYyBzjqKLOG5Ks8GV2gFjnGcnjFXf7KmX5Z2+cjOMngnsSOp/SgCjBYkYkfOw8Ap1J9PQV1+iwosOMuR2V8YB74wOKwraxlEik58rHQtggj09q2YGa3lKMcKwJA7H6d6ANblOh49KqXcbyo2DyRxwagvNZS1VdwyM4z1rHuvEEm4GMr5Z4wP69/wAKAMq80uaEGRlwo74rPVS3Aq/JqkrEksSTkYzhcfT/ABqzb3Ny6ho0G7orKOQP1FAFFbJsEP8AKevPagWeBvLLj61dm33P+vJyOuAB/Si0tbdiA5IbsBj+vNAEEVmHO1jtxgn/ADz+VbKaJsXIGCRkls5/LtTrS0tI5FcuTtOQgHU/1HvW/PqMQHcHuCKAODmsXiJbqc96VFUtmQHPQYrXuruKWTemDz2rLnvTvYjoeAcd6AIpPkjIBOeDk1GWaT94vXgEe+P8/jTDL5i7Se/f/PSrNoyhD5h4zyq/ePHX2Gf4s+2KAI0gaYEtwc4HHf8AwqE2zg7WwD7mtmF43hOfzz/Wqd1MJTsAHOPmI/yaAKTQ7ME/dOcEe1RNjtVlmaNPLJDDORt56e/pUax+aTt5bqAKAIlYqcin+axqYWpQsjghl6g8YPaqzDacelADy5PWkZs/1phpKAFNJRRQAUVLHA0gyOnSmMpXrQA2iiigApSc0lLQBLFA8/EYyR/nvSRwlyR6ZqWBmhHmowyONpGf0qWG7BfdIO+W9xQA6OyUx72BOe4NPaGNBhxhcdetaEJywAO6NznGNpH/ANeqt2jy7ljGcH5j6A9M0AVTCAuY887cHtzUN1avD8zcg9/eluFe3IAzt/hbHB/oaLiaSYAvwAMgf4UAVKeCFBzye1KuEI7nvSu287j+lADcjb05Pem0YpKAFo60lFAC0lLSUAFFFFABS0lFAGvZ6mLX96gAcAIy44YDvnsabe6iLvmRQCOh9RWVRQA5m3UgopcYoA//1+PHrV+y8otmTHHc9hVBeue1Tuwwp7A0Aa7X0Nk2+HknBXHT0Na1vqwkjKRFQzYYYzuPqeeOK5OW48/5pTyvCgDj8atw3aSkbsRMAV3D7v5dc0AbN5cC5hkMjH5SoIXgkE9T7D27VkwX62BdbUBiTgOy5yPT169KdDc74zaxtnJBLdDweOfT8yans4Y4lM7su8/6ssMf8C/w9Bz3oAzLvzZZCZyAx+YjGMcVIlgMKyneWGQoHQerHt/nrWxYwNKN58osGPmMxOB6YGD/APXpxtZWPkpIELZOCODt6kd8e5+oFAGDLZOeUBcjqRyPw7nH+RU9vp7QyK94hEfUqeCQP6VZe5kRFiMrSAkbUiIHfkHAzyPu4Jz3pNTuBIPLnLBlHygdP/1+uaANs3MEpEdsgwAW6dMf/X9aVVW3XNxIIxnO3JIyeeSeT7cAD0rlBeTuuyPhOBhRjp7+tSRRz3DBpSzjOCN2T/PpQBq2txDLPLFcSAIQNjsQP85pbjUfs2IAwmA4BAHA7VQudKmiTzdgAHDBMnA9fWqg3iMBlI54cg8fjQBoyl9R/doyrjB2s2KfZ+HS2WucqB0AHXn19PpVGHzEOYhvc5y3HT+ldHaymSLypyfxYj9aAGDRrPBMUZLD1JI/InH50r2szxiK34I++VAwT9f6dPSrLIbX5rdiQRtII35/Pnj2NVrZHj/1K5Uk7sEj8R6D25x2oAqvoV0OjKxJ6Zx/n6VUuLC5t1+eNSAcfKcn610ZuXiOJuM981lapqUG0puJOD065oAxRqarlTGpHTPQ1FPeq54UY6HGapySeYc0wUAS/aD6DHbiouWPuadhcdfm7DtT0VQy5PBIzt6igBPIfqAeDirq2U0aqw+XeDn2A9frVxpEhjDqy7A2AuOSPUfj171Qu7oTdMn0PSgCTT0eRzCRnPY9AanttNcvlYzJjIP90N2ye646gfSn6derjLrtCjlu3p+dbMV3PMywxD5WwVI4UqOpJ56UAZeo6HJEnmKqjnkKG7/Unj+VULe4k06Qou0k8EkZI/XitvWNYeNTbqPnX7/Qgj2wcj1rlHfc27p3oA055uTI/wAznqc1A7LNgqgUegNVlnbnPIPalBD8j72fwxQBKyluWX5T39KrmMk8A4ziuispwkYWRAzdOfSnRyWjSMDGVIBJx6d+PX370Ac2YnHUHnpxV6ytozuaUZ29ycKPTPfH4c1pXd3aRxmFFI3AYlx8xx2J681X/tuJLc26QAqTli7E5Prj+mcCgCBJWdvLQrgHBwMKfxqK9iWMBl53jPJ7+1Ucj8/SnSOXOck/WgCOipkKqwyO3ehWRTnrzQA1omUbjxnpUdWJ5/POT8uOg61F8oA6570AW7WGNpBFLIFQ4JcHpWlb6ZZuJv3wOwblORg/41gswPQYoDY/pQBqm9BgWLGMnr0Ix79q0pma3hja3Pmggl9hGFI9e/X1z6VzJkJOT361sG5h1BRGkfl3BARTGcIwA6MM9fcUAVbjUZb2YSy4yuAABgflUDxrI2Axz2U8n6cVbutIe0kVHYbWG4Hv+X1rQ060F0wW2IBXux6t79xjsBxQBzrxlCVPUU0DtXW6hp/2GJ5JXVpXXDEAAnPHy/1rLis3gjJ25LAY2kZ+boM9jnqP1oAyXUA4Bz+FMNaF6Wt5ApGJNoD9M5PUH3qKFoC6byyqM7jjOPoKAKpUjqKXyz3qWfYD8jFgDjJGDj1/+tT4ZjwgCglgdxHI/HsO5oArbTnaOtWHthGu4t16L3zVi80+W3Ad8DccoR0Yeo/nzVeIrIcOQPQt6+poAkjhj2/Mf97t/P8ApVaQDPC7R71Kcs5284OAf6/jV+LyrZQ82GkOSN3+TQBTttOlnJ2g4HersmmKGEbgoQOOOT756H8KW4cXDIgbaD1Kggev4EDpVm2aPbt81pmBG1QeQpPJAxngdRmgCnf6YtmgLcNgEDOc5rKRCxAHJPYVe1W4aRwm7cq5x+f88VWimWNSNuWPBOf5e9AB5eG2twR2pjLjrSPJuO7nPuc00E0Af//Q5AKD1OKdKAMev6UwHBpwO889AKAJ1hEhAYhV/vYyBnsakeDzG8iMKxB/1i9CB1P0q5ZhJQVXK7gVJPIqxpqbYTMOWJIUDuF/rnmgBLfSY4CJJscdieOfWi5uII5eD5o53ZGFx6D2/n71sXigRecp3ALj/ePU4/lXN3Vsbh8x7VUAcAnjjpg/4CgDTXxHCAcKVGMbEUY/E5rEuNReR9yk9dy7jnafb27Y6VWlhKHGMH3qKgC/BI8xVUKrIWzuPykZ46+nPTtU9zZwQhi8xkfGVCqeT7k549PWssKcE9ql8pgwDckjhep9uKAO60qxhXTVOQSVLMeOCeo/DpXP2urRW05BU7c9eOP/AK3rWTO9xB+6fKAgEoCQOfUD+tV0R5mCqMseg7mgDqbiW+upJLZNu3aGJJxlT6YqpcQSPGsAA3Ng5J/nnmp9LtVhUSyhkJzhdxH0zz+PNae5XTKSEN3YYLfTJBoA5qG1uNOuAWU8dx0OR/nrW9bNKSBdksh6bMEZPvx+lU7lZMLM0hZH6cdT+n+FbNlatIvKFk68sM/hQA42cZ+dSyAd8ZBpzW0cas25Txjjj6d6bdapFZjaSUPpgmuWvdTM8m4EkL14GCPwoALxiXOST+JNZdweQKfLcluR/KoS4blutAAsZNNVc8CpI5G/hx9D39vekIaTJA5HUAUACSmJw8fBByO/86klmeRhMcZGBkDHI9qrUooAtXl01wVJCjAJ+Vcck5Ofeq27jFNooAm+0NsCAnGc/jS/apcFdzYPUAnBzUFFAC5oBwMUlFABRRUkag8k4xQBqadbz3m1M4jHpx09Kt3NlNbzPHH8zlc7s4HzY4Ge/wClZ1leyxnykJK89DtOPr29T3oubqWRi9wx+dVyo7gdM0AVnje1lKyfK4POeoP4VFNKZXLkAEnPAwKa7b2Levqc02gAooqzbwCUHnG3nHrQBWorbvYLOCBduTKeWyenHasSgAoopyqWOFGT7UANoqeS0mjXe6Mq+pUj+dQUALWno8yQXKGTgbhyRnB7fTrzWYAe1PVsZz3GDQB2viOyjmiNw5wVAIIPB9h7ntXKC/KxiMDBU8ODg4/D+dQPMzL5eSVByOv+RUNAGul1bNassi752JCs2dw7g5PbNR27Kse+SQ/L9yPGQSDnBPbnnnrWYDjmtfS5YCW+0AdPlJXP/wCqgCjdSm4cysdztycDAqrW5rUSJKIoIwvAbdyCcjp9KxghJwOtACK23sD25pKCMUuxj2oAfLPJMBvJbHAyc0iKXOEGT2xTMHpWxpdukbec7cAYIxzQBkuGQkN1702r+pTfa7hpEGASOfoMVSZCpwaAAMV+YHn1p6TuCSDgnuDg/pTB0wfwpFUscDrQA+R/NOTwe59ff60xUJIHTPrU58pF2kEt3pzXX7sIoxjjJ64oAq9KBRQKAP/R400qLuIHrxSGnRPsYN6HNAHTWtiRCxHUDj/61ULN3DAdowzAg8fMaWTVNsR8tsMewrKFwwJI75/XrigDQjuJL6QRBiqDnOTwP8a07i3kEeyHESjGN/32/wBo/wB0Ht/SsTTrj7LIJTyvGa62HUbW68yMEZkxjb1AAxz7UAcdPbSxZLkcn1quxycitPVYthC5HH59f6VUtbQzHLcIOrf570ANjRlTzD93OMeprUkuEtkX7K2ZiAGZRngjkAn1P4jtWfdT7iqhdqr0T0/+ue9QCZ1OQcY9KAL00e5/Li+dxyzt6+mT6VcguxYQBY0BmdiWcYwB2ArJN5IRtXCg8HaoFME7AY/WgDWN+8r7SPm/CtWCzkMfmA7Rty3HP4Cuatx/EetbVrezAqB8wAK4I455/SgDTs1cqzhFUYG3zCNx9TnoM+gzVBprgOzQsBn74ycexGMYNdVHCVXA2YODk9h/KszUTDEySxDeckFeP88dqAOUuZpJxunUs68ZJ7f59aozDABAxkVt6lMZpN8aFBwKzJ7Yv8ygAgcjGPxoAoHmkpSMcUlACg4+vapSP40J469jmoakjfbkHoRjn370AMpKcy7Tim0AFFFFABRRRQAUUUUAFFSxQmXIXtzSSx+WdvXHUjpmgBobFOllaVtznJ6fhTMY60lAC0lLtNOO0r796AG1JDNJFnYcZ4NMA4zmlYHPTkdaABnZuWOabSqdhBoJHagAx3Naul31taSK7xkkcFuv6VlFyetG09cH8qAOn13XoLuIxQAkHjcwxx7Vy9KTxim0ATW+N2CcA8ZqxJaqWxCcg8KP7x9v/r1TVyvQ4pyOVO4ce9AFu5mE2WZEVgQpA4PA5OP/AK9Q21w1rJ5iqM4IG4ZHI6/4VHLGU7YqMnNAGzDb2JyZGdtoG9lI25b9eD17Vn7hExxnYwyPXmoEkKdOeh59qdNL5rbsY9B2FAF2RzMM7iWXgEnP+f8AGro0lzb/AGlCCuMkscEEdQf6VnWOd/QY9hz9K2Gf7PCSep7Z4/GgDnVOHyeat1TkcyMWPU+lOExUYH60AWgBUnnMV2Z49BVSFyxwTVgCgBQKa6AqakUUuKAKRRl+lTI6R8uBupxYAZ7c1SZixyaAHyNvOfc81HRTkjZ+goAZSip2tivJ4qMrigD/0uNNJUgGTTjDQBDTlXcQPXihl21JBtB3MN2D9096AFjYq21gGB+XH/1xW9p9vDEzOWwABkAZbntk5P5Vm+bGU3lT5nqW7j+6oGPfn9amtZlJPlIXcj756fj6D+dAEN7m6utiDAOAB7f1q3eq1nCu3pwBV2wsDH+/mO6Q/wCf0qaR4ZnIZhiPrQByD5yd3Xvmkq7PGbiZmAIXJx8pP4cU6FJYQ0bg+Ww+bjr6c4oAitniVwWXI755rXg06G6bzYWGM8qvX8j/ACrJl+QZUDFQJO6NuQlT6jj+VAHV/wBjW4XYG59en6UR2Ytv3hz8uSOePxFY0OsXPAyCem5hz+dWVkkk5mIYe7HB/D/61AE0mpyPlpScZwAp4qu9zEHw2R3qN5CJAiEIWwBgZAz3z0rWg0OBAZZ3Vs4xjj6jknrQBkzansGETp3bFVGvnnyrAD0IFa13a2CHIBC5wPmIA9TUBe027YTj3IP86AMR1ZTzTKtzw7zlKgMLjtQBHSg4GKMUlAEyQvMMqCccHAJwPfFL9klzjY3rwp6evTpUtpqM1pkRn5W+8PX8ev5UsupTSAAMVAG3gnkHr+HtQBBKhUAMAMfmfrUNOALH1JqdrGZQGKnngDvQBWoqcWspO0KSfarKaRdP91Dn070AZ9WLe0kuD8g49e1bdjpJAP2lSm3vxgjFMimEzlXyYAcLt4HHp/h3oAhliW0At0+aR8MSOBj0P41lSKVJTPTr9a6O51S0iiKxISzfKc8ED1z1z6fnWe0FvvjaPOCDv3Dcoz79/wA6AKSWodQ5YDPXd0qKSIxtt71sTtYeWY03Fz6AqB/wH+vWs8jeSW4XgAd+KAIDjHI59qjClm2jqeKnZNx2jjuM+lFpF5kygc/MMmgCx/ZrFS3CqoyzGlN7DDHthjBkxgysP5DnH1NW9WuPkW2j6Elmx39PwrMitWJwTj0NAFcuWGCeKChGPfpV6Kw8xvmPuSKvQWUajcOewJoAylRYRmQfN2pJLjI2hfxJOavT26g7iOfests5PtQA2koooAKk81hz6VHSigB8krSHLVHVy0MeSknIOMcdxUwhtW3szEY+6qkf160AZtLjtUrRhgTGPlHc9fxxWomlxKykseRnGO/1oAk0q23AE9sZNR6kN0p5+X+HH861x5dvD5QOGIOD6VkCNpWHdu1AFEWuPvGq5jIJHpzWq4Kna3UdagmxjNAFOHC5Y/SrQbjJpqW4C5PP0ojt3uG2jgDt9KADzx+HXNRvdHPy/mad9kLHk09bVAeeTQBUVWce3rSFRnj9a0BCemMCp7XS2lO5QAo79/yoArWenPctgfd/iPatL7OlugbgdtzVpx2/2eE7BlsZrn5pZHY76AIbqQOfl6Dv61TJyeakkJqKgD//0+RVsGtC3UNxWZViJyvINAGi2meZytRf2Ox68VNDfPjAPNJK1xIMMzAdiP8AOaAJLfSoxhnfPtg5NXWmghUDs3QLwT/9bvWbBaucbTkA5I3H+VWls1i3vI/LDjA6e349KAILnU5Z3McIwPu5/nj/ABqO2tiflYhevJ61oQaanlB14Y9Sx49hj+tQXUZRs9cjI/H/AAoArGYRHEXT1J5P/wBaoppXfqfw7U7ZinR25k57dOKAKvXrTGBIOFJA6kDiteDSnuGIUgKvUmq01lHESgl46EKDg/0oAoxlx6/jT5/mXB69qkVY0bv9QOv+FJPcLj5T9ABQA21GRtZQw9+orpbe1tZo8bQrA54GPz7VykQMjcnGfwrWtzOhKplh0yhyfxzwB70ALfIm8Rjru79cY6Y9M96qmMI4AxknGB6Yq8+qrGPLmi3Nzhjx9cevPpWMsjNLvxyDwPT6UAaJhAOBxVoacr/MGB9qqMxY5Jq1augOGbaKAK1zpuecj8DVVNKkflQSPXGBWw/kowePd9WIq6dZiiXaBubsO350AY1t4fZjunbag5/D8ajmsYg+yFS3ueeKvveTztufp2UcD/69MeaXvkZ649KAEhggsxulzn0UUsuoRyDEakL+ZqsY95yQfxNPjtXUcDA9cUALBePESYlAPTJXP9amW7u2zvkOe4AAH6c/maJBFAq4IdiOnI+gqNrtUkI5AHBXr+XWgCG5kL5Gd5Hr0/nWe4mPbj2rQkWQ5YRlVx1Pp+FQlZMA9VoAoC3dm5/OpNqoMfMcds4/lVtFGc/icUSMNvPagCKJQBle9XIowBuOKqx4wMdKnV+No49TQBDJDuPqTV6Cx+yxmVuo4GKLRRJIg446itHVI8wHHGCDj1oAwZWMz7m4xwPwqaJIyvJO72qBFqTbigDSgtwVxuOD14/nSvbMvXp7VmqxHQn86spcvwCeBQBZmsDMODjHas82iLkHbx6g1oRziQ+/1ps8Ky8kYPr0z+FAGDLASeMY9hUPlY6gn6VuNDgYqv5YNAFD7Hv5iOfY8GmG0lBwVrSWPbyKmilKHkA/UUAZq6bcFQ4HB6c80wWFw/RD/L+dbz6gQMKOPYAVSeeSXODjP50ATWAt7GMi4JEjegyAPw61LHexFzgfux03dazfsrtkn8zSRwiPqfzNAGrNfRzMSikHGB0PIpPNKYcFEbHRQSfr9aog7DlTS7ieTzQAsisxJJz3JPeofJLfSpA7D3qeA+YwycUAKbL90uOrHn6AVCGNm4KfeHrzW00kYx6r36g1HqUCTKGUfNkfMOlACW9zFOo85CrAfeA4NKYocnDAA9hUNrGyDax+gqGdsnFAFqOKAEru+nIq6qBRhR2xlTXPyIxG4Dj1p9vdPAwIPA6igDbyZFZW4PUE1zsituKv1BxXQpqEF0MMCD35/wAKpTWsIyycj65oA52cDPHSq561qXKL6VmsuDQB/9Tj6lSoh1qZKAJ40PpWgu9xxz+NQ2z5IA6e9aC3Tw/cQYHU89KAI4YJOWXg44rVtX2IVmAPPcZ5rKa9dmO0Yz2q7Y3LnHmDIB44xigDRuCoTDDoMiucuH3EL6f1NdKypJkg5J6jNYFxa7JMEnk9T6UARpbbsc1chbygRs59T3/LvSJ+7A74pxnLdhQBTuLh2JAG0ewqoVY9q0X+f71KGfG3OR6ECgDO8hz7fWoZIW/iGa1vLB6qP1qKSEfwr+VAGI0OORmnbpF5ViD7GtF4CeSAKqMoBx/KgC3DqUw4lG7sCwBI+nHFOSKKeTe44/I5+oqgSe1KbiVRgNgfQUAdJ9gt3AKjnsfb0rBlV4pGRhjB4JqBLqdDkkkfXH8q1I78H/WEbf8AaXJoAhtp8cS8rWjm3kQ+WuD1LdOf1pqTWbj5Vy3Q/LtqNwgOYvlPsf6UAXIRujygGT1JPT/P51LDZ5OWOM9u9ZaTPH2B+oxT/tTS4BZQPUHp+VAF2Wz8t9w+ZDwc8Vnzq8RKoSB6Voy6lEoEatuwOT61QMu45bp270AUG3MeeuetPWNVOXzxWhsjce9VZIvKORyKAHveSkjJ7YxjgioOxPTPQClPIzTGBoAYAV4/UU4R/LuNWo7crgsOfQ96bOobn04wKAKbH0qeGPzBjoT0qEjHFPiYrwelAF60tsSYfhxgg1shDKDHLyD3rNguw2BN06BuhH41swbQgwcj1oA5250mSNiU5XqOO1W7ewYptkAP0PIrZLrTCSehoAwpLPyW5GR29aqzLjkVozSyPIccKOAD/Oq8h5JoAzwx7Vet3J+8SfbrVCQ4bir1mNwLEHA70AXWt1VCwIyfzrHc88VrGMkll5HoD2NZskeDkCgCLJ7UucfepOenelC54IFACHLdDURiYVbS2cjIH4042pThutAFVH4wf50jYPT9asfZ6BDmgCEIfSpI4gTyc+wpxTFSKw6EcfrQBL5se3EaHd7/AM6rukgORwfTH+FXoZYeA4IPr2q3sBGIjn60AZCSyJ/9ercOoeX/AAD/AICSP/rVbe0IHzAfhVKS1HUUAWfPt7g5fKt/n0pZbWCX7vJ9sis//Vfw1Pb3aqeY8/SgCSOzVB/F9On86pzWpLHH6Vfk1DH8B9s1UkvXk6igCosLIc8j3q35rbcP+BqETueCePep/lx/OgDNuFHWs6TrWncAdqzJOtAH/9Xjx1qzGqk8nFVweasRmgC4ojHQnNXIbplXZnj0IqgoFTKKAL8MMUh+dgP0rQaOMIArZwc5z3rD59aXJ9aANd3I4OMHqf8ACpJUScAA9OhrEV2U5Bqyl6w+8AfegB8ltIrHGD7ZqF1kX+Airiakqj7nP1o/tMdl/WgCiJHB5B/KrUd0CMMtK18WGAox9KEuY/41BP0oAcWVhlaryOalNxGDlQf5VBLLuOQCKAIX/eDk1CYVHSrHHUcUgYelAFcKB1FBjU84q1jPQVGRigCHaD2phiHtUxGelJzQBH5Q7inHAGBSkNUXlGgBMilyuP8ACnBCOlG2gAXPQVNGD3NRDIpykjpQBaQY6tge9K7KMc5FVg1KSM8UALIjHoePao0yrAnkd6cxqMUAaMrk8Z/H2qoxalU8ZHUetTbBIM9DQBAq+tOGRzUqx7T1OKJSD14HvQAsbgdQPpVxL8RjaFH4VlvISMDp9KkiXPUUAaBvGb7vH0pRKx6moUUCpNuaAHnnrUTxg1JsxzmhNuctQBmS2zZ4q/CGjh2kY44NTZQNnNWEmxx8p/SgCvAcocjDetRXMQ6+vPFaIkU8GMfmKYyxP95ce4NAGMqHPIqyq7hgqPqOtafkWzdWYfhSeRbgZEpA/wB00AVEhI5Awac8W4Zk/MetXQ9sOBKP1pp8k9JlP40AZ5tm5GM+9VfJ2vjp9K05LhVGFdWqizNI2cUAV3jy3tTtgqUg96TaRQBFtq5AhxnOPbPNRbaRjgdjQBpxlyME0NEe1ZIlIPHFBmfruOaALksTHpzVNllzgUhuZf7xpFunHXBoAnVmXhwDTXEZ6AihLtByy/1pHuEY5HH1FAFchW6GjYAM7hSOd3QiqsoYUANuHX1rOYgnippM1XPWgD//1uPHWrEZqADmrMa0AWY2NTKxqOND/kVYERoAbuPtQWPpUnlGjyjQAxXx2FSfaWHYU3y2o8tqAFM5b7wz+FJ5uew/AUeW1L5TUAJ5p7Unmt707yjR5RoAYWJ5NL5jDpTvKNKIjQBFuY0pYnrUvkn1H60eV7/zoAh60lWPJH+QaBAPX9DQBBS1Y8hfX9DQIU9T+RoArEU3bV3yU9/ypwjjHUfoaAKGwilCn0rRAiHr+RqZZ414CfpQBlCJj2pPKb0rVMynsfyppkUjAB/KgDKIxTa0mVeyj8qZ5Q9KAKIAowK0BGPQUmwe35UAUgAOhqZX7frUvlD2o8laAEV/cGnbUblhz7Uxov7tM2yelAErRRt0OPwpi25z8rUgEnp+tJ+8/u0ATKzL3qQSt6/pVbL/AN39acN/ofzoAmNwR1H6Go2nbtj9aT5vQ0ZagBvnSe1J5jt1xT8Me36UbT6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q=="},486:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st ;\r\n vec2 center = vec2(0.5);\r\n float time = fract(czm_frameNumber * speed / 1000.0);\r\n float r = 0.5 + sin(time) / 3.0;\r\n float dis = distance(st, center);\r\n float a = 0.0;\r\n if(dis < r) {\r\n a = 1.0 - smoothstep(0.0, r, dis);\r\n }\r\n material.alpha = pow(a,10.0) ;\r\n material.diffuse = color.rgb * a * 3.0;\r\n return material;\r\n}\r\n"},671:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\n\r\nfloat circle(vec2 uv, float r, float blur) {\r\n float d = length(uv) * 2.0;\r\n float c = smoothstep(r+blur, r, d);\r\n return c;\r\n}\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st - .5;\r\n material.diffuse = color.rgb;\r\n material.emission = vec3(0);\r\n float t =fract(czm_frameNumber * speed / 1000.0);\r\n float s = 0.3;\r\n float radius1 = smoothstep(.0, s, t) * 0.5;\r\n float alpha1 = circle(st, radius1, 0.01) * circle(st, radius1, -0.01);\r\n float alpha2 = circle(st, radius1, 0.01 - radius1) * circle(st, radius1, 0.01);\r\n float radius2 = 0.5 + smoothstep(s, 1.0, t) * 0.5;\r\n float alpha3 = circle(st, radius1, radius2 + 0.01 - radius1) * circle(st, radius1, -0.01);\r\n material.alpha = smoothstep(1.0, s, t) * (alpha1 + alpha2*0.1 + alpha3*0.1);\r\n material.alpha *= color.a;\r\n return material;\r\n}\r\n"},724:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n vec4 colorImage = texture(image, vec2(fract(st.t*rep - speed*czm_frameNumber*0.005), st.t*rep));\r\n vec4 fragColor;\r\n fragColor.rgb = color.rgb / brightness;\r\n fragColor = czm_gammaCorrect(fragColor);\r\n material.alpha = colorImage.a * color.a;\r\n material.diffuse = color.rgb; \r\n material.emission = fragColor.rgb;\r\n return material;\r\n}\r\n "},719:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput); \r\n vec2 st = materialInput.st; \r\n vec4 gradientColor = texture(image,st); \r\n gradientColor = czm_gammaCorrect(gradientColor); \r\n material.diffuse = gradientColor.rgb / brightness;\r\n material.alpha = color.a;\r\n material.shininess = 1.5;\r\n return material;\r\n}\r\n"},433:e=>{e.exports="vec4 getVec4ColorSpaceByImage(sampler2D image,vec2 coords){\r\n return texture(image,vec2(coords.s,coords.t));\r\n}\r\nfloat getRandomNumber(float begin,float rate,float speed){\r\n return begin+abs(rate*sin(czm_frameNumber/speed));\r\n}\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 coords = materialInput.st;\r\n float time = czm_frameNumber;\r\n vec4 colorImageAlpha = getVec4ColorSpaceByImage(image,vec2(copy.x*coords.s,1.0 - 7.5*fract(copy.y*coords.t *1.0 - fract(czm_frameNumber/speed))));\r\n material.diffuse = color.rgb;\r\n material.alpha = color.r*6.0 + colorImageAlpha.r;\r\n material.emission = color.rgb;\r\n return material;\r\n}"},253:e=>{e.exports="uniform vec4 color1;\r\nuniform vec4 color2;\r\nuniform float whiteLength;\r\nuniform float greenLength;\r\nuniform float lineWidth;\r\nuniform float speed;\r\nuniform float direction;\r\nuniform float arrowLengthRatio;\r\nuniform float arrowWidthRatio;\r\nin float v_polylineAngle;\r\n\r\nmat2 rotate(float rad) {\r\n float c = cos(rad);\r\n float s = sin(rad);\r\n return mat2(c, s, -s, c);\r\n}\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n\r\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\r\n float totalLength = whiteLength + greenLength;\r\n float phase = fract(czm_frameNumber * speed / 1000.0);\r\n float pixelPos = fract(pos.x / (totalLength * czm_pixelRatio) - direction * phase);\r\n float ratio = whiteLength / totalLength;\r\n\r\n float perpendicular = materialInput.st.t * 2.0 - 1.0;\r\n\r\n vec4 finalColor = color2;\r\n\r\n if (pixelPos < ratio) {\r\n float normalizedPos = pixelPos / ratio;\r\n float arrowStart = 1.0 - arrowLengthRatio;\r\n\r\n if (normalizedPos >= arrowStart) {\r\n float arrowNormalizedPos = (normalizedPos - arrowStart) / arrowLengthRatio;\r\n\r\n float edgePos = arrowWidthRatio * arrowNormalizedPos;\r\n float leftLineCenter = -edgePos;\r\n float rightLineCenter = edgePos;\r\n\r\n float distToLeftLine = abs(perpendicular - leftLineCenter);\r\n float distToRightLine = abs(perpendicular - rightLineCenter);\r\n\r\n float halfWidth = lineWidth * (1.0 - arrowNormalizedPos * 0.5);\r\n\r\n if (distToLeftLine < halfWidth || distToRightLine < halfWidth) {\r\n finalColor = color1;\r\n }\r\n }\r\n }\r\n\r\n material.emission = finalColor.rgb;\r\n material.alpha = finalColor.a;\r\n return material;\r\n}"},454:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n float time = fract( czm_frameNumber * speed / 1000.0);\r\n vec2 st = materialInput.st;\r\n float scalar = smoothstep(0.0,1.0,time);\r\n material.diffuse = color.rgb * scalar;\r\n material.alpha = color.a * scalar ;\r\n return material;\r\n}\r\n"},162:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\nuniform float percent;\r\nuniform float gradient;\r\n\r\n\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n float t =fract((czm_frameNumber) * speed / 1000.0);\r\n t *= (1.0 + percent);\r\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\r\n alpha += gradient;\r\n material.diffuse = color.rgb;\r\n material.alpha = alpha;\r\n return material;\r\n}\r\n"},885:e=>{e.exports="\r\nuniform vec4 color;\r\nuniform float glowPower;\r\nuniform float taperPower;\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n\r\n vec2 st = materialInput.st;\r\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\r\n\r\n if (taperPower <= 0.99999) {\r\n glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\r\n }\r\n\r\n vec4 fragColor;\r\n fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\r\n fragColor.a = clamp(0.0, 1.0, glow) * color.a;\r\n fragColor = czm_gammaCorrect(fragColor);\r\n\r\n material.emission = fragColor.rgb;\r\n material.alpha = fragColor.a;\r\n\r\n return material;\r\n}"},450:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\nczm_material material = czm_getDefaultMaterial(materialInput);\r\nvec2 st = materialInput.st;\r\nvec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\r\nmaterial.alpha = colorImage.a;\r\nmaterial.diffuse = colorImage.rgb * 1.5 ;\r\nreturn material;\r\n}"},529:e=>{e.exports="uniform sampler2D image;\r\nuniform float speed;\r\nuniform vec4 color;\r\nuniform vec2 repeat;\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = repeat * materialInput.st;\r\n float time = fract(czm_frameNumber * speed / 1000.0);\r\n vec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\r\n if(color.a == 0.0){\r\n if(colorImage.rgb == vec3(1.0) || colorImage.rgb == vec3(0.0)){\r\n discard;\r\n }\r\n material.alpha = colorImage.a;\r\n material.diffuse = colorImage.rgb;\r\n }else{\r\n material.alpha = colorImage.a * color.a;\r\n material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);\r\n }\r\n return material;\r\n}\r\n"},139:e=>{e.exports="uniform sampler2D image;\r\nuniform vec4 color;\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n vec4 colorImage = texture(image,st);\r\n vec3 fragColor = color.rgb;\r\n material.alpha = colorImage.a * color.a * 3.;\r\n material.diffuse = max(fragColor.rgb + colorImage.rgb , fragColor.rgb);\r\n return material;\r\n}\r\n\r\n"},852:e=>{e.exports="uniform sampler2D image;\r\nuniform vec4 color;\r\nuniform float speed;\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material=czm_getDefaultMaterial(materialInput);\r\n vec2 st=materialInput.st;\r\n float time=fract(czm_frameNumber*speed/1000.);\r\n vec4 colorImage=texture(image,st);\r\n vec3 fragColor=color.rgb;\r\n if(st.t>.36&&st.t<.64){\r\n fragColor=vec3(1.0);\r\n }\r\n if(color.a==0.){\r\n material.alpha=colorImage.a*2.*fract(st.s-time);\r\n material.diffuse=colorImage.rgb;\r\n }else{\r\n material.alpha = colorImage.a * color.a * 2.0 * smoothstep(.6,1., fract(st.s - time));\r\n // material.alpha=mix(color.a,colorImage.a,.3)*2.*smoothstep(.3,1.,fract(st.s-time));\r\n material.diffuse=max(fragColor.rgb*material.alpha,fragColor.rgb);\r\n }\r\n return material;\r\n}\r\n"},601:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n float time = fract(czm_frameNumber * speed / 1000.0);\r\n material.diffuse = color.rgb;\r\n material.alpha = color.a * fract(st.s-time);\r\n return material;\r\n}"},750:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\nuniform float percent;\r\nuniform float gradient; \r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n float t =fract(czm_frameNumber * speed / 1000.0);\r\n t *= (1.0 + percent);\r\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\r\n alpha += gradient;\r\n material.diffuse = color.rgb;\r\n material.alpha = alpha;\r\n return material;\r\n}"},586:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput) {\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n material.diffuse = 1.5 * color.rgb;\r\n vec2 st = materialInput.st;\r\n vec3 str = materialInput.str;\r\n float dis = distance(st, vec2(0.5, 0.5));\r\n float per = fract(time);\r\n if (abs(str.z) > 0.001) {\r\n discard;\r\n }\r\n if (dis > 0.5) {\r\n discard;\r\n } else {\r\n float perDis = 0.5 / count;\r\n float disNum;\r\n float bl = .0;\r\n for (int i = 0; i <= 9; i++) {\r\n if (float(i) <= count) {\r\n disNum = perDis *float(i) - dis + per / count;\r\n if (disNum > 0.0) {\r\n if (disNum < perDis) {\r\n bl = 1.0 - disNum / perDis;\r\n } else if(disNum - perDis < perDis) {\r\n bl = 1.0 - abs(1.0 - disNum / perDis);\r\n }\r\n material.alpha = pow(bl, gradient);\r\n }\r\n }\r\n }\r\n }\r\n return material;\r\n}"},797:e=>{e.exports="in vec2 v_textureCoordinates;\r\nuniform sampler2D colorTexture;\r\nuniform sampler2D depthTexture;\r\nuniform vec4 fogByDistance;\r\nuniform vec4 fogColor;\r\n\r\n\r\nfloat getDistance(sampler2D depthTexture, vec2 texCoords){\r\n float depth = czm_unpackDepth(texture(depthTexture, texCoords));\r\n if (depth == 0.0) {\r\n return czm_infinity;\r\n }\r\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\r\n return -eyeCoordinate.z / eyeCoordinate.w;\r\n}\r\n\r\n\r\nfloat interpolateByDistance(vec4 nearFarScalar, float distance){\r\n float startDistance = nearFarScalar.x;\r\n float startValue = nearFarScalar.y;\r\n float endDistance = nearFarScalar.z;\r\n float endValue = nearFarScalar.w;\r\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\r\n return mix(startValue, endValue, t);\r\n}\r\n\r\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor){\r\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\r\n}\r\n\r\nvoid main(void){\r\n float distance = getDistance(depthTexture, v_textureCoordinates);\r\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\r\n float blendAmount = interpolateByDistance(fogByDistance, distance);\r\n vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);\r\n out_FragColor = alphaBlend(finalFogColor, sceneColor);\r\n}\r\n"},802:e=>{e.exports="in vec2 v_textureCoordinates;\r\nuniform sampler2D colorTexture;\r\nuniform float speed;\r\nuniform float mixNum;\r\n\r\nfloat hash(float x){\r\n return fract(sin(x*23.3)*13.13);\r\n}\r\n\r\nvoid main(){\r\n float time = czm_frameNumber * speed / 1000.0;\r\n vec2 resolution = czm_viewport.zw;\r\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\r\n vec3 c=vec3(.1,.2,.3);\r\n float a=-.3;\r\n float si=sin(a),co=cos(a);\r\n uv*=mat2(co,-si,si,co);\r\n uv*=length(uv+vec2(0.,4.9))*.3+1.;\r\n float v=1.-sin(hash(floor(uv.x*100.))*2.);\r\n float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*10.;\r\n c*=v*b;\r\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c,1), mixNum);\r\n}\r\n"},87:e=>{e.exports="in vec2 v_textureCoordinates;\r\nuniform sampler2D colorTexture;\r\nuniform float speed;\r\n\r\nfloat snow(vec2 uv,float scale){\r\n float time = czm_frameNumber * speed / 1000.0 ;\r\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));\r\n if(w<.1)return 0.;\r\n uv+=time/scale;\r\n uv.y+=time*2./scale;\r\n uv.x+=sin(uv.y+time*.5)/scale;\r\n uv*=scale;\r\n vec2 s=floor(uv),f=fract(uv),p;\r\n float k=3.,d;\r\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7.,3.,6.,5.))*5.))-f;\r\n d=length(p);\r\n k=min(d,k);\r\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\r\n return k*w;\r\n}\r\n\r\nvoid main(){\r\n vec2 resolution = czm_viewport.zw;\r\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\r\n vec3 finalColor=vec3(0.);\r\n float c = 0.0;\r\n c+=snow(uv,10.);\r\n c+=snow(uv,8.);\r\n c+=snow(uv,6.);\r\n c+=snow(uv,5.);\r\n finalColor=(vec3(c));\r\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.3);\r\n}\r\n"},545:e=>{e.exports=n,e.exports.parse=n,e.exports.stringify=function e(t){"Feature"===t.type&&(t=t.geometry);function i(e){return e.join(" ")}function n(e){return e.map(i).join(", ")}function r(e){return e.map(n).map(o).join(", ")}function o(e){return"("+e+")"}switch(t.type){case"Point":return"POINT ("+i(t.coordinates)+")";case"LineString":return"LINESTRING ("+n(t.coordinates)+")";case"Polygon":return"POLYGON ("+r(t.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+n(t.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+(t.coordinates.map(r).map(o).join(", ")+")");case"MultiLineString":return"MULTILINESTRING ("+r(t.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+t.geometries.map(e).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}};var t=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,i=new RegExp("^"+t.source+"(\\s"+t.source+"){1,}");function n(e){var t,n=e.split(";"),r=n.pop(),o=(n.shift()||"").split("=").pop(),s=0;function a(e){var t=r.substring(s).match(e);return t?(s+=t[0].length,t[0]):null}function l(){a(/^\s*/)}function u(){l();for(var e,t=0,n=[],r=[n],o=n;e=a(/^(\()/)||a(/^(\))/)||a(/^(,)/)||a(i);){if("("===e)r.push(o),o=[],r[r.length-1].push(o),t++;else if(")"===e){if(0===o.length)return null;if(!(o=r.pop()))return null;if(0===--t)break}else if(","===e)o=[],r[r.length-1].push(o);else{if(e.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(o,e.split(/\s/g).map(parseFloat))}l()}return 0!==t?null:n}function c(){for(var e,t,n=[];t=a(i)||a(/^(,)/);)","===t?(n.push(e),e=[]):t.split(/\s/g).some(isNaN)||(e||(e=[]),Array.prototype.push.apply(e,t.split(/\s/g).map(parseFloat))),l();return e?(n.push(e),n.length?n:null):null}function h(){return function(){if(!a(/^(point(\sz)?)/i))return null;if(l(),!a(/^(\()/))return null;var e=c();return e?(l(),a(/^(\))/)?{type:"Point",coordinates:e[0]}:null):null}()||function(){if(!a(/^(linestring(\sz)?)/i))return null;if(l(),!a(/^(\()/))return null;var e=c();return e&&a(/^(\))/)?{type:"LineString",coordinates:e}:null}()||function(){if(!a(/^(polygon(\sz)?)/i))return null;l();var e=u();return e?{type:"Polygon",coordinates:e}:null}()||function(){if(!a(/^(multipoint)/i))return null;l();var e=r.substring(r.indexOf("(")+1,r.length-1).replace(/\(/g,"").replace(/\)/g,"");r="MULTIPOINT ("+e+")";var t=u();return t?(l(),{type:"MultiPoint",coordinates:t}):null}()||function(){if(!a(/^(multilinestring)/i))return null;l();var e=u();return e?(l(),{type:"MultiLineString",coordinates:e}):null}()||function(){if(!a(/^(multipolygon)/i))return null;l();var e=u();return e?{type:"MultiPolygon",coordinates:e}:null}()||function(){var e,t=[];if(!a(/^(geometrycollection)/i))return null;if(l(),!a(/^(\()/))return null;for(;e=h();)t.push(e),l(),a(/^(,)/),l();return a(/^(\))/)?{type:"GeometryCollection",geometries:t}:null}()}return(t=h())&&o.match(/\d+/)&&(t.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+o}}),t}},929:e=>{"use strict";e.exports=Cesium},61:(e,t,i)=>{var n=i(698).default;function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=r=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(e,t,i){e[t]=i.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,i){return e[t]=i}}function f(e,t,i,n){var r=t&&t.prototype instanceof d?t:d,o=Object.create(r.prototype),a=new T(n||[]);return s(o,"_invoke",{value:O(e,i,a)}),o}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m={};function d(){}function v(){}function y(){}var g={};h(g,l,(function(){return this}));var _=Object.getPrototypeOf,C=_&&_(_(k([])));C&&C!==i&&o.call(C,l)&&(g=C);var b=y.prototype=d.prototype=Object.create(g);function w(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function i(r,s,a,l){var u=p(e[r],e,s);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==n(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,l)}))}l(u.arg)}var r;s(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,r){i(e,n,t,r)}))}return r=r?r.then(o,o):o()}})}function O(e,t,i){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return M()}for(i.method=r,i.arg=o;;){var s=i.delegate;if(s){var a=x(s,i);if(a){if(a===m)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=p(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===m)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}function x(e,t){var i=t.method,n=e.iterator[i];if(void 0===n)return t.delegate=null,"throw"===i&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==i&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+i+"' method")),m;var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,m;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,m):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function k(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function t(){for(;++i<e.length;)if(o.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:M}}function M(){return{value:void 0,done:!0}}return v.prototype=y,s(b,"constructor",{value:y,configurable:!0}),s(y,"constructor",{value:v,configurable:!0}),v.displayName=h(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,h(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(P.prototype),h(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,i,n,r,o){void 0===o&&(o=Promise);var s=new P(f(e,i,n,r),o);return t.isGeneratorFunction(i)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},w(b),h(b,c,"Generator"),h(b,l,(function(){return this})),h(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),i=[];for(var n in t)i.push(n);return i.reverse(),function e(){for(;i.length;){var n=i.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=k,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,n){return s.type="throw",s.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],s=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var a=o.call(r,"catchLoc"),l=o.call(r,"finallyLoc");if(a&&l){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=e,s.arg=t,r?(this.method="next",this.next=r.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),A(i),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;A(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:k(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),m}},t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(i){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,i)=>{var n=i(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";i.d(n,{default:()=>e});const e=i(506).Z})(),n=n.default})()));
18012
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ANOVGIS=t():e.ANOVGIS=t()}(this,(()=>(()=>{var e={647:(e,t,i)=>{"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===r(t)?t:String(t)}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function a(e,t,i){return t&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}i.r(t),i.d(t,{AroundPoint:()=>mp,Billboard:()=>Ii,BillboardPrimitive:()=>bt,BounceBillboardPrimitive:()=>Et,BounceLabelPrimitive:()=>It,Box:()=>Bi,CesiumHeatMap:()=>gc,CesiumView:()=>fr,CesiumWaterAnalysis:()=>Xu,Cesium_PART:()=>Lo,Circle:()=>Fi,CircleBlurMaterial:()=>xl(),CircleBlurMaterialProperty:()=>cu,CircleScanMaterial:()=>Al(),CircleScanMaterialProperty:()=>pu,CircleWaveMaterialProperty:()=>bu,CloudPrimitive:()=>Bt,ClusterLayer:()=>ns,CoordUtil:()=>Po,CopyRight:()=>Dr,Corridor:()=>qi,Cylinder:()=>Ki,CzmlLayer:()=>ss,DamWaterRelease:()=>Nf,DaoHangLineMaterial:()=>dl(),DaoHangLineMaterialProperty:()=>au,DiffuseWallPrimitive:()=>Ft,DivIcon:()=>ht,DomUtil:()=>ve,DrawBase:()=>Nu,DrawCircle:()=>Qu,DrawPoint:()=>Fu,DrawPolyLine:()=>qu,DrawPolygon:()=>Uu,DrawRectangle:()=>Yu,DynamicLayer:()=>us,EarthGlow:()=>Op,Effect:()=>kp,ElecEllipsoidPrimitive:()=>Vt,Ellipse:()=>Ji,Ellipsoid:()=>tn,Event:()=>ue,FeatureGridLayer:()=>ds,FeatureInfoUtil:()=>wo,FlowLinePrimitive:()=>Yt,FlyEventType:()=>ae,FlyManager:()=>hp,FrameSate:()=>Do,GeoJsonLayer:()=>Fo,GeocoderFactory:()=>Lr,GeocoderType:()=>Ir,GlobeRotate:()=>sp,GpxLayer:()=>gs,Graphic:()=>Ze,GraphicEvent:()=>ir,GraphicEventType:()=>te,GraphicType:()=>Ae,GroundPrimitiveLayer:()=>bs,GroundSkyBox:()=>co,HeatMapLayer:()=>mc,HtmlLayer:()=>Ts,ImageryLayerFactory:()=>Vo,ImageryThemeGL:()=>Mo,ImageryType:()=>l,KeyboardRoaming:()=>dp,KmlLayer:()=>Ss,Label:()=>an,LabelLayer:()=>Ls,LabelPrimitive:()=>Tt,LayerControlUitl:()=>So,LayerEvent:()=>er,LayerEventType:()=>ne,LayerGroupEvent:()=>Jn,LayerGroupEventType:()=>ie,LightCylinderPrimitive:()=>$t,LocateUtil:()=>po,MapInfo:()=>xo,Model:()=>dt,ModelPrimitive:()=>ri,MouseEvent:()=>qn,MouseEventType:()=>J,MultiKeyTdtImageryProvider:()=>Yo,NoDepthTestPolylineCollection:()=>Su,ODLinePrimitive:()=>gi,Parse:()=>Be,PathEvent:()=>sr,PathEventType:()=>oe,Plane:()=>cn,PlotEvent:()=>lr,PlotEventType:()=>se,PoiSearch:()=>Eo,Point:()=>dn,PointPrimitive:()=>li,Polygon:()=>_n,Polyline:()=>Pn,PolylineFlickerMaterial:()=>pl(),PolylineFlickerMaterialProperty:()=>iu,PolylineFlowMaterialProperty:()=>Ql,PolylineGlowMaterial:()=>tl(),PolylineGlowMaterialProperty:()=>Ul,PolylineGradientMaterial:()=>ol(),PolylineGradientMaterialProperty:()=>Zl,PolylineImageTrailMaterial:()=>$a(),PolylineImageTrailMaterialProperty:()=>Bl,PolylineLightingMaterial:()=>nl(),PolylineLightingMaterialProperty:()=>Nl,PolylineLightingTrailMaterial:()=>Xa(),PolylineLightingTrailMaterialProperty:()=>Rl,PolylinePrimitive:()=>hi,PolylineTrailMaterialProperty:()=>Il,PolylineVFlywireMaterial:()=>ul(),PolylineVFlywireMaterialPoperty:()=>$l,PolylineVolume:()=>An,Position:()=>Ie,PositonEditor:()=>Vh,PrimitiveLayer:()=>Gs,Rect:()=>Sn,RoamingController:()=>vp,RoamingPath:()=>yp,SATELLITE_CLASSES:()=>Aa,SatelliteLayer:()=>Ka,ScanCirclePrimitive:()=>bi,SceneEvent:()=>Qn,SceneEventType:()=>ee,ShapeUtil:()=>bo,SplitImageLayer:()=>Ko,State:()=>ke,TerrainClipping:()=>kc,TerrainFactory:()=>Xo,TerrainType:()=>Qo,ThreeCoordTransform:()=>g,ThreeLayer:()=>Rp,ThreejsTransform:()=>Gn,TiandituGeocoder:()=>kr,TiandituGeocoderService:()=>Cr,TiandituGeocoderService_shanxi:()=>wr,TiandituGeocoder_shanxi:()=>jr,Tileset:()=>gt,TilesetEditor:()=>Lf,TilesetLayer:()=>zs,TopoJsonLayer:()=>Us,TrackEvent:()=>rr,TrackEventType:()=>re,TrailLinePrimitive:()=>Oi,Transform:()=>Ne,TranslateLocal:()=>jo,Util:()=>de,VectorLayer:()=>Ho,VideoPrimitive:()=>Ai,Viewer:()=>zr,ViewerEvent:()=>Yn,ViewerEventType:()=>$,Wall:()=>Dn,WallFlowMaterialProperty:()=>Ou,WallGradientMaterialProperty:()=>gu,WallImgMaterialProperty:()=>Au,WallLineFlowMaterialProperty:()=>Mu,WaterMaterialProperty:()=>du,WaterPrimitive:()=>Mi,Weather:()=>$f,WidgetEventType:()=>le,WidgetsControl:()=>Io,WindLayer:()=>Bc,WktUtil:()=>Co,area:()=>Ke,bounds:()=>Qe,center:()=>Xe,cesiumMeasureUtil:()=>Ee,commonUtil:()=>at,createInstance:()=>Bp,curve:()=>Je,distance:()=>et,distanceSquared:()=>tt,heading:()=>it,isBetween:()=>nt,midCartesian:()=>rt,midPosition:()=>ot,parabola:()=>st,satelliteClassColor:()=>ja,satelliteClassLabel:()=>Ia,satelliteClassLegend:()=>Da,satelliteClassOf:()=>Sa,tallySatelliteClasses:()=>La});const l={ARCGIS:"arcgis",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms",AMAP:"amap",BAIDU:"baidu",TDT:"tdt",TENCENT:"tencent",Google:"google"};function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var m=52.35987755982988,d=3.141592653589793,v=6378245,y=.006693421622965943;const g=function(){function e(){n(this,e)}return a(e,null,[{key:"BD09ToGCJ02",value:function(e,t){var i=+e-.0065,n=+t-.006,r=Math.sqrt(i*i+n*n)-2e-5*Math.sin(n*m),o=Math.atan2(n,i)-3e-6*Math.cos(i*m);return[r*Math.cos(o),r*Math.sin(o)]}},{key:"GCJ02ToBD09",value:function(e,t){t=+t,e=+e;var i=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*m),n=Math.atan2(t,e)+3e-6*Math.cos(e*m);return[i*Math.cos(n)+.0065,i*Math.sin(n)+.006]}},{key:"WGS84ToGCJ02",value:function(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];var i=this.delta(e,t);return[e+i[0],t+i[1]]}},{key:"GCJ02ToWGS84",value:function(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];var i=this.delta(e,t);return[2*e-(e+i[0]),2*t-(t+i[1])]}},{key:"delta",value:function(e,t){var i=this.transformLng(e-105,t-35),n=this.transformLat(e-105,t-35),r=t/180*d,o=Math.sin(r);o=1-y*o*o;var s=Math.sqrt(o);return[i=180*i/(v/s*Math.cos(r)*d),n=180*n/(v*(1-y)/(o*s)*d)]}},{key:"transformLng",value:function(e,t){var i=300+(e=+e)+2*(t=+t)+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return i+=2*(20*Math.sin(6*e*d)+20*Math.sin(2*e*d))/3,i+=2*(20*Math.sin(e*d)+40*Math.sin(e/3*d))/3,i+=2*(150*Math.sin(e/12*d)+300*Math.sin(e/30*d))/3}},{key:"transformLat",value:function(e,t){var i=2*(e=+e)-100+3*(t=+t)+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return i+=2*(20*Math.sin(6*e*d)+20*Math.sin(2*e*d))/3,i+=2*(20*Math.sin(t*d)+40*Math.sin(t/3*d))/3,i+=2*(160*Math.sin(t/12*d)+320*Math.sin(t*d/30))/3}},{key:"out_of_china",value:function(e,t){return t=+t,!((e=+e)>73.66&&e<135.05&&t>3.86&&t<53.55)}}]),e}();function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const C=function(e){c(i,Cesium.WebMercatorTilingScheme);var t=_(i);function i(e){var r;n(this,i),r=t.call(this,e);var o=new Cesium.WebMercatorProjection;return r._projection.project=function(e,t){return t=g.WGS84ToGCJ02(Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude)),t=o.project(new Cesium.Cartographic(Cesium.Math.toRadians(t[0]),Cesium.Math.toRadians(t[1]))),new Cesium.Cartesian2(t.x,t.y)},r._projection.unproject=function(e,t){var i=o.unproject(e);return t=g.GCJ02ToWGS84(Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude)),new Cesium.Cartographic(Cesium.Math.toRadians(t[0]),Cesium.Math.toRadians(t[1]))},r}return a(i)}();function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const w=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=b(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),e.url="img"===e.style?"https://webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}":"cva"===e.style?"https://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=2&style=8&x={x}&y={y}&z={z}":"https://webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",e.subdomains=e.subdomains||["01","02","03","04"],"WGS84"===e.crs&&(e.tilingScheme=new C),t.call(this,e)}return a(i)}();var P=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],O=[75,60,45,30,15,0],x=[[1.410526172116255e-8,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,17337981.2],[-7.435856389565537e-9,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,6856817.37],[-1.981981304930552e-8,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,4482777.06],[3.09191371068437e-9,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,2555164.4],[2.890871144776878e-9,8983055095805407e-21,-3.068298e-8,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],E=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],A=function(){function e(){n(this,e),this.isWgs84=!1}return a(e,[{key:"getDistanceByMC",value:function(e,t){if(!e||!t)return 0;if(!(e=this.convertMC2LL(e)))return 0;var i=this.toRadians(e.lng),n=this.toRadians(e.lat);if(!(t=this.convertMC2LL(t)))return 0;var r=this.toRadians(t.lng),o=this.toRadians(t.lat);return this.getDistance(i,r,n,o)}},{key:"getDistanceByLL",value:function(e,t){if(!e||!t)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74);var i=this.toRadians(e.lng),n=this.toRadians(e.lat),r=this.toRadians(t.lng),o=this.toRadians(t.lat);return this.getDistance(i,r,n,o)}},{key:"convertMC2LL",value:function(e){if(!e)return{lng:0,lat:0};var t={};if(this.isWgs84){t.lng=e.lng/20037508.34*180;var i=e.lat/20037508.34*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(i*Math.PI/180))-Math.PI/2),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}Math.abs(e.lng);for(var n=Math.abs(e.lat),r=void 0,o=0;o<P.length;o++)if(n>=P[o]){r=x[o];break}return{lng:(t=this.convertor(e,r)).lng.toFixed(6),lat:t.lat.toFixed(6)}}},{key:"convertLL2MC",value:function(e){if(!e)return{lng:0,lat:0};if(e.lng>180||e.lng<-180||e.lat>90||e.lat<-90)return e;if(this.isWgs84){var t={},i=6378137;t.lng=e.lng*Math.PI/180*i;var n=e.lat*Math.PI/180;return t.lat=3189068.5*Math.log((1+Math.sin(n))/(1-Math.sin(n))),{lng:parseFloat(t.lng.toFixed(2)),lat:parseFloat(t.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);e.lng;for(var r=e.lat,o=void 0,s=0;s<O.length;s++)if(r>=O[s]){o=E[s];break}if(!o)for(var a=0;a<O.length;a++)if(r<=-O[a]){o=E[a];break}var l=this.convertor(e,o);return{lng:parseFloat(l.lng.toFixed(2)),lat:parseFloat(l.lat.toFixed(2))}}},{key:"convertor",value:function(e,t){if(!e||!t)return{lng:0,lat:0};var i=t[0]+t[1]*Math.abs(e.lng),n=Math.abs(e.lat)/t[9],r=t[2]+t[3]*n+t[4]*n*n+t[5]*n*n*n+t[6]*n*n*n*n+t[7]*n*n*n*n*n+t[8]*n*n*n*n*n*n;return{lng:i*=e.lng<0?-1:1,lat:r*=e.lat<0?-1:1}}},{key:"getDistance",value:function(e,t,i,n){return 6370996.81*Math.acos(Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos(t-e))}},{key:"toRadians",value:function(e){return Math.PI*e/180}},{key:"toDegrees",value:function(e){return 180*e/Math.PI}},{key:"getRange",value:function(e,t,i){return null!=t&&(e=Math.max(e,t)),null!=i&&(e=Math.min(e,i)),e}},{key:"getLoop",value:function(e,t,i){for(;e>i;)e-=i-t;for(;e<t;)e+=i-t;return e}},{key:"lngLatToMercator",value:function(e){return this.convertLL2MC(e)}},{key:"lngLatToPoint",value:function(e){var t=this.convertLL2MC(e);return{x:t.lng,y:t.lat}}},{key:"mercatorToLngLat",value:function(e){return this.convertMC2LL(e)}},{key:"pointToLngLat",value:function(e){var t={lng:e.x,lat:e.y};return this.convertMC2LL(t)}},{key:"pointToPixel",value:function(e,t,i,n){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);var r=this.getZoomUnits(t);return{x:Math.round((e.lng-i.lng)/r+n.width/2),y:Math.round((i.lat-e.lat)/r+n.height/2)}}},{key:"pixelToPoint",value:function(e,t,i,n){if(!e)return{lng:0,lat:0};var r=this.getZoomUnits(t),o={lng:i.lng+r*(e.x-n.width/2),lat:i.lat-r*(e.y-n.height/2)};return this.mercatorToLngLat(o)}},{key:"getZoomUnits",value:function(e){return Math.pow(2,18-e)}}]),e}();const k=A;function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const M=function(e){c(i,Cesium.WebMercatorTilingScheme);var t=T(i);function i(e){var r;n(this,i),r=t.call(this,e);var o=new k;return r._projection.project=function(e,t){return t=t||{},t=g.WGS84ToGCJ02(Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude)),(t=g.GCJ02ToBD09(t[0],t[1]))[0]=Math.min(t[0],180),t[0]=Math.max(t[0],-180),t[1]=Math.min(t[1],74.000022),t[1]=Math.max(t[1],-71.988531),t=o.lngLatToPoint({lng:t[0],lat:t[1]}),new Cesium.Cartesian2(t.x,t.y)},r._projection.unproject=function(e,t){return t=t||{},t=o.mercatorToLngLat({lng:e.x,lat:e.y}),t=g.BD09ToGCJ02(t.lng,t.lat),t=g.GCJ02ToWGS84(t[0],t[1]),new Cesium.Cartographic(Cesium.Math.toRadians(t[0]),Cesium.Math.toRadians(t[1]))},r.resolutions=e.resolutions||[],r}return a(i,[{key:"tileXYToNativeRectangle",value:function(e,t,i,n){var r=this.resolutions[i],o=e*r,s=(e+1)*r,a=(1+(t=-t))*r,l=t*r;return Cesium.defined(n)?(n.west=o,n.south=l,n.east=s,n.north=a,n):new Cesium.Rectangle(o,l,s,a)}},{key:"positionToTileXY",value:function(e,t,i){var n=this._rectangle;if(Cesium.Rectangle.contains(n,e)){var r=this._projection.project(e);if(Cesium.defined(r)){var o=this.resolutions[t],s=Math.floor(r.x/o),a=-Math.floor(r.y/o);return Cesium.defined(i)?(i.x=s,i.y=a,i):new Cesium.Cartesian2(s,a)}}}}]),i}();const R=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this._url="traffic"===t.style?"http://its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2":"https://maponline{s}.bdimg.com/tile/?qt=vtile&x={x}&y={y}&z={z}&styles=pl&scaler=2&udt=&from=jsapi2_0",this._labelStyle=t.labelStyle||"web2D",this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._crs=t.crs||"BD09","WGS84"===t.crs){for(var i=[],r=0;r<19;r++)i[r]=256*Math.pow(2,18-r);this._tilingScheme=new M({resolutions:i,rectangleSouthwestInMeters:new Cesium.Cartesian2(-20037726.37,-12474104.17),rectangleNortheastInMeters:new Cesium.Cartesian2(20037726.37,12474104.17)})}else this._tilingScheme=new Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new Cesium.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new Cesium.Cartesian2(33554054,33746824)});this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0,this._style=t.style||"normal",this._errorEvent=new Cesium.Event}return a(e,[{key:"url",get:function(){return this._url}},{key:"token",get:function(){return this._token}},{key:"tileWidth",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},{key:"tileHeight",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},{key:"maximumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},{key:"minimumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}},{key:"tilingScheme",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},{key:"rectangle",get:function(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},{key:"ready",get:function(){return!!this._url}},{key:"credit",get:function(){return this._credit}},{key:"errorEvent",get:function(){return this._errorEvent}},{key:"tileDiscardPolicy",get:function(){}},{key:"proxy",get:function(){}},{key:"hasAlphaChannel",get:function(){return!0}},{key:"getTileCredits",value:function(e,t,i){}},{key:"requestImage",value:function(e,t,i,n){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");var r=this._tilingScheme.getNumberOfXTilesAtLevel(i),o=this._tilingScheme.getNumberOfYTilesAtLevel(i),s=this._url.replace("{z}",i).replace("{s}",String(1)).replace("{style}",this._style).replace("{labelStyle}",this._labelStyle).replace("{time}",String((new Date).getTime()));return s="WGS84"===this._crs?s.replace("{x}",String(e)).replace("{y}",String(-t)):s.replace("{x}",String(e-r/2)).replace("{y}",String(o/2-t-1)),Cesium.ImageryProvider.loadImage(this,s)}}]),e}();function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const j=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=S(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),console.log(),t.call(this,{url:[e.protocol||"","//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}".replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],tilingScheme:new Cesium.WebMercatorTilingScheme,maximumLevel:18})}return a(i)}();function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const L=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=I(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,i);var r="img"===e.style?"https://p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400":"https://rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347";return e.url=r.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],"img"===e.style&&(e.customTags={sx:function(e,t,i,n){return t>>4},sy:function(e,t,i,n){return(1<<n)-i>>4}}),t.call(this,e)}return a(i)}();function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const B=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=D(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,{url:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs={layer}&x={x}&y={y}&z={z}".replace("{layer}",e.lyrs||"s"),tilingScheme:new Cesium.WebMercatorTilingScheme,maximumLevel:25})}return a(i)}();function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const H=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=G(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),e.url||(e.url="https://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}"),e.crs&&"WGS84"!==e.crs||(e.tilingScheme=new C),t.call(this,e)}return a(i)}();function N(){return N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(arguments.length<3?e:i):r.value}},N.apply(this,arguments)}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const F=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=z(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._minLevel=r.minLevel,e._maxLevel=r.maxLevel,e.tileLoadEvent=new Cesium.Event,e._ready=!0,e}return a(i,[{key:"ready",get:function(){return this._ready}},{key:"requestImage",value:function(e,t,n,r){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");if(this._minLevel&&n<this._minLevel)this.tileLoadEvent.raiseEvent(e,t,n,void 0);else{if(!(this._maxLevel&&n>this._maxLevel)){var o=N(p(i.prototype),"requestImage",this).call(this,e,t,n,r);return this.tileLoadEvent.raiseEvent(e,t,n,o),o}this.tileLoadEvent.raiseEvent(e,t,n,void 0)}}}]),i}();function W(e,t,i,n,r,o,s){try{var a=e[o](s),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}function U(e){return function(){var t=this,i=arguments;return new Promise((function(n,r){var o=e.apply(t,i);function s(e){W(o,n,r,s,a,"next",e)}function a(e){W(o,n,r,s,a,"throw",e)}s(void 0)}))}}var V=i(687),q=i.n(V);function Z(e,t,i){return(t=o(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Y(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function K(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Y(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Q={ADD:"add",REMOVE:"remove"},X={LEFT_DOWN:Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MIDDLE_DOWN:Cesium.ScreenSpaceEventType.MIDDLE_DOWN,MIDDLE_UP:Cesium.ScreenSpaceEventType.MIDDLE_UP,MIDDLE_CLICK:Cesium.ScreenSpaceEventType.MIDDLE_CLICK,MOUSE_MOVE:Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:Cesium.ScreenSpaceEventType.WHEEL,PINCH_START:Cesium.ScreenSpaceEventType.PINCH_START,PINCH_END:Cesium.ScreenSpaceEventType.PINCH_END,PINCH_MOVE:Cesium.ScreenSpaceEventType.PINCH_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},J=K({},X),$=K(K({},X),{},{ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",FLY_COMPLETE:"flyComplete"}),ee={CAMERA_MOVE_END:"cameraMoveEnd",CAMERA_CHANGED:"cameraChanged",PRE_UPDATE:"preUpdate",POST_UPDATE:"postUpdate",PRE_RENDER:"preRender",POST_RENDER:"postRender",MORPH_COMPLETE:"morphComplete",CLOCK_TICK:"clockTick",RENDER_ERROR:"renderError"},te=K(K(K({},Q),X),{},{POSITION_UPDATE:"positionUpdate",BIND_POPUP:"bindPopup"}),ie=Q,ne=K(K({},Q),X),re=K(K({},Q),{},{POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"}),oe=K(K({},Q),{},{POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine",END:"end",STOP_STAY:"stopStay"}),se={DRAW_START:"drawStart",DRAW_STOP:"drawStop",EDIT_START:"editStart",EDIT_STOP:"editEnd",DRAW_ANCHOR:"drawAnchor",CREATE_ANCHOR:"createAnchor",UPDATE_ANCHOR:"updateAnchor",ANCHOR_MOVING:"anchorMoving",EDIT_ANCHOR_STOP:"editAnchorStop",CLEAR_ANCHOR:"clearAnchor"},ae={BEGIN:"flyBegin",END:"flyEnd",STOP_STAY:"stopStay",FLYING:"flying"},le={OPEN:"show",CLOSE:"close"};const ue=function(){function e(t){n(this,e),this._types=t,this._cache={},this._warnedTypes=new Set}return a(e,[{key:"_addEventListener",value:function(e,t,i){var n=this.getEvent(e),r=void 0;return n&&t?r=n.addEventListener(t,i||this):t&&this.warnUnknownType(e),r}},{key:"warnUnknownType",value:function(e){if(!this._warnedTypes.has(e)){this._warnedTypes.add(e);var t=this._types?Object.keys(this._types).join(", "):"";console.warn('[ANOVGIS] 事件类型 "'.concat(e,'" 在当前事件总线上不存在,订阅不会生效。可用类型:').concat(t))}}},{key:"_removeEventListener",value:function(e,t,i){var n=this.getEvent(e),r=!1;return n&&t&&(r=n.removeEventListener(t,i||this)),r}},{key:"_raiseEvent",value:function(e,t){var i=this.getEvent(e);i&&i.raiseEvent(t)}},{key:"_registerEvent",value:function(){var e=this;Object.keys(this._types).forEach((function(t){var i=e._types[t];e._cache[i]=new Cesium.Event}))}},{key:"addEventListener",value:function(e,t,i){return this._addEventListener(e,t,i)}},{key:"addEventListenerOnce",value:function(e,t,i){var n=this._addEventListener(e,(function(e){t(e),n&&n()}),i);return n}},{key:"removeEventListener",value:function(e,t,i){return this._removeEventListener(e,t,i)}},{key:"raiseEvent",value:function(e,t){this._raiseEvent(e,t)}},{key:"getEvent",value:function(e){return this._cache[e]||void 0}},{key:"hasEvent",value:function(e){return!!this.getEvent(e)}}]),e}();function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function he(e,t){if(e){if("string"==typeof e)return ce(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ce(e,t):void 0}}function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,o,s,a=[],l=!0,u=!1;try{if(o=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=o.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{if(!l&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}(e,t)||he(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pe="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),me=function(){function e(){n(this,e)}return a(e,null,[{key:"uuid",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"D",i=[];i[8]=i[13]=i[18]=i[23]="-",i[14]="4";for(var n=0;n<36;n++)i[n]||(e=0|16*Math.random(),i[n]=pe[19===n?3&e|8:e]);return t+"-"+i.join("")}},{key:"merge",value:function(e){for(var t,i,n,r,o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];for(i=0,n=s.length;i<n;i++)for(t in r=s[i])e[t]=r[t];return e}},{key:"splitWords",value:function(e){return this.trim(e).split(/\s+/)}},{key:"setOptions",value:function(e,t){for(var i in e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{}),t)e.options[i]=t[i];return e.options}},{key:"formatNum",value:function(e,t){var i=Math.pow(10,void 0===t?6:t);return Math.round(e*i)/i}},{key:"trim",value:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}},{key:"emptyImageUrl",value:function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}},{key:"checkPosition",value:function(e){return e&&e.hasOwnProperty("_lng")&&e.hasOwnProperty("_lat")&&e.hasOwnProperty("_alt")}},{key:"debounce",value:function(e,t){var i=null;return function(){i&&clearTimeout(i),i=setTimeout(e,t)}}},{key:"throttle",value:function(e,t){var i=!0;return function(){if(!i)return!1;i=!1,setTimeout((function(){e(),i=!0}),t)}}},{key:"dataURLtoBlob",value:function(e){for(var t=e.split(","),i=t[0].match(/:(.*?);/)[1],n=atob(t[1]),r=n.length,o=new Uint8Array(r);r--;)o[r]=n.charCodeAt(r);return new Blob([o],{type:i})}},{key:"loadText",value:function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(),t.responseText}},{key:"setCurrentTime",value:function(e,t){var i=this.hoursToDate(t),n=Cesium.JulianDate.fromDate(i);e.nativeObjCesium.clockViewModel.currentTime=Cesium.JulianDate.addHours(n,0,new Cesium.JulianDate)}},{key:"hoursToDate",value:function(e){var t=new Date;return t.setHours(0,0,0,0),new Date(t.getTime()+36e5*e)}}]),e}();const de=me;const ve=function(){function e(){n(this,e)}return a(e,null,[{key:"get",value:function(e){return"string"==typeof e?document.getElementById(e):e}},{key:"appendChild",value:function(e,t){if(e&&t)return t&&"string"==typeof t?(e.innerHTML||(e.innerHTML=""),e.innerHTML+=t):t&&t instanceof Element&&e.appendChild(t),e}},{key:"getStyle",value:function(e,t){var i=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(e,null);i=n?n[t]:null}return"auto"===i?null:i}},{key:"create",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=document.createElement(e);return n.className=t||"",i&&i.appendChild(n),n}},{key:"createByID",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=document.createElement(e);return n.id=t||"",i&&i.appendChild(n),n}},{key:"remove",value:function(e){var t=e.parentNode;t&&t.removeChild(e)}},{key:"empty",value:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}},{key:"hasClass",value:function(e,t){if(void 0!==e.classList)return e.classList.contains(t);var i=this.getClass(e);return i.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(i)}},{key:"addClass",value:function(e,t){if(void 0!==e.classList)for(var i=de.splitWords(t),n=0,r=i.length;n<r;n++)e.classList.add(i[n]);else if(!this.hasClass(e,t)){var o=this.getClass(e);this.setClass(e,(o?o+" ":"")+t)}}},{key:"removeClass",value:function(e,t){void 0!==e.classList?e.classList.remove(t):this.setClass(e,de.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}},{key:"setClass",value:function(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}},{key:"getClass",value:function(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}},{key:"createSvg",value:function(e,t,i,n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");r.setAttribute("class","svg-path"),r.setAttribute("width",e),r.setAttribute("height",t),r.setAttribute("viewBox","0 0 ".concat(e," ").concat(t));var o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",i),r.appendChild(o),n&&n.appendChild(r),r}},{key:"parseDom",value:function(e,t,i){var n;t=null!==(n=t)&&void 0!==n&&n;var r=document.createElement("div");return r.className=i||"",r.innerHTML=e,t?r:r.lastElementChild}},{key:"enterFullscreen",value:function(e){e&&(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}},{key:"exitFullscreen",value:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}},{key:"createVideo",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.create("video",t,i),r=this.create("source","",n);r.setAttribute("src",e),r.setAttribute("type","video/map4");var o=this.create("source","",n);return o.setAttribute("src",e),o.setAttribute("type","video/quicktime"),n}}]),e}();function ye(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ge(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var _e="measure-label",Ce="__measDivIconLabelCssInjected",be=null;const we=function(){function e(t){if(n(this,e),!t)throw new Cesium.DeveloperError("viewer is required");this.viewer=t,this._items=new Map,this._preRenderBound=!1,this._preRenderCb=this._onPreRender.bind(this),this._scratch=new Cesium.Cartesian2}return a(e,[{key:"_ensureCss",value:function(){if("undefined"!=typeof window&&!window[Ce]&&document&&"function"==typeof document.createElement){var e=document.createElement("style");e.setAttribute("data-anosgis-measure-label",""),e.textContent=be||(be=" .".concat(_e,' {\n position: absolute;\n transform: translate(-50%, calc(-100% - 8px));\n background: rgba(23, 49, 71, 0.92);\n color: #ffffff;\n font-size: 13px;\n line-height: 1.4;\n padding: 4px 10px;\n border-radius: 4px;\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n z-index: 9999;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);\n border: 1px solid rgba(255, 255, 255, 0.15);\n font-family: "Microsoft YaHei", Arial, sans-serif;\n display: none;\n }\n .measure-dot {\n position: absolute;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: #FFD93B;\n border: 2px solid #ffffff;\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);\n transform: translate(-50%, -50%);\n pointer-events: none;\n user-select: none;\n z-index: 9999;\n display: none;\n }\n ')),document.head&&document.head.appendChild(e),window[Ce]=!0}}},{key:"add",value:function(e,t,i,n){if(!e)return null;this._ensureCss();var r,o=this.viewer.container||this.viewer.scene&&this.viewer.scene.canvas&&this.viewer.scene.canvas.parentElement;if(!o)return console.warn("DivIconLabelManager: viewer.container is not available"),null;var s=!1;if(this._items.has(e)){var a=this._items.get(e);r=a.div,a._visible=!!n}else(r=ve.create("div",_e,o)).style.display=n?"block":"none",this._items.set(e,{div:r,position:t?t.clone():new Cesium.Cartesian3,_visible:!!n}),s=!0;if(t&&(this._items.get(e).position=t.clone()),this._writeText(r,i),n&&s){var l=this.viewer&&this.viewer.scene;if(l){var u=l.cartesianToCanvasCoordinates(this._items.get(e).position,this._scratch);u&&(r.style.left=u.x+"px",r.style.top=u.y+"px")}}return this._ensurePreRender(),r}},{key:"addDot",value:function(e,t,i,n){if(!e)return null;this._ensureCss();var r=this.viewer.container||this.viewer.scene&&this.viewer.scene.canvas&&this.viewer.scene.canvas.parentElement;if(!r)return console.warn("DivIconLabelManager: viewer.container is not available"),null;var o,s=i||{},a=s.size||12,l=s.color||"#FFD93B",u=!1;if(this._items.has(e)){var c=this._items.get(e);(o=c.div).style.width=a+"px",o.style.height=a+"px",o.style.background=l,c._visible=!!n}else(o=ve.create("div","measure-dot",r)).style.width=a+"px",o.style.height=a+"px",o.style.background=l,o.style.display=n?"block":"none",this._items.set(e,{div:o,position:t?t.clone():new Cesium.Cartesian3,_visible:!!n,_isDot:!0}),u=!0;if(t&&(this._items.get(e).position=t.clone()),n&&u){var h=this.viewer&&this.viewer.scene;if(h){var f=h.cartesianToCanvasCoordinates(this._items.get(e).position,this._scratch);f&&(o.style.left=f.x+"px",o.style.top=f.y+"px"),o.style.display="block"}}return this._ensurePreRender(),o}},{key:"setText",value:function(e,t){var i=this._items.get(e);i&&this._writeText(i.div,t)}},{key:"setShow",value:function(e,t){var i=this._items.get(e);if(i)if(i._visible=!!t,this._ensurePreRender(),t){var n=this.viewer&&this.viewer.scene;if(n){var r=n.cartesianToCanvasCoordinates(i.position,this._scratch);r&&(i.div.style.left=r.x+"px",i.div.style.top=r.y+"px"),i.div.style.display="block"}}else i.div.style.display="none"}},{key:"setPosition",value:function(e,t){var i=this._items.get(e);i&&t&&(i.position=t.clone())}},{key:"remove",value:function(e){var t=this._items.get(e);if(t){try{t.div&&t.div.parentNode&&t.div.parentNode.removeChild(t.div)}catch(e){}this._items.delete(e),0===this._items.size&&this._detachPreRender()}}},{key:"removeAll",value:function(){for(var e=0,t=Array.from(this._items.keys());e<t.length;e++){var i=t[e];this.remove(i)}}},{key:"has",value:function(e){return this._items.has(e)}},{key:"isVisible",value:function(e){var t=this._items.get(e);return!(!t||!t._visible)}},{key:"getDiv",value:function(e){var t=this._items.get(e);return t?t.div:null}},{key:"size",get:function(){return this._items.size}},{key:"_writeText",value:function(e,t){var i=this;if(null!=t){var n=String(t);-1!==n.indexOf("\n")?e.innerHTML=n.split("\n").map((function(e){return i._escapeHtml(e)})).join("<br>"):e.textContent=n}else e.textContent=""}},{key:"_escapeHtml",value:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},{key:"_ensurePreRender",value:function(){this._preRenderBound||this.viewer&&this.viewer.scene&&this.viewer.scene.preRender&&(this.viewer.scene.preRender.addEventListener(this._preRenderCb),this._preRenderBound=!0)}},{key:"_detachPreRender",value:function(){if(this._preRenderBound){try{this.viewer.scene.preRender.removeEventListener(this._preRenderCb)}catch(e){}this._preRenderBound=!1}}},{key:"_onPreRender",value:function(){if(0!==this._items.size){var e=this.viewer.scene;if(e){var t,i=ye(this._items);try{for(i.s();!(t=i.n()).done;){var n=fe(t.value,2),r=n[0],o=n[1];if(o.div.isConnected)if(o._visible){var s=e.cartesianToCanvasCoordinates(o.position,this._scratch);s?(o.div.style.left=s.x+"px",o.div.style.top=s.y+"px",o.div.style.display="block"):o.div.style.display="none"}else"none"!==o.div.style.display&&(o.div.style.display="none");else this._items.delete(r)}}catch(e){i.e(e)}finally{i.f()}}}else this._detachPreRender()}},{key:"dispose",value:function(){this.removeAll(),this._detachPreRender();var e="__divIconLabelManagerInstance";this.viewer&&this.viewer[e]===this&&(this.viewer[e]=null)}}],[{key:"getInstance",value:function(t){if(!t)return null;var i="__divIconLabelManagerInstance";return t[i]||(t[i]=new e(t)),t[i]}}]),e}();function Pe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Oe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var xe={getPolylineDistance:function(e){if(!e||!Array.isArray(e)||e.length<2)return 0;for(var t=0,i=e.length,n=0;n<i-1;++n)t+=Cesium.Cartesian3.distance(e[n],e[n+1]);return t},getPolygonArea:function(e){var t=new Cesium.Cartesian3,i=new Cesium.Cartesian3,n=new Cesium.Cartesian3;if(!(e.length<=2)){var r=Cesium.CoplanarPolygonGeometry.fromPositions({positions:e}),o=Cesium.CoplanarPolygonGeometry.createGeometry(r);if(!o||!o.attributes||!o.attributes.position)return 0;for(var s=o.attributes.position.values,a=o.indices,l=a.length/3,u=0,c=0;c<l;++c){var h=Cesium.Cartesian3.fromElements(s[3*a[3*c+0]+0],s[3*a[3*c+0]+1],s[3*a[3*c+0]+2],t),f=Cesium.Cartesian3.fromElements(s[3*a[3*c+1]+0],s[3*a[3*c+1]+1],s[3*a[3*c+1]+2],i),p=Cesium.Cartesian3.fromElements(s[3*a[3*c+2]+0],s[3*a[3*c+2]+1],s[3*a[3*c+2]+2],n);u+=this.getTriangleArea(h,f,p)}return u}},getTriangleArea:function(e,t,i){var n=new Cesium.Cartesian3,r=new Cesium.Cartesian3,o=new Cesium.Cartesian3,s=Cesium.Cartesian3.subtract(t,e,n),a=Cesium.Cartesian3.subtract(i,e,r),l=Cesium.Cartesian3.cross(s,a,o);return.5*Cesium.Cartesian3.magnitude(l)},drawEntityNames:function(){return Oe(Oe(Oe(Oe(Oe({},this.drawEntityNames_Point()),{},{tempPoint:"tempPoint"},this.drawEntityNames_Polyline()),this.drawEntityNames_Polygon()),this.drawEntityNames_Rectangle()),this.drawEntityNames_Circle())},drawEntityNames_Point:function(){return{drawPoint:"drawPoint"}},drawEntityNames_Polyline:function(){return{drawpolyline:"drawpolyline",drawpolylinepoint:"drawpolylinepoint"}},drawEntityNames_Polygon:function(){return{drawpolygon:"drawpolygon",drawpolygonpoint:"drawpolygonpoint"}},drawEntityNames_Rectangle:function(){return{drawRec:"drawRec",drawRecpoint:"drawRecpoint"}},drawEntityNames_Circle:function(){return{drawCircle:"drawCircle",drawCirclepoint:"drawCirclepoint"}},getLabelManager:function(e){return we.getInstance(e)},getPointLableString:function(e){var t=Cesium.Cartographic.fromCartesian(e),i=Cesium.Math.toDegrees,n=i(t.longitude).toFixed(8),r=i(t.latitude).toFixed(8),o=t.height.toFixed(3).slice(-10);return o<=0&&(o=0),"经度:"+n+"°\n纬度:"+r+"°\n高度:"+o+"米"},createPointLabel:function(e,t,i,n,r){r||(r={});var o=we.getInstance(e);if(!o)return null;var s=n||xe.drawEntityNames().drawpolyline,a=Date.now()+"_"+Math.random().toString(36).slice(2,8),l=s+"_lbl_"+a,u=s+"_dot_"+a,c=!!r.justDraw,h=!(!r||!1===r.show),f=r.color,p=f&&void 0!==f.red?"rgba(".concat(Math.round(255*f.red),", ").concat(Math.round(255*f.green),", ").concat(Math.round(255*f.blue),", ").concat(f.alpha,")"):"#FFD93B",m=null;c||(m=o.add(l,t,i,h));var d=o.addDot(u,t,{color:p,size:r.size||10},h),v={_manager:o,_labelId:l,_dotId:u,_div:m,_dotDiv:d,_justDraw:c,point:{_show:!1,get show(){return this._show},set show(e){this._show=!!e}}};return v.id=l||u,Object.defineProperty(v,"show",{get:function(){return v._manager&&v._labelId?v._manager.isVisible(v._labelId):!(!v._manager||!v._dotId)&&v._manager.isVisible(v._dotId)},set:function(e){v._manager&&(v._labelId&&v._manager.setShow(v._labelId,e),v._dotId&&v._manager.setShow(v._dotId,e))},configurable:!0,enumerable:!0}),v},setPointLabel:function(e,t,i){e&&e._manager&&(e._dotId&&e._manager.setPosition(e._dotId,t),e._labelId&&e._manager.setPosition(e._labelId,t),e._justDraw||e._labelId&&e._manager.setText(e._labelId,i))},setPointPosition:function(e,t){e&&e._manager&&(e._dotId&&e._manager.setPosition(e._dotId,t),e._labelId&&e._manager.setPosition(e._labelId,t))},removePointLabel:function(e){e&&e._manager&&(e._labelId&&e._manager.remove(e._labelId),e._dotId&&e._manager.remove(e._dotId))},createPointLabelsCallback:function(e,t){for(var i=e.length,n=0;n<i-1;++n){var r=e[n],o=e[n+1],s=Cesium.Cartesian3.distance(r,o),a=Cesium.Cartesian3.lerp(r,o,.5,new Cesium.Cartesian3),l=s.toFixed(2)+"米";s>=1e3&&(l=(s/1e3).toFixed(2)+"千米"),t(n,s,a,l)}},pickPosition:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;n||(n=new Cesium.Cartesian3);var r=void 0,o=e.scene;if(o.mode!==Cesium.SceneMode.MORPHING){if(e.drillPick){var s=o.camera.getPickRay(t),a=o.drillPickFromRay(s,1,i);if(a.length>0)for(var l=0;l<a.length;l++)if(a[l]){var u=a[l].object;if(u&&!(u.hasOwnProperty("id")&&u.id instanceof Cesium.Entity&&xe.drawEntityNames()[u.id.name])){r=a[l].position;break}}}else{var c=3;window.ANOVGIS&&window.ANOVGIS.globalConfig.pickSize&&(c=window.ANOVGIS.globalConfig.pickSize);var h=o.pick(t,c,c);Cesium.defined(h)&&h.id instanceof Cesium.Entity&&h.id.point&&h.id.position&&h.id.position._value?r=h.id.position._value:(h&&h.primitive instanceof Cesium.Cesium3DTileFeature||h&&h.primitive instanceof Cesium.Cesium3DTileset||h&&h.id instanceof Cesium.Entity&&!i.find((function(e){return e.id==h.id.id}))||h&&h.primitive instanceof Cesium.Model)&&(r=o.pickPosition(t))}if(!r)if(e.terrainProvider instanceof Cesium.EllipsoidTerrainProvider)r=o.camera.pickEllipsoid(t,o.globe.ellipsoid);else{var f=o.camera.getPickRay(t);r=o.globe.pick(f,o)}}return r},pickPositionGlobe:function(e,t){var i=void 0,n=e.scene;if(e.terrainProvider instanceof Cesium.EllipsoidTerrainProvider)i=n.camera.pickEllipsoid(t,n.globe.ellipsoid);else{var r=n.camera.getPickRay(t);i=n.globe.pick(r,n)}return i}};const Ee=xe;const Ae={};const ke={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"};const Te=function(){function e(){n(this,e)}return a(e,null,[{key:"getPopupDefaultDom",value:function(){var e=de.uuid();return'\n <div class="anov-divGraphic" id=\''.concat(e,'\'\n style="visibility:hidden"> \n <div class="anov-popup anov-popup-animation">\n <span class="anov-popup-close-button anov-popup-color closeButton">×</span>\n <div class="anov-popup-content-wrapper anov-popup-background">\n <div id="popup-m-').concat(e,'"\n class="anov-popup-content anov-popup-color">\n\n </div>\n </div>\n <div class="anov-popup-tip-container">\n <div class="anov-popup-tip anov-popup-background"></div>\n </div>\n </div>\n </div>\n ')}},{key:"getTooltipDefaultDom",value:function(){var e=de.uuid();return'\n <div class="anov-divGraphic " id=\''.concat(e,'\'\n style="visibility:hidden">\n <div id="tooltip-m-').concat(e,'" class="anov-tooltip anov-tooltip-top">\n\n </div>\n </div>\n ')}}]),e}();function Me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Re=function(e){c(i,e);var t=Me(i);function i(){var e;return n(this,i),(e=t.call(this,le))._registerEvent(),e}return a(i)}(ue);const Se=function(){function e(){n(this,e),this._viewer=void 0,this._wrapper=void 0,this.useDefaultHtmlTemplate=!0,this.showTitle=!1,this._event=new Re}return a(e,[{key:"position",get:function(){return this._position}},{key:"hide",value:function(){this._wrapper&&(this._wrapper.style.cssText="\n visibility:hidden !important;\n display:none !important;\n "),this.raiseEvent(le.CLOSE)}},{key:"setContent",value:function(e){if(e&&"string"==typeof e)this._wrapper.innerHTML=e;else if(e&&e instanceof Element){for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);this._wrapper.appendChild(e)}return this}},{key:"_bindEvent",value:function(){}},{key:"_unbindEvent",value:function(){}},{key:"_mountContent",value:function(){}},{key:"_installHook",value:function(e){}},{key:"install",value:function(e){this._installHook&&this._installHook(e)}},{key:"addEventListener",value:function(e,t,i){return this._event.addEventListener(e,t,i||this),this}},{key:"removeEventListener",value:function(e,t,i){return this._event.removeEventListener(e,t,i||this),this}},{key:"raiseEvent",value:function(e,t){return this._event.raiseEvent(e,t),this}}]),e}();var je=function(){function e(t,i,r,o,s,a){n(this,e),this._lng=+t||0,this._lat=+i||0,this._alt=+r||0,this._heading=+o||0,this._pitch=+s||0,this._roll=+a||0}return a(e,[{key:"lng",get:function(){return this._lng},set:function(e){this._lng=+e}},{key:"lat",get:function(){return this._lat},set:function(e){this._lat=+e}},{key:"alt",get:function(){return this._alt},set:function(e){this._alt=+e}},{key:"heading",get:function(){return this._heading},set:function(e){this._heading=+e}},{key:"pitch",get:function(){return this._pitch},set:function(e){this._pitch=+e}},{key:"roll",get:function(){return this._roll},set:function(e){this._roll=+e}},{key:"serialize",value:function(){var t=new e(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(t)}},{key:"distance",value:function(t){return t&&t instanceof e?Cesium.Cartesian3.distance(Ne.transformWGS84ToCartesian(this),Ne.transformWGS84ToCartesian(t)):0}},{key:"clone",value:function(){var t=new e;return t.lng=this.lng||0,t.lat=this.lat||0,t.alt=this.alt||0,t.heading=this.heading||0,t.pitch=this.pitch||0,t.roll=this.roll||0,t}},{key:"copy",value:function(){return this.clone()}},{key:"toArray",value:function(){return[this.lng,this.lat,this.alt,this.heading,this.pitch,this.roll]}},{key:"toString",value:function(){return"".concat(this.lng,",").concat(this.lat,",").concat(this.alt,",").concat(this.heading,",").concat(this.pitch,",").concat(this.roll)}},{key:"toObject",value:function(){return{lng:this.lng,lat:this.lat,alt:this.alt,heading:this.heading,pitch:this.pitch,roll:this.roll}}}],[{key:"fromArray",value:function(t){var i=new e;return Array.isArray(t)&&(i.lng=t[0]||0,i.lat=t[1]||0,i.alt=t[2]||0,i.heading=t[3]||0,i.pitch=t[4]||-90,i.roll=t[5]||0),i}},{key:"fromString",value:function(t){var i=new e;if(t&&"string"==typeof t){var n=t.split(",");i=this.fromArray(n)}return i}},{key:"fromObject",value:function(t){return t.lng?new e(t.lng,t.lat,t.alt,t.heading,t.pitch,t.roll):t._lng?new e(t._lng,t._lat,t._alt,t._heading,t._pitch,t._roll):new e}},{key:"fromCartesian",value:function(e){return Ne.transformCartesianToWGS84(e)}},{key:"deserialize",value:function(t){var i=new e,n=JSON.parse(t);return n&&(i.lng=n.lng||0,i.lat=n.lat||0,i.alt=n.alt||0,i.heading=n.heading||0,i.pitch=n.pitch||0,i.roll=n.roll||0),i}}]),e}();const Ie=je;function Le(e,t,i){return Le=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&u(r,i.prototype),r},Le.apply(null,arguments)}function De(e){return function(e){if(Array.isArray(e))return ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||he(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Be=function(){function e(){n(this,e)}return a(e,null,[{key:"parsePosition",value:function(e){var t=new Ie;if(!e)return t;if("string"==typeof e)t=Ie.fromString(e);else if(Array.isArray(e))t=Ie.fromArray(e);else if(Object(e)instanceof Ie||!Object(e).hasOwnProperty("lng")||!Object(e).hasOwnProperty("lat"))if(Object(e)instanceof Ie||!Object(e).hasOwnProperty("_lng")||!Object(e).hasOwnProperty("_lat"))if(e instanceof Cesium.Cartesian3)t=Ie.fromCartesian(e);else if(!(Object(e)instanceof Ie)&&Object(e).hasOwnProperty("x")&&Object(e).hasOwnProperty("y")&&Object(e).hasOwnProperty("z")){var i=Le(Cesium.Cartesian3,De(Object(e)));t=Ie.fromCartesian(i)}else Object(e)instanceof Ie&&(t=e);else t=Ie.fromObject(e);else t=Ie.fromObject(e);return t}},{key:"parsePositions",value:function(e){if("string"==typeof e){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e.indexOf(";")>=0&&(e=e.split(";").filter((function(e){return!!e})))}return e.map((function(e){if("string"==typeof e)return Ie.fromString(e);if(Array.isArray(e))return Ie.fromArray(e);if(!(Object(e)instanceof Ie)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat"))return Ie.fromObject(e);if(!(Object(e)instanceof Ie)&&Object(e).hasOwnProperty("x")&&Object(e).hasOwnProperty("y")&&Object(e).hasOwnProperty("z")){var t=new Cesium.Cartesian3(e.x,e.y,e.z);return Ie.fromCartesian(t)}return Object(e)instanceof Ie?e:void 0}))}},{key:"parsePointCoordToArray",value:function(e){return[(e=this.parsePosition(e)).lng,e.lat]}},{key:"parsePolylineCoordToArray",value:function(e){var t=[];return(e=this.parsePositions(e)).forEach((function(e){t.push([e.lng,e.lat])})),t}},{key:"parsePolygonCoordToArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];return(e=this.parsePositions(e)).forEach((function(e){i.push([e.lng,e.lat])})),t&&i.length>0&&i.push(i[0]),[i]}},{key:"parseOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return["color","backgroundColor","outlineColor","material","depthFailMaterial","fillColor","markerColor","stroke","fill"].forEach((function(t,i){"string"==typeof e[t]&&(e[t]=Cesium.Color.fromCssColorString(e[t]))})),e}}]),e}();var Ge=new Cesium.WebMercatorProjection,He=function(){function e(){n(this,e)}return a(e,null,[{key:"transformCartesianToWGS84",value:function(e){if(e){var t=Cesium.Ellipsoid.WGS84.cartesianToCartographic(e);return new Ie(Cesium.Math.toDegrees(t.longitude),Cesium.Math.toDegrees(t.latitude),t.height)}return new Ie(0,0)}},{key:"addCartesian3Height",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1,n=e.transformCartesianToWGS84(t);return n.alt+=i,e.transformWGS84ToCartesian(n)}},{key:"SetCartesian3Height",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1,n=e.transformCartesianToWGS84(t);return n.alt=i,e.transformWGS84ToCartesian(n)}},{key:"setHeightWGS84",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1;return t.alt=i,e.transformWGS84ToCartesian(t)}},{key:"transformWGS84ToCartesian",value:function(e){return e?Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,Cesium.Ellipsoid.WGS84):Cesium.Cartesian3.ZERO}},{key:"transformCartographicToCartesian",value:function(e){return e?Cesium.Cartesian3.fromRadians(e.longitude,e.latitude,e.height):Cesium.Cartesian3.ZERO}},{key:"transformWGS84ToCartographic",value:function(e){return e?Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt):Cesium.Cartographic.ZERO}},{key:"transformCartesianArrayToWGS84Array",value:function(e){var t=this;return e?e.map((function(e){return t.transformCartesianToWGS84(e)})):[]}},{key:"transformWGS84ArrayToCartesianArray",value:function(e){var t=this,i=Be.parsePositions(e);return i?i.map((function(e){return t.transformWGS84ToCartesian(e)})):[]}},{key:"transformWGS84ToMercator",value:function(e){var t=Ge.project(Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new Ie(t.x,t.y,t.z)}},{key:"transformMercatorToWGS84",value:function(e){var t=Ge.unproject(new Cesium.Cartesian3(e.lng,e.lat,e.alt));return new Ie(Cesium.Math.toDegrees(t.longitude),Cesium.Math.toDegrees(t.latitude),t.height)}},{key:"transformWindowToWGS84",value:function(e,t){var i,n=t.scene;if(n.mode===Cesium.SceneMode.SCENE3D){var r=n.camera.getPickRay(e);i=n.globe.pick(r,n)}else i=n.camera.pickEllipsoid(e,Cesium.Ellipsoid.WGS84);return this.transformCartesianToWGS84(i)}},{key:"transformWindowToCartesian3",value:function(e,t){var i=this.transformWindowToWGS84(e,t);return this.transformWGS84ToCartesian(i)}},{key:"transformWGS84ToWindow",value:function(e,t){return t.scene.cartesianToCanvasCoordinates(this.transformWGS84ToCartesian(e),new Cesium.Cartesian2)}},{key:"transformCartesian3ToWindow",value:function(e,t){var i=this.transformCartesianToWGS84(e);return this.transformWGS84ToWindow(i,t)}},{key:"wgs842WebMercator",value:function(e,t){var i=20037508.34*e/180,n=Math.log(Math.tan((90+t)*Math.PI/360))/(Math.PI/180);return{x:i,y:n=20037508.34*n/180}}},{key:"webMercator2WGS84",value:function(e,t){var i=t/20037508.34*180;return{lon:e/20037508.34*180,lat:i=180/Math.PI*(2*Math.atan(Math.exp(i*Math.PI/180))-Math.PI/2)}}},{key:"localToWorldPos",value:function(e,t,i,n){var r=window.Cesium.Transforms.eastNorthUpToFixedFrame(e),o=new window.Cesium.Cartesian3(t,-n,i);return window.Cesium.Matrix4.multiplyByPoint(r,o,new window.Cesium.Cartesian3)}},{key:"worldTolocal",value:function(e,t){var i=window.Cesium.Transforms.eastNorthUpToFixedFrame(e),n=window.Cesium.Matrix4.inverseTransformation(i,new window.Cesium.Matrix4),r=window.Cesium.Matrix4.multiplyByPoint(n,t,new window.Cesium.Cartesian3);return new Cesium.Cartesian3(r.x,-r.z,r.y)}},{key:"updateWinPosition",value:function(e){var t,i,n,r,o,s,a,l,u,c,h,f=null===(t=e.show)||void 0===t||t,p=null!==(i=e.windowCoord)&&void 0!==i?i:null,m=null!==(n=e.scaleByDistance)&&void 0!==n?n:null,d=null!==(r=e.distance)&&void 0!==r?r:0,v=null!==(o=e.dom)&&void 0!==o?o:null,y=null!==(s=e.horizontalOrigin)&&void 0!==s?s:null,g=null!==(a=e.verticalOrigin)&&void 0!==a?a:null,_=null!==(l=e.distanceDisplayCondition)&&void 0!==l?l:null,C=(u=e.isFront,null!==(c=e.offsetX)&&void 0!==c?c:null),b=null!==(h=e.offsetY)&&void 0!==h?h:null,w=e.scaleRatio||1;if(f&&p){var P=p.x-v.offsetWidth/2,O=p.y-v.offsetHeight;if(P<1&&O<1)v&&(v.style.cssText="\n visibility:hidden !important;\n display:none !important;\n ");else{var x="scale3d(1*".concat(w,",1*").concat(w,",1*").concat(w,")"),E=1;if(d&&m){var A=m.near||0,k=m.nearValue||1,T=m.far||Number.MAX_VALUE,M=m.farValue||0;if(d<A)x="scale3d(".concat(k,"*").concat(w,",").concat(k,"*").concat(w,",1)"),E=k;else if(d>T)x="scale3d(".concat(M,"*").concat(w,",").concat(M,"*").concat(w,",1)"),E=M;else{var R=k-(d-A)/(T-A)*(k-M);E=R,x="scale3d(".concat(R,"*").concat(w,",").concat(R,"*").concat(w,",1)")}}if(E<.01)v.style.display="none";else{v.style.display="block","LEFT"===y?P=p.x-v.offsetWidth:"CENTER"===y||"RIGHT"===y&&(P=p.x),"BOTTOM"===g?O=p.y:"CENTER"===g||"TOP"===g&&(O=p.y-v.offsetHeight),C&&(P+=C*E),b&&(O+=b*E),"LEFT"===y?"CENTER"===g?v.style.transformOrigin="right center":"TOP"===g?v.style.transformOrigin="right bottom":"BOTTOM"===g&&(v.style.transformOrigin="right top"):"CENTER"===y?"CENTER"===g?v.style.transformOrigin="center center":"TOP"===g?v.style.transformOrigin="center bottom":"BOTTOM"===g&&(v.style.transformOrigin="center top"):"RIGHT"===y&&("CENTER"===g?v.style.transformOrigin="left center":"TOP"===g?v.style.transformOrigin="left bottom":"BOTTOM"===g&&(v.style.transformOrigin="left top")),v.style.top=O*w+"px",v.style.left=P*w+"px",v.style.visibility="visible",v.style.transform="".concat(x);d&&_&&isBetween(d,_.near||0,_.far||Number.MAX_VALUE)}}}}}]),e}();const Ne=He;function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Fe=function(e){c(i,e);var t=ze(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._init(e),r}return a(i,[{key:"_init",value:function(e){var t,i,n,r,o,s,a,l;if(this._position=void 0,this._viewer=e.viewer||window.viewer,this._viewer){if(this.useDefaultHtmlTemplate=null===(t=e.useDefaultHtmlTemplate)||void 0===t||t,this.showTitle=null!==(i=e.showTitle)&&void 0!==i&&i,this.scaleByDistance=null!==(n=e.scaleByDistance)&&void 0!==n?n:null,this.horizontalOrigin=null!==(r=e.horizontalOrigin)&&void 0!==r?r:null,this.verticalOrigin=null!==(o=e.verticalOrigin)&&void 0!==o?o:null,this.distanceDisplayCondition=null!==(s=e.distanceDisplayCondition)&&void 0!==s?s:null,this.offsetX=null!==(a=e.offsetX)&&void 0!==a?a:null,this.offsetY=null!==(l=e.offsetY)&&void 0!==l?l:null,this.useDefaultHtmlTemplate){var u=Te.getPopupDefaultDom();this._wrapper=ve.parseDom(u,!1),this._addDefaultTitleContent(),this._initClose()}else this._wrapper=ve.create("div","viewer-widgets anov-infoWin-init");!0===e.pointerEvents?this._wrapper.style.pointerEvents="all":this._wrapper.style.pointerEvents="none"}else console.error("viewer是必须的参数!")}},{key:"_initClose",value:function(){var e=this,t=this._wrapper.querySelector(".closeButton");t&&t.addEventListener("click",(function(){e.hide()}))}},{key:"_addDefaultTitleContent",value:function(){var e=this._wrapper.querySelector(".anov-popup-content");this.showTitle&&ve.create("div","anov-template-titile",e),ve.create("div","anov-template-content",e)}},{key:"setPosition",value:function(e){return this._position=e,this._wrapper&&(this._wrapper.style.cssText="\n visibility:visible;\n "),this}},{key:"setContent",value:function(e){var t=this._wrapper.querySelector(".anov-popup-content");if(t)for(;t.hasChildNodes();)t.removeChild(t.firstChild);else for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);if(e&&"string"==typeof e)t?t.innerHTML=e:this._wrapper.innerHTML=e;else if(e&&e instanceof Element)t?t.appendChild(e):this._wrapper.appendChild(e);else if(e&&e instanceof Object&&this.useDefaultHtmlTemplate){if(this._addDefaultTitleContent(),this.showTitle){var i=this._wrapper.querySelector(".anov-template-titile");ve.appendChild(i,e.title)}var n=this._wrapper.querySelector(".anov-template-content"),r=e.fieldsMap;r&&r.forEach((function(e){var t="<div><label>".concat(e.nameC,"</label>").concat(e.value,"</div>");ve.appendChild(n,t)}))}return this}},{key:"show",value:function(e,t){return this.setPosition(e).setContent(t),this}},{key:"_installHook",value:function(e){this._viewer.container.appendChild(this._wrapper),this._bindEvent(),Object.defineProperty(e,"popup",{value:this,writable:!1})}},{key:"_bindEvent",value:function(){var e=this;if(this._viewer&&this._wrapper){var t=this,i=this._viewer.scene;i.postRender.addEventListener((function(){if(t._position&&t._updatePosition&&"visible"===t._wrapper.style.visibility){var n=e._viewer.camera.positionWC,r=e._viewer.camera.direction,o=i.globe.ellipsoid.geodeticSurfaceNormal(t._position,new Cesium.Cartesian3),s=i.cartesianToCanvasCoordinates(t._position,new Cesium.Cartesian2);s&&t._updatePosition(s,Cesium.Cartesian3.distance(t._position,n),Cesium.Cartesian3.dot(r,o)<=0)}}))}}},{key:"_updatePosition",value:function(e,t,i){Ne.updateWinPosition({windowCoord:e,scaleByDistance:this.scaleByDistance,distance:t,dom:this._wrapper,horizontalOrigin:this.horizontalOrigin,verticalOrigin:this.verticalOrigin,distanceDisplayCondition:this.distanceDisplayCondition,isFront:i,offsetX:this.offsetX,offsetY:this.offsetY,scaleRatio:this._viewer.scaleRatio})}}]),i}(Se);const We=Fe;function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ve=function(e){c(i,e);var t=Ue(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._init(e),r}return a(i,[{key:"_init",value:function(e){var t,i,n,r,o,s;if(this._position=void 0,this._viewer=e.viewer||window.viewer,this._viewer)if(this.useDefaultHtmlTemplate=null===(t=e.useDefaultHtmlTemplate)||void 0===t||t,this.showTitle=null!==(i=e.showTitle)&&void 0!==i&&i,this.horizontalOrigin=null!==(n=e.horizontalOrigin)&&void 0!==n?n:null,this.verticalOrigin=null!==(r=e.verticalOrigin)&&void 0!==r?r:null,this.offsetX=null!==(o=e.offsetX)&&void 0!==o?o:null,this.offsetY=null!==(s=e.offsetY)&&void 0!==s?s:null,this.useDefaultHtmlTemplate){var a=Te.getTooltipDefaultDom();this._wrapper=ve.parseDom(a,!1),this._addDefaultTitleContent()}else this._wrapper=ve.create("div","viewer-widgets anov-infoWin-init");else console.error("viewer是必须的参数!")}},{key:"_addDefaultTitleContent",value:function(){var e=this._wrapper.querySelector(".anov-tooltip");this.showTitle&&ve.create("div","anov-template-titile",e),ve.create("div","anov-template-content",e)}},{key:"setPosition",value:function(e){return this._position=e,this._wrapper&&(this._wrapper.style.cssText="\n visibility:visible !important;\n display:block !important;\n "),this}},{key:"setContent",value:function(e){var t=this._wrapper.querySelector(".anov-tooltip");if(t)for(;t.hasChildNodes();)t.removeChild(t.firstChild);else for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);if(e&&"string"==typeof e)t?t.innerHTML=e:this._wrapper.innerHTML=e;else if(e&&e instanceof Element)t?t.appendChild(e):this._wrapper.appendChild(e),e.style.cssText="\n visibility:visible !important;\n display:block !important;\n ";else if(e&&e instanceof Object&&this.useDefaultHtmlTemplate){if(this._addDefaultTitleContent(),this.showTitle){var i=this._wrapper.querySelector(".anov-template-titile");ve.appendChild(i,e.title)}var n=this._wrapper.querySelector(".anov-template-content"),r=e.fieldsMap;r&&r.forEach((function(e){var t="<div><label>".concat(e.nameC,"</label>").concat(e.value,"</div>");ve.appendChild(n,t)}))}return this}},{key:"_updatePosition",value:function(e,t,i){Ne.updateWinPosition({windowCoord:e,scaleByDistance:this.scaleByDistance,distance:t,dom:this._wrapper,horizontalOrigin:this.horizontalOrigin,verticalOrigin:this.verticalOrigin,distanceDisplayCondition:this.distanceDisplayCondition,isFront:i,offsetX:this.offsetX,offsetY:this.offsetY,scaleRatio:this._viewer.scaleRatio})}},{key:"show",value:function(e,t){this.setPosition(e).setContent(t);var i=this._viewer.scene.cartesianToCanvasCoordinates(this.position,new Cesium.Cartesian2);return this._updatePosition(i),this}},{key:"_installHook",value:function(e){this._viewer.container.appendChild(this._wrapper),Object.defineProperty(e,"tooltip",{value:this,writable:!0})}}]),i}(Se);const qe=Ve;const Ze=function(){function e(){var t,i,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._id=de.uuid(),this.businessID=de.uuid(),Be.parseOption(o),this._nativeObjCesium=void 0,this._layer=void 0,this._state=void 0,this._show=!0,this._style={},this._attr={},this._allowDrillPicking=!1,this._contextMenu=[],this.infoData=o.infoData,this._graphicEvent=new ir,this._graphicEvent.addEventListener(te.ADD,this._onAdd,this),this._graphicEvent.addEventListener(te.REMOVE,this._onRemove,this),this.originOption=void 0,this._highlight=o.highlight,this._selectedHighlight=o.selectedHighlight,Be.parseOption(this._highlight),Be.parseOption(this._selectedHighlight),this._popup=void 0,this._pSelected=void 0,this.isHightlighted=!1,this._useDefaultHighlightEvent=null===(t=null!==(i=o.useDefaultHighlightEvent)&&void 0!==i?i:o.useDefaultHightedEvent)||void 0===t||t,this.useDefaultSelectedEvent=null===(r=o.useDefaultSelectedEvent)||void 0===r||r,this.initHighlight(),this.tooltipOptions={}}return a(e,[{key:"boundingSphere",get:function(){return null}},{key:"useDefaultHightedEvent",get:function(){return this._useDefaultHighlightEvent},set:function(e){this._useDefaultHighlightEvent=e}},{key:"useDefaultHighlightEvent",get:function(){return this._useDefaultHighlightEvent},set:function(e){this._useDefaultHighlightEvent=e}},{key:"_computeBoundingSphere",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=this.nativeObjCesium;if(t)try{var i=t.boundingSphere;if(i&&Cesium.defined(i.center))return i}catch(e){}var n=this._position||this._center;return n?new Cesium.BoundingSphere(Ne.transformWGS84ToCartesian(n),e):this._positions&&this._positions.length>0?Cesium.BoundingSphere.fromPoints(Ne.transformWGS84ArrayToCartesianArray(this._positions)):null}},{key:"graphicId",get:function(){return this._id}},{key:"type",get:function(){return""}},{key:"id",get:function(){return this.businessID},set:function(e){this.businessID=e}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._nativeObjCesium&&(this._nativeObjCesium.show=this._show)}},{key:"attr",get:function(){return this._attr},set:function(e){this._attr=e}},{key:"allowDrillPicking",get:function(){return this._allowDrillPicking},set:function(e){this._allowDrillPicking=e}},{key:"graphicEvent",get:function(){return this._graphicEvent}},{key:"nativeObjCesium",get:function(){return this._nativeObjCesium}},{key:"state",get:function(){return this._state}},{key:"contextMenu",get:function(){return this._contextMenu},set:function(e){this._contextMenu=e}},{key:"_getLayerCollection",value:function(e){var t=void 0;switch(e){case"point_primitive":t=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":t=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":t=this._layer.labels;break;case"polyline_primitive":t=this._layer.polylines;break;case"flow_line_primitive":case"water_primitive":case"model_primitive":t=this._layer.primitives;break;case"cloud_primitive":t=this._layer.clouds}return t}},{key:"_mountedHook",value:function(){}},{key:"_addedHook",value:function(){var e,t=this;if(!this._nativeObjCesium)return!1;this._nativeObjCesium instanceof Promise?this._nativeObjCesium.then((function(e){var i;e.layerId=null===(i=t._layer)||void 0===i?void 0:i.layerId,e.graphicId=t._id})):(this._nativeObjCesium.layerId=null===(e=this._layer)||void 0===e?void 0:e.layerId,this._nativeObjCesium.graphicId=this._id)}},{key:"_removedHook",value:function(){}},{key:"_onAdd",value:function(e){var t=this;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),this._layer.nativeObjCesium.entities&&this._nativeObjCesium)this._layer.nativeObjCesium.entities.add(this._nativeObjCesium);else if(this._layer.nativeObjCesium.add){var i=this._getLayerCollection(this.type);i?(this._nativeObjCesium&&this._nativeObjCesium.then?this._nativeObjCesium.then((function(e){t._nativeObjCesium=i.add(e)})):this._nativeObjCesium&&(this._nativeObjCesium=i.add(this._nativeObjCesium)),this.update&&this.destroy&&this._layer.nativeObjCesium.add(this)):this._nativeObjCesium.then?this._nativeObjCesium.then((function(e){t._nativeObjCesium=i?i.add(e):t._layer.nativeObjCesium.add(e)})):this._nativeObjCesium.readyEvent?this._nativeObjCesium.readyEvent.addEventListener((function(e){t._layer.nativeObjCesium.add(e)})):this.update&&this.destroy?this._layer.nativeObjCesium.add(this):this._nativeObjCesium&&this._layer.nativeObjCesium.add(this._nativeObjCesium)}this._addedHook&&this._addedHook(),this._state=ke.ADDED}}},{key:"_onRemove",value:function(){var e=this;if(this._layer){if(this._layer.nativeObjCesium.entities)this._layer.nativeObjCesium.entities.remove(this._nativeObjCesium);else if(this._layer.nativeObjCesium.remove){var t=this._getLayerCollection(this.type);t?(this._nativeObjCesium.then?this._nativeObjCesium.then((function(e){t.remove(e)})):t.remove(this._nativeObjCesium),this.update&&this.destroy&&this._layer.nativeObjCesium.remove(this)):this._nativeObjCesium.then?this._nativeObjCesium.then((function(t){e._layer.nativeObjCesium.remove(t)})):this._nativeObjCesium.readyEvent?this._nativeObjCesium.readyEvent.addEventListener((function(t){e._layer.nativeObjCesium.remove(t)})):this.update&&this.destroy?this._layer.nativeObjCesium.remove(this):this._layer.nativeObjCesium.remove(this._nativeObjCesium)}this._removedHook&&this._removedHook(),this._state=ke.REMOVED}}},{key:"setBillboard",value:function(e){return e&&e.billboard&&(Be.parseOption(e.billboard),this._nativeObjCesium.billboard?de.merge(this._nativeObjCesium.billboard,e):this._nativeObjCesium.billboard=new Cesium.LabelGraphics(e.billboard)),this}},{key:"setLabel",value:function(e){return e&&e.label&&(e.label.fillColor=e.label.color||e.label.fillColor,Be.parseOption(e.label),this._nativeObjCesium.label?de.merge(this._nativeObjCesium.label,e.label):this._nativeObjCesium.label=new Cesium.LabelGraphics(e.label)),e&&0==e.label&&(this._nativeObjCesium.label=void 0),this}},{key:"setPolyline",value:function(e){return e&&e.polyline&&(Be.parseOption(e.polyline),e.polyline.positions&&(e.polyline.positions=Be.parsePositions(e.polyline.positions),e.polyline.positions=Ne.transformWGS84ArrayToCartesianArray(e.polyline.positions)),this._nativeObjCesium.polyline?de.merge(this._nativeObjCesium.polyline,e.polyline):e.polyline.positions&&(this._nativeObjCesium.polyline=new Cesium.PolylineGraphics(e.polyline))),e&&0==e.polyline&&(this._nativeObjCesium.polyline=void 0),this}},{key:"setOptions",value:function(){return this}},{key:"remove",value:function(){return this._layer&&this._layer.removeGraphic(this),this}},{key:"addTo",value:function(e){return e&&e.addGraphic&&e.addGraphic(this),this}},{key:"addEventListener",value:function(e,t,i){return this._graphicEvent.addEventListener(e,t,i||this),this}},{key:"addEventListenerOnce",value:function(e,t,i){return this._graphicEvent.addEventListenerOnce(e,t,i||this)}},{key:"removeEventListener",value:function(e,t,i){return this._graphicEvent.removeEventListener(e,t,i||this),this}},{key:"raiseEvent",value:function(e,t){return this._graphicEvent.raiseEvent(e,t),this}},{key:"bindPopup",value:function(e){var t=this;this._popup=new We(e),this._popup.addEventListener(le.CLOSE,(function(){t.unSelected(t._e)})),this._popup.install(this)}},{key:"bindTooltip",value:function(e){var t=this;new qe(e).install(this),this.addEventListener(J.MOUSE_OUT,(function(e){t.tooltip.hide()})),this.addEventListener(J.CLICK,(function(e){t.tooltip.hide()}))}},{key:"initHighlight",value:function(){var e=this;this._highlight&&this.useDefaultHightedEvent&&this.addEventListener(J.MOUSE_MOVE,(function(t){e.isHightlighted=!0,e.highlight(t)})),this._selectedHighlight&&this.useDefaultSelectedEvent&&this.addEventListener(J.CLICK,(function(t){e.unSelected(),e.selectedHighlight(t)})),this._highlight&&this.useDefaultHightedEvent&&this.addEventListener(J.MOUSE_OUT,(function(t){e.isHightlighted=!1,e.unHighlight(t)}));var t=this;this._selectedHighlight&&this.addEventListener(te.BIND_POPUP,(function(){e._layer&&e._layer&&e._layer._popup.addEventListener(le.CLOSE,(function(){e.unSelected(t._pSelected)}))}))}},{key:"highlight",value:function(e){}},{key:"unHighlight",value:function(e){this.originOption&&this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){}},{key:"unSelected",value:function(e){}}],[{key:"registerType",value:function(e){e&&(Ae[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}},{key:"getGraphicType",value:function(e){return Ae[e.toLocaleUpperCase()]||void 0}}]),e}();function Ye(e,t,i){var n=Cesium.Cartesian3.subtract(e,t,new Cesium.Cartesian3),r=Cesium.Cartesian3.subtract(i,t,new Cesium.Cartesian3),o=Cesium.Cartesian3.cross(n,r,n);return.5*Cesium.Cartesian3.magnitude(o)}function Ke(e){var t=0;if(!Array.isArray(e))return t;e[0]instanceof Cesium.Cartesian3||(e=Ne.transformWGS84ArrayToCartesianArray(e));var i=Cesium.CoplanarPolygonGeometry.createGeometry(Cesium.CoplanarPolygonGeometry.fromPositions({positions:e,vertexFormat:Cesium.VertexFormat.POSITION_ONLY}));if(!i)return t;for(var n=i.attributes.position.values,r=i.indices,o=0;o<r.length;o+=3){t+=Ye(Cesium.Cartesian3.unpack(n,3*r[o],new Cesium.Cartesian3),Cesium.Cartesian3.unpack(n,3*r[o+1],new Cesium.Cartesian3),Cesium.Cartesian3.unpack(n,3*r[o+2],new Cesium.Cartesian3))}return t}function Qe(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=180,i=90,n=-180,r=-90;if((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e){t=Math.min(t,e.lng||e.x),i=Math.min(i,e.lat||e.y),n=Math.max(n,e.lng||e.x),r=Math.max(r,e.lat||e.y)})),e>0){var o=Math.abs(n-n),s=Math.abs(r-i);t-=o*e,i-=s*e,n+=o*e,r+=s*e}return{west:t,south:i,east:n,north:r}}function Xe(e){if(e&&Array.isArray(e)){var t=Cesium.BoundingSphere.fromPoints(Ne.transformWGS84ArrayToCartesianArray(e));return Ne.transformCartesianToWGS84(t.center)}return new Ie}function Je(e,t){t=t||{};for(var i=[],n=0;n<e.length-1;n++){var r=$e(e[n],e[n+1],t.count);r&&r.length>0&&(i=i.concat(r))}return i}function $e(e,t,i){if(!e||!t)return null;var n=[];i=i||40;var r,o,s,a,l,u,c=function(e){return 1-2*e+e*e},h=function(e){return 2*e-2*e*e},f=function(e){return e*e},p=0,m=parseFloat(e.lat),d=parseFloat(t.lat),v=parseFloat(e.lng),y=parseFloat(t.lng);y>v&&y-v>180&&v<0&&(v=360+v,y=360+y),u=0,d===m?(r=0,o=v-y):y===v?(r=Math.PI/2,o=m-d):(r=Math.atan((d-m)/(y-v)),o=(d-m)/Math.sin(r)),0===u&&(u=r+Math.PI/5),l=(s=o/2)*Math.cos(u)+v,a=s*Math.sin(u)+m;for(var g=0;g<i+1;g++){var _=v*c(p)+l*h(p)+y*f(p),C=m*c(p)+a*h(p)+d*f(p),b=e.lng,w=t.lng;n.push([b<0&&w>0?_-360:_,C]),p+=1/i}return n}function et(e){var t=0;if(e&&Array.isArray(e))for(var i=0;i<e.length-1;i++){var n=Ne.transformWGS84ToCartographic(e[i]),r=Ne.transformWGS84ToCartographic(e[i+1]),o=new Cesium.EllipsoidGeodesic;o.setEndPoints(n,r);var s=o.surfaceDistance;t+=s=Math.sqrt(Math.pow(s,2)+Math.pow(r.height-n.height,2))}return t.toFixed(3)}function tt(e){var t=0;if(e&&Array.isArray(e))for(var i=0;i<e.length-1;i++){t+=Cesium.Cartesian3.distanceSquared(e[i],e[i+1])}return t}function it(e,t){var i=e,n=t;if(!i||!n)return 0;e instanceof Cesium.Cartesian3||(i=Be.parsePosition(e),i=Ne.transformWGS84ToCartesian(i)),t instanceof Cesium.Cartesian3||(n=Be.parsePosition(t),n=Ne.transformWGS84ToCartesian(n));var r=Cesium.Transforms.eastNorthUpToFixedFrame(i),o=Cesium.Cartesian3.subtract(n,i,new Cesium.Cartesian3),s=Cesium.Matrix4.multiplyByPointAsVector(Cesium.Matrix4.inverse(r,new Cesium.Matrix4),o,new Cesium.Cartesian3),a=Math.atan2(s.y,s.x)-Cesium.Math.PI_OVER_TWO;return a=Cesium.Math.TWO_PI-Cesium.Math.zeroToTwoPi(a),isNaN(a)?0:a}function nt(e,t,i){return(e=parseFloat(e)||0)>=parseFloat(t)&&e<=parseFloat(i)}function rt(e,t){var i=Cesium.Ellipsoid.WGS84.cartesianToCartographic(e),n=Cesium.Ellipsoid.WGS84.cartesianToCartographic(t),r=new Cesium.EllipsoidGeodesic(i,n).interpolateUsingFraction(.5);return Cesium.Ellipsoid.WGS84.cartographicToCartesian(r)}function ot(e,t){var i=Be.parsePosition(e),n=Be.parsePosition(t);i=Ne.transformWGS84ToCartographic(i),n=Ne.transformWGS84ToCartographic(n);var r=new Cesium.EllipsoidGeodesic(i,n).interpolateUsingFraction(.5);return new Ie(Cesium.Math.toDegrees(r.longitude),Cesium.Math.toDegrees(r.latitude),r.height)}function st(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:50,r=[];i=Math.max(+i,100),n=Math.max(+n,50);var o=Math.abs(e.lng-t.lng),s=Math.abs(e.lat-t.lat),a=Math.max(o,s),l=a/n;if(o>s){var u=(t.lat-e.lat)/n;e.lng-t.lng>0&&(l=-l);for(var c=0;c<n;c++){var h=i-4*Math.pow(-.5*a+Math.abs(l)*c,2)*i/Math.pow(a,2),f=e.lng+l*c,p=e.lat+u*c;r.push([f,p,h])}}else{var m=(t.lng-e.lng)/n;e.lat-t.lat>0&&(l=-l);for(var d=0;d<n;d++){var v=i-4*Math.pow(-.5*a+Math.abs(l)*d,2)*i/Math.pow(a,2),y=e.lng+m*d,g=e.lat+l*d;r.push([y,g,v])}}return r.push([t.lng,t.lat,t.alt||0]),r}const at={getScreenCenterCoordinates:function(e){var t=e.scene,i=t.canvas,n=new Cesium.Cartesian2(i.clientWidth/2,i.clientHeight/2),r=t.globe.ellipsoid;return t.camera.pickEllipsoid(n,r)}};function lt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ut(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ct=function(e){c(i,e);var t=ut(i);function i(e,r){var o;return n(this,i),o=t.call(this),r?(o._nativeObjCesium=ve.create("div","anov-div-icon anov-infoWin-init"),o._position=Be.parsePosition(e),o.content=r,o._state=ke.INITIALIZED,o):(console.error("没有传入内容,无法显示!"),f(o))}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("div_icon")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._nativeObjCesium.style.display=this._show?"block":"none"}},{key:"position",get:function(){return this._position},set:function(e){this._position=Be.parsePosition(e)}},{key:"content",get:function(){return this._nativeObjCesium.childNodes||[]},set:function(e){if(e&&"string"==typeof e)this._nativeObjCesium.innerHTML=e;else if(e&&e instanceof Element){for(;this._nativeObjCesium.hasChildNodes();)this._nativeObjCesium.removeChild(this._nativeObjCesium.firstChild);this._nativeObjCesium.appendChild(e)}}},{key:"_updateStyle",value:function(e,t,i,n){if(this._show&&e){var r="scale3d(1,1,1)",o=this._style.scaleByDistance,s=1;if(t&&o){var a=o.near||0,l=o.nearValue||1,u=o.far||Number.MAX_VALUE,c=o.farValue||0;if(t<a)r="scale3d(".concat(l,",").concat(l,",1)"),s=l;else if(t>u)r="scale3d(".concat(c,",").concat(c,",1)"),s=c;else{var h=l-(t-a)/(u-a)*(l-c);s=h,r="scale3d(".concat(h,",").concat(h,",1)")}}if(s<.01)this._nativeObjCesium.style.display="none";else{this._nativeObjCesium.style.display="block";var f=e.x-this._nativeObjCesium.offsetWidth/2,p=e.y-this._nativeObjCesium.offsetHeight;"LEFT"===this._style.horizontalOrigin?f=e.x-this._nativeObjCesium.offsetWidth:"CENTER"===this._style.horizontalOrigin||"RIGHT"===this._style.horizontalOrigin&&(f=e.x),"BOTTOM"===this._style.verticalOrigin?p=e.y:"CENTER"===this._style.verticalOrigin||"TOP"===this._style.verticalOrigin&&(p=e.y-this._nativeObjCesium.offsetHeight),this._style.offsetX&&(f+=this._style.offsetX*s),this._style.offsetY&&(p+=this._style.offsetY*s),"LEFT"===this._style.horizontalOrigin?"CENTER"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="right center":"TOP"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="right bottom":"BOTTOM"===this._style.verticalOrigin&&(this._nativeObjCesium.style.transformOrigin="right top"):"CENTER"===this._style.horizontalOrigin?"CENTER"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="center center":"TOP"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="center bottom":"BOTTOM"===this._style.verticalOrigin&&(this._nativeObjCesium.style.transformOrigin="center top"):"RIGHT"===this._style.horizontalOrigin&&("CENTER"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="left center":"TOP"===this._style.verticalOrigin?this._nativeObjCesium.style.transformOrigin="left bottom":"BOTTOM"===this._style.verticalOrigin&&(this._nativeObjCesium.style.transformOrigin="left top")),this._nativeObjCesium.style.top=p+"px",this._nativeObjCesium.style.left=f+"px",this._nativeObjCesium.style.transform="".concat(r);var m=!0,d=this._style.distanceDisplayCondition;t&&d&&(m=nt(t,d.near||0,d.far||Number.MAX_VALUE)),this._nativeObjCesium.style.display=m&&i?"block":"none"}}}},{key:"_onAdd",value:function(e){var t=this;this._layer=e,ve.addClass(this.nativeObjCesium,e.layerName),this._layer.nativeObjCesium.appendChild(this._nativeObjCesium);var i={layer:e,graphic:this,position:Ne.transformWGS84ToCartesian(this._position)};this._nativeObjCesium.addEventListener("click",(function(){t._graphicEvent.raiseEvent(J.CLICK,i)})),this._nativeObjCesium.addEventListener("mouseover",(function(){t._graphicEvent.raiseEvent(J.MOUSE_OVER,i)})),this._nativeObjCesium.addEventListener("mouseout",(function(){t._graphicEvent.raiseEvent(J.MOUSE_OUT,i)})),this._state=ke.ADDED}},{key:"_onRemove",value:function(){this._layer&&(this._layer.nativeObjCesium.removeChild(this._nativeObjCesium),this._state=ke.REMOVED)}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(de.merge(this._style,e),!0===e.pointerEvents?this._nativeObjCesium.style.pointerEvents="all":this._nativeObjCesium.style.pointerEvents="none",this._style.className&&ve.addClass(this._nativeObjCesium,this._style.className),this):this}}],[{key:"fromEntity",value:function(e,t){var n,r=Cesium.JulianDate.now();return n=new i(Ne.transformCartesianToWGS84(e.position.getValue(r)),t),e.billboard&&(n.attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):lt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(r))),n}}]),i}(Ze);Ze.registerType("div_icon");const ht=ct;function ft(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var mt=function(e){c(i,e);var t=pt(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.Entity({model:{}}),r._position=Be.parsePosition(e.position),r._modelUrl=e.url,r._rotateAmountHeading=0,r._rotateAmountPitch=0,r._rotateAmountRoll=0,r._state=ke.INITIALIZED,de.merge(r._style,e),r.setOptions(e),r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("model")}},{key:"position",get:function(){return this._position},set:function(e){this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position)}},{key:"modelUrl",get:function(){return this._modelUrl},set:function(e){this._modelUrl=e,this._nativeObjCesium.model.uri=this._modelUrl}},{key:"rotateAmountHeading",get:function(){return this._rotateAmountHeading},set:function(e){this._rotateAmountHeading=+e,this._position.heading+=this._rotateAmountHeading,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Ne.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll)))}},{key:"rotateAmountPitch",get:function(){return this._rotateAmountPitch},set:function(e){this._rotateAmountPitch=+e,this._position.pitch+=this._rotateAmountPitch,(this._position.pitch>=90||this._position.pitch<=-90)&&(this._position.pitch=0),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Ne.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll)))}},{key:"rotateAmountRoll",get:function(){return this._rotateAmountRoll},set:function(e){this._rotateAmountRoll=+e,this._position.roll+=this._rotateAmountRoll,(this._position.roll>=90||this._position.roll<=-90)&&(this._position.roll=0),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Ne.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll)))}},{key:"_mountedHook",value:function(){this.position=this._position,this.modelUrl=this._modelUrl}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.uri,de.merge(this._style,e),de.merge(this._nativeObjCesium.model,e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){Be.parseOption(this._highlight),de.merge(this._nativeObjCesium.model,this._highlight),this.setLabel(this._style)}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){Be.parseOption(this._selectedHighlight),de.merge(this._nativeObjCesium.model,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e,t){var n=Cesium.JulianDate.now(),r=new i(Ne.transformCartesianToWGS84(e.position.getValue(n)),t);return r.attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ft(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)),r}}]),i}(Ze);Ze.registerType("model");const dt=mt;function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var yt=function(e){c(i,e);var t=vt(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,i),e=t.call(this,r);var o=r.url;if(!o)throw new Error("Tileset: url参数不能为空");return e._nativeObjCesium=Cesium.Cesium3DTileset.fromUrl(o,r),e._tileVisibleCallback=void 0,e._properties=void 0,e._state=ke.INITIALIZED,e.selected={feature:void 0,originalColor:new Cesium.Color},e.highlighted={feature:void 0,originalColor:new Cesium.Color},e}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("tileset")}},{key:"ready",value:function(e){return this._whenReady(e),this}},{key:"_whenReady",value:function(e){if(!e)return this;var t=this._nativeObjCesium;return t&&"function"==typeof t.then?t.then(e):t&&e(t),this}},{key:"show",set:function(e){this._show=e,this._whenReady((function(t){t.show=e}))}},{key:"_bindVisibleEvent",value:function(){var e=this;this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._whenReady((function(t){t.tileVisible.addEventListener(e._updateTile,e)}))}},{key:"_updateTile",value:function(e){for(var t=this,i=e.content,n=function(){var e=i.getFeature(r);t._properties&&t._properties.length&&t._properties.forEach((function(t){e.hasProperty(t.key)&&e.getProperty(t.key)===t.keyValue&&e.setProperty(t.propertyName,t.propertyValue)}))},r=0;r<i.featuresLength;r++)n()}},{key:"setPosition",value:function(e){return e=Be.parsePosition(e),this._whenReady((function(t){var i=Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),n=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(e.heading),Cesium.Math.toRadians(e.pitch),Cesium.Math.toRadians(e.roll))));Cesium.Matrix4.multiply(i,n,i),t.root.transform=i})),this}},{key:"setHeadingPitchRoll",value:function(e,t,i){return this._whenReady((function(n){var r=n.root.transform,o=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(e||0),Cesium.Math.toRadians(t||0),Cesium.Math.toRadians(i||0))));Cesium.Matrix4.multiply(r,o,r),n.root.transform=r})),this}},{key:"setLabel",value:function(e,t){return this}},{key:"clampToGround",value:function(){return this._whenReady((function(e){var t=Cesium.Cartographic.fromCartesian(e.boundingSphere.center),i=Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),n=Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,0),r=Cesium.Cartesian3.subtract(n,i,new Cesium.Cartesian3);e.modelMatrix=Cesium.Matrix4.fromTranslation(r)})),this}},{key:"setHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._whenReady((function(i){var n=Cesium.Cartographic.fromCartesian(i.boundingSphere.center),r=Cesium.Cartesian3.fromRadians(n.longitude,n.latitude,n.height),o=Cesium.Cartesian3.fromRadians(n.longitude,n.latitude,t?e:n.height+e),s=Cesium.Cartesian3.subtract(o,r,new Cesium.Cartesian3);i.modelMatrix=Cesium.Matrix4.fromTranslation(s)})),this}},{key:"setScale",value:function(e){return this._whenReady((function(t){var i=t.root.transform;e>0&&1!==e&&Cesium.Matrix4.multiplyByUniformScale(i,e,i),t.root.transform=i})),this}},{key:"setProperties",value:function(e){return this._properties=e,this._bindVisibleEvent(),this}},{key:"setSplitDirection",value:function(e){return this._whenReady((function(t){t.splitDirection=e})),this}},{key:"setCustomShader",value:function(e){return this._whenReady((function(t){t.customShader=e})),this}},{key:"setStyle",value:function(e){return e&&e instanceof Cesium.Cesium3DTileStyle&&(this._style=e,this._whenReady((function(t){t.style=e}))),this}},{key:"clip",value:function(e){var t=this;this._whenReady((function(i){t._clip(i,e)}))}},{key:"_clip",value:function(e,t){if(t&&Array.isArray(t)&&0!=t.length){for(var i=this.getInverseTransform(e),n=[],r=0;r<t.length-1;r++){var o=this.createClippingPlane(t[r],t[r+1],i);n.push(o)}e.clippingPlanes=new Cesium.ClippingPlaneCollection({planes:n,edgeWidth:0,edgeColor:Cesium.Color.WHITE.withAlpha(.7),unionClippingRegions:!1})}else e.clippingPlanes=null}},{key:"createClippingPlane",value:function(e,t,i){var n=this.getOriginCoordinateSystemPoint(e,i),r=this.getOriginCoordinateSystemPoint(t,i),o=null;o=this.unionClippingRegions?new Cesium.Cartesian3(0,0,-1):new Cesium.Cartesian3(0,0,1);var s=Cesium.Cartesian3.subtract(r,n,new Cesium.Cartesian3),a=Cesium.Cartesian3.cross(s,o,new Cesium.Cartesian3);a=Cesium.Cartesian3.normalize(a,a);var l=Cesium.Plane.fromPointNormal(n,a);return Cesium.ClippingPlane.fromPlane(l)}},{key:"getOriginCoordinateSystemPoint",value:function(e,t){var i=Cesium.Cartesian3.fromDegrees(e[0],e[1]);return Cesium.Matrix4.multiplyByPoint(t,i,new Cesium.Cartesian3(0,0,0))}},{key:"getInverseTransform",value:function(e){var t,i=e.root.transform;return t=i&&i.equals(Cesium.Matrix4.IDENTITY)||!i?Cesium.Transforms.eastNorthUpToFixedFrame(e.boundingSphere.center):Cesium.Matrix4.fromArray(e.root.transform),Cesium.Matrix4.inverseTransformation(t,new Cesium.Matrix4)}},{key:"cancelClipping",value:function(){this._whenReady((function(e){e.clippingPlanes=new Cesium.ClippingPlaneCollection({planes:[new Cesium.ClippingPlane(new Cesium.Cartesian3(0,0,-1),1e3)],edgeColor:Cesium.Color.RED,edgeWidth:0})}))}},{key:"isPointInsidePolygon",value:function(e,t){for(var i=e[0],n=e[1],r=!1,o=0,s=t.length-1;o<t.length;s=o++){var a=t[o][0],l=t[o][1],u=t[s][0],c=t[s][1];l>n!=c>n&&i<(u-a)*(n-l)/(c-l)+a&&(r=!r)}return r}},{key:"concavePolygonToConvexPolygons",value:function(e){for(var t,i=[],n=0;n<e.length;n++){var r=e[(n-1+e.length)%e.length],o=e[n],s=e[(n+1)%e.length];this.isPointInsidePolygon(o,[r,s])?t.push(o):(t&&i.push(t),t=[r,o,s])}t&&i.push(t);for(var a=[],l=1;l<i.length-1;l++){var u=i[l];a.push(u)}return a}},{key:"highlight",value:function(e){this.unHighlight(e),e.feature&&e.feature!==this.selected.feature&&(this.highlighted.feature=e.feature,this.highlighted.originalColor=Cesium.clone(e.feature.color),de.merge(e.feature,this._highlight))}},{key:"unHighlight",value:function(e){Cesium.defined(this.highlighted.feature)&&(this.highlighted.feature.color=this.highlighted.originalColor,this.highlighted.feature=void 0)}},{key:"selectedHighlight",value:function(e){e&&e.feature&&(this.selected.feature=e.feature,e.feature===this.highlighted.feature?(this.selected.originalColor=Cesium.clone(this.highlighted.originalColor),this.highlighted.feature=void 0):this.selected.originalColor=Cesium.clone(e.feature.color),this._pSelected=Cesium.clone(this.selected),de.merge(e.feature,this._selectedHighlight))}},{key:"unSelected",value:function(e){Cesium.defined(this.selected.feature)&&(this.selected.feature.color=this.selected.originalColor,this.selected.feature=void 0),e&&e.feature&&e.originalColor&&(e.feature.color=e.originalColor,e.feature=void 0)}}]),i}(Ze);Ze.registerType("tileset");const gt=yt;function _t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ct=function(e){c(i,e);var t=_t(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=Be.parsePosition(e),o._icon=r,o._size=[32,32],o._nativeObjCesium={position:void 0,image:void 0,width:0,height:0},o.position=o._positions,o._state=ke.INITIALIZED,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("billboard_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"position",get:function(){return this._position},set:function(e){this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position)}},{key:"icon",get:function(){return this._icon},set:function(e){this._icon=e,this._nativeObjCesium.image=this._icon}},{key:"size",get:function(){return this._size},set:function(e){if(!Array.isArray(e))throw new Error("Billboard Primitive: the size invalid");this._size=e,this._nativeObjCesium.width=this._size[0]||32,this._nativeObjCesium.height=this._size[1]||32}},{key:"_mountedHook",value:function(){this.position=this._position,this.icon=this._icon,this.size=this._size}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position&&delete e.image&&delete e.width&&delete e.height,de.merge(this._style,e),de.merge(this._nativeObjCesium,e),this):this}}]),i}(Ze);Ze.registerType("billboard_primitive");const bt=Ct;function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Pt=10,Ot=.1,xt=function(e){c(i,e);var t=wt(i);function i(e,r){var o;return n(this,i),(o=t.call(this,e,r))._currentOffset=new Cesium.Cartesian2(0,0),o._isUp=!0,o._state=ke.INITIALIZED,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("bounce_billboard_primitive")}},{key:"update",value:function(){if(this._show){var e=this._style.maxOffsetY||Pt,t=this._style.offsetAmount||Ot;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-e&&(this._isUp=!1),this._currentOffset.y+=t*(this._isUp?-1:1),this._nativeObjCesium.pixelOffset=this._currentOffset}}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(bt);Ze.registerType("bounce_billboard_primitive");const Et=xt;function At(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var kt=function(e){c(i,e);var t=At(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=Be.parsePosition(e),o._text=r,o._nativeObjCesium={position:void 0,text:void 0},o._state=ke.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("label_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"position",get:function(){return this._position},set:function(e){this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position)}},{key:"text",get:function(){return this._text},set:function(e){this._text=e,this._nativeObjCesium.text=this._text}},{key:"_mountedHook",value:function(){this.position=this._position,this.text=this._text}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position&&delete e.text,de.merge(this._style,e),de.merge(this._nativeObjCesium,e),this):this}}]),i}(Ze);Ze.registerType("label_primitive");const Tt=kt;function Mt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Rt=10,St=.1,jt=function(e){c(i,e);var t=Mt(i);function i(e,r){var o;return n(this,i),(o=t.call(this,e,r))._currentOffset=new Cesium.Cartesian2(0,0),o._isUp=!0,o._state=ke.INITIALIZED,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("bounce_label_primitive")}},{key:"update",value:function(){if(this._show){var e=this._style.maxOffsetY||Rt,t=this._style.offsetAmount||St;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-e&&(this._isUp=!1),this._currentOffset.y+=t*(this._isUp?-1:1),this._nativeObjCesium.pixelOffset=this._currentOffset}}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(Tt);Ze.registerType("bounce_label_primitive");const It=jt;function Lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Dt=function(e){c(i,e);var t=Lt(i);function i(e){var r;return n(this,i),(r=t.call(this))._position=Be.parsePosition(e),r._nativeObjCesium={position:void 0,scale:{x:12,y:8}},r._state=ke.INITIALIZED,r.position=r._positions,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("cloud_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"position",get:function(){return this._position},set:function(e){this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position)}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position,de.merge(this._style,e),de.merge(this._nativeObjCesium,e),this):this}}]),i}(Ze);Ze.registerType("cloud_primitive");const Bt=Dt;function Gt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Nt={minRadius:10,minHeight:30,color:Cesium.Color.RED,slices:128,speed:10},zt=function(e){c(i,e);var t=Ht(i);function i(e,r,o){var s;return n(this,i),(s=t.call(this))._center=Be.parsePosition(e),s._nativeObjCesium=void 0,s._height=o,s._radius=r,s._currentHeight=o||0,s._currentRadius=10,s._style=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Gt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Nt),s._state=ke.INITIALIZED,s}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("diffuse_wall_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere(Math.max(this._radius||0,this._height||0,10))}},{key:"center",get:function(){return this._center},set:function(e){return this._center=Be.parsePosition(e),this}},{key:"radius",get:function(){return this._radius},set:function(e){return this._radius=e,this}},{key:"height",get:function(){return this._height},set:function(e){return this._height=e,this}},{key:"_getPositions",value:function(){for(var e=[],t=Cesium.Transforms.eastNorthUpToFixedFrame(Ne.transformWGS84ToCartesian(this._center)),i=0;i<this._style.slices;i++){var n=i/this._style.slices*Cesium.Math.TWO_PI,r=Math.cos(n),o=Math.sin(n),s=new Cesium.Cartesian3(r*this._currentRadius,o*this._currentRadius,0);e.push(Cesium.Matrix4.multiplyByPoint(t,s,new Cesium.Cartesian3))}return e.push(e[0]),e}},{key:"_getHeights",value:function(e,t){for(var i=[],n=0;n<e;n++)i.push(t);return i}},{key:"update",value:function(e){if(this._nativeObjCesium=this._nativeObjCesium&&this._nativeObjCesium.destroy(),this._currentRadius+=this._radius/this._style.speed/20,this._currentHeight-=this._height/this._style.speed/20,(this._currentRadius>this._radius||this._currentHeight<this._style.minHeight)&&(this._currentRadius=this._style.minRadius,this._currentHeight=this._height),!this._style.slices||this._style.slices<3)return!1;var t=this._getPositions();if(!t||!t.length)return!1;var i=new Cesium.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:i}),appearance:new Cesium.MaterialAppearance({material:Cesium.Material.fromType("WallDiffuse",{color:this._style.color}),flat:!0}),asynchronous:!1}),this._nativeObjCesium.update(e)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(de.merge(this._style,e),this):this}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(Ze);Ze.registerType("diffuse_wall_primitive");const Ft=zt;function Wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ut=function(e){c(i,e);var t=Wt(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=Be.parsePosition(e),o._radius=r||{x:10,y:10,z:10},o._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o.position=o._positions,o._state=ke.INITIALIZED,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("elec_ellipsoid_primitive")}},{key:"boundingSphere",get:function(){var e=this._radius||{};return this._computeBoundingSphere(Math.max(e.x||0,e.y||0,e.z||0,10))}},{key:"position",get:function(){return this._position},set:function(e){this._position=Be.parsePosition(e),this._nativeObjCesium.geometryInstances.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(Ne.transformWGS84ToCartesian(this._position))}},{key:"radius",get:function(){return this._radius},set:function(e){this._radius=e,this._nativeObjCesium.geometryInstances.geometry=new Cesium.EllipsoidGeometry({radii:this._radius,maximumCone:Cesium.Math.PI_OVER_TWO})}},{key:"_setAppearance",value:function(){this._style&&(this._nativeObjCesium.appearance=new Cesium.MaterialAppearance({material:Cesium.Material.fromType("EllipsoidElectric",{color:this._style.color||Cesium.Color.GREEN,speed:this._style.speed||5})}))}},{key:"_mountedHook",value:function(){this.radius=this._radius,this.position=this._position,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(de.merge(this._style,e),this._setAppearance(),this):this}}]),i}(Ze);Ze.registerType("elec_ellipsoid_primitive");const Vt=Ut;function qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Zt=function(e){c(i,e);var t=qt(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return n(this,i),(r=t.call(this))._positions=Be.parsePositions(e),r._width=o,r._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}}),compressVertices:!1,allowPicking:!1}),r.positions=r._positions,r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("flow_line_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=Be.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolylineGeometry({positions:Ne.transformWGS84ArrayToCartesianArray(this._positions),width:this._width,vertexFormat:Cesium.PolylineMaterialAppearance.VERTEX_FORMAT})}},{key:"_setAppearance",value:function(){this._nativeObjCesium.appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineFlowType,{color:this._style.color||new Cesium.Color(1,0,0,.7),speed:this._style.speed||1,percent:this._style.percent||.03,gradient:this._style.gradient||.1})})}},{key:"_mountedHook",value:function(){this.positions=this._positions,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(de.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(Ze);Ze.registerType("flow_line_primitive");const Yt=Zt;function Kt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Xt={color:Cesium.Color.ORANGE},Jt=function(e){c(i,e);var t=Qt(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._center=Be.parsePosition(e),a._length=r||100,a._topRadius=o||1,a._bottomRadius=s||50,a._nativeObjCesium=new Cesium.PrimitiveCollection,a.center=a._center,a._style=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Kt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Xt),a._state=ke.INITIALIZED,a}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("light-cylinder-primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere(Math.max(this._length||0,this._bottomRadius||0,10))}},{key:"center",get:function(){return this._center},set:function(e){this._center=Be.parsePosition(e),this._updatePrimitives()}},{key:"length",get:function(){return this._length},set:function(e){this._length=e,this._updatePrimitives()}},{key:"topRadius",get:function(){return this._topRadius},set:function(e){this._topRadius=e,this._updatePrimitives()}},{key:"bottomRadius",get:function(){return this._bottomRadius},set:function(e){this._bottomRadius=e,this._updatePrimitives()}},{key:"_computeEllipsePositions",value:function(e,t){var i=Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:Ne.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),n=Cesium.Cartesian3.unpackArray(i.outerPositions);return n.push(n[0]),n}},{key:"_createCylinderInstance",value:function(e,t,i){for(var n=t.slice(),r=t.length,o=2*r,s=[],a=1/(r-1),l=[],u=[],c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Cesium.Cartographic.fromCartesian(e);return i.height+=t,Cesium.Cartographic.toCartesian(i)},h=0;h<r;h++){u.push(c(e[h],i)),s.push(h*a,0);var f=(h+1)%r,p=o-(h+1);l.push.apply(l,[p-1,p,h]),l.push.apply(l,[h,f,p-1])}for(var m in u)n.push(u[r-m-1]),s.push(1-m*a,1);var d=Cesium.PolygonGeometry.createGeometry(new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(n),perPositionHeight:!0}));return d.indices=l,d.attributes.st.values=s,new Cesium.GeometryInstance({geometry:d})}},{key:"_getCircleImage",value:function(){var e=document.createElement("canvas");e.width=512,e.height=512;var t=e.getContext("2d");return t.fillStyle="rgba(255,255,255,0)",t.strokeStyle="rgba(255, 255, 255,255)",t.setLineDash([50,50]),t.lineWidth=30,t.beginPath(),t.arc(256,256,150,0,2*Math.PI,!0),t.stroke(),t.restore(),e}},{key:"_getParticlesImage",value:function(e){var t=document.createElement("canvas");t.width=64,t.height=256;var i=t.getContext("2d");return i.clearRect(0,0,64,256),i.drawImage(e,0,0),i.drawImage(e,33,0),t}},{key:"_updatePrimitives",value:function(){var e=this;this._nativeObjCesium.removeAll();var t=0===this._center.alt,i=this._computeEllipsePositions(this._center,this._topRadius),n=this._computeEllipsePositions(this._center,.7*this._bottomRadius),r=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(this._computeEllipsePositions(this._center,2*this._bottomRadius)),perPositionHeight:!t}),asynchronous:!1})},s=t?new Cesium.GroundPrimitive(o):new Cesium.Primitive(o);s.appearance=new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType(Cesium.Material.CircleRingType,{color:this._style.color})});var a=t?new Cesium.GroundPrimitive(o):new Cesium.Primitive(o);a.appearance=new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType(Cesium.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});var l=new Cesium.Primitive({geometryInstances:this._createCylinderInstance(i,n,this._length),appearance:new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType(Cesium.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});t?Cesium.GroundPrimitive.initializeTerrainHeights().then((function(){e._nativeObjCesium.add(s),e._nativeObjCesium.add(a),e._nativeObjCesium.add(l)})):(this._nativeObjCesium.add(s),this._nativeObjCesium.add(a),this._nativeObjCesium.add(l)),Cesium.Resource.fetchImage({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjExQTg0NDEyMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjExQTg0NDEzMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTFBODQ0MTAwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTFBODQ0MTEwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz41vRwAAAAE90lEQVR42uydyW4UMRCG3T2dgYSAEGs4sp44cCJBcGUJbwCvALwWPAI8ABwAiUVwgLBdkEikJEiAGMhkZqhfU1aa1sy0g+yaJPyWSupOpPjz0uVyucrJer2eG2fJ3ZgLAQhAgC0PgN8XIlkqgGLE75oih0WmRVZEvop0rHog18rnRe6IzInsthyCXFt+TuSKyGmRXZZDgK5eFrkv8l7kiUhrxN/JSo3pigSvcNmI1bCh3b5LK2+NqHyvyEF9x3z5HgqRRViOAXhW5JrCoNdei/y20gMYxhmRSyIXRY6JTMT4DENLW+SdyD19x/NajDmwmYIW79Hnn+MA4GJEAAIQgABJbMJB+n5Sl9zWZvR9DABUfkJkVt8fi3zUldAEoKl24Y2S1fPZEmBdZFHkkb4vxTLRQ5djbyUf0ncYrD/UADUB8MZno2Q19yx7gIqIAAQgAAEIQIAtYZT+85LvRnjQCoPKR3rQUgN4Y3ZeK30g8qps0qeeAzDn4TWD9+ySG+BBS90DaGnVg9a2tgnR4il9/jkOACoiAhCAAASIZpAAFl6yulO0JACo/IDrn6CedP1zxOciv6wAYNnAP3RVBeWtJQCWzG8iL/X9g4vkqNzMctzUXtintt2KM/aS+bmQaY90rb8CF6tSKiICEIAABCAAAQiwbfcFIWVCbUcc9bZDLKiYAKj4uOv7Bb+ILLj+8W7PCgC7Jhzv44Qdh9yrru8V61jPgd645gD2io+15RiC5ZA5ENNPmGmDmtrta9YAVEQE2FlrQUM/J6efU8cSAD87ojodBaccS6kgiiErGiq/qe93XT+3oGU5BJnbyKrIUs6BQZoQUEcrQ7CYagiGqeKiMgnXLXsg5uJUm/RQJKy8fGS7PMw6SgVQPrJFGZr0kCfUL/7IFjIzrLGpemBQ0kPbehL6I9vMjUh6oEVEAAIQgAAEIAABdpyj0qcK71YrqGUJANNrv+sHOcAiRpDDM1cTY1BEHk7kqyP/2Ac5vLEEQEG8aDnIoTb5ObZRWg5ywG5o1dX4ClNYxT7IISgJPsXGpLut9MCWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII="}).then((function(t){var n=new Cesium.Primitive({geometryInstances:e._createCylinderInstance(i,r,e._length),appearance:new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType(Cesium.Material.CylinderParticlesType,{color:e._style.color,image:e._getParticlesImage(t)})}),asynchronous:!1});e._nativeObjCesium.add(n)}))}},{key:"_mountedHook",value:function(){this.center=this._center}},{key:"update",value:function(e){this._nativeObjCesium.update(e)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(de.merge(this._style,e),this):this}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(Ze);Ze.registerType("light-cylinder-primitive");const $t=Jt;function ei(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}function ti(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ii(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ti(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ti(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var ni=function(e){c(i,e);var t=ei(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,i),e=t.call(this),!Cesium.defined(r.url)&&!Cesium.defined(r.gltf))throw new Error("one of parameters url or gltf must be provided.");e._position=Cesium.defined(r.position)?Be.parsePosition(r.position):null,e._modelUrl=r.url,e._state=ke.INITIALIZED,e._nativeModel=null;var o=function(e){return Cesium.defined(e.modelMatrix)?e:Cesium.defined(e.position)?(e.position instanceof Cesium.Cartesian3?t=e.position:e.position instanceof Ie&&(t=Ne.transformWGS84ToCartesian(e.position)),t?ii(ii({},e),{},{modelMatrix:Cesium.Transforms.eastNorthUpToFixedFrame(t)}):e):e;var t}(r);if(Cesium.defined(r.gltf))e._nativeObjCesium=new Cesium.Model(o),e._readyPromise=Promise.resolve(e._nativeObjCesium),e._nativeModel=e._nativeObjCesium;else{var s=Cesium.Model.fromGltfAsync(o);e._readyPromise=s,e._nativeObjCesium=s,s.then((function(t){e._nativeModel=t,e._state=ke.ADDED}))}return e}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("model_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"ready",get:function(){return!(!this._nativeModel||!this._nativeModel._ready)}},{key:"readyPromise",get:function(){return this._readyPromise}},{key:"nativeObjCesium",get:function(){return this._nativeModel}},{key:"position",get:function(){return this._position},set:function(e){if(this._position=e?Be.parsePosition(e):null,this._nativeModel&&this._position){var t=Ne.transformWGS84ToCartesian(this._position);this._nativeModel.modelMatrix=Cesium.Transforms.headingPitchRollToFixedFrame(t,new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll)))}}},{key:"modelUrl",get:function(){return this._modelUrl},set:function(e){var t=this;this._modelUrl=e;var i=Cesium.Model.fromGltfAsync({url:e});this._nativeObjCesium=i,this._readyPromise=i,i.then((function(e){t._nativeModel=e,t._layer&&t._layer.nativeObjCesium&&t._layer.nativeObjCesium.add&&t._layer.nativeObjCesium.add(e)})),this.position=this._position}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"getMaterial",value:function(e){return this._nativeModel&&this._nativeModel.getMaterial(e)}},{key:"getMesh",value:function(e){return this._nativeModel&&this._nativeModel.getMesh(e)}},{key:"getNode",value:function(e){return this._nativeModel&&this._nativeModel.getNode(e)}},{key:"getNodes",value:function(){return this._nativeModel&&this._nativeModel._runtime?this._nativeModel._runtime.nodes:void 0}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(de.merge(this._style,e),this._nativeModel&&de.merge(this._nativeModel,e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){Be.parseOption(this._highlight),this._nativeModel&&de.merge(this._nativeModel,this._highlight),this.setLabel(this._style)}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){Be.parseOption(this._selectedHighlight),this._nativeModel&&de.merge(this._nativeModel,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}]),i}(Ze);Ze.registerType("model_primitive");const ri=ni;function oi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var si={pixelSize:8,outlineColor:Cesium.Color.BLUE,outlineWidth:2},ai=function(e){c(i,e);var t=oi(i);function i(e){var r;return n(this,i),(r=t.call(this))._position=Be.parsePosition(e),r._nativeObjCesium={position:void 0},r._state=ke.INITIALIZED,r.position=r._position,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("point_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"position",get:function(){return this._position},set:function(e){this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position)}},{key:"_mountedHook",value:function(){this.position=this._position,de.merge(this._nativeObjCesium,si,this._style)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position,de.merge(this._style,e),de.merge(this._nativeObjCesium,si,this._style),this):this}}]),i}(Ze);Ze.registerType("point_primitive");const li=ai;function ui(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ci=function(e){c(i,e);var t=ui(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=Be.parsePositions(e),r._nativeObjCesium={positions:[]},r.positions=r._positions,r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("polyline_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=Be.parsePositions(e),this._nativeObjCesium.positions=Ne.transformWGS84ArrayToCartesianArray(this._positions)}},{key:"center",get:function(){return Xe(this._positions)}},{key:"distance",get:function(){return et(this._positions)}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.positions,de.merge(this._style,e),de.merge(this._nativeObjCesium,e),this):this}}]),i}(Ze);Ze.registerType("polyline_primitive");const hi=ci;var fi=["czm_material czm_getMaterial(czm_materialInput materialInput) {"," czm_material material = czm_getDefaultMaterial(materialInput);"," vec2 st = materialInput.st;"," float t = fract(startTime + czm_frameNumber * speed / 1000.0);"," t *= 1.03;"," float alpha = smoothstep(t - pointWidth, t, st.s) * step(st.s, t);"," material.diffuse = color.rgb * alpha + bgColor.rgb * (1.0 - alpha);"," material.alpha = (color.a * alpha + bgColor.a * (1.0 - alpha)) * globalAlpha;"," return material;","}"].join("\n"),pi=["czm_material czm_getMaterial(czm_materialInput materialInput) {"," czm_material material = czm_getDefaultMaterial(materialInput);"," material.diffuse = color.rgb;"," material.alpha = color.a;"," return material;","}"].join("\n"),mi=[.02,.012,.008,.005],di=[2e6,6e6,12e6];function vi(e,t){var i=e.replace("#",""),n=parseInt(i.substr(0,2),16)/255,r=parseInt(i.substr(2,2),16)/255,o=parseInt(i.substr(4,2),16)/255;return new Cesium.Color(n,r,o,t)}var yi={lineColor:"#6984a0",lineAlpha:.45,lineWidth:1,dotColor:"#8ca8c7",dotAlpha:.5,dotWidth:2.5,speed:2,dotLength:1,globalAlpha:1,bidirectional:!1,height:100,showLine:!0,showDot:!0};const gi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),this._viewer=t.viewer,!this._viewer)throw new Error("ODLinePrimitive: viewer is required");this._id=de.uuid(),this._state=ke.INITIALIZED,this._options=de.merge({},yi,t),this._lineMaterial=null,this._linePrimitive=null,this._dotMaterials=[],this._dotPrimitives=[],this._dataSnapshot=t.data||t.geojson,this._build()}return a(e,[{key:"id",get:function(){return this._id}},{key:"type",get:function(){return"od_line_primitive"}},{key:"state",get:function(){return this._state}},{key:"options",get:function(){return Object.assign({},this._options)}},{key:"show",get:function(){return void 0===this._show||this._show},set:function(e){this._show=e,this._linePrimitive&&(this._linePrimitive.show=e&&this._options.showLine),this._dotPrimitives.forEach((function(t){t.show=e&&this._options.showDot}))}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e||0===Object.keys(e).length)return this;(("data"in e||"geojson"in e)&&(this._dataSnapshot=e.data||e.geojson),de.merge(this._options,e),["lineWidth","dotWidth","bidirectional","height"].some((function(t){return t in e}))||"data"in e||"geojson"in e)?this._rebuild():["lineColor","lineAlpha","dotColor","dotAlpha","speed","dotLength","globalAlpha"].some((function(t){return t in e}))&&this._applyLiveParams();return["showLine","showDot"].some((function(t){return t in e}))&&this._applyShowFlags(),this}},{key:"setLineColor",value:function(e){this.setOptions({lineColor:e})}},{key:"setLineAlpha",value:function(e){this.setOptions({lineAlpha:e})}},{key:"setLineWidth",value:function(e){this.setOptions({lineWidth:e})}},{key:"setDotColor",value:function(e){this.setOptions({dotColor:e})}},{key:"setDotAlpha",value:function(e){this.setOptions({dotAlpha:e})}},{key:"setDotWidth",value:function(e){this.setOptions({dotWidth:e})}},{key:"setSpeed",value:function(e){this.setOptions({speed:e})}},{key:"setDotLength",value:function(e){this.setOptions({dotLength:e})}},{key:"setGlobalAlpha",value:function(e){this.setOptions({globalAlpha:e})}},{key:"setBidirectional",value:function(e){this.setOptions({bidirectional:e})}},{key:"flyTo",value:function(e){if(this._linePrimitive){var t=this._linePrimitive.boundingSphere;t&&this._viewer.camera.flyToBoundingSphere(t,{duration:void 0!==e?e:1.5})}}},{key:"setData",value:function(e){this._dataSnapshot=e,this._rebuild()}},{key:"destroy",value:function(){this._linePrimitive&&(this._viewer.scene.primitives.remove(this._linePrimitive),this._linePrimitive=null),this._dotPrimitives.forEach((function(e){this._viewer.scene.primitives.remove(e)}),this),this._lineMaterial=null,this._dotPrimitives=[],this._dotMaterials=[],this._state=ke.REMOVED}},{key:"_applyLiveParams",value:function(){if(this._lineMaterial&&("lineColor"in this._options||"lineAlpha"in this._options)&&(this._lineMaterial.uniforms.color=this._makeLineColor()),("dotColor"in this._options||"dotAlpha"in this._options)&&this._dotMaterials.length){var e=this._makeDotColor();this._dotMaterials.forEach((function(t){t.uniforms.color=e}))}"speed"in this._options&&this._dotMaterials.forEach((function(e){e.uniforms.speed=this._options.speed}),this),"dotLength"in this._options&&this._dotMaterials.forEach((function(e,t){e.uniforms.pointWidth=mi[t]*this._options.dotLength}),this),"globalAlpha"in this._options&&this._dotMaterials.forEach((function(e){e.uniforms.globalAlpha=this._options.globalAlpha}),this)}},{key:"_applyShowFlags",value:function(){this._linePrimitive&&(this._linePrimitive.show=this.show&&this._options.showLine),this._dotPrimitives.forEach((function(e){e.show=this.show&&this._options.showDot}),this)}},{key:"_makeLineColor",value:function(){return vi(this._options.lineColor,this._options.lineAlpha)}},{key:"_makeDotColor",value:function(){return vi(this._options.dotColor,this._options.dotAlpha)}},{key:"_build",value:function(){var e=this._dataSnapshot;if(e&&e.features){var t=this._viewer.scene,i=this._options,n=[],r=[[],[],[],[]];e.features.forEach((function(e){var t=e.geometry;t&&("LineString"===t.type?[t.coordinates]:t.coordinates).forEach((function(e){if(e&&!(e.length<2)){var t=[];e.forEach((function(e){t.push(e[0],e[1],i.height)}));var o=Cesium.Cartesian3.fromDegreesArrayHeights(t);n.push(new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:o,width:i.lineWidth,vertexFormat:Cesium.PolylineMaterialAppearance.VERTEX_FORMAT})}));for(var s=0,a=0;a<e.length-1;a++){s+=new Cesium.EllipsoidGeodesic(Cesium.Cartographic.fromDegrees(e[a][0],e[a][1]),Cesium.Cartographic.fromDegrees(e[a+1][0],e[a+1][1])).surfaceDistance}for(var l=3,u=0;u<di.length;u++)if(s<di[u]){l=u;break}r[l].push(new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:o,width:i.dotWidth,vertexFormat:Cesium.PolylineMaterialAppearance.VERTEX_FORMAT})}))}}))})),this._lineMaterial=new Cesium.Material({fabric:{type:"ODLineBase_"+Date.now(),uniforms:{color:this._makeLineColor()},source:pi},translucent:!0}),this._linePrimitive=new Cesium.Primitive({geometryInstances:n,appearance:new Cesium.PolylineMaterialAppearance({material:this._lineMaterial,translucent:!0}),releaseGeometryInstances:!1,asynchronous:!1}),t.primitives.add(this._linePrimitive),this._linePrimitive.show=this.show&&i.showLine;var o=this._makeDotColor(),s=new Cesium.Color(0,0,0,0);r.forEach((function(e,n){if(e.length){var r=new Cesium.Material({fabric:{type:"ODLineDot_"+n,uniforms:{color:o,bgColor:s,speed:i.speed,startTime:Math.random(),bidirectional:i.bidirectional?1:0,globalAlpha:i.globalAlpha,pointWidth:mi[n]*i.dotLength},source:fi},translucent:!0}),a=new Cesium.Primitive({geometryInstances:e,appearance:new Cesium.PolylineMaterialAppearance({material:r,translucent:!0}),releaseGeometryInstances:!0,asynchronous:!1});t.primitives.add(a),a.show=this.show&&i.showDot,this._dotMaterials.push(r),this._dotPrimitives.push(a)}}),this),this._state=ke.ADDED}else console.warn("ODLinePrimitive: missing data")}},{key:"_rebuild",value:function(){this._dataSnapshot&&(this.destroy(),this._build())}}]),e}();function _i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ci=function(e){c(i,e);var t=_i(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=Be.parsePosition(e),o._radius=r,o._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o._state=ke.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("scan_circle_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere(this._radius||10)}},{key:"position",get:function(){return this._position},set:function(e){this._position=Be.parsePosition(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.EllipseGeometry({center:Ne.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}},{key:"radius",get:function(){return this._radius},set:function(e){this._radius=e,this._nativeObjCesium.geometryInstances.geometry.semiMajorAxis=this._radius,this._nativeObjCesium.geometryInstances.geometry.semiMinorAxis=this._radius}},{key:"_setAppearance",value:function(){this._style&&(this._nativeObjCesium.appearance=new Cesium.MaterialAppearance({material:Cesium.Material.fromType("CircleScan",{color:this._style.color||Cesium.Color.WHITE,speed:this._style.speed||10})}))}},{key:"_mountedHook",value:function(){this.position=this._position,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(de.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(Ze);Ze.registerType("scan_circle_primitive");const bi=Ci;function wi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Pi=function(e){c(i,e);var t=wi(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return n(this,i),(r=t.call(this))._positions=Be.parsePositions(e),r._width=o,r._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),r._state=ke.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("trail_line_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=Be.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolylineGeometry({positions:Ne.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}},{key:"_setAppearance",value:function(){this._nativeObjCesium.appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType("PolylineTrail",{color:this._style.color||new Cesium.Color(1,0,0,.7),speed:this._style.speed||5})})}},{key:"_mountedHook",value:function(){this.positions=this._positions,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(de.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(Ze);Ze.registerType("trail_line_primitive");const Oi=Pi;function xi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ei=function(e){c(i,e);var t=xi(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._positions=Be.parsePositions(e),o._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o._video=r,o._state=ke.INITIALIZED,o.positions=o._positions,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("video_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=Be.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=Cesium.PolygonGeometry.fromPositions({positions:Ne.transformWGS84ArrayToCartesianArray(this._positions),height:this._style.height,extrudedHeight:this._style.extrudedHeight,closeTop:this._style.closeTop,closeBottom:this._style.closeBottom,vertexFormat:Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}},{key:"video",get:function(){return this._video},set:function(e){this._video=e,this._setAppearance()}},{key:"_setAppearance",value:function(){this._nativeObjCesium.appearance=new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType("Image",{image:this._video})})}},{key:"_mountedHook",value:function(){this.positions=this._positions,this.video=this._video}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(de.merge(this._style,e),this._style.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType)),this}}]),i}(Ze);Ze.registerType("video_primitive");const Ai=Ei;function ki(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ti=function(e){c(i,e);var t=ki(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n(this,i),(r=t.call(this))._positions=Be.parsePositions(e),r._holes=o.map((function(e){return Be.parsePositions(e)})),r._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),r._state=ke.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("water_primitive")}},{key:"boundingSphere",get:function(){return this._computeBoundingSphere()}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=Be.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Ne.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map((function(e){return new Cesium.PolygonHierarchy(Ne.transformWGS84ArrayToCartesianArray(e))}))),height:this._style.height||0,extrudedHeight:this._style.extrudedHeight||0,closeTop:this._style.closeTop||!0,closeBottom:this._style.closeBottom||!0,vertexFormat:Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}},{key:"_setAppearance",value:function(){this._style&&(this._nativeObjCesium.appearance=new Cesium.EllipsoidSurfaceAppearance({material:Cesium.Material.fromType("Water",{baseWaterColor:this._style.baseWaterColor||new Cesium.Color(.2,.3,.6,1),blendColor:this._style.blendColor||new Cesium.Color(0,1,.699,1),specularMap:this._style.specularMap||Cesium.Material.DefaultImageId,normalMap:this._style.normalMap||Cesium.buildModuleUrl("static/images/water/waterNormalsSmall.jpg"),frequency:this._style.frequency||1e3,animationSpeed:this._style.animationSpeed||.01,amplitude:this._style.amplitude||10,specularIntensity:this._style.specularIntensity||.5})}))}},{key:"_mountedHook",value:function(){this.positions=this._positions,!this._nativeObjCesium.appearance&&this._setAppearance()}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e)return 0===Object.keys(e).length||(de.merge(this._style,e),this._style.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(Ze);Ze.registerType("water_primitive");const Mi=Ti;function Ri(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Si(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ji=function(e){c(i,e);var t=Si(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._nativeObjCesium=new Cesium.Entity({billboard:{}}),r._position=Be.parsePosition(e),r.position=r._position,de.merge(r._style,o),r.setOptions(o),r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("billboard")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position),this}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(de.merge(this._style,e),de.merge(this._nativeObjCesium.billboard,e),this.setLabel(this._style),this.originOption=Cesium.clone(this._style,!1),this):this}},{key:"highlight",value:function(){Be.parseOption(this._highlight),de.merge(this._nativeObjCesium.billboard,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){Be.parseOption(this._selectedHighlight),de.merge(this._nativeObjCesium.billboard,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now(),r=Ne.transformCartesianToWGS84(e.position.getValue(n));return e.billboard&&((t=new i(r,{image:e.billboard.image.getValue(n)})).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ri(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ri(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n))),t}}]),i}(Ze);Ze.registerType("billboard");const Ii=ji;function Li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Di=function(e){c(i,e);var t=Li(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._position=Be.parsePosition(e),a._length=r,a._width=o,a._height=s,a._nativeObjCesium=new Cesium.Entity({box:{dimensions:{x:+a._length,y:+a._width,z:+a._height}}}),a.position=a._position,a._state=ke.INITIALIZED,a}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("box")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Ne.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"length",get:function(){return this._length},set:function(e){return this._length=e||0,this._nativeObjCesium.box.dimensions.x=+this._length,this}},{key:"width",get:function(){return this._width},set:function(e){return this._width=e||0,this._nativeObjCesium.box.dimensions.y=+this._width,this}},{key:"height",get:function(){return this._height},set:function(e){return this._height=e||0,this._nativeObjCesium.box.dimensions.z=+this._height,this}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.length&&delete e.width&&delete e.height,de.merge(this._style,e),de.merge(this._nativeObjCesium.box,e)),this}}]),i}(Ze);Ze.registerType("box");const Bi=Di;function Gi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Hi(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Gi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Gi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ni(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var zi=function(e){c(i,e);var t=Ni(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._nativeObjCesium=new Cesium.Entity({polygon:{}}),o._center=Be.parsePosition(e),o._radius=+r||0,o._rotateAmount=0,o._stRotation=0,o._state=ke.INITIALIZED,o.center=o._center,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("circle")}},{key:"center",get:function(){return this._center},set:function(e){return this._center=Be.parsePosition(e),this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy(),this}},{key:"radius",get:function(){return this._radius},set:function(e){return this._radius=+e,this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy(),this}},{key:"rotateAmount",get:function(){return this._rotateAmount},set:function(e){var t=this;return this._rotateAmount=+e,this._nativeObjCesium.polygon.stRotation=new Cesium.CallbackProperty((function(){return t._stRotation+=t._rotateAmount,(t._stRotation>=360||t._stRotation<=-360)&&(t._stRotation=0),Cesium.Math.toRadians(t._stRotation)}),!1),this}},{key:"_computeHierarchy",value:function(){var e=new Cesium.PolygonHierarchy,t=Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:Ne.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),i=Cesium.Cartesian3.unpackArray(t.outerPositions);return i.push(i[0]),e.positions=i,e}},{key:"_mountedHook",value:function(){this.center=this._center}},{key:"setLabel",value:function(e,t){return this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._center),this._nativeObjCesium.label=Hi(Hi({},t),{},{text:e}),this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.positions,de.merge(this._style,e),de.merge(this._nativeObjCesium.polygon,e),this):this}}]),i}(Ze);Ze.registerType("circle");const Fi=zi;function Wi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ui(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Vi=function(e){c(i,e);var t=Ui(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=Be.parsePositions(e),r._nativeObjCesium=new Cesium.Entity({corridor:{}}),r._state=ke.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("corridor")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=Be.parsePositions(e),this._nativeObjCesium.corridor.positions=Ne.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.positions,de.merge(this._style,e),de.merge(this._nativeObjCesium.corridor,e)),this}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polyline&&((t=new i(Ne.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(n)))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Wi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Wi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(Ze);Ze.registerType("corridor");const qi=Vi;function Zi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Yi=function(e){c(i,e);var t=Zi(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._position=Be.parsePosition(e),a._length=+r||0,a._topRadius=+o||0,a._bottomRadius=+s||0,a._nativeObjCesium=new Cesium.Entity({cylinder:{}}),a._state=ke.INITIALIZED,a.position=a._position,a}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("cylinder")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Ne.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"length",get:function(){return this._length},set:function(e){return this._length=+e||0,this._nativeObjCesium.cylinder.length=this._length,this}},{key:"topRadius",get:function(){return this._topRadius},set:function(e){return this._topRadius=+e||0,this._nativeObjCesium.cylinder.topRadius=this._topRadius,this}},{key:"bottomRadius",get:function(){return this._bottomRadius},set:function(e){return this._bottomRadius=+e||0,this._nativeObjCesium.cylinder.bottomRadius=this._bottomRadius,this}},{key:"_mountedHook",value:function(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.length&&delete e.topRadius&&delete e.bottomRadius,de.merge(this._style,e),de.merge(this._nativeObjCesium.cylinder,e)),this}}]),i}(Ze);Ze.registerType("cylinder");const Ki=Yi;function Qi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Xi=function(e){c(i,e);var t=Qi(i);function i(e,r,o){var s;return n(this,i),(s=t.call(this))._position=Be.parsePosition(e),s._semiMajorAxis=+r||0,s._semiMinorAxis=+o||0,s._nativeObjCesium=new Cesium.Entity({ellipse:{}}),s._state=ke.INITIALIZED,s.position=s._position,s}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("ellipse")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Ne.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"semiMajorAxis",get:function(){return this._semiMajorAxis},set:function(e){return this._semiMajorAxis=+e||0,this._nativeObjCesium.ellipse.semiMajorAxis=this._semiMajorAxis,this}},{key:"semiMinorAxis",get:function(){return this._semiMinorAxis},set:function(e){return this._semiMinorAxis=+e||0,this._nativeObjCesium.ellipse.semiMinorAxis=this._semiMinorAxis,this}},{key:"_mountedHook",value:function(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.semiMajorAxis&&delete e.semiMinorAxis,de.merge(this._style,e),de.merge(this._nativeObjCesium.ellipse,e)),this}}]),i}(Ze);Ze.registerType("ellipse");const Ji=Xi;function $i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var en=function(e){c(i,e);var t=$i(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=Be.parsePosition(e),o._radius=r||{x:10,y:10,z:10},o._nativeObjCesium=new Cesium.Entity({ellipsoid:{}}),o._state=ke.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("ellipsoid")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Ne.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"radius",get:function(){return this._radius},set:function(e){return this._radius=e||{x:10,y:10,z:10},this._nativeObjCesium.ellipsoid.radii=this._radius,this}},{key:"_mountedHook",value:function(){this.position=this._position,this.radius=this._radius}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.radius,de.merge(this._style,e),de.merge(this._nativeObjCesium.ellipsoid,e)),this}}]),i}(Ze);Ze.registerType("ellipsoid");const tn=en;function nn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var on={text:"test",color:"#ffff00"},sn=function(e){c(i,e);var t=rn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this))._nativeObjCesium=new Cesium.Entity({label:{}}),r._position=Be.parsePosition(e),r._state=ke.INITIALIZED,r.position=r._position,r._style=de.merge(r._style,on,o),r.setOptions(r._style),r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("label")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position),this}},{key:"text",get:function(){return this._text},set:function(e){return this._text=e,this._nativeObjCesium.label.text=this._text,this}},{key:"_mountedHook",value:function(){this.position=this._position}},{key:"highlight",value:function(){Be.parseOption(this._highlight),de.merge(this._nativeObjCesium.label,this._highlight)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position,Be.parseOption(e),e.fillColor=e.color,de.merge(this._style,e),de.merge(this._nativeObjCesium.label,e),this):this}}],[{key:"fromEntity",value:function(e){var t=Cesium.JulianDate.now(),n=Ne.transformCartesianToWGS84(e.position.getValue(t)),r=void 0;return e.billboard&&((r=new i(n,e.name)).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):nn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(t))),r}}]),i}(Ze);Ze.registerType("label");const an=sn;function ln(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var un=function(e){c(i,e);var t=ln(i);function i(e,r,o){var s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(n(this,i),(s=t.call(this))._position=Be.parsePosition(e),s._width=+r||0,s._height=+o||0,a.normal&&"string"==typeof a.normal){var l=String(a.normal).toLocaleUpperCase();a.normal="X"===l?Cesium.Cartesian3.UNIT_X:"Y"===l?Cesium.Cartesian3.UNIT_Y:Cesium.Cartesian3.UNIT_Z}else a.normal=Cesium.Cartesian3.UNIT_Z;return s._normal=a.normal,s._distance=a.distance||0,s._nativeObjCesium=new Cesium.Entity({plane:{dimensions:{x:s._width,y:s._height},plane:new Cesium.Plane(s._normal,s._distance)}}),s.position=s._position,s._state=ke.INITIALIZED,s}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("plane")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Ne.transformWGS84ToCartesian(this._position),new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._position.heading),Cesium.Math.toRadians(this._position.pitch),Cesium.Math.toRadians(this._position.roll))),this}},{key:"width",get:function(){return this._width},set:function(e){return this._width=+e||0,this._nativeObjCesium.plan.dimensions.x=this._width,this}},{key:"height",get:function(){return this._height},set:function(e){return this._height=+e||0,this._nativeObjCesium.plan.dimensions.y=this._height,this}},{key:"distance",get:function(){return this._distance},set:function(e){return this._distance=e,this._nativeObjCesium.plane.plane.distance=e,this}},{key:"_mountedHook",value:function(){this.position=this._position,this.distance=this._distance}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.dimensions,de.merge(this._style,e),de.merge(this._nativeObjCesium.plane,e)),this}}]),i}(Ze);Ze.registerType("plane");const cn=un;function hn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var pn={pixelSize:8,outlineColor:Cesium.Color.BLUE,outlineWidth:2},mn=function(e){c(i,e);var t=fn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._nativeObjCesium=new Cesium.Entity({point:{}}),r._position=Be.parsePosition(e),r.position=r._position,de.merge(r._style,pn,o),r.setOptions(o),r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("point")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=Be.parsePosition(e),this._nativeObjCesium.position=Ne.transformWGS84ToCartesian(this._position),this}},{key:"label",get:function(){return this._nativeObjCesium.label}},{key:"_mountedHook",value:function(){this.position=this._position,de.merge(this._nativeObjCesium.point,pn,this._style)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.position,Be.parseOption(e),de.merge(this._style,e),de.merge(this._nativeObjCesium.point,this._style),this.setLabel(e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){Be.parseOption(this._highlight),de.merge(this._nativeObjCesium.point,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){Be.parseOption(this._selectedHighlight),de.merge(this._nativeObjCesium.point,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();return(t=new i(Ne.transformCartesianToWGS84(e.position.getValue(n)))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):hn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)),t}}]),i}(Ze);Ze.registerType("point");const dn=mn;function vn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function yn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var gn=function(e){c(i,e);var t=yn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._nativeObjCesium=new Cesium.Entity({polygon:{}}),r._positions=Be.parsePositions(e),r._holes=[],r._state=ke.INITIALIZED,r.positions=r._positions,r.position=Ne.transformWGS84ToCartesian(r.center),r._nativeObjCesium.position=r.position,Be.parseOption(o),de.merge(r._style,o),r.setOptions(r._style),r}return a(i,[{key:"position",get:function(){return this._position},set:function(e){return this._position=e,this._nativeObjCesium.position=e,this}},{key:"type",get:function(){return Ze.getGraphicType("polygon")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=Be.parsePositions(e),this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy(),this}},{key:"holes",get:function(){return this._holes},set:function(e){return e&&e.length&&(this._holes=e.map((function(e){return Be.parsePositions(e)})),this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy()),this}},{key:"center",get:function(){var e=Xe([].concat(De(this._positions),[this._positions[0]])),t=Ne.setHeightWGS84(e,.5);return Ne.transformCartesianToWGS84(t)}},{key:"area",get:function(){return Ke(this._positions)}},{key:"_computeHierarchy",value:function(){var e=new Cesium.PolygonHierarchy;return e.positions=Ne.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map((function(e){return new Cesium.PolygonHierarchy(Ne.transformWGS84ArrayToCartesianArray(e))})),e}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.positions,Be.parseOption(e),de.merge(this._style,e),de.merge(this._nativeObjCesium.polygon,e),this.setLabel(e),this.setBillboard(e),this.setPolyline(e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){Be.parseOption(this._highlight),de.merge(this._nativeObjCesium.polygon,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){Be.parseOption(this._selectedHighlight),de.merge(this._nativeObjCesium.polygon,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polygon&&((t=new i(Ne.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(n).positions))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):vn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(Ze);Ze.registerType("polygon");const _n=gn;function Cn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var wn=function(e){c(i,e);var t=bn(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._positions=Be.parsePositions(e),r._positions.length<2?(console.error("polyline必须至少两个点!"),f(r)):(r._nativeObjCesium=new Cesium.Entity({polyline:{}}),r.positions=r._positions,r._state=ke.INITIALIZED,Be.parseOption(o),de.merge(r._style,o),r.position=Ne.transformWGS84ToCartesian(Xe([r._positions[0],r._positions[1]])),r._nativeObjCesium.position=r.position,r.setOptions(r._style),r)}return a(i,[{key:"position",get:function(){return this._position},set:function(e){return this._position=e,this}},{key:"type",get:function(){return Ze.getGraphicType("polyline")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=Be.parsePositions(e),this._nativeObjCesium.polyline.positions=Ne.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"center",get:function(){return Xe(this._positions)}},{key:"distance",get:function(){return et(this._positions)}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"highlight",value:function(){Be.parseOption(this._highlight),de.merge(this._nativeObjCesium.polyline,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){Be.parseOption(this._selectedHighlight),de.merge(this._nativeObjCesium.polyline,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&0!==Object.keys(e).length?(delete e.positions,Be.parseOption(e),de.merge(this._style,e),de.merge(this._nativeObjCesium.polyline,e),this.setLabel(e),this.setBillboard(e),this.originOption=Cesium.clone(this._style,!1),this):this}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polyline&&((t=new i(Ne.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(n)))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Cn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(Ze);Ze.registerType("polyline");const Pn=wn;function On(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var En=function(e){c(i,e);var t=xn(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._positions=Be.parsePositions(e),o._shape=r||[],o._nativeObjCesium=new Cesium.Entity({polylineVolume:{}}),o._state=ke.INITIALIZED,o.positions=o._positions,o}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("polyline_volume")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=Be.parsePositions(e),this._nativeObjCesium.polylineVolume.positions=Ne.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"shape",get:function(){return this._shape},set:function(e){return this._shape=e||[],this._nativeObjCesium.polylineVolume.shape=this._shape,this}},{key:"_mountedHook",value:function(){this.positions=this._positions,this.shape=this._shape}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.positions&&delete e.shape,de.merge(this._style,e),de.merge(this._nativeObjCesium.polylineVolume,e)),this}}],[{key:"fromEntity",value:function(e,t){var n=void 0,r=Cesium.JulianDate.now();e.polyline&&((n=new i(Ne.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r)),t)).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?On(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):On(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(r)));return n}}]),i}(Ze);Ze.registerType("polyline_volume");const An=En;function kn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Tn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?kn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):kn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Rn=function(e){c(i,e);var t=Mn(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=Be.parsePositions(e),r._nativeObjCesium=new Cesium.Entity({rectangle:{}}),r._state=ke.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("rectangle")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=Be.parsePositions(e),this._nativeObjCesium.rectangle.coordinates=Cesium.Rectangle.fromCartesianArray(Ne.transformWGS84ArrayToCartesianArray(this._positions)),this}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setLabel",value:function(e,t){return this._nativeObjCesium.position=Cesium.Cartographic.toCartesian(Cesium.Rectangle.center(this._nativeObjCesium.rectangle,new Cesium.Cartographic)),this._nativeObjCesium.label=Tn(Tn({},t),{},{text:e}),this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(delete e.positions,de.merge(this._style,e),de.merge(this._nativeObjCesium.rectangle,e)),this}}]),i}(Ze);Ze.registerType("rectangle");const Sn=Rn;function jn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function In(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ln=function(e){c(i,e);var t=In(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,o))._nativeObjCesium=new Cesium.Entity({wall:{}}),r._positions=Be.parsePositions(e),r.positions=r._positions,console.log(r._style),console.log(de.merge),de.merge(r._style,o),r.setOptions(o),r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ze.getGraphicType("wall")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=Be.parsePositions(e),this._nativeObjCesium.wall.positions=Ne.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"setLabel",value:function(e,t){return this}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length||(de.merge(this._style,e),de.merge(this._nativeObjCesium.wall,e),this.setLabel(this._style),this.originOption=Cesium.clone(this._style)),this}},{key:"highlight",value:function(){Be.parseOption(this._highlight),de.merge(this._nativeObjCesium.wall,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){Be.parseOption(this._selectedHighlight),de.merge(this._nativeObjCesium.wall,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polyline&&((t=new i(Ne.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(n)))).attr=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?jn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):jn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(Ze);Ze.registerType("wall");const Dn=Ln;var Bn=function(){function e(t){var i,r;n(this,e),this.syncMode=null!==(i=t.syncMode)&&void 0!==i?i:1,this.autoSyncMode=null===(r=t.autoSyncMode)||void 0===r||r,this.viewer=t.viewer,this.worldCoorOriginCesium=t.worldCoorOriginCesium,this.threeCamera=t.threeCamera,this.Vector3=t.Vector3,this.Matrix4=t.Matrix4,this.Group=t.Group,this.threeRenderer=t.threeRenderer,this.threeScene=t.threeScene,this.threeControls=t.threeControls,this.threeExtent=t.threeExtent||{minLon:116.3895764,minLat:39.9395754,maxLon:116.4019169,maxLat:39.9469879,maxHeight:2e4},this.threeContainer=t.threeContainer,this.cesiumContainer=t.cesiumContainer,this.init()}return a(e,[{key:"setWorldCoorOriginCesium",value:function(e){this.worldCoorOriginCesium=e}},{key:"setThreeExtent",value:function(e){this.threeExtent=e}},{key:"init",value:function(){var e=this;this.viewer.scene.postUpdate.addEventListener((function(){1==e.syncMode&&e.updateCamera()})),this.autoSyncMode&&this.initMouseEvent()}},{key:"initMouseEvent",value:function(){if(this.autoSyncMode){1===this.syncMode?(this.threeContainer.style.pointerEvents="none",this.viewer.scene.screenSpaceCameraController.enableInputs=!0):(this.threeContainer.style.pointerEvents="auto",this.viewer.scene.screenSpaceCameraController.enableInputs=!1);var e=this;document.addEventListener("mousemove",(function(t){if(e.autoSyncMode&&e.threeCamera){var i=t.pageX,n=t.pageY,r=new Cesium.Cartesian2(i,n),o=Ne.transformWindowToWGS84(r,window.viewer),s=e.viewer.scene.camera.positionCartographic.height;if(o.lng>e.threeExtent.minLon&&o.lng<e.threeExtent.maxLon&&o.lat>e.threeExtent.minLat&&o.lat<e.threeExtent.maxLat&&s<e.threeExtent.maxHeight){if(e.threeContainer.style.pointerEvents="auto",e.viewer.scene.screenSpaceCameraController.enableInputs=!1,2===e.syncMode)return;e.threeCamera&&(e.syncMode=2)}else{if(e.threeContainer.style.pointerEvents="none",e.viewer.scene.screenSpaceCameraController.enableInputs=!0,1===e.syncMode)return;e.threeCamera&&(e.syncMode=1)}}}))}}},{key:"resetOrigin",value:function(e){this.threeExtent=e.threeExtent,this.worldCoorOriginCesium=e.worldCoorOriginCesium}},{key:"getPointOnRay",value:function(e,t,i){return{x:e.x+t.x*i,y:e.y+t.y*i,z:e.z+t.z*i}}},{key:"localThreeToWorldPosCesium",value:function(e,t,i){var n=window.Cesium.Transforms.eastNorthUpToFixedFrame(this.worldCoorOriginCesium),r=new window.Cesium.Cartesian3(e,-i,t);return window.Cesium.Matrix4.multiplyByPoint(n,r,new window.Cesium.Cartesian3)}},{key:"worldCesiumTolocalThree",value:function(e){var t=window.Cesium.Transforms.eastNorthUpToFixedFrame(this.worldCoorOriginCesium),i=window.Cesium.Matrix4.inverseTransformation(t,new window.Cesium.Matrix4),n=window.Cesium.Matrix4.multiplyByPoint(i,e,new window.Cesium.Cartesian3);return new Cesium.Cartesian3(n.x,n.z,-n.y)}},{key:"getCesiumDirectionFromThree",value:function(e,t,i){var n=this.getPointOnRay(t,i,1),r=this.localThreeToWorldPosCesium(n.x,n.y,n.z),o=new Cesium.Cartesian3;return Cesium.Cartesian3.subtract(r,e,o),Cesium.Cartesian3.normalize(o,o),o}},{key:"getThreeDirectionFromCesium",value:function(e,t,i){var n=this.getPointOnRay(t,i,1),r=this.worldCesiumTolocalThree(n),o=new Cesium.Cartesian3;return Cesium.Cartesian3.subtract(r,e,o),Cesium.Cartesian3.normalize(o,o),o}},{key:"frustumFromThreeToCesium",value:function(){if(!this.threeCamera)return null;var e={},t=Cesium.Math.toRadians(this.threeCamera.fov),i=2*Math.atan(Math.tan(.5*t)*this.threeCamera.aspect);return this.threeCamera.aspect<=1&&(i=t),e.near=this.threeCamera.near,e.far=this.threeCamera.far,e.aspectRatio=this.threeCamera.aspect,e.fov=i,e}},{key:"frustumFromCesiumToThree",value:function(){var e=this.viewer.camera;if(!e)return null;var t={};return t.fov=window.Cesium.Math.toDegrees(e.frustum.fovy),t.near=e.frustum.near,t.far=e.frustum.far,t.aspect=e.frustum.aspectRatio,t}},{key:"syncCesiumCameraToThree",value:function(){viewer.nativeObjCesium.render(),this.threeRenderer.setPixelRatio(window.devicePixelRatio),this.threeControls.enabled=!1;var e=this.viewer.scene.camera,t=e.positionWC,i=e.directionWC,n=e.upWC,r=this.worldCesiumTolocalThree(t),o=this.getThreeDirectionFromCesium(r,t,i),s=this.getThreeDirectionFromCesium(r,t,n),a=this.frustumFromCesiumToThree();this.threeCamera.aspect=a.aspect,this.threeCamera.near=a.near,this.threeCamera.far=a.far,this.threeCamera.fov=a.fov,this.threeCamera.position.x=r.x,this.threeCamera.position.y=r.y,this.threeCamera.position.z=r.z,window.cameraRigY||(window.cameraRigY=new this.Group,cameraRigY.add(this.threeCamera),this.threeScene.add(cameraRigY)),this.viewer.scene.camera.positionCartographic.height>5e4?(this.threeCamera.up.x=s.x,this.threeCamera.up.y=s.y,this.threeCamera.up.z=s.z):(this.threeCamera.up.x=0,this.threeCamera.up.y=1,this.threeCamera.up.z=0);var l=new this.Vector3;this.threeCamera.getWorldPosition(l);var u=this.getControsTarget(l,o);if(0==o.y&&(o.y=1),-l.y/o.y<0){var c=this.getPointOnRay(t,i,1);u=this.worldCesiumTolocalThree(c)}u&&this.threeControls.target.copy(u),this.threeControls.enabled=!0,this.threeCamera.aspect=this.threeContainer.clientWidth/this.threeContainer.clientHeight,this.threeCamera.updateProjectionMatrix(),this.threeRenderer.setSize(this.threeContainer.clientWidth,this.threeContainer.clientHeight),this.threeControls.update()}},{key:"syncThreeCameraToCesium",value:function(){window.cameraRigY||(window.cameraRigY=new this.Group,cameraRigY.add(this.threeCamera),this.threeScene.add(cameraRigY));var e=new this.Vector3,t=new this.Vector3;this.threeCamera.getWorldDirection(e),this.threeCamera.getWorldPosition(t);var i=(new this.Matrix4).makeRotationFromQuaternion(this.threeCamera.quaternion),n=new this.Vector3(0,1,0).clone().applyMatrix4(i),r=this.localThreeToWorldPosCesium(t.x,t.y,t.z),o=this.getCesiumDirectionFromThree(r,t,e),s=this.getCesiumDirectionFromThree(r,t,n),a=this.frustumFromThreeToCesium();this.viewer.scene.camera.frustum.aspectRatio=a.aspectRatio,this.viewer.scene.camera.frustum.near=a.near,this.viewer.scene.camera.frustum.far=a.far,this.viewer.scene.camera.frustum.fov=a.fov,this.viewer.scene.camera.setView({destination:r,orientation:{direction:o,up:s}}),this.viewer.nativeObjCesium.render()}},{key:"getControsTarget",value:function(e,t){0==t.y&&(t.y=1);var i=-e.y/t.y,n=(new this.Vector3).copy(t).multiplyScalar(i).add(e);return n.y=0,n}},{key:"calculateAnglesWithAxes",value:function(e){var t=new this.Vector3(e.x,e.y,e.z),i=new this.Vector3(1,0,0),n=new this.Vector3(0,1,0),r=new this.Vector3(0,0,1),o=t.dot(i)/1,s=t.dot(n)/1,a=t.dot(r)/1;return{thetaX:Math.acos(o),thetaY:Math.acos(s),thetaZ:Math.acos(a)}}},{key:"updateControls",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e||(e=new this.Vector3,this.threeCamera.getWorldDirection(e));var t=new this.Vector3;this.threeCamera.getWorldPosition(t);var i=this.getControsTarget(t,e);i&&this.threeControls.target.copy(i)}},{key:"updateCamera",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-88,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:90,i=Cesium.Math.toDegrees(this.viewer.camera.pitch);if(!(i>e&&i<t)){this.viewer.scene.screenSpaceCameraController.enableTilt=!1;var n=this.viewer.camera.position,r=this.viewer.camera.heading,o=this.viewer.camera.roll;i<e&&(i=e),i>t&&(i=t),i=Cesium.Math.toRadians(i),this.viewer.camera.setView({destination:n,orientation:{heading:r,pitch:i,roll:o}}),viewer.scene.screenSpaceCameraController.enableTilt=!0}}}]),e}();const Gn=Bn;function Hn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Nn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Hn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function zn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Fn="broadcast",Wn=[J.CLICK,J.RIGHT_CLICK,J.DB_CLICK],Un=[J.LEFT_DOWN,J.LEFT_UP,J.RIGHT_DOWN,J.RIGHT_UP,J.MIDDLE_DOWN,J.MIDDLE_UP,J.WHEEL],Vn=function(e){c(b,e);var t,i,r,o,s,l,u,h,f,m,d,v,y,g,_,C=zn(b);function b(e){var t;return n(this,b),(t=C.call(this,J))._viewer=e,t._selected=void 0,t._mouseInfo=void 0,t._preTime=Cesium.JulianDate.now(),t._lastPosition=void 0,t._hoverKey=null,t._hoverInfo=void 0,t._handler=void 0,t._domListeners=[],t._cameraListener=void 0,t._pointerState={button:-1,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1,pointerType:"mouse"},t._objectIds=new WeakMap,t._objectIdSeq=0,t._warnedDispatch=new Set,t._typeNames={},Object.keys(J).forEach((function(e){t._typeNames[J[e]]=e})),t._registerEvent(),t._addDefaultEvent(),t._bindDomEvents(),t}return a(b,[{key:"_registerEvent",value:function(){var e=this;N(p(b.prototype),"_registerEvent",this).call(this);var t=new Cesium.ScreenSpaceEventHandler(this._viewer.canvas);this._handler=t,Object.keys(Cesium.ScreenSpaceEventType).forEach((function(i){var n=Cesium.ScreenSpaceEventType[i];e._cache[n]||(e._cache[n]=new Cesium.Event),t.setInputAction((function(t){e._cache[n].raiseEvent(t)}),n)}))}},{key:"_addDefaultEvent",value:function(){var e=this;[["LEFT_DOWN",this._leftDownHandler],["LEFT_UP",this._leftUpHandler],["CLICK",this._clickHandler],["DB_CLICK",this._dbClickHandler],["RIGHT_DOWN",this._rightDownHandler],["RIGHT_UP",this._rightUpHandler],["RIGHT_CLICK",this._rightClickHandler],["MIDDLE_DOWN",this._middleDownHandler],["MIDDLE_UP",this._middleUpHandler],["MIDDLE_CLICK",this._middleClickHandler],["MOUSE_MOVE",this._mouseMoveHandler],["WHEEL",this._mouseWheelHandler],["PINCH_START",function(t){return e._pinchHandler(J.PINCH_START,t)}],["PINCH_END",function(t){return e._pinchHandler(J.PINCH_END,t)}],["PINCH_MOVE",function(t){return e._pinchHandler(J.PINCH_MOVE,t)}]].forEach((function(t){var i=fe(t,2),n=i[0],r=i[1];e.addEventListener(e._types[n],r,e)}))}},{key:"_bindDomEvents",value:function(){var e=this,t=this._viewer.canvas;if(t&&t.addEventListener){var i=function(t){e._pointerState.button=t.button,e._pointerState.ctrlKey=!!t.ctrlKey,e._pointerState.shiftKey=!!t.shiftKey,e._pointerState.altKey=!!t.altKey,e._pointerState.metaKey=!!t.metaKey,e._pointerState.pointerType=t.pointerType||"mouse"},n=function(e){return i(e)},r=function(e){return i(e)},o=function(){e._pointerState.button=-1,e._dispatchHover(null)};t.addEventListener("pointerdown",n),t.addEventListener("pointermove",r),t.addEventListener("pointerleave",o),this._domListeners=[["pointerdown",n],["pointermove",r],["pointerleave",o]];var s=this._viewer.camera;s&&s.moveStart&&s.moveStart.addEventListener&&(this._cameraListener=function(){return e._dispatchHover(null)},s.moveStart.addEventListener(this._cameraListener))}}},{key:"_getMouseInfo",value:(_=U(q().mark((function e(t,i){var n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i===J.MOUSE_MOVE,!(Un.indexOf(i)>=0&&this._mouseInfo)){e.next=3;break}return e.abrupt("return",Nn(Nn({},this._mouseInfo),{},{windowPosition:t}));case 3:if(n||!this._mouseInfo||!this._mouseInfo.target){e.next=5;break}return e.abrupt("return",Nn(Nn({},this._mouseInfo),{},{windowPosition:t}));case 5:if(!n){e.next=12;break}if(r=Cesium.JulianDate.now(),o=Cesium.JulianDate.secondsDifference(r,this._preTime),!((s=this._viewer.mouseSensitivity)&&o<s&&this._mouseInfo)){e.next=11;break}return e.abrupt("return",Nn(Nn({},this._mouseInfo),{},{windowPosition:t}));case 11:this._preTime=r;case 12:if(a=this._viewer.scene,l=3,window.ANOVGIS&&window.ANOVGIS.globalConfig.pickSize&&(l=window.ANOVGIS.globalConfig.pickSize),u=a.pick(t,l,l),c=void 0,h="none",u||!(Wn.indexOf(i)>=0)){e.next=29;break}if(f=this._viewer.camera.getPickRay(t),p=this._viewer.imageryLayers.pickImageryLayerFeatures(f,this._viewer.scene),Cesium.defined(p)){e.next=25;break}console.log("No features picked."),e.next=29;break;case 25:return e.next=27,p;case 27:(m=e.sent)&&m.length&&(u=m[0],c=Ne.transformCartographicToCartesian(u.position),h="pick");case 29:return d=void 0,u&&u.id instanceof Cesium.Entity&&(d=this._getEntityPosition(u.id),(v=this._viewer.getLayers().filter((function(e){return e.layerId===u.id.layerId}))[0])&&v.getGraphic&&((y=v.getGraphic(u.id.graphicId))instanceof dn||y instanceof Ii||y instanceof an)&&(h=(c=d)?"graphic":"none")),c||(c=Ee.pickPosition(this._viewer,t),h=c?"pick":"none"),g=void 0,_=void 0,C=void 0,c&&(b=Cesium.Ellipsoid.WGS84.cartesianToCartographic(c))&&(_={lng:Cesium.Math.toDegrees(b.longitude),lat:Cesium.Math.toDegrees(b.latitude),alt:b.height}),a.mode!==Cesium.SceneMode.SCENE3D||this._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider?g=a.camera.pickEllipsoid(t,Cesium.Ellipsoid.WGS84):(w=a.camera.getPickRay(t),g=w?a.globe.pick(w,a):void 0),g&&(P=Cesium.Ellipsoid.WGS84.cartesianToCartographic(g))&&(C={lng:Cesium.Math.toDegrees(P.longitude),lat:Cesium.Math.toDegrees(P.latitude),alt:P.height}),O=Nn({target:u,windowPosition:t,position:c,wgs84Position:_,surfacePosition:g,wgs84SurfacePosition:C,graphicPosition:d,cursorPosition:c,positionSource:h},this._pointerState),e.abrupt("return",O);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"_getEntityPosition",value:function(e){if(e&&e.position)return void 0!==e.position._value?e.position._value:"function"==typeof e.position.getValue?e.position.getValue(Cesium.JulianDate.now()):void 0}},{key:"_getDrillInfos",value:function(e){var t=this,i=[],n=this._viewer.scene.drillPick(e);return n&&n.length&&n.forEach((function(e){i.push(t._getTargetInfo(e))})),i}},{key:"_getGraphicId",value:function(e){var t=void 0;if(e)return e.id instanceof Cesium.Entity?t=e.id.graphicId:e instanceof Cesium.Cesium3DTileFeature?t=e.tileset.graphicId:(e.primitive instanceof Cesium.Cesium3DTileset||e.primitive)&&(t=e.primitive.graphicId),t}},{key:"_getTargetInfo",value:function(e){var t=void 0,i=void 0,n=void 0,r=void 0;if(e&&e.id instanceof Cesium.Entity)(i=this._viewer.getLayers().filter((function(t){return t.layerId===e.id.layerId}))[0])&&i.getGraphic&&(t=i.getGraphic(e.id.graphicId));else if(e&&e instanceof Cesium.Cesium3DTileFeature){if(i=this._viewer.getLayers().filter((function(t){return t.layerId===e.tileset.layerId}))[0],n=e,i&&i.getGraphic)if((t=i.getGraphic(e.tileset.graphicId))&&t.attr&&n&&n.getPropertyNames)n.getPropertyNames().forEach((function(e){t.attr[e]=n.getProperty(e)}))}else e&&e.primitive instanceof Cesium.Cesium3DTileset?(i=this._viewer.getLayers().filter((function(t){return t.layerId===e.primitive.layerId}))[0])&&i.getGraphic&&(t=i.getGraphic(e.primitive.graphicId)):e&&e.primitive?((i=this._viewer.getLayers().filter((function(t){return t.layerId===e.primitive.layerId}))[0])&&i.getGraphic&&(t=i.getGraphic(e.primitive.graphicId)),(e.primitive instanceof Cesium.Label||e.primitive instanceof Cesium.Billboard)&&(r=e.primitive)):e instanceof Cesium.ImageryLayerFeatureInfo&&(i=e.imageryLayer,n=e);return{layer:i,graphic:t,feature:n,clusterEntity:r,instanceId:e?e.instanceId:null}}},{key:"_raiseEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._viewer){var i=this._getTargetInfo(t.target)||{},n=i.graphic,r=i.layer,o=Nn(Nn({},i),t),s=this._viewer.eventDispatchMode===Fn;s?this._raiseBroadcast(e,o,n,r):this._raiseLegacy(e,o,n,r),n&&n.allowDrillPicking&&this._raiseDrillEvent(e,t,n,s)}}},{key:"_getChainBuses",value:function(e){var t=[];return e&&e.layerEvent&&t.push(["layer",e.layerEvent]),e&&e.imageryProvider&&e.imageryProvider.layerEvent&&t.push(["imagery",e.imageryProvider.layerEvent]),this._viewer&&this._viewer.viewerEvent&&t.push(["viewer",this._viewer.viewerEvent]),t}},{key:"_raiseLegacy",value:function(e,t,i,n){var r=this;if(i&&i.graphicEvent){var o=i.graphicEvent.getEvent(e);o&&o.numberOfListeners>0&&o.raiseEvent(Nn(Nn({},t),{},{level:"graphic"}))}var s=void 0,a=void 0,l=[];this._getChainBuses(n).forEach((function(t){var i=fe(t,2),n=i[0],r=i[1].getEvent(e);r&&0!==r.numberOfListeners&&(s?l.push(n):(s=r,a=n))})),s&&(s.raiseEvent(Nn(Nn({},t),{},{level:a})),l.forEach((function(t){return r._warnStarved(e,t)})))}},{key:"_raiseBroadcast",value:function(e,t,i,n){var r=[];i&&i.graphicEvent&&r.push(["graphic",i.graphicEvent]),r=r.concat(this._getChainBuses(n));var o=new Set;r.forEach((function(i){var n=fe(i,2),r=n[0],s=n[1].getEvent(e);s&&0!==s.numberOfListeners&&!o.has(s)&&(o.add(s),s.raiseEvent(Nn(Nn({},t),{},{level:r})))}))}},{key:"_raiseDrillEvent",value:function(e,t,i,n){this._getDrillInfos(t.windowPosition).forEach((function(r){var o=r.graphic,s=r.layer;if(o&&o.graphicId!==i.graphicId){var a=Nn(Nn({},r),t),l=o.graphicEvent?o.graphicEvent.getEvent(e):void 0,u=s&&s.layerEvent?s.layerEvent.getEvent(e):void 0;if(n)return l&&l.numberOfListeners>0&&l.raiseEvent(Nn(Nn({},a),{},{level:"graphic"})),void(u&&u.numberOfListeners>0&&u.raiseEvent(Nn(Nn({},a),{},{level:"layer"})));var c=l,h="graphic";c&&0!==c.numberOfListeners||!u||(c=u,h="layer"),c&&c.numberOfListeners>0&&c.raiseEvent(Nn(Nn({},a),{},{level:h}))}}))}},{key:"_warnStarved",value:function(e,t){var i=t+":"+e;this._warnedDispatch.has(i)||(this._warnedDispatch.add(i),console.warn('[ANOVGIS] 事件 "'.concat(this._typeNames[e]||e,'" 在 ').concat(t," 级已有监听,")+"但被更高优先级的图层监听抢占,当前收不到。如需各层级同时收到,请设置 viewer.eventDispatchMode = 'broadcast'。"))}},{key:"_updateHover",value:function(e){var t=this._getHoverKey(e&&e.target);if(t===this._hoverKey)return null;var i=this._hoverInfo;return this._hoverKey=t,this._hoverInfo=t?e:void 0,this._selected=this._hoverInfo,{leave:i,enter:this._hoverInfo}}},{key:"_dispatchHover",value:function(e){var t=this._updateHover(e);return t?(t.leave&&this._raiseEvent(J.MOUSE_OUT,t.leave),t.enter&&this._raiseEvent(J.MOUSE_OVER,t.enter),t):null}},{key:"_getHoverKey",value:function(e){if(!e)return null;var t=this._getGraphicId(e);if(null!=t)return"g:"+t;var i=e.id instanceof Cesium.Entity?e.id:e.primitive||e;return"o:"+this._getObjectId(i)}},{key:"_getObjectId",value:function(e){return e?(this._objectIds.has(e)||(this._objectIdSeq+=1,this._objectIds.set(e,this._objectIdSeq)),this._objectIds.get(e)):0}},{key:"_dispatchPointer",value:(g=U(q().mark((function e(t,i,n){var r,o;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r=n||i.position||i.endPosition||this._lastPosition){e.next=4;break}return e.abrupt("return",!1);case 4:return e.next=6,this._getMouseInfo(r,t);case 6:if(o=e.sent){e.next=9;break}return e.abrupt("return",!1);case 9:return o.movement=i,this._raiseEvent(t,o),e.abrupt("return",!0);case 14:return e.prev=14,e.t0=e.catch(0),console.error("[ANOVGIS] ".concat(this._typeNames[t]||t," 事件处理异常"),e.t0),e.abrupt("return",!1);case 18:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(e,t,i){return g.apply(this,arguments)})},{key:"_clickHandler",value:(y=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.CLICK,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"_dbClickHandler",value:(v=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.DB_CLICK,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"_rightClickHandler",value:(d=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.RIGHT_CLICK,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"_mouseMoveHandler",value:(m=U(q().mark((function e(t){var i,n;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t.endPosition){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,this._getMouseInfo(t.endPosition,J.MOUSE_MOVE);case 5:if(i=e.sent){e.next=8;break}return e.abrupt("return");case 8:this._lastPosition=t.endPosition,this._viewer.mapInfo&&this._viewer.mapInfo.setPos(i.wgs84Position),this._mouseInfo=i,this._viewer.canvas.style.cursor=i.target||i.pickImageryLayers?"pointer":"default",(n=this._updateHover(i))&&n.leave&&this._raiseEvent(J.MOUSE_OUT,n.leave),this._raiseEvent(J.MOUSE_MOVE,i),n&&n.enter&&this._raiseEvent(J.MOUSE_OVER,n.enter),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.error("[ANOVGIS] MOUSE_MOVE 事件处理异常",e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(e){return m.apply(this,arguments)})},{key:"_leftDownHandler",value:(f=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.LEFT_DOWN,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:"_leftUpHandler",value:(h=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.LEFT_UP,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"_rightDownHandler",value:(u=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.RIGHT_DOWN,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_rightUpHandler",value:(l=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.RIGHT_UP,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"_middleDownHandler",value:(s=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.MIDDLE_DOWN,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"_middleUpHandler",value:(o=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.MIDDLE_UP,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_middleClickHandler",value:(r=U(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._dispatchPointer(J.MIDDLE_CLICK,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_mouseWheelHandler",value:(i=U(q().mark((function e(t){var i,n;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=this._lastPosition){e.next=4;break}return e.abrupt("return",!1);case 4:return(n=this._mouseInfo?Nn(Nn({},this._mouseInfo),{},{windowPosition:i}):{windowPosition:i}).movement=t,n.deltaY=t.deltaY,this._raiseEvent(J.WHEEL,n),e.abrupt("return",!0);case 11:return e.prev=11,e.t0=e.catch(0),console.error("[ANOVGIS] WHEEL 事件处理异常",e.t0),e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(e){return i.apply(this,arguments)})},{key:"_pinchHandler",value:(t=U(q().mark((function e(t,i){var n;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=Nn({target:void 0,windowPosition:this._lastPosition,position:void 0,wgs84Position:void 0,surfacePosition:void 0,wgs84SurfacePosition:void 0,graphicPosition:void 0,cursorPosition:void 0,positionSource:"none",movement:i},this._pointerState),this._raiseEvent(t,n),e.abrupt("return",!0);case 6:return e.prev=6,e.t0=e.catch(0),console.error("[ANOVGIS] ".concat(this._typeNames[t]||t," 事件处理异常"),e.t0),e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e,i){return t.apply(this,arguments)})},{key:"destroy",value:function(){this._handler&&(this._handler.destroy(),this._handler=void 0);var e=this._viewer&&this._viewer.canvas;e&&this._domListeners.forEach((function(t){var i=fe(t,2),n=i[0],r=i[1];e.removeEventListener(n,r)})),this._domListeners=[],this._cameraListener&&this._viewer&&this._viewer.camera&&this._viewer.camera.moveStart&&this._viewer.camera.moveStart.removeEventListener(this._cameraListener),this._cameraListener=void 0,this._mouseInfo=void 0,this._selected=void 0,this._hoverInfo=void 0,this._hoverKey=null,this._viewer=void 0}}]),b}(ue);const qn=Vn;function Zn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Yn=function(e){c(i,e);var t=Zn(i);function i(){var e;return n(this,i),(e=t.call(this,$))._registerEvent(),e}return a(i)}(ue);function Kn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Qn=function(e){c(i,e);var t=Kn(i);function i(e){var r;return n(this,i),(r=t.call(this,ee))._camera=e.camera,r._scene=e.scene,r._clock=e.clock,r}return a(i,[{key:"addEventListener",value:function(e,t,i){var n=void 0;switch(e){case ee.CAMERA_MOVE_END:n=this._camera.moveEnd.addEventListener(t,i||this);break;case ee.CAMERA_CHANGED:n=this._camera.changed.addEventListener(t,i||this);break;case ee.PRE_UPDATE:n=this._scene.preUpdate.addEventListener(t,i||this);break;case ee.POST_UPDATE:n=this._scene.postUpdate.addEventListener(t,i||this);break;case ee.PRE_RENDER:n=this._scene.preRender.addEventListener(t,i||this);break;case ee.POST_RENDER:n=this._scene.postRender.addEventListener(t,i||this);break;case ee.MORPH_COMPLETE:n=this._scene.morphComplete.addEventListener(t,i||this);break;case ee.CLOCK_TICK:n=this._clock.onTick.addEventListener(t,i||this);break;case ee.RENDER_ERROR:n=this._scene.renderError.addEventListener(t,i||this)}return n}},{key:"removeEventListener",value:function(e,t,i){var n=!1;switch(e){case ee.CAMERA_MOVE_END:n=this._camera.moveEnd.removeEventListener(t,i||this);break;case ee.CAMERA_CHANGED:n=this._camera.changed.removeEventListener(t,i||this);break;case ee.PRE_UPDATE:n=this._scene.preUpdate.removeEventListener(t,i||this);break;case ee.POST_UPDATE:n=this._scene.postUpdate.removeEventListener(t,i||this);break;case ee.PRE_RENDER:n=this._scene.preRender.removeEventListener(t,i||this);break;case ee.POST_RENDER:n=this._scene.postRender.removeEventListener(t,i||this);break;case ee.MORPH_COMPLETE:n=this._scene.morphComplete.removeEventListener(t,i||this);break;case ee.CLOCK_TICK:n=this._clock.onTick.removeEventListener(t,i||this);break;case ee.RENDER_ERROR:n=this._scene.renderError.removeEventListener(t,i||this)}return n}}]),i}(ue);function Xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Jn=function(e){c(i,e);var t=Xn(i);function i(){var e;return n(this,i),(e=t.call(this,ie))._registerEvent(),e}return a(i)}(ue);function $n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const er=function(e){c(i,e);var t=$n(i);function i(){var e;return n(this,i),(e=t.call(this,ne))._registerEvent(),e}return a(i)}(ue);function tr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const ir=function(e){c(i,e);var t=tr(i);function i(){var e;return n(this,i),(e=t.call(this,te))._registerEvent(),e}return a(i)}(ue);function nr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const rr=function(e){c(i,e);var t=nr(i);function i(){var e;return n(this,i),(e=t.call(this,re))._registerEvent(),e}return a(i)}(ue);function or(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const sr=function(e){c(i,e);var t=or(i);function i(){var e;return n(this,i),(e=t.call(this,oe))._registerEvent(),e}return a(i)}(ue);function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const lr=function(e){c(i,e);var t=ar(i);function i(){var e;return n(this,i),(e=t.call(this,se))._registerEvent(),e}return a(i)}(ue);function ur(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function cr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ur(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var hr={vrButton:!0,animation:!1,baseLayerPicker:!1,baseLayer:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!1,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,navigationInstructionsInitiallyVisible:!1,creditContainer:void 0,shouldAnimate:!0};const fr=function(){function e(){n(this,e)}return a(e,null,[{key:"init",value:function(t){var i,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||"string"==typeof t&&!document.getElementById(t))throw new Error("Viewer:必须传入放置三维球的dom id");o.changeDeaultView=null===(i=o.changeDeaultView)||void 0===i||i,o.changeDeaultView&&e.setDeaultView(),o.changeDefaultAccessToken=null===(n=o.changeDefaultAccessToken)||void 0===n||n,o.changeDefaultAccessToken&&e.setDefaultAccessToken();var s=new Cesium.Viewer(t,cr(cr({},hr),o));return s._cesiumWidget._creditContainer.style.display="none",o.noNight=null===(r=o.noNight)||void 0===r||r,o.noNight&&e.setNoNight(!0),s}},{key:"setDeaultView",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:78,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:23,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:140,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:60;Cesium.Camera.DEFAULT_VIEW_RECTANGLE=Cesium.Rectangle.fromDegrees(e,t,i,n)}},{key:"settianditu_key",value:function(e){return this._tianditu_key=e}},{key:"setDefaultAccessToken",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Cesium.Ion.defaultAccessToken=e}},{key:"setNoNight",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];viewer.scene.light=e?new Cesium.DirectionalLight({direction:new Cesium.Cartesian3(.35492591601301104,-.8909182691839401,-.2833588392420772)}):new Cesium.SunLight}}]),e}();const pr={};const mr=function(){function e(t){n(this,e),t=t||{},this._id=de.uuid(),this.layerName=t.layerName||de.uuid(),this.businessID=t.id||de.uuid(),this._nativeObjCesium=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},Be.parseOption(t),this._layerEvent=new er,this._layerEvent.addEventListener(ne.ADD,this._onAdd,this),this._layerEvent.addEventListener(ne.REMOVE,this._onRemove,this),this._popup=void 0}return a(e,[{key:"boundingSphere",get:function(){return null}},{key:"layerId",get:function(){return this._id}},{key:"id",get:function(){return this.businessID}},{key:"nativeObjCesium",get:function(){return this._nativeObjCesium}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._nativeObjCesium&&(this._nativeObjCesium.show=this._show)}},{key:"layerEvent",get:function(){return this._layerEvent}},{key:"attr",get:function(){return this._attr},set:function(e){this._attr=e}},{key:"state",get:function(){return this._state}},{key:"_addedHook",value:function(){}},{key:"_removedHook",value:function(){this.clear()}},{key:"_onAdd",value:function(e){this._viewer=e,this._nativeObjCesium&&(this._nativeObjCesium instanceof Cesium.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._nativeObjCesium):this._viewer.scene.primitives.add(this._nativeObjCesium):this._viewer.dataSources.add(this._nativeObjCesium),this._addedHook&&this._addedHook(),this._state=ke.ADDED)}},{key:"_onRemove",value:function(){this._nativeObjCesium&&this._viewer&&(this._cache={},this._nativeObjCesium instanceof Cesium.PrimitiveCollection?(this._nativeObjCesium.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._nativeObjCesium):this._viewer.scene.primitives.remove(this._nativeObjCesium)):this._nativeObjCesium.then?(this._nativeObjCesium.then((function(e){e.entities.removeAll()})),this._viewer.dataSources.remove(this._nativeObjCesium)):(this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._viewer.dataSources.remove(this._nativeObjCesium)),this._removedHook&&this._removedHook(),this._state=ke.REMOVED)}},{key:"_addGraphic",value:function(e){this._cache.hasOwnProperty(e.graphicId)||(this._cache[e.graphicId]=e,this._nativeObjCesium&&e.raiseEvent(te.ADD,this),this._state===ke.CLEARED&&(this._state=ke.ADDED))}},{key:"_removeGraphic",value:function(e){this._cache.hasOwnProperty(e.graphicId)&&(this._nativeObjCesium&&e.raiseEvent(te.REMOVE,this),delete this._cache[e.graphicId])}},{key:"addGraphic",value:function(e){return this._addGraphic(e),this}},{key:"addGraphics",value:function(e){var t=this;return Array.isArray(e)&&e.forEach((function(e){t._addGraphic(e)})),this}},{key:"removeGraphic",value:function(e){return this._removeGraphic(e),this}},{key:"getGraphic",value:function(e){return this._cache[e]||void 0}},{key:"getGraphicById",value:function(e){var t=this,i=void 0;return Object.keys(this._cache).forEach((function(n){t._cache[n].id===e&&(i=t._cache[n])})),i}},{key:"getGraphicsByAttr",value:function(e,t){var i=[];return this.eachGraphic((function(n){n.attr[e]===t&&i.push(n)}),this),i}},{key:"eachGraphic",value:function(e,t){var i=this;return Object.keys(this._cache).forEach((function(n){e&&e.call(t||i,i._cache[n])})),this}},{key:"getGraphics",value:function(){var e=this,t=[];return Object.keys(this._cache).forEach((function(i){t.push(e._cache[i])})),t}},{key:"clear",value:function(){}},{key:"remove",value:function(){this._viewer&&this._viewer.removeLayer(this)}},{key:"addTo",value:function(e){return e.addLayer&&e.addLayer(this),this}},{key:"setOptions",value:function(e){}},{key:"addEventListener",value:function(e,t,i){return this._layerEvent.addEventListener(e,t,i||this),this}},{key:"addEventListenerOnce",value:function(e,t,i){return this._layerEvent.addEventListenerOnce(e,t,i||this)}},{key:"removeEventListener",value:function(e,t,i){return this._layerEvent.removeEventListener(e,t,i||this),this}},{key:"raiseEvent",value:function(e,t){return this._layerEvent.raiseEvent(e,t),this}},{key:"bindPopup",value:function(e){var t=this;this._popup=new We(e),this._popup.install(this),this.eachGraphic((function(e){e.raiseEvent(te.BIND_POPUP,t)}))}},{key:"bindTooltip",value:function(e){var t=this;new qe(e).install(this),this.addEventListener(J.MOUSE_OUT,(function(e){t.tooltip.hide()})),this.addEventListener(J.CLICK,(function(e){t.tooltip.hide()}))}}],[{key:"registerType",value:function(e){e&&(pr[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}},{key:"getLayerType",value:function(e){return pr[e.toLocaleUpperCase()]||void 0}}]),e}();function dr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function vr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):dr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const yr=function(){function e(t){n(this,e),this._viewer=t,this._options={}}return a(e,[{key:"_setViewerOption",value:function(){var e,t,i,n,r;Cesium.defined(null===(e=this._options)||void 0===e?void 0:e.shadows)&&(this._viewer.nativeObjCesium.shadows=null!==(i=null===(n=this._options)||void 0===n?void 0:n.shadows)&&void 0!==i&&i);Cesium.defined(null===(t=this._options)||void 0===t?void 0:t.resolutionScale)&&(this._viewer.nativeObjCesium.resolutionScale=(null===(r=this._options)||void 0===r?void 0:r.resolutionScale)||1);return this}},{key:"_setCanvasOption",value:function(){return Cesium.defined(this._options.tabIndex)&&this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}},{key:"_setSceneOption",value:function(){var e,t,i,n,r=this._viewer.scene;Cesium.defined(this._options.showAtmosphere)&&(r.skyAtmosphere.show=null===(e=this._options.showAtmosphere)||void 0===e||e);Cesium.defined(this._options.showSun)&&(r.sun.show=null===(t=this._options.showSun)||void 0===t||t);Cesium.defined(this._options.showMoon)&&(r.moon.show=null===(i=this._options.showMoon)||void 0===i||i);Cesium.defined(this._options.enableFxaa)&&(r.postProcessStages.fxaa.enabled=null!==(n=this._options.enableFxaa)&&void 0!==n&&n);return Cesium.defined(this._options.shadowMap)&&de.merge(r.shadowMap,this._options.shadowMap),r.msaaSupported&&Cesium.defined(this._options.msaaSamples)&&(r.msaaSamples=+this._options.msaaSamples||1),this}},{key:"_setSkyBoxOption",value:function(){if(!this._options.skyBox)return this;var e=this._options.skyBox;if(e instanceof Cesium.SkyBox)this._viewer.scene.skyBox=e;else{var t,i=this._viewer.scene.skyBox;i.show=null===(t=e.show)||void 0===t||t,e.offsetAngle&&(i.offsetAngle=e.offsetAngle),null!=e&&e.sources&&(i.sources=e.sources)}return this}},{key:"_setGlobeOption",value:function(){var e,t,i,n,r,o,s,a,l,u,c,h;if(!this._options.globe)return this;var f=this._viewer.scene.globe,p=this._options.globe;return de.merge(f,{show:null===(e=null==p?void 0:p.show)||void 0===e||e,showGroundAtmosphere:null===(t=null==p?void 0:p.showGroundAtmosphere)||void 0===t||t,enableLighting:null===(i=null==p?void 0:p.enableLighting)||void 0===i||i,depthTestAgainstTerrain:null!==(n=null==p?void 0:p.depthTestAgainstTerrain)&&void 0!==n&&n,tileCacheSize:+(null==p?void 0:p.tileCacheSize)||100,preloadSiblings:null!==(r=null==p?void 0:p.preloadSiblings)&&void 0!==r&&r,showSkirts:null===(o=null==p?void 0:p.showSkirts)||void 0===o||o,baseColor:(null==p?void 0:p.baseColor)||new Cesium.Color(0,0,.5,1),terrainExaggeration:(null==p?void 0:p.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(null==p?void 0:p.terrainExaggerationRelativeHeight)||0}),de.merge(f.translucency,{enabled:null!==(s=null==p||null===(a=p.translucency)||void 0===a?void 0:a.enabled)&&void 0!==s&&s,backFaceAlpha:+(null==p||null===(l=p.translucency)||void 0===l?void 0:l.backFaceAlpha)||1,backFaceAlphaByDistance:null==p||null===(u=p.translucency)||void 0===u?void 0:u.backFaceAlphaByDistance,frontFaceAlpha:+(null==p||null===(c=p.translucency)||void 0===c?void 0:c.frontFaceAlpha)||1,frontFaceAlphaByDistance:null==p||null===(h=p.translucency)||void 0===h?void 0:h.frontFaceAlphaByDistance}),this}},{key:"_setCameraController",value:function(){var e,t,i,n,r,o,s;if(null===(e=this._options)||void 0===e||!e.cameraController)return this;var a=this._viewer.scene.screenSpaceCameraController,l=this._options.cameraController;return de.merge(a,{enableInputs:null===(t=null==l?void 0:l.enableInputs)||void 0===t||t,enableRotate:null===(i=null==l?void 0:l.enableRotate)||void 0===i||i,enableTilt:null===(n=null==l?void 0:l.enableTilt)||void 0===n||n,enableTranslate:null===(r=null==l?void 0:l.enableTranslate)||void 0===r||r,enableZoom:null===(o=null==l?void 0:l.enableZoom)||void 0===o||o,enableCollisionDetection:null===(s=null==l?void 0:l.enableCollisionDetection)||void 0===s||s,minimumZoomDistance:+(null==l?void 0:l.minimumZoomDistance)||1,maximumZoomDistance:+(null==l?void 0:l.maximumZoomDistance)||this._viewer.maxCameraHeight}),this}},{key:"setOptions",value:function(e){return 0===Object.keys(e).length||(this._options=vr(vr({},this._options),e),this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController()),this}}]),e}();var gr=i(237);function _r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}const Cr=function(){function e(t,i,r){n(this,e),this._url=t||"https://api.tianditu.gov.cn/v2/search",this.apiKey=i||"b832b9764939cbb0919148c548b669ba",this._params=null!=r?r:{}}return a(e,[{key:"geocode",value:function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_r(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({keyWord:e,level:11,mapBound:"-180,-90,180,90",queryType:4,start:0,count:10},this._params);return new Cesium.Resource({url:this._url,queryParameters:{format:"json",postStr:JSON.stringify(t),tk:this.apiKey,type:"query"}}).fetchJson().then((function(e){if(!e.count||0==e.count)return[];var t=e.suggests,i=[];return t.forEach((function(e){i.push({displayName:e.name,destination:e.gbCode+""})})),i}))}}]),e}();function br(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}const wr=function(){function e(t,i,r){n(this,e),this._url=t,this.apiKey=i,this._params=null!=r?r:{}}return a(e,[{key:"geocode",value:function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?br(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):br(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({keyword:e,pageIndex:1,pageSize:10,returnGeometry:!0,searchField:"NAME",f:"json"},this._params);return new Cesium.Resource({url:this._url.replace("token",this.apiKey),queryParameters:t}).fetchJson().then((function(e){if(!e.featuresTotal||0==e.featuresTotal)return[];var t=e.features,i=[];return t.forEach((function(e){i.push({displayName:e.NAME,destination:e.coor})})),i}))}}]),e}();const Pr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,e),!t.viewer)throw new Error("必须传入viewer");this.viewer=t.viewer,this.flyComplete=new Cesium.Event,this._init(t)}return a(e,[{key:"_init",value:function(e){}},{key:"_blurInput",value:function(){(document.querySelector(".cesium-geocoder-input").blur(),window.getSelection)?window.getSelection().removeAllRanges():document.selection&&document.selection.empty&&document.selection.empty()}},{key:"_clearInput",value:function(){document.querySelector(".cesium-geocoder-input").value=""}},{key:"_getContainer",value:function(e){var t=document.createElement("div");return t.setAttribute("class","cesium-viewer-geocoderContainer"),"string"==typeof e&&(e=document.getElementById(e)),e.appendChild(t),t}},{key:"tanslate",value:function(){for(var e=document.getElementsByClassName("cesium-geocoder-input"),t=0;t<e.length;t++)e[t].setAttribute("placeholder","请输入地名...")}}]),e}();const Or=function(){function e(t){n(this,e),this._presetPois=t.presetPois||[],this._presetLength=t.presetLength||4}return a(e,[{key:"setPresetPois",value:function(e){this._presetPois=e}},{key:"geocode",value:function(e){var t=[];if(e.length>=this._presetLength)for(var i=0;i<this._presetPois.length;i++){var n=this._presetPois[i];n.name.trim().startsWith(e)&&t.push({displayName:n.name,destination:{type:"preset",id:n.id,lon:n.lon,lat:n.lat}})}return new Promise((function(e,i){e(t)})).then((function(e){return e}))}}]),e}();function xr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Er(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const kr=function(e){c(i,e);var t=Ar(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"_init",value:function(e){var t,i=e.url||"https://api.tianditu.gov.cn/v2/search",n=e.apiKey||"b832b9764939cbb0919148c548b669ba";this._scaleRatio=e.scaleRatio||1,this._params=null!==(t=e.params)&&void 0!==t?t:{};var r=new Cr(i,n,this._params),o=new Or(e);this._tinadituService=r,this._staticService=o;var s=this._getContainer(e.container),a=new Cesium.Geocoder(Er(Er({},e),{},{container:s,geocoderServices:[o,r],destinationFound:this.flyToDestination.bind(this)}));a.viewModel.flyStart=new Cesium.Event,a.viewModel.flyStart.addEventListener(this._blurInput),a.viewModel.complete.addEventListener(this._clearInput),a.viewModel.complete.addEventListener(this._blurInput),this.tanslate()}},{key:"setPresetPois",value:function(e){this._staticService.setPresetPois(e)}},{key:"flyToDestination",value:function(e,t){var i=this;if(e.flyStart.raiseEvent(),"object"!=r(t)){var n=Er({specify:t,keyWord:e._searchText,level:11,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10},this._params),o=new Cesium.Resource({url:this._tinadituService._url,queryParameters:{format:"json",postStr:JSON.stringify(n),tk:this._tinadituService.apiKey,type:"query"}});o.fetchJson().then((function(t){if(t.count&&0!=o.count)if(1==t.resultType){var n=t.pois[0];po.flyToPosition(i.viewer,n.lonlat,0,-90,1/i._scaleRatio*1500,e._flightDuration,(function(){e._complete.raiseEvent()}))}else{if(3!=t.resultType)return;var r=t.area;if(!r)return;for(var s=r.bound.split(","),a=[],l=0;l<s.length;l++)if((l+1)%2==0){var u=s[l-1]+","+s[l];a.push(u)}if(a.length<2)return;po.flyToPositions(i.viewer,a,0,-90,1/i._scaleRatio*.8,e._flightDuration,(function(){e._complete.raiseEvent()}))}}))}else po.flyToPosition(this.viewer,t.lon+","+t.lat,0,-90,1/this._scaleRatio*1500,e._flightDuration,(function(){e._complete.raiseEvent(t),i.flyComplete.raiseEvent(t)}))}}]),i}(Pr);function Tr(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Mr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Tr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Rr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Sr=function(e){c(i,e);var t=Rr(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"_init",value:function(e){var t,i=e.url||"https://shaanxi.tianditu.gov.cn/ServiceSystem/MapSearch/rest/service/searchPOI/token/SearchServer/0/fuzzy",n=e.apiKey||"04x-Fu5nGOnU7RY7";this._scaleRatio=e.scaleRatio||1,this._params=null!==(t=e.params)&&void 0!==t?t:{};var r=new wr(i,n,this._params),o=this._getContainer(e.container),s=new Cesium.Geocoder(Mr(Mr({},e),{},{container:o,geocoderServices:[r],destinationFound:this.flyToDestination.bind(this)}));s.viewModel.flyStart=new Cesium.Event,s.viewModel.flyStart.addEventListener(this._blurInput),s.viewModel.complete.addEventListener(this._clearInput),s.viewModel.complete.addEventListener(this._blurInput),this.tanslate()}},{key:"flyToDestination",value:function(e,t){e.flyStart.raiseEvent(),po.flyToPosition(this.viewer,t,0,-90,1/this._scaleRatio*1500,e._flightDuration,(function(){e._complete.raiseEvent()}))}}]),i}(Pr);const jr=Sr;const Ir=Object.freeze({TIANDITU:0,TIANDITU_SHANXI:1,STATIC_PRESET:2});const Lr=function(){function e(){n(this,e)}return a(e,null,[{key:"createGeocoder",value:function(e,t){var i=void 0;switch(e){case Ir.TIANDITU:i=new kr(t);break;case Ir.TIANDITU_SHANXI:i=new jr(t);break;case Ir.STATIC_PRESET:i=new Or(t)}return i}}]),e}();var Dr=function(){function e(){n(this,e)}return a(e,null,[{key:"_setContent",value:function(t){e.content=e.content.replace("{{__VERSION__}}",t.version).replace("{{__TIME__}}",e._getTime()).replace("{{__AUTHOR__}}",t.author).replace("{{__HOME_PAGE__}}",t.home_page)}},{key:"_getTime",value:function(){var e=new Date,t=e.getMonth()+1;t=t<10?"0"+t:t;var i=e.getDate();return i=i<10?"0"+i:i,"".concat(e.getFullYear(),"-").concat(t,"-").concat(i)}},{key:"consoleOut",value:function(){setTimeout((function(){console.clear(),console.log(e.content,"font-size:20px;padding-left:70px;color:#FF3300;","font-size:14px;padding-left:50px;color:#3366FF;font-style:oblique;","font-size:12px;color:#3366FF;")}),2e3)}}]),e}();function Br(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Gr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Br(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Br(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Z(Dr,"content","%c \n @anov/gis \n %c \n 三维WebGIS二次开发SDK %c \n\n 版本: {{__VERSION__}}\n 编译日期:{{__TIME__}}\n npm地址: https://www.npmjs.com/package/@anov/gis\n 开发作者: {{__AUTHOR__}}\n 网站主页: {{__HOME_PAGE__}} \n\n\n 微信:drmj2022\n QQ:1621018105\n 手机号:16619716371 \n \n\n 版权声明:\n 任何个人和机构在遵守下列条件的前提下可以永久免费使用:\n 1)程序包完整引用;\n 2)保留此版权信息在控制台输出。\n 我方保留对此版权信息的最终解释权。");var Hr={vrButton:!1,animation:!1,baseLayerPicker:!1,baseLayer:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!1,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,navigationInstructionsInitiallyVisible:!1,creditContainer:void 0,shouldAnimate:!0,showFPS:!1,flyDuration:3,language:"chinese",copyRight:!1,scaleRatio:1,drillPick:!1,DEFAULT_VIEW_FACTOR:1,imageryProviderViewModels:[],minZoom:0,maxZoom:20,maxCameraHeight:3e7,minPitch:-90,maxPitch:0,pitch:-90,zoom:void 0,center:void 0},Nr=function(){function e(t){var i,r,o,s,a=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,e),!t||"string"==typeof t&&!document.getElementById(t))throw new Error("Viewer:必须传入放置三维球的dom id");if(l.changeDeaultView=null===(i=l.changeDeaultView)||void 0===i||i,l.defaultView=null!==(r=l.defaultView)&&void 0!==r?r:[78,23,140,60],l.changeDeaultView&&this.setDeaultView(l.defaultView),l.changeDefaultAccessToken=null===(o=l.changeDefaultAccessToken)||void 0===o||o,l.changeDefaultAccessToken&&this.setDefaultAccessToken(),this.initEnvironment(),this._options=Gr(Gr(Gr({},Hr),l),{},{geocoder:!1}),Cesium.Camera.DEFAULT_VIEW_FACTOR=this._options.DEFAULT_VIEW_FACTOR,this._nativeObjCesium=new Cesium.Viewer(t,this._options),this._nativeObjCesium.wrap=this,this._options.showFPS&&(this._nativeObjCesium.scene.debugShowFramesPerSecond=!0),this._initCameraInteraction(),this._scaleRatio=this._options.scaleRatio,this._eventDispatchMode="legacy",this._viewerEvent=new Yn,this._sceneEvent=new Qn(this),this._mouseEvent=new qn(this),this._viewerOption=new yr(this),this._layerContainer=ve.create("div","viewer-layers","string"==typeof t?document.getElementById(t):t),this._layerCache={},this._nativeObjCesium._cesiumWidget._creditContainer.style.display="none",setTimeout((function(){a.createDefaultGeocoderContainer(l.geocoderType)}),0),this._options.baseLayerPicker){var u=l.tiandituKey;So.init(this,u)}this._options.showMapInfo&&new xo(this),"chinese"==this._options.language&&new jo(this).toChinese(),this._options.copyRight&&Dr.consoleOut(),this.drillPick=this.nativeObjCesium.drillPick=this._options.drillPick,this._sensitivity=null!==(s=l.sensitivity)&&void 0!==s?s:.15,this._initView(l)}return a(e,[{key:"_initCameraInteraction",value:function(){var e=this._nativeObjCesium.scene.screenSpaceCameraController;return e.rotateEventTypes=[Cesium.CameraEventType.LEFT_DRAG],e.translateEventTypes=[Cesium.CameraEventType.LEFT_DRAG],e.tiltEventTypes=[Cesium.CameraEventType.RIGHT_DRAG],e.zoomEventTypes=[Cesium.CameraEventType.MIDDLE_DRAG,Cesium.CameraEventType.WHEEL,Cesium.CameraEventType.PINCH],e.maximumZoomDistance=this._options.maxCameraHeight,this}},{key:"_initView",value:function(e){var t,i,n,r,o,s=this;if(this._minZoom=null!==(t=e.minZoom)&&void 0!==t?t:0,this._maxZoom=null!==(i=e.maxZoom)&&void 0!==i?i:20,this._minPitch=null!==(n=e.minPitch)&&void 0!==n?n:-90,this._maxPitch=null!==(r=e.maxPitch)&&void 0!==r?r:0,this._defaultPitch=null!==(o=e.pitch)&&void 0!==o?o:-90,this._minPitch>this._maxPitch){var a=[this._maxPitch,this._minPitch];this._minPitch=a[0],this._maxPitch=a[1]}if(this._minZoom>this._maxZoom){var l=[this._maxZoom,this._minZoom];this._minZoom=l[0],this._maxZoom=l[1]}if(this._options.center){var u,c,h=null!==(u=null!==(c=this._options.center.pitch)&&void 0!==c?c:this._options.pitch)&&void 0!==u?u:this._defaultPitch;("number"!=typeof h||isNaN(h))&&(h=-90),h=Math.max(this._minPitch,Math.min(this._maxPitch,h));var f=this._options.zoom,p=this._options.center.range||this._options.center.alt;if(void 0===f||isNaN(f))p||(p=20037508.34/Math.pow(2,8));else{var m=Math.max(this._minZoom,Math.min(this._maxZoom,f));p=20037508.34/Math.pow(2,m-2)}p=Math.min(p,this._options.maxCameraHeight);var d=Math.abs(Cesium.Math.toRadians(h)),v=d>.001?p/Math.abs(Math.sin(d)):p;po.flyToPosition(this,this._options.center,this._options.center.heading||0,h,v,this._options.flyDuration,(function(){s.raiseEvent($.FLY_COMPLETE),s._options.completeCallback&&s._options.completeCallback()}))}else if(void 0!==this._options.zoom){Math.max(this._minPitch,Math.min(this._maxPitch,this._defaultPitch));this.setZoom(this._options.zoom,!0,this._options.flyDuration||3),this.raiseEvent($.FLY_COMPLETE)}}},{key:"scaleRatio",get:function(){return this._scaleRatio}},{key:"nativeObjCesium",get:function(){return this._nativeObjCesium}},{key:"container",get:function(){return this._nativeObjCesium.container}},{key:"extend",get:function(){return this._nativeObjCesium.extend}},{key:"sceneModePicker",get:function(){return this._nativeObjCesium.sceneModePicker}},{key:"navigationHelpButton",get:function(){return this._nativeObjCesium.navigationHelpButton}},{key:"baseLayerPicker",get:function(){return this._nativeObjCesium.baseLayerPicker}},{key:"fullscreenButton",get:function(){return this._nativeObjCesium.fullscreenButton}},{key:"layerContainer",get:function(){return this._layerContainer}},{key:"scene",get:function(){return this._nativeObjCesium.scene}},{key:"camera",get:function(){return this._nativeObjCesium.camera}},{key:"canvas",get:function(){return this._nativeObjCesium.scene.canvas}},{key:"dataSources",get:function(){return this._nativeObjCesium.dataSources}},{key:"imageryLayers",get:function(){return this._nativeObjCesium.imageryLayers}},{key:"terrainProvider",get:function(){return this._nativeObjCesium.terrainProvider},set:function(e){e&&(e instanceof Cesium.Terrain?this._nativeObjCesium.scene.setTerrain(e):this._nativeObjCesium.terrainProvider=e)}},{key:"entities",get:function(){return this._nativeObjCesium.entities}},{key:"postProcessStages",get:function(){return this._nativeObjCesium.scene.postProcessStages}},{key:"clock",get:function(){return this._nativeObjCesium.clock}},{key:"viewerEvent",get:function(){return this._viewerEvent}},{key:"screenSpaceEventHandler",get:function(){return this._nativeObjCesium.screenSpaceEventHandler}},{key:"cameraPosition",get:function(){var e=Ne.transformCartesianToWGS84(this.camera.positionWC);return e&&(e.heading=Cesium.Math.toDegrees(this.camera.heading),e.pitch=Cesium.Math.toDegrees(this.camera.pitch),e.roll=Cesium.Math.toDegrees(this.camera.roll)),e}},{key:"maxCameraHeight",get:function(){return this._options.maxCameraHeight}},{key:"setMaxCameraHeight",value:function(e){var t=+e;return!t||isNaN(t)||(this._options.maxCameraHeight=t,this._nativeObjCesium.scene.screenSpaceCameraController.maximumZoomDistance=t),this}},{key:"resolution",get:function(){var e=this.scene.canvas.width,t=this.scene.canvas.height,i=Ne.transformWindowToWGS84(new Cesium.Cartesian2(e/2|0,t-1),this),n=Ne.transformWindowToWGS84(new Cesium.Cartesian2(1+e/2|0,t-1),this);return i&&n?Math.abs(i.lng-n.lng):1}},{key:"viewBoundsRectangle",get:function(){var e=this.scene.canvas.width,t=this.scene.canvas.height,i=Ne.transformWindowToWGS84(new Cesium.Cartesian2(0,t),this),n=Ne.transformWindowToWGS84(new Cesium.Cartesian2(e,0),this);return i&&n?Cesium.Rectangle.fromDegrees(i.lng,i.lat,n.lng,n.lat):Cesium.Rectangle.MAX_VALUE}},{key:"level",get:function(){return this._nativeObjCesium.scene.globe._surface._debug.maxDepthVisited}},{key:"mouseSensitivity",get:function(){return this._sensitivity},set:function(e){this._sensitivity=e}},{key:"eventDispatchMode",get:function(){return this._eventDispatchMode},set:function(e){this._eventDispatchMode=e}},{key:"extendCesium",value:function(){var e=Cesium.ImageryLayer.prototype.removeImageryFromCache;Cesium.ImageryLayer.prototype.tileRemoved=new Cesium.Event,Cesium.ImageryLayer.prototype.removeImageryFromCache=function(t){e.call(this,t),Cesium.ImageryLayer.prototype.tileRemoved.raiseEvent(t)}}},{key:"initEnvironment",value:function(){gr.Z.initEnvironment(),this.extendCesium(),window.anovgis_applyfn&&gr.Z.install(anovgis_applyfn),window.ANOVCITY&&gr.Z.install(ANOVCITY)}},{key:"setOptions",value:function(e){var t;this._viewerOption.setOptions(e);var i=+(null==e?void 0:e.maxCameraHeight)||+(null==e||null===(t=e.cameraController)||void 0===t?void 0:t.maximumZoomDistance);return i&&this.setMaxCameraHeight(i),this}},{key:"createDefaultGeocoderContainer",value:function(e){if(Cesium.defined(e)){var t=document.querySelector(".cesium-viewer-toolbar"),i=(t.offsetHeight,t.offsetWidth),n=document.createElement("div");n.setAttribute("class","geocoderContainerDefault"),n.style.right=i+7+"px",this.container.appendChild(n),Lr.createGeocoder(e,{viewer:this,container:n,scene:this.scene})}}},{key:"setDeaultView",value:function(e){var t;Cesium.Camera.DEFAULT_VIEW_RECTANGLE=(t=Cesium.Rectangle).fromDegrees.apply(t,De(e))}},{key:"setDefaultAccessToken",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZDE4NjNiNC1jZDY5LTQ4MjctOTdjMi1iYTJiNzRmNDc3YmUiLCJpZCI6MTY1MzEsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzA2OTQ4NDJ9.dOY7whEypIg6v8dbIFQdd5NeQZRLM2po13XAJBMpuRs";Cesium.Ion.defaultAccessToken=e}},{key:"setNoNight",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scene.light=e?new Cesium.DirectionalLight({direction:new Cesium.Cartesian3(.35492591601301104,-.8909182691839401,-.2833588392420772)}):new Cesium.SunLight}},{key:"_addLayer",value:function(e){!this._layerCache[e.type]&&(this._layerCache[e.type]={}),Object(this._layerCache[e.type]).hasOwnProperty(e.id)||(e.raiseEvent(ne.ADD,this),this._layerCache[e.type][e.id]=e)}},{key:"_removeLayer",value:function(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.raiseEvent(ne.REMOVE,this),delete this._layerCache[e.type][e.id])}},{key:"changeSceneMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 2===e?this._nativeObjCesium.scene.morphTo2D(t):3===e?this._nativeObjCesium.scene.morphTo3D(t):2.5===e&&this._nativeObjCesium.scene.morphToColumbusView(t),this}},{key:"getImageryLayerInfo",value:function(e){var t=this._nativeObjCesium.camera.getPickRay(e);return this._nativeObjCesium.imageryLayers.pickImageryLayerFeatures(t)}},{key:"addBaseImageryLayer",value:function(e){return e?(this.imageryLayers.addImageryProvider(e),this):this}},{key:"addTerrain",value:function(e){return this}},{key:"removeTerrain",value:function(){return this._nativeObjCesium.terrainProvider=new Cesium.EllipsoidTerrainProvider,this}},{key:"addLayer",value:function(e){return this._addLayer(e),this}},{key:"removeLayer",value:function(e){return this._removeLayer(e),this}},{key:"hasLayer",value:function(e){return Object(this._layerCache[e.type]).hasOwnProperty(e.id)}},{key:"getLayer",value:function(e){var t=this.getLayers().filter((function(t){return t.id===e}));return t&&t.length?t[0]:void 0}},{key:"getLayers",value:function(){var e=this,t=[];return Object.keys(this._layerCache).forEach((function(i){var n=e._layerCache[i];Object.keys(n).forEach((function(e){t.push(n[e])}))})),t}},{key:"eachLayer",value:function(e,t){var i=this;return Object.keys(this._layerCache).forEach((function(n){var r=i._layerCache[n];Object.keys(r).forEach((function(i){e.call(t,r[i])}))})),this}},{key:"flyTo",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2.2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0;if(e)if(e instanceof mr&&e.flyTo)e.flyTo(n,r,o,s);else{var a=function(e){e&&Cesium.defined(e.center)&&t._nativeObjCesium.camera.flyToBoundingSphere(e,{duration:i,offset:new Cesium.HeadingPitchRange(Cesium.Math.toRadians(n),Cesium.Math.toRadians(r),o),complete:function(){s&&s()}})};if(e.boundingSphere)a(e.boundingSphere);else if(e._readyPromise&&e._readyPromise.then)e._readyPromise.then((function(){var i=t._nativeObjCesium.scene,n=120,r=i.postRender.addEventListener((function(){var t=e.boundingSphere;if(t&&Cesium.defined(t.center))r(),a(t);else{if(--n>0)return;r()}}))}));else{var l=e.nativeObjCesium||e;if(l)try{var u=l.boundingSphere;if(u&&Cesium.defined(u.center))return void a(u)}catch(e){}var c=this._nativeObjCesium.flyTo(l,{duration:i,offset:new Cesium.HeadingPitchRange(Cesium.Math.toRadians(n),Cesium.Math.toRadians(r),o)});c&&c.then((function(){s&&s()}))}}}},{key:"flyToTileset",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-60;if(this._nativeObjCesium&&e){var o=function(){var o=e.boundingSphere;o&&Cesium.defined(o.center)&&t._nativeObjCesium.camera.flyToBoundingSphere(o,{duration:i,offset:new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(r),o.radius*n)})};if(e.boundingSphere)o();else if(e._readyPromise&&e._readyPromise.then)e._readyPromise.then((function(){var i=t._nativeObjCesium.scene,n=120,r=i.postRender.addEventListener((function(){var t=e.boundingSphere;if(t&&Cesium.defined(t.center))r(),o();else{if(--n>0)return;r()}}))}));else{var s=e.nativeObjCesium||e;if(s){var a=this._nativeObjCesium,l=function(e){var t=e.boundingSphere.radius;a.flyTo(e,{duration:i,offset:new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(r),t*n)})};return s.then?s.then(l):s.readyEvent?s.readyEvent.addEventListener(l):void l(s)}}}}},{key:"flyToPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(e){var n=(e=Be.parsePosition(e)).alt||0,r=new Ie(e.lng,e.lat,0),o=Ne.transformWGS84ToCartesian(r),s=e.heading||0,a=e.pitch||-90;return po.flyToPoint(this,o,s,a,n,t,i),this}}},{key:"flyToPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-90,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:3,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(e){e=Be.parsePosition(e);var s=Ne.transformWGS84ToCartesian(e);return po.flyToPoint(this,s,t,i,n,r,o),this}}},{key:"zoomTo",value:function(e){if(e&&e.boundingSphere&&Cesium.defined(e.boundingSphere.center)){var t=e.boundingSphere;return this._nativeObjCesium.camera.viewBoundingSphere(t,new Cesium.HeadingPitchRange(0,-.5,t.radius)),this}return this._nativeObjCesium.zoomTo(e.nativeObjCesium||e)}},{key:"addEventListener",value:function(e,t,i){var n=this._viewerEvent.hasEvent(e)?this._viewerEvent.addEventListener(e,t,i||this):void 0,r=this._sceneEvent.hasEvent(e)?this._sceneEvent.addEventListener(e,t,i||this):void 0;return n||r||this._viewerEvent.warnUnknownType(e),[n,r]}},{key:"addEventListenerOnce",value:function(e,t,i){return this._viewerEvent.hasEvent(e)?this._viewerEvent.addEventListenerOnce(e,t,i||this):this._sceneEvent.hasEvent(e)?this._sceneEvent.addEventListenerOnce(e,t,i||this):void this._viewerEvent.warnUnknownType(e)}},{key:"raiseEvent",value:function(e,t){return this._viewerEvent.raiseEvent(e,t),this}},{key:"removeEventListener",value:function(e,t,i){return this._viewerEvent.removeEventListener(e,t,i||this),this._sceneEvent.removeEventListener(e,t,i||this),this}},{key:"destroy",value:function(){var e=this;return this._mouseEvent&&this._mouseEvent.destroy(),Object.keys(this._layerCache).forEach((function(t){var i=e._layerCache[t];Object.keys(i).forEach((function(t){e._removeLayer(i[t])}))})),this._nativeObjCesium.destroy(),ve.empty(this.container),this._nativeObjCesium=void 0,this._baseLayerPicker=void 0,this._layerCache={},gr.Z.Initialized=!1,this}},{key:"exportScene",value:function(e){this.scene.render();var t=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),i=document.createElement("a"),n=de.dataURLtoBlob(t),r=URL.createObjectURL(n);return i.download="".concat(e||"scene",".png"),i.href=r,i.click(),this}},{key:"showFrames",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scene.debugShowFramesPerSecond=e}},{key:"_computeRangeFromHeight",value:function(e,t){var i=Math.abs(Cesium.Math.toRadians(t)),n=Math.max(i,Cesium.Math.toRadians(10));return e/Math.sin(n)}},{key:"getRangeToCenter",value:function(){var e=this.getCenter();if(!e)return this.camera.positionCartographic.height;var t=Ne.transformWGS84ToCartesian(e);return Cesium.Cartesian3.distance(this.camera.positionWC,t)}},{key:"getPitch",value:function(){return Cesium.Math.toDegrees(this.camera.pitch)}},{key:"setPitch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5;if("number"!=typeof e)return this;var i=Math.max(this._minPitch,Math.min(this._maxPitch,e)),n=this.getCenter()||this.cameraPosition,r=this.getRangeToCenter();return this.flyToPoint({lng:n.lng,lat:n.lat,alt:0},Cesium.Math.toDegrees(this.camera.heading),i,r,t||.5,null),this}},{key:"getZoomRange",value:function(){return{min:this._minZoom,max:this._maxZoom}}},{key:"setZoomRange",value:function(e,t){this._minZoom=Math.max(0,e),this._maxZoom=Math.max(0,t);var i=this.getZoom();return i<this._minZoom?this.setZoom(this._minZoom,!0,.3):i>this._maxZoom&&this.setZoom(this._maxZoom,!0,.3),this}},{key:"getPitchRange",value:function(){return{min:this._minPitch,max:this._maxPitch}}},{key:"setPitchRange",value:function(e,t){if(this._minPitch=Math.max(-90,Math.min(e,0)),this._maxPitch=Math.max(-90,Math.min(t,0)),this._minPitch>this._maxPitch){var i=[this._maxPitch,this._minPitch];this._minPitch=i[0],this._maxPitch=i[1]}var n=this.getPitch();return(n<this._minPitch||n>this._maxPitch)&&this.setPitch(Math.max(this._minPitch,Math.min(this._maxPitch,n)),!0,.3),this}},{key:"setCenterAndZoom",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(!e)return this;var n=Be.parsePosition(e);if(!n)throw new Error("Invalid center position");var r=void 0!==t?t:this.getZoom(),o=Math.max(this._minZoom,Math.min(this._maxZoom,r)),s=Math.min(20037508.34/Math.pow(2,o-2),this._options.maxCameraHeight),a=this.getPitch(),l=this._computeRangeFromHeight(s,a);return this.flyToPoint({lng:n.lng,lat:n.lat,alt:0},Cesium.Math.toDegrees(this.camera.heading),a,l,i,null),this}},{key:"getCenter",value:function(){var e=this.canvas,t=new Cesium.Cartesian2(e.clientWidth/2,e.clientHeight/2),i=this.camera.getPickRay(t);if(i){var n=this.globe&&this.globe.pick(i,this.scene);if(n){var r=Ne.transformCartesianToWGS84(n);return r?new Ie(r.lng,r.lat,r.alt):void 0}}var o=this.globe?this.globe.ellipsoid:Cesium.Ellipsoid.WGS84,s=this.camera.pickEllipsoid(t,o);if(s){var a=o.cartesianToCartographic(s);return new Ie(Cesium.Math.toDegrees(a.longitude),Cesium.Math.toDegrees(a.latitude),a.height)}var l=this.camera.positionCartographic;return new Ie(Cesium.Math.toDegrees(l.longitude),Cesium.Math.toDegrees(l.latitude),0)}},{key:"setCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e)return this;var i=Be.parsePosition(e);if(!i)throw new Error("Invalid center position");var n=this.getPitch(),r=this.getRangeToCenter();return this.flyToPoint({lng:i.lng,lat:i.lat,alt:0},Cesium.Math.toDegrees(this.camera.heading),n,r,t||.5,null),this}},{key:"zoomIn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.3;return this.getZoom()>=this._maxZoom?this:this.setZoom(Math.min(this.getZoom()+1,this._maxZoom),e)}},{key:"zoomOut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.3;return this.getZoom()<=this._minZoom?this:this.setZoom(Math.max(this.getZoom()-1,this._minZoom),e)}},{key:"getZoom",value:function(){try{var e=this.getCenter();if(!e)throw new Error("No center");var t=Ne.transformWGS84ToCartesian(e),i=Cesium.Cartesian3.distance(this.camera.positionWC,t),n=Math.abs(this.camera.pitch),r=Math.max(n,.001),o=i*Math.sin(r),s=Math.log2(20037508.34/Math.max(o,1))+2;return Math.round(10*s)/10}catch(e){var a=Math.max(this.camera.positionCartographic.height,1),l=Math.log2(20037508.34/a)+2;return Math.round(10*l)/10}}},{key:"getClampedZoom",value:function(){var e=this.getZoom();return Math.max(this._minZoom,Math.min(this._maxZoom,e))}},{key:"setZoom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5;if("number"!=typeof e)return this;var i=Math.max(this._minZoom,Math.min(this._maxZoom,e)),n=Math.min(20037508.34/Math.pow(2,i-2),this._options.maxCameraHeight),r=this.getCenter()||this.cameraPosition,o=this.getPitch(),s=this._computeRangeFromHeight(n,o);return this.flyToPoint({lng:r.lng,lat:r.lat,alt:0},Cesium.Math.toDegrees(this.camera.heading),o,s,t,null),this}},{key:"getView",value:function(){var e=this.getCenter();return{center:e?{lng:e.lng,lat:e.lat,alt:e.alt}:null,zoom:this.getZoom(),pitch:this.getPitch(),heading:Cesium.Math.toDegrees(this.camera.heading),zoomRange:this.getZoomRange(),pitchRange:this.getPitchRange()}}},{key:"setView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(null==e||!e.center)return this;var i=Be.parsePosition(e.center),n=Math.max(this._minZoom,Math.min(this._maxZoom,void 0!==e.zoom?e.zoom:10)),r=Math.max(this._minPitch,Math.min(this._maxPitch,void 0!==e.pitch?e.pitch:this._defaultPitch)),o=20037508.34/Math.pow(2,n-2),s=this._computeRangeFromHeight(o,r);return this.flyToPoint({lng:i.lng,lat:i.lat,alt:0},void 0!==e.heading?e.heading:0,r,s,t,null),this}}]),e}();const zr=Nr;function Fr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Wr=Cesium,Ur=Wr.BoxGeometry,Vr=Wr.Cartesian3,qr=Wr.defined,Zr=Wr.DeveloperError,Yr=Wr.GeometryPipeline,Kr=Wr.Matrix3,Qr=Wr.Matrix4,Xr=Wr.Transforms,Jr=Wr.VertexFormat,$r=Wr.BufferUsage,eo=Wr.CubeMap,to=Wr.loadCubeMap,io=Wr.RenderState,no=Wr.VertexArray,ro=Wr.BlendingState,oo=Wr.SceneMode,so=Wr.ShaderProgram,ao=Wr.ShaderSource,lo=Wr.SkyBox,uo=function(e){c(i,e);var t=Fr(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r)).offsetAngle=(null==r?void 0:r.offsetAngle)||0,e}return a(i,[{key:"update",value:function(e,t){var i=this;if(this.show&&(e.mode===oo.SCENE3D||e.mode===oo.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var o=this.sources;if(!(qr(o.positiveX)&&qr(o.negativeX)&&qr(o.positiveY)&&qr(o.negativeY)&&qr(o.positiveZ)&&qr(o.negativeZ)))throw new Zr("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(r(o.positiveX)!==r(o.negativeX)||r(o.positiveX)!==r(o.positiveY)||r(o.positiveX)!==r(o.negativeY)||r(o.positiveX)!==r(o.positiveZ)||r(o.positiveX)!==r(o.negativeZ))throw new Zr("this.sources properties must all be the same type.");"string"==typeof o.positiveX?to(n,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new eo({context:n,source:o}))}var s=this._command;if(s.modelMatrix=Xr.eastNorthUpToFixedFrame(e.camera.positionWC),0!==this.offsetAngle&&Qr.multiply(s.modelMatrix,Qr.fromRotationTranslation(Kr.fromRotationZ(this.offsetAngle/180*Math.PI)),s.modelMatrix),!qr(s.vertexArray)){s.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return Qr.getMatrix3(s.modelMatrix,new Kr)}};var a=Ur.createGeometry(Ur.fromDimensions({dimensions:new Vr(2,2,2),vertexFormat:Jr.POSITION_ONLY})),l=this._attributeLocations=Yr.createAttributeLocations(a);s.vertexArray=no.fromGeometry({context:n,geometry:a,attributeLocations:l,bufferUsage:$r._DRAW}),s.renderState=io.fromCache({blending:ro.ALPHA_BLEND})}if(!qr(s.shaderProgram)||this._useHdr!==t){var u=new ao({defines:[t?"HDR":""],sources:["\n uniform samplerCube u_cubeMap;\n in vec3 v_texCoord;\n void main()\n {\n vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));\n out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n }\n"]});s.shaderProgram=so.fromCache({context:n,vertexShaderSource:"\n in vec3 position;\n in vec3 v_texCoord;\n uniform mat3 u_rotateMatrix;\n void main()\n {\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n }\n",fragmentShaderSource:u,attributeLocations:this._attributeLocations}),this._useHdr=t}if(qr(this._cubeMap))return s}}}]),i}(lo);const co=uo;function ho(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}var fo=function(){function e(){n(this,e)}return a(e,null,[{key:"flyToPoint",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{};if(!e)throw new Cesium.DeveloperError("viewer参数是必须的!");if(e=e.nativeObjCesium||e,!t)throw new Cesium.DeveloperError("destination参数是必须的!");var u=new Cesium.BoundingSphere(t,0);e.camera.flyToBoundingSphere(u,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ho(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ho(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({duration:o,maximumHeight:void 0,complete:function(){s&&"function"==typeof s&&s()},cancel:function(){console.log("定位取消!")},offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:r},easingFunction:a},l))}},{key:"flyToPosition",value:function(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{};if(i){i=Be.parsePosition(i);var c=Ne.transformWGS84ToCartesian(i);e.flyToPoint(t,c,n,r,o,s,a,l,u)}}},{key:"centerAt",value:function(e,t,i,n){var r=Cesium.Cartesian3.fromDegrees(t,i,0);this.flyToPoint(e.nativeObjCesium||e,r,0,-90,n||500,0)}},{key:"flyToRectangle",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;if(!e)throw new Cesium.DeveloperError("viewer参数是必须的!");if(e=e.nativeObjCesium||e,!Array.isArray(t)||2!=t.length)throw new Cesium.DeveloperError("cartesians必须为两个笛卡尔Cartesian3坐标!");var a=Cesium.Rectangle.fromCartesianArray(t),l=Cesium.BoundingSphere.fromRectangle3D(a);e.camera.flyToBoundingSphere(l,{duration:o,maximumHeight:void 0,complete:function(){s&&"function"==typeof s&&s()},cancel:function(){console.log("定位取消!")},offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:r}})}},{key:"flyToPoints",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-60,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;e=e.nativeObjCesium||e;var a=Cesium.BoundingSphere.fromPoints(t);a.radius=1*a.radius,e.camera.flyToBoundingSphere(a,{duration:o,complete:function(){s&&"function"==typeof s&&s()},offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:r}})}},{key:"flyToPositions",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-60,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;e=e.nativeObjCesium||e;var a=Be.parsePositions(t),l=Ne.transformWGS84ArrayToCartesianArray(a),u=Cesium.BoundingSphere.fromPoints(l);u.radius=u.radius*r,e.camera.flyToBoundingSphere(u,{duration:o,complete:function(){s&&"function"==typeof s&&s()},offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:0}})}},{key:"flyToTarget",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-90,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3,s=arguments.length>6?arguments[6]:void 0;if(t){if(!(t instanceof mr&&t.flyTo)){var a=(e.nativeObjCesium||e).flyTo(t.nativeObjCesium||t,{duration:o,offset:{heading:Cesium.Math.toRadians(i),pitch:Cesium.Math.toRadians(n),range:r}});return a&&a.then((function(){s&&s()})),a}t.flyTo(i,n,r,s)}}}]),e}();const po=fo;var mo=i(545);function vo(e,t,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=t||{},n.geometry=e,n}function yo(e,t){void 0===t&&(t={});var i={type:"FeatureCollection"};return t.id&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.features=e,i}function go(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return _o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _o(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function _o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}const Co=function(){function e(){n(this,e)}return a(e,null,[{key:"wktArrToEarthPosArr",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0;if(i&&"string"==typeof i)return t.forEach((function(t){var n=e.recurObjKey(t,i),r=n.obj,o=n.value;r.earthPos=e.wktStrToEarthPos(o)})),t}},{key:"wktStrToEarthPos",value:function(e){var t,i=[],n=go(e.slice(e.search(/\d+/g),e.search(/\)/g)).split(","));try{for(n.s();!(t=n.n()).done;){var r=t.value.split(" ");if(2!==r.length)throw new Error("WKT格式不正确");var o,s=go(r);try{for(s.s();!(o=s.n()).done;){var a=o.value;i.push(Cesium.Math.toRadians(parseFloat(a)))}}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}if(i.length<2)throw new Error("将WKT转化为Cesium.Cartesian3结果为空,转换失败");return i}},{key:"wktArrToCartesian3Arr",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(i&&"string"==typeof i)return t.forEach((function(t){var r=e.recurObjKey(t,i),o=r.obj,s=r.value;o.cartesian3=e.wktStrToCartesian3(s,n)})),t}},{key:"wktStrToCartesian3",value:function(e,t){var i,n=[],r=!1,o=go(e.slice(e.search(/\d+/g),e.search(/\)/g)).split(","));try{for(o.s();!(i=o.n()).done;){var s=i.value.split(" "),a=s.length;if(a<2||a>3)throw new Error("WKT格式不正确");if(void 0!==t&&"string"!=typeof t&&"number"!=typeof t||"number"==typeof t&&t!=t)throw new Error("高度参数{height}必须为字符串或者数字或者undefined类型");2!==a||"string"!=typeof t&&"number"!=typeof t||s.push(parseFloat(t)),3===s.length&&(r=!0);var l,u=go(s);try{for(u.s();!(l=u.n()).done;){var c=l.value;n.push(parseFloat(c))}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}if(n.length<2)throw new Error("将WKT转化为Cesium.Cartesian3结果为空,转换失败");return r?Cesium.Cartesian3.fromDegreesArrayHeights(n):Cesium.Cartesian3.fromDegreesArray(n)}},{key:"wktArrToGeoJson",value:function(){var e=this,t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(t&&"string"==typeof t){var n=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(r){var o=e.recurObjKey(r,t),s=o.obj,a=o.value,l=vo((0,mo.parse)(a));l.properties=s,l.properties.stroke="#555555",l.properties["stroke-opacity"]=1,l.properties["stroke-width"]=2,l.properties.fill="#555555",l.properties["fill-opacity"]=.5,i&&(l=i(l)),n.push(l)})),yo(n)}}},{key:"recurObjKey",value:function(e,t){var i=t.split("."),n=i.pop(),r=e;return i.forEach((function(e){return r=r[e]})),{obj:r,value:r[n]}}}]),e}();const bo=function(){function e(){n(this,e)}return a(e,null,[{key:"drawCanvalCircle",value:function(e,t,i,n,r){if(!e||!t||!Array.isArray(i)||i.length<1)return console.error("传入参数错误!"),"";"string"==typeof e&&(e=Cesium.Color.fromCssColorString(e)),n||(n=[{key:0,value:e.withAlpha(.3).toCssColorString()},{key:.8,value:e.withAlpha(.6).toCssColorString()},{key:1,value:e.withAlpha(.9).toCssColorString()}]);var o=document.createElement("canvas");o.width=t,o.height=t;var s=o.getContext("2d"),a=o.width/2,l=o.height/2,u=o.width/2,c=s.createRadialGradient(a,l,1,a,l,u);n.forEach((function(e){c.addColorStop(e.key,e.value)})),s.beginPath(),s.arc(a,l,u,0,2*Math.PI,!1),s.fillStyle=c,s.fill(),s.closePath(),s.restore(),s.fillStyle=Cesium.Color.WHITE.toCssColorString();var h=15*t/60;return r&&(h=r),s.font="bold ".concat(h,"px sans-serif"),s.textAlign="center",s.textBaseline="bottom",i.length>1?(s.fillText(i[0]+"",t/2,t/2),s.fillText(i[1]+"",t/2,t/4*3.1)):s.fillText(i[0]+"",t/2,t/2),o.toDataURL()}}]),e}();const wo=function(){function e(){n(this,e)}return a(e,null,[{key:"imageryLayerFeatureInfo2Geojson",value:function(e){return e?{type:"FeatureCollection",features:[e.data]}:null}}]),e}();const Po=function(){function e(){n(this,e)}return a(e,null,[{key:"inRing",value:function(e,t,i){if(i&&!1===this.inBBox(e,i))return!1;var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var r=0,o=t.length-1;r<t.length;o=r++){var s=t[r][0],a=t[r][1],l=t[o][0],u=t[o][1];a>e[1]!=u>e[1]&&e[0]<(l-s)*(e[1]-a)/(u-a)+s&&(n=!n)}return n}},{key:"inBBox",value:function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}},{key:"isPolygonsIntersect",value:function(e,t){var i=Cesium.Rectangle.fromCartesianArray(e),n=Cesium.Rectangle.fromCartesianArray(t),r=[],o=[];r.push(Cesium.Math.toDegrees(i.west),Cesium.Math.toDegrees(i.south),Cesium.Math.toDegrees(i.east),Cesium.Math.toDegrees(i.north)),o.push(Cesium.Math.toDegrees(n.west),Cesium.Math.toDegrees(n.south),Cesium.Math.toDegrees(n.east),Cesium.Math.toDegrees(n.north));for(var s=Ne.transformCartesianArrayToWGS84Array(e),a=Ne.transformCartesianArrayToWGS84Array(t),l=s.map((function(e){return[e.lng,e.lat]})),u=a.map((function(e){return[e.lng,e.lat]})),c=0;c<l.length;c++)for(var h=l[c],f=0;f<u.length;f++){var p=u[f];if(this.inRing(h,u,o)||this.inRing(p,l,r))return!0}return!1}},{key:"isPolygonsIntersect2",value:function(e,t,i,n){for(var r=0;r<e.length;r++)for(var o=e[r],s=0;s<t.length;s++){var a=t[s];if(this.inRing(o,t,n)||this.inRing(a,e,i))return!0}return!1}},{key:"isPolygonContainsPolygon",value:function(e,t,i){for(var n=0;n<e.length;n++)for(var r=0;r<t.length;r++){var o=t[r];if(!this.inRing(o,e,i))return!1}return!0}}]),e}();var Oo=function(){function e(t){var i=this;n(this,e),this.viewer=t,t.mapInfo=this,this._level=void 0,this._fpsEl=void 0,this._msEl=void 0,this._fpsFrameCount=0,this._msFrameCount=0,this._lastFpsSampleTime=Cesium.getTimestamp(),this._lastMsSampleTime=Cesium.getTimestamp();var r=document.createElement("div");r.setAttribute("id","anov-mapinfo-container"),r.style.textIndent="20px",r.style.backgroundColor="rgba(0, 0, 0, 0.4)",r.style.width="calc(100% - 30px)",r.style.height="30px",r.style.lineHeight="30px",r.style.position="absolute",r.style.bottom=0,r.style.color="white",t.container.appendChild(r),this._fpsEl=ve.create("span","fps-bar",r),this._fpsEl.style.marginRight="15px";var o=document.createElement("span");o.setAttribute("id","anov-mapinfo-lon"),o.innerHTML="经度:";var s=document.createElement("span");s.style.marginRight="15px",r.appendChild(o),r.appendChild(s),this.lonSpan=s;var a=document.createElement("span");a.setAttribute("id","anov-mapinfo-lat"),a.innerHTML="纬度:";var l=document.createElement("span");l.style.marginRight="15px",r.appendChild(a),r.appendChild(l),this.latSpan=l;var u=document.createElement("span");u.setAttribute("id","anov-mapinfo-heading"),u.innerHTML="偏航角:";var c=document.createElement("span");c.style.marginRight="15px",r.appendChild(u),r.appendChild(c);var h=document.createElement("span");h.setAttribute("id","anov-mapinfo-pitch"),h.innerHTML="视角:";var f=document.createElement("span");f.style.marginRight="15px",r.appendChild(h),r.appendChild(f);var p=document.createElement("span");p.setAttribute("id","anov-mapinfo-height"),p.innerHTML="视高:";var m=document.createElement("span"),d=document.createElement("span");d.setAttribute("id","anov-mapinfo-unit"),d.innerHTML="米",d.style.marginRight="15px",r.appendChild(p),r.appendChild(m),r.appendChild(d),this._level=ve.create("span","level-bar",r),this._level.style.marginRight="15px";new Cesium.ScreenSpaceEventHandler(t.scene.canvas);this._updateReadout=function(){var e=t.camera,n=d.textContent,r=e.positionWC,o=e.direction,s=i._lastCamera;if(!(s[0]===r.x&&s[1]===r.y&&s[2]===r.z&&s[3]===o.x&&s[4]===o.y&&s[5]===o.z)||n!==i._lastUnit){s[0]=r.x,s[1]=r.y,s[2]=r.z,s[3]=o.x,s[4]=o.y,s[5]=o.z;var a=Math.ceil(e.positionCartographic.height),l=a>1e3,u=l?a/1e3:a,h="m"===n||"km"===n?l?"km":"m":l?"千米":"米",p=Math.round(-Cesium.Math.toDegrees(e.pitch))||0,v=Math.round(Cesium.Math.toDegrees(e.heading))||0,y=u+"|"+p+"|"+v;y===i._lastReadout&&n===h||(i._lastReadout=y,i._lastUnit=h,m.innerText=String(u),d.textContent=h,f.innerText=p+"°",c.innerText=v+"°")}},this._lastCamera=[NaN,NaN,NaN,NaN,NaN,NaN],this._lastReadout="",this._lastUnit="",this._updateReadout(),t.addEventListener(ee.POST_UPDATE,this._onPostUpdate,this)}return a(e,[{key:"destory",value:function(){}},{key:"setPos",value:function(e){e&&(this.lonSpan.innerText=e.lng.toFixed(7),this.latSpan.innerText=e.lat.toFixed(7))}},{key:"_onPostUpdate",value:function(){var e=Cesium.getTimestamp();this._updateReadout(),this._fpsFrameCount++;var t=e-this._lastFpsSampleTime;if(t>1e3){var i=1e3*this._fpsFrameCount/t|0;this._fpsEl.innerHTML="<span>帧率:".concat(i," FPS</span>"),this._lastFpsSampleTime=e,this._fpsFrameCount=0}this._level.innerHTML="<span>层级:".concat(this.viewer.level,"</span>")}}]),e}();const xo=Oo;const Eo=a((function e(t,i){n(this,e),this.viewer=i;var r=document.getElementById(t),o=document.createElement("div");o.setAttribute("class","anov-poisearch_searchDiv"),o.innerHTML='<input placeholder="地名搜索" id="anov-poisearch_searchGaode" class="anov-poisearch_searchGaode">';var s=document.createElement("div");s.innerHTML="x",s.setAttribute("class","anov-poisearch_close"),s.style.display="none",o.appendChild(s);var a=document.createElement("div");a.setAttribute("class","anov-poisearch_resultList"),r.appendChild(o),r.appendChild(a);var l=document.getElementById("anov-poisearch_searchGaode");o.oninput=function(){c||(clearTimeout(u),u=setTimeout((function(){var e=l.value;s.style.display=e?"block":"none",h(e)}),1e3))},s.onclick=function(){s.style.display="none",l.value="",h("")};var u,c=!1;function h(e){a.innerHTML="",fetch("https://restapi.amap.com/v3/place/text?key=c8a650173d583fb038c7c2d1278e7cd8&&offset=10&&keywords="+e).then((function(e){return e.text()})).then((function(e){if((e=JSON.parse(e)).pois.length>0){var t="";e.pois.forEach((function(e){var i=e.location.split(","),n=i[0],r=i[1];t+='<div class="anov-poisearch_locationItem" lat='+r+" lon="+n+" title="+e.name+">"+e.name+"</div>"})),a.innerHTML=t}})).catch((function(e){return console.log(e)}))}a.onclick=function(e){l.value=e.target.getAttribute("title");var t=Number(e.target.getAttribute("lon")),n=Number(e.target.getAttribute("lat"));a.innerHTML="",po.flyToPosition(i,[t,n],0,-90,3e3,2,null)}}));function Ao(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ko(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ao(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var To=function(){function e(){n(this,e),this.params={},this.bgFS="\n uniform sampler2D u_map;\n uniform vec4 u_bgColor;\n layout(location = 0) out vec4 out_FragColor;\n in vec2 v_textureCoordinates;\n void main(){\n vec2 uv = v_textureCoordinates;\n vec4 bgColor = u_bgColor;\n vec4 color = texture(u_map, uv);\n if (color.a > 0.) {\n out_FragColor = bgColor;\n } else {\n out_FragColor = vec4(0.0);\n }\n } ",this.mainFS="\n uniform sampler2D u_map;\n uniform bool u_invert;\n uniform float u_alpha;\n layout(location = 0) out vec4 out_FragColor;\n in vec2 v_textureCoordinates;\n void main(){\n vec2 uv = v_textureCoordinates;\n vec4 color = texture( u_map , uv );\n float grayVal =( color.r + color.g + color.b ) / 3.;\n if(u_invert){\n grayVal = 1. - grayVal;\n }\n float alpha = color.a * u_alpha;\n out_FragColor=vec4( vec3( grayVal ) , alpha );\n }"}return a(e,[{key:"setTheme",value:function(e){var t,i,n,r,o;this.params=ko(ko({},this.params),e);var s=Cesium.Color;if(this.layer=null!==(t=this.params.layer)&&void 0!==t?t:null,this.layer){this.params.bgColor=null!==(i=this.params.bgColor)&&void 0!==i?i:s.TRANSPARENT,this.params.alpha=null!==(n=this.params.alpha)&&void 0!==n?n:1,this.params.invert=null!==(r=this.params.invert)&&void 0!==r&&r,this.params.preMultiplyAlpha=null===(o=this.params.preMultiplyAlpha)||void 0===o||o;var a=this;this.shaders={bgFS:a.bgFS,mainFS:a.mainFS,uniformMap:{u_invert:function(){return a.params.invert},u_alpha:function(){return a.params.alpha},u_bgColor:function(){return a.params.bgColor}}};var l=this.layer._createTextureWebGL;this.layer._createTextureWebGL=function(e,t){var i=l.bind(this)(e,t);return a.processTexture(e,i)||i}}}},{key:"processTexture",value:function(e,t){var i=this.params,n=this.shaders,r=t.sampler,o=Cesium,s=o.Texture,a=o.PixelFormat,l=o.PixelDatatype,u=o.WebGLConstants,c=o.Framebuffer,h=o.RenderState,f=o.BlendingState,p=o.Color,m=(o.defined,new s({context:e,pixelFormat:a.RGBA,pixelDatatype:l.UNSIGNED_BYTE,sampler:r,width:t.width,height:t.height,flipY:t.flipY,target:u.TEXTURE_2D,preMultiplyAlpha:i.preMultiplyAlpha})),d=new c({context:e,colorTextures:[m],destroyAttachments:!1}),v=h.fromCache({depthTest:{enabled:!1},blending:i.preMultiplyAlpha?f.PRE_MULTIPLIED_ALPHA_BLEND:f.ALPHA_BLEND,viewport:{x:0,y:0,width:t.width,height:t.height}});(n.uniformMap.u_map=function(){return t},p.equals(i.bgColor,p.TRANSPARENT))||e.createViewportQuadCommand(n.bgFS,{framebuffer:d,renderState:v,uniformMap:n.uniformMap}).execute(e);return e.createViewportQuadCommand(n.mainFS,{framebuffer:d,renderState:v,uniformMap:n.uniformMap}).execute(e),d.destroy(),t.destroy(),m}}]),e}();const Mo=To;var Ro=function(){function e(){n(this,e)}return a(e,null,[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"b832b9764939cbb0919148c548b669ba",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.preID=n;var o=[],s=Vo.createTdtImageryLayer({style:"img",key:i}),a=Vo.createTdtImageryLayer({key:i}),l=Vo.createTdtImageryLayer({key:i});l.nameC="tiandituDianzi_Dark";var u=Vo.createArcGisImageryLayer({style:"dark"}),c=new Cesium.MapboxStyleImageryProvider({styleId:"dark-v11",accessToken:"pk.eyJ1Ijoib2xkZG9nc2QiLCJhIjoiY2x4eDgxNGd3MWhwMjJrc2Q2djRjamU1NyJ9.QPCS0n3ss-WuQ7qcXe_Y-w"}),h=Vo.createAmapImageryLayer({style:"cva",crs:"WGS84"});h.nameC="gaode";var f=Vo.createTdtImageryLayer({style:"cia",key:i}),p=new Cesium.ProviderViewModel({name:"天地图影像",iconUrl:Cesium.buildModuleUrl("Widgets/Images/ImageryProviders/mapboxSatellite.png"),tooltip:"天地图影像",creationFunction:function(){return[s]}}),m=new Cesium.ProviderViewModel({name:"天地图影像(含注记)",iconUrl:Cesium.buildModuleUrl("static/images/bingAerialLabels.png"),tooltip:"天地图影像(含注记)",creationFunction:function(){return[s,f]}}),d=new Cesium.ProviderViewModel({name:"天地图-电子地图",iconUrl:Cesium.buildModuleUrl("static/images/tdt_vec.png"),tooltip:"天地图-电子地图",creationFunction:function(){return[a,f]}}),v=new Cesium.ProviderViewModel({name:"天地图-暗色系",iconUrl:Cesium.buildModuleUrl("static/images/blueblack.png"),tooltip:"天地图-暗色系",creationFunction:function(){return[l,f]}}),y=(new Cesium.ProviderViewModel({name:"蓝黑色系影像",iconUrl:Cesium.buildModuleUrl("static/images/blueblack.png"),tooltip:"蓝黑色系影像",creationFunction:function(){return[u]}}),new Cesium.ProviderViewModel({name:"Mapbox暗色",iconUrl:Cesium.buildModuleUrl("static/images/blueblack.png"),tooltip:"Mapbox暗色影像",creationFunction:function(){return[c]}}),new Cesium.ProviderViewModel({name:"高德综合",iconUrl:Cesium.buildModuleUrl("static/images/blueblack.png"),tooltip:"高德综合",creationFunction:function(){return[h]}}));o.push(p),o.push(m),o.push(d),o.push(v),o.push(y),e.baseLayerPicker.viewModel.imageryProviderViewModels=o,n<1&&(n=1),n>o.length&&(n=o.length),e.baseLayerPicker.viewModel.selectedImagery=e.baseLayerPicker.viewModel.imageryProviderViewModels[n-1],e.baseLayerPicker.viewModel.terrainProviderViewModels[0].name="无地形",e.baseLayerPicker.viewModel.terrainProviderViewModels[1].name="DEM地形",r<1&&(r=1),r>e.baseLayerPicker.viewModel.terrainProviderViewModels.length&&(r=e.baseLayerPicker.viewModel.terrainProviderViewModels.length),e.baseLayerPicker.viewModel.selectedTerrain=e.baseLayerPicker.viewModel.terrainProviderViewModels[r-1];var g=function(i){if(i.imageryProvider)if("gaode"==i.imageryProvider.nameC)t.setViewerTheme(e,{layer:i});else if("tiandituDianzi_Dark"==i.imageryProvider.nameC){i.show=!1,t.imageryThemeGL||(t.imageryThemeGL=new Mo);var n=[20,29,43,1];t.imageryThemeGL.setTheme({layer:i,bgColor:new Cesium.Color(n[0]/255,n[1]/255,n[2]/255,1),alpha:.1,invert:!0,preMultiplyAlpha:!0}),setTimeout((function(){i.show=!0}),100)}else t.goadeDarkShader&&t.resetTheme(e)};e.imageryLayers.layerAdded.addEventListener((function(e){if(e.imageryProvider)g(e);else var t=e.readyEvent.addEventListener((function(){g(e),t()}))}))}},{key:"setSelectedImagery",value:function(e,t){e.baseLayerPicker.viewModel.selectedImagery=e.baseLayerPicker.viewModel.imageryProviderViewModels[t-1]}},{key:"setSelectedTerrain",value:function(e,t){e.baseLayerPicker.viewModel.selectedTerrain=e.baseLayerPicker.viewModel.terrainProviderViewModels[t-1]}},{key:"resetTheme",value:function(e){for(var t=e.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources,i=0;i<t.length;i++){t[i]=t[i].replace(this.goadeDarkShader,"color = czm_saturation(color, textureSaturation);\n#endif\n")}}},{key:"setViewerTheme",value:function(e){var t,i,n,r,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null!==(t=s.layer)&&void 0!==t?t:e.imageryLayers.get(0);if(a){a.brightness=null!==(i=s.brightness)&&void 0!==i?i:.6,a.contrast=null!==(n=s.contrast)&&void 0!==n?n:1.8,a.gamma=null!==(r=s.gamma)&&void 0!==r?r:.3,a.hue=null!==(o=s.hue)&&void 0!==o?o:1,a.saturation=s.saturation||0;for(var l=e.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources,u=0;u<l.length;u++){var c,h,f,p="color = czm_saturation(color, textureSaturation);\n#endif\n";s.invertColor||(p+="\n color.r = 1.0 - color.r;\n color.g = 1.0 - color.g;\n color.b = 1.0 - color.b;\n "),p+="\n color.r = color.r * ".concat(null!==(c=s.filterRGB_R)&&void 0!==c?c:100,".0/255.0;\n color.g = color.g * ").concat(null!==(h=s.filterRGB_G)&&void 0!==h?h:138,".0/255.0;\n color.b = color.b * ").concat(null!==(f=s.filterRGB_B)&&void 0!==f?f:230,".0/255.0;\n "),l[u]=l[u].replace("color = czm_saturation(color, textureSaturation);\n#endif\n",p),this.goadeDarkShader||(this.goadeDarkShader=p)}}}}]),e}();Z(Ro,"preID",1),Z(Ro,"goadeDarkShader",""),Z(Ro,"imageryThemeGL",null);const So=Ro;const jo=function(){function e(t){n(this,e),this._viewer=t,this.dog=0,this._langChinese={Imagery:"影像",Terrain:"地形",GeocodersPlaceholder:"请输入地名...",HomeButtonToolTip:"回到全球",SceneModePickerToolTip2D:"二维",SceneModePickerToolTip3D:"三维",SceneModePickerToolTipView:"哥伦布视图",NavigationHelpButtonToolTip:"操作指南",navigationHelp_Touch:">手势",navigationHelp_Mouse:">鼠标",navigationHelp_Mouse_Pan:"平移",navigationHelp_Mouse_Pan_details:"按下左键+ 拖动",navigationHelp_Mouse_Zoom:"缩放",navigationHelp_Mouse_Zoom_details0:"按下右键+ 拖动,或者",navigationHelp_Mouse_Zoom_details1:"滚动鼠标滚轮",navigationHelp_Mouse_Rotate:"旋转",navigationHelp_Mouse_Rotate_details0:"按下中键+ 拖动,或者",navigationHelp_Mouse_Rotate_details1:"按下CTRL + 左键/右键 +拖动",navigationHelp_Touch_Pan:"平移",navigationHelp_Touch_Pan_details:"单指拖动",navigationHelp_Touch_Zoom:"缩放",navigationHelp_Touch_Zoom_details:"双指捏合",navigationHelp_Touch_Rotate:"旋转",navigationHelp_Touch_Rotate_details:"双指反向拖动",navigationHelp_Touch_Tilt:"俯仰",navigationHelp_Touch_Tilt_details:"双指同向拖动",enterFullScreen:"全屏",exitFullScreen:"退出全屏",lon:"经度:",lat:"纬度:",heading:"偏航角:",pitch:"视角:",height:"视高:",tianditu_img2:"天地图影像",tianditu_img:"天地图影像(含注记)",tianditu_img3:"天地图-电子地图"},this._langEnglish={Imagery:"Imagery",Terrain:"Terrain",GeocodersPlaceholder:"Enter an address or landmark...",HomeButtonToolTip:"View Home",SceneModePickerToolTip2D:"2D",SceneModePickerToolTip3D:"3D",SceneModePickerToolTipView:"Columbus View",NavigationHelpButtonToolTip:"Navigation Instructions",enterFullScreen:"Full screen",exitFullScreen:"Exit full screen",navigationHelp_Touch:">手势",navigationHelp_Mouse:">鼠标",navigationHelp_Mouse_Pan:"平移",navigationHelp_Mouse_Pan_details:"按下左键+ 拖动",navigationHelp_Mouse_Zoom:"缩放",navigationHelp_Mouse_Zoom_details0:"按下右键+ 拖动,或者",navigationHelp_Mouse_Zoom_details1:"滚动鼠标滚轮",navigationHelp_Mouse_Rotate:"旋转",navigationHelp_Mouse_Rotate_details0:"按下中键+ 拖动,或者",navigationHelp_Mouse_Rotate_details1:"按下CTRL + 左键/右键 +拖动",navigationHelp_Touch_Pan:"平移",navigationHelp_Touch_Pan_details:"单指拖动",navigationHelp_Touch_Zoom:"缩放",navigationHelp_Touch_Zoom_details:"双指捏合",navigationHelp_Touch_Rotate:"旋转",navigationHelp_Touch_Rotate_details:"双指反向拖动",navigationHelp_Touch_Tilt:"俯仰",navigationHelp_Touch_Tilt_details:"双指同向拖动",lon:"lon:",lat:"lat:",heading:"heading:",pitch:"pitch:",height:"height:",tianditu_img2:"Tianditu imagery",tianditu_img:"Tianditu imagery with annotation",tianditu_img3:"Tianditu electronic map"},this._lang=Object.assign({},this._langChinese)}return a(e,[{key:"viewer",get:function(){return this._viewer}},{key:"lang",get:function(){return this._lang}},{key:"toChinese",value:function(){this.dog=1,this._lang=Object.assign({},this._langChinese),this.init()}},{key:"toEnglish",value:function(){this.dog=0,this._lang=Object.assign({},this._langEnglish),this.init()}},{key:"init",value:function(){var e=this;e._baseLayerPickerSectionTitleLang(),e._homeButtonLang(),e._geocoderLang(),e._sceneModePickerButtonLang(),e._mapInfoLang(),e._layerControlLang(),e._navigationHelpButtonLang()}},{key:"_mapInfoLang",value:function(){var e=this;document.getElementById("anov-mapinfo-container")&&(0==this.dog?(document.getElementById("anov-mapinfo-lon").innerHTML=e._langEnglish.lon,document.getElementById("anov-mapinfo-lat").innerHTML=e._langEnglish.lat,document.getElementById("anov-mapinfo-heading").innerHTML=e._langEnglish.heading,document.getElementById("anov-mapinfo-pitch").innerHTML=e._langEnglish.pitch,document.getElementById("anov-mapinfo-height").innerHTML=e._langEnglish.height,document.getElementById("anov-mapinfo-unit").innerHTML="m"):(document.getElementById("anov-mapinfo-lon").innerHTML=e._langChinese.lon,document.getElementById("anov-mapinfo-lat").innerHTML=e._langChinese.lat,document.getElementById("anov-mapinfo-heading").innerHTML=e._langChinese.heading,document.getElementById("anov-mapinfo-pitch").innerHTML=e._langChinese.pitch,document.getElementById("anov-mapinfo-height").innerHTML=e._langChinese.height,document.getElementById("anov-mapinfo-unit").innerHTML="米"))}},{key:"_layerControlLang",value:function(){for(var e=this,t=e.viewer.container.getElementsByClassName("cesium-baseLayerPicker-itemLabel"),i=0;i<t.length;i++)1==this.dog?(t[i].innerHTML=t[i].innerHTML.replace(e._langEnglish.tianditu_img,e._langChinese.tianditu_img),t[i].innerHTML=t[i].innerHTML.replace(e._langEnglish.tianditu_img2,e._langChinese.tianditu_img2),t[i].innerHTML=t[i].innerHTML.replace(e._langEnglish.tianditu_img3,e._langChinese.tianditu_img3),e.viewer.container.getElementsByClassName("cesium-baseLayerPicker-categoryTitle")[1].style.display="none"):(t[i].innerHTML=t[i].innerHTML.replace(e._langChinese.tianditu_img,e._langEnglish.tianditu_img),t[i].innerHTML=t[i].innerHTML.replace(e._langChinese.tianditu_img2,e._langEnglish.tianditu_img2),t[i].innerHTML=t[i].innerHTML.replace(e._langChinese.tianditu_img3,e._langEnglish.tianditu_img3),e.viewer.container.getElementsByClassName("cesium-baseLayerPicker-categoryTitle")[1].style.display="block")}},{key:"_baseLayerPickerSectionTitleLang",value:function(){for(var e=this,t=e.viewer.container.getElementsByClassName("cesium-baseLayerPicker-sectionTitle"),i=0;i<t.length;i++)1==this.dog?t[i].innerHTML=t[i].innerHTML.replace(e._langEnglish.Imagery,e._langChinese.Imagery).replace(e._langEnglish.Terrain,e._langChinese.Terrain):t[i].innerHTML=t[i].innerHTML.replace(e._langChinese.Imagery,e._langEnglish.Imagery).replace(e._langChinese.Terrain,e._langEnglish.Terrain)}},{key:"_homeButtonLang",value:function(){var e=this;Cesium.defined(e.viewer.nativeObjCesium.homeButton)&&(e.viewer.nativeObjCesium.homeButton.viewModel.tooltip=e.lang.HomeButtonToolTip)}},{key:"_geocoderLang",value:function(){for(var e=this.viewer.container.getElementsByClassName("cesium-geocoder-input"),t=0;t<e.length;t++)e[t].setAttribute("placeholder",this.lang.GeocodersPlaceholder);for(var i=document.getElementsByClassName("cesium-geocoder-input"),n=0;n<i.length;n++)i[n].setAttribute("placeholder",this.lang.GeocodersPlaceholder)}},{key:"_sceneModePickerButtonLang",value:function(){var e=this;Cesium.defined(e.viewer.nativeObjCesium.sceneModePicker)&&(e.viewer.sceneModePicker.viewModel.tooltip2D=e.lang.SceneModePickerToolTip2D,e.viewer.sceneModePicker.viewModel.tooltip3D=e.lang.SceneModePickerToolTip3D,e.viewer.sceneModePicker.viewModel.tooltipColumbusView=e.lang.SceneModePickerToolTipView)}},{key:"_navigationHelpButtonLang",value:function(){var e=this;if(Cesium.defined(e.viewer.navigationHelpButton)){e.viewer.navigationHelpButton.viewModel.tooltip=e.lang.NavigationHelpButtonToolTip;var t=e.viewer.navigationHelpButton.container.getElementsByClassName("cesium-click-navigation-help")[0],i=e.viewer.navigationHelpButton.container.getElementsByClassName("cesium-touch-navigation-help")[0],n=e.viewer.navigationHelpButton.container.getElementsByClassName("cesium-navigation-button-right")[0];n.innerHTML=n.innerHTML.replace(">Touch",e.lang.navigationHelp_Touch),(n=e.viewer.navigationHelpButton.container.getElementsByClassName("cesium-navigation-button-left")[0]).innerHTML=n.innerHTML.replace(">Mouse",e.lang.navigationHelp_Mouse);var r=t.getElementsByClassName("cesium-navigation-help-pan")[0];r.innerHTML=e.lang.navigationHelp_Mouse_Pan,r.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Mouse_Pan_details;var o=t.getElementsByClassName("cesium-navigation-help-zoom")[0];o.innerHTML=e.lang.navigationHelp_Mouse_Zoom,o.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Mouse_Zoom_details0,o.parentNode.getElementsByClassName("cesium-navigation-help-details")[1].innerHTML=e.lang.navigationHelp_Mouse_Zoom_details1;var s=t.getElementsByClassName("cesium-navigation-help-rotate")[0];s.innerHTML=e.lang.navigationHelp_Mouse_Rotate,s.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Mouse_Rotate_details0,s.parentNode.getElementsByClassName("cesium-navigation-help-details")[1].innerHTML=e.lang.navigationHelp_Mouse_Rotate_details1;var a=i.getElementsByClassName("cesium-navigation-help-pan")[0];a.innerHTML=e.lang.navigationHelp_Touch_Pan,a.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Touch_Pan_details;var l=i.getElementsByClassName("cesium-navigation-help-zoom")[0];l.innerHTML=e.lang.navigationHelp_Touch_Zoom,l.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Touch_Zoom_details;var u=i.getElementsByClassName("cesium-navigation-help-rotate")[0];u.innerHTML=e.lang.navigationHelp_Touch_Tilt,u.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Touch_Tilt_details;var c=i.getElementsByClassName("cesium-navigation-help-tilt")[0];c.innerHTML=e.lang.navigationHelp_Touch_Rotate,c.parentNode.getElementsByClassName("cesium-navigation-help-details")[0].innerHTML=e.lang.navigationHelp_Touch_Rotate_details}}},{key:"_fullScreenButtonLang",value:function(){var e=this;if(Cesium.defined(e.viewer.fullscreenButton)){var t=Cesium.knockout.getObservable(e.viewer.fullscreenButton.viewModel,"isFullscreen");delete e.viewer.fullscreenButton.viewModel.tooltip,Cesium.knockout.defineProperty(e.viewer.fullscreenButton.viewModel,"tooltip",(function(){return e.viewer.fullscreenButton.viewModel.isFullscreenEnabled?t()?e.lang.exitFullScreen:e.lang.enterFullScreen:"Full screen unavailable"}));var i=e.viewer.fullscreenButton.container.getElementsByClassName("cesium-fullscreenButton")[0];Cesium.knockout.cleanNode(i),Cesium.knockout.applyBindings(e.viewer.fullscreenButton.viewModel,i)}}}]),e}();const Io=function(){function e(){n(this,e)}return a(e,null,[{key:"showAllControls",value:function(e){}},{key:"showMapInfo",value:function(e){new xo(e)}},{key:"showPoiSearch",value:function(e){}},{key:"showLayerControl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"b832b9764939cbb0919148c548b669ba",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3?arguments[3]:void 0;e.nativeObjCesium.baseLayerPicker||console.error("baseLayerPicker未开启,无法显示该控件!"),So.init(e,t,i,n)}},{key:"toChinese",value:function(e){var t=new jo(e);t&&t.toChinese()}}]),e}();var Lo={Cartesian2:Cesium.Cartesian2,Cartesian3:Cesium.Cartesian3,Matrix3:Cesium.Matrix3,Matrix4:Cesium.Matrix4,Material:Cesium.Material,SceneMode:Cesium.SceneMode,SkyBox:Cesium.SkyBox,Color:Cesium.Color,Rectangle:Cesium.Rectangle,ShadowMode:Cesium.ShadowMode,JulianDate:Cesium.JulianDate,HeightReference:Cesium.HeightReference,HorizontalOrigin:Cesium.HorizontalOrigin,VerticalOrigin:Cesium.VerticalOrigin,CallbackProperty:Cesium.CallbackProperty,ClassificationType:Cesium.ClassificationType,TilesetStyle:Cesium.Cesium3DTileStyle,GeographicTilingScheme:Cesium.GeographicTilingScheme,WebMercatorTilingScheme:Cesium.WebMercatorTilingScheme,ColorMaterialProperty:Cesium.ColorMaterialProperty,ImageMaterialProperty:Cesium.ImageMaterialProperty,PolylineDashMaterialProperty:Cesium.PolylineDashMaterialProperty,PolylineGlowMaterialProperty:Cesium.PolylineGlowMaterialProperty,PolylineOutlineMaterialProperty:Cesium.PolylineOutlineMaterialProperty,PolylineArrowMaterialProperty:Cesium.PolylineArrowMaterialProperty,writeTextToCanvas:Cesium.writeTextToCanvas,CustomShaderMode:Cesium.CustomShaderMode,CustomShaderTranslucencyMode:Cesium.CustomShaderTranslucencyMode,CustomShader:Cesium.CustomShader,UniformType:Cesium.UniformType,Math:Cesium.Math,NearFarScalar:Cesium.NearFarScalar,DistanceDisplayCondition:Cesium.DistanceDisplayCondition,Resource:Cesium.Resource,useDefaultRenderLoop:Cesium.useDefaultRenderLoop,ScreenSpaceEventHandler:Cesium.ScreenSpaceEventHandler,ScreenSpaceEventType:Cesium.ScreenSpaceEventType,Transforms:Cesium.Transforms,CameraEventType:Cesium.CameraEventType,defined:Cesium.defined,Event:Cesium.Event};const Do=function(){function e(t){n(this,e),this.viewer=t}return a(e,[{key:"getCommondInfo",value:function(){for(var e=performance.memory.usedJSHeapSize,t=this.viewer.scene.frameState.commandList.length,i=0,n=0,r=0;r<this.viewer.scene.frameState.commandList.length;r++){var o=this.viewer.scene.frameState.commandList[r];if(o&&o.vertexArray){var s=o.instanceCount||1;i+=o.vertexArray.numberOfVertices*s;var a=1;o.vertexArray.indexBuffer&&(a=o.vertexArray.indexBuffer.numberOfIndices),n+=a*s}}return{trianglesCount:n/3,verticesCount:i,drawCall:t,memorySize:e}}}]),e}();function Bo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Go=function(e){c(i,e);var t=Bo(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return mr.getLayerType("vector")}},{key:"clear",value:function(){return this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=ke.CLEARED,this}}]),i}(mr);mr.registerType("vector");const Ho=Go;function No(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var zo=function(e){c(o,e);var t,i,r=No(o);function o(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,o),!e)throw new Error("GeoJsonLayer:data数据源必选传入!");return(t=r.call(this,i))._nativeObjCesium=Cesium.GeoJsonDataSource.load(e,i),t._state=ke.INITIALIZED,t}return a(o,[{key:"type",get:function(){return mr.getLayerType("geojson")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium&&this._nativeObjCesium.then((function(e){e.show=t._show}))}},{key:"_createBillboard",value:function(e){if(e.position&&e.billboard)return Ii.fromEntity(e)}},{key:"_createPoint",value:function(e){if(e.position&&e.point)return dn.fromEntity(e)}},{key:"_createLabel",value:function(e){if(e.position&&e.label)return an.fromEntity(e)}},{key:"_createPolyline",value:function(e){if(e.polyline)return Pn.fromEntity(e)}},{key:"_createPolygon",value:function(e){if(e.polygon)return _n.fromEntity(e)}},{key:"_createModel",value:function(e,t){if(e)return dt.fromEntity(e,t)}},{key:"eachGraphic",value:(i=U(q().mark((function e(t,i){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._nativeObjCesium){e.next=3;break}return e.next=3,this._nativeObjCesium.then((function(e){e.entities.values.forEach((function(e){t.call(i,e)}))}));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"toVectorLayer",value:(t=U(q().mark((function e(){var t,i=this;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Ho(this.id),e.next=3,this.eachGraphic((function(e){e.billboard?t.addGraphic(i._createBillboard(e)):e.polyline?t.addGraphic(i._createPolyline(e)):e.polygon&&t.addGraphic(i._createPolygon(e))}),this);case 3:return e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"toModelLayer",value:function(e){var t=this,i=new ModelLayer(this.id);return this.eachGraphic((function(n){i.addGraphic(t._createModel(n,e))}),this),i}}]),o}(mr);mr.registerType("geojson");const Fo=zo,Wo={bindPopup_highlight_tooltip:(Uo=U(q().mark((function e(t,i){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.bindPopup=function(e){if(t.viewer=e.viewer||window.viewer,t.viewer){var i=new We(e);i.install(t),i.addEventListener(le.CLOSE,(function(){t.removeHighlight()}))}else console.error("必须传入三维球对象!")},t.removeHighlight=function(){t.selected&&(t.viewer.removeLayer(t.selected.layer),t.selected=null)},t.layerEvent=new er,t.addEventListener=function(e,i,n){return t.layerEvent.addEventListener(e,i,n||t),t},t.viewer&&t.viewer.addEventListener(J.CLICK,(function(e){t.removeHighlight()})),t.addEventListener(J.CLICK,function(){var e=U(q().mark((function e(n){var r,o,s;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.removeHighlight(),n.feature){e.next=3;break}return e.abrupt("return");case 3:return r=wo.imageryLayerFeatureInfo2Geojson(n.feature),o=new Fo(r,{}),e.next=7,o.toVectorLayer();case 7:s=e.sent,t.selected={layer:s},t.viewer&&t.viewer.addLayer(s),s.eachGraphic((function(e){e._selectedHighlight=i.selectedHighlight,e.selectedHighlight()}));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 6:case"end":return e.stop()}}),e)}))),function(e,t){return Uo.apply(this,arguments)})};var Uo;const Vo=function(){function e(){n(this,e)}return a(e,null,[{key:"createAmapImageryLayer",value:function(){return new w(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createBaiduImageryLayer",value:function(){return new R(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createTdtImageryLayer",value:function(){return new j(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createTencentImageryLayer",value:function(){return new L(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createArcGisImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"dark"===e.style?new H(e):(e.url||(e.url="https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),Cesium.ArcGisMapServerImageryProvider.fromUrl(e.url,e))}},{key:"createSingleTileImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.SingleTileImageryProvider(e)}},{key:"createWMSImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.WebMapServiceImageryProvider(e)}},{key:"createWMTSImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.WebMapTileServiceImageryProvider(e)}},{key:"createXYZImageryLayer",value:function(){return new F(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createUrlTemplateImageryLayer",value:function(){return new F(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createCoordImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.TileCoordinatesImageryProvider(e)}},{key:"createGridImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.GridImageryProvider(e)}},{key:"createMapboxImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.MapboxImageryProvider(e)}},{key:"createMapboxStyleImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.MapboxStyleImageryProvider(e)}},{key:"createTMSImageryLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Cesium.TileMapServiceImageryProvider(e)}},{key:"createGoogleImageryImageryLayer",value:function(){return new B(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createImageryLayer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0;switch(e){case l.AMAP:i=this.createAmapImageryLayer(t);break;case l.BAIDU:i=this.createBaiduImageryLayer(t);break;case l.TDT:i=this.createTdtImageryLayer(t);break;case l.TENCENT:i=this.createTencentImageryLayer(t);break;case l.ARCGIS:i=this.createArcGisImageryLayer(t);break;case l.SINGLE_TILE:i=this.createSingleTileImageryLayer(t);break;case l.WMS:i=this.createWMSImageryLayer(t);break;case l.WMTS:i=this.createWMTSImageryLayer(t);break;case l.XYZ:i=this.createXYZImageryLayer(t);break;case l.COORD:i=this.createCoordImageryLayer(t);break;case l.GRID:i=this.createGridImageryLayer(t);break;case l.MAPBOX:i=this.createMapboxImageryLayer(t);break;case l.MAPBOX_STYLE:i=this.createMapboxStyleImageryLayer(t);break;case l.TMS:i=this.createTMSImageryLayer(t);break;case l.Google:i=this.createGoogleImageryImageryLayer(t)}return Wo.bindPopup_highlight_tooltip(i,t),i}}]),e}();function qo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Zo="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}";const Yo=function(e){c(i,e);var t=qo(i);function i(){var e,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,i);var s=Array.isArray(o.keys)?o.keys.filter(Boolean):[];if(0===s.length)throw new Error("[MultiKeyTdtImageryProvider] keys 至少需要一个元素");var a=o.style||"vec";return(r=t.call(this,{url:[o.protocol||"",Zo].join(""),subdomains:["0","1","2","3","4","5","6","7"],tilingScheme:new Cesium.WebMercatorTilingScheme,maximumLevel:18,customTags:{style:function(){return r._style},key:function(){return r._keys[r._currentKeyIndex]}}}))._keys=s,r._currentKeyIndex=0,r._style=a,r._errorThreshold=o.errorThreshold||5,r._errorResetMs=o.errorResetMs||3e4,r._minAutoSwitchIntervalMs=null!==(e=o.minAutoSwitchIntervalMs)&&void 0!==e?e:0,r._consecutiveErrorCount=0,r._lastErrorTime=0,r._lastAutoSwitchTime=0,r.keySwitched=new Cesium.Event,r.errorEvent.addEventListener((function(e){return r._onError(e)})),r}return a(i,[{key:"currentKey",get:function(){return this._keys[this._currentKeyIndex]}},{key:"currentKeyIndex",get:function(){return this._currentKeyIndex}},{key:"consecutiveErrorCount",get:function(){return this._consecutiveErrorCount}},{key:"keys",get:function(){return this._keys.slice()}},{key:"_onError",value:function(){var e=Date.now();if(this._lastErrorTime&&e-this._lastErrorTime>this._errorResetMs&&(this._consecutiveErrorCount=0),this._lastErrorTime=e,this._consecutiveErrorCount++,this._consecutiveErrorCount>=this._errorThreshold){if(this._minAutoSwitchIntervalMs>0&&this._lastAutoSwitchTime>0&&e-this._lastAutoSwitchTime<this._minAutoSwitchIntervalMs)return void(this._consecutiveErrorCount=0);this._switchToNextKey("error-threshold")}}},{key:"_switchToNextKey",value:function(e){var t=this._currentKeyIndex;this._currentKeyIndex=(this._currentKeyIndex+1)%this._keys.length,this._consecutiveErrorCount=0,this._lastAutoSwitchTime=Date.now(),this.keySwitched.raiseEvent({fromIndex:t,toIndex:this._currentKeyIndex,fromKey:this._keys[t],toKey:this._keys[this._currentKeyIndex],reason:e})}},{key:"nextKey",value:function(){this._switchToNextKey("manual-next")}},{key:"prevKey",value:function(){var e=this._currentKeyIndex;this._currentKeyIndex=(this._currentKeyIndex-1+this._keys.length)%this._keys.length,this._consecutiveErrorCount=0,this.keySwitched.raiseEvent({fromIndex:e,toIndex:this._currentKeyIndex,fromKey:this._keys[e],toKey:this._keys[this._currentKeyIndex],reason:"manual-prev"})}},{key:"resetErrorCount",value:function(){this._consecutiveErrorCount=0}}]),i}(F);const Ko=function(){function e(t,i){n(this,e),t||console.error("viewer是必传参数!"),2!==i.length&&console.error("layersArr参数长度必须为2"),this.viewer=t,this.layer1=null,this.layer2=null,this.slider=null,this.handler=null,this.slider=document.createElement("div");var r=this.slider;r.style.position="absolute",r.style.left="50%",r.style.top="0",r.style.backgroundColor="#d3d3d3",r.style.width="5px",r.style.height="100%",r.style.zIndex=9999,r.onmouseover=function(){r.style.cursor="ew-resize"},t.container.appendChild(r),t.scene.splitPosition=r.offsetLeft/r.parentElement.offsetWidth,this.handler=new Cesium.ScreenSpaceEventHandler(r);var o=this.handler,s=!1;function a(e){if(s){var i=e.endPosition.x,n=(r.offsetLeft+i)/r.parentElement.offsetWidth;r.style.left=100*n+"%",t.scene.splitDirection=n}}o.setInputAction((function(){s=!0}),Cesium.ScreenSpaceEventType.LEFT_DOWN),o.setInputAction((function(){s=!0}),Cesium.ScreenSpaceEventType.PINCH_START),o.setInputAction(a,Cesium.ScreenSpaceEventType.MOUSE_MOVE),o.setInputAction(a,Cesium.ScreenSpaceEventType.PINCH_MOVE),o.setInputAction((function(){s=!1}),Cesium.ScreenSpaceEventType.LEFT_UP),o.setInputAction((function(){s=!1}),Cesium.ScreenSpaceEventType.PINCH_END),this.changeLayers(i)}return a(e,[{key:"changeLayers",value:function(e){this.viewer.imageryLayers.removeAll(),this.layer1=this.viewer.imageryLayers.addImageryProvider(e[0]),this.layer2=this.viewer.imageryLayers.addImageryProvider(e[1]),this.layer2.splitDirection=Cesium.SplitDirection.LEFT}},{key:"destroy",value:function(){this.viewer.imageryLayers.remove(this.layer2),this.slider.parentNode.removeChild(this.slider),this.handler=null}},{key:"changeLeftRight",value:function(){this.layer2.splitDirection=-this.layer2.splitDirection}}]),e}();const Qo={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"};const Xo=function(){function e(){n(this,e)}return a(e,null,[{key:"createEllipsoidTerrain",value:function(e){return new Cesium.EllipsoidTerrainProvider(e)}},{key:"createUrlTerrain",value:function(e){return Cesium.CesiumTerrainProvider.fromUrl(e.url,e)}},{key:"createGoogleTerrain",value:function(e){return console.warn("[TerrainFactory] GoogleEarthEnterprise is no longer supported in Cesium 1.143. Falling back to EllipsoidTerrainProvider."),new Cesium.EllipsoidTerrainProvider(e)}},{key:"createArcgisTerrain",value:function(e){return Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}},{key:"createVRTerrain",value:function(e){return console.warn("[TerrainFactory] VRTheWorld is no longer supported in Cesium 1.143. Falling back to EllipsoidTerrainProvider."),new Cesium.EllipsoidTerrainProvider(e)}},{key:"createTerrain",value:function(e,t){var i=void 0;switch(e){case Qo.NONE:i=this.createEllipsoidTerrain(t);break;case Qo.XYZ:i=this.createUrlTerrain(t);break;case Qo.GOOGLE:i=this.createGoogleTerrain(t);break;case Qo.ARCGIS:i=this.createArcgisTerrain(t);break;case Qo.VR:i=this.createVRTerrain(t)}return i}}]),e}();function Jo(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function $o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Jo(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Jo(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function es(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ts={size:18,pixelRange:40,gradient:{1e-4:Cesium.Color.DEEPSKYBLUE,.001:Cesium.Color.GREEN,.01:Cesium.Color.ORANGE,.1:Cesium.Color.RED},outColor:null,boderColor:null,fontSize:12,fontColor:Cesium.Color.BLACK,style:"circle",height:-1e3},is=function(e){c(i,e);var t=es(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._nativeObjCesium=new Cesium.CustomDataSource(r.name),e._options=$o($o({},ts),r),e._nativeObjCesium.clustering.enabled=!0,e._nativeObjCesium.clustering.clusterEvent.addEventListener(e._clusterEventHandler,h(e)),e._nativeObjCesium.clustering.pixelRange=e._options.pixelRange,e._state=ke.INITIALIZED,e}return a(i,[{key:"type",get:function(){return mr.getLayerType("cluster")}},{key:"enableCluster",set:function(e){this._nativeObjCesium.clustering.enabled=e}},{key:"setHeight",value:function(e,t){var i=Cesium.Cartographic.fromCartesian(e);return i.height=t,Cesium.Cartographic.toCartesian(i)}},{key:"_drawCircle",value:function(e,t){var i=this._options.size*(t+1),n=e.toCssColorString()+"-"+i;if(!this._cache[n]){var r,o=document.createElement("canvas");o.width=i,o.height=i;var s,a=o.getContext("2d");if(a.save(),a.scale(i/24,i/24),a.fillStyle=(null===(r=this._options.outColor)||void 0===r?void 0:r.toCssColorString())||e.withAlpha(.2).toCssColorString(),a.beginPath(),a.arc(12,12,this._options.boderColor?12:11,0,2*Math.PI),a.closePath(),a.fill(),this._options.boderColor)a.beginPath(),a.arc(12,12,10,0,2*Math.PI),a.fillStyle=null===(s=this._options.boderColor)||void 0===s?void 0:s.toCssColorString(),a.fill(),a.closePath();a.beginPath(),a.arc(12,12,8,0,2*Math.PI),a.fillStyle=e.toCssColorString(),a.fill(),a.closePath(),a.restore(),this._cache[n]=o.toDataURL()}return this._cache[n]}},{key:"_drawClustering",value:function(e,t){var i=this._options.size*(t+1),n=e.toCssColorString()+"-"+i,r=-Math.PI/12,o=Math.PI/2,s=Math.PI/6;if(!this._cache[n]){var a=document.createElement("canvas");a.width=i,a.height=i;var l=a.getContext("2d");l.save(),l.scale(i/24,i/24),l.beginPath(),l.arc(12,12,6,0,2*Math.PI),l.fillStyle=e.toCssColorString(),l.fill(),l.closePath(),l.lineWidth=2;for(var u=0;u<3;u++)l.beginPath(),l.arc(12,12,8,r,r+o,!1),l.strokeStyle=e.withAlpha(.4).toCssColorString(),l.stroke(),l.arc(12,12,11,r,r+o,!1),l.strokeStyle=e.withAlpha(.2).toCssColorString(),l.stroke(),l.closePath(),r=r+o+s;l.restore(),this._cache[n]=a.toDataURL()}return this._cache[n]}},{key:"_clusterEventHandler",value:function(e,t){if(this._nativeObjCesium.clustering.enabled&&(t.billboard.show=!0,t.label.font="bold ".concat(this._options.fontSize,"px sans-serif"),t.label.fillColor=this._options.fontColor,t.label.disableDepthTestDistance=Number.POSITIVE_INFINITY,this._nativeObjCesium.entities.values.length)){var i=this._nativeObjCesium.entities.values.length||0;for(var n in this._options.gradient)if(e.length>=i*n){var r=String(e.length).length;"circle"===this._options.style?t.billboard.image=this._drawCircle(this._options.gradient[n],r):"custom"===this._options.style?t.billboard.image=this._options.gradient[n]:t.billboard.image=this._drawClustering(this._options.gradient[n],r),t.billboard.label=t.label,t.billboard.eyeOffset.z=-1,t.label.show=!0,t.label.pixelOffset=1===r?new Cesium.Cartesian2(-2,3):new Cesium.Cartesian2(-5*(r-1),5)}else e.length<=1&&(t.label.show=!1)}}},{key:"clear",value:function(){return this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=ke.CLEARED,this}}]),i}(mr);mr.registerType("cluster");const ns=is;function rs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var os=function(e){c(i,e);var t=rs(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._nativeObjCesium=Cesium.CzmlDataSource.load(r.url,r),e._state=ke.INITIALIZED,e}return a(i,[{key:"type",get:function(){return mr.getLayerType("czml")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium&&this._nativeObjCesium.then((function(e){e.show=t._show}))}},{key:"eachGraphic",value:function(e,t){if(this._nativeObjCesium)return this._nativeObjCesium.then((function(i){i.entities.values.forEach((function(i){e.call(t,i)}))})),this}}]),i}(mr);mr.registerType("czml");const ss=os;function as(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ls=function(e){c(i,e);var t=as(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return mr.getLayerType("dynamic")}},{key:"clear",value:function(){return this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=ke.CLEARED,this}}]),i}(mr);mr.registerType("dynamic");const us=ls;function cs(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function hs(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cs(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):cs(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function fs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ps={name:"",count:10,maximumLevel:21,dataProperty:"",callback:function(){return null}},ms=function(e){c(i,e);var t=fs(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,i),(e=t.call(this,r))._url=r.url,e._options=hs(hs({},ps),r),e._levelLayers={},e._tileWidth=256,e._tileHeight=256,e._maximumLevel=e._options.maximumLevel,e._tilingScheme=e._options.tilingScheme||new Cesium.GeographicTilingScheme,e._rectangle=e._tilingScheme.rectangle,e._credit=void 0,e._token=void 0;for(var o=0;o<e.maximumLevel;o++)e._levelLayers[String(o)]=new Ho(e.businessID+"-grid-"+o);return e._viewer=void 0,e._imageryLayer=void 0,e._imagery=document.createElement("canvas"),e._imagery.width=e._tileWidth,e._imagery.height=e._tileHeight,e._state=ke.INITIALIZED,e}return a(i,[{key:"type",get:function(){return mr.getLayerType("feature_grid")}},{key:"url",get:function(){return this._url}},{key:"show",get:function(){return this._show},set:function(e){var t=this;return this._show=e,Object.keys(this._levelLayers).forEach((function(i){t._levelLayers[i].show=e})),this}},{key:"token",get:function(){return this._token}},{key:"tileWidth",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},{key:"tileHeight",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},{key:"maximumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},{key:"minimumLevel",get:function(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}},{key:"tilingScheme",get:function(){if(!this.ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},{key:"rectangle",get:function(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},{key:"ready",get:function(){return!!this._url}},{key:"credit",get:function(){return this._credit}},{key:"hasAlphaChannel",get:function(){return!0}},{key:"_onAdd",value:function(e){var t=this;this._viewer=e,this._imageryLayer=this._viewer.imageryLayers.addImageryProvider(this),Object.keys(this._levelLayers).forEach((function(e){t._viewer.addLayer(t._levelLayers[e])})),this._state=ke.ADDED}},{key:"_onRemove",value:function(){var e=this;this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach((function(t){e._viewer.removeLayer(e._levelLayers[t])})),this._state=ke.REMOVED}},{key:"getTileCredits",value:function(e,t,i){}},{key:"requestImage",value:function(e,t,i,n){var r=this,o=this._levelLayers[String(i)],s=this._tilingScheme.tileXYToRectangle(e,t,i);return this._viewer&&s&&o&&Cesium.Rectangle.intersection(s,this._viewer.viewBoundsRectangle)&&Cesium.Resource.fetchJson({url:this._url,queryParameters:{minX:Cesium.Math.toDegrees(s.west),minY:Cesium.Math.toDegrees(s.south),maxX:Cesium.Math.toDegrees(s.east),maxY:Cesium.Math.toDegrees(s.north),count:this._options.count}}).then((function(e){var t=e;if(r._options.dataProperty&&(t=e[r._options.dataProperty]),t&&t.length){for(var n=i+3;n<r._maximumLevel;n++)r._levelLayers[String(n)]&&r._levelLayers[String(n)].clear();t.forEach((function(e){var t=r._options.callback(e);t&&o.addGraphic(t)}))}})),this._imagery}},{key:"clear",value:function(){var e=this;Object.keys(this._levelLayers).forEach((function(t){e._levelLayers[t].clear()})),this._state=ke.CLEARED}}]),i}(mr);mr.registerType("feature_grid");const ds=ms;function vs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ys=function(e){c(i,e);var t=vs(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n(this,i),!r.url)throw new Error("GpxLayer: url不能为空!");return(e=t.call(this,r))._nativeObjCesium=Cesium.GpxDataSource.load(r.url,r),e._state=ke.INITIALIZED,e}return a(i,[{key:"type",get:function(){return mr.getLayerType("gpx")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium&&this._nativeObjCesium.then((function(e){e.show=t._show}))}},{key:"eachGraphic",value:function(e,t){if(this._nativeObjCesium)return this._nativeObjCesium.then((function(i){i.entities.values.forEach((function(i){e.call(t,i)}))})),this}}]),i}(mr);mr.registerType("gpx");const gs=ys;function _s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Cs=function(e){c(i,e);var t=_s(i);function i(){var e;return n(this,i),(e=t.call(this))._nativeObjCesium=new Cesium.PrimitiveCollection,e._isGround=!0,e._state=ke.INITIALIZED,e}return a(i,[{key:"type",get:function(){return mr.getLayerType("ground_primitive")}},{key:"clear",value:function(){return this._nativeObjCesium&&this._nativeObjCesium.removeAll(),this._cache={},this._state=ke.CLEARED,this}}]),i}(mr);mr.registerType("ground_primitive");const bs=Cs;function ws(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ps=new Cesium.Cartesian3,Os=new Cesium.Cartesian3,xs=new Cesium.Cartesian3,Es=!1,As=new WeakMap,ks=function(e){c(i,e);var t=ws(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=ve.create("div","html-layer",void 0),r._nativeObjCesium.setAttribute("id",r.businessID),r._renderRemoveCallback=void 0,r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return mr.getLayerType("html")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium.style.visibility=this._show?"visible":"hidden",Object.keys(this._cache).forEach((function(i){t._cache[i].show=e}))}},{key:"_onAdd",value:function(e){var t=this;this._viewer=e,this._viewer.layerContainer.appendChild(this._nativeObjCesium);var i=this._viewer.scene;this._renderRemoveCallback=i.postRender.addEventListener((function(){var n=t._viewer.camera.positionWC,r=t._viewer.camera.direction,o=t._viewer.scene.mode===Cesium.SceneMode.SCENE3D;o||(n=Ne.transformCartographicToCartesian(t._viewer.camera.positionCartographic));var s=!0;Es&&(s=!Cesium.Cartesian3.equalsEpsilon(n,Os,.01)||Cesium.Cartesian3.dot(r,xs)<=.99999),s&&(Cesium.Cartesian3.clone(n,Os),Cesium.Cartesian3.clone(r,xs),Es=!0);var a=o&&!(t._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider);t.eachGraphic((function(t){if(t&&t.position){var r=Ne.transformWGS84ToCartesian(t.position),l=i.globe.ellipsoid.geodeticSurfaceNormal(r,new Cesium.Cartesian3),u=i.cartesianToCanvasCoordinates(r,new Cesium.Cartesian2),c=!0;if(o){var h=t._style||{},f=!0===h.backFaceCulling,p=!0===h.terrainOcclusion;if(s){if(f&&(Cesium.Cartesian3.subtract(n,r,Ps),Cesium.Cartesian3.dot(l,Ps)<=0&&(c=!1)),c&&p&&a){Cesium.Cartesian3.subtract(r,n,Ps),Cesium.Cartesian3.normalize(Ps,Ps);var m=new Cesium.Ray(n,Ps),d=i.globe.pick(m,i);if(d)Cesium.Cartesian3.distance(n,d)<Cesium.Cartesian3.distance(n,r)&&(c=!1)}As.set(t,c)}else{var v=As.get(t);c=void 0===v||v}}t._updateStyle(u,Cesium.Cartesian3.distance(r,n),c,e)}}),t)}),this),this._state=ke.ADDED}},{key:"_onRemove",value:function(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._nativeObjCesium),this._state=ke.REMOVED}},{key:"clear",value:function(){for(;this._nativeObjCesium.hasChildNodes();)this._nativeObjCesium.removeChild(this._nativeObjCesium.firstChild);return this._cache={},this._state=ke.CLEARED,this}},{key:"flyTo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-90,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=[];this.eachGraphic((function(t){if(t&&t.position&&e._viewer){var i=Ne.transformWGS84ToCartesian(t.position);s.push(i)}})),s.length>0&&po.flyToPoints(this._viewer,s,t,i,n,r,o)}}]),i}(mr);mr.registerType("html");const Ts=ks;function Ms(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Rs=function(e){c(i,e);var t=Ms(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,i),!e)throw new Error("KmlLayer: data不能为空!");return(r=t.call(this,o))._nativeObjCesium=Cesium.KmlDataSource.load(e,o),r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return mr.getLayerType("kml")}},{key:"show",get:function(){return this._show},set:function(e){var t=this;this._show=e,this._nativeObjCesium&&this._nativeObjCesium.then((function(e){e.show=t._show}))}},{key:"eachGraphic",value:function(e,t){if(this._nativeObjCesium)return this._nativeObjCesium.then((function(i){i.entities.values.forEach((function(i){e.call(t,i)}))})),this}}]),i}(mr);mr.registerType("kml");const Ss=Rs;function js(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Is=function(e){c(i,e);var t=js(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._dataSource=Cesium.GeoJsonDataSource.load(e.url),r._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._initLabel(),r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return mr.getLayerType("label")}},{key:"_createLabel",value:function(e){if(e.position&&e.name)return an.fromEntity(e)}},{key:"_initLabel",value:function(){var e=this;this._dataSource.then((function(t){t.entities.values.forEach((function(t){var i=e._createLabel(t);e.addGraphic(i)}))}))}}]),i}(mr);mr.registerType("label");const Ls=Is;function Ds(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Bs=function(e){c(i,e);var t=Ds(i);function i(){var e;return n(this,i),(e=t.call(this))._nativeObjCesium=new Cesium.PrimitiveCollection,e._points=e._nativeObjCesium.add(new Cesium.PointPrimitiveCollection),e._labels=e._nativeObjCesium.add(new Cesium.LabelCollection),e._billboards=e._nativeObjCesium.add(new Cesium.BillboardCollection),e._polylines=e._nativeObjCesium.add(new Cesium.PolylineCollection),e._primitives=e._nativeObjCesium.add(new Cesium.PrimitiveCollection),Cesium.CloudCollection&&(e._clouds=e._nativeObjCesium.add(new Cesium.CloudCollection)),e._state=ke.INITIALIZED,e}return a(i,[{key:"type",get:function(){return mr.getLayerType("primitive")}},{key:"points",get:function(){return this._points}},{key:"labels",get:function(){return this._labels}},{key:"billboards",get:function(){return this._billboards}},{key:"polylines",get:function(){return this._polylines}},{key:"primitives",get:function(){return this._primitives}},{key:"clouds",get:function(){return this._clouds}},{key:"clear",value:function(){return this._nativeObjCesium&&this._nativeObjCesium.removeAll(),this._points=this._nativeObjCesium.add(new Cesium.PointPrimitiveCollection),this._labels=this._nativeObjCesium.add(new Cesium.LabelCollection),this._billboards=this._nativeObjCesium.add(new Cesium.BillboardCollection),this._polylines=this._nativeObjCesium.add(new Cesium.PolylineCollection),Cesium.CloudCollection&&(this._clouds=this._nativeObjCesium.add(new Cesium.CloudCollection)),this._cache={},this._state=ke.CLEARED,this}}]),i}(mr);mr.registerType("primitive");const Gs=Bs;function Hs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ns=function(e){c(i,e);var t=Hs(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.PrimitiveCollection,r._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return mr.getLayerType("tileset")}},{key:"clear",value:function(){return this._nativeObjCesium.removeAll(),this._cache={},this._state=ke.CLEARED,this}},{key:"flyTo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-90,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=[];this.eachGraphic((function(t){if(t&&t.position&&e._viewer){var i=Transform.transformWGS84ToCartesian(t.position);s.push(i)}})),s.length>0&&LocateUtil.flyToPoints(this._viewer,s,t,i,n,r,o)}}]),i}(mr);mr.registerType("tileset");const zs=Ns;function Fs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ws=function(e){c(i,e);var t=Fs(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,i),!e)throw new Error("TopoJsonLayer:the data invalid");return(r=t.call(this,e,o))._state=ke.INITIALIZED,r}return a(i,[{key:"type",get:function(){return mr.getLayerType("topojson")}}]),i}(Fo);Fo.registerType("topojson");const Us=Ws;var Vs=i(929),qs=Math.PI,Zs=2*qs,Ys=qs/180,Ks=180/qs,Qs=1440,Xs=398600.8,Js=6378.135,$s=60/Math.sqrt(Js*Js*Js/Xs),ea=Js*$s/60,ta=1/$s,ia=.001082616,na=-253881e-11,ra=-165597e-11,oa=na/ia,sa=2/3;function aa(e,t){for(var i=[31,e%4==0?29:28,31,30,31,30,31,31,30,31,30,31],n=Math.floor(t),r=1,o=0;n>o+i[r-1]&&r<12;)o+=i[r-1],r+=1;var s=r,a=n-o,l=24*(t-n),u=Math.floor(l);l=60*(l-u);var c=Math.floor(l);return{mon:s,day:a,hr:u,minute:c,sec:60*(l-c)}}function la(e,t,i,n,r,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return 367*e-Math.floor(7*(e+Math.floor((t+9)/12))*.25)+Math.floor(275*t/9)+i+1721013.5+((s/6e4+o/60+r)/60+n)/24}function ua(e,t,i,n,r,o,s){if(e instanceof Date){var a=e;return la(a.getUTCFullYear(),a.getUTCMonth()+1,a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())}return la(e,t,i,n,r,o,s)}function ca(e,t){var i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C=e.e3,b=e.ee2,w=e.peo,P=e.pgho,O=e.pho,x=e.pinco,E=e.plo,A=e.se2,k=e.se3,T=e.sgh2,M=e.sgh3,R=e.sgh4,S=e.sh2,j=e.sh3,I=e.si2,L=e.si3,D=e.sl2,B=e.sl3,G=e.sl4,H=e.t,N=e.xgh2,z=e.xgh3,F=e.xgh4,W=e.xh2,U=e.xh3,V=e.xi2,q=e.xi3,Z=e.xl2,Y=e.xl3,K=e.xl4,Q=e.zmol,X=e.zmos,J=t.init,$=t.opsmode,ee=t.ep,te=t.inclp,ie=t.nodep,ne=t.argpp,re=t.mp;_=X+119459e-10*H,"y"===J&&(_=X),g=_+.0335*Math.sin(_);var oe=A*(l=.5*(d=Math.sin(g))*d-.25)+k*(u=-.5*d*Math.cos(g)),se=I*l+L*u,ae=D*l+B*u+G*d,le=T*l+M*u+R*d,ue=S*l+j*u;return _=Q+.00015835218*H,"y"===J&&(_=Q),g=_+.1098*Math.sin(_),c=oe+(b*(l=.5*(d=Math.sin(g))*d-.25)+C*(u=-.5*d*Math.cos(g))),p=se+(V*l+q*u),m=ae+(Z*l+Y*u+K*d),h=le+(N*l+z*u+F*d),f=ue+(W*l+U*u),"n"===J&&(m-=E,h-=P,f-=O,te+=p-=x,ee+=c-=w,o=Math.sin(te),r=Math.cos(te),te>=.2?(ne+=h-=r*(f/=o),ie+=f,re+=m):(i=o*(a=Math.sin(ie)),n=o*(s=Math.cos(ie)),i+=f*s+p*r*a,n+=-f*a+p*r*s,(ie%=Zs)<0&&"a"===$&&(ie+=Zs),v=re+ne+r*ie,v+=m+h-p*ie*o,y=ie,(ie=Math.atan2(i,n))<0&&"a"===$&&(ie+=Zs),Math.abs(y-ie)>qs&&(ie<y?ie+=Zs:ie-=Zs),ne=v-(re+=m)-r*ie)),{ep:ee,inclp:te,nodep:ie,argpp:ne,mp:re}}function ha(e){var t=(e-2451545)/36525,i=-62e-7*t*t*t+.093104*t*t+3164400184.812866*t+67310.54841;return(i=i*Ys/240%Zs)<0&&(i+=Zs),i}function fa(){return(arguments.length<=0?void 0:arguments[0])instanceof Date||arguments.length>1?ha(ua.apply(void 0,arguments)):ha.apply(void 0,arguments)}function pa(e,t){var i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O,x,E,A;e.t=t,e.error=0;var k=e.mo+e.mdot*e.t,T=e.argpo+e.argpdot*e.t,M=e.nodeo+e.nodedot*e.t;u=T,b=k;var R=e.t*e.t;if(P=M+e.nodecf*R,y=1-e.cc1*e.t,g=e.bstar*e.cc4*e.t,_=e.t2cof*R,1!==e.isimp){a=e.omgcof*e.t;var S=1+e.eta*Math.cos(k);b=k+(v=a+e.xmcof*(S*S*S-e.delmo)),u=T-v,p=(f=R*e.t)*e.t,y=y-e.d2*R-e.d3*f-e.d4*p,g+=e.bstar*e.cc5*(Math.sin(b)-e.sinmao),_=_+e.t3cof*f+p*(e.t4cof+e.t*e.t5cof)}w=e.no;var j=e.ecco;if(C=e.inclo,"d"===e.method){m=e.t;var I=function(e){var t,i,n,r,o,s,a,l,u=e.irez,c=e.d2201,h=e.d2211,f=e.d3210,p=e.d3222,m=e.d4410,d=e.d4422,v=e.d5220,y=e.d5232,g=e.d5421,_=e.d5433,C=e.dedt,b=e.del1,w=e.del2,P=e.del3,O=e.didt,x=e.dmdt,E=e.dnodt,A=e.domdt,k=e.argpo,T=e.argpdot,M=e.t,R=e.tc,S=e.gsto,j=e.xfact,I=e.xlamo,L=e.no,D=e.atime,B=e.em,G=e.argpm,H=e.inclm,N=e.xli,z=e.mm,F=e.xni,W=e.nodem,U=e.nm,V=.13130908,q=2.8843198,Z=.37448087,Y=5.7686396,K=.95240898,Q=1.8014998,X=1.050833,J=4.4108898,$=259200,ee=0,te=0,ie=(S+.0043752690880113*R)%Zs;if(B+=C*M,H+=O*M,G+=A*M,W+=E*M,z+=x*M,0!==u){(0===D||M*D<=0||Math.abs(M)<Math.abs(D))&&(D=0,F=L,N=I),t=M>0?720:-720;for(var ne=381;381===ne;)2!==u?(a=b*Math.sin(N-V)+w*Math.sin(2*(N-q))+P*Math.sin(3*(N-Z)),o=F+j,s=b*Math.cos(N-V)+2*w*Math.cos(2*(N-q))+3*P*Math.cos(3*(N-Z)),s*=o):(n=(l=k+T*D)+l,i=N+N,a=c*Math.sin(n+N-Y)+h*Math.sin(N-Y)+f*Math.sin(l+N-K)+p*Math.sin(-l+N-K)+m*Math.sin(n+i-Q)+d*Math.sin(i-Q)+v*Math.sin(l+N-X)+y*Math.sin(-l+N-X)+g*Math.sin(l+i-J)+_*Math.sin(-l+i-J),o=F+j,s=c*Math.cos(n+N-Y)+h*Math.cos(N-Y)+f*Math.cos(l+N-K)+p*Math.cos(-l+N-K)+v*Math.cos(l+N-X)+y*Math.cos(-l+N-X)+2*(m*Math.cos(n+i-Q)+d*Math.cos(i-Q)+g*Math.cos(l+i-J)+_*Math.cos(-l+i-J)),s*=o),Math.abs(M-D)>=720?ne=381:(te=M-D,ne=0),381===ne&&(N+=o*t+a*$,F+=a*t+s*$,D+=t);U=F+a*te+s*te*te*.5,r=N+o*te+a*te*te*.5,1!==u?(z=r-2*W+2*ie,ee=U-L):(z=r-W-G+ie,ee=U-L),U=L+ee}return{atime:D,em:B,argpm:G,inclm:H,xli:N,mm:z,xni:F,nodem:W,dndt:ee,nm:U}}({irez:e.irez,d2201:e.d2201,d2211:e.d2211,d3210:e.d3210,d3222:e.d3222,d4410:e.d4410,d4422:e.d4422,d5220:e.d5220,d5232:e.d5232,d5421:e.d5421,d5433:e.d5433,dedt:e.dedt,del1:e.del1,del2:e.del2,del3:e.del3,didt:e.didt,dmdt:e.dmdt,dnodt:e.dnodt,domdt:e.domdt,argpo:e.argpo,argpdot:e.argpdot,t:e.t,tc:m,gsto:e.gsto,xfact:e.xfact,xlamo:e.xlamo,no:e.no,atime:e.atime,em:j,argpm:u,inclm:C,xli:e.xli,mm:b,xni:e.xni,nodem:P,nm:w});j=I.em,u=I.argpm,C=I.inclm,b=I.mm,P=I.nodem,w=I.nm}if(w<=0)return e.error=2,[!1,!1];var L=Math.pow($s/w,sa)*y*y;if(w=$s/Math.pow(L,1.5),(j-=g)>=1||j<-.001)return e.error=1,[!1,!1];j<1e-6&&(j=1e-6),x=(b+=e.no*_)+u+P;var D=j;if(O=C,c=u%=Zs,A=P%=Zs,E=b=((x%=Zs)-u-P)%Zs,o=Math.sin(C),r=Math.cos(C),"d"===e.method){var B=ca(e,{inclo:e.inclo,init:"n",ep:D,inclp:O,nodep:A,argpp:c,mp:E,opsmode:e.operationmode});if(D=B.ep,A=B.nodep,c=B.argpp,E=B.mp,(O=B.inclp)<0&&(O=-O,A+=qs,c-=qs),D<0||D>1)return e.error=3,[!1,!1]}"d"===e.method&&(o=Math.sin(O),r=Math.cos(O),e.aycof=-.5*oa*o,Math.abs(r+1)>15e-13?e.xlcof=-.25*oa*o*(3+5*r)/(1+r):e.xlcof=-.25*oa*o*(3+5*r)/15e-13);var G=D*Math.cos(c);v=1/(L*(1-D*D));var H=D*Math.sin(c)+v*e.aycof,N=(E+c+A+v*e.xlcof*G-A)%Zs;l=N,d=9999.9;for(var z=1;Math.abs(d)>=1e-12&&z<=10;)n=Math.sin(l),d=(N-H*(i=Math.cos(l))+G*n-l)/(d=1-i*G-n*H),Math.abs(d)>=.95&&(d=d>0?.95:-.95),l+=d,z+=1;var F=G*i+H*n,W=G*n-H*i,U=G*G+H*H,V=L*(1-U);if(V<0)return e.error=4,[!1,!1];var q=L*(1-F),Z=Math.sqrt(L)*W/q,Y=Math.sqrt(V)/q,K=Math.sqrt(1-U),Q=L/q*(n-H-G*(v=W/(1+K))),X=L/q*(i-G+H*v);h=Math.atan2(Q,X);var J=(X+X)*Q,$=1-2*Q*Q,ee=.5*ia*(v=1/V),te=ee*v;"d"===e.method&&(s=r*r,e.con41=3*s-1,e.x1mth2=1-s,e.x7thm1=7*s-1);var ie=q*(1-1.5*te*K*e.con41)+.5*ee*e.x1mth2*$;if(ie<1)return e.error=6,{position:!1,velocity:!1};h-=.25*te*e.x7thm1*J;var ne=A+1.5*te*r*J,re=O+1.5*te*r*o*$,oe=Z-w*ee*e.x1mth2*J/$s,se=Y+w*ee*(e.x1mth2*$+1.5*e.con41)/$s,ae=Math.sin(h),le=Math.cos(h),ue=Math.sin(ne),ce=Math.cos(ne),he=Math.sin(re),fe=Math.cos(re),pe=-ue*fe,me=ce*fe,de=pe*ae+ce*le,ve=me*ae+ue*le,ye=he*ae;return{position:{x:ie*de*Js,y:ie*ve*Js,z:ie*ye*Js},velocity:{x:(oe*de+se*(pe*le-ce*ae))*ea,y:(oe*ve+se*(me*le-ue*ae))*ea,z:(oe*ye+se*(he*le))*ea}}}function ma(e,t){var i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O,x,E,A,k,T,M,R,S,j,I,L,D,B,G,H,N,z,F,W,U,V,q,Z,Y,K,Q,X,J,$,ee=t.opsmode,te=t.satn,ie=t.epoch,ne=t.xbstar,re=t.xecco,oe=t.xargpo,se=t.xinclo,ae=t.xmo,le=t.xno,ue=t.xnodeo;e.isimp=0,e.method="n",e.aycof=0,e.con41=0,e.cc1=0,e.cc4=0,e.cc5=0,e.d2=0,e.d3=0,e.d4=0,e.delmo=0,e.eta=0,e.argpdot=0,e.omgcof=0,e.sinmao=0,e.t=0,e.t2cof=0,e.t3cof=0,e.t4cof=0,e.t5cof=0,e.x1mth2=0,e.x7thm1=0,e.mdot=0,e.nodedot=0,e.xlcof=0,e.xmcof=0,e.nodecf=0,e.irez=0,e.d2201=0,e.d2211=0,e.d3210=0,e.d3222=0,e.d4410=0,e.d4422=0,e.d5220=0,e.d5232=0,e.d5421=0,e.d5433=0,e.dedt=0,e.del1=0,e.del2=0,e.del3=0,e.didt=0,e.dmdt=0,e.dnodt=0,e.domdt=0,e.e3=0,e.ee2=0,e.peo=0,e.pgho=0,e.pho=0,e.pinco=0,e.plo=0,e.se2=0,e.se3=0,e.sgh2=0,e.sgh3=0,e.sgh4=0,e.sh2=0,e.sh3=0,e.si2=0,e.si3=0,e.sl2=0,e.sl3=0,e.sl4=0,e.gsto=0,e.xfact=0,e.xgh2=0,e.xgh3=0,e.xgh4=0,e.xh2=0,e.xh3=0,e.xi2=0,e.xi3=0,e.xl2=0,e.xl3=0,e.xl4=0,e.xlamo=0,e.zmol=0,e.zmos=0,e.atime=0,e.xli=0,e.xni=0,e.bstar=ne,e.ecco=re,e.argpo=oe,e.inclo=se,e.mo=ae,e.no=le,e.nodeo=ue,e.operationmode=ee;var ce=78/Js+1,he=42/Js,fe=he*he*he*he;e.init="y",e.t=0;var pe=function(e){var t=e.ecco,i=e.epoch,n=e.inclo,r=e.opsmode,o=e.no,s=t*t,a=1-s,l=Math.sqrt(a),u=Math.cos(n),c=u*u,h=Math.pow($s/o,sa),f=.75*ia*(3*c-1)/(l*a),p=f/(h*h),m=h*(1-p*p-p*(1/3+134*p*p/81));o/=1+(p=f/(m*m));var d,v=Math.pow($s/o,sa),y=Math.sin(n),g=v*a,_=1-5*c,C=-_-c-c,b=1/v,w=g*g,P=v*(1-t);if("a"===r){var O=i-7305,x=Math.floor(O+1e-8),E=.017202791694070362;(d=(1.7321343856509375+E*x+(E+Zs)*(O-x)+O*O*5075514194322695e-30)%Zs)<0&&(d+=Zs)}else d=fa(i+2433281.5);return{no:o,method:"n",ainv:b,ao:v,con41:C,con42:_,cosio:u,cosio2:c,eccsq:s,omeosq:a,posq:w,rp:P,rteosq:l,sinio:y,gsto:d}}({satn:te,ecco:e.ecco,epoch:ie,inclo:e.inclo,no:e.no,method:e.method,opsmode:e.operationmode}),me=pe.ao,de=pe.con42,ve=pe.cosio,ye=pe.cosio2,ge=pe.eccsq,_e=pe.omeosq,Ce=pe.posq,be=pe.rp,we=pe.rteosq,Pe=pe.sinio;if(e.no=pe.no,e.con41=pe.con41,e.gsto=pe.gsto,e.a=Math.pow(e.no*ta,-2/3),e.alta=e.a*(1+e.ecco)-1,e.altp=e.a*(1-e.ecco)-1,e.error=0,_e>=0||e.no>=0){if(e.isimp=0,be<220/Js+1&&(e.isimp=1),x=ce,_=fe,(v=(be-1)*Js)<156){x=v-78,v<98&&(x=20);var Oe=(120-x)/Js;_=Oe*Oe*Oe*Oe,x=x/Js+1}y=1/Ce,W=1/(me-x),e.eta=me*e.ecco*W,p=e.eta*e.eta,f=e.ecco*e.eta,g=Math.abs(1-p),o=(l=(a=_*Math.pow(W,4))/Math.pow(g,3.5))*e.no*(me*(1+1.5*p+f*(4+p))+.375*ia*W/g*e.con41*(8+3*p*(8+p))),e.cc1=e.bstar*o,s=0,e.ecco>1e-4&&(s=-2*a*W*oa*e.no*Pe/e.ecco),e.x1mth2=1-ye,e.cc4=2*e.no*l*me*_e*(e.eta*(2+.5*p)+e.ecco*(.5+2*p)-ia*W/(me*g)*(-3*e.con41*(1-2*f+p*(1.5-.5*f))+.75*e.x1mth2*(2*p-f*(1+p))*Math.cos(2*e.argpo))),e.cc5=2*l*me*_e*(1+2.75*(p+f)+f*p),u=ye*ye,z=.5*(N=1.5*ia*y*e.no)*ia*y,F=-.46875*ra*y*y*e.no,e.mdot=e.no+.5*N*we*e.con41+.0625*z*we*(13-78*ye+137*u),e.argpdot=-.5*N*de+.0625*z*(7-114*ye+395*u)+F*(3-36*ye+49*u),V=-N*ve,e.nodedot=V+(.5*z*(4-19*ye)+2*F*(3-7*ye))*ve,U=e.argpdot+e.nodedot,e.omgcof=e.bstar*s*Math.cos(e.argpo),e.xmcof=0,e.ecco>1e-4&&(e.xmcof=-sa*a*e.bstar/f),e.nodecf=3.5*_e*V*e.cc1,e.t2cof=1.5*e.cc1,Math.abs(ve+1)>15e-13?e.xlcof=-.25*oa*Pe*(3+5*ve)/(1+ve):e.xlcof=-.25*oa*Pe*(3+5*ve)/15e-13,e.aycof=-.5*oa*Pe;var xe=1+e.eta*Math.cos(e.mo);if(e.delmo=xe*xe*xe,e.sinmao=Math.sin(e.mo),e.x7thm1=7*ye-1,2*qs/e.no>=225){e.method="d",e.isimp=1,0,m=e.inclo;var Ee=function(e){var t,i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O,x,E,A,k,T,M,R,S,j,I,L,D,B,G,H,N,z,F,W,U,V,q,Z,Y,K,Q,X,J,$,ee,te,ie,ne,re,oe,se,ae,le,ue,ce=e.epoch,he=e.ep,fe=e.argpp,pe=e.tc,me=e.inclp,de=e.nodep,ve=.01675,ye=.0549,ge=e.np,_e=he,Ce=Math.sin(de),be=Math.cos(de),we=Math.sin(fe),Pe=Math.cos(fe),Oe=Math.sin(me),xe=Math.cos(me),Ee=_e*_e,Ae=1-Ee,ke=Math.sqrt(Ae),Te=ce+18261.5+pe/1440,Me=(4.523602-.00092422029*Te)%Zs,Re=Math.sin(Me),Se=Math.cos(Me),je=.91375164-.03568096*Se,Ie=Math.sqrt(1-je*je),Le=.089683511*Re/Ie,De=Math.sqrt(1-Le*Le),Be=5.8351514+.001944368*Te,Ge=.39785416*Re/Ie,He=De*Se+.91744867*Le*Re;Ge=Math.atan2(Ge,He),Ge+=Be-Me;var Ne=Math.cos(Ge),ze=Math.sin(Ge);C=.1945905,b=-.98088458,O=.91744867,x=.39785416,w=be,P=Ce,h=29864797e-13;for(var Fe=1/ge,We=0;We<2;)te=-6*(t=C*w+b*O*P)*(o=-Oe*(a=-C*P+b*O*w)+xe*(l=b*x))+Ee*(-24*(f=t*Pe+(i=xe*a+Oe*l)*we)*(g=o*Pe)-6*(m=-t*we+i*Pe)*(v=o*we)),ie=-6*(t*(s=-Oe*(u=b*P+C*O*w)+xe*(c=C*x))+(n=-b*w+C*O*P)*o)+Ee*(-24*((p=n*Pe+(r=xe*u+Oe*c)*we)*g+f*(_=s*Pe))+-6*(m*(y=s*we)+(d=-n*we+r*Pe)*v)),ne=-6*n*s+Ee*(-24*p*_-6*d*y),re=6*i*o+Ee*(24*f*v-6*m*g),oe=6*(r*o+i*s)+Ee*(24*(p*v+f*y)-6*(d*g+m*_)),se=6*r*s+Ee*(24*p*y-6*d*_),J=(J=3*(t*t+i*i)+(ae=12*f*f-3*m*m)*Ee)+J+Ae*ae,$=($=6*(t*n+i*r)+(le=24*f*p-6*m*d)*Ee)+$+Ae*le,ee=(ee=3*(n*n+r*r)+(ue=12*p*p-3*d*d)*Ee)+ee+Ae*ue,q=-.5*(Z=h*Fe)/ke,V=-15*_e*(Y=Z*ke),K=f*m+p*d,Q=p*m+f*d,X=p*d-f*m,1===(We+=1)&&(E=V,A=q,k=Z,T=Y,M=K,R=Q,S=X,j=J,I=$,L=ee,D=te,B=ie,G=ne,H=re,N=oe,z=se,F=ae,W=le,U=ue,C=Ne,b=ze,O=je,x=Ie,w=De*be+Le*Ce,P=Ce*De-be*Le,h=4.7968065e-7);return{snodm:Ce,cnodm:be,sinim:Oe,cosim:xe,sinomm:we,cosomm:Pe,day:Te,e3:2*V*X,ee2:2*V*Q,em:_e,emsq:Ee,gam:Be,peo:0,pgho:0,pho:0,pinco:0,plo:0,rtemsq:ke,se2:2*E*R,se3:2*E*S,sgh2:2*T*W,sgh3:2*T*(U-F),sgh4:-18*T*ve,sh2:-2*A*N,sh3:-2*A*(z-H),si2:2*A*B,si3:2*A*(G-D),sl2:-2*k*I,sl3:-2*k*(L-j),sl4:-2*k*(-21-9*Ee)*ve,s1:V,s2:q,s3:Z,s4:Y,s5:K,s6:Q,s7:X,ss1:E,ss2:A,ss3:k,ss4:T,ss5:M,ss6:R,ss7:S,sz1:j,sz2:I,sz3:L,sz11:D,sz12:B,sz13:G,sz21:H,sz22:N,sz23:z,sz31:F,sz32:W,sz33:U,xgh2:2*Y*le,xgh3:2*Y*(ue-ae),xgh4:-18*Y*ye,xh2:-2*q*oe,xh3:-2*q*(se-re),xi2:2*q*ie,xi3:2*q*(ne-te),xl2:-2*Z*$,xl3:-2*Z*(ee-J),xl4:-2*Z*(-21-9*Ee)*ye,nm:ge,z1:J,z2:$,z3:ee,z11:te,z12:ie,z13:ne,z21:re,z22:oe,z23:se,z31:ae,z32:le,z33:ue,zmol:(.2299715*Te-Be+4.7199672)%Zs,zmos:(6.2565837+.017201977*Te)%Zs}}({epoch:ie,ep:e.ecco,argpp:e.argpo,tc:0,inclp:e.inclo,nodep:e.nodeo,np:e.no,e3:e.e3,ee2:e.ee2,peo:e.peo,pgho:e.pgho,pho:e.pho,pinco:e.pinco,plo:e.plo,se2:e.se2,se3:e.se3,sgh2:e.sgh2,sgh3:e.sgh3,sgh4:e.sgh4,sh2:e.sh2,sh3:e.sh3,si2:e.si2,si3:e.si3,sl2:e.sl2,sl3:e.sl3,sl4:e.sl4,xgh2:e.xgh2,xgh3:e.xgh3,xgh4:e.xgh4,xh2:e.xh2,xh3:e.xh3,xi2:e.xi2,xi3:e.xi3,xl2:e.xl2,xl3:e.xl3,xl4:e.xl4,zmol:e.zmol,zmos:e.zmos});e.e3=Ee.e3,e.ee2=Ee.ee2,e.peo=Ee.peo,e.pgho=Ee.pgho,e.pho=Ee.pho,e.pinco=Ee.pinco,e.plo=Ee.plo,e.se2=Ee.se2,e.se3=Ee.se3,e.sgh2=Ee.sgh2,e.sgh3=Ee.sgh3,e.sgh4=Ee.sgh4,e.sh2=Ee.sh2,e.sh3=Ee.sh3,e.si2=Ee.si2,e.si3=Ee.si3,e.sl2=Ee.sl2,e.sl3=Ee.sl3,e.sl4=Ee.sl4,n=Ee.sinim,i=Ee.cosim,c=Ee.em,h=Ee.emsq,C=Ee.s1,b=Ee.s2,w=Ee.s3,P=Ee.s4,O=Ee.s5,E=Ee.ss1,A=Ee.ss2,k=Ee.ss3,T=Ee.ss4,M=Ee.ss5,R=Ee.sz1,S=Ee.sz3,j=Ee.sz11,I=Ee.sz13,L=Ee.sz21,D=Ee.sz23,B=Ee.sz31,G=Ee.sz33,e.xgh2=Ee.xgh2,e.xgh3=Ee.xgh3,e.xgh4=Ee.xgh4,e.xh2=Ee.xh2,e.xh3=Ee.xh3,e.xi2=Ee.xi2,e.xi3=Ee.xi3,e.xl2=Ee.xl2,e.xl3=Ee.xl3,e.xl4=Ee.xl4,e.zmol=Ee.zmol,e.zmos=Ee.zmos,d=Ee.nm,q=Ee.z1,Z=Ee.z3,Y=Ee.z11,K=Ee.z13,Q=Ee.z21,X=Ee.z23,J=Ee.z31,$=Ee.z33;var Ae=ca(e,{inclo:m,init:e.init,ep:e.ecco,inclp:e.inclo,nodep:e.nodeo,argpp:e.argpo,mp:e.mo,opsmode:e.operationmode});e.ecco=Ae.ep,e.inclo=Ae.inclp,e.nodeo=Ae.nodep,e.argpo=Ae.argpp,e.mo=Ae.mp,0,0,0;var ke=function(e){var t,i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g=e.cosim,_=e.argpo,C=e.s1,b=e.s2,w=e.s3,P=e.s4,O=e.s5,x=e.sinim,E=e.ss1,A=e.ss2,k=e.ss3,T=e.ss4,M=e.ss5,R=e.sz1,S=e.sz3,j=e.sz11,I=e.sz13,L=e.sz21,D=e.sz23,B=e.sz31,G=e.sz33,H=e.t,N=e.tc,z=e.gsto,F=e.mo,W=e.mdot,U=e.no,V=e.nodeo,q=e.nodedot,Z=e.xpidot,Y=e.z1,K=e.z3,Q=e.z11,X=e.z13,J=e.z21,$=e.z23,ee=e.z31,te=e.z33,ie=e.ecco,ne=e.eccsq,re=e.emsq,oe=e.em,se=e.argpm,ae=e.inclm,le=e.mm,ue=e.nm,ce=e.nodem,he=e.irez,fe=e.atime,pe=e.d2201,me=e.d2211,de=e.d3210,ve=e.d3222,ye=e.d4410,ge=e.d4422,_e=e.d5220,Ce=e.d5232,be=e.d5421,we=e.d5433,Pe=e.dedt,Oe=e.didt,xe=e.dmdt,Ee=e.dnodt,Ae=e.domdt,ke=e.del1,Te=e.del2,Me=e.del3,Re=e.xfact,Se=e.xlamo,je=e.xli,Ie=e.xni,Le=.0043752690880113,De=.00015835218,Be=119459e-10;he=0,ue<.0052359877&&ue>.0034906585&&(he=1),ue>=.00826&&ue<=.00924&&oe>=.5&&(he=2);var Ge=-Be*A*(L+D);(ae<.052359877||ae>qs-.052359877)&&(Ge=0),0!==x&&(Ge/=x);var He=-De*b*(J+$);(ae<.052359877||ae>qs-.052359877)&&(He=0),Ae=T*Be*(B+G-6)-g*Ge+P*De*(ee+te-6),Ee=Ge,0!==x&&(Ae-=g/x*He,Ee+=He/x);var Ne=(z+N*Le)%Zs;if(oe+=(Pe=E*Be*M+C*De*O)*H,ae+=(Oe=A*Be*(j+I)+b*De*(Q+X))*H,se+=Ae*H,ce+=Ee*H,le+=(xe=-Be*k*(R+S-14-6*re)-De*w*(Y+K-14-6*re))*H,0!==he){if(d=Math.pow(ue/$s,sa),2===he){var ze=oe,Fe=re;y=(oe=ie)*(re=ne),oe<=.65?(n=3.616-13.247*oe+16.29*re,r=117.39*oe-19.302-228.419*re+156.591*y,o=109.7927*oe-18.9068-214.6334*re+146.5816*y,s=242.694*oe-41.122-471.094*re+313.953*y,a=841.88*oe-146.407-1629.014*re+1083.435*y,l=3017.977*oe-532.114-5740.032*re+3708.276*y):(n=331.819*oe-72.099-508.738*re+266.724*y,r=1582.851*oe-346.844-2415.925*re+1246.113*y,o=1554.908*oe-342.585-2366.899*re+1215.972*y,s=4758.686*oe-1052.797-7193.992*re+3651.957*y,a=16178.11*oe-3581.69-24462.77*re+12422.52*y,l=oe>.715?29936.92*oe-5149.66-54087.36*re+31324.56*y:1464.74-4664.75*oe+3763.64*re),oe<.7?(h=4988.61*oe-919.2277-9064.77*re+5542.21*y,u=4568.6173*oe-822.71072-8491.4146*re+5337.524*y,c=4690.25*oe-853.666-8624.77*re+5341.4*y):(h=161616.52*oe-37995.78-229838.2*re+109377.94*y,u=218913.95*oe-51752.104-309468.16*re+146349.42*y,c=170470.89*oe-40023.88-242699.48*re+115605.82*y),pe=(p=17891679e-13*(m=ue*ue*3*(d*d)))*(t=.75*(1+2*g+(v=g*g)))*(-.306-.44*(oe-.64)),me=p*(1.5*(f=x*x))*n,de=(p=3.7393792e-7*(m*=d))*(1.875*x*(1-2*g-3*v))*r,ve=p*(-1.875*x*(1+2*g-3*v))*o,ye=(p=2*(m*=d)*7.3636953e-9)*(35*f*t)*s,ge=p*(39.375*f*f)*a,_e=(p=1.1428639e-7*(m*=d))*(9.84375*x*(f*(1-2*g-5*v)+.33333333*(4*g-2+6*v)))*l,Ce=p*(x*(4.92187512*f*(-2-4*g+10*v)+6.56250012*(1+2*g-3*v)))*c,be=(p=2*m*2.1765803e-9)*(29.53125*x*(2-8*g+v*(8*g-12+10*v)))*u,we=p*(29.53125*x*(-2-8*g+v*(12+8*g-10*v)))*h,Se=(F+V+V-(Ne+Ne))%Zs,Re=W+xe+2*(q+Ee-Le)-U,oe=ze,re=Fe}1===he&&(i=1+g,Te=2*(ke=3*ue*ue*d*d)*(t=.75*(1+g)*(1+g))*(1+re*(.8125*re-2.5))*17891679e-13,Me=3*ke*(i*=1.875*i*i)*(1+re*(6.60937*re-6))*2.2123015e-7*d,ke=ke*(.9375*x*x*(1+3*g)-.75*(1+g))*(r=1+2*re)*21460748e-13*d,Se=(F+V+_-Ne)%Zs,Re=W+Z+xe+Ae+Ee-(U+Le)),je=Se,Ie=U,fe=0,ue=U+0}return{em:oe,argpm:se,inclm:ae,mm:le,nm:ue,nodem:ce,irez:he,atime:fe,d2201:pe,d2211:me,d3210:de,d3222:ve,d4410:ye,d4422:ge,d5220:_e,d5232:Ce,d5421:be,d5433:we,dedt:Pe,didt:Oe,dmdt:xe,dndt:0,dnodt:Ee,domdt:Ae,del1:ke,del2:Te,del3:Me,xfact:Re,xlamo:Se,xli:je,xni:Ie}}({cosim:i,emsq:h,argpo:e.argpo,s1:C,s2:b,s3:w,s4:P,s5:O,sinim:n,ss1:E,ss2:A,ss3:k,ss4:T,ss5:M,sz1:R,sz3:S,sz11:j,sz13:I,sz21:L,sz23:D,sz31:B,sz33:G,t:e.t,tc:0,gsto:e.gsto,mo:e.mo,mdot:e.mdot,no:e.no,nodeo:e.nodeo,nodedot:e.nodedot,xpidot:U,z1:q,z3:Z,z11:Y,z13:K,z21:Q,z23:X,z31:J,z33:$,ecco:e.ecco,eccsq:ge,em:c,argpm:0,inclm:m,mm:0,nm:d,nodem:0,irez:e.irez,atime:e.atime,d2201:e.d2201,d2211:e.d2211,d3210:e.d3210,d3222:e.d3222,d4410:e.d4410,d4422:e.d4422,d5220:e.d5220,d5232:e.d5232,d5421:e.d5421,d5433:e.d5433,dedt:e.dedt,didt:e.didt,dmdt:e.dmdt,dnodt:e.dnodt,domdt:e.domdt,del1:e.del1,del2:e.del2,del3:e.del3,xfact:e.xfact,xlamo:e.xlamo,xli:e.xli,xni:e.xni});e.irez=ke.irez,e.atime=ke.atime,e.d2201=ke.d2201,e.d2211=ke.d2211,e.d3210=ke.d3210,e.d3222=ke.d3222,e.d4410=ke.d4410,e.d4422=ke.d4422,e.d5220=ke.d5220,e.d5232=ke.d5232,e.d5421=ke.d5421,e.d5433=ke.d5433,e.dedt=ke.dedt,e.didt=ke.didt,e.dmdt=ke.dmdt,e.dnodt=ke.dnodt,e.domdt=ke.domdt,e.del1=ke.del1,e.del2=ke.del2,e.del3=ke.del3,e.xfact=ke.xfact,e.xlamo=ke.xlamo,e.xli=ke.xli,e.xni=ke.xni}1!==e.isimp&&(r=e.cc1*e.cc1,e.d2=4*me*W*r,H=e.d2*W*e.cc1/3,e.d3=(17*me+x)*H,e.d4=.5*H*me*W*(221*me+31*x)*e.cc1,e.t3cof=e.d2+2*r,e.t4cof=.25*(3*e.d3+e.cc1*(12*e.d2+10*r)),e.t5cof=.2*(3*e.d4+12*e.cc1*e.d3+6*e.d2*e.d2+15*r*(2*e.d2+r)))}pa(e,0),e.init="n"}function da(e,t){var i=1440/(2*qs),n=0,r={error:0};r.satnum=e.substring(2,7),r.epochyr=parseInt(e.substring(18,20),10),r.epochdays=parseFloat(e.substring(20,32)),r.ndot=parseFloat(e.substring(33,43)),r.nddot=parseFloat(".".concat(parseInt(e.substring(44,50),10),"E").concat(e.substring(50,52))),r.bstar=parseFloat("".concat(e.substring(53,54),".").concat(parseInt(e.substring(54,59),10),"E").concat(e.substring(59,61))),r.inclo=parseFloat(t.substring(8,16)),r.nodeo=parseFloat(t.substring(17,25)),r.ecco=parseFloat(".".concat(t.substring(26,33))),r.argpo=parseFloat(t.substring(34,42)),r.mo=parseFloat(t.substring(43,51)),r.no=parseFloat(t.substring(52,63)),r.no/=i,r.inclo*=Ys,r.nodeo*=Ys,r.argpo*=Ys,r.mo*=Ys;var o=aa(n=r.epochyr<57?r.epochyr+2e3:r.epochyr+1900,r.epochdays),s=o.mon,a=o.day,l=o.hr,u=o.minute,c=o.sec;return r.jdsatepoch=ua(n,s,a,l,u,c),ma(r,{opsmode:"i",satn:r.satnum,epoch:r.jdsatepoch-2433281.5,xbstar:r.bstar,xecco:r.ecco,xargpo:r.argpo,xinclo:r.inclo,xmo:r.mo,xno:r.no,xnodeo:r.nodeo}),r}function va(e){return function(e){if(Array.isArray(e))return ya(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ya(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ya(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function ga(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],r=Array.prototype.slice.call(t,1);return pa(n,(ua.apply(void 0,va(r))-n.jdsatepoch)*Qs)}function _a(e){return e*Ks}function Ca(e){if(e<-qs/2||e>qs/2)throw new RangeError("Latitude radians must be in range [-pi/2; pi/2].");return _a(e)}function ba(e){if(e<-qs||e>qs)throw new RangeError("Longitude radians must be in range [-pi; pi].");return _a(e)}function wa(e,t){for(var i=6378.137,n=Math.sqrt(e.x*e.x+e.y*e.y),r=(i-6356.7523142)/i,o=2*r-r*r,s=Math.atan2(e.y,e.x)-t;s<-qs;)s+=Zs;for(;s>qs;)s-=Zs;for(var a,l=0,u=Math.atan2(e.z,Math.sqrt(e.x*e.x+e.y*e.y));l<20;)a=1/Math.sqrt(1-o*(Math.sin(u)*Math.sin(u))),u=Math.atan2(e.z+i*a*o*Math.sin(u),n),l+=1;return{longitude:s,latitude:u,height:n/Math.cos(u)-i*a}}function Pa(e){for(var t=String(e).trim().split("\n").map((function(e){return e.trim()})).filter((function(e){return e.length>0})),i=[],n=0;n<t.length-2;n+=3){var r=t[n],o=t[n+1],s=t[n+2];o.startsWith("1 ")&&s.startsWith("2 ")&&i.push({name:r,line1:o,line2:s})}return i}function Oa(e,t){try{var i=ga(e,t);if(!i.position||"boolean"==typeof i.position)return null;var n=fa(t),r=wa(i.position,n),o=i.velocity&&"boolean"!=typeof i.velocity?i.velocity:null,s=o?1e3*Math.hypot(o.x,o.y,o.z):null;return{longitude:ba(r.longitude),latitude:Ca(r.latitude),altitude:1e3*r.height,speedMps:Number.isFinite(s)?s:null}}catch(e){return null}}function xa(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Ea(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ea(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Aa=Object.freeze({station:Object.freeze({label:"STATION",color:"#fff6e5",blurb:"空间站及关联飞行器"}),nav:Object.freeze({label:"NAV",color:"#4fd8ff",blurb:"导航星座 — GPS、GLONASS、Galileo"}),geo:Object.freeze({label:"GEO",color:"#c89bff",blurb:"地球同步轨道 — 通信和气象卫星"}),visual:Object.freeze({label:"VISUAL",color:"#9fb3c4",blurb:"裸眼可见天体 — CelesTrak visual 组"}),comms:Object.freeze({label:"COMMS",color:"#54697f",blurb:"宽带星座 — Starlink 壳层 (DENSE 模式)"})}),ka=Object.freeze(["station","nav","geo","visual","comms"]),Ta=Object.freeze({stations:Object.freeze({klass:"station",subtype:null}),visual:Object.freeze({klass:"visual",subtype:null}),"gps-ops":Object.freeze({klass:"nav",subtype:"GPS"}),glonass:Object.freeze({klass:"nav",subtype:"GLONASS"}),galileo:Object.freeze({klass:"nav",subtype:"GALILEO"}),geo:Object.freeze({klass:"geo",subtype:null}),dense:Object.freeze({klass:"comms",subtype:"STARLINK"})}),Ma=Object.freeze({klass:"visual",subtype:null}),Ra=Object.freeze({klass:"station",subtype:"ISS"});function Sa(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isIss;return void 0!==t&&t?Ra:Ta[e]||Ma}function ja(e){return Aa[Sa(e).klass].color}function Ia(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isIss,i=Sa(e,{isIss:void 0!==t&&t}),n=i.klass,r=i.subtype,o=Aa[n].label;return r?"".concat(o," · ").concat(r):o}function La(e){var t,i=Object.create(null),n=xa(e||[]);try{for(n.s();!(t=n.n()).done;){var o=t.value,s=o&&"object"===r(o)?o:{group:o},a=Sa(s.group,{isIss:s.isIss}).klass;i[a]=(i[a]||0)+1}}catch(e){n.e(e)}finally{n.f()}return i}function Da(e){var t,i=[],n=xa(ka);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=null==e?void 0:e[r];if(o>0){var s=Aa[r];i.push({klass:r,label:s.label,color:s.color,blurb:s.blurb,count:o})}}}catch(e){n.e(e)}finally{n.f()}return i}function Ba(e,t){for(var i=function(e){var t=e.no*(1440/(2*Math.PI));return 86400/Math.max(t,.1)}(e),n=i/180,r=[],o=t.getTime(),s=fa(t),a=0;a<=180;a++){var l=new Date(o+a*n*1e3);try{var u=ga(e,l);if(!u.position||"boolean"==typeof u.position)continue;var c=wa(u.position,s);r.push(Vs.Cartesian3.fromDegrees(ba(c.longitude),Ca(c.latitude),1e3*c.height))}catch(e){continue}}return r}function Ga(e,t,i){i||(i=new Vs.Matrix4);var n=fa(t)-e,r=Vs.Matrix3.fromRotationZ(-n,new Vs.Matrix3);return Vs.Matrix4.fromRotationTranslation(r,Vs.Cartesian3.ZERO,i)}function Ha(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Na(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ha(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ha(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function za(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Fa(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Fa(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Fa(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function Wa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ua=25544,Va=[{tag:"stations",path:"stations"},{tag:"visual",path:"visual"},{tag:"gps-ops",path:"gps-ops"},{tag:"glonass",path:"glo-ops"},{tag:"galileo",path:"galileo"},{tag:"geo",path:"geo"}],qa=Vs.Color.WHITE.withAlpha(.3),Za={iss:{pixelSize:12,color:Vs.Color.fromCssColorString("#ff4444"),outlineColor:qa,outlineWidth:2},stations:{pixelSize:8,color:Vs.Color.fromCssColorString(ja("stations")),outlineColor:qa,outlineWidth:0},visual:{pixelSize:6,color:Vs.Color.fromCssColorString(ja("visual")),outlineColor:qa,outlineWidth:0},"gps-ops":{pixelSize:6,color:Vs.Color.fromCssColorString(ja("gps-ops")),outlineColor:qa,outlineWidth:0},glonass:{pixelSize:6,color:Vs.Color.fromCssColorString(ja("glonass")),outlineColor:qa,outlineWidth:0},galileo:{pixelSize:6,color:Vs.Color.fromCssColorString(ja("galileo")),outlineColor:qa,outlineWidth:0},geo:{pixelSize:5,color:Vs.Color.fromCssColorString(ja("geo")),outlineColor:qa,outlineWidth:0}},Ya=function(e){c(s,e);var t,i,r,o=Wa(s);function s(e){var t;return n(this,s),(t=o.call(this,e))._catalog=new Map,t._pointCollection=null,t._points=new Map,t._orbitPaths=new Map,t._preRenderListener=null,t._lastPropagation=0,t._lastRingRotation=0,t._enabled=!1,t._issLabelEntity=null,t._showOrbits=!0,t._showPoints=!0,t._autoRefreshTimeout=null,t._refreshInterval=72e5,t._lastError=null,t._activeControllers=new Set,t}return a(s,[{key:"count",get:function(){return this._catalog.size}},{key:"lastError",get:function(){return this._lastError}},{key:"getEntries",value:function(){var e,t=[],i=za(this._catalog);try{for(i.s();!(e=i.n()).done;){var n=fe(e.value,2),r=n[0],o=n[1];t.push({noradId:r,name:o.name,group:o.group})}}catch(e){i.e(e)}finally{i.f()}return t}},{key:"showOrbits",get:function(){return this._showOrbits},set:function(e){this._showOrbits=!!e;var t,i=za(this._orbitPaths);try{for(i.s();!(t=i.n()).done;){var n=fe(t.value,2)[1];n.primitive&&(n.primitive.show=this._showOrbits)}}catch(e){i.e(e)}finally{i.f()}}},{key:"showPoints",get:function(){return this._showPoints},set:function(e){this._showPoints=!!e,this._pointCollection&&(this._pointCollection.show=this._showPoints)}},{key:"_fetchGroup",value:(r=U(q().mark((function e(t,i){var n,r,o;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="/api/celestrak/".concat(t),e.next=3,fetch(n,{signal:i});case 3:if(!(r=e.sent).ok){e.next=10;break}return e.next=7,r.text();case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0="";case 11:return o=e.t0,null==i||i.throwIfAborted(),e.abrupt("return",{ok:r.ok,status:r.status,text:o});case 14:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)})},{key:"_loadCatalog",value:(i=U(q().mark((function e(t){var i,n,r,o,s,a,l,u,c,h,f,p,m,d,v,y,g,_,C,b=this;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new AbortController,this._activeControllers.add(i),n=t?AbortSignal.any([t,i.signal]):i.signal,e.prev=3,e.next=6,Promise.all(Va.map(function(){var e=U(q().mark((function e(t){var i,r;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b._fetchGroup(t.path,n);case 3:if((i=e.sent).ok){e.next=6;break}return e.abrupt("return",Na(Na({},t),{},{entries:[],ok:!1}));case 6:return r=Pa(i.text),n.throwIfAborted(),e.abrupt("return",Na(Na({},t),{},{entries:r,ok:r.length>0}));case 11:if(e.prev=11,e.t0=e.catch(0),!n.aborted&&"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=15;break}throw e.t0;case 15:return e.abrupt("return",Na(Na({},t),{},{entries:[],ok:!1}));case 16:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r=e.sent,n.throwIfAborted(),o=r.filter((function(e){return!e.ok})).map((function(e){return e.path})),o.length>0&&console.warn("[SatelliteLayer] 组加载失败: ".concat(o.join(", "))),!r.every((function(e){return!e.ok}))){e.next=13;break}return this._lastError="CelesTrak 不可达",e.abrupt("return");case 13:this._lastError=o.length>0?"".concat(o.length," 个 CelesTrak 组不可用"):null,this._clearAllPrimitives(),s=new Date,a=new Set,l=za(r),e.prev=18,l.s();case 20:if((u=l.n()).done){e.next=54;break}c=u.value,h=za(c.entries),e.prev=23,h.s();case 25:if((f=h.n()).done){e.next=44;break}if(p=f.value,(m=da(p.line1,p.line2))&&0===m.error){e.next=30;break}return e.abrupt("continue",42);case 30:if(d=Number(m.satnum),!a.has(d)){e.next=33;break}return e.abrupt("continue",42);case 33:if(a.add(d),this._catalog.set(d,{name:p.name,satrec:m,group:c.tag}),v=Oa(m,s)){e.next=38;break}return e.abrupt("continue",42);case 38:y=Vs.Cartesian3.fromDegrees(v.longitude,v.latitude,v.altitude),g=this._getPointStyle(d,c.tag),_=this._pointCollection.add({position:y,pixelSize:g.pixelSize,color:g.color,outlineColor:g.outlineColor,outlineWidth:g.outlineWidth,scaleByDistance:new Vs.NearFarScalar(1e6,1.5,2e7,.6),id:d}),this._points.set(d,_);case 42:e.next=25;break;case 44:e.next=49;break;case 46:e.prev=46,e.t0=e.catch(23),h.e(e.t0);case 49:return e.prev=49,h.f(),e.finish(49);case 52:e.next=20;break;case 54:e.next=59;break;case 56:e.prev=56,e.t1=e.catch(18),l.e(e.t1);case 59:return e.prev=59,l.f(),e.finish(59);case 62:this._catalog.has(Ua)&&(this._showOrbitPath(Ua,Za.iss.color),(C=this._orbitPaths.get(Ua))&&(C.primitive.show=this._showOrbits),this._addIssLabel()),console.log("[SatelliteLayer] 已加载 ".concat(this._points.size," 颗卫星")),e.next=72;break;case 66:if(e.prev=66,e.t2=e.catch(3),!n.aborted&&"AbortError"!==(null===e.t2||void 0===e.t2?void 0:e.t2.name)){e.next=70;break}return e.abrupt("return");case 70:console.warn("[SatelliteLayer] 加载失败:",e.t2),this._lastError="加载失败";case 72:return e.prev=72,this._activeControllers.delete(i),e.finish(72);case 75:case"end":return e.stop()}}),e,this,[[3,66,72,75],[18,56,59,62],[23,46,49,52]])}))),function(e){return i.apply(this,arguments)})},{key:"_getPointStyle",value:function(e,t){return e===Ua?Za.iss:Za[t]||Za.visual}},{key:"_showOrbitPath",value:function(e,t){if(!this._orbitPaths.has(e)){var i=this._catalog.get(e);if(i&&this._viewer){var n=new Date,r=Ba(i.satrec,n);if(!(r.length<2)){var o=t||Vs.Color.CYAN,s=e===Ua?2.5:2,a=new Vs.Primitive({geometryInstances:new Vs.GeometryInstance({geometry:new Vs.PolylineGeometry({positions:r,width:s,vertexFormat:Vs.PolylineColorAppearance.VERTEX_FORMAT}),attributes:{color:Vs.ColorGeometryInstanceAttribute.fromColor(o.withAlpha(.6)),depthFailColor:Vs.ColorGeometryInstanceAttribute.fromColor(o.withAlpha(.35))}}),appearance:new Vs.PolylineColorAppearance({translucent:!0}),depthFailAppearance:new Vs.PolylineColorAppearance({translucent:!0}),asynchronous:!1,allowPicking:!1});this._viewer.scene.primitives.add(a),this._orbitPaths.set(e,{primitive:a,gmstAtBake:fa(n)})}}}}},{key:"_hideOrbitPath",value:function(e){var t=this._orbitPaths.get(e);t&&(this._viewer&&this._viewer.scene.primitives.remove(t.primitive),this._orbitPaths.delete(e))}},{key:"_addIssLabel",value:function(){if(this._viewer&&!this._issLabelEntity){var e=this._catalog.get(Ua);if(e){var t=Oa(e.satrec,new Date);t&&(this._issLabelEntity=this._viewer.entities.add({position:Vs.Cartesian3.fromDegrees(t.longitude,t.latitude,t.altitude),label:{text:"ISS",font:"12px sans-serif",fillColor:Vs.Color.fromCssColorString("#ff4444"),outlineColor:Vs.Color.BLACK,outlineWidth:1,style:Vs.LabelStyle.FILL,verticalOrigin:Vs.VerticalOrigin.BOTTOM,pixelOffset:new Vs.Cartesian2(0,-10),scaleByDistance:new Vs.NearFarScalar(1e6,.8,2e7,.3),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))}}}},{key:"_updateIssLabel",value:function(){if(this._issLabelEntity){var e=this._catalog.get(Ua);if(e){var t=Oa(e.satrec,new Date);t&&(this._issLabelEntity.position=Vs.Cartesian3.fromDegrees(t.longitude,t.latitude,t.altitude))}}}},{key:"_propagateAll",value:function(){var e,t=new Date,i=0,n=za(this._catalog);try{for(n.s();!(e=n.n()).done;){var r=fe(e.value,2),o=r[0],s=r[1];if("dense"!==s.group){var a=Oa(s.satrec,t);if(a){var l=Vs.Cartesian3.fromDegrees(a.longitude,a.latitude,a.altitude),u=this._points.get(o);u&&(u.position=l,i++)}}}}catch(e){n.e(e)}finally{n.f()}return this._updateIssLabel(),i}},{key:"_updateOrbitPathRotations",value:function(e){if(0!==this._orbitPaths.size){var t,i=za(this._orbitPaths);try{for(i.s();!(t=i.n()).done;){var n=fe(t.value,2)[1];n.primitive&&Ga(n.gmstAtBake,e,n.primitive.modelMatrix)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"_preRenderTick",value:function(){if(this._enabled){var e=Date.now();this._showPoints&&e-this._lastPropagation>=1e3&&(this._propagateAll(),this._lastPropagation=e),e-this._lastRingRotation>=1e3&&(this._updateOrbitPathRotations(new Date(e)),this._lastRingRotation=e)}}},{key:"_clearAllPrimitives",value:function(){this._pointCollection&&this._pointCollection.removeAll(),this._points.clear();var e,t=za(this._orbitPaths);try{for(t.s();!(e=t.n()).done;){var i=fe(e.value,1)[0];if(this._viewer){var n=this._orbitPaths.get(i);n&&this._viewer.scene.primitives.remove(n.primitive)}}}catch(e){t.e(e)}finally{t.f()}this._orbitPaths.clear(),this._issLabelEntity&&this._viewer&&(this._viewer.entities.remove(this._issLabelEntity),this._issLabelEntity=null),this._catalog.clear()}},{key:"_startAutoRefresh",value:function(){var e=this;this._stopAutoRefresh(),this._autoRefreshTimeout=setTimeout((function(){e._enabled&&e._loadCatalog().then((function(){return e._startAutoRefresh()}))}),this._refreshInterval)}},{key:"_stopAutoRefresh",value:function(){this._autoRefreshTimeout&&(clearTimeout(this._autoRefreshTimeout),this._autoRefreshTimeout=null)}},{key:"_addedHook",value:function(){}},{key:"_onAdd",value:function(e){var t=this;this._viewer=e,this._pointCollection=new Vs.PointPrimitiveCollection,this._pointCollection.show=this._showPoints,this._primitiveCollection=new Vs.PrimitiveCollection,this._primitiveCollection.add(this._pointCollection),this._nativeObjCesium=this._primitiveCollection,N(p(s.prototype),"_onAdd",this).call(this,e),this._enabled=!0,this._preRenderListener=e.scene.preRender.addEventListener((function(){t._preRenderTick()})),this._loadCatalog().then((function(){return t._startAutoRefresh()}))}},{key:"_onRemove",value:function(){this._enabled=!1,this._stopAutoRefresh();var e,t=za(this._activeControllers);try{for(t.s();!(e=t.n()).done;){e.value.abort()}}catch(e){t.e(e)}finally{t.f()}this._activeControllers.clear(),this._preRenderListener&&this._viewer&&(this._preRenderListener(),this._preRenderListener=null),this._clearAllPrimitives(),N(p(s.prototype),"_onRemove",this).call(this),this._pointCollection=null,this._primitiveCollection=null}},{key:"_removedHook",value:function(){this.clear()}},{key:"refresh",value:(t=U(q().mark((function e(){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._loadCatalog();case 2:this._startAutoRefresh();case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"toggleOrbitPath",value:function(e,t){if(t){if(!this._orbitPaths.has(e)){var i=this._getPointStyle(e,"visual").color;this._showOrbitPath(e,i)}var n=this._orbitPaths.get(e);n&&(n.primitive.show=!0)}else this._hideOrbitPath(e)}},{key:"getSatelliteInfo",value:function(e){var t=this._catalog.get(e);if(!t)return null;var i=Oa(t.satrec,new Date);return{name:t.name,group:t.group,position:i}}},{key:"clear",value:function(){this._stopAutoRefresh(),this._clearAllPrimitives()}}]),s}(mr);const Ka=Ya;var Qa=i(852),Xa=i.n(Qa),Ja=i(529),$a=i.n(Ja),el=i(885),tl=i.n(el),il=i(139),nl=i.n(il),rl=i(450),ol=i.n(rl),sl=i(162),al=i.n(sl),ll=i(750),ul=i.n(ll),cl=i(601),hl=i.n(cl),fl=i(454),pl=i.n(fl),ml=i(253),dl=i.n(ml);Cesium.Material.PolylineFlickerType="PolylineFlicker",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineFlickerType,{fabric:{type:Cesium.Material.PolylineFlickerType,uniforms:{color:new Cesium.Color(1,0,0,.7),speed:1},source:pl()},translucent:function(e){return!0}}),Cesium.Material.PolylineTrailType="PolylineTrail",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineTrailType,{fabric:{type:Cesium.Material.PolylineTrailType,uniforms:{color:new Cesium.Color(1,0,0,.7),image:Cesium.Material.DefaultImageId,speed:1,repeat:new Cesium.Cartesian2(1,1)},source:hl()},translucent:function(e){return!0}}),Cesium.Material.PolylineLightingTrailType="PolylineLightingTrail",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineLightingTrailType,{fabric:{type:Cesium.Material.PolylineLightingTrailType,uniforms:{color:new Cesium.Color(1,0,0,.7),image:Cesium.Material.DefaultImageId,speed:3},source:Xa()},translucent:function(e){return!0}}),Cesium.Material.PolylineImageTrailType="PolylineImageTrail",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineImageTrailType,{fabric:{type:Cesium.Material.PolylineImageTrailType,uniforms:{color:new Cesium.Color(1,0,0,.7),image:Cesium.Material.DefaultImageId,speed:1,repeat:new Cesium.Cartesian2(1,1)},source:$a()},translucent:function(e){return!0}}),Cesium.Material.PolylineLightingType="PolylineLighting",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineLightingType,{fabric:{type:Cesium.Material.PolylineLightingType,uniforms:{color:new Cesium.Color(1,0,0,.7),image:Cesium.Material.DefaultImageId},source:nl()},translucent:function(e){return!0}}),Cesium.Material.PolylineGlowType="PolylineGlow",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineGlowType,{fabric:{type:Cesium.Material.PolylineGlowType,uniforms:{color:new Cesium.Color(1,.27,0,.9),glowPower:.06,taperPower:1},source:tl()},translucent:function(e){return!0}}),Cesium.Material.PolylineGradientType="PolylineGradient",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineGradientType,{fabric:{type:Cesium.Material.PolylineGradientType,uniforms:{color:new Cesium.Color(1,0,0,.5),image:"",transparent:!0,time:20},source:ol()},translucent:function(){return!0}}),Cesium.Material.PolylineFlowType="PolylineFlow",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineFlowType,{fabric:{type:Cesium.Material.PolylineFlowType,uniforms:{color:new Cesium.Color(1,0,0,.7),speed:1,percent:.03,gradient:.1},source:al()},translucent:function(e){return!0}}),Cesium.Material.PolylineVFlywireType="PolylineVFlywire",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineVFlywireType,{fabric:{type:Cesium.Material.PolylineVFlywireType,uniforms:{color:new Cesium.Color(1,0,0,1),speed:10,percent:.1,gradient:.01},source:ul()},translucent:function(e){return!0}}),Cesium.Material.DaoHangLineType="DaoHangLine",Cesium.Material._materialCache.addMaterial(Cesium.Material.DaoHangLineType,{fabric:{type:Cesium.Material.DaoHangLineType,uniforms:{color1:new Cesium.Color(1,1,1,1),color2:new Cesium.Color(0,1,0,1),whiteLength:10,greenLength:40,lineWidth:.45,speed:1,direction:-1,arrowLengthRatio:.8,arrowWidthRatio:.9},source:dl()},translucent:function(e){return!0}});var vl=i(724),yl=i.n(vl),gl=i(719),_l=i.n(gl),Cl=i(433),bl=i.n(Cl);Cesium.Material.WallGradientType="WallGradient",Cesium.Material._materialCache.addMaterial(Cesium.Material.WallGradientType,{fabric:{type:Cesium.Material.WallGradientType,uniforms:{color:new Cesium.Color(1,1,1,1),image:Cesium.Material.DefaultImageId,time:0,brightness:1,speed:1,rep:1},source:yl()},translucent:function(e){return!0}}),Cesium.Material.WallFlowType="WallFlow",Cesium.Material._materialCache.addMaterial(Cesium.Material.WallFlowType,{fabric:{type:Cesium.Material.WallFlowType,uniforms:{color:new Cesium.Color(1,1,1,1),image:Cesium.Material.DefaultImageId,time:0,brightness:1,speed:2,rep:1},source:yl()},translucent:function(e){return!0}}),Cesium.Material.WallImgType="WallImg",Cesium.Material._materialCache.addMaterial(Cesium.Material.WallImgType,{fabric:{type:Cesium.Material.WallImgType,uniforms:{color:new Cesium.Color(1,1,1,1),image:Cesium.Material.DefaultImageId,time:0,brightness:1,isTranslucent:!1},source:_l()},translucent:function(e){return e.uniforms.isTranslucent}}),Cesium.Material.WallLineFlowType="WallLineFlow",Cesium.Material._materialCache.addMaterial(Cesium.Material.WallLineFlowType,{fabric:{type:Cesium.Material.WallLineFlowType,uniforms:{color:Cesium.Color.fromCssColorString("rgba(10,231,241,1)"),image:Cesium.Material.DefaultImageId,speed:100,copy:{x:1,y:1}},source:bl()},translucent:function(e){return!0}});var wl=i(586),Pl=i.n(wl);Cesium.Material.CircleWaveMaterialType="CircleWaveMaterial",Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleWaveMaterialType,{fabric:{type:Cesium.Material.CircleWaveMaterialType,uniforms:{color:new Cesium.Color(1,0,0,1),time:1,count:1,gradient:.1},source:Pl()},translucent:function(e){return!0}});var Ol=i(486),xl=i.n(Ol),El=i(671),Al=i.n(El);Cesium.Material.CircleBlurType="CircleBlur",Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleBlurType,{fabric:{type:Cesium.Material.CircleBlurType,uniforms:{color:new Cesium.Color(1,0,0,.7),speed:3},source:xl()},translucent:function(e){return!0}}),Cesium.Material.CircleScanType="CircleScan",Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleScanType,{fabric:{type:Cesium.Material.CircleScanType,uniforms:{color:new Cesium.Color(1,0,0,.7),speed:1},source:Al()},translucent:function(e){return!0}});const kl=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._definitionChanged=new Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=t.color||Cesium.Color.fromBytes(0,255,255,255),this.speed=t.speed||1}return a(e,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(e){return null}},{key:"getValue",value:function(e,t){var i;return t=null!==(i=t)&&void 0!==i?i:{}}},{key:"equals",value:function(e){return this===e}}]),e}();function Tl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ml=function(e){c(i,e);var t=Tl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e.image=Cesium.buildModuleUrl("static/images/lighting.png"),e}return a(i,[{key:"getType",value:function(e){return"PolylineLightingTrail"}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.image=Cesium.Property.getValueOrUndefined(this._image,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(kl);Object.defineProperties(Ml.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),image:Cesium.createPropertyDescriptor("image")});const Rl=Ml;function Sl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var jl=function(e){c(i,e);var t=Sl(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"getType",value:function(e){return"PolylineTrail"}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(kl);Object.defineProperties(jl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const Il=jl;function Ll(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Dl=function(e){c(i,e);var t=Ll(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e._repeat=void 0,e._repeatSubscription=void 0,e.image=r.image,r.repeat||(r.repeat={x:1,y:1}),e.repeat=new Cesium.Cartesian2(r.repeat.x,r.repeat.y),e}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineImageTrailType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.image=Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._image,e._image)&&Cesium.Property.equals(this._repeat,e._repeat)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(kl);Object.defineProperties(Dl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),image:Cesium.createPropertyDescriptor("image"),repeat:Cesium.createPropertyDescriptor("repeat")});const Bl=Dl;function Gl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Hl=function(e){c(i,e);var t=Gl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e.image=Cesium.buildModuleUrl("static/images/lighting.png"),e}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineLightingType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.image=Cesium.Property.getValueOrUndefined(this._image,e),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._image,e._image)}}]),i}(kl);Object.defineProperties(Hl.prototype,{color:Cesium.createPropertyDescriptor("color"),image:Cesium.createPropertyDescriptor("image")});const Nl=Hl;function zl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Fl=Cesium.Color.WHITE,Wl=function(e){c(i,e);var t=zl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._glowPower=void 0,e._glowPowerSubscription=void 0,e._taperPower=void 0,e._taperPowerSubscription=void 0,e.color=r.color,e.glowPower=r.glowPower,e.taperPower=r.taperPower,e}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineGlowType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Fl,t.color),t.glowPower=Cesium.Property.getValueOrDefault(this._glowPower,e,.25,t.glowPower),t.taperPower=Cesium.Property.getValueOrDefault(this._taperPower,e,1,t.taperPower),t}},{key:"equals",value:function(e){return!1}}]),i}(kl);Object.defineProperties(Wl.prototype,{color:Cesium.createPropertyDescriptor("color"),glowPower:Cesium.createPropertyDescriptor("glowPower"),taperPower:Cesium.createPropertyDescriptor("taperPower")});const Ul=Wl;function Vl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ql=function(e){c(i,e);var t=Vl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._time=performance.now(),e.duration=r.duration,e.image=Cesium.buildModuleUrl("static/images/linegradient.png"),e}return a(i,[{key:"getType",value:function(e){return"PolylineGradient"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.image=this.image,t.time=(performance.now()-this._time)%this.duration/this.duration,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&this.duration===e.duration}}]),i}(kl);Object.defineProperties(ql.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration")});const Zl=ql;function Yl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Kl=function(e){c(i,e);var t=Yl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._percent=void 0,e._percentSubscription=void 0,e._gradient=void 0,e._gradientSubscription=void 0,e.percent=r.percent||.03,e.gradient=r.gradient||.1,e}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineFlowType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t.percent=this._percent,t.gradient=this._gradient,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)&&Cesium.Property.equals(this._percent,e._percent)&&Cesium.Property.equals(this._gradient,e._gradient)}}]),i}(kl);Object.defineProperties(Kl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),percent:Cesium.createPropertyDescriptor("percent"),gradient:Cesium.createPropertyDescriptor("gradient")});const Ql=Kl;function Xl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Jl=function(e){c(i,e);var t=Xl(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._percent=void 0,e._gradient=void 0,e.color=r.color,e.speed=r.speed,e.percent=r.percent,e.gradient=r.gradient,e}return a(i,[{key:"getType",value:function(e){return"PolylineVFlywire"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrDefault(this._color,e,Cesium.Color.RED,t.color),t.speed=Cesium.Property.getValueOrDefault(this._speed,e,5,t.speed),t.percent=Cesium.Property.getValueOrDefault(this._percent,e,.1,t.percent),t.gradient=Cesium.Property.getValueOrDefault(this._gradient,e,.01,t.gradient),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)&&Cesium.Property.equals(this._percent,e._percent)&&Cesium.Property.equals(this._gradient,e._gradient)}}]),i}(kl);Object.defineProperties(Jl.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),percent:Cesium.createPropertyDescriptor("percent"),gradient:Cesium.createPropertyDescriptor("gradient")});const $l=Jl;function eu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var tu=function(e){c(i,e);var t=eu(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"getType",value:function(e){return Cesium.Material.PolylineFlickerType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=Cesium.Property.getValueOrUndefined(this._speed,e),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(kl);Object.defineProperties(tu.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const iu=tu;function nu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var ru=Cesium.Color.WHITE,ou=Cesium.Color.fromCssColorString("#0aed8b"),su=function(e){c(i,e);var t=nu(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._color1=void 0,e._color1Subscription=void 0,e._color2=void 0,e._color2Subscription=void 0,e._whiteLength=void 0,e._whiteLengthSubscription=void 0,e._greenLength=void 0,e._greenLengthSubscription=void 0,e._lineWidth=void 0,e._lineWidthSubscription=void 0,e._speed=void 0,e._speedSubscription=void 0,e._direction=void 0,e._directionSubscription=void 0,e._arrowLengthRatio=void 0,e._arrowLengthRatioSubscription=void 0,e._arrowWidthRatio=void 0,e._arrowWidthRatioSubscription=void 0,e.color1=r.color1,e.color2=r.color2,e.whiteLength=r.whiteLength,e.greenLength=r.greenLength,e.lineWidth=r.lineWidth,e.speed=r.speed,e.direction=r.direction,e.arrowLengthRatio=r.arrowLengthRatio,e.arrowWidthRatio=r.arrowWidthRatio,e}return a(i,[{key:"getType",value:function(e){return"DaoHangLine"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color1=Cesium.Property.getValueOrDefault(this._color1,e,ru,t.color1),t.color2=Cesium.Property.getValueOrDefault(this._color2,e,ou,t.color2),t.whiteLength=Cesium.Property.getValueOrDefault(this._whiteLength,e,10,t.whiteLength),t.greenLength=Cesium.Property.getValueOrDefault(this._greenLength,e,40,t.greenLength),t.lineWidth=Cesium.Property.getValueOrDefault(this._lineWidth,e,.45,t.lineWidth),t.speed=Cesium.Property.getValueOrDefault(this._speed,e,1,t.speed),t.direction=Cesium.Property.getValueOrDefault(this._direction,e,-1,t.direction),t.arrowLengthRatio=Cesium.Property.getValueOrDefault(this._arrowLengthRatio,e,.8,t.arrowLengthRatio),t.arrowWidthRatio=Cesium.Property.getValueOrDefault(this._arrowWidthRatio,e,.9,t.arrowWidthRatio),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color1,e._color1)&&Cesium.Property.equals(this._color2,e._color2)&&Cesium.Property.equals(this._whiteLength,e._whiteLength)&&Cesium.Property.equals(this._greenLength,e._greenLength)&&Cesium.Property.equals(this._lineWidth,e._lineWidth)&&Cesium.Property.equals(this._speed,e._speed)&&Cesium.Property.equals(this._direction,e._direction)&&Cesium.Property.equals(this._arrowLengthRatio,e._arrowLengthRatio)&&Cesium.Property.equals(this._arrowWidthRatio,e._arrowWidthRatio)}}]),i}(kl);Object.defineProperties(su.prototype,{color1:Cesium.createPropertyDescriptor("color1"),color2:Cesium.createPropertyDescriptor("color2"),whiteLength:Cesium.createPropertyDescriptor("whiteLength"),greenLength:Cesium.createPropertyDescriptor("greenLength"),lineWidth:Cesium.createPropertyDescriptor("lineWidth"),speed:Cesium.createPropertyDescriptor("speed"),direction:Cesium.createPropertyDescriptor("direction"),arrowLengthRatio:Cesium.createPropertyDescriptor("arrowLengthRatio"),arrowWidthRatio:Cesium.createPropertyDescriptor("arrowWidthRatio")});const au=su;function lu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var uu=function(e){c(i,e);var t=lu(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"getType",value:function(e){return Cesium.Material.CircleBlurType}},{key:"getValue",value:function(e,t){var i;return(t=null!==(i=t)&&void 0!==i?i:{}).color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(kl);Object.defineProperties(uu.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const cu=uu;function hu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var fu=function(e){c(i,e);var t=hu(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),t.call(this,e)}return a(i,[{key:"getType",value:function(e){return Cesium.Material.CircleScanType}},{key:"getValue",value:function(e,t){return t||(t={}),t.color=Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)}}]),i}(kl);Object.defineProperties(fu.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const pu=fu;var mu=function(){function e(t){var i,r,o,s;n(this,e),t=t||{},this._definitionChanged=new Cesium.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=t.baseWaterColor||new Cesium.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=t.blendColor||new Cesium.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=t.specularMap||Cesium.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=t.normalMap||Cesium.buildModuleUrl("static/images/water/waterNormalsSmall.jpg"),this.frequency=null!==(i=t.frequency)&&void 0!==i?i:1e3,this.animationSpeed=null!==(r=t.animationSpeed)&&void 0!==r?r:.01,this.amplitude=null!==(o=t.amplitude)&&void 0!==o?o:10,this.specularIntensity=null!==(s=t.specularIntensity)&&void 0!==s?s:.5}return a(e,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(e){return Cesium.Material.WaterType}},{key:"getValue",value:function(e,t){return t||(t={}),t.baseWaterColor=Cesium.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=Cesium.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=Cesium.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=Cesium.Property.getValueOrUndefined(this._normalMap,e),t.frequency=this.frequency,t.animationSpeed=this.animationSpeed,t.amplitude=this.amplitude,t.specularIntensity=this.specularIntensity,t}},{key:"equals",value:function(t){return this===t||t instanceof e&&Cesium.Property.equals(this._baseWaterColor,t._baseWaterColor)}}]),e}();Object.defineProperties(mu.prototype,{baseWaterColor:Cesium.createPropertyDescriptor("baseWaterColor"),blendColor:Cesium.createPropertyDescriptor("blendColor"),specularMap:Cesium.createPropertyDescriptor("specularMap"),normalMap:Cesium.createPropertyDescriptor("normalMap")});const du=mu;function vu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var yu=function(e){c(i,e);var t=vu(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,r.direction&&1==r.direction?e.image=Cesium.buildModuleUrl("static/images/wallgradients.png"):e.image=Cesium.buildModuleUrl("static/images/wall1.png"),e.duration=r.duration,e.brightness=r.brightness?r.brightness:1,e._time=(new Date).getTime(),e}return a(i,[{key:"getType",value:function(e){return"WallGradient"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.image=this.image,this.duration&&(t.time=((new Date).getTime()-this._time)%this.duration/this.duration),t.brightness=this.brightness,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(kl);Object.defineProperties(yu.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness")});const gu=yu;function _u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Cu=function(e){c(i,e);var t=_u(i);function i(){var e,r,o,s,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(s=t.call(this,a)).duration=null!==(e=a.duration)&&void 0!==e?e:1e3,s.count=null!==(r=a.count)&&void 0!==r?r:2,s.color=a.color,s._time=(new Date).getTime(),s.count<=0&&(s.count=1),s.gradient=null!==(o=a.gradient)&&void 0!==o?o:.1,0===s.gradient&&(s.gradient=0),s.gradient>1&&(s.gradient=1),s}return a(i,[{key:"getType",value:function(e){return"CircleWaveMaterial"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.time=((new Date).getTime()-this._time)%this.duration/this.duration,t.count=this.count,t.gradient=1+10*(1-this.gradient),t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(kl);Object.defineProperties(Cu.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration"),count:Cesium.createPropertyDescriptor("count")});const bu=Cu;function wu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Pu=function(e){c(i,e);var t=wu(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._color=void 0,e._brightness=r.brightness?r.brightness:1,e._imageSubscription=void 0,e.image=r.image||Cesium.buildModuleUrl("static/images/wall2.png"),e.duration=r.duration,e.trailImage=r.trailImage,e.brightness=r.brightness?r.brightness:1,e.speed=r.speed?r.speed:3,e.rep=r.rep?r.rep:4,e.color=r.color,e._time=(new Date).getTime(),e}return a(i,[{key:"getType",value:function(e){return"WallFlow"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.image=this.image,this.duration&&(t.time=((new Date).getTime()-this._time)%this.duration/this.duration),t.brightness=Cesium.Property.getValueOrClonedDefault(this._brightness,e,2,t.brightness),t.speed=this.speed,t.rep=this.rep,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(kl);Object.defineProperties(Pu.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness"),speed:Cesium.createPropertyDescriptor("speed"),rep:Cesium.createPropertyDescriptor("rep")});const Ou=Pu;function xu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Eu=function(e){c(i,e);var t=xu(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e.image=r.image?r.image:Cesium.buildModuleUrl("static/images/walltest.png"),e.duration=r.duration,e.brightness=r.brightness?r.brightness:1,e._time=(new Date).getTime(),e.isTranslucent=!!r.isTranslucent&&r.isTranslucent,e.color=r.color,e}return a(i,[{key:"getType",value:function(e){return"WallImg"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.image=this.image,this.duration&&(t.time=((new Date).getTime()-this._time)%this.duration/this.duration),t.brightness=this.brightness,t.isTranslucent=this.isTranslucent,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(kl);Object.defineProperties(Eu.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness")});const Au=Eu;function ku(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Tu=function(e){c(i,e);var t=ku(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._image=void 0,e._imageSubscription=void 0,e.image=Cesium.buildModuleUrl("static/images/wallline.png"),e.speed=r.speed?r.speed:100,e.copy=r.copy?r.copy:{x:1,y:1},e.color=r.color?r.color:Cesium.Color.fromCssColorString("rgba(40,227,243,1)"),e._time=(new Date).getTime(),e}return a(i,[{key:"getType",value:function(e){return"WallLineFlow"}},{key:"getValue",value:function(e,t){return Cesium.defined(t)||(t={}),t.color=this.color,t.image=this.image,t.speed=this.speed,t.copy=this.copy,t}},{key:"equals",value:function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)}}]),i}(kl);Object.defineProperties(Tu.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),copy:Cesium.createPropertyDescriptor("copy")});const Mu=Tu;function Ru(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Su=function(e){c(i,Cesium.PolylineCollection);var t=Ru(i);function i(e){return n(this,i),t.call(this,e)}return a(i,[{key:"update",value:function(e){var t=Cesium.PolylineCollection.prototype.update,i=e.morphTime;e.morphTime=0,t.call(this,e),e.morphTime=i}},{key:"createPolyline",value:function(e,t){var i,n,r;if(!Array.isArray(e))throw new Cesium.DeveloperError("必须传入positions数组!");if(!(e.length<2)){var o=null!==(i=t.loop)&&void 0!==i&&i,s=null!==(n=t.width)&&void 0!==n?n:2,a=new Cesium.Material({fabric:{type:"Color",uniforms:{color:new Cesium.Color(1,1,1,1)}}}),l=null!==(r=t.material)&&void 0!==r?r:a;if(e.length>=2){var u=e.map((function(e){return Cesium.Cartesian3.clone(e)}));return this.add({material:l,positions:u,width:s,loop:o})}}}}]),i}();function ju(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Iu(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Iu(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Iu(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Lu="measure-close-btn",Du="__measCloseBtnCssInjected";const Bu=function(){function e(t){if(n(this,e),!t)throw new Cesium.DeveloperError("viewer 参数是必须的");this.viewer=t,this._items=new Map,this._preRenderBound=!1,this._preRenderCb=this._onPreRender.bind(this),this._scratch=new Cesium.Cartesian2}return a(e,[{key:"_ensureCss",value:function(){if("undefined"!=typeof window&&!window[Du]&&document&&"function"==typeof document.createElement){var e="\n .".concat(Lu," {\n position: absolute;\n width: 18px;\n height: 18px;\n line-height: 16px;\n border-radius: 50%;\n background: rgba(255, 77, 79, 0.92);\n color: #fff;\n font-size: 13px;\n font-weight: 700;\n text-align: center;\n cursor: pointer;\n z-index: 10001;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n user-select: none;\n border: 1px solid #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n font-family: Arial, sans-serif;\n }\n .").concat(Lu,":hover { background: #ff7875; }\n "),t=document.createElement("style");t.setAttribute("data-anosgis-measure-close-btn",""),t.textContent=e,document.head&&document.head.appendChild(t),window[Du]=!0}}},{key:"add",value:function(e,t,i){var n=this;if(e&&t){this._items.has(e)&&this.remove(e),this._ensureCss();var r=this.viewer.container||this.viewer.scene&&this.viewer.scene.canvas&&this.viewer.scene.canvas.parentElement;if(r){var o=ve.create("div",Lu,r);o.innerHTML="×",o.title="删除该测量";var s=function(e){return e.stopPropagation()};o.addEventListener("mousedown",s),o.addEventListener("dblclick",s),o.addEventListener("click",(function(t){t.stopPropagation();try{"function"==typeof i&&i()}catch(e){console.error("[FloatingCloseBtn] onClose error:",e)}n.remove(e)})),this._items.set(e,{btn:o,anchor:t}),this._ensurePreRender()}else console.warn("FloatingCloseButtonManager: viewer.container 不可用,无法挂载按钮")}}},{key:"remove",value:function(e){var t=this._items.get(e);if(t){try{t.btn&&t.btn.parentNode&&t.btn.parentNode.removeChild(t.btn)}catch(e){}this._items.delete(e),0===this._items.size&&this._detachPreRender()}}},{key:"removeAll",value:function(){for(var e=0,t=Array.from(this._items.keys());e<t.length;e++){var i=t[e];this.remove(i)}}},{key:"_ensurePreRender",value:function(){this._preRenderBound||this.viewer&&this.viewer.scene&&this.viewer.scene.preRender&&(this.viewer.scene.preRender.addEventListener(this._preRenderCb),this._preRenderBound=!0)}},{key:"_detachPreRender",value:function(){if(this._preRenderBound){try{this.viewer.scene.preRender.removeEventListener(this._preRenderCb)}catch(e){}this._preRenderBound=!1}}},{key:"_onPreRender",value:function(){if(0!==this._items.size){var e=this.viewer.scene;if(e){var t,i=ju(this._items);try{for(i.s();!(t=i.n()).done;){var n=fe(t.value,2),r=n[0],o=n[1];if(o.btn.isConnected){var s=e.cartesianToCanvasCoordinates(o.anchor,this._scratch);s?(o.btn.style.left=s.x+6+"px",o.btn.style.top=s.y+6+"px",o.btn.style.display="flex"):o.btn.style.display="none"}else this._items.set(r,o),this._items.delete(r)}}catch(e){i.e(e)}finally{i.f()}}}else this._detachPreRender()}},{key:"dispose",value:function(){this.removeAll(),this._detachPreRender()}}]),e}();function Gu(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Hu(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Hu(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Hu(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}const Nu=function(){function e(t,i){var r,o,s,a,l,u,c;if(n(this,e),!t)throw new Cesium.DeveloperError("viewer参数是必须的!");t=t.nativeObjCesium||t,this.outline=null!==(r=i.outline)&&void 0!==r&&r,this.justDraw=i.justDraw||!1,this.pointColor=i.pointColor||Cesium.Color.RED,this.pointSize=i.pointSize||6,this.outlineColor=i.outlineColor||Cesium.Color.CHARTREUSE,this.outlineWidth=i.outlineWidth||3,this.billboard=null!==(o=i.billboard)&&void 0!==o?o:void 0,this.pointParas={color:this.pointColor,size:this.pointSize,outlineColor:this.outlineColor,outlineWidth:this.outlineWidth,show:null===(s=i.pointShow)||void 0===s||s,billboard:this.billboard,justDraw:this.justDraw},this.tempPointParas={size:i.tempPoint_size||10,color:i.tempPoint_color||Cesium.Color.YELLOW,show:null===(a=i.tempPoint_show)||void 0===a||a,justDraw:!(null!==(l=i.tempPoint_showLabel)&&void 0!==l&&l)},this.lineColor=i.lineColor||Cesium.Color.CHARTREUSE,this.lineWidth=i.lineWidth||3,this.showToolTip=null===(u=i.showToolTip)||void 0===u||u,this.lastLeftClickPoint=void 0,this.viewer=t,this.ismeare=i.ismeare||!1,this.positions=[],this.cartesian=null,this.mouseHandler=null,this.onCompleted=i.onCompleted,this._pointLabels=[],this._totalLengthPointLabel=void 0,this._originCursor=void 0,this.polygonPoint=null,this.poly=null,this.showToolTip&&this._addToolTip();var h=Ee.createPointLabel(this.viewer,new Cesium.Cartesian3(0,0,0),"",Ee.drawEntityNames().tempPoint,this.tempPointParas);h.point.show=!1,h.show=!1,this._tempPoint=h,this.clampToGround=null!==(c=i.clampToGround)&&void 0!==c&&c,this._preTime=Cesium.JulianDate.now(),this._currentSessionId=null,this._sessions={},this._enableFloatingCloseButton=!(i&&!1===i.enableFloatingCloseButton),this._closeBtnManager=null}return a(e,[{key:"_getCloseAnchor",value:function(e){return e?Array.isArray(e)&&e.length>0?e[e.length-1]:e:null}},{key:"_showFloatingCloseBtn",value:function(e,t){var i=this;if(this._enableFloatingCloseButton&&e){this._closeBtnManager||(this._closeBtnManager=new Bu(this.viewer));var n=this._getCloseAnchor(t);n&&this._closeBtnManager.add(e,n,(function(){i._clearBySessionId(e)}))}}},{key:"_removeAllFloatingCloseBtns",value:function(){this._closeBtnManager&&this._closeBtnManager.removeAll()}},{key:"destroy",value:function(){this._removeAllFloatingCloseBtns(),this._closeBtnManager&&(this._closeBtnManager.dispose(),this._closeBtnManager=null);try{this.end()}catch(e){}}},{key:"_beginSession",value:function(){var e;return e="undefined"!=typeof crypto&&crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"session_".concat(Date.now(),"_").concat(Math.random().toString(36).slice(2,8)),this._currentSessionId=e,this._sessions[e]={entities:[],primitives:[],labels:[]},e}},{key:"_beginSubSession",value:function(){var e="undefined"!=typeof crypto&&crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"sub_".concat(Date.now(),"_").concat(Math.random().toString(36).slice(2,8));return this._sessions[e]={entities:[],primitives:[],labels:[]},e}},{key:"_registerEntity",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"entities",i=(arguments.length>2?arguments[2]:void 0)||this._currentSessionId;i&&this._sessions[i]&&this._sessions[i][t].push(e)}},{key:"_clearBySessionId",value:function(e){var t=this._sessions[e];if(t){if(this.polyLinePrimitives&&t.primitives&&t.primitives.length){var i,n=Gu(t.primitives);try{for(n.s();!(i=n.n()).done;){var r=i.value;try{this.polyLinePrimitives.remove(r)}catch(a){}}}catch(e){n.e(e)}finally{n.f()}}if(t.entities&&t.entities.length){var o,s=Gu(t.entities);try{for(s.s();!(o=s.n()).done;){var a=o.value;try{this.viewer.entities.remove(a)}catch(a){}}}catch(e){s.e(e)}finally{s.f()}}if(t.labels&&t.labels.length){var l,u=Gu(t.labels);try{for(u.s();!(l=u.n()).done;){var c=l.value;try{Ee.removePointLabel(c)}catch(a){}}}catch(e){u.e(e)}finally{u.f()}}delete this._sessions[e]}}},{key:"clearBySessionId",value:function(e){this._clearBySessionId(e),this._closeBtnManager&&this._closeBtnManager.remove(e)}},{key:"_isMouseNewPosition",value:function(){var e,t=this.viewer.mouseSensitivity||(null===(e=this.viewer.wrap)||void 0===e?void 0:e.mouseSensitivity);if(!t)return!0;var i=Cesium.JulianDate.now();return!(Cesium.JulianDate.secondsDifference(i,this._preTime)<t)&&(this._preTime=i,!0)}},{key:"_addToolTip",value:function(){this.tooltip||(0!=this.showToolTip?(this.tooltip=ve.create("div","as-measure",this.viewer.container),this.tooltip.style.borderRadius="5px",this.tooltip.style.position="absolute",this.tooltip.style.color="#c3cbd3",this.tooltip.style.background="#336666",this.tooltip.innerHTML=this.tooltip.innerHTML||"<div>左键单击选点,双击结束绘制,右键取消</div>",this.tooltip.style.display="none",window._drawToolTips=window._drawToolTips||[],window._drawToolTips.push(this.tooltip)):this._removeToolTips())}},{key:"_removeToolTips",value:function(){window._drawToolTips&&window._drawToolTips.forEach((function(e){ve.remove(e)})),this.tooltip=void 0,window._drawToolTips=[]}},{key:"_notrackPos",value:function(){this.viewer.selectedEntity=void 0,this.viewer.trackedEntity=void 0}},{key:"_removeFloatPoint",value:function(e){var t=this,i=e.findIndex((function(e){return e.equals(t.lastLeftClickPoint)}));return i>-1&&e.splice(i+1,e.length-i-1),e}},{key:"_removeSamePoint",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(e.length<2)return e;for(var t=0;t<e.length-1;t++){var i=e[t],n=e[t+1];"function"==typeof i.equals&&i.equals(n)&&(console.log("element",i),console.log("element",n),e.splice(t,1),t--)}return e}},{key:"startDraw",value:function(){}},{key:"clearAll",value:function(){var e=this;Object.keys(this._sessions).forEach((function(t){return e._clearBySessionId(t)})),this._removeAllFloatingCloseBtns(),this._pointLabels=[],this.end()}},{key:"clear",value:function(e){var t=this;if(Object.keys(this._sessions).forEach((function(e){return t._clearBySessionId(e)})),this._removeAllFloatingCloseBtns(),e){for(var i=Object.values(e),n=0;n<this.viewer.entities.values.length;n++){var r=this.viewer.entities.values[n];i.indexOf(r.name)>-1&&(this.viewer.entities.removeById(r.id),n--)}this._removeToolTips()}else this._removeToolTips()}},{key:"end",value:function(){this._removeToolTips(),this.ismeare=!1,this.positions=[],this.poly=null,this.cartesian=null,this.tooltip&&(this.tooltip.style.display="none"),this.mouseHandler&&(this.mouseHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK),this.mouseHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),this.mouseHandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.mouseHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK),this.mouseHandler.destroy(),this.mouseHandler=null),this._totalLengthPointLabel=void 0,this.viewer.scene.canvas.style.cursor="",this.viewer.selectedEntity=null,this.viewer.trackedEntity=null,"function"==typeof this._preUpdateListener&&(this._preUpdateListener(),this._preUpdateListener=void 0),this._tempPoint&&(this._tempPoint.show=!1,this._tempPoint.point.show=!1),this.polygonPoint=null}},{key:"updateNoDepthTestPolyline",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this;void 0!==this._polyline&&this._polylineCollection&&(this._polylineCollection.remove(this._polyline),this._polyline=void 0),t._polylineCollection&&(t._polyline=t._polylineCollection.createPolyline(t.positions,{loop:e,width:t.lineWidth,material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:t.lineColor}}})}))}},{key:"initNoDepthTestPolyline",value:function(){this._polylineCollection||(this._polyline=void 0,this._polylineCollection=new Su,this.viewer.scene.primitives.add(this._polylineCollection))}},{key:"clearNoDepthTestPolyline",value:function(){this._polylineCollection&&(this._polyline=void 0,this.viewer.scene.primitives.remove(this._polylineCollection),this._polylineCollection=this._polylineCollection&&!this._polylineCollection.isDestroyed()&&this._polylineCollection.destroy(),this._polylineCollection=void 0)}},{key:"createPolylinePrimitive",value:function(e,t,i){if(Array.isArray(e)&&!(e.length<2))return t||(t=Cesium.Color.RED),new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:e,width:i||2,vertexFormat:Cesium.PolylineMaterialAppearance.VERTEX_FORMAT})}),appearance:new Cesium.PolylineMaterialAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:t||new Cesium.Color(1,1,1,1)}}}),renderState:new Cesium.RenderState({polygonOffset:{enabled:!0,factor:-100,units:-100},depthTest:{enabled:!0,func:Cesium.WebGLConstants.LEQUAL}})}),depthFailAppearance:new Cesium.PolylineMaterialAppearance({material:new Cesium.Material({fabric:{type:"PolylineDash",uniforms:{color:t||new Cesium.Color(1,1,1,1)}}})}),allowPicking:!1});console.log("点数少于2,无法绘制线!")}},{key:"_addPolyLinePrimitives",value:function(){this.polyLinePrimitives||(this.polyLinePrimitives=new Cesium.PrimitiveCollection,this.viewer.scene.primitives.add(this.polyLinePrimitives))}},{key:"_clearPolyLinePrimitives",value:function(){this.polyLinePrimitives&&(this.viewer.scene.primitives.remove(this.polyLinePrimitives),this.polyLinePrimitives=this.polyLinePrimitives&&!this.polyLinePrimitives.isDestroyed()&&this.polyLinePrimitives.destroy(),this.polyLinePrimitives=void 0)}},{key:"_getObjectsToExclude",value:function(){var e=[];this.polyLinePrimitives&&e.push(this.polyLinePrimitives),this._polyline&&e.push(this._polyline),this._polylineCollection&&e.push(this._polylineCollection);var t=this.viewer.entities.values.filter((function(e){return Ee.drawEntityNames()[e.name]}));return e.push.apply(e,De(t)),e}}]),e}();function zu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Fu=function(e){c(i,e);var t=zu(i);function i(e,r){var o;return n(this,i),r.tempPoint_showLabel=null===(o=r.tempPoint_showLabel)||void 0===o||o,t.call(this,e,r)}return a(i,[{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,Ee.drawEntityNames_Point()),this.end()}},{key:"_addToolTip",value:function(){N(p(i.prototype),"_addToolTip",this).call(this),this.tooltip&&(this.tooltip.innerHTML="<p>左键单击选点,右键结束</p>")}},{key:"startDraw",value:function(){var e=this;this.end(),this._addToolTip(),this.ismeare=!0;var t=this._beginSession(),i=this.ismeare,n=this.viewer;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(n.scene.canvas);var r=this.mouseHandler,o=this;this._originCursor=n.scene.canvas.style.cursor,n.scene.canvas.style.cursor="crosshair";var s=new Cesium.Cartesian2,a=!1,l=Cesium.JulianDate.now();r.setInputAction((function(r){if(n.selectedEntity=null,n.trackedEntity=null,o._tempPoint.point.show=!1,i){var a=Ee.pickPosition(n,s,e._getObjectsToExclude());if(a){var l=Ee.getPointLableString(a),u=Ee.createPointLabel(n,a,l,Ee.drawEntityNames().drawPoint,e.pointParas);o._pointLabels.push(u),o._registerEntity(u,"labels"),o._tempPoint.show=!1;var c=o._beginSubSession();o._registerEntity(u,"labels",c),o._showFloatingCloseBtn(c,a),o.onCompleted&&o.onCompleted(a,t)}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),r.setInputAction((function(e){o.end()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK),r.setInputAction((function(e){o.end()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),o.mouseHandler.setInputAction((function(e){var t=Cesium.JulianDate.now();Cesium.JulianDate.secondsDifference(t,l)<.03||(l=t,o.tooltip&&(o.justDraw||(o.tooltip.style.display="block"),o.tooltip.style.left=e.endPosition.x+25+"px",o.tooltip.style.top=e.endPosition.y-30+"px"),a=!0,s=Cesium.Cartesian2.clone(e.endPosition,s))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.tempPointParas.show&&(this._preUpdateListener=n.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&a){a=!1;var t=Ee.pickPosition(n,s,e._getObjectsToExclude());if(t)if(o._tempPoint.show=!0,o._tempPoint.point.show=!0,o.justDraw)Ee.setPointPosition(o._tempPoint,t);else{var i=Ee.getPointLableString(t);Ee.setPointLabel(o._tempPoint,t,i)}else o._tempPoint.show=!1,o._tempPoint.point.show=!1}})))}}]),i}(Nu);function Wu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Uu=function(e){c(i,e);var t=Wu(i);function i(e,r){var o,s,a;return n(this,i),(a=t.call(this,e,r)).perPositionHeight=null===(o=r.perPositionHeight)||void 0===o||o,a.fillColor=r.fillColor||new Cesium.Color(59,179,249,.5),a.fill=null===(s=r.fill)||void 0===s||s,a}return a(i,[{key:"_getCloseAnchor",value:function(e){if(!e||0===e.length)return null;Cesium.PolygonPipeline.removeDuplicates;var t=Cesium.BoundingSphere.fromPoints(e);return t?t.center:e[e.length-1]}},{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,Ee.drawEntityNames_Polygon()),N(p(i.prototype),"clearNoDepthTestPolyline",this).call(this),N(p(i.prototype),"_clearPolyLinePrimitives",this).call(this),this.end()}},{key:"_removeFloatPoint",value:function(e){return N(p(i.prototype),"_removeFloatPoint",this).call(this,e),e.length<3&&this.clear(),!this.justDraw&&e.length>=3&&this.showAreaLabel(),e}},{key:"startDraw",value:function(){var e=this;this.end(),this._addToolTip(),this._addPolyLinePrimitives(),this.initNoDepthTestPolyline();var t=this.tooltip;this.ismeare=!0;var i=this._beginSession(),n=this.ismeare,r=this.viewer,o=this.cartesian,s=this.positions;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(r.scene.canvas);var a=this.mouseHandler,l=this.poly,u=this;this._originCursor=r.scene.canvas.style.cursor,r.scene.canvas.style.cursor="crosshair";var c=new Cesium.Cartesian2,h=!1;this._preUpdateListener=r.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&h){if(h=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=c.x+25+"px",e.tooltip.style.top=c.y-25+"px"),!(o=Ee.pickPosition(r,c,e._getObjectsToExclude())))return e._tempPoint.show=!1,void(e._tempPoint.point.show=!1);if(e._tempPoint.show=!0,e._tempPoint.point.show=!0,e.justDraw)Ee.setPointPosition(e._tempPoint,o);else{var t=Ee.getPointLableString(o);Ee.setPointLabel(e._tempPoint,o,t)}if(Cesium.defined(l))null!=o&&(s.pop(),s.push(o));else{l=new Object;var i=new Cesium.CallbackProperty((function(){return s.length>2?new Cesium.PolygonHierarchy(s):null}),!1),n=new Cesium.CallbackProperty((function(){if(s.length>1){var e=[].concat(s),t=s[0];return e.push(t),e}return null}),!1),a={name:Ee.drawEntityNames().drawpolygon,polygon:{hierarchy:i,fill:u.fill,material:u.fillColor,perPositionHeight:u.perPositionHeight,heightReference:u.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}};e.clampToGround&&(a.polyline={positions:n,width:u.lineWidth,material:u.lineColor,clampToGround:u.clampToGround});var f=r.entities.add(a);u._registerEntity(f)}!e.clampToGround&&e.updateNoDepthTestPolyline(),s.length>2&&!u.justDraw&&u.showAreaLabel()}})),a.setInputAction((function(e){n&&(h=!0,c=Cesium.Cartesian2.clone(e.endPosition,c))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),a.setInputAction((function(i){if(e._tempPoint.point.show=!1,e._tempPoint.show=!1,n&&o&&n){if(t.style.display="none",!o)return;0==s.length&&s.push(o.clone()),s.push(o),u.lastLeftClickPoint=s[s.length-1];var a=r.entities.add({name:Ee.drawEntityNames().drawpolygonpoint,position:s[s.length-1],point:{pixelSize:u.pointSize,color:u.pointColor,disableDepthTestDistance:1e9}});u._registerEntity(a)}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),a.setInputAction((function(t){if(u._notrackPos(),(s=u._removeSamePoint(s)).length<3)u.end();else{var n=[].concat(s),r=s[0];if(n.push(r),!e.clampToGround){var o=u.createPolylinePrimitive(n,u.lineColor,u.lineWidth);o&&u.polyLinePrimitives&&(u.polyLinePrimitives.add(o),u._registerEntity(o,"primitives")),u.clearNoDepthTestPolyline()}u._showFloatingCloseBtn(i,s),u.onCompleted&&u.onCompleted(n,i),u.end()}}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),a.setInputAction((function(t){if(u._notrackPos(),s=u._removeFloatPoint(s),(s=u._removeSamePoint(s)).length<3)u.end();else{var n=[].concat(s),r=s[0];if(n.push(r),!e.clampToGround){var o=u.createPolylinePrimitive(n,u.lineColor,u.lineWidth);o&&u.polyLinePrimitives&&(u.polyLinePrimitives.add(o),u._registerEntity(o,"primitives")),u.clearNoDepthTestPolyline()}u._showFloatingCloseBtn(i,s),u.onCompleted&&u.onCompleted(n,i),u.end()}}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"showAreaLabel",value:function(){var e=Ee.getPolygonArea(this.positions),t="面积:"+(e=e||0).toFixed(2)+"平方米";e>=1e4&&(t="面积:"+(e/1e6).toFixed(2)+"平方千米"),e>=1e10&&(t="面积:"+(e/1e10).toFixed(2)+"万平方千米");var i=Cesium.BoundingSphere.fromPoints(this.positions);void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=Ee.createPointLabel(this.viewer,i.center,t,Ee.drawEntityNames().drawpolygon),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):Ee.setPointLabel(this._totalLengthPointLabel,i.center,t)}}]),i}(Nu);function Vu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const qu=function(e){c(i,e);var t=Vu(i);function i(e,r){return n(this,i),t.call(this,e,r)}return a(i,[{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,Ee.drawEntityNames_Polyline()),N(p(i.prototype),"clearNoDepthTestPolyline",this).call(this),N(p(i.prototype),"_clearPolyLinePrimitives",this).call(this),this.end()}},{key:"_removeFloatPoint",value:function(e){return N(p(i.prototype),"_removeFloatPoint",this).call(this,e),e.length<2&&this.clear(),e.length>=2&&this.viewer.entities.remove(this._pointLabels_son.pop()),!this.justDraw&&this.showLengthLabel(e),e}},{key:"startDraw",value:function(){var e=this;this._addPolyLinePrimitives(),this.end(),this._addToolTip(),this.initNoDepthTestPolyline(),this._pointLabels_son=[],this.ismeare=!0;var t=this._beginSession(),i=this.ismeare,n=this.viewer,r=this.cartesian,o=this.positions;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(n.scene.canvas);var s=this.mouseHandler,a=this;this._originCursor=n.scene.canvas.style.cursor,n.scene.canvas.style.cursor="crosshair";var l=new Cesium.Cartesian2,u=!1;this._preUpdateListener=n.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&u){if(u=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=l.x+25+"px",e.tooltip.style.top=l.y-25+"px"),!(r=Ee.pickPosition(n,l,e._getObjectsToExclude())))return a._tempPoint.show=!1,void(a._tempPoint.point.show=!1);if(a._tempPoint.show=!0,a._tempPoint.point.show=!0,a.justDraw)Ee.setPointPosition(a._tempPoint,r);else{var t=Ee.getPointLableString(r);Ee.setPointLabel(a._tempPoint,r,t)}o.length>=2&&(Cesium.defined(e.poly)?(o.pop(),o.push(r)):e.poly=new Object,!a.justDraw&&a.showLengthLabel(o)),e.updateNoDepthTestPolyline(!1)}})),s.setInputAction((function(e){i&&(u=!0,l=Cesium.Cartesian2.clone(e.endPosition,l))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),s.setInputAction((function(t){if(a._tempPoint.point.show=!1,a._tempPoint.show=!1,i&&r){0==o.length&&o.push(r.clone()),o.push(r.clone()),e.lastLeftClickPoint=o[o.length-1];var s=n.entities.add({name:Ee.drawEntityNames().drawpolylinepoint,position:r,point:{pixelSize:e.pointSize,color:e.pointColor,outlineColor:e.outlineColor,outlineWidth:e.outlineWidth,disableDepthTestDistance:1e9}});e._registerEntity(s),a._tempPoint.show=!1}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),s.setInputAction((function(i){if(a._notrackPos(),o.length<2)a.end();else{if(e.clampToGround)new c(o)._init();else{var n=a.createPolylinePrimitive(a._removeSamePoint(o),a.lineColor,a.lineWidth);n&&a.polyLinePrimitives&&(a.polyLinePrimitives.add(n),a._registerEntity(n,"primitives"))}a.clearNoDepthTestPolyline();var r=a._removeSamePoint(o);a._showFloatingCloseBtn(t,r),a.onCompleted&&a.onCompleted(r,t),a.end()}}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),s.setInputAction((function(i){if(a._notrackPos(),o=e._removeFloatPoint(o),(o=e._removeSamePoint(o)).length<2)a.end();else{if(e.clampToGround)new c(o)._init();else{var n=a.createPolylinePrimitive(a._removeSamePoint(o),a.lineColor,a.lineWidth);n&&a.polyLinePrimitives&&(a.polyLinePrimitives.add(n),a._registerEntity(n,"primitives"))}a.clearNoDepthTestPolyline();var r=a._removeSamePoint(o);a._showFloatingCloseBtn(t,r),a.onCompleted&&a.onCompleted(r,t),a.end()}}),Cesium.ScreenSpaceEventType.RIGHT_CLICK);var c=function(){function e(e){this.options={name:Ee.drawEntityNames().drawpolyline,polyline:{width:a.lineWidth,arcType:Cesium.ArcType.RHUMB,clampToGround:a.clampToGround,material:a.lineColor,depthFailMaterial:new Cesium.PolylineDashMaterialProperty({color:a.lineColor})}},this.positions=e,this._init()}return e.prototype._init=function(){var e=this;this.options.polyline.positions=new Cesium.CallbackProperty((function(){return e.positions}),!1),this.polyLine=n.entities.add(this.options);try{a._registerEntity&&a._registerEntity(this.polyLine)}catch(e){}},e.prototype.remove=function(){this.polyLine&&n.entities.remove(this.polyLine),this.polyLine=void 0},e}()}},{key:"showEachsegLengthLabel",value:function(e){var t=this,i=e.length;Ee.createPointLabelsCallback(e,(function(e,i,n,r){void 0===t._pointLabels_son[e]?(t._pointLabels_son[e]=Ee.createPointLabel(t.viewer,n,r),t._pointLabels_son[e].point.show=!1,t._registerEntity(t._pointLabels_son[e],"labels")):Ee.setPointLabel(t._pointLabels_son[e],n,r),t._pointLabels_son[e].show=!0}));for(var n=i-1<0?0:i-1;n<this._pointLabels_son.length;++n)this._pointLabels_son[n].show=!1}},{key:"_showStartPointLabel",value:function(e){if(e&&!(e.length<1)){var t=e[0];void 0===this._startPointLabel?(this._startPointLabel=Ee.createPointLabel(this.viewer,t,"起点"),this._startPointLabel.point.show=!1,this._registerEntity(this._startPointLabel,"labels")):Ee.setPointLabel(this._startPointLabel,t,"起点")}}},{key:"showTotalLength",value:function(e){var t=Ee.getPolylineDistance(e),i="总长:"+t.toFixed(2)+"米";t>=1e3&&(i="总长:"+(t/1e3).toFixed(2)+"千米");var n=e[e.length-1];void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=Ee.createPointLabel(this.viewer,n,i),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):Ee.setPointLabel(this._totalLengthPointLabel,n,i)}},{key:"showLengthLabel",value:function(e){this.showEachsegLengthLabel(e),this.showTotalLength(e),e&&e.length>=1&&this._showStartPointLabel(e)}},{key:"updatePolyLine",value:function(){}}]),i}(Nu);function Zu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Yu=function(e){c(i,e);var t=Zu(i);function i(e,r){var o,s,a;return n(this,i),(a=t.call(this,e,r)).CLAMP_TO_GROUND=r.CLAMP_TO_GROUND||!0,a.fillColor=r.fillColor||Cesium.Color.YELLOW.withAlpha(.5),a.fill=null===(o=r.fill)||void 0===o||o,a.showPoint=null===(s=r.showPoint)||void 0===s||s,a}return a(i,[{key:"_getCloseAnchor",value:function(e){if(!e||0===e.length)return null;var t=Cesium.BoundingSphere.fromPoints(e);return t?t.center:e[e.length-1]}},{key:"_addToolTip",value:function(){N(p(i.prototype),"_addToolTip",this).call(this),this.tooltip&&(this.tooltip.innerHTML="<div>左键单击选点</div>")}},{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,Ee.drawEntityNames_Rectangle()),this.end()}},{key:"_removeFloatPoint",value:function(e){return N(p(i.prototype),"_removeFloatPoint",this).call(this,e),e.length<2&&this.clear(),e}},{key:"startDraw",value:function(){var e=this;this.end(),this._addToolTip();var t=this.tooltip;this.ismeare=!0;var i=this._beginSession(),n=this.ismeare,r=this.viewer,o=this.cartesian,s=this.positions,a=this.polygonPoint;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(r.scene.canvas);var l=this.mouseHandler,u=this.poly,c=this;this._originCursor=r.scene.canvas.style.cursor,r.scene.canvas.style.cursor="crosshair";Cesium.JulianDate.now();l.setInputAction((function(i){if(e._isMouseNewPosition()&&n){if(t.style.display="block",t.style.left=i.endPosition.x+25+"px",t.style.top=i.endPosition.y-25+"px",null!=(o=Ee.pickPosition(r,i.endPosition,e._getObjectsToExclude()))&&(s.length>1&&s.pop(),s.length>0&&s.push(o)),!Cesium.defined(u)){u=new Object;var l=new Cesium.CallbackProperty((function(){return s.length>1?Cesium.Rectangle.fromCartesianArray(s):null}),!1);a=r.entities.add({name:Ee.drawEntityNames().drawRec,rectangle:{coordinates:l,material:c.fillColor,fill:c.fill,outline:c.outline,outlineWidth:c.outlineWidth,outlineColor:c.outlineColor,heightReference:c.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}}),c._registerEntity(a),c.polygonPoint=a}s.length>1&&!c.justDraw&&c.showAreaLabel()}}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),l.setInputAction((function(a){if(n&&(o=Ee.pickPosition(r,a.position))&&n){if(t.style.display="none",!o)return;if(s.push(o),c.lastLeftClickPoint=s[s.length-1],e.showPoint){var l=r.entities.add({name:Ee.drawEntityNames().drawRecpoint,position:s[s.length-1],point:{pixelSize:4,color:Cesium.Color.RED,outlineColor:Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:1e9}});c._registerEntity(l)}if(s.length>=2){if(c.polygonPoint){var u=Cesium.Rectangle.subsample(c.polygonPoint.rectangle.coordinates.getValue());u&&u.length>0&&(u.push(u[0]),c._showFloatingCloseBtn(i,u),c.onCompleted&&c.onCompleted(u,i))}c.end()}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),l.setInputAction((function(e){if(s.length<2||!c.polygonPoint)c.end();else{var t=Cesium.Rectangle.subsample(c.polygonPoint.rectangle.coordinates.getValue());t&&t.length>0&&(t.push(t[0]),c._showFloatingCloseBtn(i,t),c.onCompleted&&c.onCompleted(t,i)),c.end(),c._notrackPos()}}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),l.setInputAction((function(t){if((s=e._removeFloatPoint(s)).length<2)c.end();else{if(c.polygonPoint){var n=Cesium.Rectangle.subsample(c.polygonPoint.rectangle.coordinates.getValue());n&&n.length>0&&(n.push(n[0]),c._showFloatingCloseBtn(i,n),c.onCompleted&&c.onCompleted(n,i))}c.end()}}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"showAreaLabel",value:function(){var e=Cesium.Rectangle.northeast(this.polygonPoint.rectangle._coordinates.getValue()),t=Cesium.Rectangle.southwest(this.polygonPoint.rectangle._coordinates.getValue()),i=Cesium.Rectangle.northwest(this.polygonPoint.rectangle._coordinates.getValue()),n=Cesium.Rectangle.southeast(this.polygonPoint.rectangle._coordinates.getValue());e=Cesium.Cartographic.toCartesian(e),t=Cesium.Cartographic.toCartesian(t),i=Cesium.Cartographic.toCartesian(i),n=Cesium.Cartographic.toCartesian(n);var r=Ee.getPolygonArea([t,n,e,i]),o="面积:"+(r=r||0).toFixed(2)+"平方米";r>=1e4&&(o="面积:"+(r/1e6).toFixed(2)+"平方千米");var s=Cesium.BoundingSphere.fromPoints(this.positions);void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=Ee.createPointLabel(this.viewer,s.center,o,Ee.drawEntityNames().drawRec),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):Ee.setPointLabel(this._totalLengthPointLabel,s.center,o)}}]),i}(Nu);function Ku(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const Qu=function(e){c(i,e);var t=Ku(i);function i(e,r){var o,s,a,l;return n(this,i),(l=t.call(this,e,r)).perPositionHeight=null!==(o=r.perPositionHeight)&&void 0!==o&&o,l.fillColor=r.fillColor||new Cesium.Color(59,179,249,.5),l.fill=null===(s=r.fill)||void 0===s||s,l._radius=0,l._center=void 0,l._outlinePositions=[],l.granularity=null!==(a=r.granularity)&&void 0!==a?a:.01,l}return a(i,[{key:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,Ee.drawEntityNames_Circle()),N(p(i.prototype),"clearNoDepthTestPolyline",this).call(this),N(p(i.prototype),"_clearPolyLinePrimitives",this).call(this),this._outlinePositions=[],this.end()}},{key:"_removeFloatPoint",value:function(e){return N(p(i.prototype),"_removeFloatPoint",this).call(this,e),e.length<2&&this.clear(),!this.justDraw&&e.length>=2&&this.showAreaLabel(),e}},{key:"_getCloseAnchor",value:function(e){if(!e||0===e.length)return null;var t=Cesium.BoundingSphere.fromPoints(e);return t?t.center:e[e.length-1]}},{key:"startDraw",value:function(){var e=this;this.end(),this._addToolTip(),this._addPolyLinePrimitives(),this.initNoDepthTestPolyline();var t=this.tooltip;this.ismeare=!0;var i=this._beginSession(),n=this.ismeare,r=this.viewer,o=this.cartesian,s=this.positions;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(r.scene.canvas);var a=this.mouseHandler,l=this.poly,u=this;this._originCursor=r.scene.canvas.style.cursor,r.scene.canvas.style.cursor="crosshair";var c=new Cesium.Cartesian2,h=!1;this._preUpdateListener=r.scene.preUpdate.addEventListener((function(){if(h){if(h=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=c.x+25+"px",e.tooltip.style.top=c.y-25+"px"),!(o=Ee.pickPosition(r,c,e._getObjectsToExclude())))return e._tempPoint.show=!1,void(e._tempPoint.point.show=!1);if(e._tempPoint.show=!0,e._tempPoint.point.show=!0,e.justDraw)Ee.setPointPosition(e._tempPoint,o);else{var t=Ee.getPointLableString(o);Ee.setPointLabel(e._tempPoint,o,t)}if(null!=o&&(s.length>1&&s.pop(),s.length>0&&s.push(o)),!Cesium.defined(l)){l=new Object;var i=new Cesium.CallbackProperty((function(){if(s.length>1){if(e._radius=Cesium.Cartesian3.distance(s[0],s[1]),e._radius<=0)return null;var t=Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:s[0],semiMajorAxis:e._radius,semiMinorAxis:e._radius,rotation:0,granularity:e.granularity},!1,!0),i=Cesium.Cartesian3.unpackArray(t.outerPositions);return i.push(i[0]),e._outlinePositions=i,new Cesium.PolygonHierarchy(i)}return null}),!1),n=new Cesium.CallbackProperty((function(){return e._outlinePositions}),!1),a={name:Ee.drawEntityNames().drawCircle,polygon:{hierarchy:i,fill:u.fill,material:u.fillColor,perPositionHeight:u.perPositionHeight,outline:u.outline,outlineWidth:u.outlineWidth,outlineColor:u.outlineColor,heightReference:u.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}};a.polyline={positions:n,width:u.outlineWidth,material:u.outlineColor,clampToGround:u.clampToGround};var f=r.entities.add(a);u._registerEntity(f)}s.length>1&&!u.justDraw&&u.showAreaLabel()}})),a.setInputAction((function(e){n&&(h=!0,c=Cesium.Cartesian2.clone(e.endPosition,c))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),a.setInputAction((function(r){e._tempPoint.point.show=!1,e._tempPoint.show=!1,n&&o&&(t.style.display="none",s.push(o),u.lastLeftClickPoint=s[s.length-1],s.length>=2&&e._outlinePositions&&e._outlinePositions.length>0&&(u._showFloatingCloseBtn(i,e._outlinePositions),u.onCompleted&&u.onCompleted(e._outlinePositions,i),u.end()),u._notrackPos())}),Cesium.ScreenSpaceEventType.LEFT_CLICK),a.setInputAction((function(e){u.outlinePositions&&u.outlinePositions.length>0&&(u._showFloatingCloseBtn(i,u.outlinePositions),u.onCompleted&&u.onCompleted(u.outlinePositions,i)),u.end(),u._notrackPos()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),a.setInputAction((function(e){u.outlinePositions&&u.outlinePositions.length>0&&(u._showFloatingCloseBtn(i,u.outlinePositions),u.onCompleted&&u.onCompleted(u.outlinePositions,i)),u.end(),u._notrackPos()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"showAreaLabel",value:function(){var e=Ee.getPolygonArea(this._outlinePositions),t="面积:"+(e=e||0).toFixed(2)+"平方米";e>=1e4&&(t="面积:"+(e/1e6).toFixed(2)+"平方千米"),e>=1e10&&(t="面积:"+(e/1e10).toFixed(2)+"万平方千米");var i=Cesium.BoundingSphere.fromPoints(this._outlinePositions);void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=Ee.createPointLabel(this.viewer,i.center,t,Ee.drawEntityNames().drawpolygon),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):Ee.setPointLabel(this._totalLengthPointLabel,i.center,t)}}]),i}(Nu);var Xu=function(){function e(t,i){n(this,e),Cesium&&t&&(this.viewer=t,this._polygon=void 0,this._show=!1,this._init(i))}return a(e,[{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._polygon&&(this._polygon.show=e)}},{key:"_drawPolygon",value:function(e){var t=this,i=this.viewer.entities.add({show:this.show,polygon:{hierarchy:new Cesium.PolygonHierarchy(e),material:Cesium.Color.fromBytes(64,157,253,100),perPositionHeight:!1,extrudedHeight:new Cesium.CallbackProperty((function(){return t._extrudedHeight}),!1)}});return this._polygon=i,i}},{key:"_init",value:function(e){var t;e=null!==(t=e)&&void 0!==t?t:Cesium.EMPTY_OBJECT,this._minHeight=e.minHeight||0,this._maxHeight=e.maxHeight||2e3,this._extrudedHeight=this.minHeight,this._speed=e.speed||10,this._polygon=null,this._interval=void 0,this._intervalStep=e.intervalStep||500}},{key:"start",value:function(e,t){var i=this;this._polygon||this._drawPolygon(e),this.show=!0,this._interval=window.setInterval((function(){i._maxHeight>i._extrudedHeight&&i._extrudedHeight>=i._minHeight?i._extrudedHeight+=i._speed:i._extrudedHeight=i._minHeight,t&&t(i._extrudedHeight)}),this._intervalStep),this.viewer.scene.globe.depthTestAgainstTerrain=!0}},{key:"noAuto",value:function(e,t){this._polygon||this._drawPolygon(e),this.show=!0,this._maxHeight>this._extrudedHeight&&this._extrudedHeight>=this._minHeight?this._extrudedHeight=t:this._extrudedHeight=this._minHeight,this.viewer.scene.globe.depthTestAgainstTerrain=!0}},{key:"stop",value:function(){this._polygon&&(this.viewer.entities.remove(this._polygon),this._polygon=null),this._interval&&(clearInterval(this._interval),this._interval=void 0),this.viewer.scene.globe.depthTestAgainstTerrain=!1}},{key:"pause",value:function(){this._interval&&(clearInterval(this._interval),this._interval=void 0)}},{key:"resetParas",value:function(e){var t;e=null!==(t=e)&&void 0!==t?t:Cesium.EMPTY_OBJECT,this._minHeight=e.minHeight||0,this._maxHeight=e.maxHeight||2e3,this._speed=e.setpHeight||10}}]),e}(),Ju=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},$u="attribute vec4 position;\nvarying vec2 texcoord;\nvoid main(){\n texcoord = position.xy*0.5+0.5;\n gl_Position = position;\n}",ec="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp int;\n precision highp float;\n#else\n precision mediump int;\n precision mediump float;\n#endif\nuniform sampler2D source;\nvarying vec2 texcoord;";!function(){var e,t,i,n;if(null!=window.WebGLRenderingContext)n=["WEBKIT","MOZ","MS","O"],i=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,e=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(t){var r,o,s,a,l;if(null!==(o=t.match(i))&&(t=o[1]),null===(r=e.call(this,t))){for(a=0,l=n.length;a<l;a++)if(s=n[a],null!==(r=e.call(this,s+"_"+t)))return r;return null}return r},t=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){var e,n,r,o,s,a;for(r=[],s=0,a=(o=t.call(this)).length;s<a;s++)null!==(n=(e=o[s]).match(i))&&(e=n[1]),Ju.call(r,e)<0&&r.push(e);return r}}(),function(){var e,t,i,n,r,o,s,a,l,u,c,h,f,p;if((r=function(){var e,t,i;return(e=document.createElement("canvas")).width=2,e.height=2,(i=(t=e.getContext("2d")).getImageData(0,0,2,2)).data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),t.putImageData(i,0,0),e})(),t=function(e,t){var i,n,o,s,a,l,u,c,h,f,p,m,d,v;if(l=e.createProgram(),d=e.createShader(e.VERTEX_SHADER),e.attachShader(l,d),e.shaderSource(d,"attribute vec2 position;\nvoid main(){\n gl_Position = vec4(position, 0.0, 1.0);\n}"),e.compileShader(d),!e.getShaderParameter(d,e.COMPILE_STATUS))throw e.getShaderInfoLog(d);if(o=e.createShader(e.FRAGMENT_SHADER),e.attachShader(l,o),e.shaderSource(o,"uniform sampler2D source;\nvoid main(){\n gl_FragColor = texture2D(source, vec2(1.0, 1.0));\n}"),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS))throw e.getShaderInfoLog(o);if(e.linkProgram(l),!e.getProgramParameter(l,e.LINK_STATUS))throw e.getProgramInfoLog(l);return e.useProgram(l),n=function(){return e.deleteShader(o),e.deleteShader(d),e.deleteProgram(l),e.deleteBuffer(i),e.deleteTexture(h),e.deleteTexture(m),e.deleteFramebuffer(s),e.bindBuffer(e.ARRAY_BUFFER,null),e.useProgram(null),e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null)},m=e.createTexture(),e.bindTexture(e.TEXTURE_2D,m),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,2,2,0,e.RGBA,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),s=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,s),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,m,0),f=r(),h=e.createTexture(),e.bindTexture(e.TEXTURE_2D,h),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,t,f),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),v=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),i=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,v,e.STATIC_DRAW),a=e.getAttribLocation(l,"position"),p=e.getUniformLocation(l,"source"),e.enableVertexAttribArray(a),e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0),e.uniform1i(p,0),e.drawArrays(e.TRIANGLES,0,6),u=new Uint8Array(16),e.readPixels(0,0,2,2,e.RGBA,e.UNSIGNED_BYTE,u),c=Math.abs(u[0]-127)<10,n(),c},n=function(e,t){var i;return i=e.createTexture(),e.bindTexture(e.TEXTURE_2D,i),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,2,2,0,e.RGBA,t,null),0===e.getError()?(e.deleteTexture(i),!0):(e.deleteTexture(i),!1)},e=function(e,t){var i,n,r;return r=e.createTexture(),e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,2,2,0,e.RGBA,t,null),n=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0),i=e.checkFramebufferStatus(e.FRAMEBUFFER),e.deleteTexture(r),e.deleteFramebuffer(n),e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),i===e.FRAMEBUFFER_COMPLETE},l=[],u={},c=[],i=function(){var i,r,o,s,a;i=document.createElement("canvas"),r=null;try{null===(r=i.getContext("experimental-webgl"))&&(r=i.getContext("webgl"))}catch(e){}if(null!=r&&(null===r.getExtension("OES_texture_float")?n(r,r.FLOAT)?(a=!0,l.push("OES_texture_float"),u.OES_texture_float={shim:!0}):(a=!1,c.push("OES_texture_float")):n(r,r.FLOAT)?(a=!0,l.push("OES_texture_float")):(a=!1,c.push("OES_texture_float")),a&&(null===r.getExtension("WEBGL_color_buffer_float")?e(r,r.FLOAT)?(l.push("WEBGL_color_buffer_float"),u.WEBGL_color_buffer_float={shim:!0,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):c.push("WEBGL_color_buffer_float"):e(r,r.FLOAT)?l.push("WEBGL_color_buffer_float"):c.push("WEBGL_color_buffer_float"),null===r.getExtension("OES_texture_float_linear")?t(r,r.FLOAT)?(l.push("OES_texture_float_linear"),u.OES_texture_float_linear={shim:!0}):c.push("OES_texture_float_linear"):t(r,r.FLOAT)?l.push("OES_texture_float_linear"):c.push("OES_texture_float_linear")),null===(o=r.getExtension("OES_texture_half_float"))?n(r,36193)?(s=!0,l.push("OES_texture_half_float"),o=u.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(s=!1,c.push("OES_texture_half_float")):n(r,o.HALF_FLOAT_OES)?(s=!0,l.push("OES_texture_half_float")):(s=!1,c.push("OES_texture_half_float")),s))return null===r.getExtension("EXT_color_buffer_half_float")?e(r,o.HALF_FLOAT_OES)?(l.push("EXT_color_buffer_half_float"),u.EXT_color_buffer_half_float={shim:!0,RGBA16F_EXT:34842,RGB16F_EXT:34843,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):c.push("EXT_color_buffer_half_float"):e(r,o.HALF_FLOAT_OES)?l.push("EXT_color_buffer_half_float"):c.push("EXT_color_buffer_half_float"),null===r.getExtension("OES_texture_half_float_linear")?t(r,o.HALF_FLOAT_OES)?(l.push("OES_texture_half_float_linear"),u.OES_texture_half_float_linear={shim:!0}):c.push("OES_texture_half_float_linear"):t(r,o.HALF_FLOAT_OES)?l.push("OES_texture_half_float_linear"):c.push("OES_texture_half_float_linear")},null!=window.WebGLRenderingContext){for(i(),h={},f=0,p=c.length;f<p;f++)a=c[f],h[a]=!0;o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(e){var t;return void 0===(t=u[e])?h[e]?null:o.call(this,e):t},s=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){var e,t,i,n,r,o,a;for(t=[],n=0,o=(i=s.call(this)).length;n<o;n++)e=i[n],void 0===h[e]&&t.push(e);for(r=0,a=l.length;r<a;r++)e=l[r],Ju.call(t,e)<0&&t.push(e);return t},WebGLRenderingContext.prototype.getFloatExtension=function(e){var t,i,n,r,o,s,l,u,c,h,f,p,m,d,v,y,g,_,C,b,w,P,O,x,E,A;for(null==e.prefer&&(e.prefer=["half"]),null==e.require&&(e.require=[]),null==e.throws&&(e.throws=!0),d=this.getExtension("OES_texture_float"),s=this.getExtension("OES_texture_half_float"),p=this.getExtension("WEBGL_color_buffer_float"),r=this.getExtension("EXT_color_buffer_half_float"),m=this.getExtension("OES_texture_float_linear"),o=this.getExtension("OES_texture_half_float_linear"),f={texture:null!==d,filterable:null!==m,renderable:null!==p,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},n={texture:null!==s,filterable:null!==o,renderable:null!==r,score:0,precision:"half",half:!0,single:!1,type:null!=(x=null!=s?s.HALF_FLOAT_OES:void 0)?x:null},i=[],f.texture&&i.push(f),n.texture&&i.push(n),h=[],y=0,C=i.length;y<C;y++){for(t=i[y],v=!0,g=0,b=(E=e.require).length;g<b;g++)!1===t[a=E[g]]&&(v=!1);v&&h.push(t)}for(_=0,w=h.length;_<w;_++)for(t=h[_],l=O=0,P=(A=e.prefer).length;O<P;l=++O)c=A[l],u=Math.pow(2,e.prefer.length-l-1),t[c]&&(t.score+=u);if(h.sort((function(e,t){return e.score===t.score?0:e.score<t.score?1:e.score>t.score?-1:void 0})),0===h.length){if(e.throws)throw"No floating point texture support that is "+e.require.join(", ");return null}return{filterable:(h=h[0]).filterable,renderable:h.renderable,type:h.type,precision:h.precision}}}}();var tc=function(){function e(e,t){var i,n;this.gl=e,n=t.vertex,i=t.fragment,this.program=this.gl.createProgram(),this.vs=this.gl.createShader(this.gl.VERTEX_SHADER),this.fs=this.gl.createShader(this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vs),this.gl.attachShader(this.program,this.fs),this.compileShader(this.vs,n),this.compileShader(this.fs,i),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return e.prototype.attribLocation=function(e){var t=this.attribCache[e];return void 0===t&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},e.prototype.compileShader=function(e,t){if(this.gl.shaderSource(e,t),this.gl.compileShader(e),!this.gl.getShaderParameter(e,this.gl.COMPILE_STATUS))throw"Shader Compile Error: "+this.gl.getShaderInfoLog(e)},e.prototype.link=function(){if(this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw"Shader Link Error: "+this.gl.getProgramInfoLog(this.program)},e.prototype.use=function(){return this.gl.useProgram(this.program),this},e.prototype.uniformLoc=function(e){var t=this.uniform_cache[e];return void 0===t&&(t=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),t},e.prototype.int=function(e,t){var i;return this.value_cache[e]!==t&&(this.value_cache[e]=t,(i=this.uniformLoc(e))&&this.gl.uniform1i(i,t)),this},e.prototype.vec2=function(e,t,i){var n;return(n=this.uniformLoc(e))&&this.gl.uniform2f(n,t,i),this},e.prototype.float=function(e,t){var i;return this.value_cache[e]!==t&&(this.value_cache[e]=t,(i=this.uniformLoc(e))&&this.gl.uniform1f(i,t)),this},e}(),ic=function(){function e(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return e.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},e.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},e.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},e.prototype.check=function(){switch(this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER)){case this.gl.FRAMEBUFFER_UNSUPPORTED:throw"Framebuffer is unsupported";case this.gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Framebuffer incomplete attachment";case this.gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Framebuffer incomplete dimensions";case this.gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Framebuffer incomplete missing attachment"}return this},e.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},e.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},e.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},e}(),nc=function(){function e(e,t){var i,n;switch(this.gl=e,null==t&&(t={}),this.channels=this.gl[(null!=(i=t.channels)?i:"rgba").toUpperCase()],"number"==typeof t.type?this.type=t.type:this.type=this.gl[(null!=(n=t.type)?n:"unsigned_byte").toUpperCase()],this.channels){case this.gl.RGBA:this.chancount=4;break;case this.gl.RGB:this.chancount=3;break;case this.gl.LUMINANCE_ALPHA:this.chancount=2;break;default:this.chancount=1}this.target=this.gl.TEXTURE_2D,this.handle=this.gl.createTexture()}return e.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},e.prototype.bind=function(e){if(null==e&&(e=0),e>15)throw"Texture unit too large: "+e;return this.gl.activeTexture(this.gl.TEXTURE0+e),this.gl.bindTexture(this.target,this.handle),this},e.prototype.setSize=function(e,t){return this.width=e,this.height=t,this.gl.texImage2D(this.target,0,this.channels,this.width,this.height,0,this.channels,this.type,null),this},e.prototype.upload=function(e){return this.width=e.width,this.height=e.height,this.gl.texImage2D(this.target,0,this.channels,this.channels,this.type,e),this},e.prototype.linear=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this},e.prototype.nearest=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this},e.prototype.clampToEdge=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this},e.prototype.repeat=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT),this},e}(),rc=function(){function e(e,t,i){var n;this.gl=e,this.width=t,this.height=i,n=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new nc(this.gl,{type:n.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new ic(this.gl).bind().color(this.texture).unbind()}return e.prototype.use=function(){return this.fbo.bind()},e.prototype.bind=function(e){return this.texture.bind(e)},e.prototype.end=function(){return this.fbo.unbind()},e.prototype.resize=function(e,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},e}(),oc=function(){function e(e,t,i,n){var r,o,s;for(this.heatmap=e,this.gl=t,this.width=i,this.height=n,this.shader=new tc(this.gl,{vertex:"attribute vec4 position, intensity;\nvarying vec2 off, dim;\nvarying float vIntensity;\nuniform vec2 viewport;\n\nvoid main(){\n dim = abs(position.zw);\n off = position.zw;\n vec2 pos = position.xy + position.zw;\n vIntensity = intensity.x;\n gl_Position = vec4((pos/viewport)*2.0-1.0, 0.0, 1.0);\n}",fragment:"#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp int;\n precision highp float;\n#else\n precision mediump int;\n precision mediump float;\n#endif\nvarying vec2 off, dim;\nvarying float vIntensity;\nvoid main(){\n float falloff = (1.0 - smoothstep(0.0, 1.0, length(off/dim)));\n float intensity = falloff*vIntensity;\n gl_FragColor = vec4(intensity);\n}"}),this.clampShader=new tc(this.gl,{vertex:$u,fragment:ec+"uniform float low, high;\nvoid main(){\n gl_FragColor = vec4(clamp(texture2D(source, texcoord).rgb, low, high), 1.0);\n}"}),this.multiplyShader=new tc(this.gl,{vertex:$u,fragment:ec+"uniform float value;\nvoid main(){\n gl_FragColor = vec4(texture2D(source, texcoord).rgb*value, 1.0);\n}"}),this.blurShader=new tc(this.gl,{vertex:$u,fragment:ec+"uniform vec2 viewport;\nvoid main(){\n vec4 result = vec4(0.0);\n for(int x=-1; x<=1; x++){\n for(int y=-1; y<=1; y++){\n vec2 off = vec2(x,y)/viewport;\n //float factor = 1.0 - smoothstep(0.0, 1.5, length(off));\n float factor = 1.0;\n result += vec4(texture2D(source, texcoord+off).rgb*factor, factor);\n }\n }\n gl_FragColor = vec4(result.rgb/result.w, 1.0);\n}"}),this.nodeBack=new rc(this.gl,this.width,this.height),this.nodeFront=new rc(this.gl,this.width,this.height),this.vertexBuffer=this.gl.createBuffer(),this.vertexSize=8,this.maxPointCount=10240,this.vertexBufferData=new Float32Array(this.maxPointCount*this.vertexSize*6),this.vertexBufferViews=[],r=o=0,s=this.maxPointCount;0<=s?o<s:o>s;r=0<=s?++o:--o)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,r*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return e.prototype.resize=function(e,t){return this.width=e,this.height=t,this.nodeBack.resize(this.width,this.height),this.nodeFront.resize(this.width,this.height)},e.prototype.update=function(){var e,t;if(this.pointCount>0)return this.gl.enable(this.gl.BLEND),this.nodeFront.use(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.vertexBufferViews[this.pointCount],this.gl.STREAM_DRAW),t=this.shader.attribLocation("position"),e=this.shader.attribLocation("intensity"),this.gl.enableVertexAttribArray(1),this.gl.vertexAttribPointer(t,4,this.gl.FLOAT,!1,32,0),this.gl.vertexAttribPointer(e,4,this.gl.FLOAT,!1,32,16),this.shader.use().vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6*this.pointCount),this.gl.disableVertexAttribArray(1),this.pointCount=0,this.bufferIndex=0,this.nodeFront.end(),this.gl.disable(this.gl.BLEND)},e.prototype.clear=function(){return this.nodeFront.use(),this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.nodeFront.end()},e.prototype.clamp=function(e,t){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.clampShader.use().int("source",0).float("low",e).float("high",t),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},e.prototype.multiply=function(e){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.multiplyShader.use().int("source",0).float("value",e),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},e.prototype.blur=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.blurShader.use().int("source",0).vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},e.prototype.swap=function(){var e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},e.prototype.addVertex=function(e,t,i,n,r){return this.vertexBufferData[this.bufferIndex++]=e,this.vertexBufferData[this.bufferIndex++]=t,this.vertexBufferData[this.bufferIndex++]=i,this.vertexBufferData[this.bufferIndex++]=n,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=r},e.prototype.addPoint=function(e,t,i,n){var r;return null==i&&(i=50),null==n&&(n=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,r=i/2,this.addVertex(e,t,-r,-r,n),this.addVertex(e,t,+r,-r,n),this.addVertex(e,t,-r,+r,n),this.addVertex(e,t,-r,+r,n),this.addVertex(e,t,+r,-r,n),this.addVertex(e,t,+r,+r,n),this.pointCount+=1},e}(),sc=function(){function e(e){var t,i,n,r,o,s,a,l,u,c,h,f;h=null!=e?e:{},this.canvas=h.canvas,this.width=h.width,this.height=h.height,a=h.intensityToAlpha,o=h.gradientTexture,i=h.alphaRange,this.canvas||(this.canvas=document.createElement("canvas"));try{if(this.gl=this.canvas.getContext("experimental-webgl",{depth:!1,antialias:!1}),null===this.gl&&(this.gl=this.canvas.getContext("webgl",{depth:!1,antialias:!1}),null===this.gl))throw"WebGL not supported"}catch(e){throw e,"WebGL not supported"}null!=window.WebGLDebugUtils&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,(function(e,t,i){throw window.WebGLDebugUtils.glEnumToString(e)+" was caused by call to: "+t}))),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),o?(c=this.gradientTexture=new nc(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),"string"==typeof o?((s=new Image).onload=function(){return c.bind().upload(s)},s.src=o):o.width>0&&o.height>0?c.upload(o):o.onload=function(){return c.upload(o)},r="uniform sampler2D gradientTexture;\nvec3 getColor(float intensity){\n return texture2D(gradientTexture, vec2(intensity, 0.0)).rgb;\n}"):(c=null,r="vec3 getColor(float intensity){\n vec3 blue = vec3(0.0, 0.0, 1.0);\n vec3 cyan = vec3(0.0, 1.0, 1.0);\n vec3 green = vec3(0.0, 1.0, 0.0);\n vec3 yellow = vec3(1.0, 1.0, 0.0);\n vec3 red = vec3(1.0, 0.0, 0.0);\n\n vec3 color = (\n fade(-0.25, 0.25, intensity)*blue +\n fade(0.0, 0.5, intensity)*cyan +\n fade(0.25, 0.75, intensity)*green +\n fade(0.5, 1.0, intensity)*yellow +\n smoothstep(0.75, 1.0, intensity)*red\n );\n return color;\n}"),null==a&&(a=!0),a?(n=(f=null!=i?i:[0,1])[0],t=f[1],l="vec4 alphaFun(vec3 color, float intensity){\n float alpha = smoothstep("+n.toFixed(8)+", "+t.toFixed(8)+", intensity);\n return vec4(color*alpha, alpha);\n}"):l="vec4 alphaFun(vec3 color, float intensity){\n return vec4(color, 1.0);\n}",this.shader=new tc(this.gl,{vertex:$u,fragment:ec+"float linstep(float low, float high, float value){\n return clamp((value-low)/(high-low), 0.0, 1.0);\n}\n\nfloat fade(float low, float high, float value){\n float mid = (low+high)*0.5;\n float range = (high-low)*0.5;\n float x = 1.0 - clamp(abs(mid-value)/range, 0.0, 1.0);\n return smoothstep(0.0, 1.0, x);\n}\n\n"+r+"\n"+l+"\n\nvoid main(){\n float intensity = smoothstep(0.0, 1.0, texture2D(source, texcoord).r);\n vec3 color = getColor(intensity);\n gl_FragColor = alphaFun(color, intensity);\n}"}),null==this.width&&(this.width=this.canvas.offsetWidth||2),null==this.height&&(this.height=this.canvas.offsetHeight||2),this.canvas.width=this.width,this.canvas.height=this.height,this.gl.viewport(0,0,this.width,this.height),this.quad=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),u=new Float32Array([-1,-1,0,1,1,-1,0,1,-1,1,0,1,-1,1,0,1,1,-1,0,1,1,1,0,1]),this.gl.bufferData(this.gl.ARRAY_BUFFER,u,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.heights=new oc(this,this.gl,this.width,this.height)}return e.prototype.adjustSize=function(){var e,t;if(t=this.canvas.offsetWidth||2,e=this.canvas.offsetHeight||2,this.width!==t||this.height!==e)return this.gl.viewport(0,0,t,e),this.canvas.width=t,this.canvas.height=e,this.width=t,this.height=e,this.heights.resize(this.width,this.height)},e.prototype.display=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.heights.nodeFront.bind(0),this.gradientTexture&&this.gradientTexture.bind(1),this.shader.use().int("source",0).int("gradientTexture",1),this.gl.drawArrays(this.gl.TRIANGLES,0,6)},e.prototype.update=function(){return this.heights.update()},e.prototype.clear=function(){return this.heights.clear()},e.prototype.clamp=function(e,t){return null==e&&(e=0),null==t&&(t=1),this.heights.clamp(e,t)},e.prototype.multiply=function(e){return null==e&&(e=.95),this.heights.multiply(e)},e.prototype.blur=function(){return this.heights.blur()},e.prototype.addPoint=function(e,t,i,n){return this.heights.addPoint(e,t,i,n)},e.prototype.addPoints=function(e){var t,i,n,r;for(r=[],i=0,n=e.length;i<n;i++)t=e[i],r.push(this.addPoint(t.x,t.y,t.size,t.intensity));return r},e}();function ac(e){return new sc(e)}function lc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function uc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?lc(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):lc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function cc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var hc=new Cesium.WebMercatorProjection,fc={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},pc=function(e){c(i,e);var t=cc(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._options=uc(uc({},fc),r),e._nativeObjCesium=new Cesium.PrimitiveCollection,e._isGround=e._options.useGround,e._canvas=document.createElement("canvas"),e._canvas.setAttribute("id",e.id),e._heat=void 0,e._scale=1,e._points=[],e._bounds=new Cesium.Rectangle,e._boundsInMeter=void 0,e._primitive=e._nativeObjCesium.add(e._isGround?new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}}),classificationType:e._options.classificationType}):new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})})),e._state=ke.INITIALIZED,e}return a(i,[{key:"type",get:function(){return mr.getLayerType("heat-map")}},{key:"_addedHook",value:function(){this._canvas.style.cssText="\n visibility:hidden;\n width:".concat(this._viewer.canvas.width,"px;\n height:").concat(this._viewer.canvas.height,"px;\n "),this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=ac({canvas:this._canvas,gradientTexture:this._createGradientTexture()}),this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update())}},{key:"_createGradientTexture",value:function(){if(this._options.gradient){var e=document.createElement("canvas");e.width=200,e.height=10;var t=e.getContext("2d"),i=t.createLinearGradient(0,0,200,0);for(var n in this._options.gradient)i.addColorStop(+n,this._options.gradient[n]);return t.fillStyle=i,t.fillRect(0,0,200,10),e}}},{key:"_parsePoints",value:function(e){var t=this;return e.map((function(e){var i=hc.project(Cesium.Cartographic.fromDegrees(e.lng,e.lat));return{x:(i.x-t._boundsInMeter.west)/t._scale,y:(i.y-t._boundsInMeter.south)/t._scale,size:t._options.radius,intensity:e.value||Math.random()}}))}},{key:"_computeBounds",value:function(){Cesium.Rectangle.fromCartographicArray(this._points.map((function(e){return Cesium.Cartographic.fromDegrees(e.lng,e.lat)})),this._bounds)}},{key:"_computeBoundsInMeter",value:function(){var e=hc.project(Cesium.Rectangle.southwest(this._bounds)),t=hc.project(Cesium.Rectangle.northeast(this._bounds));this._boundsInMeter=new Cesium.Rectangle(e.x,e.y,t.x,t.y)}},{key:"_update",value:function(){if(!this._points||!this._points.length)return!1;this._heat.adjustSize(),this._heat.update(),this._heat.display(),this._primitive&&this._primitive.geometryInstances&&(this._primitive.geometryInstances.geometry=new Cesium.RectangleGeometry({rectangle:this._bounds,height:this._options.height})),this._primitive.appearance=new Cesium.MaterialAppearance({material:new Cesium.Material({fabric:{type:"Heat-Image",uniforms:{image:this._canvas},source:"\n uniform sampler2D image;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 colorImage = texture2D(image,st);\n if(colorImage.rgb == vec3(1.0) || colorImage.rgb == vec3(0.0)){\n discard;\n }\n material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a;\n return material;\n }\n "},translucent:function(e){return!0}}),flat:!0})}},{key:"setPoints",value:function(e){return this._points=e,this._computeBounds(),this._computeBoundsInMeter(),this._viewer&&(this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat=ac({canvas:this._canvas,gradientTexture:this._createGradientTexture()})),this._heat&&(this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update()),this}},{key:"clear",value:function(){return this._heat.clear(),this._points=[],this._state=ke.CLEARED,this}}]),i}(mr);mr.registerType("heat-map");const mc=pc;var dc={defaults:{useEntitiesIfAvailable:!0,minCanvasSize:700,maxCanvasSize:2e3,radiusFactor:60,spacingFactor:1.5,maxOpacity:.8,minOpacity:.1,blur:.85,gradient:{".3":"blue",".65":"yellow",".8":"orange",".95":"red"},backgroundColor:"rgba(0,0,0,0)"},create:function(e,t,i){return new yc(e,t,i)},_getContainer:function(e,t,i){var n=document.createElement("div");return i&&n.setAttribute("id",i),n.setAttribute("style","width: "+e+"px; height: "+t+"px; margin: 0px; display: none;"),document.body.appendChild(n),n},_getImageryProvider:function(e){var t=e._heatmap.getDataURL(),i=new Cesium.SingleTileImageryProvider({url:t,rectangle:e._rectangle});return i._tilingScheme=new Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new Cesium.Cartesian2(e._mbounds.west,e._mbounds.south),rectangleNortheastInMeters:new Cesium.Cartesian2(e._mbounds.east,e._mbounds.north)}),i},_getID:function(e){for(var t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<(e||8);n++)t+=i.charAt(Math.floor(62*Math.random()));return t}},vc=new Cesium.WebMercatorProjection;function yc(e,t,i){if(!t)return null;i||(i={}),this._cesium=e,this._options=i,this._id=dc._getID(),this._options.gradient=this._options.gradient?this._options.gradient:dc.defaults.gradient,this._options.maxOpacity=this._options.maxOpacity?this._options.maxOpacity:dc.defaults.maxOpacity,this._options.minOpacity=this._options.minOpacity?this._options.minOpacity:dc.defaults.minOpacity,this._options.blur=this._options.blur?this._options.blur:dc.defaults.blur,this._options.backgroundColor=this._options.backgroundColor?this._options.backgroundColor:dc.defaults.backgroundColor,this._mbounds=dc.wgs84ToMercatorBB(t),this._setWidthAndHeight(this._mbounds),this._options.radius=Math.round(this._options.radius?this._options.radius:this.width>this.height?this.width/dc.defaults.radiusFactor:this.height/dc.defaults.radiusFactor),this._spacing=this._options.radius*dc.defaults.spacingFactor,this._xoffset=this._mbounds.west,this._yoffset=this._mbounds.south,this.width=Math.round(this.width+2*this._spacing),this.height=Math.round(this.height+2*this._spacing),this._mbounds.west-=this._spacing*this._factor,this._mbounds.east+=this._spacing*this._factor,this._mbounds.south-=this._spacing*this._factor,this._mbounds.north+=this._spacing*this._factor,this.bounds=dc.mercatorToWgs84BB(this._mbounds),this._rectangle=Cesium.Rectangle.fromDegrees(this.bounds.west,this.bounds.south,this.bounds.east,this.bounds.north),this._container=dc._getContainer(this.width,this.height,this._id),this._options.container=this._container,this._heatmap=h337.create(this._options),this._container.children[0].setAttribute("id",this._id+"-hm"),this._newEntity=null,this._oldEntity=null}dc.wgs84ToMercator=function(e){var t=vc.project(Cesium.Cartographic.fromDegrees(e.x,e.y));return{x:t.x,y:t.y}},dc.wgs84ToMercatorBB=function(e){var t=vc.project(Cesium.Cartographic.fromDegrees(e.west,e.south)),i=vc.project(Cesium.Cartographic.fromDegrees(e.east,e.north));return{north:i.y,east:i.x,south:t.y,west:t.x}},dc.mercatorToWgs84=function(e){var t=vc.unproject(new Cesium.Cartesian3(e.x,e.y));return{x:t.longitude,y:t.latitude}},dc.mercatorToWgs84BB=function(e){var t=vc.unproject(new Cesium.Cartesian3(e.west,e.south)),i=vc.unproject(new Cesium.Cartesian3(e.east,e.north));return{north:this.rad2deg(i.latitude),east:this.rad2deg(i.longitude),south:this.rad2deg(t.latitude),west:this.rad2deg(t.longitude)}},dc.deg2rad=function(e){return e*(Math.PI/180)},dc.rad2deg=function(e){return e/(Math.PI/180)},yc.prototype.wgs84PointToHeatmapPoint=function(e){return this.mercatorPointToHeatmapPoint(dc.wgs84ToMercator(e))},yc.prototype.mercatorPointToHeatmapPoint=function(e){var t={};return t.x=Math.round((e.x-this._xoffset)/this._factor+this._spacing),t.y=Math.round((e.y-this._yoffset)/this._factor+this._spacing),t.y=this.height-t.y,t},yc.prototype._setWidthAndHeight=function(e){this.width=e.east>0&&e.west<0?e.east+Math.abs(e.west):Math.abs(e.east-e.west),this.height=e.north>0&&e.south<0?e.north+Math.abs(e.south):Math.abs(e.north-e.south),this._factor=1,this.width>this.height&&this.width>dc.defaults.maxCanvasSize?(this._factor=this.width/dc.defaults.maxCanvasSize,this.height/this._factor<dc.defaults.minCanvasSize&&(this._factor=this.height/dc.defaults.minCanvasSize)):this.height>this.width&&this.height>dc.defaults.maxCanvasSize?(this._factor=this.height/dc.defaults.maxCanvasSize,this.width/this._factor<dc.defaults.minCanvasSize&&(this._factor=this.width/dc.defaults.minCanvasSize)):this.width<this.height&&this.width<dc.defaults.minCanvasSize?(this._factor=this.width/dc.defaults.minCanvasSize,this.height/this._factor>dc.defaults.maxCanvasSize&&(this._factor=this.height/dc.defaults.maxCanvasSize)):this.height<this.width&&this.height<dc.defaults.minCanvasSize&&(this._factor=this.height/dc.defaults.minCanvasSize,this.width/this._factor>dc.defaults.maxCanvasSize&&(this._factor=this.width/dc.defaults.maxCanvasSize)),this.width=this.width/this._factor,this.height=this.height/this._factor},yc.prototype.setData=function(e,t,i){return!!(i&&i.length>0&&null!==e&&!1!==e&&null!==t&&!1!==t)&&(this._heatmap.setData({min:e,max:t,data:i}),this.updateLayer(),!0)},yc.prototype.setWGS84Data=function(e,t,i){if(i&&i.length>0&&null!==e&&!1!==e&&null!==t&&!1!==t){for(var n=[],r=0;r<i.length;r++){var o=i[r],s=this.wgs84PointToHeatmapPoint(o);(o.value||0===o.value)&&(s.value=o.value),n.push(s)}return this.setData(e,t,n)}return!1},yc.prototype.show=function(e){(this._oldEntity||this._newEntity)&&(this._oldEntity.show=e,this._newEntity.show=e)},yc.prototype.updateLayer=function(){var e=this;dc.defaults.useEntitiesIfAvailable&&this._cesium.entities?this._oldEntity?(this._newEntity=this._cesium.entities.add({show:!1,name:"heatEntities_ts",rectangle:{coordinates:this._rectangle,material:this._heatmap._renderer.canvas}}),setTimeout((function(){e._cesium.entities.remove(e._oldEntity),e._newEntity.show=!0,e._oldEntity=e._newEntity,e._cesium.entities._entities._array.forEach((function(t){"heatEntities_ts"==t.name&&t.id!==e._newEntity.id&&e._cesium.entities.remove(t)}))}),300)):(this._newEntity=this._cesium.entities.add({show:!0,rectangle:{coordinates:this._rectangle,material:this._heatmap._renderer.canvas}}),this._oldEntity=this._newEntity):(this._layer&&this._cesium.scene.imageryLayers.remove(this._layer),this._layer=this._cesium.scene.imageryLayers.addImageryProvider(dc._getImageryProvider(this)))};const gc=dc;const _c={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",FRONT:"front",BACK:"back",NONE:"none"};function Cc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function bc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Cc(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Cc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var wc={edgeWidth:0,edgeColor:Cesium.Color.WHITE,unionClippingRegions:!1};function Pc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Oc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Pc(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Pc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function xc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Ec={lerpInterval:50,bottomImage:"",sideImage:""},Ac=function(e){c(i,e);var t=xc(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,Oc(Oc({},Ec),o)))._viewer=e,r._viewer.scene.globe.clippingPlanes=r._planeCollection,r._height=5,r._layer=new Cesium.PrimitiveCollection,r._viewer.scene.primitives.add(r._layer),r}return a(i,[{key:"height",get:function(){return this._height},set:function(e){this._height=e,this._layer.removeAll(),this._drawPrimitive()}},{key:"_enableHook",value:function(){this._layer.show=this._enable}},{key:"_drawPrimitive",value:function(){var e=this;if(this._planeCollection.length)if(this._createBottomPolygon(),!this._viewer.terrainProvider||this._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider)this._createSideWall(this._positions.map((function(e){return Ne.transformWGS84ToCartesian(e)})),this._positions.map((function(e){return e.alt})));else{for(var t=[],i=this._positions.length,n=this._options.lerpInterval,r=0;r<i;r++)for(var o=(r+1)%i,s=Ne.transformWGS84ToCartographic(this._positions[r]),a=Ne.transformWGS84ToCartographic(this._positions[o]),l=0;l<n;l++){var u=Cesium.Math.lerp(s.longitude,a.longitude,l/n),c=Cesium.Math.lerp(s.latitude,a.latitude,l/n);t.push(new Cesium.Cartographic(u,c))}Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,t).then((function(t){e._createSideWall(t.map((function(e){return Cesium.Cartesian3.fromRadians(e.longitude,e.latitude)})),t.map((function(e){return e.height})))}))}}},{key:"_mountPlanes",value:function(){var e=this;this._layer.removeAll(),this._planeCollection.removeAll(),this.computeGlobePlanes().forEach((function(t){e._planeCollection.add(t)})),this._drawPrimitive()}},{key:"_getMinHeight",value:function(){var e=this._positions[0].alt;return this._positions.forEach((function(t){e=Math.min(e,t.alt)})),e-this._height}},{key:"_createBottomPolygon",value:function(){var e=this._getMinHeight(),t=this._positions.map((function(t){return{lng:t.lng,lat:t.lat,alt:e}})),i=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Ne.transformWGS84ArrayToCartesianArray(t)),perPositionHeight:!0}),n=Cesium.PolygonGeometry.createGeometry(i);this._layer.add(new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:n}),appearance:new Cesium.MaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.ImageType,{image:this._options.bottomImage,repeat:new Cesium.Cartesian2(5,5)})}),asynchronous:!1}))}},{key:"_createSideWall",value:function(e,t){var i=this._getMinHeight(),n=e.map((function(){return i})),r=new Cesium.WallGeometry({positions:e.concat(e[0]),maximumHeights:n.concat(n[0]),minimumHeights:t.concat(t[0])}),o=Cesium.WallGeometry.createGeometry(r);this._layer.add(new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:o}),appearance:new Cesium.MaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.ImageType,{image:this._options.sideImage,repeat:new Cesium.Cartesian2(10,1)})}),asynchronous:!1}))}}]),i}(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._options=bc(bc({},wc),t),this._direction=void 0,this._distance=0,this._angle=0,this._positions=void 0,this._planeCollection=new Cesium.ClippingPlaneCollection({edgeWidth:this._options.edgeWidth,edgeColor:this._options.edgeColor,unionClippingRegions:this._options.unionClippingRegions}),this._enable=!1}return a(e,[{key:"positions",get:function(){return this._positions},set:function(e){this._positions=Be.parsePositions(e),this._direction=void 0,this._mountPlanes()}},{key:"direction",get:function(){return this._direction},set:function(e){this._positions=[],this._direction=e,this._mountPlanes()}},{key:"distance",get:function(){return this._distance},set:function(e){this._distance=+e,this._planeCollection._planes.forEach((function(t){t.distance=+e}))}},{key:"angle",get:function(){return this._angle},set:function(e){this._angle=+e,this._planeCollection._planes.forEach((function(t){if(e){var i=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(+e));Cesium.Matrix3.multiplyByVector(i,t.normal,t.normal)}}))}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable!==e&&(this._enable=e,this._planeCollection.enabled=this._enable,this._state=this._enable?ke.ENABLED:ke.DISABLED,this._enableHook&&this._enableHook())}},{key:"state",get:function(){return this._state}},{key:"_enableHook",value:function(){}},{key:"_mountPlanes",value:function(){}},{key:"_getDirectionNoraml",value:function(e){var t=void 0;switch(e){case _c.UP:t=new Cesium.Cartesian3(0,0,1);break;case _c.DOWN:t=new Cesium.Cartesian3(0,0,-1);break;case _c.LEFT:t=new Cesium.Cartesian3(-1,0,0);break;case _c.RIGHT:t=new Cesium.Cartesian3(1,0,0);break;case _c.FRONT:t=new Cesium.Cartesian3(0,-1,0);break;case _c.BACK:t=new Cesium.Cartesian3(0,1,0)}return t}},{key:"_isCcw",value:function(e){if(!e||e.length<3)return!1;var t=Ne.transformWGS84ToCartesian(this._positions[0]),i=Ne.transformWGS84ToCartesian(this._positions[1]),n=Ne.transformWGS84ToCartesian(this._positions[2]);return(n.y-i.y)*(i.x-t.x)-(i.y-t.y)*(n.x-i.x)>0}},{key:"computeGlobePlanes",value:function(){var e=[];if(this._positions&&this._positions.length>=3)for(var t=this._isCcw(this._positions),i=this._positions.length,n=0;n<i;n++){var r=(n+1)%i;if(this._positions[n].lng!==this._positions[r].lng||this._positions[n].lat!==this._positions[r].lat||this._positions[n].alt!==this._positions[r].lat){var o=Ne.transformWGS84ToCartesian(this._positions[n]),s=Ne.transformWGS84ToCartesian(this._positions[r]),a=Cesium.Cartesian3.cross(o,t?Cesium.Cartesian3.subtract(o,s,new Cesium.Cartesian3):Cesium.Cartesian3.subtract(s,o,new Cesium.Cartesian3),new Cesium.Cartesian3);Cesium.Cartesian3.normalize(a,a),e.push(new Cesium.ClippingPlane(a,this._distance||0))}}return e}},{key:"computeModelPlanes",value:function(e){var t=[],i=Cesium.Matrix4.inverseTransformation(e,new Cesium.Matrix4);if(this._positions&&2===this._positions.length){var n=Cesium.Cartesian3.UNIT_Z,r=Cesium.Matrix4.multiplyByPoint(i,Ne.transformWGS84ToCartesian(this._positions[0]),new Cesium.Cartesian3),o=Cesium.Matrix4.multiplyByPoint(i,Ne.transformWGS84ToCartesian(this._positions[1]),new Cesium.Cartesian3),s=Cesium.Cartesian3.subtract(o,r,new Cesium.Cartesian3);Cesium.Cartesian3.normalize(s,s);var a=Cesium.Cartesian3.cross(n,s,new Cesium.Cartesian3);t.push(new Cesium.ClippingPlane(a,this._distance||0))}else if(this._positions&&this._positions.length>=3)for(var l=Cesium.Cartesian3.UNIT_Z,u=this._isCcw(this._positions),c=this._positions.length,h=0;h<c;h++){var f=(h+1)%c;if(this._positions[h].lng!==this._positions[f].lng||this._positions[h].lat!==this._positions[f].lat||this._positions[h].alt!==this._positions[f].lat){var p=Cesium.Matrix4.multiplyByPoint(i,Ne.transformWGS84ToCartesian(this._positions[h]),new Cesium.Cartesian3),m=Cesium.Matrix4.multiplyByPoint(i,Ne.transformWGS84ToCartesian(this._positions[f]),new Cesium.Cartesian3),d=Cesium.Cartesian3.cross(l,Cesium.Cartesian3.normalize(u?Cesium.Cartesian3.subtract(p,m,new Cesium.Cartesian3):Cesium.Cartesian3.subtract(m,p,new Cesium.Cartesian3),new Cesium.Cartesian3),new Cesium.Cartesian3);t.push(new Cesium.ClippingPlane(d,this._distance||0))}}else if(this._direction&&this._direction!==ClippingDirection_default.NONE){var v=this._getDirectionNoraml(this._direction);if(this._angle){var y=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(this._angle));Cesium.Matrix3.multiplyByVector(y,v,v)}v&&t.push(new Cesium.ClippingPlane(v,this._distance||0))}return t}}]),e}());const kc=Ac;const Tc=function(){function e(t,i){n(this,e),this.u=t,this.v=i,this.m=this.magnitude()}return a(e,[{key:"magnitude",value:function(){return Math.sqrt(this.u*this.u+this.v*this.v)}},{key:"directionTo",value:function(){var e=Math.atan2(this.u,this.v)*(180/Math.PI);return e<0&&(e+=360),e}},{key:"directionFrom",value:function(){return(this.directionTo()+180)%360}}]),e}();const Mc=function(){function e(t){n(this,e),this.grid=[],this.xmin=t.xmin,this.xmax=t.xmax,this.ymin=t.ymin,this.ymax=t.ymax,this.cols=t.cols,this.rows=t.rows,this.us=t.us,this.vs=t.vs,this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaY<0&&this.ymin<this.ymax?console.warn("[wind-core]: The data is flipY"):(this.ymin=Math.min(t.ymax,t.ymin),this.ymax=Math.max(t.ymax,t.ymin)),this.isFields=!0;var i=Math.ceil((this.xmax-this.xmin)/t.deltaX),r=Math.ceil((this.ymax-this.ymin)/t.deltaY);i===this.cols&&r===this.rows||console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*t.deltaX)>=360,this.wrappedX="wrappedX"in t?t.wrappedX:this.xmax>180,this.grid=this.buildGrid(),this.range=this.calculateRange()}return a(e,[{key:"buildGrid",value:function(){for(var e=[],t=0,i=this,n=i.rows,r=i.cols,o=i.us,s=i.vs,a=0;a<n;a++){for(var l=[],u=0;u<r;u++,t++){var c=o[t],h=s[t],f=this.isValid(c)&&this.isValid(h);l[u]=f?new Tc(c,h):null}this.isContinuous&&l.push(l[0]),e[a]=l}return e}},{key:"release",value:function(){this.grid=[]}},{key:"extent",value:function(){return[this.xmin,this.ymin,this.xmax,this.ymax]}},{key:"bilinearInterpolateVector",value:function(e,t,i,n,r,o){var s=1-e,a=1-t,l=s*a,u=e*a,c=s*t,h=e*t,f=i.u*l+n.u*u+r.u*c+o.u*h,p=i.v*l+n.v*u+r.v*c+o.v*h;return new Tc(f,p)}},{key:"calculateRange",value:function(){if(this.grid&&this.grid[0]){for(var e,t,i=this.grid.length,n=this.grid[0].length,r=0;r<i;r++)for(var o=0;o<n;o++){var s=this.grid[r][o];if(null!==s){var a=s.m||s.magnitude();void 0===e?e=a:void 0===t?(t=a,e=Math.min(e,t),t=Math.max(e,t)):(e=Math.min(a,e),t=Math.max(a,t))}}return[e,t]}}},{key:"isValid",value:function(e){return null!=e}},{key:"getWrappedLongitudes",value:function(){var e=this.xmin,t=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,t=180):(t=this.xmax-360,e=this.xmin-360)),[e,t]}},{key:"contains",value:function(e,t){var i,n=this.getWrappedLongitudes(),r=n[0],o=n[1],s=e>=r&&e<=o;return i=this.deltaY>=0?t>=this.ymin&&t<=this.ymax:t>=this.ymax&&t<=this.ymin,s&&i}},{key:"floorMod",value:function(e,t){return e-t*Math.floor(e/t)}},{key:"getDecimalIndexes",value:function(e,t){return[this.floorMod(e-this.xmin,360)/this.deltaX,(this.ymax-t)/this.deltaY]}},{key:"valueAt",value:function(e,t){if(!this.contains(e,t))return null;var i=this.getDecimalIndexes(e,t),n=Math.floor(i[0]),r=Math.floor(i[1]),o=this.clampColumnIndex(n),s=this.clampRowIndex(r);return this.valueAtIndexes(o,s)}},{key:"interpolatedValueAt",value:function(e,t){if(!this.contains(e,t))return null;var i=this.getDecimalIndexes(e,t),n=i[0],r=i[1];return this.interpolatePoint(n,r)}},{key:"hasValueAt",value:function(e,t){return null!==this.valueAt(e,t)}},{key:"interpolatePoint",value:function(e,t){var i=this.getFourSurroundingIndexes(e,t),n=i[0],r=i[1],o=i[2],s=i[3],a=this.getFourSurroundingValues(n,r,o,s);if(a){var l=a[0],u=a[1],c=a[2],h=a[3];return this.bilinearInterpolateVector(e-n,t-o,l,u,c,h)}return null}},{key:"clampColumnIndex",value:function(e){var t=e;e<0&&(t=0);var i=this.cols-1;return e>i&&(t=i),t}},{key:"clampRowIndex",value:function(e){var t=e;e<0&&(t=0);var i=this.rows-1;return e>i&&(t=i),t}},{key:"getFourSurroundingIndexes",value:function(e,t){var i=Math.floor(e),n=i+1;this.isContinuous&&n>=this.cols&&(n=0),n=this.clampColumnIndex(n);var r=this.clampRowIndex(Math.floor(t));return[i,n,r,this.clampRowIndex(r+1)]}},{key:"getFourSurroundingValues",value:function(e,t,i,n){var r;if(r=this.grid[i]){var o=r[e],s=r[t];if(this.isValid(o)&&this.isValid(s)&&(r=this.grid[n])){var a=r[e],l=r[t];if(this.isValid(a)&&this.isValid(l))return[o,s,a,l]}}return null}},{key:"valueAtIndexes",value:function(e,t){return this.grid[t][e]}},{key:"lonLatAtIndexes",value:function(e,t){return[this.longitudeAtX(e),this.latitudeAtY(t)]}},{key:"longitudeAtX",value:function(e){var t=this.deltaX/2,i=this.xmin+t+e*this.deltaX;return this.wrappedX&&(i=i>180?i-360:i),i}},{key:"latitudeAtY",value:function(e){var t=this.deltaY/2;return this.ymax-t-e*this.deltaY}},{key:"randomize",value:function(e,t,i,n){void 0===e&&(e={});var r=Math.random()*(t||this.cols)|0,o=Math.random()*(i||this.rows)|0,s=n([r,o]);return null!==s?(e.x=s[0],e.y=s[1]):(e.x=this.longitudeAtX(r),e.y=this.latitudeAtY(o)),e}},{key:"checkFields",value:function(){return this.isFields}}]),e}();const Rc=function(){function e(t){n(this,e),this.options={},this.particles=[],this.ctx=t,this.animationLoop=void 0,this.animate=this.animate.bind(this)}return a(e,[{key:"_indexFor",value:function(e,t,i,n){return Math.max(0,Math.min(n.length-1,Math.round((e-t)/(i-t)*(n.length-1))))}},{key:"_moveParticles",value:function(){if(this.particles&&this.particles.length)for(var e=this.ctx.canvas.width,t=this.ctx.canvas.height,i=this.particles,n=this.options.maxAge,r="function"==typeof this.options.velocityScale?this.options.velocityScale():this.options.velocityScale,o=0;o<i.length;o++){var s=i[o];s.age>n&&(s.age=0,this.field.randomize(s,e,t,this.unProject));var a=s.x,l=s.y,u=this.field.interpolatedValueAt(a,l);if(null===u)s.age=n;else{var c=a+u.u*r,h=l+u.v*r;this.field.hasValueAt(c,h)?(s.xt=c,s.yt=h,s.m=u.m):(s.x=c,s.y=h,s.age=n)}s.age++}}},{key:"_drawParticles",value:function(){if(this.particles&&this.particles.length){var e=this.particles,t=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=t,this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle="rgba(0, 0, 0, "+this.options.globalAlpha+")",this.ctx.lineWidth=this.options.lineWidth?this.options.lineWidth:1,this.ctx.strokeStyle=this.options.colorScale?this.options.colorScale:"#fff";var i=0,n=e.length;if(this.field&&n>0){var r=void 0,o=void 0;if(this.options.minVelocity&&this.options.maxVelocity)r=this.options.minVelocity,o=this.options.maxVelocity;else{var s=this.field.range;r=s[0],o=s[1]}for(;i<n;i++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[i],r,o)}}}},{key:"_drawPixelParticle",value:function(e,t,i){var n=[e.x,e.y],r=[e.xt,e.yt],o=e.xt-e.x,s=e.yt-e.y;o*o+s*s>400||r&&n&&r[0]&&r[1]&&n[0]&&n[1]&&e.age<=this.options.maxAge&&this._drawStroke(n,r,e,t,i)}},{key:"_drawCoordsParticle",value:function(e,t,i){var n=[e.x,e.y],r=[e.xt,e.yt];if(r&&n&&r[0]&&r[1]&&n[0]&&n[1]&&this.intersectsCoordinate(r)&&e.age<=this.options.maxAge){var o=this.project(n),s=this.project(r);this._drawStroke(o,s,e,t,i)}}},{key:"_drawStroke",value:function(e,t,i,n,r){if(e&&t){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(t[0],t[1]),"function"==typeof this.options.colorScale)this.ctx.strokeStyle=this.options.colorScale(i.m);else if(Array.isArray(this.options.colorScale)){var o=this._indexFor(i.m,n,r,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[o]}"function"==typeof this.options.lineWidth&&(this.ctx.lineWidth=this.options.lineWidth(i.m)),i.x=i.xt,i.y=i.yt,this.ctx.stroke()}}},{key:"_prepareParticlePaths",value:function(){var e=this.ctx.canvas.width,t=this.ctx.canvas.height,i="function"==typeof this.options.paths?this.options.paths(this):this.options.paths,n=[];if(!this.field)return[];for(var r=0;r<i;r++)n.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,t,this.unProject));return n}},{key:"project",value:function(){throw new Error("project must be override")}},{key:"unProject",value:function(){throw new Error("unProject must be override")}},{key:"intersectsCoordinate",value:function(e){throw new Error("must be override")}},{key:"prerender",value:function(){this.field&&(this.particles=this._prepareParticlePaths(),this.starting||this.forceStop||(this.starting=!0,this._then=Date.now(),this.animate()))}},{key:"render",value:function(){return this._moveParticles(),this._drawParticles(),this}},{key:"clearCanvas",value:function(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}},{key:"start",value:function(){this.starting=!0,this.forceStop=!1,this._then=Date.now(),this.animate()}},{key:"stop",value:function(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}},{key:"animate",value:function(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);var e=Date.now(),t=e-this._then;t>this.options.frameRate&&(this._then=e-t%this.options.frameRate,this.render())}},{key:"setData",value:function(e){return this.field=e,this}},{key:"setOptions",value:function(e){var t,i,n,r;return this.options=e,null!==(t=this.options)&&void 0!==t&&t.maxAge||null===(i=this.options)||void 0===i||!i.particleAge||(this.options.maxAge=Number(this.options.particleAge)),null!==(n=this.options)&&void 0!==n&&n.paths||null===(r=this.options)||void 0===r||!r.particleMultiplier||(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}}]),e}();function Sc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function jc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Sc(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Sc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Lc={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:.04,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},Dc=function(e){c(i,e);var t=Ic(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this,r))._options=jc(jc({},Lc),r),e._data=void 0,e._canvas=document.createElement("canvas"),e._state=ke.INITIALIZED,e}return a(i,[{key:"type",get:function(){return mr.getLayerType("wind")}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}},{key:"_formatData",value:function(e){var t,i;if(e.forEach((function(e){switch(e.header.parameterCategory+","+e.header.parameterNumber){case"1,2":case"2,2":t=e;break;case"1,3":case"2,3":i=e}})),i&&t){var n=t.header;return new Mc({xmin:n.lo1,ymin:n.la1,xmax:n.lo2,ymax:n.la2,deltaX:n.dx,deltaY:n.dy,cols:n.nx,rows:n.ny,us:t.data,vs:i.data})}}},{key:"_mountCanvas",value:function(){if(this._viewer&&this._canvas){this._canvas.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",this._canvas.className="dc-wind-layer";var e=this._viewer.canvas,t=e.width,i=e.height;this._canvas.width=t,this._canvas.height=i,this._canvas.style.width=t+"px",this._canvas.style.height=i+"px",this._viewer.layerContainer.appendChild(this._canvas)}}},{key:"_addedHook",value:function(){var e=this._viewer.scene,t=this._viewer.camera,i=Cesium.Ellipsoid.WGS84;this._nativeObjCesium.intersectsCoordinate=function(n){if(e.mode===Cesium.SceneMode.SCENE3D){var r=new Cesium.EllipsoidalOccluder(i,t.position),o=Cesium.Cartesian3.fromDegrees(n[0],n[1]);return r.isPointVisible(o)}return e.mode!==Cesium.SceneMode.SCENE2D||!(-180===n[0]||180===n[0])},this._nativeObjCesium.project=function(t){var i=Cesium.Cartesian3.fromDegrees(t[0],t[1]),n=e.cartesianToCanvasCoordinates(i,new Cesium.Cartesian2);return n?[n.x,n.y]:(console.log("this._nativeObjCesium.project",t,n),null)},this._nativeObjCesium.unProject=function(n){var r=new Cesium.Cartesian2(n[0],n[1]),o=void 0;if(!(o=e.mode===Cesium.SceneMode.SCENE3D?e.globe.pick(t.getPickRay(r),e):e.camera.pickEllipsoid(r,i)))return null;var s=i.cartesianToCartographic(o),a=Cesium.Math.toDegrees(s.latitude);return[Cesium.Math.toDegrees(s.longitude),a]}}},{key:"_onAdd",value:function(e){this._viewer=e,this._mountCanvas();var t=this._canvas.getContext("2d");this._nativeObjCesium||(this._nativeObjCesium=new Rc(t),this._nativeObjCesium.setOptions(this._options),this._addedHook()),this._data&&(this._nativeObjCesium.setData(this._data),this._nativeObjCesium.prerender(),this._nativeObjCesium.render())}},{key:"_onRemove",value:function(){this._nativeObjCesium&&this._nativeObjCesium.stop(),this._canvas&&this._viewer.layerContainer.removeChild(this._canvas),delete this._canvas}},{key:"setData",value:function(e,t){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._nativeObjCesium&&(this._nativeObjCesium.setData(this._data),t&&(this._options=jc(jc({},this._options),t),this._nativeObjCesium.setOptions(this._options)),this._nativeObjCesium.prerender(),this._nativeObjCesium.render()),this}},{key:"setOptions",value:function(e){return this._options=jc(jc({},this._options),e),this._nativeObjCesium&&(this._nativeObjCesium.setOptions(this._options),this._nativeObjCesium.prerender(),this._nativeObjCesium.render()),this}}]),i}(mr);mr.registerType("wind");const Bc=Dc;var Gc=Cesium,Hc=Gc.Cartesian3,Nc=Gc.Primitive,zc=Gc.Material,Fc=Gc.Geometry,Wc=Gc.MaterialAppearance,Uc=Gc.GeometryAttribute,Vc=Gc.ComponentDatatype,qc=Gc.PrimitiveType,Zc=Gc.BoundingSphere,Yc=Gc.VertexFormat,Kc=Gc.GeometryAttributes,Qc=Gc.Check,Xc=new Yc,Jc=new Hc,$c=function(){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._normal=i.normal,this._radius=i.radius,this._center=i.center;var r=null!==(t=i.vertexFormat)&&void 0!==t?t:Yc.DEFAULT;this._vertexFormat=r}return a(e,null,[{key:"pack",value:function(e,t,i){var n;return Qc.typeOf.object("value",e),Qc.defined("array",t),i=null!==(n=i)&&void 0!==n?n:0,Yc.pack(e._vertexFormat,t,i),i+=Yc.packedLength,Hc.pack(e._normal,t,i),i+=Hc.packedLength,t[i++]=e._radius,t}},{key:"unpack",value:function(e,t,i){var n;Qc.defined("array",e),t=null!==(n=t)&&void 0!==n?n:0;var r=Yc.unpack(e,t,Xc);t+=Yc.packedLength;var o=Hc.unpack(e,t,Jc),s=e[t+=Hc.packedLength];return defined(i)?(i._vertexFormat=Yc.clone(r,i._vertexFormat),i._normal=Hc.clone(o,i._normal),i._radius=s,i):new PlaneGeometry({vertexFormat:r,normal:o,radius:s})}},{key:"createGeometry",value:function(e){var t,i=Math.max(1,.02*e._radius),n=Math.max(.2*e._radius,2*i),r=[],o=[],s=e._center,a=s.x,l=s.y,u=s.z;Hc.equals(e._normal,Hc.UNIT_X)?(r=[a,-i+l,i+u,a,-n+l,i+u,a,-n+l,n+u,a,-i+l,n+u],t=new Hc(a,-(i+n)/2+l,(i+n)/2+u),o=[1,0,0,1,0,0,1,0,0,1,0,0]):Hc.equals(e._normal,Hc.UNIT_Y)?(r=[i+a,l,i+u,n+a,l,i+u,n+a,l,n+u,i+a,l,n+u],t=new Hc((i+n)/2+a,l,(i+n)/2+u),o=[0,1,0,0,1,0,0,1,0,0,1,0]):Hc.equals(e._normal,Hc.UNIT_Z)&&(r=[i+a,-i+l,u,n+a,-i+l,u,n+a,-n+l,u,i+a,-n+l,u],t=new Hc((i+n)/2+a,-(i+n)/2+l,u),o=[0,0,1,0,0,1,0,0,1,0,0,1]),r=new Float32Array(De(r));var c=new Float32Array([0,0,1,0,1,1,0,1]),h=new Uint16Array([0,1,2,2,3,0]);return new Fc({attributes:new Kc({position:new Uc({componentDatatype:Vc.DOUBLE,componentsPerAttribute:3,values:r}),normal:new Uc({componentDatatype:Vc.FLOAT,componentsPerAttribute:3,values:o}),st:new Uc({componentDatatype:Vc.FLOAT,componentsPerAttribute:2,values:c})}),indices:h,primitiveType:qc.TRIANGLES,boundingSphere:new Zc(t,(i+n)/2)})}}]),e}();Z($c,"packedLength",Yc.packedLength+Hc.packedLength+1);const eh=a((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._center=t.center,this._modelMatrix=t.modelMatrix,this._color=t.color;var i=t.radius;this._normal=t.normal;var r=new $c({normal:this._normal,radius:i,vertexFormat:Yc.DEFAULT,center:this._center}),o=new Cesium.GeometryInstance({geometry:$c.createGeometry(r)}),s=new Nc({asynchronous:!1,geometryInstances:o,modelMatrix:this._modelMatrix,appearance:new Wc({material:zc.fromType("Color",{color:this._color})})});return s.isAxisPlane=!0,s.normal=this._normal,s.axis=t.axis,s.color=this._color,s}));const th="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nin float v_polylineAngle;\n\nconst float maskLength = 16.0;\n\nmat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // dashLength <= 0 时按实线绘制,避免除零导致 alpha=NaN、axis 不可见\n vec4 fragColor = color;\n if (dashLength > 0.0) {\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\n float maskIndex = floor(dashPosition * maskLength);\n float maskTest = floor(dashPattern / pow(2.0, maskIndex));\n fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n }\n if (fragColor.a < 0.005) {\n discard;\n }\n\n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n}\n";function ih(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return nh(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return nh(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function nh(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var rh=Cesium,oh=rh.PrimitiveCollection,sh=rh.PolylineCollection,ah=rh.Material,lh=rh.Color,uh=rh.Cartesian3,ch=rh.Cartesian2,hh=rh.Matrix4,fh=rh.Matrix3,ph=rh.Quaternion,mh=rh.PointPrimitiveCollection,dh=rh.ScreenSpaceEventHandler,vh=rh.ScreenSpaceEventType,yh=rh.Polyline,gh=rh.Primitive,_h=rh.Math,Ch=rh.Plane,bh=rh.Model,wh=rh.IntersectionTests,Ph=rh.Transforms,Oh=rh.PointPrimitive,xh=rh.Event,Eh=rh.Cartographic,Ah=rh.HeadingPitchRoll,kh=new uh,Th=new ph,Mh=new fh,Rh=new uh,Sh=(new uh,new hh),jh=new hh;function Ih(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function Lh(e,t){e instanceof yh?e.material.uniforms.color=t:e instanceof gh?e.appearance.material.uniforms.color=t:e instanceof Oh&&(e.color=t)}function Dh(e,t){var i=new uh,n=viewer.camera.getPickRay(e),r=new Ch(uh.UNIT_X,0);return Ch.fromPointNormal(t.center,t.activePrimitive.normal,r),Ch.transform(r,t._modelMatrix,r),wh.rayPlane(n,r,i)?(hh.multiplyByPoint(t._inverseModelMatrix,i,i),i):(uh.clone(t.center,i),i)}var Bh=new ch,Gh=new ch;function Hh(e,t,i,n){var r=e.activePrimitive.relativeAxis||[e.activePrimitive];if(Array.isArray(r)){var o,s,a,l=e._viewer.camera.positionCartographic.height/1047,u=ih(r);try{for(u.s();!(o=u.n()).done;){var c=o.value,h=c.positions.map((function(t){return hh.multiplyByPoint(e._modelMatrix,t,new uh)})).map((function(t){return ANOVGIS.Transform.transformCartesian3ToWindow(t,e._viewer)})),f=(s=ch.subtract.apply(ch,De(h).concat([Bh])),a=ch.subtract(i,t,Gh),ch.normalize(s,s),ch.dot(s,a));n[c.axis.toLowerCase()]=f*l}}catch(e){u.e(e)}finally{u.f()}return n}}var Nh="None",zh="T",Fh="R",Wh="S",Uh=function(){function e(){var t,i,r,o,s,a,l,u,c,h,f,p,m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.lineWidth=null!==(t=m.lineWidth)&&void 0!==t?t:15,this.xAxisColor=null!==(i=m.xAxisColor)&&void 0!==i?i:lh.RED,this.yAxisColor=null!==(r=m.yAxisColor)&&void 0!==r?r:lh.GREEN,this.zAxisColor=null!==(o=m.zAxisColor)&&void 0!==o?o:lh.BLUE,this.scaleAxisColor=null!==(s=m.scaleAxisColor)&&void 0!==s?s:lh.WHITE,this.activeAxisColor=null!==(a=m.activeAxisColor)&&void 0!==a?a:lh.YELLOW,this.originColor=null!==(l=m.originColor)&&void 0!==l?l:lh.WHITE,this._translateEnabled=null===(u=m.translateEnabled)||void 0===u||u,this._rotateEnabled=null!==(c=m.rotateEnabled)&&void 0!==c&&c,this._scaleEnabled=null!==(h=m.scaleEnabled)&&void 0!==h&&h,this._radiusRatio=null!==(f=m.radiusRatio)&&void 0!==f?f:1,this.xAxisLength=m.xAxisLength,this.yAxisLength=m.yAxisLength,this.zAxisLength=m.zAxisLength,this.scaleAxisLength=m.scaleAxisLength,this.root=new oh,this.object=null,this._modelMatrix=void 0,this._primitives=[],this._center=new uh,this._radius=0,this._originOffset=null!==(p=m.originOffset)&&void 0!==p?p:new uh,this._selectedPrimitives=[],this._offset=new uh(0,0,0),this._angle=0,this.rotatePlaneRadius=m.rotatePlaneRadius,this._mode=Nh,this.preTranformEvent=new xh,this.postTransformEvent=new xh,this.postRoatationEvent=new xh,this.postScaleEvent=new xh}return a(e,[{key:"translateEnabled",get:function(){return this._translateEnabled},set:function(e){this._translateEnabled=e;var t,i=ih(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Fh)||r.includes(Wh)||(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"rotateEnabled",get:function(){return this._rotateEnabled},set:function(e){this._rotateEnabled=e;var t,i=ih(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Fh)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"scaleEnabled",get:function(){return this._scaleEnabled},set:function(e){this._scaleEnabled=e;var t,i=ih(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Wh)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"center",get:function(){return uh.add(this._center,this._originOffset,new uh)}},{key:"modelMatrix",get:function(){return this._modelMatrix},set:function(e){if(!e)return this._modelMatrix=void 0,void(this._inverseModelMatrix=void 0);this._modelMatrix=e,this._inverseModelMatrix=hh.inverse(e,new hh)}},{key:"createMoveAxis",value:function(){var e,t,i;if(this.center){var n=this._radius*this._radiusRatio,r=this.axisRoot,o=this.center,s=[o,new uh((null!==(e=this.xAxisLength)&&void 0!==e?e:n)+o.x,o.y,o.z)];this.xAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.xAxisColor)}),this.xNormal=new uh,uh.subtract(s[1],s[0],this.xNormal),uh.normalize(this.xNormal,this.xNormal),this.xAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.xAxis.axis="X",this.xAxis.color=this.xAxisColor,s=[o,new uh(o.x,-(null!==(t=this.yAxisLength)&&void 0!==t?t:n)+o.y,o.z)],this.yAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.yAxisColor)}),this.yNormal=new uh,uh.subtract(s[1],s[0],this.yNormal),uh.normalize(this.yNormal,this.yNormal),this.yAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.yAxis.axis="Y",this.yAxis.color=this.yAxisColor,s=[o,new uh(o.x,o.y,(null!==(i=this.zAxisLength)&&void 0!==i?i:n)+o.z)],this.zAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.zAxisColor)}),this.zNormal=new uh,uh.subtract(s[1],s[0],this.zNormal),uh.normalize(this.zNormal,this.zNormal),this.zAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.zAxis.axis="Z",this.zAxis.color=this.zAxisColor,this._primitives.push(this.xAxis,this.yAxis,this.zAxis)}}},{key:"createAxisPlane",value:function(){this.XOYPlane=this.root.add(new eh({color:this.zAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new uh(0,0,1),axis:"XY"})),this.XOYPlane.relativeAxis=[this.xAxis,this.yAxis],this.XOZPlane=this.root.add(new eh({color:this.yAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new uh(0,1,0),axis:"XZ"})),this.XOZPlane.relativeAxis=[this.xAxis,this.zAxis],this.YOZPlane=this.root.add(new eh({color:this.xAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new uh(1,0,0),axis:"YZ"})),this.YOZPlane.relativeAxis=[this.yAxis,this.zAxis],this._primitives.push(this.XOYPlane,this.YOZPlane,this.XOZPlane)}},{key:"createOrignPoint",value:function(){var e=new mh({modelMatrix:this.modelMatrix});this.origin=e.add({show:!0,position:this.center,pixelSize:1.5*this.lineWidth,color:this.originColor}),this.origin.axis="XYZ",this.origin.pcolor=this.originColor,this.root.add(e),this._primitives.push(this.origin)}},{key:"getAxisMaterial",value:function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16;return new ah(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{fabric:{type:"dasharrow",source:th,uniforms:{color:e,gapColor:lh.TRANSPARENT,dashLength:t,dashPattern:255}}}:{fabric:{type:"PolylineArrow",uniforms:{color:e}}})}},{key:"createRotateAxis",value:function(){for(var e=[],t=this.rotatePlaneRadius||this._radius*this._radiusRatio,i=this.center,n=0;n<=360;n++){var r=n/180*Math.PI;e.push(new uh(i.x+t*Math.cos(r),i.y+t*Math.sin(r),i.z))}this.zRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.zAxisColor,!0,0)}),this.zRotate.axis="RZ",this.zRotate.color=this.zAxisColor,this.zRotate.normal=new uh(0,0,1),e.splice(0);for(var o=0;o<=360;o++){var s=o/180*Math.PI;e.push(new uh(i.x+t*Math.cos(s),i.y,i.z+t*Math.sin(s)))}this.yRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.yAxisColor,!0,0)}),this.yRotate.axis="RY",this.yRotate.color=this.yAxisColor,this.yRotate.normal=new uh(0,1,0),e.splice(0);for(var a=0;a<=360;a++){var l=a/180*Math.PI;e.push(new uh(i.x,i.y+t*Math.cos(l),i.z+t*Math.sin(l)))}this.xRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.xAxisColor,!0,0)}),this.xRotate.axis="RX",this.xRotate.color=this.xAxisColor,this.xRotate.normal=new uh(-1,0,0),this.rAxuStart=this.axisRoot.add({positions:[],width:this.lineWidth/2,material:this.getAxisMaterial(this.activeAxisColor,!0,0)}),this.rAxuEnd=this.axisRoot.add({positions:[],width:this.lineWidth/2,material:this.getAxisMaterial(this.activeAxisColor,!0,0)}),this._primitives.push(this.xRotate,this.yRotate,this.zRotate,this.rAxuStart,this.rAxuEnd)}},{key:"createScaleAxis",value:function(){var e,t=this._radius*this._radiusRatio,i=new uh(1,1,1);this.xNormal&&this.yNormal&&this.zNormal&&(uh.add(this.xNormal,this.yNormal,i),uh.add(i,this.zNormal,i)),uh.normalize(i,i);var n=null!==(e=this.scaleAxisLength)&&void 0!==e?e:t,r=new uh;uh.multiplyByScalar(i,n,r),uh.add(this._center,r,r),this.scaleAxis=this.axisRoot.add({positions:[this._center,r],width:this.lineWidth,material:this.getAxisMaterial(this.scaleAxisColor)}),this._primitives.push(this.scaleAxis),this.scaleAxis.axis="SXYZ",this.scaleAxis.color=this.scaleAxisColor}},{key:"bind",value:function(e){var t=this;if(!this._viewer)throw new Error("please call addTo method to add to viewer");if(this.unbind(),this._hasBindObject=!0,this.object=e,e instanceof bh!=!1){this.modelMatrix=e.modelMatrix;var i=function(){hh.multiplyByPoint(t._inverseModelMatrix,e.boundingSphere.center,t._center),t._radius=e.boundingSphere.radius,t.createPrimitive()};e.ready?i():e.readyEvent.addEventListener(i)}else this.bindPosition(e)}},{key:"bindPosition",value:function(e){if("function"==typeof e.getValue&&(e=e.getValue(this._viewer.clock.currentTime)),e instanceof uh==!1)throw new Error("position is invalid");this._hasBindObject=!0,this.modelMatrix=Ph.eastNorthUpToFixedFrame(e),this._center=new uh,uh.clone(this.originOffset,this._center),this._radius=10,this.createPrimitive()}},{key:"createPrimitive",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=new sh({modelMatrix:this.modelMatrix});this.axisRoot=t,this.root.add(t),this.createOrignPoint(),this.translateEnabled&&this.createMoveAxis(),this.translateEnabled&&this.createAxisPlane(),e&&this.rotateEnabled&&this.createRotateAxis(),e&&this.scaleEnabled&&this.createScaleAxis()}},{key:"unbind",value:function(){this.object=void 0,this.root.removeAll(),this.origon=void 0,this.xAxis=void 0,this.yAxis=void 0,this.zAxis=void 0,this.modelMatrix=void 0,this._hasBindObject=!1}},{key:"addTo",value:function(e){this._viewer=e,e.scene.primitives.add(this.root),this.addEventListener()}},{key:"addEventListener",value:function(){var e=this,t=this._viewer,i=new dh(t.canvas);i.setInputAction((function(n){if(e._hasBindObject){var r=t.scene.pick(n.position);r&&e._primitives.includes(r.primitive)&&(e._mousedownPixel=n.position,e.active(r.primitive),e._offset=new uh,e._angle=0,i.setInputAction((function(t){var i=t.startPosition,n=t.endPosition;e.transform(i,n)}),vh.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!1)}}),vh.LEFT_DOWN),i.setInputAction((function(n){e._hasBindObject&&(e.active(null),i.removeInputAction(vh.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!0,e.translateEnabled&&(e.xAux.positions=[],e.yAux.positions=[],e.zAux.positions=[]),e.rotateEnabled&&(e.rAxuStart.positions=[],e.rAxuEnd.positions=[]))}),vh.LEFT_UP),this._removeEventListener=function(){i.removeInputAction(vh.LEFT_DOWN),i.removeInputAction(vh.LEFT_UP),i.removeInputAction(vh.MOUSE_MOVE)}}},{key:"active",value:function(e){if(e||this.activePrimitive){if(!e&&this.activePrimitive){if(Lh(this.activePrimitive,this.activePrimitive.pcolor||this.activePrimitive.color),this.activePrimitive.isAxisPlane){var t,i=ih(this.activePrimitive.relativeAxis);try{for(i.s();!(t=i.n()).done;){var n=t.value;Lh(n,n.color)}}catch(e){i.e(e)}finally{i.f()}}return this.activePrimitive=void 0,void(this._mode=Nh)}if(e.isAxisPlane){var r,o=ih(e.relativeAxis);try{for(o.s();!(r=o.n()).done;){Lh(r.value,this.activeAxisColor)}}catch(e){o.e(e)}finally{o.f()}}if(this.activePrimitive=e,Lh(this.activePrimitive,this.activeAxisColor),e.axis)if(e.axis.includes("R")){this._mode=Fh;var s=Dh(this._mousedownPixel,this);this.rAxuStart.positions=[this.center,s],this._startLocalPosition=s}else e.axis.includes("S")?this._mode=Wh:this._mode=zh}}},{key:"remove",value:function(){this._viewer.scene.primitives.remove(this.root),this._removeEventListener(),this._primitives.splice(0)}},{key:"getTransform",value:function(){if(!this._modelMatrix)return null;var e=function(e){var t=hh.getTranslation(e,new uh),i=Eh.fromCartesian(t),n=_h.toDegrees(i.longitude),r=_h.toDegrees(i.latitude),o=i.height,s=hh.getMatrix3(e,new fh),a=fh.getColumn(s,0,new uh),l=uh.magnitude(a);if(l<1e-9)return null;fh.multiplyByScalar(s,1/l,s);var u=ph.fromRotationMatrix(s),c=Ah.fromQuaternion(u);return{position:{lng:Ih(n,6),lat:Ih(r,6),alt:Ih(o,2)},orientation:{heading:Ih(_h.toDegrees(c.heading),2),pitch:Ih(_h.toDegrees(c.pitch),2),roll:Ih(_h.toDegrees(c.roll),2)},scale:Ih(l,3)}}(this._modelMatrix);return e?(this.object&&"number"==typeof this.object.scale&&1!==this.object.scale&&(e.scale=Ih(e.scale*this.object.scale,3)),e):null}},{key:"getModelMatrix",value:function(){if(!this._modelMatrix)return null;for(var e=new Array(16),t=0;t<16;t++)if(e[t]=this._modelMatrix[t],!isFinite(e[t]))return null;return e}},{key:"transform",value:function(e,t){if(this.preTranformEvent.raiseEvent(hh.clone(this.modelMatrix,{})),this.activePrimitive===this.origin){var i=ANOVGIS.Transform.transformWindowToCartesian3(t,this._viewer);hh.setTranslation(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=ih(this.root._primitives);try{for(r.s();!(n=r.n()).done;){n.value.modelMatrix=this.modelMatrix}}catch(e){r.e(e)}finally{r.f()}}else if(this._mode===zh)Hh(this,e,t,kh),this.translate(kh);else if(this._mode===Fh){var o=function(e,t,i){var n=e.center;uh.subtract(t,n,t),uh.subtract(i,n,i);var r=uh.dot(t,t),o=uh.dot(i,i);if(r<1e-12||o<1e-12)return 0;var s=uh.dot(uh.normalize(t,t),uh.normalize(i,i)),a=uh.subtract(t,i,Rh),l=t,u=uh.cross(a,l,Rh),c=e.activePrimitive.normal,h=_h.sign(uh.dot(u,c));return isFinite(s)?Math.acos(Math.max(-1,Math.min(1,s)))*h:0}(this,Dh(e,this),Dh(t,this));this.rotate(o)}else if(this._mode=Wh){Hh(this,e,t,kh);var s=uh.distance.apply(uh,De(this.scaleAxis.positions));if(!isFinite(s)||s<1e-9)return;var a=-kh.sxyz/s+1;this.scale(new uh(a,a,a))}this.postTransformEvent.raiseEvent(hh.clone(this.modelMatrix,{}))}},{key:"scale",value:function(e){var t=hh.fromScale(e,Sh);hh.multiply(this._modelMatrix,t,this._modelMatrix),this.modelMatrix=this._modelMatrix;var i,n=ih(this.root._primitives);try{for(n.s();!(i=n.n()).done;){var r=i.value;hh.multiply(r.modelMatrix,t,r.modelMatrix)}}catch(e){n.e(e)}finally{n.f()}this.postScaleEvent.raiseEvent(e,hh.clone(this.modelMatrix,{}))}},{key:"rotate",value:function(e){this._angle+=e;var t=this.activePrimitive.normal,i=hh.fromTranslation(this.center,Sh),n=ph.fromAxisAngle(t,e,Th),r=fh.fromQuaternion(n,Mh),o=hh.fromTranslation(uh.negate(this.center,Rh),jh);hh.multiply(this.modelMatrix,i,this.modelMatrix),hh.multiplyByMatrix3(this.modelMatrix,r,this.modelMatrix),hh.multiply(this.modelMatrix,o,this.modelMatrix);var s,a=ih(this.root._primitives);try{for(a.s();!(s=a.n()).done;){var l=s.value;hh.multiply(l.modelMatrix,i,l.modelMatrix),hh.multiplyByMatrix3(l.modelMatrix,r,l.modelMatrix),hh.multiply(l.modelMatrix,o,l.modelMatrix)}}catch(e){a.e(e)}finally{a.f()}this.postRoatationEvent.raiseEvent(e,t,hh.clone(this.modelMatrix,{})),this.modelMatrix=this._modelMatrix,this.createRotateAux(this._startLocalPosition,this._angle)}},{key:"translate",value:function(e){if(this.activePrimitive){var t=this.activePrimitive.axis;-1===t.indexOf("X")&&(e.x=0),-1===t.indexOf("Y")&&(e.y=0),-1===t.indexOf("Z")&&(e.z=0),e.x=-e.x,e.z=-e.z,uh.add(this._offset,e,this._offset);var i=hh.fromTranslation(e);hh.multiply(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=ih(this.root._primitives);try{for(r.s();!(n=r.n()).done;){var o=n.value;hh.multiply(o.modelMatrix,i,o.modelMatrix)}}catch(e){r.e(e)}finally{r.f()}this.createAux(this._offset,i)}}},{key:"createAux",value:function(e){if(e.x>0){var t=uh.clone(this.xAxis.positions[0]),i=uh.clone(this.xAxis.positions[0]);i.x+=-e.x,this.xAux.positions=[t,i]}else{var n=uh.clone(this.xAxis.positions[1]),r=uh.clone(this.xAxis.positions[1]);r.x+=-e.x,this.xAux.positions=[n,r]}if(e.y<0){var o=uh.clone(this.yAxis.positions[0]),s=uh.clone(this.yAxis.positions[0]);s.y+=-e.y,this.yAux.positions=[o,s]}else{var a=uh.clone(this.yAxis.positions[1]),l=uh.clone(this.yAxis.positions[1]);l.y+=-e.y,this.yAux.positions=[a,l]}if(e.z>0){var u=uh.clone(this.zAxis.positions[0]),c=uh.clone(this.zAxis.positions[0]);c.z+=-e.z,this.zAux.positions=[u,c]}else{var h=uh.clone(this.zAxis.positions[1]),f=uh.clone(this.zAxis.positions[1]);f.z+=-e.z,this.zAux.positions=[h,f]}}},{key:"createRotateAux",value:function(e,t){if(this._startLocalPosition){var i=ph.fromAxisAngle(this.activePrimitive.normal,-t),n=fh.fromQuaternion(i,Mh),r=hh.fromRotation(n,Sh),o=uh.subtract(e,this.center,Rh);hh.multiplyByPoint(r,o,o),uh.add(this.center,o,o),this.rAxuEnd.positions=[this.center,o]}}}]),e}();const Vh=Uh;function qh(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Zh(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Zh(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Zh(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var Yh=Cesium,Kh=Yh.PrimitiveCollection,Qh=Yh.PolylineCollection,Xh=Yh.Material,Jh=Yh.Color,$h=Yh.Cartesian3,ef=Yh.Cartesian2,tf=Yh.Matrix4,nf=Yh.Matrix3,rf=Yh.Quaternion,of=Yh.PointPrimitiveCollection,sf=Yh.ScreenSpaceEventHandler,af=Yh.ScreenSpaceEventType,lf=Yh.Polyline,uf=Yh.Primitive,cf=Yh.Math,hf=Yh.Plane,ff=(Yh.Model,Yh.IntersectionTests),pf=Yh.Transforms,mf=Yh.PointPrimitive,df=Yh.Event,vf=Yh.Cartographic,yf=Yh.HeadingPitchRoll,gf=new $h,_f=new rf,Cf=new nf,bf=new $h,wf=(new $h,new tf),Pf=new tf;function Of(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function xf(e,t){e instanceof lf?e.material.uniforms.color=t:e instanceof uf?e.appearance.material.uniforms.color=t:e instanceof mf&&(e.color=t)}function Ef(e,t){var i=new $h,n=viewer.camera.getPickRay(e),r=new hf($h.UNIT_X,0);return hf.fromPointNormal(t.center,t.activePrimitive.normal,r),hf.transform(r,t._modelMatrix,r),ff.rayPlane(n,r,i)?(tf.multiplyByPoint(t._inverseModelMatrix,i,i),i):($h.clone(t.center,i),i)}var Af=new ef,kf=new ef;function Tf(e,t,i,n){var r=e.activePrimitive.relativeAxis||[e.activePrimitive];if(Array.isArray(r)){var o,s,a,l=e._viewer.camera.positionCartographic.height/1047,u=qh(r);try{for(u.s();!(o=u.n()).done;){var c=o.value,h=c.positions.map((function(t){return tf.multiplyByPoint(e._modelMatrix,t,new $h)})).map((function(t){return ANOVGIS.Transform.transformCartesian3ToWindow(t,e._viewer)})),f=(s=ef.subtract.apply(ef,De(h).concat([Af])),a=ef.subtract(i,t,kf),ef.normalize(s,s),ef.dot(s,a));n[c.axis.toLowerCase()]=f*l}}catch(e){u.e(e)}finally{u.f()}return n}}var Mf="None",Rf="T",Sf="R",jf="S",If=function(){function e(){var t,i,r,o,s,a,l,u,c,h,f,p,m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.lineWidth=null!==(t=m.lineWidth)&&void 0!==t?t:15,this.xAxisColor=null!==(i=m.xAxisColor)&&void 0!==i?i:Jh.RED,this.yAxisColor=null!==(r=m.yAxisColor)&&void 0!==r?r:Jh.GREEN,this.zAxisColor=null!==(o=m.zAxisColor)&&void 0!==o?o:Jh.BLUE,this.scaleAxisColor=null!==(s=m.scaleAxisColor)&&void 0!==s?s:Jh.WHITE,this.activeAxisColor=null!==(a=m.activeAxisColor)&&void 0!==a?a:Jh.YELLOW,this.originColor=null!==(l=m.originColor)&&void 0!==l?l:Jh.WHITE,this._translateEnabled=null===(u=m.translateEnabled)||void 0===u||u,this._rotateEnabled=null!==(c=m.rotateEnabled)&&void 0!==c&&c,this._scaleEnabled=null!==(h=m.scaleEnabled)&&void 0!==h&&h,this._radiusRatio=null!==(f=m.radiusRatio)&&void 0!==f?f:1,this.xAxisLength=m.xAxisLength,this.yAxisLength=m.yAxisLength,this.zAxisLength=m.zAxisLength,this.scaleAxisLength=m.scaleAxisLength,this.root=new Kh,this.object=null,this._modelMatrix=void 0,this._primitives=[],this._center=new $h,this._radius=0,this._originOffset=null!==(p=m.originOffset)&&void 0!==p?p:new $h,this._selectedPrimitives=[],this._offset=new $h(0,0,0),this._angle=0,this.rotatePlaneRadius=m.rotatePlaneRadius,this._mode=Mf,this.preTranformEvent=new df,this.postTransformEvent=new df,this.postRoatationEvent=new df,this.postScaleEvent=new df}return a(e,[{key:"translateEnabled",get:function(){return this._translateEnabled},set:function(e){this._translateEnabled=e;var t,i=qh(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Sf)||r.includes(jf)||(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"rotateEnabled",get:function(){return this._rotateEnabled},set:function(e){this._rotateEnabled=e;var t,i=qh(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(Sf)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"scaleEnabled",get:function(){return this._scaleEnabled},set:function(e){this._scaleEnabled=e;var t,i=qh(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(jf)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"center",get:function(){return $h.add(this._center,this._originOffset,new $h)}},{key:"modelMatrix",get:function(){return this._modelMatrix},set:function(e){if(!e)return this._modelMatrix=void 0,void(this._inverseModelMatrix=void 0);this._modelMatrix=e,this._inverseModelMatrix=tf.inverse(e,new tf)}},{key:"createMoveAxis",value:function(){var e,t,i;if(this.center){var n=this._radius*this._radiusRatio,r=this.axisRoot,o=this.center,s=[o,new $h((null!==(e=this.xAxisLength)&&void 0!==e?e:n)+o.x,o.y,o.z)];this.xAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.xAxisColor)}),this.xNormal=new $h,$h.subtract(s[1],s[0],this.xNormal),$h.normalize(this.xNormal,this.xNormal),this.xAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.xAxis.axis="X",this.xAxis.color=this.xAxisColor,s=[o,new $h(o.x,-(null!==(t=this.yAxisLength)&&void 0!==t?t:n)+o.y,o.z)],this.yAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.yAxisColor)}),this.yNormal=new $h,$h.subtract(s[1],s[0],this.yNormal),$h.normalize(this.yNormal,this.yNormal),this.yAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.yAxis.axis="Y",this.yAxis.color=this.yAxisColor,s=[o,new $h(o.x,o.y,(null!==(i=this.zAxisLength)&&void 0!==i?i:n)+o.z)],this.zAxis=r.add({positions:s,width:this.lineWidth,material:this.getAxisMaterial(this.zAxisColor)}),this.zNormal=new $h,$h.subtract(s[1],s[0],this.zNormal),$h.normalize(this.zNormal,this.zNormal),this.zAux=r.add({positions:[],width:this.lineWidth,material:this.getAxisMaterial(this.activeAxisColor,!0)}),this.zAxis.axis="Z",this.zAxis.color=this.zAxisColor,this._primitives.push(this.xAxis,this.yAxis,this.zAxis)}}},{key:"createAxisPlane",value:function(){this.XOYPlane=this.root.add(new eh({color:this.zAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new $h(0,0,1),axis:"XY"})),this.XOYPlane.relativeAxis=[this.xAxis,this.yAxis],this.XOZPlane=this.root.add(new eh({color:this.yAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new $h(0,1,0),axis:"XZ"})),this.XOZPlane.relativeAxis=[this.xAxis,this.zAxis],this.YOZPlane=this.root.add(new eh({color:this.xAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new $h(1,0,0),axis:"YZ"})),this.YOZPlane.relativeAxis=[this.yAxis,this.zAxis],this._primitives.push(this.XOYPlane,this.YOZPlane,this.XOZPlane)}},{key:"createOrignPoint",value:function(){var e=new of({modelMatrix:this.modelMatrix});this.origin=e.add({show:!0,position:this.center,pixelSize:1.5*this.lineWidth,color:this.originColor}),this.origin.axis="XYZ",this.origin.pcolor=this.originColor,this.root.add(e),this._primitives.push(this.origin)}},{key:"getAxisMaterial",value:function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16;return new Xh(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{fabric:{type:"dasharrow",source:th,uniforms:{color:e,gapColor:Jh.TRANSPARENT,dashLength:t,dashPattern:255}}}:{fabric:{type:"PolylineArrow",uniforms:{color:e}}})}},{key:"createRotateAxis",value:function(){for(var e=[],t=this.rotatePlaneRadius||this._radius*this._radiusRatio,i=this.center,n=0;n<=360;n++){var r=n/180*Math.PI;e.push(new $h(i.x+t*Math.cos(r),i.y+t*Math.sin(r),i.z))}this.zRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.zAxisColor,!0,0)}),this.zRotate.axis="RZ",this.zRotate.color=this.zAxisColor,this.zRotate.normal=new $h(0,0,1),e.splice(0);for(var o=0;o<=360;o++){var s=o/180*Math.PI;e.push(new $h(i.x+t*Math.cos(s),i.y,i.z+t*Math.sin(s)))}this.yRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.yAxisColor,!0,0)}),this.yRotate.axis="RY",this.yRotate.color=this.yAxisColor,this.yRotate.normal=new $h(0,1,0),e.splice(0);for(var a=0;a<=360;a++){var l=a/180*Math.PI;e.push(new $h(i.x,i.y+t*Math.cos(l),i.z+t*Math.sin(l)))}this.xRotate=this.axisRoot.add({positions:[].concat(e),width:this.lineWidth,material:this.getAxisMaterial(this.xAxisColor,!0,0)}),this.xRotate.axis="RX",this.xRotate.color=this.xAxisColor,this.xRotate.normal=new $h(-1,0,0),this.rAxuStart=this.axisRoot.add({positions:[],width:this.lineWidth/2,material:this.getAxisMaterial(this.activeAxisColor,!0,0)}),this.rAxuEnd=this.axisRoot.add({positions:[],width:this.lineWidth/2,material:this.getAxisMaterial(this.activeAxisColor,!0,0)}),this._primitives.push(this.xRotate,this.yRotate,this.zRotate,this.rAxuStart,this.rAxuEnd)}},{key:"createScaleAxis",value:function(){var e,t=this._radius*this._radiusRatio,i=new $h(1,1,1);this.xNormal&&this.yNormal&&this.zNormal&&($h.add(this.xNormal,this.yNormal,i),$h.add(i,this.zNormal,i)),$h.normalize(i,i);var n=null!==(e=this.scaleAxisLength)&&void 0!==e?e:t,r=new $h;$h.multiplyByScalar(i,n,r),$h.add(this._center,r,r),this.scaleAxis=this.axisRoot.add({positions:[this._center,r],width:this.lineWidth,material:this.getAxisMaterial(this.scaleAxisColor)}),this._primitives.push(this.scaleAxis),this.scaleAxis.axis="SXYZ",this.scaleAxis.color=this.scaleAxisColor}},{key:"bind",value:function(e){var t=this;if(!this._viewer)throw new Error("please call addTo method to add to viewer");if(this.unbind(),this._hasBindObject=!0,this.object=e,!!(!e||!e.root||void 0===e.root.transform))throw new Error("TilesetEditor 仅支持 cesium3DTileset, 请传入 tileset.nativeObjCesium");this.modelMatrix=e.root.transform;var i=function(){tf.multiplyByPoint(t._inverseModelMatrix,e.boundingSphere.center,t._center),t._radius=e.boundingSphere.radius,t.createPrimitive()};e.readyPromise&&"function"==typeof e.readyPromise.then?e.readyPromise.then(i):i()}},{key:"bindPosition",value:function(e){if("function"==typeof e.getValue&&(e=e.getValue(this._viewer.clock.currentTime)),e instanceof $h==!1)throw new Error("position is invalid");this._hasBindObject=!0,this.modelMatrix=pf.eastNorthUpToFixedFrame(e),this._center=new $h,$h.clone(this.originOffset,this._center),this._radius=10,this.createPrimitive()}},{key:"createPrimitive",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=new Qh({modelMatrix:this.modelMatrix});this.axisRoot=t,this.root.add(t),this.createOrignPoint(),this.translateEnabled&&this.createMoveAxis(),this.translateEnabled&&this.createAxisPlane(),e&&this.rotateEnabled&&this.createRotateAxis(),e&&this.scaleEnabled&&this.createScaleAxis()}},{key:"unbind",value:function(){this.object=void 0,this.root.removeAll(),this.origon=void 0,this.xAxis=void 0,this.yAxis=void 0,this.zAxis=void 0,this.modelMatrix=void 0,this._hasBindObject=!1}},{key:"addTo",value:function(e){this._viewer=e,e.scene.primitives.add(this.root),this.addEventListener()}},{key:"addEventListener",value:function(){var e=this,t=this._viewer,i=new sf(t.canvas);i.setInputAction((function(n){if(e._hasBindObject){var r=t.scene.pick(n.position);r&&e._primitives.includes(r.primitive)&&(e._mousedownPixel=n.position,e.active(r.primitive),e._offset=new $h,e._angle=0,i.setInputAction((function(t){var i=t.startPosition,n=t.endPosition;e.transform(i,n)}),af.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!1)}}),af.LEFT_DOWN),i.setInputAction((function(n){e._hasBindObject&&(e.active(null),i.removeInputAction(af.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!0,e.translateEnabled&&(e.xAux.positions=[],e.yAux.positions=[],e.zAux.positions=[]),e.rotateEnabled&&(e.rAxuStart.positions=[],e.rAxuEnd.positions=[]))}),af.LEFT_UP),this._removeEventListener=function(){i.removeInputAction(af.LEFT_DOWN),i.removeInputAction(af.LEFT_UP),i.removeInputAction(af.MOUSE_MOVE)}}},{key:"active",value:function(e){if(e||this.activePrimitive){if(!e&&this.activePrimitive){if(xf(this.activePrimitive,this.activePrimitive.pcolor||this.activePrimitive.color),this.activePrimitive.isAxisPlane){var t,i=qh(this.activePrimitive.relativeAxis);try{for(i.s();!(t=i.n()).done;){var n=t.value;xf(n,n.color)}}catch(e){i.e(e)}finally{i.f()}}return this.activePrimitive=void 0,void(this._mode=Mf)}if(e.isAxisPlane){var r,o=qh(e.relativeAxis);try{for(o.s();!(r=o.n()).done;){xf(r.value,this.activeAxisColor)}}catch(e){o.e(e)}finally{o.f()}}if(this.activePrimitive=e,xf(this.activePrimitive,this.activeAxisColor),e.axis)if(e.axis.includes("R")){this._mode=Sf;var s=Ef(this._mousedownPixel,this);this.rAxuStart.positions=[this.center,s],this._startLocalPosition=s}else e.axis.includes("S")?this._mode=jf:this._mode=Rf}}},{key:"remove",value:function(){this._viewer.scene.primitives.remove(this.root),this._removeEventListener(),this._primitives.splice(0)}},{key:"getTransform",value:function(){if(!this._modelMatrix)return null;var e=function(e){var t=tf.getTranslation(e,new $h),i=vf.fromCartesian(t),n=cf.toDegrees(i.longitude),r=cf.toDegrees(i.latitude),o=i.height,s=tf.getMatrix3(e,new nf),a=nf.getColumn(s,0,new $h),l=$h.magnitude(a);if(l<1e-9)return null;nf.multiplyByScalar(s,1/l,s);var u=rf.fromRotationMatrix(s),c=yf.fromQuaternion(u);return{position:{lng:Of(n,6),lat:Of(r,6),alt:Of(o,2)},orientation:{heading:Of(cf.toDegrees(c.heading),2),pitch:Of(cf.toDegrees(c.pitch),2),roll:Of(cf.toDegrees(c.roll),2)},scale:Of(l,3)}}(this._modelMatrix);return e?(this.object&&"number"==typeof this.object.scale&&1!==this.object.scale&&(e.scale=Of(e.scale*this.object.scale,3)),e):null}},{key:"getModelMatrix",value:function(){if(!this._modelMatrix)return null;for(var e=new Array(16),t=0;t<16;t++)if(e[t]=this._modelMatrix[t],!isFinite(e[t]))return null;return e}},{key:"transform",value:function(e,t){if(this.preTranformEvent.raiseEvent(tf.clone(this.modelMatrix,{})),this.activePrimitive===this.origin){var i=ANOVGIS.Transform.transformWindowToCartesian3(t,this._viewer);tf.setTranslation(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=qh(this.root._primitives);try{for(r.s();!(n=r.n()).done;){n.value.modelMatrix=this.modelMatrix}}catch(e){r.e(e)}finally{r.f()}}else if(this._mode===Rf)Tf(this,e,t,gf),this.translate(gf);else if(this._mode===Sf){var o=function(e,t,i){var n=e.center;$h.subtract(t,n,t),$h.subtract(i,n,i);var r=$h.dot(t,t),o=$h.dot(i,i);if(r<1e-12||o<1e-12)return 0;var s=$h.dot($h.normalize(t,t),$h.normalize(i,i)),a=$h.subtract(t,i,bf),l=t,u=$h.cross(a,l,bf),c=e.activePrimitive.normal,h=cf.sign($h.dot(u,c));return isFinite(s)?Math.acos(Math.max(-1,Math.min(1,s)))*h:0}(this,Ef(e,this),Ef(t,this));this.rotate(o)}else if(this._mode=jf){Tf(this,e,t,gf);var s=$h.distance.apply($h,De(this.scaleAxis.positions));if(!isFinite(s)||s<1e-9)return;var a=-gf.sxyz/s+1;this.scale(new $h(a,a,a))}this.postTransformEvent.raiseEvent(tf.clone(this.modelMatrix,{}))}},{key:"scale",value:function(e){var t=tf.fromScale(e,wf);tf.multiply(this._modelMatrix,t,this._modelMatrix),this.modelMatrix=this._modelMatrix;var i,n=qh(this.root._primitives);try{for(n.s();!(i=n.n()).done;){var r=i.value;tf.multiply(r.modelMatrix,t,r.modelMatrix)}}catch(e){n.e(e)}finally{n.f()}this.postScaleEvent.raiseEvent(e,tf.clone(this.modelMatrix,{}))}},{key:"rotate",value:function(e){this._angle+=e;var t=this.activePrimitive.normal,i=tf.fromTranslation(this.center,wf),n=rf.fromAxisAngle(t,e,_f),r=nf.fromQuaternion(n,Cf),o=tf.fromTranslation($h.negate(this.center,bf),Pf);tf.multiply(this.modelMatrix,i,this.modelMatrix),tf.multiplyByMatrix3(this.modelMatrix,r,this.modelMatrix),tf.multiply(this.modelMatrix,o,this.modelMatrix);var s,a=qh(this.root._primitives);try{for(a.s();!(s=a.n()).done;){var l=s.value;tf.multiply(l.modelMatrix,i,l.modelMatrix),tf.multiplyByMatrix3(l.modelMatrix,r,l.modelMatrix),tf.multiply(l.modelMatrix,o,l.modelMatrix)}}catch(e){a.e(e)}finally{a.f()}this.postRoatationEvent.raiseEvent(e,t,tf.clone(this.modelMatrix,{})),this.modelMatrix=this._modelMatrix,this.createRotateAux(this._startLocalPosition,this._angle)}},{key:"translate",value:function(e){if(this.activePrimitive){var t=this.activePrimitive.axis;-1===t.indexOf("X")&&(e.x=0),-1===t.indexOf("Y")&&(e.y=0),-1===t.indexOf("Z")&&(e.z=0),e.x=-e.x,e.z=-e.z,$h.add(this._offset,e,this._offset);var i=tf.fromTranslation(e);tf.multiply(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=qh(this.root._primitives);try{for(r.s();!(n=r.n()).done;){var o=n.value;tf.multiply(o.modelMatrix,i,o.modelMatrix)}}catch(e){r.e(e)}finally{r.f()}this.createAux(this._offset,i)}}},{key:"createAux",value:function(e){if(e.x>0){var t=$h.clone(this.xAxis.positions[0]),i=$h.clone(this.xAxis.positions[0]);i.x+=-e.x,this.xAux.positions=[t,i]}else{var n=$h.clone(this.xAxis.positions[1]),r=$h.clone(this.xAxis.positions[1]);r.x+=-e.x,this.xAux.positions=[n,r]}if(e.y<0){var o=$h.clone(this.yAxis.positions[0]),s=$h.clone(this.yAxis.positions[0]);s.y+=-e.y,this.yAux.positions=[o,s]}else{var a=$h.clone(this.yAxis.positions[1]),l=$h.clone(this.yAxis.positions[1]);l.y+=-e.y,this.yAux.positions=[a,l]}if(e.z>0){var u=$h.clone(this.zAxis.positions[0]),c=$h.clone(this.zAxis.positions[0]);c.z+=-e.z,this.zAux.positions=[u,c]}else{var h=$h.clone(this.zAxis.positions[1]),f=$h.clone(this.zAxis.positions[1]);f.z+=-e.z,this.zAux.positions=[h,f]}}},{key:"createRotateAux",value:function(e,t){if(this._startLocalPosition){var i=rf.fromAxisAngle(this.activePrimitive.normal,-t),n=nf.fromQuaternion(i,Cf),r=tf.fromRotation(n,wf),o=$h.subtract(e,this.center,bf);tf.multiplyByPoint(r,o,o),$h.add(this.center,o,o),this.rAxuEnd.positions=[this.center,o]}}}]),e}();const Lf=If;var Df={CONE:"cone",CIRCLE:"circle",BOX:"box"},Bf={light:{emissionRate:80,minSpeed:14,maxSpeed:22,endScale:3.5,lifeMin:.4,lifeMax:.9},medium:{emissionRate:160,minSpeed:20,maxSpeed:30,endScale:4.5,lifeMin:.35,lifeMax:.8},heavy:{emissionRate:260,minSpeed:26,maxSpeed:40,endScale:5.5,lifeMin:.3,lifeMax:.7},flood:{emissionRate:400,minSpeed:34,maxSpeed:52,endScale:7,lifeMin:.25,lifeMax:.6}},Gf={damCenter:[115.602,32.432],gateCount:13,gateHeight:28,gateSpacing:65,gatePositions:null,sprayHeading:180,sprayPitch:105,emitterType:Df.CONE,coneAngle:15,circleRadius:3,boxWidth:4,boxHeight:1.5,particleImageSize:24,startColor:null,endColor:null,startScale:.8,flowPreset:"medium",systemLifetime:16},Hf=function(e,t){if(!e)throw new Error("DamWaterRelease: viewer is required");this._viewer=e,this._options=Object.assign({},Gf,t||{}),this._particleSystems=[],this._gatePositions=[],this._flowLevel=this._options.flowPreset,this._destroyed=!1,this._mainImage=this._createWaterTexture(this._options.particleImageSize),this._computeGatePositions()};Object.defineProperties(Hf.prototype,{gatePositions:{get:function(){return this._gatePositions}},flowLevel:{get:function(){return this._flowLevel}},currentFlowParams:{get:function(){return Bf[this._flowLevel]||Bf.medium}},emitterType:{get:function(){return this._options.emitterType}}}),Hf.prototype._computeGatePositions=function(){var e=this._options;if(e.gatePositions&&e.gatePositions.length>0)return this._gatePositions=e.gatePositions.map((function(t){return{lon:t[0],lat:t[1],height:t[2]||e.gateHeight,worldPos:Cesium.Cartesian3.fromDegrees(t[0],t[1],t[2]||e.gateHeight)}})),void(e.gateCount=this._gatePositions.length);var t=e.gateSpacing;this._gatePositions=[];for(var i=0;i<e.gateCount;i++){var n=(i-(e.gateCount-1)/2)*t,r=e.damCenter[0]+9e-6*n,o=e.damCenter[1]-2e-5;this._gatePositions.push({lon:r,lat:o,height:e.gateHeight,worldPos:Cesium.Cartesian3.fromDegrees(r,o,e.gateHeight)})}},Hf.prototype._createWaterTexture=function(e){var t=document.createElement("canvas");t.width=e,t.height=e;var i=t.getContext("2d"),n=e/2,r=i.createRadialGradient(n,.7*n,0,n,n,n);return r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.02,"rgba(255, 255, 255, 1)"),r.addColorStop(.06,"rgba(255, 255, 255, 0.85)"),r.addColorStop(.15,"rgba(250, 252, 255, 0.45)"),r.addColorStop(.3,"rgba(220, 235, 250, 0.12)"),r.addColorStop(.5,"rgba(180, 200, 230, 0.02)"),r.addColorStop(1,"rgba(100, 130, 180, 0)"),i.fillStyle=r,i.fillRect(0,0,e,e),t.toDataURL()},Hf.prototype._createEmitter=function(){var e=this._options;switch(e.emitterType){case Df.CONE:return new Cesium.ConeEmitter(Cesium.Math.toRadians(e.coneAngle));case Df.CIRCLE:return new Cesium.CircleEmitter(e.circleRadius);case Df.BOX:return new Cesium.BoxEmitter(new Cesium.Cartesian3(e.boxWidth,e.boxHeight,.1));default:return new Cesium.ConeEmitter(Cesium.Math.toRadians(e.coneAngle))}},Hf.prototype._buildEmitterTransform=function(e,t,i,n,r){var o=Cesium.Math.toRadians(e),s=Cesium.Math.toRadians(t),a=Cesium.Matrix3.fromRotationZ(Cesium.Math.PI_OVER_TWO-o),l=Cesium.Matrix3.fromRotationY(s),u=new Cesium.Matrix3;return Cesium.Matrix3.multiply(a,l,u),Cesium.Matrix4.fromRotationTranslation(u,new Cesium.Cartesian3(i||0,n||0,r||0))},Hf.prototype._createParticleSystem=function(e){var t=this._gatePositions[e],i=this._options,n=this.currentFlowParams,r=Cesium.Transforms.eastNorthUpToFixedFrame(t.worldPos),o=this._buildEmitterTransform(i.sprayHeading,i.sprayPitch,0,-2,0);return this._viewer.scene.primitives.add(new Cesium.ParticleSystem({image:this._mainImage,startColor:i.startColor||Cesium.Color.WHITE.withAlpha(.55),endColor:i.endColor||Cesium.Color.WHITE.withAlpha(0),startScale:i.startScale,endScale:n.endScale,minimumParticleLife:n.lifeMin,maximumParticleLife:n.lifeMax,minimumSpeed:n.minSpeed,maximumSpeed:n.maxSpeed,imageSize:new Cesium.Cartesian2(i.particleImageSize,i.particleImageSize),emissionRate:n.emissionRate,emitter:this._createEmitter(),bursts:[new Cesium.ParticleBurst({time:0,minimum:40,maximum:80})],lifetime:i.systemLifetime,loop:!0,modelMatrix:r,emitterModelMatrix:o}))},Hf.prototype.addToScene=function(){if(!this._destroyed){this._viewer.scene.globe.depthTestAgainstTerrain=!0;for(var e=0;e<this._options.gateCount;e++)this._particleSystems.push(this._createParticleSystem(e))}},Hf.prototype.openGate=function(e){var t=this._particleSystems[e];t&&(t.show=!0,t.emissionRate=this.currentFlowParams.emissionRate,t.bursts=[new Cesium.ParticleBurst({time:0,minimum:20,maximum:40})])},Hf.prototype.closeGate=function(e){var t=this._particleSystems[e];t&&(t.show=!1,t.emissionRate=0)},Hf.prototype.setGateOpen=function(e,t){t?this.openGate(e):this.closeGate(e)},Hf.prototype.openAllGates=function(){for(var e=0;e<this._particleSystems.length;e++)this.openGate(e)},Hf.prototype.closeAllGates=function(){for(var e=0;e<this._particleSystems.length;e++)this.closeGate(e)},Hf.prototype.setFlowLevel=function(e){if(Bf[e]){this._flowLevel=e;for(var t=Bf[e],i=0;i<this._particleSystems.length;i++){var n=this._particleSystems[i];n&&(n.endScale=t.endScale,n.minimumSpeed=t.minSpeed,n.maximumSpeed=t.maxSpeed,n.minimumParticleLife=t.lifeMin,n.maximumParticleLife=t.lifeMax,n.emissionRate>0&&(n.emissionRate=t.emissionRate))}}},Hf.prototype.updateEmitterShape=function(e){var t=this._options;void 0!==e.emitterType&&(t.emitterType=e.emitterType),void 0!==e.coneAngle&&(t.coneAngle=e.coneAngle),void 0!==e.circleRadius&&(t.circleRadius=e.circleRadius),void 0!==e.boxWidth&&(t.boxWidth=e.boxWidth),void 0!==e.boxHeight&&(t.boxHeight=e.boxHeight);for(var i=this._createEmitter(),n=0;n<this._particleSystems.length;n++)this._particleSystems[n]&&(this._particleSystems[n].emitter=i)},Hf.prototype.updateSprayDirection=function(e,t){var i=this._options;void 0!==e&&(i.sprayHeading=e),void 0!==t&&(i.sprayPitch=t);for(var n=this._buildEmitterTransform(i.sprayHeading,i.sprayPitch,0,-2,0),r=0;r<this._particleSystems.length;r++)this._particleSystems[r]&&(this._particleSystems[r].emitterModelMatrix=n)},Hf.prototype.updateAppearance=function(e){for(var t=0;t<this._particleSystems.length;t++){var i=this._particleSystems[t];i&&(e.startColor&&(i.startColor=e.startColor),e.endColor&&(i.endColor=e.endColor),void 0!==e.startScale&&(i.startScale=e.startScale),void 0!==e.imageSize&&(i.imageSize=new Cesium.Cartesian2(e.imageSize,e.imageSize)))}},Hf.prototype.setParticleImage=function(e){for(var t=0;t<this._particleSystems.length;t++)this._particleSystems[t]&&(this._particleSystems[t].image=e)},Hf.prototype.getParticleSystem=function(e){return this._particleSystems[e]||null},Hf.prototype.getAllParticleSystems=function(){return this._particleSystems.slice()},Hf.prototype.removeFromScene=function(){for(var e=0;e<this._particleSystems.length;e++)this._particleSystems[e]&&this._viewer.scene.primitives.remove(this._particleSystems[e]);this._particleSystems=[]},Hf.prototype.destroy=function(){this.removeFromScene(),this._mainImage=null,this._gatePositions=[],this._destroyed=!0},Hf.EmitterType=Df,Hf.FLOW_PRESETS=Bf,Hf.DEFAULT_OPTIONS=Gf;const Nf=Hf;var zf=i(797),Ff=i.n(zf);const Wf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._id=de.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._fogByDistance=t.fogByDistance||{near:20,nearValue:0,far:2e4,farValue:1},this._color=t.color||new Cesium.Color(0,0,0,.3),this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"fog"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,e&&this._viewer&&!this._nativeObjCesium&&this._createPostProcessStage(),this._nativeObjCesium&&(this._nativeObjCesium.enabled=e)}},{key:"fogByDistance",get:function(){return this._fogByDistance},set:function(e){var t,i,n,r;this._fogByDistance=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.fogByDistance=new Cesium.Cartesian4((null===(t=this._fogByDistance)||void 0===t?void 0:t.near)||10,(null===(i=this._fogByDistance)||void 0===i?void 0:i.nearValue)||0,(null===(n=this._fogByDistance)||void 0===n?void 0:n.far)||2e3,(null===(r=this._fogByDistance)||void 0===r?void 0:r.farValue)||1))}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.fogColor=e)}},{key:"_createPostProcessStage",value:function(){var e,t,i,n;this._nativeObjCesium=new Cesium.PostProcessStage({name:this._id,fragmentShader:Ff(),uniforms:{fogByDistance:new Cesium.Cartesian4((null===(e=this._fogByDistance)||void 0===e?void 0:e.near)||10,(null===(t=this._fogByDistance)||void 0===t?void 0:t.nearValue)||0,(null===(i=this._fogByDistance)||void 0===i?void 0:i.far)||200,(null===(n=this._fogByDistance)||void 0===n?void 0:n.farValue)||1),fogColor:this._color}}),this._viewer.scene.postProcessStages.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._state=ke.ADDED,this):this}}]),e}();var Uf=i(802),Vf=i.n(Uf);const qf=function(){function e(){n(this,e),this._id=de.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"rain"}},{key:"enable",get:function(){return this._enable},set:function(e){return this._enable=e,e&&this._viewer&&!this._nativeObjCesium&&this._createPostProcessStage(),this._nativeObjCesium&&(this._nativeObjCesium.enabled=e),this}},{key:"speed",get:function(){return this._speed},set:function(e){this._speed=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.speed=e)}},{key:"mixNum",get:function(){return this._mixNum},set:function(e){this._mixNum=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.mixNum=e)}},{key:"_createPostProcessStage",value:function(){this._nativeObjCesium=new Cesium.PostProcessStage({name:this._id,fragmentShader:Vf(),uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._state=ke.ADDED,this):this}}]),e}();var Zf=i(87),Yf=i.n(Zf);const Kf=function(){function e(){n(this,e),this._id=de.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._speed=10,this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"snow"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,e&&this._viewer&&!this._nativeObjCesium&&this._createPostProcessStage(),this._nativeObjCesium&&(this._nativeObjCesium.enabled=e)}},{key:"speed",get:function(){return this._speed},set:function(e){this._speed=e,this._nativeObjCesium&&(this._nativeObjCesium.uniforms.speed=e)}},{key:"_createPostProcessStage",value:function(){this._nativeObjCesium=new Cesium.PostProcessStage({name:this._id,fragmentShader:Yf(),uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._state=ke.ADDED,this):this}}]),e}();var Qf=i(35),Xf=i.n(Qf);const Jf=function(){function e(t){n(this,e),this._id=de.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._rotateAmount=.04,this._enable=!1,this._heading=0,this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"cloud"}},{key:"enable",get:function(){return this._enable},set:function(e){!this._viewer.scene.mode!==Cesium.SceneMode.SCENE3D&&(this._enable=this._nativeObjCesium.show=e,this._enable?this._viewer.scene.postUpdate.addEventListener(this._onRotate,this):this._viewer.scene.postUpdate.removeEventListener(this._onRotate,this))}},{key:"rotateAmount",get:function(){return this._rotateAmount},set:function(e){this._rotateAmount=e}},{key:"_onRotate",value:function(e,t){0!==this._rotateAmount&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._nativeObjCesium.modelMatrix=Cesium.Transforms.headingPitchRollToFixedFrame(new Cesium.Cartesian3,new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(this._heading),0,0)))}},{key:"_createPrimitive",value:function(){this._nativeObjCesium=new Cesium.Primitive({appearance:new Cesium.EllipsoidSurfaceAppearance({material:new Cesium.Material({fabric:{type:"Image",uniforms:{color:new Cesium.Color(1,1,1,1),image:Xf()},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})});var e=new Cesium.Cartesian3(this._viewer.scene.globe.ellipsoid.radii.x+1e4,this._viewer.scene.globe.ellipsoid.radii.y+1e4,this._viewer.scene.globe.ellipsoid.radii.z+1e4);this._nativeObjCesium.geometryInstances=new Cesium.GeometryInstance({geometry:new Cesium.EllipsoidGeometry({vertexFormat:Cesium.VertexFormat.POSITION_AND_ST,radii:e}),id:this._id}),this._nativeObjCesium.show=this._enable,this._viewer.scene.primitives.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._createPrimitive(),this._state=ke.ADDED,this):this}}]),e}();const $f=function(){function e(t){if(n(this,e),!t)throw new Error("Viewer:必须传入三维球对象");this._comps={fog:new Wf,rain:new qf,snow:new Kf,cloud:new Jf},this.install(t)}return a(e,[{key:"fog",get:function(){return this._comps.fog}},{key:"rain",get:function(){return this._comps.rain}},{key:"snow",get:function(){return this._comps.snow}},{key:"cloud",get:function(){return this._comps.cloud}},{key:"install",value:function(e){var t=this;Object.keys(this._comps).forEach((function(i){t._comps[i].addTo(e)})),Object.defineProperty(e,"weather",{value:this,writable:!1})}}]),e}();const ep={};function tp(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ip(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?tp(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):tp(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const np=function(){function e(t){n(this,e),this._viewer=t,this._options={}}return a(e,[{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._options=ip(ip({},this._options),e)}},{key:"_bindEvent",value:function(){}},{key:"_unbindEvent",value:function(){}},{key:"start",value:function(){var e=this;if(this._viewer.clock.shouldAnimate=!0,this._unbindEvent(),this._options.duration)var t=setTimeout((function(){e._unbindEvent(),e._options.callback&&e._options.callback.call(e._options.context||e),clearTimeout(t)}),1e3*Number(this._options.duration));return this._bindEvent(),this}},{key:"stop",value:function(){return this._unbindEvent(),this}}]),e}();function rp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var op=function(e){c(i,e);var t=rp(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,e))._options=o,r}return a(i,[{key:"type",get:function(){return ep.GLOBE_ROTATE}},{key:"_icrf",value:function(e,t){if(e.mode!==Cesium.SceneMode.SCENE3D)return!0;var i=Cesium.Transforms.computeIcrfToFixedMatrix(t);if(i){var n=this._viewer.camera,r=Cesium.Cartesian3.clone(n.position),o=Cesium.Matrix4.fromRotationTranslation(i);n.lookAtTransform(o,r)}}},{key:"_bindEvent",value:function(){this._viewer.clock.multiplier=this._options.speed||12e3,this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}},{key:"_unbindEvent",value:function(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}}]),i}(np);ep.GLOBE_ROTATE="globe_rotate";const sp=op;function ap(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}const lp=function(e){c(i,e);var t=ap(i);function i(){var e;return n(this,i),(e=t.call(this,ae))._registerEvent(),e}return a(i)}(ue);function up(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var cp=function(e){c(i,e);var t=up(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,e))._routeStops=o.routeStops,r._loop=o.loop||!1,r._routeStops?(r._routeStops=r._routeStops.map((function(e){return e.position=Be.parsePosition(e.position),e})),r._currentIndex=0,r._timer=void 0,r._flyEvent=new lp,r):(console.error("未定义路线!"),f(r))}return a(i,[{key:"type",get:function(){return ep.FLYING}},{key:"_cameraFly",value:function(){var e=this,t=this,i=this._routeStops[this._currentIndex];this.raiseEvent(ae.FLYING,i),i.position&&this._viewer.flyToPoint(i.position,i.heading,i.pitch,i.range,i.duration,(function(){e.raiseEvent(ae.STOP_STAY,i),t._currentIndex++,t._currentIndex<=t._routeStops.length-1?(i=e._routeStops[t._currentIndex],t._timer=setTimeout((function(){t._cameraFly()}),1e3*i.stopStayTime)):e._loop&&(t._currentIndex=0,i=e._routeStops[t._currentIndex],t._timer=setTimeout((function(){t._cameraFly()}),1e3*t._routeStops[t._routeStops.length-1].stopStayTime))}))}},{key:"start",value:function(){return this._routeStops&&(this._currentIndex=0,this._cameraFly()),this}},{key:"pause",value:function(){return this._viewer.camera.cancelFlight(),this._timer&&clearTimeout(this._timer),this}},{key:"continueFly",value:function(){return this._routeStops&&this._cameraFly(),this}},{key:"addEventListener",value:function(e,t,i){return this._flyEvent.addEventListener(e,t,i||this),this}},{key:"removeEventListener",value:function(e,t,i){return this._flyEvent.removeEventListener(e,t,i||this),this}},{key:"raiseEvent",value:function(e,t){return this._flyEvent.raiseEvent(e,t),this}}]),i}(np);ep.FlyManager="FlyManager";const hp=cp;function fp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var pp=function(e){c(i,e);var t=fp(i);function i(e,r){var o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n(this,i),(o=t.call(this,e))._position=r,o._options=s,o._heading=e.camera.heading,o._aroundAmount=.2,o}return a(i,[{key:"type",get:function(){return ep.AROUND_POINT}},{key:"position",set:function(e){this._position=e}},{key:"aroundAmount",set:function(e){this._aroundAmount=e}},{key:"_bindEvent",value:function(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}},{key:"_unbindEvent",value:function(){this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}},{key:"start",value:function(){var e=at.getScreenCenterCoordinates(this._viewer),t=Cesium.Cartesian3.distance(e,this._viewer.camera.positionWC),n={pitch:this._viewer.camera.pitch,range:t};this.setOptions(n),this.position=e,N(p(i.prototype),"start",this).call(this)}},{key:"_onAround",value:function(e,t){this._heading+=Cesium.Math.toRadians(this._aroundAmount),(this._heading>=2*Math.PI||this._heading<=2*-Math.PI)&&(this._heading=0),this._viewer.camera.lookAt(this._position,new Cesium.HeadingPitchRange(this._heading,this._options.pitch||this._viewer.camera.pitch,this._options.range||this._viewer.camera.positionCartographic.height))}}]),i}(np);ep.AROUND_POINT="around_point";const mp=pp;const dp=function(){function e(t){n(this,e),this._viewer=t,this._enable=!1,this._moveRate=100,this._rotateRate=.01,this._flags={moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,turnLeft:!1,turnRight:!1}}return a(e,[{key:"enable",get:function(){return this._enable},set:function(e){this._enable!==e&&this._viewer.scene.mode===Cesium.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}},{key:"moveRate",get:function(){return this._moveRate},set:function(e){this._moveRate=e}},{key:"rotateRate",get:function(){return this._rotateRate},set:function(e){this._rotateRate=e}},{key:"_bindEvent",value:function(){var e=this._viewer.scene.canvas;e.setAttribute("tabindex","0"),e.addEventListener("click",this._onClick.bind(this),!1),this._viewer.clock.onTick.addEventListener(this._onTick,this),document.addEventListener("keydown",this._onKeydown.bind(this),!1),document.addEventListener("keyup",this._onKeyup.bind(this),!1)}},{key:"_unbindEvent",value:function(){var e=this;Object.keys(this._flags).forEach((function(t){e._flags[t]=!1}));var t=this._viewer.scene.canvas;t.removeAttribute("tabindex"),t.removeEventListener("click",this._onClick,!1),this._viewer.clock.onTick.removeEventListener(this._onTick,this),document.removeEventListener("keydown",this._onKeydown,!1),document.removeEventListener("keyup",this._onKeyup,!1)}},{key:"_getFlagForKeyCode",value:function(e){var t=void 0;switch(e.keyCode){case"W".charCodeAt(0):case 38:t=e.shiftKey?"moveUp":"moveForward";break;case"S".charCodeAt(0):case 40:t=e.shiftKey?"moveDown":"moveBackward";break;case"A".charCodeAt(0):case 37:t="moveLeft";break;case"D".charCodeAt(0):case 39:t="moveRight";break;case"Q".charCodeAt(0):t="turnLeft";break;case"E".charCodeAt(0):t="turnRight"}return t}},{key:"_onClick",value:function(){this._viewer.scene.canvas.focus()}},{key:"_onKeydown",value:function(e){var t=this._getFlagForKeyCode(e);t&&(this._flags[t]=!0)}},{key:"_onKeyup",value:function(e){var t=this;Object.keys(this._flags).forEach((function(e){t._flags[e]=!1}))}},{key:"_onTick",value:function(){var e=this._viewer.scene.camera,t=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,i=Cesium.Cartesian3.clone(e.position,new Cesium.Cartesian3);this._flags.moveForward&&e.moveForward(t),this._flags.moveBackward&&e.moveBackward(t),this._flags.moveUp&&e.moveUp(t),this._flags.moveDown&&e.moveDown(t),this._flags.moveLeft&&e.moveLeft(t),this._flags.moveRight&&e.moveRight(t),this._flags.turnLeft&&e.rotate(i,-this._rotateRate),this._flags.turnRight&&e.rotate(i,this._rotateRate)}}]),e}();const vp=function(){function e(t){n(this,e),this._viewer=t,this._viewOption={},this._cache={},this._activedPath=void 0}return a(e,[{key:"_onPostRender",value:function(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.raiseEvent(oe.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}},{key:"addPath",value:function(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.raiseEvent(oe.ADD),this._cache[e.pathId]=e),this}},{key:"addPaths",value:function(e){var t=this;return Array.isArray(e)&&e.forEach((function(e){t.addPath(e)})),this}},{key:"removePath",value:function(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.raiseEvent(oe.REMOVE)),this}},{key:"getPath",value:function(e){var t=this.getPaths().filter((function(t){return t.id===e}));return t&&t.length?t[0]:void 0}},{key:"getPaths",value:function(){var e=this,t=[];return Object.keys(this._cache).forEach((function(i){t.push(e._cache[i])})),t}},{key:"start",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e&&(null==e?void 0:e.pathId)!==(null===(t=this._activedPath)||void 0===t?void 0:t.pathId)&&this._cache.hasOwnProperty(null==e?void 0:e.pathId)?(this._viewOption=i,this._activedPath&&this.stop(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.raiseEvent(oe.RESET_TIME_LINE),this._viewer.addEventListener(ee.POST_RENDER,this._onPostRender,this),this):this}},{key:"stop",value:function(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.removeEventListener(ee.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this}},{key:"clear",value:function(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.removeEventListener(ee.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this}}]),e}();const yp=function(){function e(t,i,r){n(this,e),this._id=de.uuid(),this._bid=void 0,this._positions=Be.parsePositions(t),this._duration=i||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=Cesium.JulianDate.now(),this._pathEvent=new sr,this._pathEvent.addEventListener(oe.ADD,this._onAdd,this),this._pathEvent.addEventListener(oe.REMOVE,this._onRemove,this),this._pathEvent.addEventListener(oe.POST_RENDER,this._onPostRender,this),this._pathEvent.addEventListener(oe.RESET_TIME_LINE,this._resetTimeLine,this),this._state=ke.INITIALIZED}return a(e,[{key:"pathId",get:function(){return this._id}},{key:"id",get:function(){return this._bid},set:function(e){this._bid=e}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=Be.parsePositions(e)}},{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e}},{key:"pathMode",get:function(){return this._pathMode},set:function(e){this._pathMode=e}},{key:"pathEvent",get:function(){return this._pathEvent}},{key:"actived",get:function(){return this._actived},set:function(e){this._actived=e}},{key:"state",get:function(){return this._state}},{key:"_onAdd",value:function(){this._state=ke.ADDED}},{key:"_onRemove",value:function(){this._state=ke.REMOVED}},{key:"_onPostRender",value:function(e){var t=e.viewer,i=e.viewOption;if(!this.actived)return!1;var n=Cesium.JulianDate.now();if(Cesium.JulianDate.lessThan(n,this._endTime)&&this._sampledPosition){var r=this._sampledPosition.getValue(n),o=this._sampledPosition.getValue(Cesium.JulianDate.addSeconds(n,.001,new Cesium.JulianDate));r&&o&&t.camera.lookAt(r,new Cesium.HeadingPitchRange(it(r,o),Cesium.Math.toRadians((null==i?void 0:i.pitch)||-20),(null==i?void 0:i.height)||2e3))}else t.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),this._actived=!1,this._pathEvent.raiseEvent(oe.END,this._positions[this._positions.length-1])}},{key:"_resetTimeLine",value:function(){if(!this._positions||!this._positions.length)return!1;var e=Cesium.JulianDate.now(),t=0,i=[];if("speed"===this._pathMode){var n=et(this._positions)/this._duration;i=this._positions.map((function(i,r,o){return 0!==r&&(t+=et([o[r-1],i])/n),Cesium.JulianDate.addSeconds(e,t,new Cesium.JulianDate)}))}else{var r=this._positions.length,o=(this._duration-this._duration%r)/r;i=this._positions.map((function(t,i){return Cesium.JulianDate.addSeconds(e,i*o,new Cesium.JulianDate)}))}this._sampledPosition=new Cesium.SampledPositionProperty,this._sampledPosition.addSamples(i,Ne.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=Cesium.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:Cesium.HermitePolynomialApproximation}),this._endTime=i[i.length-1],this._actived=!0}}]),e}();const gp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"black_and_white"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?ke.ENABLED:ke.DISABLED}},{key:"gradations",get:function(){return this._gradations},set:function(e){this._gradations=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.gradations=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createBlackAndWhiteStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();const _p=function(){function e(t){n(this,e),this._viewer=t,this._enable=!1,this._contrast=128,this._brightness=-.3,this._glowOnly=!1,this._delta=1,this._sigma=3.8,this._stepSize=5,this._selected=[],this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"bloom"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?ke.ENABLED:ke.DISABLED}},{key:"contrast",get:function(){return this._contrast},set:function(e){this._contrast=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.contrast=e)}},{key:"brightness",get:function(){return this._brightness},set:function(e){this._brightness=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.brightness=e)}},{key:"glowOnly",get:function(){return this._glowOnly},set:function(e){this._glowOnly=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.glowOnly=e)}},{key:"delta",get:function(){return this._delta},set:function(e){this._delta=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.delta=e)}},{key:"sigma",get:function(){return this._sigma},set:function(e){this._sigma=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.sigma=e)}},{key:"stepSize",get:function(){return this._stepSize},set:function(e){this._stepSize=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.stepSize=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=this._viewer.scene.postProcessStages.bloom,this.__nativeObjCesium.uniforms.contrast=this._contrast,this.__nativeObjCesium.uniforms.brightness=this._brightness,this.__nativeObjCesium.uniforms.glowOnly=this._glowOnly,this.__nativeObjCesium.uniforms.delta=this._delta,this.__nativeObjCesium.uniforms.sigma=this._sigma,this.__nativeObjCesium.uniforms.stepSize=this._stepSize}}]),e}();const Cp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"brightness"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?ke.ENABLED:ke.DISABLED}},{key:"intensity",get:function(){return this._intensity},set:function(e){this._intensity=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.brightness=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createBrightnessStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();const bp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._focalDistance=87,this._delta=1,this._sigma=3.8,this._stepSize=2.5,this._selected=[],this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"depth_of_field"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this.__nativeObjCesium&&this._createPostProcessStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.enabled=e),this._state=e?ke.ENABLED:ke.DISABLED}},{key:"focalDistance",get:function(){return this._focalDistance},set:function(e){this._focalDistance=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.focalDistance=e)}},{key:"delta",get:function(){return this._delta},set:function(e){this._delta=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.delta=e)}},{key:"sigma",get:function(){return this._sigma},set:function(e){this._sigma=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.sigma=e)}},{key:"stepSize",get:function(){return this._stepSize},set:function(e){this._stepSize=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.stepSize=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createDepthOfFieldStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.focalDistance=this._focalDistance,this.__nativeObjCesium.uniforms.delta=this._delta,this.__nativeObjCesium.uniforms.sigma=this._sigma,this.__nativeObjCesium.uniforms.stepSize=this._stepSize,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();var wp={intensity:1.6,scatterColor:{r:.45,g:.7,b:1},scatterRadiusFactor:1.12,coreRingWidth:.006,coreRingStrength:.5,coreRingVisible:!0,outerGlowWidth:.45,outerGlowStrength:.35,outerGlowExponent:2,outerGlowVisible:!0,innerGlowWidth:.35,innerGlowStrength:.6,innerGlowExponent:2,innerGlowVisible:!0},Pp=6371e3;const Op=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,e),!t)throw Error("missing viewer param");this._viewer=t,this._enable=!1,this._state=ke.INITIALIZED,this.__nativeObjCesium=void 0,this._options=Object.assign({},wp,i)}return a(e,[{key:"type",get:function(){return"earthGlow"}},{key:"options",get:function(){return this._options}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPrimitive(),this.__nativeObjCesium.show=e,this._state=e?ke.ENABLED:ke.DISABLED}},{key:"intensity",get:function(){return this._options.intensity},set:function(e){this._options.intensity=e;var t=this._material();t&&(t.uniforms.intensity=e)}},{key:"scatterColor",get:function(){return this._options.scatterColor},set:function(e){this._options.scatterColor={r:e.r,g:e.g,b:e.b};var t=this._material();if(t){var i=window.Cesium;t.uniforms.scatterColor=new i.Color(e.r,e.g,e.b,1)}}},{key:"scatterRadiusFactor",get:function(){return this._options.scatterRadiusFactor},set:function(e){var t=this;this._options.scatterRadiusFactor=e,this.__nativeObjCesium&&this._enable&&(this._radiusTimer&&clearTimeout(this._radiusTimer),this._radiusTimer=setTimeout((function(){t._radiusTimer=null,t.__nativeObjCesium&&t._enable&&(t.destroy(),t._createPrimitive(),t.__nativeObjCesium.show=!0)}),50))}},{key:"coreRingWidth",get:function(){return this._options.coreRingWidth},set:function(e){this._options.coreRingWidth=e;var t=this._material();t&&(t.uniforms.coreRingWidth=e)}},{key:"coreRingStrength",get:function(){return this._options.coreRingStrength},set:function(e){this._options.coreRingStrength=e;var t=this._material();t&&(t.uniforms.coreRingStrength=e)}},{key:"coreRingVisible",get:function(){return this._options.coreRingVisible},set:function(e){this._options.coreRingVisible=!!e;var t=this._material();t&&(t.uniforms.coreRingVisible=this._options.coreRingVisible?1:0)}},{key:"outerGlowWidth",get:function(){return this._options.outerGlowWidth},set:function(e){this._options.outerGlowWidth=e;var t=this._material();t&&(t.uniforms.outerGlowWidth=e)}},{key:"outerGlowStrength",get:function(){return this._options.outerGlowStrength},set:function(e){this._options.outerGlowStrength=e;var t=this._material();t&&(t.uniforms.outerGlowStrength=e)}},{key:"outerGlowExponent",get:function(){return this._options.outerGlowExponent},set:function(e){this._options.outerGlowExponent=e;var t=this._material();t&&(t.uniforms.outerGlowExponent=e)}},{key:"outerGlowVisible",get:function(){return this._options.outerGlowVisible},set:function(e){this._options.outerGlowVisible=!!e;var t=this._material();t&&(t.uniforms.outerGlowVisible=this._options.outerGlowVisible?1:0)}},{key:"innerGlowWidth",get:function(){return this._options.innerGlowWidth},set:function(e){this._options.innerGlowWidth=e;var t=this._material();t&&(t.uniforms.innerGlowWidth=e)}},{key:"innerGlowStrength",get:function(){return this._options.innerGlowStrength},set:function(e){this._options.innerGlowStrength=e;var t=this._material();t&&(t.uniforms.innerGlowStrength=e)}},{key:"innerGlowVisible",get:function(){return this._options.innerGlowVisible},set:function(e){this._options.innerGlowVisible=!!e;var t=this._material();t&&(t.uniforms.innerGlowVisible=this._options.innerGlowVisible?1:0)}},{key:"destroy",value:function(){this.__nativeObjCesium&&!this.__nativeObjCesium.isDestroyed()&&this._viewer.scene.primitives.remove(this.__nativeObjCesium),this._radiusTimer&&(clearTimeout(this._radiusTimer),this._radiusTimer=null),this.__nativeObjCesium=void 0,this._state=ke.REMOVED}},{key:"_material",value:function(){if(this.__nativeObjCesium&&this.__nativeObjCesium.appearance)return this.__nativeObjCesium.appearance.material}},{key:"_createPrimitive",value:function(){var e=window.Cesium,t=this._options,i=Pp*t.scatterRadiusFactor,n=t.scatterColor,r=new e.Material({fabric:{type:"EarthScatter",uniforms:{scatterColor:new e.Color(n.r,n.g,n.b,1),intensity:t.intensity,coreRingWidth:t.coreRingWidth,coreRingStrength:t.coreRingStrength,coreRingVisible:t.coreRingVisible?1:0,outerGlowWidth:t.outerGlowWidth,outerGlowStrength:t.outerGlowStrength,outerGlowExponent:t.outerGlowExponent,outerGlowVisible:t.outerGlowVisible?1:0,innerGlowWidth:t.innerGlowWidth,innerGlowStrength:t.innerGlowStrength,innerGlowExponent:t.innerGlowExponent,innerGlowVisible:t.innerGlowVisible?1:0},source:["uniform vec4 scatterColor;","uniform float intensity;","uniform float coreRingWidth;","uniform float coreRingStrength;","uniform float coreRingVisible;","uniform float outerGlowWidth;","uniform float outerGlowStrength;","uniform float outerGlowExponent;","uniform float outerGlowVisible;","uniform float innerGlowWidth;","uniform float innerGlowStrength;","uniform float innerGlowExponent;","uniform float innerGlowVisible;","czm_material czm_getMaterial(czm_materialInput materialInput) {"," czm_material material = czm_getDefaultMaterial(materialInput);"," float R1 = "+Pp.toFixed(1)+";"," float R2 = "+i.toFixed(1)+";"," float t = abs(dot(normalize(materialInput.normalEC), normalize(materialInput.positionToEyeEC)));"," float tLimb = sqrt(max(1.0 - (R1 * R1) / (R2 * R2), 0.0));"," float distFromLimb = abs(t - tLimb);"," float coreRing = (1.0 - smoothstep(0.0, coreRingWidth, distFromLimb)) * coreRingStrength * coreRingVisible;"," float outerGlowWidthEff = clamp(outerGlowWidth, 0.0, tLimb);"," float tOuterStart = tLimb - max(outerGlowWidthEff, 1e-6);"," float outerGlow = pow(smoothstep(tOuterStart, tLimb, t), outerGlowExponent) * step(t, tLimb) * outerGlowStrength * outerGlowVisible * step(0.0001, outerGlowWidth);"," float innerGlow = pow(1.0 - smoothstep(tLimb, tLimb + innerGlowWidth, t), innerGlowExponent) * step(tLimb, t) * innerGlowStrength * innerGlowVisible;"," float halo = coreRing + outerGlow + innerGlow;"," material.diffuse = vec3(0.0);"," material.emission = scatterColor.rgb * halo * intensity;"," material.alpha = halo;"," return material;","}"].join("\n")},translucent:!0});this.__nativeObjCesium=this._viewer.scene.primitives.add(new e.Primitive({geometryInstances:new e.GeometryInstance({geometry:new e.EllipsoidGeometry({radii:new e.Cartesian3(i,i,i)})}),appearance:new e.MaterialAppearance({material:r,flat:!0,translucent:!0,closed:!0}),asynchronous:!1}))}}]),e}();const xp=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._intensity=6,this._distortion=61,this._dirtAmount=.4,this._haloWidth=.4,this._selected=[],this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"lens_flare"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?ke.ENABLED:ke.DISABLED}},{key:"intensity",get:function(){return this._intensity},set:function(e){this._intensity=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.intensity=e)}},{key:"distortion",get:function(){return this._distortion},set:function(e){this._distortion=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.distortion=e)}},{key:"dirtAmount",get:function(){return this._dirtAmount},set:function(e){this._dirtAmount=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.dirtAmount=e)}},{key:"haloWidth",get:function(){return this._haloWidth},set:function(e){this._haloWidth=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.haloWidth=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createLensFlareStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.intensity=this._intensity,this.__nativeObjCesium.uniforms.distortion=this._distortion,this.__nativeObjCesium.uniforms.dirtAmount=this._dirtAmount,this.__nativeObjCesium.uniforms.haloWidth=this._haloWidth,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();const Ep=function(){function e(t){n(this,e),this._viewer=t,this._enable=!1,this._selected=[],this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"night"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,this.__nativeObjCesium||this._createPostProcessStage(),this.__nativeObjCesium.enabled=e,this._state=e?ke.ENABLED:ke.DISABLED}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createNightVisionStage(),this.__nativeObjCesium&&this._viewer.scene.postProcessStages.add(this.__nativeObjCesium)}}]),e}();const Ap=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._color=Cesium.Color.GREEN,this._length=.5,this._selected=[],this._state=ke.INITIALIZED}return a(e,[{key:"type",get:function(){return"silhouette"}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e,Cesium.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this.__nativeObjCesium&&this._createPostProcessStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.enabled=e),this._state=e?ke.ENABLED:ke.DISABLED}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.color=e)}},{key:"length",get:function(){return this._length},set:function(e){this._length=e,this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.length=e)}},{key:"selected",get:function(){return this._selected},set:function(e){this._selected=e,this.__nativeObjCesium&&(this.__nativeObjCesium.selected=e)}},{key:"_createPostProcessStage",value:function(){this.__nativeObjCesium=Cesium.PostProcessStageLibrary.createSilhouetteStage(),this.__nativeObjCesium&&(this.__nativeObjCesium.uniforms.color=this._color,this.__nativeObjCesium.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this.__nativeObjCesium))}}]),e}();const kp=function(){function e(t){if(n(this,e),!t)throw Error("missing viewer param");this._blackAndWhite=new gp(t),this._bloom=new _p(t),this._brightness=new Cp(t),this._depthOfField=new bp(t),this._earthGlow=new Op(t),this._lensFlare=new xp(t),this._night=new Ep(t),this._silhouette=new Ap(t)}return a(e,[{key:"blackAndWhite",get:function(){return this._blackAndWhite}},{key:"bloom",get:function(){return this._bloom}},{key:"brightness",get:function(){return this._brightness}},{key:"depthOfField",get:function(){return this._depthOfField}},{key:"earthGlow",get:function(){return this._earthGlow}},{key:"lensFlare",get:function(){return this._lensFlare}},{key:"night",get:function(){return this._night}},{key:"silhouette",get:function(){return this._silhouette}}]),e}();function Tp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}var Mp=function(e){c(i,e);var t=Tp(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,i),(e=t.call(this))._pointerEvents=r.pointerEvents,e._show=!0,e._threejsContainer=void 0,e._threeCanvas=void 0,e._animateFrame=void 0,e.renderer=void 0,e.camera=void 0,e.scene=void 0,e}return a(i,[{key:"show",get:function(){return this._show},set:function(e){this._threejsContainer.style.visibility=e?"visible":"hidden"}},{key:"_addedHook",value:function(){}},{key:"_onAdd",value:function(e){this._viewer=e,this.initThree(),this._initMouse(),this.renderThreeJS(),this._viewer.nativeObjCesium.useDefaultRenderLoop=!1;var t=this;this.indexa=0,function e(){t._animateFrame=window.requestAnimationFrame(e),t.update()}()}},{key:"_removedHook",value:function(){window.cancelAnimationFrame(this._animateFrame),delete this._animateFrame,this._viewer.nativeObjCesium.useDefaultRenderLoop=!0,this._threeCanvas&&(this._viewer.container.removeChild(this._threeCanvas),delete this._threeCanvas)}},{key:"_initMouse",value:function(){var e=this;this.controls=new window.OrbitControls(this.camera,this.renderer.domElement),console.log(this.controls),new Cesium.ScreenSpaceEventHandler(this._viewer.canvas).setInputAction((function(t){console.log("Cesium.ScreenSpaceEventType.LEFT_DOWN");e.getThreeClick(e._viewer,e,t.position)}),Cesium.ScreenSpaceEventType.LEFT_DOWN),this.renderer.domElement.addEventListener("click",(function(t){var i=e.renderer.domElement.getBoundingClientRect(),n=i.width,r=i.height,o=(i.top,i.left,t.offsetX/n*2-1),s=-t.offsetY/r*2+1,a=new THREE.Raycaster;a.setFromCamera(new THREE.Vector2(o,s),e.camera);var l=a.intersectObjects(e.scene.children);console.log("射线器返回的对象",l),l.length}))}},{key:"getThreeClick",value:function(e,t,i){var n=new THREE.Raycaster,r=new THREE.Vector2,o=e.scene.canvas.getBoundingClientRect(),s=t.renderer.domElement.getBoundingClientRect(),a=s.width,l=s.height,u=s.top,c=s.left,h=t.renderer.domElement.offsetLeft,f=t.renderer.domElement.offsetTop,p=i.x+o.x-c+h,m=i.y+o.y-u+f;r.x=p/a*2-1,r.y=-m/l*2+1;var d=t.scene.children;n.setFromCamera(r,t.camera);var v=n.intersectObjects(d);return console.log(v),!!v[0]}},{key:"initThree",value:function(){if(!THREE)throw new Error("请引入 three.js 库 ");var e=this._viewer.scene.canvas.clientWidth,t=this._viewer.scene.canvas.clientHeight,i=ve.create("canvas","anov-gis-threejs",document.body);i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.width=e+"px",i.style.height=t+"px",i.style.pointerEvents=this._pointerEvents?"auto":"none",this._threeCanvas=i;var n=e/t;this.renderer=new THREE.WebGLRenderer({canvas:i,alpha:!0,logarithmicDepthBuffer:!0,antialias:!0}),this.camera=new THREE.PerspectiveCamera(45,n,1,1e7),this.scene=new THREE.Scene}},{key:"update",value:function(){this.renderCesium(),this.renderThreeJS(),this.indexa++}},{key:"renderCesium",value:function(){this._viewer.nativeObjCesium.render()}},{key:"renderThreeJS",value:function(){this.camera.matrixAutoUpdate=!1;var e=this._viewer.nativeObjCesium.camera.viewMatrix,t=this._viewer.nativeObjCesium.camera.inverseViewMatrix;console.log("cvm",e),console.log("civm",t),console.log("this.camera",this.camera),this.camera.lookAt(new THREE.Vector3(0,0,0)),this.camera.matrixWorld.set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]),this.camera.matrixWorldInverse.set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]),console.log("this.camera",this.camera),console.log(this._viewer.nativeObjCesium.camera),this.renderer.setPixelRatio(window.devicePixelRatio);var i=this._viewer.nativeObjCesium.scene.canvas.clientWidth,n=this._viewer.nativeObjCesium.scene.canvas.clientHeight,r=this.renderer.domElement;(r.width!==i||r.height!==n)&&(this.resize(),this.renderer.setSize(i,n,!1)),this.camera.aspect=i/n,this.camera.fov=Cesium.Math.toDegrees(viewer.nativeObjCesium.camera.frustum.fovy),this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera)}},{key:"resize",value:function(){if(this._threeCanvas){var e=this._viewer.nativeObjCesium.scene.canvas.clientWidth,t=this._viewer.nativeObjCesium.scene.canvas.clientHeight,i=this._threeCanvas;i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.width=e+"px",i.style.height=t+"px"}}}]),i}(mr);const Rp=Mp;var Sp=200,jp={200:"成功响应"},Ip={Event:"Event",Api:"Api"},Lp=function(e,t,i,n,r){var o,s=de.uuid(),a=function(e){var t;return null!==(t=jp[e])&&void 0!==t?t:"未知错误"}(i);return{id:null!=n?n:s,name:t,code:i,msg:null!==(o=null==r?void 0:r.failMessage)&&void 0!==o?o:a,result:r}},Dp=function(){function e(t){n(this,e),this.event=new ue(Ip),this.resMessage={},this.viewer=void 0,this.resMessage=Lp(0,"engineReady",Sp)}return a(e,[{key:"sendMessage",value:function(){var e,t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.name,r=i.id,o=i.params;if("ANOVGIS.init"===n||"anovgis.init"===n)return this.viewer=new zr(o.container,o),this.viewer.scene.camera.isFlying=!1,this.resMessage=Lp(0,n,Sp,r),void this.event.raiseEvent(Ip.Api,this.resMessage);"viewer.scene.camera.focus"==n&&(this.viewer.scene.camera.isFlying=!0,this.viewer.camera.flyTo({destination:new Cesium.Cartesian3(o.position.x,o.position.y,o.position.z),orientation:{direction:new Cesium.Cartesian3(o.direction.x,o.direction.y,o.direction.z),up:new Cesium.Cartesian3(o.up.x,o.up.y,o.up.z)},duration:null!==(e=i.duration)&&void 0!==e?e:void 0,complete:function(){setTimeout((function(){t.viewer.scene.camera.isFlying=!1}),200),t.resMessage=Lp(0,n,Sp,r,{name:"聚焦完成"}),t.event.raiseEvent(Ip.Api,t.resMessage)}}))}},{key:"receiveMessage",value:function(e){this.event.addEventListener(Ip.Api,e),this.event.addEventListener(Ip.Event,e)}}]),e}();const Bp=function(e){return new Dp(e)}},237:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var n=i(929),r=/^[ \t]*#version[^\r\n]*\r?\n?/gm;function o(){var e=Cesium.ShaderSource;e&&e.prototype&&(e.prototype.__anovVersionDirectivePatched||(["createCombinedVertexShader","createCombinedFragmentShader"].forEach((function(t){var i=e.prototype[t];"function"==typeof i&&(e.prototype[t]=function(e){var t=this.sources,n=Array.isArray(t)?function(e){var t=!1,i=e.map((function(e){var i=e;return 65279===i.charCodeAt(0)&&(i=i.slice(1)),i=i.replace(r,""),t=t||i!==e,i}));return t?i:null}(t):null;if(!n)return i.call(this,e);this.sources=n;try{return i.call(this,e)}finally{this.sources=t}})})),e.prototype.__anovVersionDirectivePatched=!0))}var s=["version","accessToken","baseUrl","author","home_page","init","ready","use","mixin","Namespace","Initialized"],a={version:"1.8.9",accessToken:"",baseUrl:"/anov-gis-sdk/resources/",author:"zhf",home_page:"http://192.168.11.164:9999/anov-gis2",Namespace:{},Initialized:!1,globalConfig:{}};a.setBaseUrl=function(e){e&&(a.baseUrl=e,n&&n.buildModuleUrl.setBaseUrl(a.baseUrl))},a.mixin=function(e){for(var t in e)s.indexOf(t)<0&&(a[t]=e[t]);return this},a.install=function(e){var t=[];return t.unshift(this),"function"==typeof e.install?e.install.apply(e,t):"function"==typeof e&&e.apply(null,t),this};window.Cesium=n,Object.keys(n).forEach((function(e){e.startsWith("_")||(a[e]=n[e])})),a.mixin(i(647)),a.CopyRight._setContent(a),a.initEnvironment=function(){if(o(),!a.Initialized){if(n.buildModuleUrl.setBaseUrl(a.baseUrl),window.location.origin.startsWith("http"));else if(self&&self!=top&&window.parent&&window.parent.location.origin.startsWith("http")){for(var e=document.getElementsByTagName("script"),t=0;t<e.length;t++){var r=e[t].src;if(r&&-1!==r.indexOf("/anov-gis-sdk/")){var s=r.indexOf("/anov-gis-sdk/"),l=r.substring(0,s),u=(l.startsWith("http")?"":window.parent.location.origin)+l+"/anov-gis-sdk/resources/";console.log("[initEnv] setting baseUrl from script src:",u),a.setBaseUrl(u);break}}!function(){var e=window.parent.location.href,t=Object.getOwnPropertyDescriptor(HTMLAnchorElement.prototype,"href");if(t&&t.set){var i=t.set;Object.defineProperty(HTMLAnchorElement.prototype,"href",{get:t.get,set:function(t){"about:srcdoc"===t||t===window.location.href?i.call(this,e):i.call(this,t)},configurable:!0})}}()}if(self&&self!=top)-1===function(){var e=null;if(parent!==window)try{e=parent.location.href}catch(t){e=document.referrer}return e}().indexOf(location.origin)||window.parent&&window.parent.location.pathname&&window.parent.location.pathname.startsWith("/anov-gis-sdk/")&&a.baseUrl.indexOf("/anov-gis-sdk")>-1&&a.setBaseUrl(window.parent.location.origin+"/anov-gis-sdk/anov-gis-sdk/resources/");a.mixin(i(647)),a.Initialized=!0}},a.ready=function(e){};const l=a},35:e=>{e.exports="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQACAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDABQQEBkSGScXFycyJh8mMi4mJiYmLj41NTU1NT5EQUFBQUFBRERERERERERERERERERERERERERERERERERERET/2wBDARUZGSAcICYYGCY2JiAmNkQ2Kys2REREQjVCRERERERERERERERERERERERERERERERERERERERERERERERERET/3QAEACD/2gAMAwEAAhEDEQA/AOQHWp41JqFetXYBnigCWKHNWlts1ZtoQa1IrYGgDG+y0v2Q10AtBS/ZBQBz32Q0v2M10H2QUotRQBz32M0fYjXSfZlpv2daAOd+xGl+xGuhFv7UfZRQBz32I0n2Guj+ygUfZgelAHO/YSKPsNdF9mApPIWgDnvsNH2Gt824ppgFAGH9io+xe1bXkijyqAMX7FSfYa3ViFP8gUAc8bIim/YzXSCAGg2qmgDmjZmk+yGum+yLSGyBoA5n7IaPsprpPsIpDY+lAHO/ZDR9lNb5syKYbXHagDD+zGk+ymtz7NQbbFAGEbU0n2at77PUbW9AGJ9no+zmtZoAOtJ5Y7UAZJtiKQwVqhRSeWvUUAZf2c0fZzWn5RFL5VAGX5BpfsxrUEYHUVKIh1H60AY/2Wj7Ka2PJ7kCjyVPegDH+ymk+zmtsQA0fZx6UAYn2Y0otSa2zbD6U5bfHSgDD+xGj7JjvW4YPaomjHcUAZH2Sj7HWp5SnpSeVigDM+x0n2P61p7P85prBR1NAGabT0Bpv2NvStlPLHWpQ0YoAwDaMO1N8jHUGt92Vvu5/DFQtGSMbj+QoAxfK9KXyj6VqPa55yfxqu0JU0AUjDULpitPyt1QSx4oAynGKiPWrcq1UbrQB//Q5OPrWjbD0rNXrV+2ODzQB0Fpt71qxlRWFDOsYz/SrsV9k4oA2PMFNL1WWYHrxVhBnrQAvWkwP71SkIOvFUprkAHA5HI9xQBPlO7UfL2asU3xzjFWA7Y6/kKANESDsaeHNY5cg981YiuCgyRn1yaANBjxSK2BVAX2/t9BTvtB/wDrUAXS1KBmqQuD6VJ5xPQUAWjgVEcGoWkYioV470AWyMcU5Y81WDEdDinrMw4/nQBcWML1qTy1FVEkJqdeetADiBUbGpgnHFMdggzQBXZ2HQUqlz2NMa/UHA61Mt0VHP8AOgCOUygdMVAtwe5xj1q6bzPDLx+dRGSB+DjNAEP2k9TjH1pDcr7UktorDclU9pU4xQBd89T6UjSe4qqFY807JXrQBIXXrTDMD92oyxY4Uc9KtR6fIeT0PPFAFY7mpy2zt0BrUt7XHVaubQvAoAxBp8h6j86kGmt3IrVKL61FJGPX9aAM5tPI/iFN+wsO4q15bA/KQP1qVVbuaAKP2QL96nbEStAxr0JqrJAr+9AFTg8iklQYzTXAjGZG/AVUeeJz97HbgHFADwoPsfYmmOXXhWNPUgjAOfwxTXj2/MWoAarMP4jmnCVx0aoiSeagkl29aAL4mf8AiI+nSmmZiMYHPvWc10KkjlJGRmgC6i568mj7OD1aq3mkc5qzFtfnrigB4tkPekaCFOCTmp44xjJ6elUbpz5gZemOKAJTDGvQmmuAvBOM/wB6qpO7r1+tMLkcf/XNAFzmPuKeJTjA5rP3O3vUiqce5oAnEhBweanVVYdsVBHsjHzmka5RQQn60AEqhfu1UkOacXLHIyfWoJGPTBoAqTiqLdatzE96qN1oA//R5FTzVqJjVQdatRcHmgDRhkx1GfrWvAsDAE9frWPHU6NjkUAao2h9wbkdjT5bx1G5VyO9ZjTb8Fuo6H1qwl+FGH6Ede9AF6O8MwAYHB659KoxyvDIU6pnHNKsySdG/BhgfmKeUHbjvt6/lQBFd2gz5kfQ9u2aignK/I3I9K1IM4ODkVU1C1BTzUGCOuKAI2kz0pNmep/Wszzj3yacszH7uc0Aa6REc5z2qYLzycVnwymLJYEN2zxV60mZgWf86AJhge9CzA//AF6sIABz37VVlUSnaNy49uKALC4brUEzpGeepqpKuxvlJOe+eKjbcWy3WgCd5ttLHdAnA6+9VXJAxUKt5fJ70AbEc/PNTq5ZuvFYiXGPmqzFehU6/NQBuq/HWmMhbr26Vlx6gD1P51YXV4l4b8wc0AVZrJ0ffEMr97HepUvUHytnHtV1L2CfhGGT0HQ1l6hbtGxdR8p6+1AFw3Ct9wioXy3OQfwrNjmx0NTi6x1oAuQymNiM8dKe0qv1HuD3qibndwMU15COT19qAL2N/wB3rUhQ4GaopdP0HTvTzcM3JoAXkNnpWrZXwX5JCPY1jbsimbe/NAHW+enQEVHI5HT9K5fc3vTGmlU/KxH40Aa9xeiM/NwaptqGTjjFVDcyMMMxP1qE/NzQBsxXsXc4p8lxtwcZB7isIJnkH8KninMSlDye1AGvHcMzdOPUmntcJHwzY544qjHexhf9r0qG6vN5CbQ2Tx649aAI798sdpz1qsrBACnynj3zT7jZCcvz/s4/rVfaj5MWcenp+FAFppVXB3ZPtSecH6nmqWxh68dqmjbaO2fagCcnFVnUcnqacz5puRQBWzg5I6VYV8jil8sGhYyD7UASZBGD+ladsIgDt4PoTWYSEGe9OFyAeRzQBpXRdRmPn1rLmkY/eGOeK0baMsMliRS3sO6MhQM+poAzNpcZXk+gp4KhcqOehzVMSNE3UgirAui53Hr0OPSgCVnG3jP0zUHzH2qxHJGRgYB/2hTpYWRN4GV9VNAEUVsZDgdffitG3sVU4bBPcdaoWrsXBA4q/bS+U5Dkj60AXmtkQZxisu6ETE4IzWnM3mKQprmblHhJB/OgCndrtJqgxzVudy3WqTdaAP/S5AdasRnd1NQKeamVM9KALsT4HNWA4qgAR1qTPHNAFjzecdR600uXOKgIIG7HHvVmzSNn/fZ56AcfnQA5CV/wq5DdjZsfPHQjtVwaZARvw23jo1MudLjVcxnaR2JzQAqzmHDZypON1X45BKMjHI5Brmo7loyUbpnDA+1X47hYwXVuQePp/wDWoAdqGnJxJFwD17iobdobbc2dxHQ+9a1tOs44PUcisXUNNa2JkX7hPPtQBBLcNNIXbufXgVrWL4X5cc9cnJrCGBViCTY4OeDQBsfbliJBBI9c/wAqja/DHjp2/wDr1FPFGUG1vm6565z2FUfMK8UAannluePyqGWdzyQMetUvOPrSGfPWgCwZc1AzetMBJ6UhYJ9aAHEnv0pyR8ZpI2Lc4J/CrH75+injsBxigCCTd2FRyZxz1qT7a8XBA/GnQuZz8yrj+I45oAqFyOlatnqLqAJfmU8epFWINMtQu5mLZ6AU59HA+a3bBHO1un50AVr2AKPOi5U8kDt71R80d6svPJA5SQYzwyn3qrNAV+ZOUP6UAWU2u+3OBj8ePSkdlDfKCB6E5qjvOcg804zEnNAGmG9+varcNuZBk1g+cT1PHtW3aXkSqBvAPTBNAFgokY+dD+HNQtfQL8ozn6Vb84MD83sG7VWl8nGZMZ/vY4/+tQBVluA3OSo7VVlkXsc+9LdBP4SfXnkGqhOOhzQBN5mKC2TxTEi3Ak8envTN6rwwIPfmgC6JARgfnULgqTk4pn2hF5SmSXYlGG5PbFAEkc0cYOclqFkCuHbIHoTmqRI/AVf+yyTIHSNtvbHP/wBegCvcSh2wvSrdrHFgOwJIPJbp9Kr+SUzlHDf7h/njFRpA/wB7afz6fhQBoELIrSdEBwpJJ/Ws5ZDmrd2skUSqRwe9Z4Rj60AXw0Y4LYP0Jpkqx4yCD9Kp4xwamjZP4uPp1NAD1Hp0qcHA68VUeQfwZ2+9M3mgC1JLnpSpMFxuGe9V0NK3FAGvZXw3BG5yePatCdN33Tg+39a5hTjkVuaZdh28p/vEfL+FAFK6txGfmGCe3tVUIp+4eT2PFdO9urjLAFuxFczeQtbykNyevHvQA1gVJU9RU0c5ClT9Qf8A61Uyx608Op60AXBOeowKje4ZxhuagDAdDT+ooAEneP7pxUc90z8NSPUDnsaAI3YdqqucmpWNVz1oA//T48HBq1HKAMN371UpxII5oAtjduwjc+mamjuJAdsiqffFZ25sEfnmpYCzHJPAoA0mj3feOPYCq8ymL5kO78MUokGDnOex9KGjZQS3TOB70AW9KuZZW8tCcAFm4/LPt+tOkvXywLHjgY/lj/Jp2mWkwjMqMURgwye+fQd/Y9KfeQ/ZLXbEMM2AW6En0H0FAGa0pk+Y9afCRnDdDVeJGGQ/Tse9SKgHfpwKANJFSHDpIR7HpV6DU1ceTPjB4DDoaw1b1ppO3pQBZvoPIk+X7p5FVgwqX7SJE2SdO31qs2VPP50AWBIR04+lBbPPeoA2akBoAfk04Sew/KowSaXbQBN5tG7NRgU/pQBMrKO/Ipz3UiMDG5HvVYmmk0AW3uEm+aUDI6EYBzVWeaNFwjZ59MDmq0k2Bz0qo7+YfQUAbEOqhfk+6Dzyf8it8ysqBohkYySD29cd64Nu3p2rcs9b8oIp4weSfT/IoA0dXkE8ayoBuHf19v8A6xrPtrgg88Z6+la/9oW91H0Aye/U/h6VjSWLI4MXKNnAH/16AC+RYiGXhW/Q1VDU+STepif1+X8KpFyvynqKALe7NOCk1UWfHWrqSK/AoAlj82P7pOP0/Kpt7zDG3PrmnK0qRl0HAGcHvmoLedpThThuSxHAHOB+dAEaBwTjPFTRRCRgN3NS7Ul/dqRnvzkn/wCvUyoFIPy7s4Ibg4+h4oAnY+WqhsYHdo8isy+OW3KBz6Dj8K3Y/mQk8Y4AI4/xrDvroSvgjHHbpQBTE3mfKcD68UrtjtwfSqUshY7l7fnTDcOe/wCVAF5zGWA3Ed+lbdvdrtCRSFHA4yBg1yiuVOaDISP1zQB0V1q1y3ybtpHB296oxzlWz3rPScr15/GrEUm/mgDYn1EOmMbT7c0y2lg7jJPqelZjPuPNMLY6fpQBvNbRXAJjGD7VlzQtC2Dn8ahh1Fo2BHP44rTmuluYgxOSORgcigDOFOwRUS3AY4PGemehqeGLzXCg4J6E9M0AA9MflSE806aGWE5dWHb5Rkcd81UNyDQBZ8zHFWbSQiZCPXH51mGTI46noK3dI04sRNMDgfdHr/WgDcurj7PEXHJAyBXKzXhuG3PgZrrXijlBV1DDpWJdeHxktbvgf3X5A/Hr+eaAMhCpOGOB64zUhCDgP+lJNpl1DyVDD1Q5/wAKbDbSuehU/wC0CKAJVgfG8D5RxuPAzTGYjg/pVt2eFNjgEg5Hp/8AXqjLcmQnJ+g9PpQA0monOadv4IqNjQBC9RHrUrc1EetAH//U47vR0pcZptACk561PE+1P1qtT88YoAtW8jeYCfung/jWo0vmRlUAJPAz0rBEjA59K0DJ5iiSPhhwR60AdLp8yPti+X7u75eOnH4Vnavc7pdg6IT1PfArFgvpbeQOvUZBJHOD1FJdXXmSGQdT19/egC4zq3zYwPQVCXyc1V+0e1NacnpxQBM85Vsdu9WAQw9jWaWJ5NW4ZcrzxigCPPlnB5UnpTvMMZAHIPY0jFA28fl700y7+SOnNAEyMjnjKkelWFUjoc1RKhmBU9euDzUvzoeGz6cUAW92OCKUOO1U1uiCQ/NTBlbkGgCcvTS9R596Q80ASGQDrVu2kgYbWxuP97oPxrMIbvjHvUJfccHpnGBQBrSadFOCY3BxwcHGP6Vlm0kDEEYA4Ocf5P4VOspjQrG20Z7dz34+laOn+XJGIZVyGHHP48f0oAwJAAcDqOtR1oXflwyvGq8KcLx/OqLHPPc0AAbGPaphduQQxz3HsfWq9FAF5pluBk8ODyP7w9R7j9e1V3OPlbt0NNhOHBzjkc+nNXbrazEdx6d/cfWgCoFx833h7VNDOFwMGqvKnjinBnHOaANT+1jt2jIGMY/+tWYWZsgDHsKQM1SRo7c4z9aALNs4jG0Z3HknpirRnAXcWJPXOc/pVJVC9SAfY1G8gG7BwfYdaANew1ptxjl5B6Edaz9QJSTC9OSp9QeaoZIOR1qd5/OTD8svQ0AVycnJopSxIxSUABOetAGaSnlzjA4+lADT6VbtFOCw7VTrQgG2Ljj1oAqSOQ5pvmNnNSzpzkVCgyQKAHqoPLfpUyy+VypyOmKlRAoxSeWvUUAOjmjlwJBnHTNWIZxEVSQ8A5Q+1Z7Q7RuHXuKdv4BJ+X9RQBeuNTZMxfeXOTz144rJ346VNIEdNyjBBqtQBKsm05HX1rRjvPKQbnO49gTxWUKkjQucfligDaTU2XDR52njqTz71fttY3YEmCD3rCjt2QDcSB1Ix2od1A3RqVGfvE9fwoA6drgSD5CAfpmkabZ8xIPbpXMrOW/iA6Y78+4qWO7mcBcA9+KAOgf58ZAIrMudPjk+Zcg/pT7aeYBWZQAePX/9VackJ2htuR3xQBzTWrJ7/SomUjqOPWtuS2BO5cg+lQzExnDdD3oAxG+lREYrQmINUXoA/9XjicGm0pooASnbTTakMhIA9KAGlcCnq4Vcrw1RkmkoAe7bjmm0lFABRRS0AJS0UYoAUdzT44y7YBoiQyHaP8itS3sHkIQnEecBgOp/mT7UAZ00JjApglJ4NdinhpRhnbf14PvVC/8ADgHzxkIAOjdKAMBY42PLf0qbyFxlCarY8tiMg449qcLgjAHH0oAkYyR9eR6igXGKSW4DDAqtnB4oAulw4wOvXBFQIjbgTwCaZGWByOTTvMcjB5FADrg7SF9OauademIbCO42n/P+eaoP87HJ5oQ7Tgj0/nQBtXdoblzMuNpGSMcg96xJY2Q8jpxmugtJ8Dy26HvWXcxbmYZ4z8vp9PrQBn0UpGOtJQAtWo334Pfp+VVKkibafSgCxIgYe9V3TYcGrasCKY4/EelAFXp0p+4j3pXjA6VGUIoAXcc00nNJS0AKBSZp284wOBTaAEpccZozxikoAKKcy4OAc/SkxigBKuW8ygbDnBqnS0AaLAryelMAHUfnVaOdlPJyPSpt4jO3t1B+tAEwozTN3pUcku360ATHjkVXmXI3Dqe1IZ8rjoag3H1oAASORTjgnP6UynKpPI7UAGMVIHAyQPxz/hUWaXOT6UAXLe6HKuT0wCDx+NRyiNmwuAD1JNViMUUATS25TkHcv94ZxUYkKjjg+o4qWC6kgyFPDAgjsahwTQBcsblkf2P1rq7KVkVd44kOQTx9DzXHWrLG4kfHy849far11rUt03zgBcbQFGMc+vqPWgDpr+DaNwIwOw71zl23OCeevNbuiypcW3lSNlgMgdTg1j6rblHKjDE84OMj86AMhnI460wtmkKFTig8UAf/1uNNGaXGTSlCpx3oAQAN1/xoAGM1q6bYw3GQ5bcfu4GPr9fTH41dttBmbJiPy5wScfj7Z96AMaMpIMSDGO9SDTxK5SCRXI6DOCfpnr+YrYbSVgG18Mxzk7ckeufoO9YTofM2wAnByCOScHg0ATf2PciMyshVByS3HHrjrVFhtOOtaU17c+SbeRuM7mHcknue+OwFVLkxNt8pSvHzA88/WgCuoz7UE9vSjHenA5GMD1zQA5IXlbagyfQVcksxEMSYyBzjqKLOG5Ks8GV2gFjnGcnjFXf7KmX5Z2+cjOMngnsSOp/SgCjBYkYkfOw8Ap1J9PQV1+iwosOMuR2V8YB74wOKwraxlEik58rHQtggj09q2YGa3lKMcKwJA7H6d6ANblOh49KqXcbyo2DyRxwagvNZS1VdwyM4z1rHuvEEm4GMr5Z4wP69/wAKAMq80uaEGRlwo74rPVS3Aq/JqkrEksSTkYzhcfT/ABqzb3Ny6ho0G7orKOQP1FAFFbJsEP8AKevPagWeBvLLj61dm33P+vJyOuAB/Si0tbdiA5IbsBj+vNAEEVmHO1jtxgn/ADz+VbKaJsXIGCRkls5/LtTrS0tI5FcuTtOQgHU/1HvW/PqMQHcHuCKAODmsXiJbqc96VFUtmQHPQYrXuruKWTemDz2rLnvTvYjoeAcd6AIpPkjIBOeDk1GWaT94vXgEe+P8/jTDL5i7Se/f/PSrNoyhD5h4zyq/ePHX2Gf4s+2KAI0gaYEtwc4HHf8AwqE2zg7WwD7mtmF43hOfzz/Wqd1MJTsAHOPmI/yaAKTQ7ME/dOcEe1RNjtVlmaNPLJDDORt56e/pUax+aTt5bqAKAIlYqcin+axqYWpQsjghl6g8YPaqzDacelADy5PWkZs/1phpKAFNJRRQAUVLHA0gyOnSmMpXrQA2iiigApSc0lLQBLFA8/EYyR/nvSRwlyR6ZqWBmhHmowyONpGf0qWG7BfdIO+W9xQA6OyUx72BOe4NPaGNBhxhcdetaEJywAO6NznGNpH/ANeqt2jy7ljGcH5j6A9M0AVTCAuY887cHtzUN1avD8zcg9/eluFe3IAzt/hbHB/oaLiaSYAvwAMgf4UAVKeCFBzye1KuEI7nvSu287j+lADcjb05Pem0YpKAFo60lFAC0lLSUAFFFFABS0lFAGvZ6mLX96gAcAIy44YDvnsabe6iLvmRQCOh9RWVRQA5m3UgopcYoA//1+PHrV+y8otmTHHc9hVBeue1Tuwwp7A0Aa7X0Nk2+HknBXHT0Na1vqwkjKRFQzYYYzuPqeeOK5OW48/5pTyvCgDj8atw3aSkbsRMAV3D7v5dc0AbN5cC5hkMjH5SoIXgkE9T7D27VkwX62BdbUBiTgOy5yPT169KdDc74zaxtnJBLdDweOfT8yans4Y4lM7su8/6ssMf8C/w9Bz3oAzLvzZZCZyAx+YjGMcVIlgMKyneWGQoHQerHt/nrWxYwNKN58osGPmMxOB6YGD/APXpxtZWPkpIELZOCODt6kd8e5+oFAGDLZOeUBcjqRyPw7nH+RU9vp7QyK94hEfUqeCQP6VZe5kRFiMrSAkbUiIHfkHAzyPu4Jz3pNTuBIPLnLBlHygdP/1+uaANs3MEpEdsgwAW6dMf/X9aVVW3XNxIIxnO3JIyeeSeT7cAD0rlBeTuuyPhOBhRjp7+tSRRz3DBpSzjOCN2T/PpQBq2txDLPLFcSAIQNjsQP85pbjUfs2IAwmA4BAHA7VQudKmiTzdgAHDBMnA9fWqg3iMBlI54cg8fjQBoyl9R/doyrjB2s2KfZ+HS2WucqB0AHXn19PpVGHzEOYhvc5y3HT+ldHaymSLypyfxYj9aAGDRrPBMUZLD1JI/InH50r2szxiK34I++VAwT9f6dPSrLIbX5rdiQRtII35/Pnj2NVrZHj/1K5Uk7sEj8R6D25x2oAqvoV0OjKxJ6Zx/n6VUuLC5t1+eNSAcfKcn610ZuXiOJuM981lapqUG0puJOD065oAxRqarlTGpHTPQ1FPeq54UY6HGapySeYc0wUAS/aD6DHbiouWPuadhcdfm7DtT0VQy5PBIzt6igBPIfqAeDirq2U0aqw+XeDn2A9frVxpEhjDqy7A2AuOSPUfj171Qu7oTdMn0PSgCTT0eRzCRnPY9AanttNcvlYzJjIP90N2ye646gfSn6derjLrtCjlu3p+dbMV3PMywxD5WwVI4UqOpJ56UAZeo6HJEnmKqjnkKG7/Unj+VULe4k06Qou0k8EkZI/XitvWNYeNTbqPnX7/Qgj2wcj1rlHfc27p3oA055uTI/wAznqc1A7LNgqgUegNVlnbnPIPalBD8j72fwxQBKyluWX5T39KrmMk8A4ziuispwkYWRAzdOfSnRyWjSMDGVIBJx6d+PX370Ac2YnHUHnpxV6ytozuaUZ29ycKPTPfH4c1pXd3aRxmFFI3AYlx8xx2J681X/tuJLc26QAqTli7E5Prj+mcCgCBJWdvLQrgHBwMKfxqK9iWMBl53jPJ7+1Ucj8/SnSOXOck/WgCOipkKqwyO3ehWRTnrzQA1omUbjxnpUdWJ5/POT8uOg61F8oA6570AW7WGNpBFLIFQ4JcHpWlb6ZZuJv3wOwblORg/41gswPQYoDY/pQBqm9BgWLGMnr0Ix79q0pma3hja3Pmggl9hGFI9e/X1z6VzJkJOT361sG5h1BRGkfl3BARTGcIwA6MM9fcUAVbjUZb2YSy4yuAABgflUDxrI2Axz2U8n6cVbutIe0kVHYbWG4Hv+X1rQ060F0wW2IBXux6t79xjsBxQBzrxlCVPUU0DtXW6hp/2GJ5JXVpXXDEAAnPHy/1rLis3gjJ25LAY2kZ+boM9jnqP1oAyXUA4Bz+FMNaF6Wt5ApGJNoD9M5PUH3qKFoC6byyqM7jjOPoKAKpUjqKXyz3qWfYD8jFgDjJGDj1/+tT4ZjwgCglgdxHI/HsO5oArbTnaOtWHthGu4t16L3zVi80+W3Ad8DccoR0Yeo/nzVeIrIcOQPQt6+poAkjhj2/Mf97t/P8ApVaQDPC7R71Kcs5284OAf6/jV+LyrZQ82GkOSN3+TQBTttOlnJ2g4HersmmKGEbgoQOOOT756H8KW4cXDIgbaD1Kggev4EDpVm2aPbt81pmBG1QeQpPJAxngdRmgCnf6YtmgLcNgEDOc5rKRCxAHJPYVe1W4aRwm7cq5x+f88VWimWNSNuWPBOf5e9AB5eG2twR2pjLjrSPJuO7nPuc00E0Af//Q5AKD1OKdKAMev6UwHBpwO889AKAJ1hEhAYhV/vYyBnsakeDzG8iMKxB/1i9CB1P0q5ZhJQVXK7gVJPIqxpqbYTMOWJIUDuF/rnmgBLfSY4CJJscdieOfWi5uII5eD5o53ZGFx6D2/n71sXigRecp3ALj/ePU4/lXN3Vsbh8x7VUAcAnjjpg/4CgDTXxHCAcKVGMbEUY/E5rEuNReR9yk9dy7jnafb27Y6VWlhKHGMH3qKgC/BI8xVUKrIWzuPykZ46+nPTtU9zZwQhi8xkfGVCqeT7k549PWssKcE9ql8pgwDckjhep9uKAO60qxhXTVOQSVLMeOCeo/DpXP2urRW05BU7c9eOP/AK3rWTO9xB+6fKAgEoCQOfUD+tV0R5mCqMseg7mgDqbiW+upJLZNu3aGJJxlT6YqpcQSPGsAA3Ng5J/nnmp9LtVhUSyhkJzhdxH0zz+PNae5XTKSEN3YYLfTJBoA5qG1uNOuAWU8dx0OR/nrW9bNKSBdksh6bMEZPvx+lU7lZMLM0hZH6cdT+n+FbNlatIvKFk68sM/hQA42cZ+dSyAd8ZBpzW0cas25Txjjj6d6bdapFZjaSUPpgmuWvdTM8m4EkL14GCPwoALxiXOST+JNZdweQKfLcluR/KoS4blutAAsZNNVc8CpI5G/hx9D39vekIaTJA5HUAUACSmJw8fBByO/86klmeRhMcZGBkDHI9qrUooAtXl01wVJCjAJ+Vcck5Ofeq27jFNooAm+0NsCAnGc/jS/apcFdzYPUAnBzUFFAC5oBwMUlFABRRUkag8k4xQBqadbz3m1M4jHpx09Kt3NlNbzPHH8zlc7s4HzY4Ge/wClZ1leyxnykJK89DtOPr29T3oubqWRi9wx+dVyo7gdM0AVnje1lKyfK4POeoP4VFNKZXLkAEnPAwKa7b2Levqc02gAooqzbwCUHnG3nHrQBWorbvYLOCBduTKeWyenHasSgAoopyqWOFGT7UANoqeS0mjXe6Mq+pUj+dQUALWno8yQXKGTgbhyRnB7fTrzWYAe1PVsZz3GDQB2viOyjmiNw5wVAIIPB9h7ntXKC/KxiMDBU8ODg4/D+dQPMzL5eSVByOv+RUNAGul1bNassi752JCs2dw7g5PbNR27Kse+SQ/L9yPGQSDnBPbnnnrWYDjmtfS5YCW+0AdPlJXP/wCqgCjdSm4cysdztycDAqrW5rUSJKIoIwvAbdyCcjp9KxghJwOtACK23sD25pKCMUuxj2oAfLPJMBvJbHAyc0iKXOEGT2xTMHpWxpdukbec7cAYIxzQBkuGQkN1702r+pTfa7hpEGASOfoMVSZCpwaAAMV+YHn1p6TuCSDgnuDg/pTB0wfwpFUscDrQA+R/NOTwe59ff60xUJIHTPrU58pF2kEt3pzXX7sIoxjjJ64oAq9KBRQKAP/R400qLuIHrxSGnRPsYN6HNAHTWtiRCxHUDj/61ULN3DAdowzAg8fMaWTVNsR8tsMewrKFwwJI75/XrigDQjuJL6QRBiqDnOTwP8a07i3kEeyHESjGN/32/wBo/wB0Ht/SsTTrj7LIJTyvGa62HUbW68yMEZkxjb1AAxz7UAcdPbSxZLkcn1quxycitPVYthC5HH59f6VUtbQzHLcIOrf570ANjRlTzD93OMeprUkuEtkX7K2ZiAGZRngjkAn1P4jtWfdT7iqhdqr0T0/+ue9QCZ1OQcY9KAL00e5/Li+dxyzt6+mT6VcguxYQBY0BmdiWcYwB2ArJN5IRtXCg8HaoFME7AY/WgDWN+8r7SPm/CtWCzkMfmA7Rty3HP4Cuatx/EetbVrezAqB8wAK4I455/SgDTs1cqzhFUYG3zCNx9TnoM+gzVBprgOzQsBn74ycexGMYNdVHCVXA2YODk9h/KszUTDEySxDeckFeP88dqAOUuZpJxunUs68ZJ7f59aozDABAxkVt6lMZpN8aFBwKzJ7Yv8ygAgcjGPxoAoHmkpSMcUlACg4+vapSP40J469jmoakjfbkHoRjn370AMpKcy7Tim0AFFFFABRRRQAUUUUAFFSxQmXIXtzSSx+WdvXHUjpmgBobFOllaVtznJ6fhTMY60lAC0lLtNOO0r796AG1JDNJFnYcZ4NMA4zmlYHPTkdaABnZuWOabSqdhBoJHagAx3Naul31taSK7xkkcFuv6VlFyetG09cH8qAOn13XoLuIxQAkHjcwxx7Vy9KTxim0ATW+N2CcA8ZqxJaqWxCcg8KP7x9v/r1TVyvQ4pyOVO4ce9AFu5mE2WZEVgQpA4PA5OP/AK9Q21w1rJ5iqM4IG4ZHI6/4VHLGU7YqMnNAGzDb2JyZGdtoG9lI25b9eD17Vn7hExxnYwyPXmoEkKdOeh59qdNL5rbsY9B2FAF2RzMM7iWXgEnP+f8AGro0lzb/AGlCCuMkscEEdQf6VnWOd/QY9hz9K2Gf7PCSep7Z4/GgDnVOHyeat1TkcyMWPU+lOExUYH60AWgBUnnMV2Z49BVSFyxwTVgCgBQKa6AqakUUuKAKRRl+lTI6R8uBupxYAZ7c1SZixyaAHyNvOfc81HRTkjZ+goAZSip2tivJ4qMrigD/0uNNJUgGTTjDQBDTlXcQPXihl21JBtB3MN2D9096AFjYq21gGB+XH/1xW9p9vDEzOWwABkAZbntk5P5Vm+bGU3lT5nqW7j+6oGPfn9amtZlJPlIXcj756fj6D+dAEN7m6utiDAOAB7f1q3eq1nCu3pwBV2wsDH+/mO6Q/wCf0qaR4ZnIZhiPrQByD5yd3Xvmkq7PGbiZmAIXJx8pP4cU6FJYQ0bg+Ww+bjr6c4oAitniVwWXI755rXg06G6bzYWGM8qvX8j/ACrJl+QZUDFQJO6NuQlT6jj+VAHV/wBjW4XYG59en6UR2Ytv3hz8uSOePxFY0OsXPAyCem5hz+dWVkkk5mIYe7HB/D/61AE0mpyPlpScZwAp4qu9zEHw2R3qN5CJAiEIWwBgZAz3z0rWg0OBAZZ3Vs4xjj6jknrQBkzansGETp3bFVGvnnyrAD0IFa13a2CHIBC5wPmIA9TUBe027YTj3IP86AMR1ZTzTKtzw7zlKgMLjtQBHSg4GKMUlAEyQvMMqCccHAJwPfFL9klzjY3rwp6evTpUtpqM1pkRn5W+8PX8ev5UsupTSAAMVAG3gnkHr+HtQBBKhUAMAMfmfrUNOALH1JqdrGZQGKnngDvQBWoqcWspO0KSfarKaRdP91Dn070AZ9WLe0kuD8g49e1bdjpJAP2lSm3vxgjFMimEzlXyYAcLt4HHp/h3oAhliW0At0+aR8MSOBj0P41lSKVJTPTr9a6O51S0iiKxISzfKc8ED1z1z6fnWe0FvvjaPOCDv3Dcoz79/wA6AKSWodQ5YDPXd0qKSIxtt71sTtYeWY03Fz6AqB/wH+vWs8jeSW4XgAd+KAIDjHI59qjClm2jqeKnZNx2jjuM+lFpF5kygc/MMmgCx/ZrFS3CqoyzGlN7DDHthjBkxgysP5DnH1NW9WuPkW2j6Elmx39PwrMitWJwTj0NAFcuWGCeKChGPfpV6Kw8xvmPuSKvQWUajcOewJoAylRYRmQfN2pJLjI2hfxJOavT26g7iOfests5PtQA2koooAKk81hz6VHSigB8krSHLVHVy0MeSknIOMcdxUwhtW3szEY+6qkf160AZtLjtUrRhgTGPlHc9fxxWomlxKykseRnGO/1oAk0q23AE9sZNR6kN0p5+X+HH861x5dvD5QOGIOD6VkCNpWHdu1AFEWuPvGq5jIJHpzWq4Kna3UdagmxjNAFOHC5Y/SrQbjJpqW4C5PP0ojt3uG2jgDt9KADzx+HXNRvdHPy/mad9kLHk09bVAeeTQBUVWce3rSFRnj9a0BCemMCp7XS2lO5QAo79/yoArWenPctgfd/iPatL7OlugbgdtzVpx2/2eE7BlsZrn5pZHY76AIbqQOfl6Dv61TJyeakkJqKgD//0+RVsGtC3UNxWZViJyvINAGi2meZytRf2Ox68VNDfPjAPNJK1xIMMzAdiP8AOaAJLfSoxhnfPtg5NXWmghUDs3QLwT/9bvWbBaucbTkA5I3H+VWls1i3vI/LDjA6e349KAILnU5Z3McIwPu5/nj/ABqO2tiflYhevJ61oQaanlB14Y9Sx49hj+tQXUZRs9cjI/H/AAoArGYRHEXT1J5P/wBaoppXfqfw7U7ZinR25k57dOKAKvXrTGBIOFJA6kDiteDSnuGIUgKvUmq01lHESgl46EKDg/0oAoxlx6/jT5/mXB69qkVY0bv9QOv+FJPcLj5T9ABQA21GRtZQw9+orpbe1tZo8bQrA54GPz7VykQMjcnGfwrWtzOhKplh0yhyfxzwB70ALfIm8Rjru79cY6Y9M96qmMI4AxknGB6Yq8+qrGPLmi3Nzhjx9cevPpWMsjNLvxyDwPT6UAaJhAOBxVoacr/MGB9qqMxY5Jq1augOGbaKAK1zpuecj8DVVNKkflQSPXGBWw/kowePd9WIq6dZiiXaBubsO350AY1t4fZjunbag5/D8ajmsYg+yFS3ueeKvveTztufp2UcD/69MeaXvkZ649KAEhggsxulzn0UUsuoRyDEakL+ZqsY95yQfxNPjtXUcDA9cUALBePESYlAPTJXP9amW7u2zvkOe4AAH6c/maJBFAq4IdiOnI+gqNrtUkI5AHBXr+XWgCG5kL5Gd5Hr0/nWe4mPbj2rQkWQ5YRlVx1Pp+FQlZMA9VoAoC3dm5/OpNqoMfMcds4/lVtFGc/icUSMNvPagCKJQBle9XIowBuOKqx4wMdKnV+No49TQBDJDuPqTV6Cx+yxmVuo4GKLRRJIg446itHVI8wHHGCDj1oAwZWMz7m4xwPwqaJIyvJO72qBFqTbigDSgtwVxuOD14/nSvbMvXp7VmqxHQn86spcvwCeBQBZmsDMODjHas82iLkHbx6g1oRziQ+/1ps8Ky8kYPr0z+FAGDLASeMY9hUPlY6gn6VuNDgYqv5YNAFD7Hv5iOfY8GmG0lBwVrSWPbyKmilKHkA/UUAZq6bcFQ4HB6c80wWFw/RD/L+dbz6gQMKOPYAVSeeSXODjP50ATWAt7GMi4JEjegyAPw61LHexFzgfux03dazfsrtkn8zSRwiPqfzNAGrNfRzMSikHGB0PIpPNKYcFEbHRQSfr9aog7DlTS7ieTzQAsisxJJz3JPeofJLfSpA7D3qeA+YwycUAKbL90uOrHn6AVCGNm4KfeHrzW00kYx6r36g1HqUCTKGUfNkfMOlACW9zFOo85CrAfeA4NKYocnDAA9hUNrGyDax+gqGdsnFAFqOKAEru+nIq6qBRhR2xlTXPyIxG4Dj1p9vdPAwIPA6igDbyZFZW4PUE1zsituKv1BxXQpqEF0MMCD35/wAKpTWsIyycj65oA52cDPHSq561qXKL6VmsuDQB/9Tj6lSoh1qZKAJ40PpWgu9xxz+NQ2z5IA6e9aC3Tw/cQYHU89KAI4YJOWXg44rVtX2IVmAPPcZ5rKa9dmO0Yz2q7Y3LnHmDIB44xigDRuCoTDDoMiucuH3EL6f1NdKypJkg5J6jNYFxa7JMEnk9T6UARpbbsc1chbygRs59T3/LvSJ+7A74pxnLdhQBTuLh2JAG0ewqoVY9q0X+f71KGfG3OR6ECgDO8hz7fWoZIW/iGa1vLB6qP1qKSEfwr+VAGI0OORmnbpF5ViD7GtF4CeSAKqMoBx/KgC3DqUw4lG7sCwBI+nHFOSKKeTe44/I5+oqgSe1KbiVRgNgfQUAdJ9gt3AKjnsfb0rBlV4pGRhjB4JqBLqdDkkkfXH8q1I78H/WEbf8AaXJoAhtp8cS8rWjm3kQ+WuD1LdOf1pqTWbj5Vy3Q/LtqNwgOYvlPsf6UAXIRujygGT1JPT/P51LDZ5OWOM9u9ZaTPH2B+oxT/tTS4BZQPUHp+VAF2Wz8t9w+ZDwc8Vnzq8RKoSB6Voy6lEoEatuwOT61QMu45bp270AUG3MeeuetPWNVOXzxWhsjce9VZIvKORyKAHveSkjJ7YxjgioOxPTPQClPIzTGBoAYAV4/UU4R/LuNWo7crgsOfQ96bOobn04wKAKbH0qeGPzBjoT0qEjHFPiYrwelAF60tsSYfhxgg1shDKDHLyD3rNguw2BN06BuhH41swbQgwcj1oA5250mSNiU5XqOO1W7ewYptkAP0PIrZLrTCSehoAwpLPyW5GR29aqzLjkVozSyPIccKOAD/Oq8h5JoAzwx7Vet3J+8SfbrVCQ4bir1mNwLEHA70AXWt1VCwIyfzrHc88VrGMkll5HoD2NZskeDkCgCLJ7UucfepOenelC54IFACHLdDURiYVbS2cjIH4042pThutAFVH4wf50jYPT9asfZ6BDmgCEIfSpI4gTyc+wpxTFSKw6EcfrQBL5se3EaHd7/AM6rukgORwfTH+FXoZYeA4IPr2q3sBGIjn60AZCSyJ/9ercOoeX/AAD/AICSP/rVbe0IHzAfhVKS1HUUAWfPt7g5fKt/n0pZbWCX7vJ9sis//Vfw1Pb3aqeY8/SgCSOzVB/F9On86pzWpLHH6Vfk1DH8B9s1UkvXk6igCosLIc8j3q35rbcP+BqETueCePep/lx/OgDNuFHWs6TrWncAdqzJOtAH/9Xjx1qzGqk8nFVweasRmgC4ojHQnNXIbplXZnj0IqgoFTKKAL8MMUh+dgP0rQaOMIArZwc5z3rD59aXJ9aANd3I4OMHqf8ACpJUScAA9OhrEV2U5Bqyl6w+8AfegB8ltIrHGD7ZqF1kX+Airiakqj7nP1o/tMdl/WgCiJHB5B/KrUd0CMMtK18WGAox9KEuY/41BP0oAcWVhlaryOalNxGDlQf5VBLLuOQCKAIX/eDk1CYVHSrHHUcUgYelAFcKB1FBjU84q1jPQVGRigCHaD2phiHtUxGelJzQBH5Q7inHAGBSkNUXlGgBMilyuP8ACnBCOlG2gAXPQVNGD3NRDIpykjpQBaQY6tge9K7KMc5FVg1KSM8UALIjHoePao0yrAnkd6cxqMUAaMrk8Z/H2qoxalU8ZHUetTbBIM9DQBAq+tOGRzUqx7T1OKJSD14HvQAsbgdQPpVxL8RjaFH4VlvISMDp9KkiXPUUAaBvGb7vH0pRKx6moUUCpNuaAHnnrUTxg1JsxzmhNuctQBmS2zZ4q/CGjh2kY44NTZQNnNWEmxx8p/SgCvAcocjDetRXMQ6+vPFaIkU8GMfmKYyxP95ce4NAGMqHPIqyq7hgqPqOtafkWzdWYfhSeRbgZEpA/wB00AVEhI5Awac8W4Zk/MetXQ9sOBKP1pp8k9JlP40AZ5tm5GM+9VfJ2vjp9K05LhVGFdWqizNI2cUAV3jy3tTtgqUg96TaRQBFtq5AhxnOPbPNRbaRjgdjQBpxlyME0NEe1ZIlIPHFBmfruOaALksTHpzVNllzgUhuZf7xpFunHXBoAnVmXhwDTXEZ6AihLtByy/1pHuEY5HH1FAFchW6GjYAM7hSOd3QiqsoYUANuHX1rOYgnippM1XPWgD//1uPHWrEZqADmrMa0AWY2NTKxqOND/kVYERoAbuPtQWPpUnlGjyjQAxXx2FSfaWHYU3y2o8tqAFM5b7wz+FJ5uew/AUeW1L5TUAJ5p7Unmt707yjR5RoAYWJ5NL5jDpTvKNKIjQBFuY0pYnrUvkn1H60eV7/zoAh60lWPJH+QaBAPX9DQBBS1Y8hfX9DQIU9T+RoArEU3bV3yU9/ypwjjHUfoaAKGwilCn0rRAiHr+RqZZ414CfpQBlCJj2pPKb0rVMynsfyppkUjAB/KgDKIxTa0mVeyj8qZ5Q9KAKIAowK0BGPQUmwe35UAUgAOhqZX7frUvlD2o8laAEV/cGnbUblhz7Uxov7tM2yelAErRRt0OPwpi25z8rUgEnp+tJ+8/u0ATKzL3qQSt6/pVbL/AN39acN/ofzoAmNwR1H6Go2nbtj9aT5vQ0ZagBvnSe1J5jt1xT8Me36UbT6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q=="},486:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st ;\r\n vec2 center = vec2(0.5);\r\n float time = fract(czm_frameNumber * speed / 1000.0);\r\n float r = 0.5 + sin(time) / 3.0;\r\n float dis = distance(st, center);\r\n float a = 0.0;\r\n if(dis < r) {\r\n a = 1.0 - smoothstep(0.0, r, dis);\r\n }\r\n material.alpha = pow(a,10.0) ;\r\n material.diffuse = color.rgb * a * 3.0;\r\n return material;\r\n}\r\n"},671:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\n\r\nfloat circle(vec2 uv, float r, float blur) {\r\n float d = length(uv) * 2.0;\r\n float c = smoothstep(r+blur, r, d);\r\n return c;\r\n}\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st - .5;\r\n material.diffuse = color.rgb;\r\n material.emission = vec3(0);\r\n float t =fract(czm_frameNumber * speed / 1000.0);\r\n float s = 0.3;\r\n float radius1 = smoothstep(.0, s, t) * 0.5;\r\n float alpha1 = circle(st, radius1, 0.01) * circle(st, radius1, -0.01);\r\n float alpha2 = circle(st, radius1, 0.01 - radius1) * circle(st, radius1, 0.01);\r\n float radius2 = 0.5 + smoothstep(s, 1.0, t) * 0.5;\r\n float alpha3 = circle(st, radius1, radius2 + 0.01 - radius1) * circle(st, radius1, -0.01);\r\n material.alpha = smoothstep(1.0, s, t) * (alpha1 + alpha2*0.1 + alpha3*0.1);\r\n material.alpha *= color.a;\r\n return material;\r\n}\r\n"},724:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n vec4 colorImage = texture(image, vec2(fract(st.t*rep - speed*czm_frameNumber*0.005), st.t*rep));\r\n vec4 fragColor;\r\n fragColor.rgb = color.rgb / brightness;\r\n fragColor = czm_gammaCorrect(fragColor);\r\n material.alpha = colorImage.a * color.a;\r\n material.diffuse = color.rgb; \r\n material.emission = fragColor.rgb;\r\n return material;\r\n}\r\n "},719:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput); \r\n vec2 st = materialInput.st; \r\n vec4 gradientColor = texture(image,st); \r\n gradientColor = czm_gammaCorrect(gradientColor); \r\n material.diffuse = gradientColor.rgb / brightness;\r\n material.alpha = color.a;\r\n material.shininess = 1.5;\r\n return material;\r\n}\r\n"},433:e=>{e.exports="vec4 getVec4ColorSpaceByImage(sampler2D image,vec2 coords){\r\n return texture(image,vec2(coords.s,coords.t));\r\n}\r\nfloat getRandomNumber(float begin,float rate,float speed){\r\n return begin+abs(rate*sin(czm_frameNumber/speed));\r\n}\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 coords = materialInput.st;\r\n float time = czm_frameNumber;\r\n vec4 colorImageAlpha = getVec4ColorSpaceByImage(image,vec2(copy.x*coords.s,1.0 - 7.5*fract(copy.y*coords.t *1.0 - fract(czm_frameNumber/speed))));\r\n material.diffuse = color.rgb;\r\n material.alpha = color.r*6.0 + colorImageAlpha.r;\r\n material.emission = color.rgb;\r\n return material;\r\n}"},253:e=>{e.exports="uniform vec4 color1;\r\nuniform vec4 color2;\r\nuniform float whiteLength;\r\nuniform float greenLength;\r\nuniform float lineWidth;\r\nuniform float speed;\r\nuniform float direction;\r\nuniform float arrowLengthRatio;\r\nuniform float arrowWidthRatio;\r\nin float v_polylineAngle;\r\n\r\nmat2 rotate(float rad) {\r\n float c = cos(rad);\r\n float s = sin(rad);\r\n return mat2(c, s, -s, c);\r\n}\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n\r\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\r\n float totalLength = whiteLength + greenLength;\r\n float phase = fract(czm_frameNumber * speed / 1000.0);\r\n float pixelPos = fract(pos.x / (totalLength * czm_pixelRatio) - direction * phase);\r\n float ratio = whiteLength / totalLength;\r\n\r\n float perpendicular = materialInput.st.t * 2.0 - 1.0;\r\n\r\n vec4 finalColor = color2;\r\n\r\n if (pixelPos < ratio) {\r\n float normalizedPos = pixelPos / ratio;\r\n float arrowStart = 1.0 - arrowLengthRatio;\r\n\r\n if (normalizedPos >= arrowStart) {\r\n float arrowNormalizedPos = (normalizedPos - arrowStart) / arrowLengthRatio;\r\n\r\n float edgePos = arrowWidthRatio * arrowNormalizedPos;\r\n float leftLineCenter = -edgePos;\r\n float rightLineCenter = edgePos;\r\n\r\n float distToLeftLine = abs(perpendicular - leftLineCenter);\r\n float distToRightLine = abs(perpendicular - rightLineCenter);\r\n\r\n float halfWidth = lineWidth * (1.0 - arrowNormalizedPos * 0.5);\r\n\r\n if (distToLeftLine < halfWidth || distToRightLine < halfWidth) {\r\n finalColor = color1;\r\n }\r\n }\r\n }\r\n\r\n material.emission = finalColor.rgb;\r\n material.alpha = finalColor.a;\r\n return material;\r\n}"},454:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n float time = fract( czm_frameNumber * speed / 1000.0);\r\n vec2 st = materialInput.st;\r\n float scalar = smoothstep(0.0,1.0,time);\r\n material.diffuse = color.rgb * scalar;\r\n material.alpha = color.a * scalar ;\r\n return material;\r\n}\r\n"},162:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\nuniform float percent;\r\nuniform float gradient;\r\n\r\n\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n float t =fract((czm_frameNumber) * speed / 1000.0);\r\n t *= (1.0 + percent);\r\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\r\n alpha += gradient;\r\n material.diffuse = color.rgb;\r\n material.alpha = alpha;\r\n return material;\r\n}\r\n"},885:e=>{e.exports="\r\nuniform vec4 color;\r\nuniform float glowPower;\r\nuniform float taperPower;\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n\r\n vec2 st = materialInput.st;\r\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\r\n\r\n if (taperPower <= 0.99999) {\r\n glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\r\n }\r\n\r\n vec4 fragColor;\r\n fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\r\n fragColor.a = clamp(0.0, 1.0, glow) * color.a;\r\n fragColor = czm_gammaCorrect(fragColor);\r\n\r\n material.emission = fragColor.rgb;\r\n material.alpha = fragColor.a;\r\n\r\n return material;\r\n}"},450:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput)\r\n{\r\nczm_material material = czm_getDefaultMaterial(materialInput);\r\nvec2 st = materialInput.st;\r\nvec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\r\nmaterial.alpha = colorImage.a;\r\nmaterial.diffuse = colorImage.rgb * 1.5 ;\r\nreturn material;\r\n}"},529:e=>{e.exports="uniform sampler2D image;\r\nuniform float speed;\r\nuniform vec4 color;\r\nuniform vec2 repeat;\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = repeat * materialInput.st;\r\n float time = fract(czm_frameNumber * speed / 1000.0);\r\n vec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\r\n if(color.a == 0.0){\r\n if(colorImage.rgb == vec3(1.0) || colorImage.rgb == vec3(0.0)){\r\n discard;\r\n }\r\n material.alpha = colorImage.a;\r\n material.diffuse = colorImage.rgb;\r\n }else{\r\n material.alpha = colorImage.a * color.a;\r\n material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);\r\n }\r\n return material;\r\n}\r\n"},139:e=>{e.exports="uniform sampler2D image;\r\nuniform vec4 color;\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n vec4 colorImage = texture(image,st);\r\n vec3 fragColor = color.rgb;\r\n material.alpha = colorImage.a * color.a * 3.;\r\n material.diffuse = max(fragColor.rgb + colorImage.rgb , fragColor.rgb);\r\n return material;\r\n}\r\n\r\n"},852:e=>{e.exports="uniform sampler2D image;\r\nuniform vec4 color;\r\nuniform float speed;\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material=czm_getDefaultMaterial(materialInput);\r\n vec2 st=materialInput.st;\r\n float time=fract(czm_frameNumber*speed/1000.);\r\n vec4 colorImage=texture(image,st);\r\n vec3 fragColor=color.rgb;\r\n if(st.t>.36&&st.t<.64){\r\n fragColor=vec3(1.0);\r\n }\r\n if(color.a==0.){\r\n material.alpha=colorImage.a*2.*fract(st.s-time);\r\n material.diffuse=colorImage.rgb;\r\n }else{\r\n material.alpha = colorImage.a * color.a * 2.0 * smoothstep(.6,1., fract(st.s - time));\r\n // material.alpha=mix(color.a,colorImage.a,.3)*2.*smoothstep(.3,1.,fract(st.s-time));\r\n material.diffuse=max(fragColor.rgb*material.alpha,fragColor.rgb);\r\n }\r\n return material;\r\n}\r\n"},601:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\n\r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n float time = fract(czm_frameNumber * speed / 1000.0);\r\n material.diffuse = color.rgb;\r\n material.alpha = color.a * fract(st.s-time);\r\n return material;\r\n}"},750:e=>{e.exports="uniform vec4 color;\r\nuniform float speed;\r\nuniform float percent;\r\nuniform float gradient; \r\nczm_material czm_getMaterial(czm_materialInput materialInput){\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n vec2 st = materialInput.st;\r\n float t =fract(czm_frameNumber * speed / 1000.0);\r\n t *= (1.0 + percent);\r\n float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\r\n alpha += gradient;\r\n material.diffuse = color.rgb;\r\n material.alpha = alpha;\r\n return material;\r\n}"},586:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput) {\r\n czm_material material = czm_getDefaultMaterial(materialInput);\r\n material.diffuse = 1.5 * color.rgb;\r\n vec2 st = materialInput.st;\r\n vec3 str = materialInput.str;\r\n float dis = distance(st, vec2(0.5, 0.5));\r\n float per = fract(time);\r\n if (abs(str.z) > 0.001) {\r\n discard;\r\n }\r\n if (dis > 0.5) {\r\n discard;\r\n } else {\r\n float perDis = 0.5 / count;\r\n float disNum;\r\n float bl = .0;\r\n for (int i = 0; i <= 9; i++) {\r\n if (float(i) <= count) {\r\n disNum = perDis *float(i) - dis + per / count;\r\n if (disNum > 0.0) {\r\n if (disNum < perDis) {\r\n bl = 1.0 - disNum / perDis;\r\n } else if(disNum - perDis < perDis) {\r\n bl = 1.0 - abs(1.0 - disNum / perDis);\r\n }\r\n material.alpha = pow(bl, gradient);\r\n }\r\n }\r\n }\r\n }\r\n return material;\r\n}"},797:e=>{e.exports="in vec2 v_textureCoordinates;\r\nuniform sampler2D colorTexture;\r\nuniform sampler2D depthTexture;\r\nuniform vec4 fogByDistance;\r\nuniform vec4 fogColor;\r\n\r\n\r\nfloat getDistance(sampler2D depthTexture, vec2 texCoords){\r\n float depth = czm_unpackDepth(texture(depthTexture, texCoords));\r\n if (depth == 0.0) {\r\n return czm_infinity;\r\n }\r\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\r\n return -eyeCoordinate.z / eyeCoordinate.w;\r\n}\r\n\r\n\r\nfloat interpolateByDistance(vec4 nearFarScalar, float distance){\r\n float startDistance = nearFarScalar.x;\r\n float startValue = nearFarScalar.y;\r\n float endDistance = nearFarScalar.z;\r\n float endValue = nearFarScalar.w;\r\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\r\n return mix(startValue, endValue, t);\r\n}\r\n\r\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor){\r\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\r\n}\r\n\r\nvoid main(void){\r\n float distance = getDistance(depthTexture, v_textureCoordinates);\r\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\r\n float blendAmount = interpolateByDistance(fogByDistance, distance);\r\n vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);\r\n out_FragColor = alphaBlend(finalFogColor, sceneColor);\r\n}\r\n"},802:e=>{e.exports="in vec2 v_textureCoordinates;\r\nuniform sampler2D colorTexture;\r\nuniform float speed;\r\nuniform float mixNum;\r\n\r\nfloat hash(float x){\r\n return fract(sin(x*23.3)*13.13);\r\n}\r\n\r\nvoid main(){\r\n float time = czm_frameNumber * speed / 1000.0;\r\n vec2 resolution = czm_viewport.zw;\r\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\r\n vec3 c=vec3(.1,.2,.3);\r\n float a=-.3;\r\n float si=sin(a),co=cos(a);\r\n uv*=mat2(co,-si,si,co);\r\n uv*=length(uv+vec2(0.,4.9))*.3+1.;\r\n float v=1.-sin(hash(floor(uv.x*100.))*2.);\r\n float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*10.;\r\n c*=v*b;\r\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c,1), mixNum);\r\n}\r\n"},87:e=>{e.exports="in vec2 v_textureCoordinates;\r\nuniform sampler2D colorTexture;\r\nuniform float speed;\r\n\r\nfloat snow(vec2 uv,float scale){\r\n float time = czm_frameNumber * speed / 1000.0 ;\r\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));\r\n if(w<.1)return 0.;\r\n uv+=time/scale;\r\n uv.y+=time*2./scale;\r\n uv.x+=sin(uv.y+time*.5)/scale;\r\n uv*=scale;\r\n vec2 s=floor(uv),f=fract(uv),p;\r\n float k=3.,d;\r\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7.,3.,6.,5.))*5.))-f;\r\n d=length(p);\r\n k=min(d,k);\r\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\r\n return k*w;\r\n}\r\n\r\nvoid main(){\r\n vec2 resolution = czm_viewport.zw;\r\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\r\n vec3 finalColor=vec3(0.);\r\n float c = 0.0;\r\n c+=snow(uv,10.);\r\n c+=snow(uv,8.);\r\n c+=snow(uv,6.);\r\n c+=snow(uv,5.);\r\n finalColor=(vec3(c));\r\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.3);\r\n}\r\n"},545:e=>{e.exports=n,e.exports.parse=n,e.exports.stringify=function e(t){"Feature"===t.type&&(t=t.geometry);function i(e){return e.join(" ")}function n(e){return e.map(i).join(", ")}function r(e){return e.map(n).map(o).join(", ")}function o(e){return"("+e+")"}switch(t.type){case"Point":return"POINT ("+i(t.coordinates)+")";case"LineString":return"LINESTRING ("+n(t.coordinates)+")";case"Polygon":return"POLYGON ("+r(t.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+n(t.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+(t.coordinates.map(r).map(o).join(", ")+")");case"MultiLineString":return"MULTILINESTRING ("+r(t.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+t.geometries.map(e).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}};var t=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,i=new RegExp("^"+t.source+"(\\s"+t.source+"){1,}");function n(e){var t,n=e.split(";"),r=n.pop(),o=(n.shift()||"").split("=").pop(),s=0;function a(e){var t=r.substring(s).match(e);return t?(s+=t[0].length,t[0]):null}function l(){a(/^\s*/)}function u(){l();for(var e,t=0,n=[],r=[n],o=n;e=a(/^(\()/)||a(/^(\))/)||a(/^(,)/)||a(i);){if("("===e)r.push(o),o=[],r[r.length-1].push(o),t++;else if(")"===e){if(0===o.length)return null;if(!(o=r.pop()))return null;if(0===--t)break}else if(","===e)o=[],r[r.length-1].push(o);else{if(e.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(o,e.split(/\s/g).map(parseFloat))}l()}return 0!==t?null:n}function c(){for(var e,t,n=[];t=a(i)||a(/^(,)/);)","===t?(n.push(e),e=[]):t.split(/\s/g).some(isNaN)||(e||(e=[]),Array.prototype.push.apply(e,t.split(/\s/g).map(parseFloat))),l();return e?(n.push(e),n.length?n:null):null}function h(){return function(){if(!a(/^(point(\sz)?)/i))return null;if(l(),!a(/^(\()/))return null;var e=c();return e?(l(),a(/^(\))/)?{type:"Point",coordinates:e[0]}:null):null}()||function(){if(!a(/^(linestring(\sz)?)/i))return null;if(l(),!a(/^(\()/))return null;var e=c();return e&&a(/^(\))/)?{type:"LineString",coordinates:e}:null}()||function(){if(!a(/^(polygon(\sz)?)/i))return null;l();var e=u();return e?{type:"Polygon",coordinates:e}:null}()||function(){if(!a(/^(multipoint)/i))return null;l();var e=r.substring(r.indexOf("(")+1,r.length-1).replace(/\(/g,"").replace(/\)/g,"");r="MULTIPOINT ("+e+")";var t=u();return t?(l(),{type:"MultiPoint",coordinates:t}):null}()||function(){if(!a(/^(multilinestring)/i))return null;l();var e=u();return e?(l(),{type:"MultiLineString",coordinates:e}):null}()||function(){if(!a(/^(multipolygon)/i))return null;l();var e=u();return e?{type:"MultiPolygon",coordinates:e}:null}()||function(){var e,t=[];if(!a(/^(geometrycollection)/i))return null;if(l(),!a(/^(\()/))return null;for(;e=h();)t.push(e),l(),a(/^(,)/),l();return a(/^(\))/)?{type:"GeometryCollection",geometries:t}:null}()}return(t=h())&&o.match(/\d+/)&&(t.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+o}}),t}},929:e=>{"use strict";e.exports=Cesium},61:(e,t,i)=>{var n=i(698).default;function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=r=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(e,t,i){e[t]=i.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,i){return e[t]=i}}function f(e,t,i,n){var r=t&&t.prototype instanceof d?t:d,o=Object.create(r.prototype),a=new k(n||[]);return s(o,"_invoke",{value:O(e,i,a)}),o}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m={};function d(){}function v(){}function y(){}var g={};h(g,l,(function(){return this}));var _=Object.getPrototypeOf,C=_&&_(_(T([])));C&&C!==i&&o.call(C,l)&&(g=C);var b=y.prototype=d.prototype=Object.create(g);function w(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function i(r,s,a,l){var u=p(e[r],e,s);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==n(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,l)}))}l(u.arg)}var r;s(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,r){i(e,n,t,r)}))}return r=r?r.then(o,o):o()}})}function O(e,t,i){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return M()}for(i.method=r,i.arg=o;;){var s=i.delegate;if(s){var a=x(s,i);if(a){if(a===m)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=p(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===m)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}function x(e,t){var i=t.method,n=e.iterator[i];if(void 0===n)return t.delegate=null,"throw"===i&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==i&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+i+"' method")),m;var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,m;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,m):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function t(){for(;++i<e.length;)if(o.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:M}}function M(){return{value:void 0,done:!0}}return v.prototype=y,s(b,"constructor",{value:y,configurable:!0}),s(y,"constructor",{value:v,configurable:!0}),v.displayName=h(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,h(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(P.prototype),h(P.prototype,u,(function(){return this})),t.AsyncIterator=P,t.async=function(e,i,n,r,o){void 0===o&&(o=Promise);var s=new P(f(e,i,n,r),o);return t.isGeneratorFunction(i)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},w(b),h(b,c,"Generator"),h(b,l,(function(){return this})),h(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),i=[];for(var n in t)i.push(n);return i.reverse(),function e(){for(;i.length;){var n=i.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,n){return s.type="throw",s.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],s=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var a=o.call(r,"catchLoc"),l=o.call(r,"finallyLoc");if(a&&l){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=e,s.arg=t,r?(this.method="next",this.next=r.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),A(i),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;A(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:T(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),m}},t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(i){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,i)=>{var n=i(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";i.d(n,{default:()=>e});const e=i(237).Z})(),n=n.default})()));