@anov/gis 1.8.4 → 1.8.5
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/CHANGELOG.md +95 -82
- package/README.md +338 -337
- package/dist/index.js +1 -1
- package/package.json +88 -88
- package/scripts/release.js +322 -322
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={172:(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:()=>Ic,Billboard:()=>gi,BillboardPrimitive:()=>ft,BounceBillboardPrimitive:()=>yt,BounceLabelPrimitive:()=>Tt,Box:()=>bi,CesiumHeatMap:()=>jl,CesiumView:()=>Zn,CesiumWaterAnalysis:()=>fl,Cesium_PART:()=>vo,Circle:()=>Ei,CircleBlurMaterial:()=>Zs(),CircleBlurMaterialProperty:()=>Sa,CircleScanMaterial:()=>Qs(),CircleScanMaterialProperty:()=>Ia,CircleWaveMaterialProperty:()=>Ua,CloudPrimitive:()=>kt,ClusterLayer:()=>Io,CoordUtil:()=>no,CopyRight:()=>yr,Corridor:()=>Ri,Cylinder:()=>ji,CzmlLayer:()=>Ho,DamWaterRelease:()=>ac,DaoHangLineMaterial:()=>Bs(),DaoHangLineMaterialProperty:()=>xa,DiffuseWallPrimitive:()=>jt,DivIcon:()=>it,DomUtil:()=>ge,DrawBase:()=>tl,DrawCircle:()=>hl,DrawPoint:()=>nl,DrawPolyLine:()=>al,DrawPolygon:()=>ol,DrawRectangle:()=>ul,DynamicLayer:()=>Fo,Effect:()=>qc,ElecEllipsoidPrimitive:()=>Dt,Ellipse:()=>Di,Ellipsoid:()=>Gi,Event:()=>le,FeatureGridLayer:()=>Zo,FeatureInfoUtil:()=>io,FlowLinePrimitive:()=>Gt,FlyEventType:()=>se,FlyManager:()=>Sc,FrameSate:()=>yo,GeoJsonLayer:()=>Po,GeocoderFactory:()=>dr,GeocoderType:()=>vr,GlobeRotate:()=>Ac,GpxLayer:()=>Ko,Graphic:()=>He,GraphicEvent:()=>Bn,GraphicEventType:()=>ee,GraphicType:()=>pe,GroundPrimitiveLayer:()=>$o,GroundSkyBox:()=>Vr,HeatMapLayer:()=>xl,HtmlLayer:()=>is,ImageryLayerFactory:()=>Eo,ImageryThemeGL:()=>co,ImageryType:()=>l,KeyboardRoaming:()=>Dc,KmlLayer:()=>os,Label:()=>zi,LabelLayer:()=>ls,LabelPrimitive:()=>Ct,LayerControlUitl:()=>fo,LayerEvent:()=>In,LayerEventType:()=>ie,LayerGroupEvent:()=>jn,LayerGroupEventType:()=>te,LightCylinderPrimitive:()=>zt,LocateUtil:()=>Yr,MapInfo:()=>oo,Model:()=>st,ModelPrimitive:()=>Qt,MouseEvent:()=>An,MouseEventType:()=>X,NoDepthTestPolylineCollection:()=>el,Parse:()=>ke,PathEvent:()=>Fn,PathEventType:()=>re,Plane:()=>Zi,PlotEvent:()=>Un,PlotEventType:()=>oe,PoiSearch:()=>so,Point:()=>Ji,PointPrimitive:()=>$t,Polygon:()=>nn,Polyline:()=>an,PolylineFlickerMaterial:()=>Is(),PolylineFlickerMaterialProperty:()=>Oa,PolylineFlowMaterialProperty:()=>ga,PolylineGlowMaterial:()=>Ps(),PolylineGlowMaterialProperty:()=>fa,PolylineGradientMaterial:()=>As(),PolylineGradientMaterialProperty:()=>va,PolylineImageTrailMaterial:()=>bs(),PolylineImageTrailMaterialProperty:()=>oa,PolylineLightingMaterial:()=>Ts(),PolylineLightingMaterialProperty:()=>la,PolylineLightingTrailMaterial:()=>_s(),PolylineLightingTrailMaterialProperty:()=>$s,PolylinePrimitive:()=>ii,PolylineTrailMaterialProperty:()=>ia,PolylineVFlywireMaterial:()=>Ms(),PolylineVFlywireMaterialPoperty:()=>ba,PolylineVolume:()=>hn,Position:()=>Oe,PositonEditor:()=>ic,PrimitiveLayer:()=>hs,Rect:()=>dn,RoamingController:()=>Bc,RoamingPath:()=>Hc,ScanCirclePrimitive:()=>oi,SceneEvent:()=>Mn,SceneEventType:()=>$,ShapeUtil:()=>to,SplitImageLayer:()=>Ao,State:()=>me,TerrainClipping:()=>Ul,TerrainFactory:()=>xo,TerrainType:()=>ko,ThreeCoordTransform:()=>g,ThreeLayer:()=>Qc,ThreejsTransform:()=>wn,TiandituGeocoder:()=>ur,TiandituGeocoderService:()=>tr,TiandituGeocoderService_shanxi:()=>nr,TiandituGeocoder_shanxi:()=>mr,Tileset:()=>ut,TilesetLayer:()=>ms,TopoJsonLayer:()=>ys,TrackEvent:()=>Gn,TrackEventType:()=>ne,TrailLinePrimitive:()=>li,Transform:()=>Me,TranslateLocal:()=>po,Util:()=>ye,VectorLayer:()=>Co,VideoPrimitive:()=>hi,Viewer:()=>wr,ViewerEvent:()=>xn,ViewerEventType:()=>J,Wall:()=>Cn,WallFlowMaterialProperty:()=>qa,WallGradientMaterialProperty:()=>Na,WallImgMaterialProperty:()=>Qa,WallLineFlowMaterialProperty:()=>Ja,WaterMaterialProperty:()=>Ba,WaterPrimitive:()=>mi,Weather:()=>Cc,WidgetEventType:()=>ae,WidgetsControl:()=>mo,WindLayer:()=>Jl,WktUtil:()=>eo,area:()=>Ne,bounds:()=>Fe,center:()=>We,cesiumMeasureUtil:()=>fe,commonUtil:()=>Je,createInstance:()=>th,curve:()=>Ue,distance:()=>Ve,distanceSquared:()=>qe,heading:()=>Ze,isBetween:()=>Ye,midCartesian:()=>Qe,midPosition:()=>Ke,parabola:()=>Xe});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,v=3.141592653589793,d=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*v,o=Math.sin(r);o=1-y*o*o;var s=Math.sqrt(o);return[i=180*i/(d/s*Math.cos(r)*v),n=180*n/(d*(1-y)/(o*s)*v)]}},{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*v)+20*Math.sin(2*e*v))/3,i+=2*(20*Math.sin(e*v)+40*Math.sin(e/3*v))/3,i+=2*(150*Math.sin(e/12*v)+300*Math.sin(e/30*v))/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*v)+20*Math.sin(2*e*v))/3,i+=2*(20*Math.sin(t*v)+40*Math.sin(t/3*v))/3,i+=2*(160*Math.sin(t/12*v)+320*Math.sin(t*v/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],T=[[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=T[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 x(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 R=function(e){c(i,Cesium.WebMercatorTilingScheme);var t=x(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 M=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 R({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 H(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 G=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=H(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 W=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 U(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 z(e){return function(){var t=this,i=arguments;return new Promise((function(n,r){var o=e.apply(t,i);function s(e){U(o,n,r,s,a,"next",e)}function a(e){U(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 Q(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 K={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=Q(Q({},K),{},{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=K,ie=Q(Q({},K),{},{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=Q(Q({},K),{},{POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"}),re=Q(Q({},K),{},{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){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 ce(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ue(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var he={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 ce(ce(ce(ce(ce({},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"}},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){var o;r||(r={});var s={name:n||he.drawEntityNames().drawpolyline,position:t,attachPolygon:!0,show:null===(o=r.show)||void 0===o||o,label:r.justDraw?void 0:{text:i,font:"18px sans-serif",fillColor:Cesium.Color.GOLD,style:Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffset:new Cesium.Cartesian2(30,-30),disableDepthTestDistance:1e9},point:r.billboard&&!r.tempPoint_show?void 0:{color:r.color||new Cesium.Color(1,0,0,.8),pixelSize:r.size||8,perPositionHeight:!1,disableDepthTestDistance:1e9},billboard:r.billboard?{image:r.billboard,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:1e9}:void 0};return e.entities.add(s)},setPointLabel:function(e,t,i){e.position=t,e.label&&(e.label.text=i)},setPointPosition:function(e,t){e&&(e.position=t)},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&&he.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 fe=he;const pe={};const me={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"};var ve="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),de=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]=ve[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 ye=de;const ge=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=ye.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,ye.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}();const _e=function(){function e(){n(this,e)}return a(e,null,[{key:"getPopupDefaultDom",value:function(){var e=ye.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=ye.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 Ce(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 be=function(e){c(i,e);var t=Ce(i);function i(){var e;return n(this,i),(e=t.call(this,ae))._registerEvent(),e}return a(i)}(le);const we=function(){function e(){n(this,e),this._viewer=void 0,this._wrapper=void 0,this.useDefaultHtmlTemplate=!0,this.showTitle=!1,this._event=new be}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 Pe=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(Me.transformWGS84ToCartesian(this),Me.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 Me.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 Oe=Pe;function Te(e,t,i){return Te=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},Te.apply(null,arguments)}function Ee(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 Ae(e){return function(e){if(Array.isArray(e))return Ee(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){if("string"==typeof e)return Ee(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)?Ee(e,t):void 0}}(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 ke=function(){function e(){n(this,e)}return a(e,null,[{key:"parsePosition",value:function(e){var t=new Oe;if(!e)return t;if("string"==typeof e)t=Oe.fromString(e);else if(Array.isArray(e))t=Oe.fromArray(e);else if(Object(e)instanceof Oe||!Object(e).hasOwnProperty("lng")||!Object(e).hasOwnProperty("lat"))if(Object(e)instanceof Oe||!Object(e).hasOwnProperty("_lng")||!Object(e).hasOwnProperty("_lat"))if(e instanceof Cesium.Cartesian3)t=Oe.fromCartesian(e);else if(!(Object(e)instanceof Oe)&&Object(e).hasOwnProperty("x")&&Object(e).hasOwnProperty("y")&&Object(e).hasOwnProperty("z")){var i=Te(Cesium.Cartesian3,Ae(Object(e)));t=Oe.fromCartesian(i)}else Object(e)instanceof Oe&&(t=e);else t=Oe.fromObject(e);else t=Oe.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 Oe.fromString(e);if(Array.isArray(e))return Oe.fromArray(e);if(!(Object(e)instanceof Oe)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat"))return Oe.fromObject(e);if(!(Object(e)instanceof Oe)&&Object(e).hasOwnProperty("x")&&Object(e).hasOwnProperty("y")&&Object(e).hasOwnProperty("z")){var t=new Cesium.Cartesian3(e.x,e.y,e.z);return Oe.fromCartesian(t)}return Object(e)instanceof Oe?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 xe=new Cesium.WebMercatorProjection,Re=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 Oe(Cesium.Math.toDegrees(t.longitude),Cesium.Math.toDegrees(t.latitude),t.height)}return new Oe(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=ke.parsePositions(e);return i?i.map((function(e){return t.transformWGS84ToCartesian(e)})):[]}},{key:"transformWGS84ToMercator",value:function(e){var t=xe.project(Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new Oe(t.x,t.y,t.z)}},{key:"transformMercatorToWGS84",value:function(e){var t=xe.unproject(new Cesium.Cartesian3(e.lng,e.lat,e.alt));return new Oe(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,v=null!==(r=e.distance)&&void 0!==r?r:0,d=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-d.offsetWidth/2,O=p.y-d.offsetHeight;if(P<1&&O<1)d&&(d.style.cssText="\n visibility:hidden !important;\n display:none !important;\n ");else{var T="scale3d(1*".concat(w,",1*").concat(w,",1*").concat(w,")"),E=1;if(v&&m){var A=m.near||0,k=m.nearValue||1,x=m.far||Number.MAX_VALUE,R=m.farValue||0;if(v<A)T="scale3d(".concat(k,"*").concat(w,",").concat(k,"*").concat(w,",1)"),E=k;else if(v>x)T="scale3d(".concat(R,"*").concat(w,",").concat(R,"*").concat(w,",1)"),E=R;else{var M=k-(v-A)/(x-A)*(k-R);E=M,T="scale3d(".concat(M,"*").concat(w,",").concat(M,"*").concat(w,",1)")}}if(E<.01)d.style.display="none";else{d.style.display="block","LEFT"===y?P=p.x-d.offsetWidth:"CENTER"===y||"RIGHT"===y&&(P=p.x),"BOTTOM"===g?O=p.y:"CENTER"===g||"TOP"===g&&(O=p.y-d.offsetHeight),C&&(P+=C*E),b&&(O+=b*E),"LEFT"===y?"CENTER"===g?d.style.transformOrigin="right center":"TOP"===g?d.style.transformOrigin="right bottom":"BOTTOM"===g&&(d.style.transformOrigin="right top"):"CENTER"===y?"CENTER"===g?d.style.transformOrigin="center center":"TOP"===g?d.style.transformOrigin="center bottom":"BOTTOM"===g&&(d.style.transformOrigin="center top"):"RIGHT"===y&&("CENTER"===g?d.style.transformOrigin="left center":"TOP"===g?d.style.transformOrigin="left bottom":"BOTTOM"===g&&(d.style.transformOrigin="left top")),d.style.top=O*w+"px",d.style.left=P*w+"px",d.style.visibility="visible",d.style.transform="".concat(T);v&&_&&isBetween(v,_.near||0,_.far||Number.MAX_VALUE)}}}}}]),e}();const Me=Re;function Se(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 je=function(e){c(i,e);var t=Se(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=_e.getPopupDefaultDom();this._wrapper=ge.parseDom(u,!1),this._addDefaultTitleContent(),this._initClose()}else this._wrapper=ge.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&&ge.create("div","anov-template-titile",e),ge.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");ge.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>");ge.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){Me.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}(we);const Le=je;function Ie(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 De=function(e){c(i,e);var t=Ie(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=_e.getTooltipDefaultDom();this._wrapper=ge.parseDom(a,!1),this._addDefaultTitleContent()}else this._wrapper=ge.create("div","viewer-widgets anov-infoWin-init");else console.error("viewer是必须的参数!")}},{key:"_addDefaultTitleContent",value:function(){var e=this._wrapper.querySelector(".anov-tooltip");this.showTitle&&ge.create("div","anov-template-titile",e),ge.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");ge.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>");ge.appendChild(n,t)}))}return this}},{key:"_updatePosition",value:function(e,t,i){Me.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}(we);const Be=De;const He=function(){function e(){var t,i,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._id=ye.uuid(),this.businessID=ye.uuid(),ke.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 Bn,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,ke.parseOption(this._highlight),ke.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:"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=me.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=me.REMOVED}}},{key:"setBillboard",value:function(e){return e&&e.billboard&&(ke.parseOption(e.billboard),this._nativeObjCesium.billboard?ye.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,ke.parseOption(e.label),this._nativeObjCesium.label?ye.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&&(ke.parseOption(e.polyline),e.polyline.positions&&(e.polyline.positions=ke.parsePositions(e.polyline.positions),e.polyline.positions=Me.transformWGS84ArrayToCartesianArray(e.polyline.positions)),this._nativeObjCesium.polyline?ye.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 Le(e),this._popup.addEventListener(ae.CLOSE,(function(){t.unSelected(t._e)})),this._popup.install(this)}},{key:"bindTooltip",value:function(e){var t=this;new Be(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&&(pe[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}},{key:"getGraphicType",value:function(e){return pe[e.toLocaleUpperCase()]||void 0}}]),e}();function Ge(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 Ne(e){var t=0;if(!Array.isArray(e))return t;e[0]instanceof Cesium.Cartesian3||(e=Me.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+=Ge(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 Fe(){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 We(e){if(e&&Array.isArray(e)){var t=Cesium.BoundingSphere.fromPoints(Me.transformWGS84ArrayToCartesianArray(e));return Me.transformCartesianToWGS84(t.center)}return new Oe}function Ue(e,t){t=t||{};for(var i=[],n=0;n<e.length-1;n++){var r=ze(e[n],e[n+1],t.count);r&&r.length>0&&(i=i.concat(r))}return i}function ze(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),v=parseFloat(t.lat),d=parseFloat(e.lng),y=parseFloat(t.lng);y>d&&y-d>180&&d<0&&(d=360+d,y=360+y),u=0,v===m?(r=0,o=d-y):y===d?(r=Math.PI/2,o=m-v):(r=Math.atan((v-m)/(y-d)),o=(v-m)/Math.sin(r)),0===u&&(u=r+Math.PI/5),l=(s=o/2)*Math.cos(u)+d,a=s*Math.sin(u)+m;for(var g=0;g<i+1;g++){var _=d*c(p)+l*h(p)+y*f(p),C=m*c(p)+a*h(p)+v*f(p),b=e.lng,w=t.lng;n.push([b<0&&w>0?_-360:_,C]),p+=1/i}return n}function Ve(e){var t=0;if(e&&Array.isArray(e))for(var i=0;i<e.length-1;i++){var n=Me.transformWGS84ToCartographic(e[i]),r=Me.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 qe(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 Ze(e,t){var i=e,n=t;if(!i||!n)return 0;e instanceof Cesium.Cartesian3||(i=ke.parsePosition(e),i=Me.transformWGS84ToCartesian(i)),t instanceof Cesium.Cartesian3||(n=ke.parsePosition(t),n=Me.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 Ye(e,t,i){return(e=parseFloat(e)||0)>=parseFloat(t)&&e<=parseFloat(i)}function Qe(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 Ke(e,t){var i=ke.parsePosition(e),n=ke.parsePosition(t);i=Me.transformWGS84ToCartographic(i),n=Me.transformWGS84ToCartographic(n);var r=new Cesium.EllipsoidGeodesic(i,n).interpolateUsingFraction(.5);return new Oe(Cesium.Math.toDegrees(r.longitude),Cesium.Math.toDegrees(r.latitude),r.height)}function Xe(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 v=0;v<n;v++){var d=i-4*Math.pow(-.5*a+Math.abs(l)*v,2)*i/Math.pow(a,2),y=e.lng+m*v,g=e.lat+l*v;r.push([y,g,d])}}return r.push([t.lng,t.lat,t.alt||0]),r}const Je={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 $e(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 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 tt=function(e){c(i,e);var t=et(i);function i(e,r){var o;return n(this,i),o=t.call(this),r?(o._nativeObjCesium=ge.create("div","anov-div-icon anov-infoWin-init"),o._position=ke.parsePosition(e),o.content=r,o._state=me.INITIALIZED,o):(console.error("没有传入内容,无法显示!"),f(o))}return a(i,[{key:"type",get:function(){return He.getGraphicType("div_icon")}},{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=ke.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,v=this._style.distanceDisplayCondition;t&&v&&(m=Ye(t,v.near||0,v.far||Number.MAX_VALUE)),this._nativeObjCesium.style.display=m&&i?"block":"none"}}}},{key:"_onAdd",value:function(e){var t=this;this._layer=e,ge.addClass(this.nativeObjCesium,e.layerName),this._layer.nativeObjCesium.appendChild(this._nativeObjCesium);var i={layer:e,graphic:this,position:Me.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=me.ADDED}},{key:"_onRemove",value:function(){this._layer&&(this._layer.nativeObjCesium.removeChild(this._nativeObjCesium),this._state=me.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?(ye.merge(this._style,e),!0===e.pointerEvents?this._nativeObjCesium.style.pointerEvents="all":this._nativeObjCesium.style.pointerEvents="none",this._style.className&&ge.addClass(this._nativeObjCesium,this._style.className),this):this}}],[{key:"fromEntity",value:function(e,t){var n,r=Cesium.JulianDate.now();return n=new i(Me.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?$e(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):$e(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(r))),n}}]),i}(He);He.registerType("div_icon");const it=tt;function nt(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 rt(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 ot=function(e){c(i,e);var t=rt(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.Entity({model:{}}),r._position=ke.parsePosition(e.position),r._modelUrl=e.url,r._rotateAmountHeading=0,r._rotateAmountPitch=0,r._rotateAmountRoll=0,r._state=me.INITIALIZED,ye.merge(r._style,e),r.setOptions(e),r}return a(i,[{key:"type",get:function(){return He.getGraphicType("model")}},{key:"position",get:function(){return this._position},set:function(e){this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.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(Me.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(Me.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(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.model,e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){ke.parseOption(this._highlight),ye.merge(this._nativeObjCesium.model,this._highlight),this.setLabel(this._style)}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){ke.parseOption(this._selectedHighlight),ye.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(Me.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?nt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):nt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)),r}}]),i}(He);He.registerType("model");const st=ot;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 lt=function(e){c(i,e);var t=at(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=me.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 He.getGraphicType("tileset")}},{key:"ready",value:function(e){return this._nativeObjCesium.then(e),this}},{key:"show",set:function(e){this._show=e,this._nativeObjCesium.then((function(t){t.show=e}))}},{key:"_bindVisibleEvent",value:function(){var e=this;this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._nativeObjCesium.then((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=ke.parsePosition(e),this._nativeObjCesium.then((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._nativeObjCesium.then((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._nativeObjCesium.then((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._nativeObjCesium.then((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._nativeObjCesium.then((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._nativeObjCesium.then((function(t){t.splitDirection=e})),this}},{key:"setCustomShader",value:function(e){return this._nativeObjCesium.then((function(t){t.customShader=e})),this}},{key:"setStyle",value:function(e){return e&&e instanceof Cesium.Cesium3DTileStyle&&(this._style=e,this._nativeObjCesium.then((function(t){t.style=e}))),this}},{key:"clip",value:function(e){var t=this;this._nativeObjCesium.then((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._nativeObjCesium.then((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),ye.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),ye.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}(He);He.registerType("tileset");const ut=lt;function ct(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=function(e){c(i,e);var t=ct(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=ke.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=me.INITIALIZED,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("billboard_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,e),this):this}}]),i}(He);He.registerType("billboard_primitive");const ft=ht;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=10,vt=.1,dt=function(e){c(i,e);var t=pt(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=me.INITIALIZED,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("bounce_billboard_primitive")}},{key:"update",value:function(){if(this._show){var e=this._style.maxOffsetY||mt,t=this._style.offsetAmount||vt;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}(ft);He.registerType("bounce_billboard_primitive");const yt=dt;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=ke.parsePosition(e),o._text=r,o._nativeObjCesium={position:void 0,text:void 0},o._state=me.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("label_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,e),this):this}}]),i}(He);He.registerType("label_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=me.INITIALIZED,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("bounce_label_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);He.registerType("bounce_label_primitive");const Tt=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){var r;return n(this,i),(r=t.call(this))._position=ke.parsePosition(e),r._nativeObjCesium={position:void 0,scale:{x:12,y:8}},r._state=me.INITIALIZED,r.position=r._positions,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("cloud_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,e),this):this}}]),i}(He);He.registerType("cloud_primitive");const kt=At;function xt(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 Rt(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={minRadius:10,minHeight:30,color:Cesium.Color.RED,slices:128,speed:10},St=function(e){c(i,e);var t=Rt(i);function i(e,r,o){var s;return n(this,i),(s=t.call(this))._center=ke.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?xt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Mt),s._state=me.INITIALIZED,s}return a(i,[{key:"type",get:function(){return He.getGraphicType("diffuse_wall_primitive")}},{key:"center",get:function(){return this._center},set:function(e){return this._center=ke.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(Me.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?(ye.merge(this._style,e),this):this}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(He);He.registerType("diffuse_wall_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,r){var o;return n(this,i),(o=t.call(this))._position=ke.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=me.INITIALIZED,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("elec_ellipsoid_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=ke.parsePosition(e),this._nativeObjCesium.geometryInstances.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(Me.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?(ye.merge(this._style,e),this._setAppearance(),this):this}}]),i}(He);He.registerType("elec_ellipsoid_primitive");const Dt=It;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 Ht=function(e){c(i,e);var t=Bt(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=ke.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=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("flow_line_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=ke.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolylineGeometry({positions:Me.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||(ye.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(He);He.registerType("flow_line_primitive");const Gt=Ht;function Nt(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 Wt={color:Cesium.Color.ORANGE},Ut=function(e){c(i,e);var t=Ft(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._center=ke.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?Nt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Nt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Wt),a._state=me.INITIALIZED,a}return a(i,[{key:"type",get:function(){return He.getGraphicType("light-cylinder-primitive")}},{key:"center",get:function(){return this._center},set:function(e){this._center=ke.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:Me.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 v=Cesium.PolygonGeometry.createGeometry(new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(n),perPositionHeight:!0}));return v.indices=l,v.attributes.st.values=s,new Cesium.GeometryInstance({geometry:v})}},{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?(ye.merge(this._style,e),this):this}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(He);He.registerType("light-cylinder-primitive");const zt=Ut;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)}}function qt(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 Zt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):qt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}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]:{};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=ke.parsePosition(r.position),e._modelUrl=r.url,e._state=me.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 Oe&&(t=Me.transformWGS84ToCartesian(e.position)),t?Zt(Zt({},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=me.ADDED}))}return e}return a(i,[{key:"type",get:function(){return He.getGraphicType("model_primitive")}},{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=ke.parsePosition(e),this._nativeModel){var t=Me.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?(ye.merge(this._style,e),this._nativeModel&&ye.merge(this._nativeModel,e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){ke.parseOption(this._highlight),this._nativeModel&&ye.merge(this._nativeModel,this._highlight),this.setLabel(this._style)}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){ke.parseOption(this._selectedHighlight),this._nativeModel&&ye.merge(this._nativeModel,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}]),i}(He);He.registerType("model_primitive");const Qt=Yt;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 Xt={pixelSize:8,outlineColor:Cesium.Color.BLUE,outlineWidth:2},Jt=function(e){c(i,e);var t=Kt(i);function i(e){var r;return n(this,i),(r=t.call(this))._position=ke.parsePosition(e),r._nativeObjCesium={position:void 0},r._state=me.INITIALIZED,r.position=r._position,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("point_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position)}},{key:"_mountedHook",value:function(){this.position=this._position,ye.merge(this._nativeObjCesium,Xt,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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,Xt,this._style),this):this}}]),i}(He);He.registerType("point_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)}}var ti=function(e){c(i,e);var t=ei(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=ke.parsePositions(e),r._nativeObjCesium={positions:[]},r.positions=r._positions,r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("polyline_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=ke.parsePositions(e),this._nativeObjCesium.positions=Me.transformWGS84ArrayToCartesianArray(this._positions)}},{key:"center",get:function(){return We(this._positions)}},{key:"distance",get:function(){return Ve(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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,e),this):this}}]),i}(He);He.registerType("polyline_primitive");const ii=ti;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 ri=function(e){c(i,e);var t=ni(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=ke.parsePosition(e),o._radius=r,o._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o._state=me.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("scan_circle_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=ke.parsePosition(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.EllipseGeometry({center:Me.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||(ye.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(He);He.registerType("scan_circle_primitive");const oi=ri;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 ai=function(e){c(i,e);var t=si(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=ke.parsePositions(e),r._width=o,r._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),r._state=me.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("trail_line_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=ke.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolylineGeometry({positions:Me.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||(ye.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(He);He.registerType("trail_line_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,r){var o;return n(this,i),(o=t.call(this))._positions=ke.parsePositions(e),o._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o._video=r,o._state=me.INITIALIZED,o.positions=o._positions,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("video_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=ke.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=Cesium.PolygonGeometry.fromPositions({positions:Me.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||(ye.merge(this._style,e),this._style.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType)),this}}]),i}(He);He.registerType("video_primitive");const hi=ci;function fi(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=fi(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=ke.parsePositions(e),r._holes=o.map((function(e){return ke.parsePositions(e)})),r._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),r._state=me.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("water_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=ke.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Me.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map((function(e){return new Cesium.PolygonHierarchy(Me.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||(ye.merge(this._style,e),this._style.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(He);He.registerType("water_primitive");const mi=pi;function vi(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 di(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=di(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=ke.parsePosition(e),r.position=r._position,ye.merge(r._style,o),r.setOptions(o),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("billboard")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.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?(ye.merge(this._style,e),ye.merge(this._nativeObjCesium.billboard,e),this.setLabel(this._style),this.originOption=Cesium.clone(this._style,!1),this):this}},{key:"highlight",value:function(){ke.parseOption(this._highlight),ye.merge(this._nativeObjCesium.billboard,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){ke.parseOption(this._selectedHighlight),ye.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=Me.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?vi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):vi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n))),t}}]),i}(He);He.registerType("billboard");const gi=yi;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,o,s){var a;return n(this,i),(a=t.call(this))._position=ke.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=me.INITIALIZED,a}return a(i,[{key:"type",get:function(){return He.getGraphicType("box")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.box,e)),this}}]),i}(He);He.registerType("box");const bi=Ci;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 Pi(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}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 Ti=function(e){c(i,e);var t=Oi(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._nativeObjCesium=new Cesium.Entity({polygon:{}}),o._center=ke.parsePosition(e),o._radius=+r||0,o._rotateAmount=0,o._stRotation=0,o._state=me.INITIALIZED,o.center=o._center,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("circle")}},{key:"center",get:function(){return this._center},set:function(e){return this._center=ke.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:Me.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=Me.transformWGS84ToCartesian(this._center),this._nativeObjCesium.label=Pi(Pi({},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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.polygon,e),this):this}}]),i}(He);He.registerType("circle");const Ei=Ti;function Ai(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 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 xi=function(e){c(i,e);var t=ki(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=ke.parsePositions(e),r._nativeObjCesium=new Cesium.Entity({corridor:{}}),r._state=me.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("corridor")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=ke.parsePositions(e),this._nativeObjCesium.corridor.positions=Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.corridor,e)),this}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polyline&&((t=new i(Me.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?Ai(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ai(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(He);He.registerType("corridor");const Ri=xi;function Mi(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=Mi(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._position=ke.parsePosition(e),a._length=+r||0,a._topRadius=+o||0,a._bottomRadius=+s||0,a._nativeObjCesium=new Cesium.Entity({cylinder:{}}),a._state=me.INITIALIZED,a.position=a._position,a}return a(i,[{key:"type",get:function(){return He.getGraphicType("cylinder")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.cylinder,e)),this}}]),i}(He);He.registerType("cylinder");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){var s;return n(this,i),(s=t.call(this))._position=ke.parsePosition(e),s._semiMajorAxis=+r||0,s._semiMinorAxis=+o||0,s._nativeObjCesium=new Cesium.Entity({ellipse:{}}),s._state=me.INITIALIZED,s.position=s._position,s}return a(i,[{key:"type",get:function(){return He.getGraphicType("ellipse")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.ellipse,e)),this}}]),i}(He);He.registerType("ellipse");const Di=Ii;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 Hi=function(e){c(i,e);var t=Bi(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=ke.parsePosition(e),o._radius=r||{x:10,y:10,z:10},o._nativeObjCesium=new Cesium.Entity({ellipsoid:{}}),o._state=me.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("ellipsoid")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.ellipsoid,e)),this}}]),i}(He);He.registerType("ellipsoid");const Gi=Hi;function Ni(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 Fi(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={text:"test",color:"#ffff00"},Ui=function(e){c(i,e);var t=Fi(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=ke.parsePosition(e),r._state=me.INITIALIZED,r.position=r._position,r._style=ye.merge(r._style,Wi,o),r.setOptions(r._style),r}return a(i,[{key:"type",get:function(){return He.getGraphicType("label")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.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(){ke.parseOption(this._highlight),ye.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,ke.parseOption(e),e.fillColor=e.color,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.label,e),this):this}}],[{key:"fromEntity",value:function(e){var t=Cesium.JulianDate.now(),n=Me.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?Ni(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ni(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(t))),r}}]),i}(He);He.registerType("label");const zi=Ui;function Vi(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=Vi(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=ke.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=me.INITIALIZED,s}return a(i,[{key:"type",get:function(){return He.getGraphicType("plane")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.plane,e)),this}}]),i}(He);He.registerType("plane");const Zi=qi;function Yi(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 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 Ki={pixelSize:8,outlineColor:Cesium.Color.BLUE,outlineWidth:2},Xi=function(e){c(i,e);var t=Qi(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=ke.parsePosition(e),r.position=r._position,ye.merge(r._style,Ki,o),r.setOptions(o),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("point")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=ke.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this}},{key:"label",get:function(){return this._nativeObjCesium.label}},{key:"_mountedHook",value:function(){this.position=this._position,ye.merge(this._nativeObjCesium.point,Ki,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,ke.parseOption(e),ye.merge(this._style,e),ye.merge(this._nativeObjCesium.point,this._style),this.setLabel(e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){ke.parseOption(this._highlight),ye.merge(this._nativeObjCesium.point,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){ke.parseOption(this._selectedHighlight),ye.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(Me.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?Yi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Yi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)),t}}]),i}(He);He.registerType("point");const Ji=Xi;function $i(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 en(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 tn=function(e){c(i,e);var t=en(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=ke.parsePositions(e),r._holes=[],r._state=me.INITIALIZED,r.positions=r._positions,r.position=Me.transformWGS84ToCartesian(r.center),r._nativeObjCesium.position=r.position,ke.parseOption(o),ye.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 He.getGraphicType("polygon")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=ke.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 ke.parsePositions(e)})),this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy()),this}},{key:"center",get:function(){var e=We([].concat(Ae(this._positions),[this._positions[0]])),t=Me.setHeightWGS84(e,.5);return Me.transformCartesianToWGS84(t)}},{key:"area",get:function(){return Ne(this._positions)}},{key:"_computeHierarchy",value:function(){var e=new Cesium.PolygonHierarchy;return e.positions=Me.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map((function(e){return new Cesium.PolygonHierarchy(Me.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,ke.parseOption(e),ye.merge(this._style,e),ye.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(){ke.parseOption(this._highlight),ye.merge(this._nativeObjCesium.polygon,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){ke.parseOption(this._selectedHighlight),ye.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(Me.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?$i(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):$i(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(He);He.registerType("polygon");const nn=tn;function rn(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 sn=function(e){c(i,e);var t=on(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=ke.parsePositions(e),r._positions.length<2?(console.error("polyline必须至少两个点!"),f(r)):(r._nativeObjCesium=new Cesium.Entity({polyline:{}}),r.positions=r._positions,r._state=me.INITIALIZED,ke.parseOption(o),ye.merge(r._style,o),r.position=Me.transformWGS84ToCartesian(We([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 He.getGraphicType("polyline")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=ke.parsePositions(e),this._nativeObjCesium.polyline.positions=Me.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"center",get:function(){return We(this._positions)}},{key:"distance",get:function(){return Ve(this._positions)}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"highlight",value:function(){ke.parseOption(this._highlight),ye.merge(this._nativeObjCesium.polyline,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){ke.parseOption(this._selectedHighlight),ye.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,ke.parseOption(e),ye.merge(this._style,e),ye.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(Me.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?rn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):rn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(He);He.registerType("polyline");const an=sn;function ln(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 un(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 cn=function(e){c(i,e);var t=un(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._positions=ke.parsePositions(e),o._shape=r||[],o._nativeObjCesium=new Cesium.Entity({polylineVolume:{}}),o._state=me.INITIALIZED,o.positions=o._positions,o}return a(i,[{key:"type",get:function(){return He.getGraphicType("polyline_volume")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=ke.parsePositions(e),this._nativeObjCesium.polylineVolume.positions=Me.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,ye.merge(this._style,e),ye.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(Me.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?ln(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ln(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(r)));return n}}]),i}(He);He.registerType("polyline_volume");const hn=cn;function fn(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 pn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):fn(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 vn=function(e){c(i,e);var t=mn(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=ke.parsePositions(e),r._nativeObjCesium=new Cesium.Entity({rectangle:{}}),r._state=me.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("rectangle")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=ke.parsePositions(e),this._nativeObjCesium.rectangle.coordinates=Cesium.Rectangle.fromCartesianArray(Me.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=pn(pn({},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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.rectangle,e)),this}}]),i}(He);He.registerType("rectangle");const dn=vn;function yn(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 gn(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 _n=function(e){c(i,e);var t=gn(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=ke.parsePositions(e),r.positions=r._positions,console.log(r._style),console.log(ye.merge),ye.merge(r._style,o),r.setOptions(o),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return He.getGraphicType("wall")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=ke.parsePositions(e),this._nativeObjCesium.wall.positions=Me.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||(ye.merge(this._style,e),ye.merge(this._nativeObjCesium.wall,e),this.setLabel(this._style),this.originOption=Cesium.clone(this._style)),this}},{key:"highlight",value:function(){ke.parseOption(this._highlight),ye.merge(this._nativeObjCesium.wall,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){ke.parseOption(this._selectedHighlight),ye.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(Me.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?yn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):yn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(He);He.registerType("wall");const Cn=_n;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=Me.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 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){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}function Tn(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(f,e);var t,i,r,o,s,l,u,h=Tn(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=z(q().mark((function e(t,i){var n,r,o,s,a,l,u,c,h,f,p,m,v,d,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=Me.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 Ji||m instanceof gi||m instanceof zi)&&(f=u.id.position._value),f||(f=fe.pickPosition(this._viewer,t)),v=void 0,d=void 0,y=void 0,f&&(g=Cesium.Ellipsoid.WGS84.cartesianToCartographic(f))&&(d={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?v=a.camera.pickEllipsoid(t,Cesium.Ellipsoid.WGS84):(_=a.camera.getPickRay(t),v=a.globe.pick(_,a)),v&&(C=Cesium.Ellipsoid.WGS84.cartesianToCartographic(v))&&(y={lng:Cesium.Math.toDegrees(C.longitude),lat:Cesium.Math.toDegrees(C.latitude),alt:C.height}),b={target:u,windowPosition:t,position:f,wgs84Position:d,surfacePosition:v,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(On(On({},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(On(On({},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(On(On({},n),t)))}))}},{key:"_clickHandler",value:(l=z(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=z(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=z(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=z(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=z(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=z(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 An=En;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 xn=function(e){c(i,e);var t=kn(i);function i(){var e;return n(this,i),(e=t.call(this,J))._registerEvent(),e}return a(i)}(le);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)}}const Mn=function(e){c(i,e);var t=Rn(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 Sn(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=Sn(i);function i(){var e;return n(this,i),(e=t.call(this,te))._registerEvent(),e}return a(i)}(le);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)}}const In=function(e){c(i,e);var t=Ln(i);function i(){var e;return n(this,i),(e=t.call(this,ie))._registerEvent(),e}return a(i)}(le);function Dn(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 Bn=function(e){c(i,e);var t=Dn(i);function i(){var e;return n(this,i),(e=t.call(this,ee))._registerEvent(),e}return a(i)}(le);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)}}const Gn=function(e){c(i,e);var t=Hn(i);function i(){var e;return n(this,i),(e=t.call(this,ne))._registerEvent(),e}return a(i)}(le);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)}}const Fn=function(e){c(i,e);var t=Nn(i);function i(){var e;return n(this,i),(e=t.call(this,re))._registerEvent(),e}return a(i)}(le);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,oe))._registerEvent(),e}return a(i)}(le);function zn(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){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):zn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var qn={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 Zn=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,Vn(Vn({},qn),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 Yn={};const Qn=function(){function e(t){n(this,e),t=t||{},this._id=ye.uuid(),this.layerName=t.layerName||ye.uuid(),this.businessID=t.id||ye.uuid(),this._nativeObjCesium=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},ke.parseOption(t),this._layerEvent=new In,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=me.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=me.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===me.CLEARED&&(this._state=me.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 Le(e),this._popup.install(this),this.eachGraphic((function(e){e.raiseEvent(ee.BIND_POPUP,t)}))}},{key:"bindTooltip",value:function(e){var t=this;new Be(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&&(Yn[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}},{key:"getLayerType",value:function(e){return Yn[e.toLocaleUpperCase()]||void 0}}]),e}();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 Xn(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}const Jn=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)&&ye.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 ye.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}),ye.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 ye.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=Xn(Xn({},this._options),e),this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController()),this}}]),e}();var $n=i(384);function er(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 tr=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?er(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):er(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 ir(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 nr=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?ir(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ir(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 rr=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 sr(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 ar(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?sr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):sr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function lr(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 ur=function(e){c(i,e);var t=lr(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 tr(i,n,this._params),o=new or(e);this._tinadituService=r,this._staticService=o;var s=this._getContainer(e.container),a=new Cesium.Geocoder(ar(ar({},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=ar({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];Yr.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;Yr.flyToPositions(i.viewer,a,0,-90,1/i._scaleRatio*.8,e._flightDuration,(function(){e._complete.raiseEvent()}))}}))}else Yr.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}(rr);function cr(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 hr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):cr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}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 pr=function(e){c(i,e);var t=fr(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 nr(i,n,this._params),o=this._getContainer(e.container),s=new Cesium.Geocoder(hr(hr({},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(),Yr.flyToPosition(this.viewer,t,0,-90,1/this._scaleRatio*1500,e._flightDuration,(function(){e._complete.raiseEvent()}))}}]),i}(rr);const mr=pr;const vr=Object.freeze({TIANDITU:0,TIANDITU_SHANXI:1,STATIC_PRESET:2});const dr=function(){function e(){n(this,e)}return a(e,null,[{key:"createGeocoder",value:function(e,t){var i=void 0;switch(e){case vr.TIANDITU:i=new ur(t);break;case vr.TIANDITU_SHANXI:i=new mr(t);break;case vr.STATIC_PRESET:i=new or(t)}return i}}]),e}();var yr=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 gr(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 _r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):gr(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Z(yr,"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 Cr={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},br=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=_r(_r(_r({},Cr),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._scaleRatio=this._options.scaleRatio,new An(this),this._viewerEvent=new xn,this._sceneEvent=new Mn(this),this._viewerOption=new Jn(this),this._layerContainer=ge.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;fo.init(this,u)}this._options.showMapInfo&&new oo(this),"chinese"==this._options.language&&new po(this).toChinese(),this._options.copyRight&&yr.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:"_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 v=Math.abs(Cesium.Math.toRadians(h)),d=v>.001?p/Math.abs(Math.sin(v)):p;Yr.flyToPosition(this,this._options.center,this._options.center.heading||0,h,d,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=Me.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=Me.transformWindowToWGS84(new Cesium.Cartesian2(e/2|0,t-1),this),n=Me.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=Me.transformWindowToWGS84(new Cesium.Cartesian2(0,t),this),n=Me.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(){$n.Z.initEnvironment(),this.extendCesium(),window.anovgis_applyfn&&$n.Z.install(anovgis_applyfn),window.ANOVCITY&&$n.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),dr.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,Ae(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=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2.2,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?arguments[5]:void 0;if(e)if(e instanceof Qn&&e.flyTo)e.flyTo(i,n,r,o);else{var s=this._nativeObjCesium.flyTo(e.nativeObjCesium||e,{duration:t,offset:new Cesium.HeadingPitchRange(Cesium.Math.toRadians(i),Cesium.Math.toRadians(n),r)});s&&s.then((function(){o&&o()}))}}},{key:"flyToTileset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-60;if(this._nativeObjCesium){var r=e.nativeObjCesium||e;if(r){var o=this._nativeObjCesium,s=function(e){var r=e.boundingSphere.radius;o.flyTo(e,{duration:t,offset:new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(n),r*i)})};return r.then?r.then(s):r.readyEvent?r.readyEvent.addEventListener(s):void s(r)}}}},{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=ke.parsePosition(e)).alt||0,r=new Oe(e.lng,e.lat,0),o=Me.transformWGS84ToCartesian(r),s=e.heading||0,a=e.pitch||-90;return Yr.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=ke.parsePosition(e);var s=Me.transformWGS84ToCartesian(e);return Yr.flyToPoint(this,s,t,i,n,r,o),this}}},{key:"zoomTo",value:function(e){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(),ge.empty(this.container),this._nativeObjCesium=void 0,this._baseLayerPicker=void 0,this._layerCache={},$n.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=ye.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=Me.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=ke.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=Me.transformCartesianToWGS84(n);return r?new Oe(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 Oe(Cesium.Math.toDegrees(a.longitude),Cesium.Math.toDegrees(a.latitude),a.height)}var l=this.camera.positionCartographic;return new Oe(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=ke.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=Me.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=ke.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 wr=br;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)}}var Or=Cesium,Tr=Or.BoxGeometry,Er=Or.Cartesian3,Ar=Or.defined,kr=Or.DeveloperError,xr=Or.GeometryPipeline,Rr=Or.Matrix3,Mr=Or.Matrix4,Sr=Or.Transforms,jr=Or.VertexFormat,Lr=Or.BufferUsage,Ir=Or.CubeMap,Dr=Or.loadCubeMap,Br=Or.RenderState,Hr=Or.VertexArray,Gr=Or.BlendingState,Nr=Or.SceneMode,Fr=Or.ShaderProgram,Wr=Or.ShaderSource,Ur=Or.SkyBox,zr=function(e){c(i,e);var t=Pr(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===Nr.SCENE3D||e.mode===Nr.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var o=this.sources;if(!(Ar(o.positiveX)&&Ar(o.negativeX)&&Ar(o.positiveY)&&Ar(o.negativeY)&&Ar(o.positiveZ)&&Ar(o.negativeZ)))throw new kr("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 kr("this.sources properties must all be the same type.");"string"==typeof o.positiveX?Dr(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 Ir({context:n,source:o}))}var s=this._command;if(s.modelMatrix=Sr.eastNorthUpToFixedFrame(e.camera.positionWC),0!==this.offsetAngle&&Mr.multiply(s.modelMatrix,Mr.fromRotationTranslation(Rr.fromRotationZ(this.offsetAngle/180*Math.PI)),s.modelMatrix),!Ar(s.vertexArray)){s.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return Mr.getMatrix3(s.modelMatrix,new Rr)}};var a=Tr.createGeometry(Tr.fromDimensions({dimensions:new Er(2,2,2),vertexFormat:jr.POSITION_ONLY})),l=this._attributeLocations=xr.createAttributeLocations(a);s.vertexArray=Hr.fromGeometry({context:n,geometry:a,attributeLocations:l,bufferUsage:Lr._DRAW}),s.renderState=Br.fromCache({blending:Gr.ALPHA_BLEND})}if(!Ar(s.shaderProgram)||this._useHdr!==t){var u=new Wr({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=Fr.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(Ar(this._cubeMap))return s}}}]),i}(Ur);const Vr=zr;function qr(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 Zr=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?qr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):qr(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=ke.parsePosition(i);var c=Me.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=ke.parsePositions(t),l=Me.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 Qn&&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 Yr=Zr;var Qr=i(545);function Kr(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 Xr(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 Jr(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 $r(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 $r(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 $r(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 eo=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=Jr(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=Jr(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=Jr(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=Jr(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=Kr((0,Qr.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)})),Xr(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 to=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 io=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 no=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=Me.transformCartesianArrayToWGS84Array(e),a=Me.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 ro=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=ge.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=ge.create("span","level-bar",i),this._level.style.marginRight="15px";new Cesium.ScreenSpaceEventHandler(t.scene.canvas);var v=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+"°"};v(),t.camera.changed.addEventListener((function(){v()})),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 oo=ro;const so=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="",Yr.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 lo(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 uo=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=lo(lo({},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})),v=new c({context:e,colorTextures:[m],destroyAttachments:!1}),d=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:v,renderState:d,uniformMap:n.uniformMap}).execute(e);return e.createViewportQuadCommand(n.mainFS,{framebuffer:v,renderState:d,uniformMap:n.uniformMap}).execute(e),v.destroy(),t.destroy(),m}}]),e}();const co=uo;var ho=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=Eo.createTdtImageryLayer({style:"img",key:i}),a=Eo.createTdtImageryLayer({key:i}),l=Eo.createTdtImageryLayer({key:i});l.nameC="tiandituDianzi_Dark";var u=Eo.createArcGisImageryLayer({style:"dark"}),c=new Cesium.MapboxStyleImageryProvider({styleId:"dark-v11",accessToken:"pk.eyJ1Ijoib2xkZG9nc2QiLCJhIjoiY2x4eDgxNGd3MWhwMjJrc2Q2djRjamU1NyJ9.QPCS0n3ss-WuQ7qcXe_Y-w"}),h=Eo.createAmapImageryLayer({style:"cva",crs:"WGS84"});h.nameC="gaode";var f=Eo.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]}}),v=new Cesium.ProviderViewModel({name:"天地图-电子地图",iconUrl:Cesium.buildModuleUrl("static/images/tdt_vec.png"),tooltip:"天地图-电子地图",creationFunction:function(){return[a,f]}}),d=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(v),o.push(d),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 co);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(ho,"preID",1),Z(ho,"goadeDarkShader",""),Z(ho,"imageryThemeGL",null);const fo=ho;const po=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 oo(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未开启,无法显示该控件!"),fo.init(e,t,i,n)}},{key:"toChinese",value:function(e){var t=new po(e);t&&t.toChinese()}}]),e}();var vo={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 yo=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 go(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 _o=function(e){c(i,e);var t=go(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Qn.getLayerType("vector")}},{key:"clear",value:function(){return this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=me.CLEARED,this}}]),i}(Qn);Qn.registerType("vector");const Co=_o;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 wo=function(e){c(o,e);var t,i,r=bo(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=me.INITIALIZED,t}return a(o,[{key:"type",get:function(){return Qn.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 gi.fromEntity(e)}},{key:"_createPoint",value:function(e){if(e.position&&e.point)return Ji.fromEntity(e)}},{key:"_createLabel",value:function(e){if(e.position&&e.label)return zi.fromEntity(e)}},{key:"_createPolyline",value:function(e){if(e.polyline)return an.fromEntity(e)}},{key:"_createPolygon",value:function(e){if(e.polygon)return nn.fromEntity(e)}},{key:"_createModel",value:function(e,t){if(e)return st.fromEntity(e,t)}},{key:"eachGraphic",value:(i=z(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=z(q().mark((function e(){var t,i=this;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Co(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}(Qn);Qn.registerType("geojson");const Po=wo,Oo={bindPopup_highlight_tooltip:(To=z(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 Le(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 In,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=z(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=io.imageryLayerFeatureInfo2Geojson(n.feature),o=new Po(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 To.apply(this,arguments)})};var To;const Eo=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 M(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 G(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 W(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createUrlTemplateImageryLayer",value:function(){return new W(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 Oo.bindPopup_highlight_tooltip(i,t),i}}]),e}();const Ao=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 ko={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 ko.NONE:i=this.createEllipsoidTerrain(t);break;case ko.XYZ:i=this.createUrlTerrain(t);break;case ko.GOOGLE:i=this.createGoogleTerrain(t);break;case ko.ARCGIS:i=this.createArcgisTerrain(t);break;case ko.VR:i=this.createVRTerrain(t)}return i}}]),e}();function Ro(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 Mo(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ro(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ro(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function So(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 jo={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},Lo=function(e){c(i,e);var t=So(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=Mo(Mo({},jo),r),e._nativeObjCesium.clustering.enabled=!0,e._nativeObjCesium.clustering.clusterEvent.addEventListener(e._clusterEventHandler,h(e)),e._nativeObjCesium.clustering.pixelRange=e._options.pixelRange,e._state=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Qn.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=me.CLEARED,this}}]),i}(Qn);Qn.registerType("cluster");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(i,e);var t=Do(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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Qn.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}(Qn);Qn.registerType("czml");const Ho=Bo;function Go(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 No=function(e){c(i,e);var t=Go(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Qn.getLayerType("dynamic")}},{key:"clear",value:function(){return this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=me.CLEARED,this}}]),i}(Qn);Qn.registerType("dynamic");const Fo=No;function Wo(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 Uo(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Wo(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Wo(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return 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 Vo={name:"",count:10,maximumLevel:21,dataProperty:"",callback:function(){return null}},qo=function(e){c(i,e);var t=zo(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=Uo(Uo({},Vo),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 Co(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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Qn.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=me.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=me.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=me.CLEARED}}]),i}(Qn);Qn.registerType("feature_grid");const Zo=qo;function Yo(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 Qo=function(e){c(i,e);var t=Yo(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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Qn.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}(Qn);Qn.registerType("gpx");const Ko=Qo;function Xo(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 Jo=function(e){c(i,e);var t=Xo(i);function i(){var e;return n(this,i),(e=t.call(this))._nativeObjCesium=new Cesium.PrimitiveCollection,e._isGround=!0,e._state=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Qn.getLayerType("ground_primitive")}},{key:"clear",value:function(){return this._nativeObjCesium&&this._nativeObjCesium.removeAll(),this._cache={},this._state=me.CLEARED,this}}]),i}(Qn);Qn.registerType("ground_primitive");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(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=ge.create("div","html-layer",void 0),r._nativeObjCesium.setAttribute("id",r.businessID),r._renderRemoveCallback=void 0,r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Qn.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;t._viewer.camera.direction;t._viewer.scene.mode!=Cesium.SceneMode.SCENE3D&&(n=Me.transformCartographicToCartesian(t._viewer.camera.positionCartographic)),t.eachGraphic((function(t){if(t&&t.position){var r=Me.transformWGS84ToCartesian(t.position),o=(i.globe.ellipsoid.geodeticSurfaceNormal(r,new Cesium.Cartesian3),i.cartesianToCanvasCoordinates(r,new Cesium.Cartesian2));t._updateStyle(o,Cesium.Cartesian3.distance(r,n),!0,e)}}),t)}),this),this._state=me.ADDED}},{key:"_onRemove",value:function(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._nativeObjCesium),this._state=me.REMOVED}},{key:"clear",value:function(){for(;this._nativeObjCesium.hasChildNodes();)this._nativeObjCesium.removeChild(this._nativeObjCesium.firstChild);return this._cache={},this._state=me.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=Me.transformWGS84ToCartesian(t.position);s.push(i)}})),s.length>0&&Yr.flyToPoints(this._viewer,s,t,i,n,r,o)}}]),i}(Qn);Qn.registerType("html");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,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=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Qn.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}(Qn);Qn.registerType("kml");const os=rs;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 as=function(e){c(i,e);var t=ss(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=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Qn.getLayerType("label")}},{key:"_createLabel",value:function(e){if(e.position&&e.name)return zi.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}(Qn);Qn.registerType("label");const ls=as;function us(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=us(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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Qn.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=me.CLEARED,this}}]),i}(Qn);Qn.registerType("primitive");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(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.PrimitiveCollection,r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Qn.getLayerType("tileset")}},{key:"clear",value:function(){return this._nativeObjCesium.removeAll(),this._cache={},this._state=me.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}(Qn);Qn.registerType("tileset");const ms=ps;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 ds=function(e){c(i,e);var t=vs(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=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Qn.getLayerType("topojson")}}]),i}(Po);Po.registerType("topojson");const ys=ds;var gs=i(852),_s=i.n(gs),Cs=i(529),bs=i.n(Cs),ws=i(885),Ps=i.n(ws),Os=i(139),Ts=i.n(Os),Es=i(450),As=i.n(Es),ks=i(162),xs=i.n(ks),Rs=i(750),Ms=i.n(Rs),Ss=i(601),js=i.n(Ss),Ls=i(454),Is=i.n(Ls),Ds=i(253),Bs=i.n(Ds);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:Is()},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:js()},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:_s()},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:bs()},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:Ts()},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:Ps()},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:As()},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:xs()},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:Ms()},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:Bs()},translucent:function(e){return!0}});var Hs=i(724),Gs=i.n(Hs),Ns=i(719),Fs=i.n(Ns),Ws=i(433),Us=i.n(Ws);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:Gs()},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:Gs()},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:Fs()},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:Us()},translucent:function(e){return!0}});var zs=i(586),Vs=i.n(zs);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:Vs()},translucent:function(e){return!0}});var qs=i(486),Zs=i.n(qs),Ys=i(671),Qs=i.n(Ys);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:Zs()},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:Qs()},translucent:function(e){return!0}});const Ks=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 Xs(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=Xs(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}(Ks);Object.defineProperties(Js.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),image:Cesium.createPropertyDescriptor("image")});const $s=Js;function ea(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 ta=function(e){c(i,e);var t=ea(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}(Ks);Object.defineProperties(ta.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const ia=ta;function na(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 ra=function(e){c(i,e);var t=na(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}(Ks);Object.defineProperties(ra.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),image:Cesium.createPropertyDescriptor("image"),repeat:Cesium.createPropertyDescriptor("repeat")});const oa=ra;function sa(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 aa=function(e){c(i,e);var t=sa(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}(Ks);Object.defineProperties(aa.prototype,{color:Cesium.createPropertyDescriptor("color"),image:Cesium.createPropertyDescriptor("image")});const la=aa;function ua(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 ca=Cesium.Color.WHITE,ha=function(e){c(i,e);var t=ua(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,ca,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}(Ks);Object.defineProperties(ha.prototype,{color:Cesium.createPropertyDescriptor("color"),glowPower:Cesium.createPropertyDescriptor("glowPower"),taperPower:Cesium.createPropertyDescriptor("taperPower")});const fa=ha;function pa(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 ma=function(e){c(i,e);var t=pa(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}(Ks);Object.defineProperties(ma.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration")});const va=ma;function da(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 ya=function(e){c(i,e);var t=da(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}(Ks);Object.defineProperties(ya.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),percent:Cesium.createPropertyDescriptor("percent"),gradient:Cesium.createPropertyDescriptor("gradient")});const ga=ya;function _a(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 Ca=function(e){c(i,e);var t=_a(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}(Ks);Object.defineProperties(Ca.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),percent:Cesium.createPropertyDescriptor("percent"),gradient:Cesium.createPropertyDescriptor("gradient")});const ba=Ca;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 Pa=function(e){c(i,e);var t=wa(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}(Ks);Object.defineProperties(Pa.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const Oa=Pa;function Ta(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 Ea=Cesium.Color.WHITE,Aa=Cesium.Color.fromCssColorString("#0aed8b"),ka=function(e){c(i,e);var t=Ta(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,Ea,t.color1),t.color2=Cesium.Property.getValueOrDefault(this._color2,e,Aa,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}(Ks);Object.defineProperties(ka.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 xa=ka;function Ra(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 Ma=function(e){c(i,e);var t=Ra(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}(Ks);Object.defineProperties(Ma.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const Sa=Ma;function ja(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 La=function(e){c(i,e);var t=ja(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}(Ks);Object.defineProperties(La.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const Ia=La;var Da=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(Da.prototype,{baseWaterColor:Cesium.createPropertyDescriptor("baseWaterColor"),blendColor:Cesium.createPropertyDescriptor("blendColor"),specularMap:Cesium.createPropertyDescriptor("specularMap"),normalMap:Cesium.createPropertyDescriptor("normalMap")});const Ba=Da;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 Ga=function(e){c(i,e);var t=Ha(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}(Ks);Object.defineProperties(Ga.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness")});const Na=Ga;function Fa(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 Wa=function(e){c(i,e);var t=Fa(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}(Ks);Object.defineProperties(Wa.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration"),count:Cesium.createPropertyDescriptor("count")});const Ua=Wa;function za(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 Va=function(e){c(i,e);var t=za(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}(Ks);Object.defineProperties(Va.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness"),speed:Cesium.createPropertyDescriptor("speed"),rep:Cesium.createPropertyDescriptor("rep")});const qa=Va;function Za(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 Ya=function(e){c(i,e);var t=Za(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}(Ks);Object.defineProperties(Ya.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness")});const Qa=Ya;function Ka(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 Xa=function(e){c(i,e);var t=Ka(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}(Ks);Object.defineProperties(Xa.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),copy:Cesium.createPropertyDescriptor("copy")});const Ja=Xa;function $a(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 el=function(e){c(i,Cesium.PolylineCollection);var t=$a(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}();const tl=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=fe.createPointLabel(this.viewer,new Cesium.Cartesian3(0,0,0),"",fe.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()}return a(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=ge.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){ge.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(){this.clear(fe.drawEntityNames()),this._pointLabels=[],this.end()}},{key:"clear",value:function(e){if(e){for(var t=Object.values(e),i=0;i<this.viewer.entities.values.length;i++){var n=this.viewer.entities.values[i];t.indexOf(n.name)>-1&&(this.viewer.entities.removeById(n.id),i--)}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 el,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 fe.drawEntityNames()[e.name]}));return e.push.apply(e,Ae(t)),e}}]),e}();function il(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 nl=function(e){c(i,e);var t=il(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,fe.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.ismeare,i=this.viewer;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(i.scene.canvas);var n=this.mouseHandler,r=this;this._originCursor=i.scene.canvas.style.cursor,i.scene.canvas.style.cursor="crosshair";var o=new Cesium.Cartesian2,s=!1,a=Cesium.JulianDate.now();n.setInputAction((function(n){if(i.selectedEntity=null,i.trackedEntity=null,r._tempPoint.point.show=!1,t){var s=fe.pickPosition(i,o,e._getObjectsToExclude());if(s){var a=fe.getPointLableString(s);r._pointLabels.push(fe.createPointLabel(i,s,a,fe.drawEntityNames().drawPoint,e.pointParas)),r._tempPoint.show=!1,r.onCompleted&&r.onCompleted(s)}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),n.setInputAction((function(e){r.end()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK),n.setInputAction((function(e){r.end()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),r.mouseHandler.setInputAction((function(e){var t=Cesium.JulianDate.now();Cesium.JulianDate.secondsDifference(t,a)<.03||(a=t,r.tooltip&&(r.justDraw||(r.tooltip.style.display="block"),r.tooltip.style.left=e.endPosition.x+25+"px",r.tooltip.style.top=e.endPosition.y-30+"px"),s=!0,o=Cesium.Cartesian2.clone(e.endPosition,o))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.tempPointParas.show&&(this._preUpdateListener=i.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&s){s=!1;var t=fe.pickPosition(i,o,e._getObjectsToExclude());if(t)if(r._tempPoint.show=!0,r._tempPoint.point.show=!0,r.justDraw)fe.setPointPosition(r._tempPoint,t);else{var n=fe.getPointLableString(t);fe.setPointLabel(r._tempPoint,t,n)}else r._tempPoint.show=!1,r._tempPoint.point.show=!1}})))}}]),i}(tl);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)}}const ol=function(e){c(i,e);var t=rl(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:"clear",value:function(){N(p(i.prototype),"clear",this).call(this,fe.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.ismeare,n=this.viewer,r=this.cartesian,o=this.positions;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(n.scene.canvas);var s=this.mouseHandler,a=this.poly,l=this;this._originCursor=n.scene.canvas.style.cursor,n.scene.canvas.style.cursor="crosshair";var u=new Cesium.Cartesian2,c=!1;this._preUpdateListener=n.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&c){if(c=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=u.x+25+"px",e.tooltip.style.top=u.y-25+"px"),!(r=fe.pickPosition(n,u,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)fe.setPointPosition(e._tempPoint,r);else{var t=fe.getPointLableString(r);fe.setPointLabel(e._tempPoint,r,t)}if(Cesium.defined(a))null!=r&&(o.pop(),o.push(r));else{a=new Object;var i=new Cesium.CallbackProperty((function(){return o.length>2?new Cesium.PolygonHierarchy(o):null}),!1),s=new Cesium.CallbackProperty((function(){if(o.length>1){var e=[].concat(o),t=o[0];return e.push(t),e}return null}),!1),h={name:fe.drawEntityNames().drawpolygon,polygon:{hierarchy:i,fill:l.fill,material:l.fillColor,perPositionHeight:l.perPositionHeight,heightReference:l.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}};e.clampToGround&&(h.polyline={positions:s,width:l.lineWidth,material:l.lineColor,clampToGround:l.clampToGround}),n.entities.add(h)}!e.clampToGround&&e.updateNoDepthTestPolyline(),o.length>2&&!l.justDraw&&l.showAreaLabel()}})),s.setInputAction((function(e){i&&(c=!0,u=Cesium.Cartesian2.clone(e.endPosition,u))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),s.setInputAction((function(s){if(e._tempPoint.point.show=!1,e._tempPoint.show=!1,i&&r&&i){if(t.style.display="none",!r)return;0==o.length&&o.push(r.clone()),o.push(r),l.lastLeftClickPoint=o[o.length-1],n.entities.add({name:fe.drawEntityNames().drawpolygonpoint,position:o[o.length-1],point:{pixelSize:l.pointSize,color:l.pointColor,disableDepthTestDistance:1e9}})}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),s.setInputAction((function(t){if(l._notrackPos(),(o=l._removeSamePoint(o)).length>=3){var i=[].concat(o),n=o[0];if(i.push(n),!e.clampToGround){var r=l.createPolylinePrimitive(i,l.lineColor,l.lineWidth);l.polyLinePrimitives.add(r),l.clearNoDepthTestPolyline()}l.onCompleted&&l.onCompleted(i)}l.end()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),s.setInputAction((function(t){if(l._notrackPos(),o=l._removeFloatPoint(o),(o=l._removeSamePoint(o)).length>=3){var i=[].concat(o),n=o[0];if(i.push(n),!e.clampToGround){var r=l.createPolylinePrimitive(i,l.lineColor,l.lineWidth);l.polyLinePrimitives.add(r),l.clearNoDepthTestPolyline()}l.onCompleted&&l.onCompleted(o)}l.end()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"showAreaLabel",value:function(){var e=fe.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=fe.createPointLabel(this.viewer,i.center,t,fe.drawEntityNames().drawpolygon),this._totalLengthPointLabel.point.show=!1):fe.setPointLabel(this._totalLengthPointLabel,i.center,t)}}]),i}(tl);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)}}const al=function(e){c(i,e);var t=sl(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,fe.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.ismeare,i=this.viewer,n=this.cartesian,r=this.positions;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(i.scene.canvas);var o=this.mouseHandler,s=this;this._originCursor=i.scene.canvas.style.cursor,i.scene.canvas.style.cursor="crosshair";var a=new Cesium.Cartesian2,l=!1;this._preUpdateListener=i.scene.preUpdate.addEventListener((function(){if(e._isMouseNewPosition()&&l){if(l=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=a.x+25+"px",e.tooltip.style.top=a.y-25+"px"),!(n=fe.pickPosition(i,a,e._getObjectsToExclude())))return s._tempPoint.show=!1,void(s._tempPoint.point.show=!1);if(s._tempPoint.show=!0,s._tempPoint.point.show=!0,s.justDraw)fe.setPointPosition(s._tempPoint,n);else{var t=fe.getPointLableString(n);fe.setPointLabel(s._tempPoint,n,t)}r.length>=2&&(Cesium.defined(e.poly)?(r.pop(),r.push(n)):e.poly=new Object,!s.justDraw&&s.showLengthLabel(r)),e.updateNoDepthTestPolyline(!1)}})),o.setInputAction((function(e){t&&(l=!0,a=Cesium.Cartesian2.clone(e.endPosition,a))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),o.setInputAction((function(o){s._tempPoint.point.show=!1,s._tempPoint.show=!1,t&&n&&(0==r.length&&r.push(n.clone()),r.push(n.clone()),e.lastLeftClickPoint=r[r.length-1],i.entities.add({name:fe.drawEntityNames().drawpolylinepoint,position:n,point:{pixelSize:e.pointSize,color:e.pointColor,outlineColor:e.outlineColor,outlineWidth:e.outlineWidth,disableDepthTestDistance:1e9}}))}),Cesium.ScreenSpaceEventType.LEFT_CLICK),o.setInputAction((function(t){if(s._notrackPos(),e.clampToGround)new u(r)._init();else{var i=s.createPolylinePrimitive(s._removeSamePoint(r),s.lineColor,s.lineWidth);s.polyLinePrimitives&&s.polyLinePrimitives.add(i)}s.clearNoDepthTestPolyline(),s.onCompleted&&s.onCompleted(s._removeSamePoint(r)),s.end()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),o.setInputAction((function(t){if(s._notrackPos(),r=e._removeFloatPoint(r),r=e._removeSamePoint(r),e.clampToGround)new u(r)._init();else{var i=s.createPolylinePrimitive(s._removeSamePoint(r),s.lineColor,s.lineWidth);i&&s.polyLinePrimitives&&s.polyLinePrimitives.add(i)}s.clearNoDepthTestPolyline(),s.onCompleted&&s.onCompleted(s._removeSamePoint(r)),s.end()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK);var u=function(){function e(e){this.options={name:fe.drawEntityNames().drawpolyline,polyline:{width:s.lineWidth,arcType:Cesium.ArcType.RHUMB,clampToGround:s.clampToGround,material:s.lineColor,depthFailMaterial:new Cesium.PolylineDashMaterialProperty({color:s.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=i.entities.add(this.options)},e.prototype.remove=function(){this.polyLine&&i.entities.remove(this.polyLine),this.polyLine=void 0},e}()}},{key:"showEachsegLengthLabel",value:function(e){var t=this,i=e.length;fe.createPointLabelsCallback(e,(function(e,i,n,r){void 0===t._pointLabels_son[e]?(t._pointLabels_son[e]=fe.createPointLabel(t.viewer,n,r),t._pointLabels_son[e].point.show=!1):fe.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:"showTotalLength",value:function(e){var t=fe.getPolylineDistance(e),i="总长:"+t.toFixed(2)+"米";t>=1e3&&(i="总长:"+(t/1e3).toFixed(2)+"千米"),void 0===this._totalLengthPointLabel?(this._totalLengthPointLabel=fe.createPointLabel(this.viewer,e[0],i),this._totalLengthPointLabel.point.show=!1):fe.setPointLabel(this._totalLengthPointLabel,e[0],i)}},{key:"showLengthLabel",value:function(e){this.showEachsegLengthLabel(e),this.showTotalLength(e)}},{key:"updatePolyLine",value:function(){}}]),i}(tl);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)}}const ul=function(e){c(i,e);var t=ll(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:"_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,fe.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.ismeare,n=this.viewer,r=this.cartesian,o=this.positions,s=this.polygonPoint;this.mouseHandler=new Cesium.ScreenSpaceEventHandler(n.scene.canvas);var a=this.mouseHandler,l=this.poly,u=this;this._originCursor=n.scene.canvas.style.cursor,n.scene.canvas.style.cursor="crosshair";Cesium.JulianDate.now();a.setInputAction((function(a){if(e._isMouseNewPosition()&&i){if(t.style.display="block",t.style.left=a.endPosition.x+25+"px",t.style.top=a.endPosition.y-25+"px",null!=(r=fe.pickPosition(n,a.endPosition,e._getObjectsToExclude()))&&(o.length>1&&o.pop(),o.length>0&&o.push(r)),!Cesium.defined(l)){l=new Object;var c=new Cesium.CallbackProperty((function(){return o.length>1?Cesium.Rectangle.fromCartesianArray(o):null}),!1);s=n.entities.add({name:fe.drawEntityNames().drawRec,rectangle:{coordinates:c,material:u.fillColor,fill:u.fill,outline:u.outline,outlineWidth:u.outlineWidth,outlineColor:u.outlineColor,heightReference:u.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}}),u.polygonPoint=s}o.length>1&&!u.justDraw&&u.showAreaLabel()}}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),a.setInputAction((function(s){if(i&&(r=fe.pickPosition(n,s.position))&&i){if(t.style.display="none",!r)return;if(o.push(r),u.lastLeftClickPoint=o[o.length-1],e.showPoint&&n.entities.add({name:fe.drawEntityNames().drawRecpoint,position:o[o.length-1],point:{pixelSize:4,color:Cesium.Color.RED,outlineColor:Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:1e9}}),o.length>=2){if(u.onCompleted){var a=Cesium.Rectangle.subsample(u.polygonPoint.rectangle.coordinates.getValue());a.push(a[0]),u.onCompleted(a)}u.end()}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK),a.setInputAction((function(e){u.onCompleted&&u.onCompleted(u._removeSamePoint(o)),u.end(),u._notrackPos()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),a.setInputAction((function(t){o=e._removeFloatPoint(o),u.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=fe.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=fe.createPointLabel(this.viewer,s.center,o,fe.drawEntityNames().drawRec),this._totalLengthPointLabel.point.show=!1):fe.setPointLabel(this._totalLengthPointLabel,s.center,o)}}]),i}(tl);function cl(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 hl=function(e){c(i,e);var t=cl(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,fe.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:"startDraw",value:function(){var e=this;this.end(),this._addToolTip(),this._addPolyLinePrimitives(),this.initNoDepthTestPolyline();var t=this.tooltip;this.ismeare=!0;var 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.poly,l=this;this._originCursor=n.scene.canvas.style.cursor,n.scene.canvas.style.cursor="crosshair";var u=new Cesium.Cartesian2,c=!1;this._preUpdateListener=n.scene.preUpdate.addEventListener((function(){if(c){if(c=!1,e.tooltip&&(e.tooltip.style.display="block",e.tooltip.style.left=u.x+25+"px",e.tooltip.style.top=u.y-25+"px"),!(r=fe.pickPosition(n,u,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)fe.setPointPosition(e._tempPoint,r);else{var t=fe.getPointLableString(r);fe.setPointLabel(e._tempPoint,r,t)}if(null!=r&&(o.length>1&&o.pop(),o.length>0&&o.push(r)),!Cesium.defined(a)){a=new Object;var i=new Cesium.CallbackProperty((function(){if(o.length>1){if(e._radius=Cesium.Cartesian3.distance(o[0],o[1]),e._radius<=0)return null;var t=Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:o[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),s=new Cesium.CallbackProperty((function(){return e._outlinePositions}),!1),h={name:fe.drawEntityNames().drawCircle,polygon:{hierarchy:i,fill:l.fill,material:l.fillColor,perPositionHeight:l.perPositionHeight,outline:l.outline,outlineWidth:l.outlineWidth,outlineColor:l.outlineColor,heightReference:l.clampToGround?Cesium.HeightReference.CLAMP_TO_GROUND:Cesium.HeightReference.NONE}};h.polyline={positions:s,width:l.outlineWidth,material:l.outlineColor,clampToGround:l.clampToGround},n.entities.add(h)}o.length>1&&!l.justDraw&&l.showAreaLabel()}})),s.setInputAction((function(e){i&&(c=!0,u=Cesium.Cartesian2.clone(e.endPosition,u))}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),s.setInputAction((function(n){e._tempPoint.point.show=!1,e._tempPoint.show=!1,i&&r&&(t.style.display="none",o.push(r),l.lastLeftClickPoint=o[o.length-1],o.length>=2&&e._outlinePositions&&(l.onCompleted&&l.onCompleted(e._outlinePositions),l.end()),l._notrackPos())}),Cesium.ScreenSpaceEventType.LEFT_CLICK),s.setInputAction((function(t){l.onCompleted&&l.onCompleted(e._outlinePositions),l.end(),l._notrackPos()}),Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),s.setInputAction((function(t){l.onCompleted&&l.onCompleted(e._outlinePositions),l.end(),l._notrackPos()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"showAreaLabel",value:function(){var e=fe.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=fe.createPointLabel(this.viewer,i.center,t,fe.drawEntityNames().drawpolygon),this._totalLengthPointLabel.point.show=!1):fe.setPointLabel(this._totalLengthPointLabel,i.center,t)}}]),i}(tl);var fl=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}(),pl=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},ml="attribute vec4 position;\nvarying vec2 texcoord;\nvoid main(){\n texcoord = position.xy*0.5+0.5;\n gl_Position = position;\n}",vl="#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]),pl.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,v,d;if(l=e.createProgram(),v=e.createShader(e.VERTEX_SHADER),e.attachShader(l,v),e.shaderSource(v,"attribute vec2 position;\nvoid main(){\n gl_Position = vec4(position, 0.0, 1.0);\n}"),e.compileShader(v),!e.getShaderParameter(v,e.COMPILE_STATUS))throw e.getShaderInfoLog(v);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(v),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),d=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,d,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],pl.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,v,d,y,g,_,C,b,w,P,O,T,E,A;for(null==e.prefer&&(e.prefer=["half"]),null==e.require&&(e.require=[]),null==e.throws&&(e.throws=!0),v=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!==v,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!=(T=null!=s?s.HALF_FLOAT_OES:void 0)?T: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],d=!0,g=0,b=(E=e.require).length;g<b;g++)!1===t[a=E[g]]&&(d=!1);d&&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 dl=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}(),yl=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}(),gl=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}(),_l=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 gl(this.gl,{type:n.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new yl(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}(),Cl=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 dl(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 dl(this.gl,{vertex:ml,fragment:vl+"uniform float low, high;\nvoid main(){\n gl_FragColor = vec4(clamp(texture2D(source, texcoord).rgb, low, high), 1.0);\n}"}),this.multiplyShader=new dl(this.gl,{vertex:ml,fragment:vl+"uniform float value;\nvoid main(){\n gl_FragColor = vec4(texture2D(source, texcoord).rgb*value, 1.0);\n}"}),this.blurShader=new dl(this.gl,{vertex:ml,fragment:vl+"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 _l(this.gl,this.width,this.height),this.nodeFront=new _l(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}(),bl=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 gl(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 dl(this.gl,{vertex:ml,fragment:vl+"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 Cl(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 wl(e){return new bl(e)}function Pl(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 Ol(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Pl(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Pl(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return 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 El=new Cesium.WebMercatorProjection,Al={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},kl=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))._options=Ol(Ol({},Al),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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Qn.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=wl({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=El.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=El.project(Cesium.Rectangle.southwest(this._bounds)),t=El.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=wl({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=me.CLEARED,this}}]),i}(Qn);Qn.registerType("heat-map");const xl=kl;var Rl={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 Sl(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}},Ml=new Cesium.WebMercatorProjection;function Sl(e,t,i){if(!t)return null;i||(i={}),this._cesium=e,this._options=i,this._id=Rl._getID(),this._options.gradient=this._options.gradient?this._options.gradient:Rl.defaults.gradient,this._options.maxOpacity=this._options.maxOpacity?this._options.maxOpacity:Rl.defaults.maxOpacity,this._options.minOpacity=this._options.minOpacity?this._options.minOpacity:Rl.defaults.minOpacity,this._options.blur=this._options.blur?this._options.blur:Rl.defaults.blur,this._options.backgroundColor=this._options.backgroundColor?this._options.backgroundColor:Rl.defaults.backgroundColor,this._mbounds=Rl.wgs84ToMercatorBB(t),this._setWidthAndHeight(this._mbounds),this._options.radius=Math.round(this._options.radius?this._options.radius:this.width>this.height?this.width/Rl.defaults.radiusFactor:this.height/Rl.defaults.radiusFactor),this._spacing=this._options.radius*Rl.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=Rl.mercatorToWgs84BB(this._mbounds),this._rectangle=Cesium.Rectangle.fromDegrees(this.bounds.west,this.bounds.south,this.bounds.east,this.bounds.north),this._container=Rl._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}Rl.wgs84ToMercator=function(e){var t=Ml.project(Cesium.Cartographic.fromDegrees(e.x,e.y));return{x:t.x,y:t.y}},Rl.wgs84ToMercatorBB=function(e){var t=Ml.project(Cesium.Cartographic.fromDegrees(e.west,e.south)),i=Ml.project(Cesium.Cartographic.fromDegrees(e.east,e.north));return{north:i.y,east:i.x,south:t.y,west:t.x}},Rl.mercatorToWgs84=function(e){var t=Ml.unproject(new Cesium.Cartesian3(e.x,e.y));return{x:t.longitude,y:t.latitude}},Rl.mercatorToWgs84BB=function(e){var t=Ml.unproject(new Cesium.Cartesian3(e.west,e.south)),i=Ml.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)}},Rl.deg2rad=function(e){return e*(Math.PI/180)},Rl.rad2deg=function(e){return e/(Math.PI/180)},Sl.prototype.wgs84PointToHeatmapPoint=function(e){return this.mercatorPointToHeatmapPoint(Rl.wgs84ToMercator(e))},Sl.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},Sl.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>Rl.defaults.maxCanvasSize?(this._factor=this.width/Rl.defaults.maxCanvasSize,this.height/this._factor<Rl.defaults.minCanvasSize&&(this._factor=this.height/Rl.defaults.minCanvasSize)):this.height>this.width&&this.height>Rl.defaults.maxCanvasSize?(this._factor=this.height/Rl.defaults.maxCanvasSize,this.width/this._factor<Rl.defaults.minCanvasSize&&(this._factor=this.width/Rl.defaults.minCanvasSize)):this.width<this.height&&this.width<Rl.defaults.minCanvasSize?(this._factor=this.width/Rl.defaults.minCanvasSize,this.height/this._factor>Rl.defaults.maxCanvasSize&&(this._factor=this.height/Rl.defaults.maxCanvasSize)):this.height<this.width&&this.height<Rl.defaults.minCanvasSize&&(this._factor=this.height/Rl.defaults.minCanvasSize,this.width/this._factor>Rl.defaults.maxCanvasSize&&(this._factor=this.width/Rl.defaults.maxCanvasSize)),this.width=this.width/this._factor,this.height=this.height/this._factor},Sl.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)},Sl.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},Sl.prototype.show=function(e){(this._oldEntity||this._newEntity)&&(this._oldEntity.show=e,this._newEntity.show=e)},Sl.prototype.updateLayer=function(){var e=this;Rl.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(Rl._getImageryProvider(this)))};const jl=Rl;const Ll={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",FRONT:"front",BACK:"back",NONE:"none"};function Il(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 Dl(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Il(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Il(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Bl={edgeWidth:0,edgeColor:Cesium.Color.WHITE,unionClippingRegions:!1};function Hl(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 Gl(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Hl(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Hl(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Nl(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={lerpInterval:50,bottomImage:"",sideImage:""},Wl=function(e){c(i,e);var t=Nl(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,Gl(Gl({},Fl),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 Me.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=Me.transformWGS84ToCartographic(this._positions[r]),a=Me.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(Me.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=Dl(Dl({},Bl),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=ke.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?me.ENABLED:me.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 Ll.UP:t=new Cesium.Cartesian3(0,0,1);break;case Ll.DOWN:t=new Cesium.Cartesian3(0,0,-1);break;case Ll.LEFT:t=new Cesium.Cartesian3(-1,0,0);break;case Ll.RIGHT:t=new Cesium.Cartesian3(1,0,0);break;case Ll.FRONT:t=new Cesium.Cartesian3(0,-1,0);break;case Ll.BACK:t=new Cesium.Cartesian3(0,1,0)}return t}},{key:"_isCcw",value:function(e){if(!e||e.length<3)return!1;var t=Me.transformWGS84ToCartesian(this._positions[0]),i=Me.transformWGS84ToCartesian(this._positions[1]),n=Me.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=Me.transformWGS84ToCartesian(this._positions[n]),s=Me.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,Me.transformWGS84ToCartesian(this._positions[0]),new Cesium.Cartesian3),o=Cesium.Matrix4.multiplyByPoint(i,Me.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,Me.transformWGS84ToCartesian(this._positions[h]),new Cesium.Cartesian3),m=Cesium.Matrix4.multiplyByPoint(i,Me.transformWGS84ToCartesian(this._positions[f]),new Cesium.Cartesian3),v=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(v,this._distance||0))}}else if(this._direction&&this._direction!==ClippingDirection_default.NONE){var d=this._getDirectionNoraml(this._direction);if(this._angle){var y=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(this._angle));Cesium.Matrix3.multiplyByVector(y,d,d)}d&&t.push(new Cesium.ClippingPlane(d,this._distance||0))}return t}}]),e}());const Ul=Wl;const zl=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 Vl=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 zl(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 zl(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 ql=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 Zl(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 Yl(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Zl(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Zl(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}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 Kl={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:.04,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},Xl=function(e){c(i,e);var t=Ql(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=Yl(Yl({},Kl),r),e._data=void 0,e._canvas=document.createElement("canvas"),e._state=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Qn.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 Vl({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 ql(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=Yl(Yl({},this._options),t),this._nativeObjCesium.setOptions(this._options)),this._nativeObjCesium.prerender(),this._nativeObjCesium.render()),this}},{key:"setOptions",value:function(e){return this._options=Yl(Yl({},this._options),e),this._nativeObjCesium&&(this._nativeObjCesium.setOptions(this._options),this._nativeObjCesium.prerender(),this._nativeObjCesium.render()),this}}]),i}(Qn);Qn.registerType("wind");const Jl=Xl;var $l=Cesium,eu=$l.Cartesian3,tu=$l.Primitive,iu=$l.Material,nu=$l.Geometry,ru=$l.MaterialAppearance,ou=$l.GeometryAttribute,su=$l.ComponentDatatype,au=$l.PrimitiveType,lu=$l.BoundingSphere,uu=$l.VertexFormat,cu=$l.GeometryAttributes,hu=$l.Check,fu=new uu,pu=new eu,mu=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:uu.DEFAULT;this._vertexFormat=r}return a(e,null,[{key:"pack",value:function(e,t,i){var n;return hu.typeOf.object("value",e),hu.defined("array",t),i=null!==(n=i)&&void 0!==n?n:0,uu.pack(e._vertexFormat,t,i),i+=uu.packedLength,eu.pack(e._normal,t,i),i+=eu.packedLength,t[i++]=e._radius,t}},{key:"unpack",value:function(e,t,i){var n;hu.defined("array",e),t=null!==(n=t)&&void 0!==n?n:0;var r=uu.unpack(e,t,fu);t+=uu.packedLength;var o=eu.unpack(e,t,pu),s=e[t+=eu.packedLength];return defined(i)?(i._vertexFormat=uu.clone(r,i._vertexFormat),i._normal=eu.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;eu.equals(e._normal,eu.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 eu(a,-(i+n)/2+l,(i+n)/2+u),o=[1,0,0,1,0,0,1,0,0,1,0,0]):eu.equals(e._normal,eu.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 eu((i+n)/2+a,l,(i+n)/2+u),o=[0,1,0,0,1,0,0,1,0,0,1,0]):eu.equals(e._normal,eu.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 eu((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(Ae(r));var c=new Float32Array([0,0,1,0,1,1,0,1]),h=new Uint16Array([0,1,2,2,3,0]);return new nu({attributes:new cu({position:new ou({componentDatatype:su.DOUBLE,componentsPerAttribute:3,values:r}),normal:new ou({componentDatatype:su.FLOAT,componentsPerAttribute:3,values:o}),st:new ou({componentDatatype:su.FLOAT,componentsPerAttribute:2,values:c})}),indices:h,primitiveType:au.TRIANGLES,boundingSphere:new lu(t,(i+n)/2)})}}]),e}();Z(mu,"packedLength",uu.packedLength+eu.packedLength+1);const vu=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 mu({normal:this._normal,radius:i,vertexFormat:uu.DEFAULT,center:this._center}),o=new Cesium.GeometryInstance({geometry:mu.createGeometry(r)}),s=new tu({asynchronous:!1,geometryInstances:o,modelMatrix:this._modelMatrix,appearance:new ru({material:iu.fromType("Color",{color:this._color})})});return s.isAxisPlane=!0,s.normal=this._normal,s.axis=t.axis,s.color=this._color,s}));function du(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 yu(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 yu(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 yu(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 gu=Cesium,_u=gu.PrimitiveCollection,Cu=gu.PolylineCollection,bu=gu.Material,wu=gu.Color,Pu=gu.Cartesian3,Ou=gu.Cartesian2,Tu=gu.Matrix4,Eu=gu.Matrix3,Au=gu.Quaternion,ku=gu.PointPrimitiveCollection,xu=gu.ScreenSpaceEventHandler,Ru=gu.ScreenSpaceEventType,Mu=gu.Polyline,Su=gu.Primitive,ju=gu.Math,Lu=gu.Plane,Iu=gu.Model,Du=gu.IntersectionTests,Bu=gu.Transforms,Hu=gu.PointPrimitive,Gu=gu.Event,Nu=new Pu,Fu=new Au,Wu=new Eu,Uu=new Pu,zu=(new Pu,new Tu),Vu=new Tu;function qu(e,t){e instanceof Mu?e.material.uniforms.color=t:e instanceof Su?e.appearance.material.uniforms.color=t:e instanceof Hu&&(e.color=t)}function Zu(e,t){var i=new Pu,n=viewer.camera.getPickRay(e),r=new Lu(Pu.UNIT_X,0);return Lu.fromPointNormal(t.center,t.activePrimitive.normal,r),Lu.transform(r,t._modelMatrix,r),Du.rayPlane(n,r,i),Tu.multiplyByPoint(t._inverseModelMatrix,i,i),i}var Yu=new Ou,Qu=new Ou;function Ku(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=du(r);try{for(u.s();!(o=u.n()).done;){var c=o.value,h=c.positions.map((function(t){return Tu.multiplyByPoint(e._modelMatrix,t,new Pu)})).map((function(t){return ANOVGIS.Transform.transformCartesian3ToWindow(t,e._viewer)})),f=(s=Ou.subtract.apply(Ou,Ae(h).concat([Yu])),a=Ou.subtract(i,t,Qu),Ou.normalize(s,s),Ou.dot(s,a));n[c.axis.toLowerCase()]=f*l}}catch(e){u.e(e)}finally{u.f()}return n}}var Xu="None",Ju="T",$u="R",ec="S",tc=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:wu.RED,this.yAxisColor=null!==(r=m.yAxisColor)&&void 0!==r?r:wu.GREEN,this.zAxisColor=null!==(o=m.zAxisColor)&&void 0!==o?o:wu.BLUE,this.scaleAxisColor=null!==(s=m.scaleAxisColor)&&void 0!==s?s:wu.WHITE,this.activeAxisColor=null!==(a=m.activeAxisColor)&&void 0!==a?a:wu.YELLOW,this.originColor=null!==(l=m.originColor)&&void 0!==l?l:wu.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 _u,this.object=null,this._modelMatrix=void 0,this._primitives=[],this._center=new Pu,this._radius=0,this._originOffset=null!==(p=m.originOffset)&&void 0!==p?p:new Pu,this._selectedPrimitives=[],this._offset=new Pu(0,0,0),this._angle=0,this.rotatePlaneRadius=m.rotatePlaneRadius,this._mode=Xu,this.preTranformEvent=new Gu,this.postTransformEvent=new Gu,this.postRoatationEvent=new Gu,this.postScaleEvent=new Gu}return a(e,[{key:"translateEnabled",get:function(){return this._translateEnabled},set:function(e){this._translateEnabled=e;var t,i=du(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes($u)||r.includes(ec)||(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=du(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes($u)&&(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=du(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(ec)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"center",get:function(){return Pu.add(this._center,this._originOffset,new Pu)}},{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=Tu.inverse(e,new Tu)}},{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 Pu((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 Pu,Pu.subtract(s[1],s[0],this.xNormal),Pu.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 Pu(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 Pu,Pu.subtract(s[1],s[0],this.yNormal),Pu.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 Pu(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 Pu,Pu.subtract(s[1],s[0],this.zNormal),Pu.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 vu({color:this.zAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Pu(0,0,1),axis:"XY"})),this.XOYPlane.relativeAxis=[this.xAxis,this.yAxis],this.XOZPlane=this.root.add(new vu({color:this.yAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Pu(0,1,0),axis:"XZ"})),this.XOZPlane.relativeAxis=[this.xAxis,this.zAxis],this.YOZPlane=this.root.add(new vu({color:this.xAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Pu(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 ku({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 bu(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{fabric:{type:"dasharrow",source:"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",uniforms:{color:e,gapColor:wu.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 Pu(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 Pu(0,0,1),e.splice(0);for(var o=0;o<=360;o++){var s=o/180*Math.PI;e.push(new Pu(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 Pu(0,1,0),e.splice(0);for(var a=0;a<=360;a++){var l=a/180*Math.PI;e.push(new Pu(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 Pu(-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 Pu(1,1,1);this.xNormal&&this.yNormal&&this.zNormal&&(Pu.add(this.xNormal,this.yNormal,i),Pu.add(i,this.zNormal,i)),Pu.normalize(i,i);var n=null!==(e=this.scaleAxisLength)&&void 0!==e?e:t,r=new Pu;Pu.multiplyByScalar(i,n,r),Pu.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 Iu!=!1){this.modelMatrix=e.modelMatrix;var i=function(){Tu.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 Pu==!1)throw new Error("position is invalid");this._hasBindObject=!0,this.modelMatrix=Bu.eastNorthUpToFixedFrame(e),this._center=new Pu,Pu.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 Cu({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 xu(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 Pu,e._angle=0,i.setInputAction((function(t){var i=t.startPosition,n=t.endPosition;e.transform(i,n)}),Ru.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!1)}}),Ru.LEFT_DOWN),i.setInputAction((function(n){e._hasBindObject&&(e.active(null),i.removeInputAction(Ru.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=[]))}),Ru.LEFT_UP),this._removeEventListener=function(){i.removeInputAction(Ru.LEFT_DOWN),i.removeInputAction(Ru.LEFT_UP),i.removeInputAction(Ru.MOUSE_MOVE)}}},{key:"active",value:function(e){if(e||this.activePrimitive){if(!e&&this.activePrimitive){if(qu(this.activePrimitive,this.activePrimitive.pcolor||this.activePrimitive.color),this.activePrimitive.isAxisPlane){var t,i=du(this.activePrimitive.relativeAxis);try{for(i.s();!(t=i.n()).done;){var n=t.value;qu(n,n.color)}}catch(e){i.e(e)}finally{i.f()}}return this.activePrimitive=void 0,void(this._mode=Xu)}if(e.isAxisPlane){var r,o=du(e.relativeAxis);try{for(o.s();!(r=o.n()).done;){qu(r.value,this.activeAxisColor)}}catch(e){o.e(e)}finally{o.f()}}if(this.activePrimitive=e,qu(this.activePrimitive,this.activeAxisColor),e.axis)if(e.axis.includes("R")){this._mode=$u;var s=Zu(this._mousedownPixel,this);this.rAxuStart.positions=[this.center,s],this._startLocalPosition=s}else e.axis.includes("S")?this._mode=ec:this._mode=Ju}}},{key:"remove",value:function(){this._viewer.scene.primitives.remove(this.root),this._removeEventListener(),this._primitives.splice(0)}},{key:"transform",value:function(e,t){if(this.preTranformEvent.raiseEvent(Tu.clone(this.modelMatrix,{})),this.activePrimitive===this.origin){var i=ANOVGIS.Transform.transformWindowToCartesian3(t,this._viewer);Tu.setTranslation(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=du(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===Ju)Ku(this,e,t,Nu),this.translate(Nu);else if(this._mode===$u){var o=function(e,t,i){var n=e.center;Pu.subtract(t,n,t),Pu.subtract(i,n,i);var r=Pu.dot(Pu.normalize(t,t),Pu.normalize(i,i)),o=Pu.subtract(t,i,Uu),s=t,a=Pu.cross(o,s,Uu),l=e.activePrimitive.normal,u=ju.sign(Pu.dot(a,l));return Math.acos(r)*u}(this,Zu(e,this),Zu(t,this));this.rotate(o)}else if(this._mode=ec){Ku(this,e,t,Nu);var s=-Nu.sxyz/Pu.distance.apply(Pu,Ae(this.scaleAxis.positions))+1;this.scale(new Pu(s,s,s))}this.postTransformEvent.raiseEvent(Tu.clone(this.modelMatrix,{}))}},{key:"scale",value:function(e){var t=Tu.fromScale(e,zu);Tu.multiply(this._modelMatrix,t,this._modelMatrix),this.modelMatrix=this._modelMatrix;var i,n=du(this.root._primitives);try{for(n.s();!(i=n.n()).done;){var r=i.value;Tu.multiply(r.modelMatrix,t,r.modelMatrix)}}catch(e){n.e(e)}finally{n.f()}this.postScaleEvent.raiseEvent(e,Tu.clone(this.modelMatrix,{}))}},{key:"rotate",value:function(e){this._angle+=e;var t=this.activePrimitive.normal,i=Tu.fromTranslation(this.center,zu),n=Au.fromAxisAngle(t,e,Fu),r=Eu.fromQuaternion(n,Wu),o=Tu.fromTranslation(Pu.negate(this.center,Uu),Vu);Tu.multiply(this.modelMatrix,i,this.modelMatrix),Tu.multiplyByMatrix3(this.modelMatrix,r,this.modelMatrix),Tu.multiply(this.modelMatrix,o,this.modelMatrix);var s,a=du(this.root._primitives);try{for(a.s();!(s=a.n()).done;){var l=s.value;Tu.multiply(l.modelMatrix,i,l.modelMatrix),Tu.multiplyByMatrix3(l.modelMatrix,r,l.modelMatrix),Tu.multiply(l.modelMatrix,o,l.modelMatrix)}}catch(e){a.e(e)}finally{a.f()}this.postRoatationEvent.raiseEvent(e,t,Tu.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,Pu.add(this._offset,e,this._offset);var i=Tu.fromTranslation(e);Tu.multiply(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=du(this.root._primitives);try{for(r.s();!(n=r.n()).done;){var o=n.value;Tu.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=Pu.clone(this.xAxis.positions[0]),i=Pu.clone(this.xAxis.positions[0]);i.x+=-e.x,this.xAux.positions=[t,i]}else{var n=Pu.clone(this.xAxis.positions[1]),r=Pu.clone(this.xAxis.positions[1]);r.x+=-e.x,this.xAux.positions=[n,r]}if(e.y<0){var o=Pu.clone(this.yAxis.positions[0]),s=Pu.clone(this.yAxis.positions[0]);s.y+=-e.y,this.yAux.positions=[o,s]}else{var a=Pu.clone(this.yAxis.positions[1]),l=Pu.clone(this.yAxis.positions[1]);l.y+=-e.y,this.yAux.positions=[a,l]}if(e.z>0){var u=Pu.clone(this.zAxis.positions[0]),c=Pu.clone(this.zAxis.positions[0]);c.z+=-e.z,this.zAux.positions=[u,c]}else{var h=Pu.clone(this.zAxis.positions[1]),f=Pu.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=Au.fromAxisAngle(this.activePrimitive.normal,-t),n=Eu.fromQuaternion(i,Wu),r=Tu.fromRotation(n,zu),o=Pu.subtract(e,this.center,Uu);Tu.multiplyByPoint(r,o,o),Pu.add(this.center,o,o),this.rAxuEnd.positions=[this.center,o]}}}]),e}();const ic=tc;var nc={CONE:"cone",CIRCLE:"circle",BOX:"box"},rc={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}},oc={damCenter:[115.602,32.432],gateCount:13,gateHeight:28,gateSpacing:65,gatePositions:null,sprayHeading:180,sprayPitch:105,emitterType:nc.CONE,coneAngle:15,circleRadius:3,boxWidth:4,boxHeight:1.5,particleImageSize:24,startColor:null,endColor:null,startScale:.8,flowPreset:"medium",systemLifetime:16},sc=function(e,t){if(!e)throw new Error("DamWaterRelease: viewer is required");this._viewer=e,this._options=Object.assign({},oc,t||{}),this._particleSystems=[],this._gatePositions=[],this._flowLevel=this._options.flowPreset,this._destroyed=!1,this._mainImage=this._createWaterTexture(this._options.particleImageSize),this._computeGatePositions()};Object.defineProperties(sc.prototype,{gatePositions:{get:function(){return this._gatePositions}},flowLevel:{get:function(){return this._flowLevel}},currentFlowParams:{get:function(){return rc[this._flowLevel]||rc.medium}},emitterType:{get:function(){return this._options.emitterType}}}),sc.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)})}},sc.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()},sc.prototype._createEmitter=function(){var e=this._options;switch(e.emitterType){case nc.CONE:return new Cesium.ConeEmitter(Cesium.Math.toRadians(e.coneAngle));case nc.CIRCLE:return new Cesium.CircleEmitter(e.circleRadius);case nc.BOX:return new Cesium.BoxEmitter(new Cesium.Cartesian3(e.boxWidth,e.boxHeight,.1));default:return new Cesium.ConeEmitter(Cesium.Math.toRadians(e.coneAngle))}},sc.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))},sc.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}))},sc.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))}},sc.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})])},sc.prototype.closeGate=function(e){var t=this._particleSystems[e];t&&(t.show=!1,t.emissionRate=0)},sc.prototype.setGateOpen=function(e,t){t?this.openGate(e):this.closeGate(e)},sc.prototype.openAllGates=function(){for(var e=0;e<this._particleSystems.length;e++)this.openGate(e)},sc.prototype.closeAllGates=function(){for(var e=0;e<this._particleSystems.length;e++)this.closeGate(e)},sc.prototype.setFlowLevel=function(e){if(rc[e]){this._flowLevel=e;for(var t=rc[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))}}},sc.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)},sc.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)},sc.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)))}},sc.prototype.setParticleImage=function(e){for(var t=0;t<this._particleSystems.length;t++)this._particleSystems[t]&&(this._particleSystems[t].image=e)},sc.prototype.getParticleSystem=function(e){return this._particleSystems[e]||null},sc.prototype.getAllParticleSystems=function(){return this._particleSystems.slice()},sc.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=[]},sc.prototype.destroy=function(){this.removeFromScene(),this._mainImage=null,this._gatePositions=[],this._destroyed=!0},sc.EmitterType=nc,sc.FLOW_PRESETS=rc,sc.DEFAULT_OPTIONS=oc;const ac=sc;var lc=i(797),uc=i.n(lc);const cc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._id=ye.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=me.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:uc(),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=me.ADDED,this):this}}]),e}();var hc=i(802),fc=i.n(hc);const pc=function(){function e(){n(this,e),this._id=ye.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=me.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:fc(),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=me.ADDED,this):this}}]),e}();var mc=i(87),vc=i.n(mc);const dc=function(){function e(){n(this,e),this._id=ye.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._speed=10,this._state=me.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:vc(),uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._state=me.ADDED,this):this}}]),e}();var yc=i(35),gc=i.n(yc);const _c=function(){function e(t){n(this,e),this._id=ye.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._rotateAmount=.04,this._enable=!1,this._heading=0,this._state=me.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:gc()},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=me.ADDED,this):this}}]),e}();const Cc=function(){function e(t){if(n(this,e),!t)throw new Error("Viewer:必须传入三维球对象");this._comps={fog:new cc,rain:new pc,snow:new dc,cloud:new _c},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 bc={};function wc(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 Pc(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?wc(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):wc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const Oc=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=Pc(Pc({},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 Tc(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=function(e){c(i,e);var t=Tc(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 bc.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}(Oc);bc.GLOBE_ROTATE="globe_rotate";const Ac=Ec;function kc(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 xc=function(e){c(i,e);var t=kc(i);function i(){var e;return n(this,i),(e=t.call(this,se))._registerEvent(),e}return a(i)}(le);function Rc(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 Mc=function(e){c(i,e);var t=Rc(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=ke.parsePosition(e.position),e})),r._currentIndex=0,r._timer=void 0,r._flyEvent=new xc,r):(console.error("未定义路线!"),f(r))}return a(i,[{key:"type",get:function(){return bc.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}(Oc);bc.FlyManager="FlyManager";const Sc=Mc;function jc(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=function(e){c(i,e);var t=jc(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 bc.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=Je.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}(Oc);bc.AROUND_POINT="around_point";const Ic=Lc;const Dc=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 Bc=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 Hc=function(){function e(t,i,r){n(this,e),this._id=ye.uuid(),this._bid=void 0,this._positions=ke.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 Fn,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=me.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=ke.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=me.ADDED}},{key:"_onRemove",value:function(){this._state=me.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(Ze(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=Ve(this._positions)/this._duration;i=this._positions.map((function(i,r,o){return 0!==r&&(t+=Ve([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,Me.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 Gc=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=me.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?me.ENABLED:me.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 Nc=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=me.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?me.ENABLED:me.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 Fc=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=me.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?me.ENABLED:me.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 Wc=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=me.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?me.ENABLED:me.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}();const Uc=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=me.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?me.ENABLED:me.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 zc=function(){function e(t){n(this,e),this._viewer=t,this._enable=!1,this._selected=[],this._state=me.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?me.ENABLED:me.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 Vc=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=me.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?me.ENABLED:me.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 qc=function(){function e(t){if(n(this,e),!t)throw Error("missing viewer param");this._blackAndWhite=new Gc(t),this._bloom=new Nc(t),this._brightness=new Fc(t),this._depthOfField=new Wc(t),this._lensFlare=new Uc(t),this._night=new zc(t),this._silhouette=new Vc(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:"lensFlare",get:function(){return this._lensFlare}},{key:"night",get:function(){return this._night}},{key:"silhouette",get:function(){return this._silhouette}}]),e}();function Zc(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 Yc=function(e){c(i,e);var t=Zc(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 v=t.scene.children;n.setFromCamera(r,t.camera);var d=n.intersectObjects(v);return console.log(d),!!d[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=ge.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}(Qn);const Qc=Yc;var Kc=200,Xc={200:"成功响应"},Jc={Event:"Event",Api:"Api"},$c=function(e,t,i,n,r){var o,s=ye.uuid(),a=function(e){var t;return null!==(t=Xc[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}},eh=function(){function e(t){n(this,e),this.event=new le(Jc),this.resMessage={},this.viewer=void 0,this.resMessage=$c(0,"engineReady",Kc)}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 wr(o.container,o),this.viewer.scene.camera.isFlying=!1,this.resMessage=$c(0,n,Kc,r),void this.event.raiseEvent(Jc.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=$c(0,n,Kc,r,{name:"聚焦完成"}),t.event.raiseEvent(Jc.Api,t.resMessage)}}))}},{key:"receiveMessage",value:function(e){this.event.addEventListener(Jc.Api,e),this.event.addEventListener(Jc.Event,e)}}]),e}();const th=function(e){return new eh(e)}},384:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});const n=Cesium;var r=["version","accessToken","baseUrl","author","home_page","init","ready","use","mixin","Namespace","Initialized"],o={version:"1.8.4",accessToken:"",baseUrl:"/anov-gis-sdk/resources/",author:"zhf",home_page:"http://172.16.222.31:8866",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(172)),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(172)),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)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 colorImage = texture(image, vec2(fract(st.t*rep - speed*czm_frameNumber*0.005), st.t*rep));\n vec4 fragColor;\n fragColor.rgb = color.rgb / brightness;\n fragColor = czm_gammaCorrect(fragColor);\n material.alpha = colorImage.a * color.a;\n material.diffuse = color.rgb; \n material.emission = fragColor.rgb;\n return material;\n}\n "},719:e=>{e.exports="czm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput); \n vec2 st = materialInput.st; \n vec4 gradientColor = texture(image,st); \n gradientColor = czm_gammaCorrect(gradientColor); \n material.diffuse = gradientColor.rgb / brightness;\n material.alpha = color.a;\n material.shininess = 1.5;\n return material;\n}\n"},433:e=>{e.exports="vec4 getVec4ColorSpaceByImage(sampler2D image,vec2 coords){\n return texture(image,vec2(coords.s,coords.t));\n}\nfloat getRandomNumber(float begin,float rate,float speed){\n return begin+abs(rate*sin(czm_frameNumber/speed));\n}\nczm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 coords = materialInput.st;\n float time = czm_frameNumber;\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))));\n material.diffuse = color.rgb;\n material.alpha = color.r*6.0 + colorImageAlpha.r;\n material.emission = color.rgb;\n return material;\n}"},253:e=>{e.exports="uniform vec4 color1;\nuniform vec4 color2;\nuniform float whiteLength;\nuniform float greenLength;\nuniform float lineWidth;\nuniform float speed;\nuniform float direction;\nuniform float arrowLengthRatio;\nuniform float arrowWidthRatio;\nin float v_polylineAngle;\n\nmat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(c, s, -s, c);\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n float totalLength = whiteLength + greenLength;\n float phase = fract(czm_frameNumber * speed / 1000.0);\n float pixelPos = fract(pos.x / (totalLength * czm_pixelRatio) - direction * phase);\n float ratio = whiteLength / totalLength;\n\n float perpendicular = materialInput.st.t * 2.0 - 1.0;\n\n vec4 finalColor = color2;\n\n if (pixelPos < ratio) {\n float normalizedPos = pixelPos / ratio;\n float arrowStart = 1.0 - arrowLengthRatio;\n\n if (normalizedPos >= arrowStart) {\n float arrowNormalizedPos = (normalizedPos - arrowStart) / arrowLengthRatio;\n\n float edgePos = arrowWidthRatio * arrowNormalizedPos;\n float leftLineCenter = -edgePos;\n float rightLineCenter = edgePos;\n\n float distToLeftLine = abs(perpendicular - leftLineCenter);\n float distToRightLine = abs(perpendicular - rightLineCenter);\n\n float halfWidth = lineWidth * (1.0 - arrowNormalizedPos * 0.5);\n\n if (distToLeftLine < halfWidth || distToRightLine < halfWidth) {\n finalColor = color1;\n }\n }\n }\n\n material.emission = finalColor.rgb;\n material.alpha = finalColor.a;\n return material;\n}"},454:e=>{e.exports="uniform vec4 color;\nuniform float speed;\nczm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n float time = fract( czm_frameNumber * speed / 1000.0);\n vec2 st = materialInput.st;\n float scalar = smoothstep(0.0,1.0,time);\n material.diffuse = color.rgb * scalar;\n material.alpha = color.a * scalar ;\n return material;\n}\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)\n{\nczm_material material = czm_getDefaultMaterial(materialInput);\nvec2 st = materialInput.st;\nvec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\nmaterial.alpha = colorImage.a;\nmaterial.diffuse = colorImage.rgb * 1.5 ;\nreturn material;\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;\nuniform vec4 color;\nczm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 colorImage = texture(image,st);\n vec3 fragColor = color.rgb;\n material.alpha = colorImage.a * color.a * 3.;\n material.diffuse = max(fragColor.rgb + colorImage.rgb , fragColor.rgb);\n return material;\n}\n\n"},852:e=>{e.exports="uniform sampler2D image;\nuniform vec4 color;\nuniform float speed;\nczm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material=czm_getDefaultMaterial(materialInput);\n vec2 st=materialInput.st;\n float time=fract(czm_frameNumber*speed/1000.);\n vec4 colorImage=texture(image,st);\n vec3 fragColor=color.rgb;\n if(st.t>.36&&st.t<.64){\n fragColor=vec3(1.0);\n }\n if(color.a==0.){\n material.alpha=colorImage.a*2.*fract(st.s-time);\n material.diffuse=colorImage.rgb;\n }else{\n material.alpha = colorImage.a * color.a * 2.0 * smoothstep(.6,1., fract(st.s - time));\n // material.alpha=mix(color.a,colorImage.a,.3)*2.*smoothstep(.3,1.,fract(st.s-time));\n material.diffuse=max(fragColor.rgb*material.alpha,fragColor.rgb);\n }\n return material;\n}\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;\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform vec4 fogByDistance;\nuniform vec4 fogColor;\n\n\nfloat getDistance(sampler2D depthTexture, vec2 texCoords){\n float depth = czm_unpackDepth(texture(depthTexture, texCoords));\n if (depth == 0.0) {\n return czm_infinity;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\n return -eyeCoordinate.z / eyeCoordinate.w;\n}\n\n\nfloat interpolateByDistance(vec4 nearFarScalar, float distance){\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor){\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n\nvoid main(void){\n float distance = getDistance(depthTexture, v_textureCoordinates);\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n float blendAmount = interpolateByDistance(fogByDistance, distance);\n vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);\n out_FragColor = alphaBlend(finalFogColor, sceneColor);\n}\n"},802:e=>{e.exports="in vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nuniform float speed;\nuniform float mixNum;\n\nfloat hash(float x){\n return fract(sin(x*23.3)*13.13);\n}\n\nvoid main(){\n float time = czm_frameNumber * speed / 1000.0;\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.1,.2,.3);\n float a=-.3;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0.,4.9))*.3+1.;\n float v=1.-sin(hash(floor(uv.x*100.))*2.);\n float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*10.;\n c*=v*b;\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c,1), mixNum);\n}\n"},87:e=>{e.exports="in vec2 v_textureCoordinates;\nuniform sampler2D colorTexture;\nuniform float speed;\n\nfloat snow(vec2 uv,float scale){\n float time = czm_frameNumber * speed / 1000.0 ;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));\n if(w<.1)return 0.;\n uv+=time/scale;\n uv.y+=time*2./scale;\n uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;\n vec2 s=floor(uv),f=fract(uv),p;\n float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7.,3.,6.,5.))*5.))-f;\n d=length(p);\n k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n return k*w;\n}\n\nvoid main(){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0.);\n float c = 0.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c));\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.3);\n}\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}},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 v?t:v,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 v(){}function d(){}function y(){}var g={};h(g,l,(function(){return this}));var _=Object.getPrototypeOf,C=_&&_(_(x([])));C&&C!==i&&o.call(C,l)&&(g=C);var b=y.prototype=v.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 R()}for(i.method=r,i.arg=o;;){var s=i.delegate;if(s){var a=T(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 T(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,T(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 x(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:R}}function R(){return{value:void 0,done:!0}}return d.prototype=y,s(b,"constructor",{value:y,configurable:!0}),s(y,"constructor",{value:d,configurable:!0}),d.displayName=h(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"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=x,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:x(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(384).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={626:(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:()=>zc,Billboard:()=>_i,BillboardPrimitive:()=>pt,BounceBillboardPrimitive:()=>gt,BounceLabelPrimitive:()=>Tt,Box:()=>wi,CesiumHeatMap:()=>Wl,CesiumView:()=>Yn,CesiumWaterAnalysis:()=>bl,Cesium_PART:()=>yo,Circle:()=>Ai,CircleBlurMaterial:()=>Ys(),CircleBlurMaterialProperty:()=>ja,CircleScanMaterial:()=>Ks(),CircleScanMaterialProperty:()=>Da,CircleWaveMaterialProperty:()=>za,CloudPrimitive:()=>xt,ClusterLayer:()=>Do,CoordUtil:()=>ro,CopyRight:()=>gr,Corridor:()=>Si,Cylinder:()=>Li,CzmlLayer:()=>Go,DamWaterRelease:()=>dc,DaoHangLineMaterial:()=>Hs(),DaoHangLineMaterialProperty:()=>Ra,DiffuseWallPrimitive:()=>Lt,DivIcon:()=>nt,DomUtil:()=>ge,DrawBase:()=>cl,DrawCircle:()=>Cl,DrawPoint:()=>fl,DrawPolyLine:()=>dl,DrawPolygon:()=>ml,DrawRectangle:()=>gl,DynamicLayer:()=>Wo,Effect:()=>th,ElecEllipsoidPrimitive:()=>Bt,Ellipse:()=>Bi,Ellipsoid:()=>Ni,Event:()=>le,FeatureGridLayer:()=>Yo,FeatureInfoUtil:()=>no,FlowLinePrimitive:()=>Nt,FlyEventType:()=>se,FlyManager:()=>Fc,FrameSate:()=>go,GeoJsonLayer:()=>Oo,GeocoderFactory:()=>yr,GeocoderType:()=>dr,GlobeRotate:()=>Dc,GpxLayer:()=>Xo,Graphic:()=>Ge,GraphicEvent:()=>Hn,GraphicEventType:()=>ee,GraphicType:()=>pe,GroundPrimitiveLayer:()=>es,GroundSkyBox:()=>qr,HeatMapLayer:()=>Hl,HtmlLayer:()=>ns,ImageryLayerFactory:()=>Ao,ImageryThemeGL:()=>ho,ImageryType:()=>l,KeyboardRoaming:()=>Vc,KmlLayer:()=>ss,Label:()=>Vi,LabelLayer:()=>us,LabelPrimitive:()=>bt,LayerControlUitl:()=>po,LayerEvent:()=>Dn,LayerEventType:()=>ie,LayerGroupEvent:()=>Ln,LayerGroupEventType:()=>te,LightCylinderPrimitive:()=>Vt,LocateUtil:()=>Qr,MapInfo:()=>so,Model:()=>at,ModelPrimitive:()=>Kt,MouseEvent:()=>kn,MouseEventType:()=>X,NoDepthTestPolylineCollection:()=>tl,Parse:()=>xe,PathEvent:()=>Wn,PathEventType:()=>re,Plane:()=>Yi,PlotEvent:()=>zn,PlotEventType:()=>oe,PoiSearch:()=>ao,Point:()=>$i,PointPrimitive:()=>ei,Polygon:()=>rn,Polyline:()=>ln,PolylineFlickerMaterial:()=>Ds(),PolylineFlickerMaterialProperty:()=>Ea,PolylineFlowMaterialProperty:()=>_a,PolylineGlowMaterial:()=>Os(),PolylineGlowMaterialProperty:()=>pa,PolylineGradientMaterial:()=>ks(),PolylineGradientMaterialProperty:()=>da,PolylineImageTrailMaterial:()=>ws(),PolylineImageTrailMaterialProperty:()=>sa,PolylineLightingMaterial:()=>Ts(),PolylineLightingMaterialProperty:()=>ua,PolylineLightingTrailMaterial:()=>Cs(),PolylineLightingTrailMaterialProperty:()=>ea,PolylinePrimitive:()=>ni,PolylineTrailMaterialProperty:()=>na,PolylineVFlywireMaterial:()=>Ms(),PolylineVFlywireMaterialPoperty:()=>wa,PolylineVolume:()=>fn,Position:()=>Oe,PositonEditor:()=>hc,PrimitiveLayer:()=>fs,Rect:()=>yn,RoamingController:()=>qc,RoamingPath:()=>Zc,ScanCirclePrimitive:()=>si,SceneEvent:()=>Mn,SceneEventType:()=>$,ShapeUtil:()=>io,SplitImageLayer:()=>ko,State:()=>me,TerrainClipping:()=>Jl,TerrainFactory:()=>Ro,TerrainType:()=>xo,ThreeCoordTransform:()=>g,ThreeLayer:()=>rh,ThreejsTransform:()=>Pn,TiandituGeocoder:()=>cr,TiandituGeocoderService:()=>ir,TiandituGeocoderService_shanxi:()=>rr,TiandituGeocoder_shanxi:()=>vr,Tileset:()=>ct,TilesetLayer:()=>vs,TopoJsonLayer:()=>gs,TrackEvent:()=>Nn,TrackEventType:()=>ne,TrailLinePrimitive:()=>ui,Transform:()=>Me,TranslateLocal:()=>mo,Util:()=>ye,VectorLayer:()=>bo,VideoPrimitive:()=>fi,Viewer:()=>Pr,ViewerEvent:()=>Rn,ViewerEventType:()=>J,Wall:()=>bn,WallFlowMaterialProperty:()=>Za,WallGradientMaterialProperty:()=>Fa,WallImgMaterialProperty:()=>Ka,WallLineFlowMaterialProperty:()=>$a,WaterMaterialProperty:()=>Ha,WaterPrimitive:()=>vi,Weather:()=>xc,WidgetEventType:()=>ae,WidgetsControl:()=>vo,WindLayer:()=>au,WktUtil:()=>to,area:()=>Fe,bounds:()=>We,center:()=>Ue,cesiumMeasureUtil:()=>fe,commonUtil:()=>$e,createInstance:()=>ch,curve:()=>ze,distance:()=>qe,distanceSquared:()=>Ze,heading:()=>Ye,isBetween:()=>Qe,midCartesian:()=>Ke,midPosition:()=>Xe,parabola:()=>Je});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,v=3.141592653589793,d=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*v,o=Math.sin(r);o=1-y*o*o;var s=Math.sqrt(o);return[i=180*i/(d/s*Math.cos(r)*v),n=180*n/(d*(1-y)/(o*s)*v)]}},{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*v)+20*Math.sin(2*e*v))/3,i+=2*(20*Math.sin(e*v)+40*Math.sin(e/3*v))/3,i+=2*(150*Math.sin(e/12*v)+300*Math.sin(e/30*v))/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*v)+20*Math.sin(2*e*v))/3,i+=2*(20*Math.sin(t*v)+40*Math.sin(t/3*v))/3,i+=2*(160*Math.sin(t/12*v)+320*Math.sin(t*v/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],E=[[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]],T=[[-.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=E[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=T[s];break}if(!o)for(var a=0;a<O.length;a++)if(r<=-O[a]){o=T[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 x(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 R=function(e){c(i,Cesium.WebMercatorTilingScheme);var t=x(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 S=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 R({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 M(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=M(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 H(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 G=function(e){c(i,Cesium.UrlTemplateImageryProvider);var t=H(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 W=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 U(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 z(e){return function(){var t=this,i=arguments;return new Promise((function(n,r){var o=e.apply(t,i);function s(e){U(o,n,r,s,a,"next",e)}function a(e){U(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 Q(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 K={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=Q(Q({},K),{},{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=K,ie=Q(Q({},K),{},{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=Q(Q({},K),{},{POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"}),re=Q(Q({},K),{},{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){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 ce(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ue(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var he={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 ce(ce(ce(ce(ce({},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"}},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){var o;r||(r={});var s={name:n||he.drawEntityNames().drawpolyline,position:t,attachPolygon:!0,show:null===(o=r.show)||void 0===o||o,label:r.justDraw?void 0:{text:i,font:"18px sans-serif",fillColor:Cesium.Color.GOLD,style:Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffset:new Cesium.Cartesian2(30,-30),disableDepthTestDistance:1e9},point:r.billboard&&!r.tempPoint_show?void 0:{color:r.color||new Cesium.Color(1,0,0,.8),pixelSize:r.size||8,perPositionHeight:!1,disableDepthTestDistance:1e9},billboard:r.billboard?{image:r.billboard,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:1e9}:void 0};return e.entities.add(s)},setPointLabel:function(e,t,i){e.position=t,e.label&&(e.label.text=i)},setPointPosition:function(e,t){e&&(e.position=t)},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&&he.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 fe=he;const pe={};const me={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"};var ve="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),de=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]=ve[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 ye=de;const ge=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=ye.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,ye.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}();const _e=function(){function e(){n(this,e)}return a(e,null,[{key:"getPopupDefaultDom",value:function(){var e=ye.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=ye.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 Ce(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 be=function(e){c(i,e);var t=Ce(i);function i(){var e;return n(this,i),(e=t.call(this,ae))._registerEvent(),e}return a(i)}(le);const we=function(){function e(){n(this,e),this._viewer=void 0,this._wrapper=void 0,this.useDefaultHtmlTemplate=!0,this.showTitle=!1,this._event=new be}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 Pe=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(Me.transformWGS84ToCartesian(this),Me.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 Me.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 Oe=Pe;function Ee(e,t,i){return Ee=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},Ee.apply(null,arguments)}function Te(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 Ae(e,t){if(e){if("string"==typeof e)return Te(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)?Te(e,t):void 0}}function ke(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ae(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 xe=function(){function e(){n(this,e)}return a(e,null,[{key:"parsePosition",value:function(e){var t=new Oe;if(!e)return t;if("string"==typeof e)t=Oe.fromString(e);else if(Array.isArray(e))t=Oe.fromArray(e);else if(Object(e)instanceof Oe||!Object(e).hasOwnProperty("lng")||!Object(e).hasOwnProperty("lat"))if(Object(e)instanceof Oe||!Object(e).hasOwnProperty("_lng")||!Object(e).hasOwnProperty("_lat"))if(e instanceof Cesium.Cartesian3)t=Oe.fromCartesian(e);else if(!(Object(e)instanceof Oe)&&Object(e).hasOwnProperty("x")&&Object(e).hasOwnProperty("y")&&Object(e).hasOwnProperty("z")){var i=Ee(Cesium.Cartesian3,ke(Object(e)));t=Oe.fromCartesian(i)}else Object(e)instanceof Oe&&(t=e);else t=Oe.fromObject(e);else t=Oe.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 Oe.fromString(e);if(Array.isArray(e))return Oe.fromArray(e);if(!(Object(e)instanceof Oe)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat"))return Oe.fromObject(e);if(!(Object(e)instanceof Oe)&&Object(e).hasOwnProperty("x")&&Object(e).hasOwnProperty("y")&&Object(e).hasOwnProperty("z")){var t=new Cesium.Cartesian3(e.x,e.y,e.z);return Oe.fromCartesian(t)}return Object(e)instanceof Oe?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 Re=new Cesium.WebMercatorProjection,Se=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 Oe(Cesium.Math.toDegrees(t.longitude),Cesium.Math.toDegrees(t.latitude),t.height)}return new Oe(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=xe.parsePositions(e);return i?i.map((function(e){return t.transformWGS84ToCartesian(e)})):[]}},{key:"transformWGS84ToMercator",value:function(e){var t=Re.project(Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new Oe(t.x,t.y,t.z)}},{key:"transformMercatorToWGS84",value:function(e){var t=Re.unproject(new Cesium.Cartesian3(e.lng,e.lat,e.alt));return new Oe(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,v=null!==(r=e.distance)&&void 0!==r?r:0,d=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-d.offsetWidth/2,O=p.y-d.offsetHeight;if(P<1&&O<1)d&&(d.style.cssText="\n visibility:hidden !important;\n display:none !important;\n ");else{var E="scale3d(1*".concat(w,",1*").concat(w,",1*").concat(w,")"),T=1;if(v&&m){var A=m.near||0,k=m.nearValue||1,x=m.far||Number.MAX_VALUE,R=m.farValue||0;if(v<A)E="scale3d(".concat(k,"*").concat(w,",").concat(k,"*").concat(w,",1)"),T=k;else if(v>x)E="scale3d(".concat(R,"*").concat(w,",").concat(R,"*").concat(w,",1)"),T=R;else{var S=k-(v-A)/(x-A)*(k-R);T=S,E="scale3d(".concat(S,"*").concat(w,",").concat(S,"*").concat(w,",1)")}}if(T<.01)d.style.display="none";else{d.style.display="block","LEFT"===y?P=p.x-d.offsetWidth:"CENTER"===y||"RIGHT"===y&&(P=p.x),"BOTTOM"===g?O=p.y:"CENTER"===g||"TOP"===g&&(O=p.y-d.offsetHeight),C&&(P+=C*T),b&&(O+=b*T),"LEFT"===y?"CENTER"===g?d.style.transformOrigin="right center":"TOP"===g?d.style.transformOrigin="right bottom":"BOTTOM"===g&&(d.style.transformOrigin="right top"):"CENTER"===y?"CENTER"===g?d.style.transformOrigin="center center":"TOP"===g?d.style.transformOrigin="center bottom":"BOTTOM"===g&&(d.style.transformOrigin="center top"):"RIGHT"===y&&("CENTER"===g?d.style.transformOrigin="left center":"TOP"===g?d.style.transformOrigin="left bottom":"BOTTOM"===g&&(d.style.transformOrigin="left top")),d.style.top=O*w+"px",d.style.left=P*w+"px",d.style.visibility="visible",d.style.transform="".concat(E);v&&_&&isBetween(v,_.near||0,_.far||Number.MAX_VALUE)}}}}}]),e}();const Me=Se;function je(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 Le=function(e){c(i,e);var t=je(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=_e.getPopupDefaultDom();this._wrapper=ge.parseDom(u,!1),this._addDefaultTitleContent(),this._initClose()}else this._wrapper=ge.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&&ge.create("div","anov-template-titile",e),ge.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");ge.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>");ge.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){Me.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}(we);const Ie=Le;function De(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 Be=function(e){c(i,e);var t=De(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=_e.getTooltipDefaultDom();this._wrapper=ge.parseDom(a,!1),this._addDefaultTitleContent()}else this._wrapper=ge.create("div","viewer-widgets anov-infoWin-init");else console.error("viewer是必须的参数!")}},{key:"_addDefaultTitleContent",value:function(){var e=this._wrapper.querySelector(".anov-tooltip");this.showTitle&&ge.create("div","anov-template-titile",e),ge.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");ge.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>");ge.appendChild(n,t)}))}return this}},{key:"_updatePosition",value:function(e,t,i){Me.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}(we);const He=Be;const Ge=function(){function e(){var t,i,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._id=ye.uuid(),this.businessID=ye.uuid(),xe.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 Hn,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,xe.parseOption(this._highlight),xe.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:"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=me.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=me.REMOVED}}},{key:"setBillboard",value:function(e){return e&&e.billboard&&(xe.parseOption(e.billboard),this._nativeObjCesium.billboard?ye.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,xe.parseOption(e.label),this._nativeObjCesium.label?ye.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&&(xe.parseOption(e.polyline),e.polyline.positions&&(e.polyline.positions=xe.parsePositions(e.polyline.positions),e.polyline.positions=Me.transformWGS84ArrayToCartesianArray(e.polyline.positions)),this._nativeObjCesium.polyline?ye.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 Ie(e),this._popup.addEventListener(ae.CLOSE,(function(){t.unSelected(t._e)})),this._popup.install(this)}},{key:"bindTooltip",value:function(e){var t=this;new He(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&&(pe[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}},{key:"getGraphicType",value:function(e){return pe[e.toLocaleUpperCase()]||void 0}}]),e}();function Ne(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 Fe(e){var t=0;if(!Array.isArray(e))return t;e[0]instanceof Cesium.Cartesian3||(e=Me.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+=Ne(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 We(){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 Ue(e){if(e&&Array.isArray(e)){var t=Cesium.BoundingSphere.fromPoints(Me.transformWGS84ArrayToCartesianArray(e));return Me.transformCartesianToWGS84(t.center)}return new Oe}function ze(e,t){t=t||{};for(var i=[],n=0;n<e.length-1;n++){var r=Ve(e[n],e[n+1],t.count);r&&r.length>0&&(i=i.concat(r))}return i}function Ve(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),v=parseFloat(t.lat),d=parseFloat(e.lng),y=parseFloat(t.lng);y>d&&y-d>180&&d<0&&(d=360+d,y=360+y),u=0,v===m?(r=0,o=d-y):y===d?(r=Math.PI/2,o=m-v):(r=Math.atan((v-m)/(y-d)),o=(v-m)/Math.sin(r)),0===u&&(u=r+Math.PI/5),l=(s=o/2)*Math.cos(u)+d,a=s*Math.sin(u)+m;for(var g=0;g<i+1;g++){var _=d*c(p)+l*h(p)+y*f(p),C=m*c(p)+a*h(p)+v*f(p),b=e.lng,w=t.lng;n.push([b<0&&w>0?_-360:_,C]),p+=1/i}return n}function qe(e){var t=0;if(e&&Array.isArray(e))for(var i=0;i<e.length-1;i++){var n=Me.transformWGS84ToCartographic(e[i]),r=Me.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 Ze(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 Ye(e,t){var i=e,n=t;if(!i||!n)return 0;e instanceof Cesium.Cartesian3||(i=xe.parsePosition(e),i=Me.transformWGS84ToCartesian(i)),t instanceof Cesium.Cartesian3||(n=xe.parsePosition(t),n=Me.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 Qe(e,t,i){return(e=parseFloat(e)||0)>=parseFloat(t)&&e<=parseFloat(i)}function Ke(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 Xe(e,t){var i=xe.parsePosition(e),n=xe.parsePosition(t);i=Me.transformWGS84ToCartographic(i),n=Me.transformWGS84ToCartographic(n);var r=new Cesium.EllipsoidGeodesic(i,n).interpolateUsingFraction(.5);return new Oe(Cesium.Math.toDegrees(r.longitude),Cesium.Math.toDegrees(r.latitude),r.height)}function Je(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 v=0;v<n;v++){var d=i-4*Math.pow(-.5*a+Math.abs(l)*v,2)*i/Math.pow(a,2),y=e.lng+m*v,g=e.lat+l*v;r.push([y,g,d])}}return r.push([t.lng,t.lat,t.alt||0]),r}const $e={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 et(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 tt(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=tt(i);function i(e,r){var o;return n(this,i),o=t.call(this),r?(o._nativeObjCesium=ge.create("div","anov-div-icon anov-infoWin-init"),o._position=xe.parsePosition(e),o.content=r,o._state=me.INITIALIZED,o):(console.error("没有传入内容,无法显示!"),f(o))}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("div_icon")}},{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=xe.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,v=this._style.distanceDisplayCondition;t&&v&&(m=Qe(t,v.near||0,v.far||Number.MAX_VALUE)),this._nativeObjCesium.style.display=m&&i?"block":"none"}}}},{key:"_onAdd",value:function(e){var t=this;this._layer=e,ge.addClass(this.nativeObjCesium,e.layerName),this._layer.nativeObjCesium.appendChild(this._nativeObjCesium);var i={layer:e,graphic:this,position:Me.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=me.ADDED}},{key:"_onRemove",value:function(){this._layer&&(this._layer.nativeObjCesium.removeChild(this._nativeObjCesium),this._state=me.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?(ye.merge(this._style,e),!0===e.pointerEvents?this._nativeObjCesium.style.pointerEvents="all":this._nativeObjCesium.style.pointerEvents="none",this._style.className&&ge.addClass(this._nativeObjCesium,this._style.className),this):this}}],[{key:"fromEntity",value:function(e,t){var n,r=Cesium.JulianDate.now();return n=new i(Me.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?et(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):et(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(r))),n}}]),i}(Ge);Ge.registerType("div_icon");const nt=it;function rt(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 ot(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 st=function(e){c(i,e);var t=ot(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.Entity({model:{}}),r._position=xe.parsePosition(e.position),r._modelUrl=e.url,r._rotateAmountHeading=0,r._rotateAmountPitch=0,r._rotateAmountRoll=0,r._state=me.INITIALIZED,ye.merge(r._style,e),r.setOptions(e),r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("model")}},{key:"position",get:function(){return this._position},set:function(e){this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.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(Me.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(Me.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(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.model,e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){xe.parseOption(this._highlight),ye.merge(this._nativeObjCesium.model,this._highlight),this.setLabel(this._style)}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){xe.parseOption(this._selectedHighlight),ye.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(Me.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?rt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):rt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)),r}}]),i}(Ge);Ge.registerType("model");const at=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 ut=function(e){c(i,e);var t=lt(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=me.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 Ge.getGraphicType("tileset")}},{key:"ready",value:function(e){return this._nativeObjCesium.then(e),this}},{key:"show",set:function(e){this._show=e,this._nativeObjCesium.then((function(t){t.show=e}))}},{key:"_bindVisibleEvent",value:function(){var e=this;this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._nativeObjCesium.then((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=xe.parsePosition(e),this._nativeObjCesium.then((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._nativeObjCesium.then((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._nativeObjCesium.then((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._nativeObjCesium.then((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._nativeObjCesium.then((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._nativeObjCesium.then((function(t){t.splitDirection=e})),this}},{key:"setCustomShader",value:function(e){return this._nativeObjCesium.then((function(t){t.customShader=e})),this}},{key:"setStyle",value:function(e){return e&&e instanceof Cesium.Cesium3DTileStyle&&(this._style=e,this._nativeObjCesium.then((function(t){t.style=e}))),this}},{key:"clip",value:function(e){var t=this;this._nativeObjCesium.then((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._nativeObjCesium.then((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),ye.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),ye.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}(Ge);Ge.registerType("tileset");const ct=ut;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 ft=function(e){c(i,e);var t=ht(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=xe.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=me.INITIALIZED,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("billboard_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,e),this):this}}]),i}(Ge);Ge.registerType("billboard_primitive");const pt=ft;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 vt=10,dt=.1,yt=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=me.INITIALIZED,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("bounce_billboard_primitive")}},{key:"update",value:function(){if(this._show){var e=this._style.maxOffsetY||vt,t=this._style.offsetAmount||dt;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}(pt);Ge.registerType("bounce_billboard_primitive");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=xe.parsePosition(e),o._text=r,o._nativeObjCesium={position:void 0,text:void 0},o._state=me.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("label_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,e),this):this}}]),i}(Ge);Ge.registerType("label_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,Et=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=me.INITIALIZED,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("bounce_label_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);Ge.registerType("bounce_label_primitive");const Tt=Et;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){var r;return n(this,i),(r=t.call(this))._position=xe.parsePosition(e),r._nativeObjCesium={position:void 0,scale:{x:12,y:8}},r._state=me.INITIALIZED,r.position=r._positions,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("cloud_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,e),this):this}}]),i}(Ge);Ge.registerType("cloud_primitive");const xt=kt;function Rt(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 St(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={minRadius:10,minHeight:30,color:Cesium.Color.RED,slices:128,speed:10},jt=function(e){c(i,e);var t=St(i);function i(e,r,o){var s;return n(this,i),(s=t.call(this))._center=xe.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?Rt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Rt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Mt),s._state=me.INITIALIZED,s}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("diffuse_wall_primitive")}},{key:"center",get:function(){return this._center},set:function(e){return this._center=xe.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(Me.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?(ye.merge(this._style,e),this):this}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(Ge);Ge.registerType("diffuse_wall_primitive");const Lt=jt;function It(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=It(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=xe.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=me.INITIALIZED,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("elec_ellipsoid_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=xe.parsePosition(e),this._nativeObjCesium.geometryInstances.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(Me.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?(ye.merge(this._style,e),this._setAppearance(),this):this}}]),i}(Ge);Ge.registerType("elec_ellipsoid_primitive");const Bt=Dt;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 Gt=function(e){c(i,e);var t=Ht(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=xe.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=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("flow_line_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=xe.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolylineGeometry({positions:Me.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||(ye.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(Ge);Ge.registerType("flow_line_primitive");const Nt=Gt;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 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={color:Cesium.Color.ORANGE},zt=function(e){c(i,e);var t=Wt(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._center=xe.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?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}({},Ut),a._state=me.INITIALIZED,a}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("light-cylinder-primitive")}},{key:"center",get:function(){return this._center},set:function(e){this._center=xe.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:Me.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 v=Cesium.PolygonGeometry.createGeometry(new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(n),perPositionHeight:!0}));return v.indices=l,v.attributes.st.values=s,new Cesium.GeometryInstance({geometry:v})}},{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?(ye.merge(this._style,e),this):this}},{key:"destroy",value:function(){return Cesium.destroyObject(this)}}]),i}(Ge);Ge.registerType("light-cylinder-primitive");const Vt=zt;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)}}function Zt(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 Yt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Zt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Qt=function(e){c(i,e);var t=qt(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=xe.parsePosition(r.position),e._modelUrl=r.url,e._state=me.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 Oe&&(t=Me.transformWGS84ToCartesian(e.position)),t?Yt(Yt({},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=me.ADDED}))}return e}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("model_primitive")}},{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=xe.parsePosition(e),this._nativeModel){var t=Me.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?(ye.merge(this._style,e),this._nativeModel&&ye.merge(this._nativeModel,e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){xe.parseOption(this._highlight),this._nativeModel&&ye.merge(this._nativeModel,this._highlight),this.setLabel(this._style)}},{key:"unHighlight",value:function(e){this.setOptions(this.originOption)}},{key:"selectedHighlight",value:function(e){xe.parseOption(this._selectedHighlight),this._nativeModel&&ye.merge(this._nativeModel,this._selectedHighlight),this.setLabel(this._style)}},{key:"unSelected",value:function(e){this.setOptions(this.originOption)}}]),i}(Ge);Ge.registerType("model_primitive");const Kt=Qt;function Xt(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 Jt={pixelSize:8,outlineColor:Cesium.Color.BLUE,outlineWidth:2},$t=function(e){c(i,e);var t=Xt(i);function i(e){var r;return n(this,i),(r=t.call(this))._position=xe.parsePosition(e),r._nativeObjCesium={position:void 0},r._state=me.INITIALIZED,r.position=r._position,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("point_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position)}},{key:"_mountedHook",value:function(){this.position=this._position,ye.merge(this._nativeObjCesium,Jt,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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,Jt,this._style),this):this}}]),i}(Ge);Ge.registerType("point_primitive");const ei=$t;function ti(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=ti(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=xe.parsePositions(e),r._nativeObjCesium={positions:[]},r.positions=r._positions,r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("polyline_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=xe.parsePositions(e),this._nativeObjCesium.positions=Me.transformWGS84ArrayToCartesianArray(this._positions)}},{key:"center",get:function(){return Ue(this._positions)}},{key:"distance",get:function(){return qe(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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium,e),this):this}}]),i}(Ge);Ge.registerType("polyline_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=function(e){c(i,e);var t=ri(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=xe.parsePosition(e),o._radius=r,o._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o._state=me.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("scan_circle_primitive")}},{key:"position",get:function(){return this._position},set:function(e){this._position=xe.parsePosition(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.EllipseGeometry({center:Me.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||(ye.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(Ge);Ge.registerType("scan_circle_primitive");const si=oi;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 li=function(e){c(i,e);var t=ai(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=xe.parsePositions(e),r._width=o,r._nativeObjCesium=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),r._state=me.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("trail_line_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=xe.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolylineGeometry({positions:Me.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||(ye.merge(this._style,e),e.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(Ge);Ge.registerType("trail_line_primitive");const ui=li;function ci(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 hi=function(e){c(i,e);var t=ci(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._positions=xe.parsePositions(e),o._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}})}),o._video=r,o._state=me.INITIALIZED,o.positions=o._positions,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("video_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=xe.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=Cesium.PolygonGeometry.fromPositions({positions:Me.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||(ye.merge(this._style,e),this._style.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType)),this}}]),i}(Ge);Ge.registerType("video_primitive");const fi=hi;function pi(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 mi=function(e){c(i,e);var t=pi(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=xe.parsePositions(e),r._holes=o.map((function(e){return xe.parsePositions(e)})),r._nativeObjCesium=new Cesium.GroundPrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),r._state=me.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("water_primitive")}},{key:"positions",get:function(){return this._positions},set:function(e){this._positions=xe.parsePositions(e),this._nativeObjCesium.geometryInstances.geometry=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Me.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map((function(e){return new Cesium.PolygonHierarchy(Me.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||(ye.merge(this._style,e),this._style.classificationType&&(this._nativeObjCesium.classificationType=this._style.classificationType),this._setAppearance()),this}}]),i}(Ge);Ge.registerType("water_primitive");const vi=mi;function di(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 yi(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 gi=function(e){c(i,e);var t=yi(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=xe.parsePosition(e),r.position=r._position,ye.merge(r._style,o),r.setOptions(o),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("billboard")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.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?(ye.merge(this._style,e),ye.merge(this._nativeObjCesium.billboard,e),this.setLabel(this._style),this.originOption=Cesium.clone(this._style,!1),this):this}},{key:"highlight",value:function(){xe.parseOption(this._highlight),ye.merge(this._nativeObjCesium.billboard,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){xe.parseOption(this._selectedHighlight),ye.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=Me.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?di(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):di(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n))),t}}]),i}(Ge);Ge.registerType("billboard");const _i=gi;function Ci(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 bi=function(e){c(i,e);var t=Ci(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._position=xe.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=me.INITIALIZED,a}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("box")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.box,e)),this}}]),i}(Ge);Ge.registerType("box");const wi=bi;function Pi(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 Oi(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Pi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Pi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}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)}}var Ti=function(e){c(i,e);var t=Ei(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._nativeObjCesium=new Cesium.Entity({polygon:{}}),o._center=xe.parsePosition(e),o._radius=+r||0,o._rotateAmount=0,o._stRotation=0,o._state=me.INITIALIZED,o.center=o._center,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("circle")}},{key:"center",get:function(){return this._center},set:function(e){return this._center=xe.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:Me.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=Me.transformWGS84ToCartesian(this._center),this._nativeObjCesium.label=Oi(Oi({},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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.polygon,e),this):this}}]),i}(Ge);Ge.registerType("circle");const Ai=Ti;function ki(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 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 Ri=function(e){c(i,e);var t=xi(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=xe.parsePositions(e),r._nativeObjCesium=new Cesium.Entity({corridor:{}}),r._state=me.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("corridor")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=xe.parsePositions(e),this._nativeObjCesium.corridor.positions=Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.corridor,e)),this}}],[{key:"fromEntity",value:function(e){var t=void 0,n=Cesium.JulianDate.now();e.polyline&&((t=new i(Me.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?ki(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ki(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(Ge);Ge.registerType("corridor");const Si=Ri;function Mi(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=Mi(i);function i(e,r,o,s){var a;return n(this,i),(a=t.call(this))._position=xe.parsePosition(e),a._length=+r||0,a._topRadius=+o||0,a._bottomRadius=+s||0,a._nativeObjCesium=new Cesium.Entity({cylinder:{}}),a._state=me.INITIALIZED,a.position=a._position,a}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("cylinder")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.cylinder,e)),this}}]),i}(Ge);Ge.registerType("cylinder");const Li=ji;function Ii(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=Ii(i);function i(e,r,o){var s;return n(this,i),(s=t.call(this))._position=xe.parsePosition(e),s._semiMajorAxis=+r||0,s._semiMinorAxis=+o||0,s._nativeObjCesium=new Cesium.Entity({ellipse:{}}),s._state=me.INITIALIZED,s.position=s._position,s}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("ellipse")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.ellipse,e)),this}}]),i}(Ge);Ge.registerType("ellipse");const Bi=Di;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 Gi=function(e){c(i,e);var t=Hi(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._position=xe.parsePosition(e),o._radius=r||{x:10,y:10,z:10},o._nativeObjCesium=new Cesium.Entity({ellipsoid:{}}),o._state=me.INITIALIZED,o.position=o._position,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("ellipsoid")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.ellipsoid,e)),this}}]),i}(Ge);Ge.registerType("ellipsoid");const Ni=Gi;function Fi(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={text:"test",color:"#ffff00"},zi=function(e){c(i,e);var t=Wi(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=xe.parsePosition(e),r._state=me.INITIALIZED,r.position=r._position,r._style=ye.merge(r._style,Ui,o),r.setOptions(r._style),r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("label")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.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(){xe.parseOption(this._highlight),ye.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,xe.parseOption(e),e.fillColor=e.color,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.label,e),this):this}}],[{key:"fromEntity",value:function(e){var t=Cesium.JulianDate.now(),n=Me.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?Fi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Fi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(t))),r}}]),i}(Ge);Ge.registerType("label");const Vi=zi;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){var s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(n(this,i),(s=t.call(this))._position=xe.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=me.INITIALIZED,s}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("plane")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this._nativeObjCesium.orientation=Cesium.Transforms.headingPitchRollQuaternion(Me.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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.plane,e)),this}}]),i}(Ge);Ge.registerType("plane");const Yi=Zi;function Qi(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 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 Xi={pixelSize:8,outlineColor:Cesium.Color.BLUE,outlineWidth:2},Ji=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,o))._nativeObjCesium=new Cesium.Entity({point:{}}),r._position=xe.parsePosition(e),r.position=r._position,ye.merge(r._style,Xi,o),r.setOptions(o),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("point")}},{key:"position",get:function(){return this._position},set:function(e){return this._position=xe.parsePosition(e),this._nativeObjCesium.position=Me.transformWGS84ToCartesian(this._position),this}},{key:"label",get:function(){return this._nativeObjCesium.label}},{key:"_mountedHook",value:function(){this.position=this._position,ye.merge(this._nativeObjCesium.point,Xi,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,xe.parseOption(e),ye.merge(this._style,e),ye.merge(this._nativeObjCesium.point,this._style),this.setLabel(e),this.originOption=Cesium.clone(this._style,!0),this):this}},{key:"highlight",value:function(){xe.parseOption(this._highlight),ye.merge(this._nativeObjCesium.point,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){xe.parseOption(this._selectedHighlight),ye.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(Me.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?Qi(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Qi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)),t}}]),i}(Ge);Ge.registerType("point");const $i=Ji;function en(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){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 nn=function(e){c(i,e);var t=tn(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=xe.parsePositions(e),r._holes=[],r._state=me.INITIALIZED,r.positions=r._positions,r.position=Me.transformWGS84ToCartesian(r.center),r._nativeObjCesium.position=r.position,xe.parseOption(o),ye.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 Ge.getGraphicType("polygon")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=xe.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 xe.parsePositions(e)})),this._nativeObjCesium.polygon.hierarchy=this._computeHierarchy()),this}},{key:"center",get:function(){var e=Ue([].concat(ke(this._positions),[this._positions[0]])),t=Me.setHeightWGS84(e,.5);return Me.transformCartesianToWGS84(t)}},{key:"area",get:function(){return Fe(this._positions)}},{key:"_computeHierarchy",value:function(){var e=new Cesium.PolygonHierarchy;return e.positions=Me.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map((function(e){return new Cesium.PolygonHierarchy(Me.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,xe.parseOption(e),ye.merge(this._style,e),ye.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(){xe.parseOption(this._highlight),ye.merge(this._nativeObjCesium.polygon,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){xe.parseOption(this._selectedHighlight),ye.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(Me.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?en(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):en(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(n)));return t}}]),i}(Ge);Ge.registerType("polygon");const rn=nn;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 sn(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 an=function(e){c(i,e);var t=sn(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=xe.parsePositions(e),r._positions.length<2?(console.error("polyline必须至少两个点!"),f(r)):(r._nativeObjCesium=new Cesium.Entity({polyline:{}}),r.positions=r._positions,r._state=me.INITIALIZED,xe.parseOption(o),ye.merge(r._style,o),r.position=Me.transformWGS84ToCartesian(Ue([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 Ge.getGraphicType("polyline")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=xe.parsePositions(e),this._nativeObjCesium.polyline.positions=Me.transformWGS84ArrayToCartesianArray(this._positions),this}},{key:"center",get:function(){return Ue(this._positions)}},{key:"distance",get:function(){return qe(this._positions)}},{key:"_mountedHook",value:function(){this.positions=this._positions}},{key:"highlight",value:function(){xe.parseOption(this._highlight),ye.merge(this._nativeObjCesium.polyline,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){xe.parseOption(this._selectedHighlight),ye.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,xe.parseOption(e),ye.merge(this._style,e),ye.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(Me.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?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(n)));return t}}]),i}(Ge);Ge.registerType("polyline");const ln=an;function un(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 hn=function(e){c(i,e);var t=cn(i);function i(e,r){var o;return n(this,i),(o=t.call(this))._positions=xe.parsePositions(e),o._shape=r||[],o._nativeObjCesium=new Cesium.Entity({polylineVolume:{}}),o._state=me.INITIALIZED,o.positions=o._positions,o}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("polyline_volume")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=xe.parsePositions(e),this._nativeObjCesium.polylineVolume.positions=Me.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,ye.merge(this._style,e),ye.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(Me.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?un(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):un(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},e.properties.getValue(r)));return n}}]),i}(Ge);Ge.registerType("polyline_volume");const fn=hn;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 mn(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}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 dn=function(e){c(i,e);var t=vn(i);function i(e){var r;return n(this,i),(r=t.call(this))._positions=xe.parsePositions(e),r._nativeObjCesium=new Cesium.Entity({rectangle:{}}),r._state=me.INITIALIZED,r.positions=r._positions,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("rectangle")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=xe.parsePositions(e),this._nativeObjCesium.rectangle.coordinates=Cesium.Rectangle.fromCartesianArray(Me.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=mn(mn({},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,ye.merge(this._style,e),ye.merge(this._nativeObjCesium.rectangle,e)),this}}]),i}(Ge);Ge.registerType("rectangle");const yn=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 _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)}}var Cn=function(e){c(i,e);var t=_n(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=xe.parsePositions(e),r.positions=r._positions,console.log(r._style),console.log(ye.merge),ye.merge(r._style,o),r.setOptions(o),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Ge.getGraphicType("wall")}},{key:"positions",get:function(){return this._positions},set:function(e){return this._positions=xe.parsePositions(e),this._nativeObjCesium.wall.positions=Me.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||(ye.merge(this._style,e),ye.merge(this._nativeObjCesium.wall,e),this.setLabel(this._style),this.originOption=Cesium.clone(this._style)),this}},{key:"highlight",value:function(){xe.parseOption(this._highlight),ye.merge(this._nativeObjCesium.wall,this._highlight),this.setLabel(this._style)}},{key:"selectedHighlight",value:function(e){xe.parseOption(this._selectedHighlight),ye.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(Me.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?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}({},e.properties.getValue(n)));return t}}]),i}(Ge);Ge.registerType("wall");const bn=Cn;var wn=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=Me.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 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 En(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}function Tn(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 An=function(e){c(f,e);var t,i,r,o,s,l,u,h=Tn(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=z(q().mark((function e(t,i){var n,r,o,s,a,l,u,c,h,f,p,m,v,d,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=Me.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 $i||m instanceof _i||m instanceof Vi)&&(f=u.id.position._value),f||(f=fe.pickPosition(this._viewer,t)),v=void 0,d=void 0,y=void 0,f&&(g=Cesium.Ellipsoid.WGS84.cartesianToCartographic(f))&&(d={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?v=a.camera.pickEllipsoid(t,Cesium.Ellipsoid.WGS84):(_=a.camera.getPickRay(t),v=a.globe.pick(_,a)),v&&(C=Cesium.Ellipsoid.WGS84.cartesianToCartographic(v))&&(y={lng:Cesium.Math.toDegrees(C.longitude),lat:Cesium.Math.toDegrees(C.latitude),alt:C.height}),b={target:u,windowPosition:t,position:f,wgs84Position:d,surfacePosition:v,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(En(En({},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(En(En({},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(En(En({},n),t)))}))}},{key:"_clickHandler",value:(l=z(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=z(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=z(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=z(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=z(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=z(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 kn=An;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 Rn=function(e){c(i,e);var t=xn(i);function i(){var e;return n(this,i),(e=t.call(this,J))._registerEvent(),e}return a(i)}(le);function Sn(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 Mn=function(e){c(i,e);var t=Sn(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 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)}}const Ln=function(e){c(i,e);var t=jn(i);function i(){var e;return n(this,i),(e=t.call(this,te))._registerEvent(),e}return a(i)}(le);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)}}const Dn=function(e){c(i,e);var t=In(i);function i(){var e;return n(this,i),(e=t.call(this,ie))._registerEvent(),e}return a(i)}(le);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)}}const Hn=function(e){c(i,e);var t=Bn(i);function i(){var e;return n(this,i),(e=t.call(this,ee))._registerEvent(),e}return a(i)}(le);function Gn(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 Nn=function(e){c(i,e);var t=Gn(i);function i(){var e;return n(this,i),(e=t.call(this,ne))._registerEvent(),e}return a(i)}(le);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)}}const Wn=function(e){c(i,e);var t=Fn(i);function i(){var e;return n(this,i),(e=t.call(this,re))._registerEvent(),e}return a(i)}(le);function Un(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 zn=function(e){c(i,e);var t=Un(i);function i(){var e;return n(this,i),(e=t.call(this,oe))._registerEvent(),e}return a(i)}(le);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 qn(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}var Zn={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 Yn=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,qn(qn({},Zn),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 Qn={};const Kn=function(){function e(t){n(this,e),t=t||{},this._id=ye.uuid(),this.layerName=t.layerName||ye.uuid(),this.businessID=t.id||ye.uuid(),this._nativeObjCesium=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},xe.parseOption(t),this._layerEvent=new Dn,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=me.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=me.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===me.CLEARED&&(this._state=me.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 Ie(e),this._popup.install(this),this.eachGraphic((function(e){e.raiseEvent(ee.BIND_POPUP,t)}))}},{key:"bindTooltip",value:function(e){var t=this;new He(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&&(Qn[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}},{key:"getLayerType",value:function(e){return Qn[e.toLocaleUpperCase()]||void 0}}]),e}();function Xn(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){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Xn(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Xn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const $n=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)&&ye.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 ye.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}),ye.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 ye.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=Jn(Jn({},this._options),e),this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController()),this}}]),e}();var er=i(384);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}const ir=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?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}({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 nr(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 rr=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?nr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):nr(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 or=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 sr=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 ar(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?ar(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ar(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function ur(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 cr=function(e){c(i,e);var t=ur(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 ir(i,n,this._params),o=new sr(e);this._tinadituService=r,this._staticService=o;var s=this._getContainer(e.container),a=new Cesium.Geocoder(lr(lr({},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=lr({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];Qr.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;Qr.flyToPositions(i.viewer,a,0,-90,1/i._scaleRatio*.8,e._flightDuration,(function(){e._complete.raiseEvent()}))}}))}else Qr.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}(or);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}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)}}var mr=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://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 rr(i,n,this._params),o=this._getContainer(e.container),s=new Cesium.Geocoder(fr(fr({},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(),Qr.flyToPosition(this.viewer,t,0,-90,1/this._scaleRatio*1500,e._flightDuration,(function(){e._complete.raiseEvent()}))}}]),i}(or);const vr=mr;const dr=Object.freeze({TIANDITU:0,TIANDITU_SHANXI:1,STATIC_PRESET:2});const yr=function(){function e(){n(this,e)}return a(e,null,[{key:"createGeocoder",value:function(e,t){var i=void 0;switch(e){case dr.TIANDITU:i=new cr(t);break;case dr.TIANDITU_SHANXI:i=new vr(t);break;case dr.STATIC_PRESET:i=new sr(t)}return i}}]),e}();var gr=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 _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}function Cr(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}Z(gr,"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 br={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},wr=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=Cr(Cr(Cr({},br),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._scaleRatio=this._options.scaleRatio,new kn(this),this._viewerEvent=new Rn,this._sceneEvent=new Mn(this),this._viewerOption=new $n(this),this._layerContainer=ge.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;po.init(this,u)}this._options.showMapInfo&&new so(this),"chinese"==this._options.language&&new mo(this).toChinese(),this._options.copyRight&&gr.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:"_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 v=Math.abs(Cesium.Math.toRadians(h)),d=v>.001?p/Math.abs(Math.sin(v)):p;Qr.flyToPosition(this,this._options.center,this._options.center.heading||0,h,d,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=Me.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=Me.transformWindowToWGS84(new Cesium.Cartesian2(e/2|0,t-1),this),n=Me.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=Me.transformWindowToWGS84(new Cesium.Cartesian2(0,t),this),n=Me.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(){er.Z.initEnvironment(),this.extendCesium(),window.anovgis_applyfn&&er.Z.install(anovgis_applyfn),window.ANOVCITY&&er.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),yr.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,ke(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=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2.2,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?arguments[5]:void 0;if(e)if(e instanceof Kn&&e.flyTo)e.flyTo(i,n,r,o);else{var s=this._nativeObjCesium.flyTo(e.nativeObjCesium||e,{duration:t,offset:new Cesium.HeadingPitchRange(Cesium.Math.toRadians(i),Cesium.Math.toRadians(n),r)});s&&s.then((function(){o&&o()}))}}},{key:"flyToTileset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-60;if(this._nativeObjCesium){var r=e.nativeObjCesium||e;if(r){var o=this._nativeObjCesium,s=function(e){var r=e.boundingSphere.radius;o.flyTo(e,{duration:t,offset:new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(n),r*i)})};return r.then?r.then(s):r.readyEvent?r.readyEvent.addEventListener(s):void s(r)}}}},{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=xe.parsePosition(e)).alt||0,r=new Oe(e.lng,e.lat,0),o=Me.transformWGS84ToCartesian(r),s=e.heading||0,a=e.pitch||-90;return Qr.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=xe.parsePosition(e);var s=Me.transformWGS84ToCartesian(e);return Qr.flyToPoint(this,s,t,i,n,r,o),this}}},{key:"zoomTo",value:function(e){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(),ge.empty(this.container),this._nativeObjCesium=void 0,this._baseLayerPicker=void 0,this._layerCache={},er.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=ye.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=Me.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=xe.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=Me.transformCartesianToWGS84(n);return r?new Oe(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 Oe(Cesium.Math.toDegrees(a.longitude),Cesium.Math.toDegrees(a.latitude),a.height)}var l=this.camera.positionCartographic;return new Oe(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=xe.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=Me.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=xe.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 Pr=wr;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)}}var Er=Cesium,Tr=Er.BoxGeometry,Ar=Er.Cartesian3,kr=Er.defined,xr=Er.DeveloperError,Rr=Er.GeometryPipeline,Sr=Er.Matrix3,Mr=Er.Matrix4,jr=Er.Transforms,Lr=Er.VertexFormat,Ir=Er.BufferUsage,Dr=Er.CubeMap,Br=Er.loadCubeMap,Hr=Er.RenderState,Gr=Er.VertexArray,Nr=Er.BlendingState,Fr=Er.SceneMode,Wr=Er.ShaderProgram,Ur=Er.ShaderSource,zr=Er.SkyBox,Vr=function(e){c(i,e);var t=Or(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===Fr.SCENE3D||e.mode===Fr.MORPHING)&&e.passes.render){var n=e.context;if(this._sources!==this.sources){this._sources=this.sources;var o=this.sources;if(!(kr(o.positiveX)&&kr(o.negativeX)&&kr(o.positiveY)&&kr(o.negativeY)&&kr(o.positiveZ)&&kr(o.negativeZ)))throw new xr("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 xr("this.sources properties must all be the same type.");"string"==typeof o.positiveX?Br(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 Dr({context:n,source:o}))}var s=this._command;if(s.modelMatrix=jr.eastNorthUpToFixedFrame(e.camera.positionWC),0!==this.offsetAngle&&Mr.multiply(s.modelMatrix,Mr.fromRotationTranslation(Sr.fromRotationZ(this.offsetAngle/180*Math.PI)),s.modelMatrix),!kr(s.vertexArray)){s.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return Mr.getMatrix3(s.modelMatrix,new Sr)}};var a=Tr.createGeometry(Tr.fromDimensions({dimensions:new Ar(2,2,2),vertexFormat:Lr.POSITION_ONLY})),l=this._attributeLocations=Rr.createAttributeLocations(a);s.vertexArray=Gr.fromGeometry({context:n,geometry:a,attributeLocations:l,bufferUsage:Ir._DRAW}),s.renderState=Hr.fromCache({blending:Nr.ALPHA_BLEND})}if(!kr(s.shaderProgram)||this._useHdr!==t){var u=new Ur({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=Wr.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(kr(this._cubeMap))return s}}}]),i}(zr);const qr=Vr;function Zr(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 Yr=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?Zr(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Zr(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=xe.parsePosition(i);var c=Me.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=xe.parsePositions(t),l=Me.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 Kn&&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 Qr=Yr;var Kr=i(545);function Xr(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 Jr(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 $r(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 eo(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 eo(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 eo(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 to=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=$r(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=$r(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=$r(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=$r(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=Xr((0,Kr.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)})),Jr(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 io=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 no=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 ro=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=Me.transformCartesianArrayToWGS84Array(e),a=Me.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){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=ge.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=ge.create("span","level-bar",i),this._level.style.marginRight="15px";new Cesium.ScreenSpaceEventHandler(t.scene.canvas);var v=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+"°"};v(),t.camera.changed.addEventListener((function(){v()})),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 so=oo;const ao=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="",Qr.flyToPosition(i,[t,n],0,-90,3e3,2,null)}}));function lo(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 uo(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):lo(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var co=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=uo(uo({},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})),v=new c({context:e,colorTextures:[m],destroyAttachments:!1}),d=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:v,renderState:d,uniformMap:n.uniformMap}).execute(e);return e.createViewportQuadCommand(n.mainFS,{framebuffer:v,renderState:d,uniformMap:n.uniformMap}).execute(e),v.destroy(),t.destroy(),m}}]),e}();const ho=co;var fo=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=Ao.createTdtImageryLayer({style:"img",key:i}),a=Ao.createTdtImageryLayer({key:i}),l=Ao.createTdtImageryLayer({key:i});l.nameC="tiandituDianzi_Dark";var u=Ao.createArcGisImageryLayer({style:"dark"}),c=new Cesium.MapboxStyleImageryProvider({styleId:"dark-v11",accessToken:"pk.eyJ1Ijoib2xkZG9nc2QiLCJhIjoiY2x4eDgxNGd3MWhwMjJrc2Q2djRjamU1NyJ9.QPCS0n3ss-WuQ7qcXe_Y-w"}),h=Ao.createAmapImageryLayer({style:"cva",crs:"WGS84"});h.nameC="gaode";var f=Ao.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]}}),v=new Cesium.ProviderViewModel({name:"天地图-电子地图",iconUrl:Cesium.buildModuleUrl("static/images/tdt_vec.png"),tooltip:"天地图-电子地图",creationFunction:function(){return[a,f]}}),d=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(v),o.push(d),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 ho);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(fo,"preID",1),Z(fo,"goadeDarkShader",""),Z(fo,"imageryThemeGL",null);const po=fo;const mo=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 vo=function(){function e(){n(this,e)}return a(e,null,[{key:"showAllControls",value:function(e){}},{key:"showMapInfo",value:function(e){new so(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未开启,无法显示该控件!"),po.init(e,t,i,n)}},{key:"toChinese",value:function(e){var t=new mo(e);t&&t.toChinese()}}]),e}();var yo={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 go=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 _o(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 Co=function(e){c(i,e);var t=_o(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Kn.getLayerType("vector")}},{key:"clear",value:function(){return this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=me.CLEARED,this}}]),i}(Kn);Kn.registerType("vector");const bo=Co;function wo(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 Po=function(e){c(o,e);var t,i,r=wo(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=me.INITIALIZED,t}return a(o,[{key:"type",get:function(){return Kn.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 _i.fromEntity(e)}},{key:"_createPoint",value:function(e){if(e.position&&e.point)return $i.fromEntity(e)}},{key:"_createLabel",value:function(e){if(e.position&&e.label)return Vi.fromEntity(e)}},{key:"_createPolyline",value:function(e){if(e.polyline)return ln.fromEntity(e)}},{key:"_createPolygon",value:function(e){if(e.polygon)return rn.fromEntity(e)}},{key:"_createModel",value:function(e,t){if(e)return at.fromEntity(e,t)}},{key:"eachGraphic",value:(i=z(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=z(q().mark((function e(){var t,i=this;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new bo(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}(Kn);Kn.registerType("geojson");const Oo=Po,Eo={bindPopup_highlight_tooltip:(To=z(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 Ie(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 Dn,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=z(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=no.imageryLayerFeatureInfo2Geojson(n.feature),o=new Oo(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 To.apply(this,arguments)})};var To;const Ao=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 S(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 G(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 W(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createUrlTemplateImageryLayer",value:function(){return new W(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 Eo.bindPopup_highlight_tooltip(i,t),i}}]),e}();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 xo={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"};const Ro=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 xo.NONE:i=this.createEllipsoidTerrain(t);break;case xo.XYZ:i=this.createUrlTerrain(t);break;case xo.GOOGLE:i=this.createGoogleTerrain(t);break;case xo.ARCGIS:i=this.createArcgisTerrain(t);break;case xo.VR:i=this.createVRTerrain(t)}return i}}]),e}();function So(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 Mo(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?So(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):So(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return 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={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},Io=function(e){c(i,e);var t=jo(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=Mo(Mo({},Lo),r),e._nativeObjCesium.clustering.enabled=!0,e._nativeObjCesium.clustering.clusterEvent.addEventListener(e._clusterEventHandler,h(e)),e._nativeObjCesium.clustering.pixelRange=e._options.pixelRange,e._state=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Kn.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=me.CLEARED,this}}]),i}(Kn);Kn.registerType("cluster");const Do=Io;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 Ho=function(e){c(i,e);var t=Bo(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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Kn.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}(Kn);Kn.registerType("czml");const Go=Ho;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 Fo=function(e){c(i,e);var t=No(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Kn.getLayerType("dynamic")}},{key:"clear",value:function(){return this._nativeObjCesium.entities&&this._nativeObjCesium.entities.removeAll(),this._cache={},this._state=me.CLEARED,this}}]),i}(Kn);Kn.registerType("dynamic");const Wo=Fo;function Uo(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 zo(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Uo(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Uo(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Vo(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 qo={name:"",count:10,maximumLevel:21,dataProperty:"",callback:function(){return null}},Zo=function(e){c(i,e);var t=Vo(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=zo(zo({},qo),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 bo(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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Kn.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=me.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=me.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=me.CLEARED}}]),i}(Kn);Kn.registerType("feature_grid");const Yo=Zo;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 Ko=function(e){c(i,e);var t=Qo(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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Kn.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}(Kn);Kn.registerType("gpx");const Xo=Ko;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 $o=function(e){c(i,e);var t=Jo(i);function i(){var e;return n(this,i),(e=t.call(this))._nativeObjCesium=new Cesium.PrimitiveCollection,e._isGround=!0,e._state=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Kn.getLayerType("ground_primitive")}},{key:"clear",value:function(){return this._nativeObjCesium&&this._nativeObjCesium.removeAll(),this._cache={},this._state=me.CLEARED,this}}]),i}(Kn);Kn.registerType("ground_primitive");const es=$o;function ts(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=ts(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=ge.create("div","html-layer",void 0),r._nativeObjCesium.setAttribute("id",r.businessID),r._renderRemoveCallback=void 0,r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Kn.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;t._viewer.camera.direction;t._viewer.scene.mode!=Cesium.SceneMode.SCENE3D&&(n=Me.transformCartographicToCartesian(t._viewer.camera.positionCartographic)),t.eachGraphic((function(t){if(t&&t.position){var r=Me.transformWGS84ToCartesian(t.position),o=(i.globe.ellipsoid.geodeticSurfaceNormal(r,new Cesium.Cartesian3),i.cartesianToCanvasCoordinates(r,new Cesium.Cartesian2));t._updateStyle(o,Cesium.Cartesian3.distance(r,n),!0,e)}}),t)}),this),this._state=me.ADDED}},{key:"_onRemove",value:function(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._nativeObjCesium),this._state=me.REMOVED}},{key:"clear",value:function(){for(;this._nativeObjCesium.hasChildNodes();)this._nativeObjCesium.removeChild(this._nativeObjCesium.firstChild);return this._cache={},this._state=me.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=Me.transformWGS84ToCartesian(t.position);s.push(i)}})),s.length>0&&Qr.flyToPoints(this._viewer,s,t,i,n,r,o)}}]),i}(Kn);Kn.registerType("html");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(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=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Kn.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}(Kn);Kn.registerType("kml");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))._dataSource=Cesium.GeoJsonDataSource.load(e.url),r._nativeObjCesium=new Cesium.CustomDataSource(r.businessID),r._initLabel(),r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Kn.getLayerType("label")}},{key:"_createLabel",value:function(e){if(e.position&&e.name)return Vi.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}(Kn);Kn.registerType("label");const us=ls;function cs(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=cs(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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Kn.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=me.CLEARED,this}}]),i}(Kn);Kn.registerType("primitive");const fs=hs;function ps(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=ps(i);function i(e){var r;return n(this,i),(r=t.call(this,e))._nativeObjCesium=new Cesium.PrimitiveCollection,r._state=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Kn.getLayerType("tileset")}},{key:"clear",value:function(){return this._nativeObjCesium.removeAll(),this._cache={},this._state=me.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}(Kn);Kn.registerType("tileset");const vs=ms;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 ys=function(e){c(i,e);var t=ds(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=me.INITIALIZED,r}return a(i,[{key:"type",get:function(){return Kn.getLayerType("topojson")}}]),i}(Oo);Oo.registerType("topojson");const gs=ys;var _s=i(852),Cs=i.n(_s),bs=i(529),ws=i.n(bs),Ps=i(885),Os=i.n(Ps),Es=i(139),Ts=i.n(Es),As=i(450),ks=i.n(As),xs=i(162),Rs=i.n(xs),Ss=i(750),Ms=i.n(Ss),js=i(601),Ls=i.n(js),Is=i(454),Ds=i.n(Is),Bs=i(253),Hs=i.n(Bs);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:Ds()},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:Ls()},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:Cs()},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:ws()},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:Ts()},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:Os()},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:ks()},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:Rs()},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:Ms()},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:Hs()},translucent:function(e){return!0}});var Gs=i(724),Ns=i.n(Gs),Fs=i(719),Ws=i.n(Fs),Us=i(433),zs=i.n(Us);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:Ns()},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:Ns()},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:Ws()},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:zs()},translucent:function(e){return!0}});var Vs=i(586),qs=i.n(Vs);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:qs()},translucent:function(e){return!0}});var Zs=i(486),Ys=i.n(Zs),Qs=i(671),Ks=i.n(Qs);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:Ys()},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:Ks()},translucent:function(e){return!0}});const Xs=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 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 $s=function(e){c(i,e);var t=Js(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}(Xs);Object.defineProperties($s.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),image:Cesium.createPropertyDescriptor("image")});const ea=$s;function ta(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 ia=function(e){c(i,e);var t=ta(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}(Xs);Object.defineProperties(ia.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const na=ia;function ra(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 oa=function(e){c(i,e);var t=ra(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}(Xs);Object.defineProperties(oa.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),image:Cesium.createPropertyDescriptor("image"),repeat:Cesium.createPropertyDescriptor("repeat")});const sa=oa;function aa(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 la=function(e){c(i,e);var t=aa(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}(Xs);Object.defineProperties(la.prototype,{color:Cesium.createPropertyDescriptor("color"),image:Cesium.createPropertyDescriptor("image")});const ua=la;function ca(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 ha=Cesium.Color.WHITE,fa=function(e){c(i,e);var t=ca(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,ha,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}(Xs);Object.defineProperties(fa.prototype,{color:Cesium.createPropertyDescriptor("color"),glowPower:Cesium.createPropertyDescriptor("glowPower"),taperPower:Cesium.createPropertyDescriptor("taperPower")});const pa=fa;function ma(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 va=function(e){c(i,e);var t=ma(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}(Xs);Object.defineProperties(va.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration")});const da=va;function ya(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 ga=function(e){c(i,e);var t=ya(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}(Xs);Object.defineProperties(ga.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),percent:Cesium.createPropertyDescriptor("percent"),gradient:Cesium.createPropertyDescriptor("gradient")});const _a=ga;function Ca(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 ba=function(e){c(i,e);var t=Ca(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}(Xs);Object.defineProperties(ba.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),percent:Cesium.createPropertyDescriptor("percent"),gradient:Cesium.createPropertyDescriptor("gradient")});const wa=ba;function Pa(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 Oa=function(e){c(i,e);var t=Pa(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}(Xs);Object.defineProperties(Oa.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const Ea=Oa;function Ta(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 Aa=Cesium.Color.WHITE,ka=Cesium.Color.fromCssColorString("#0aed8b"),xa=function(e){c(i,e);var t=Ta(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,Aa,t.color1),t.color2=Cesium.Property.getValueOrDefault(this._color2,e,ka,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}(Xs);Object.defineProperties(xa.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 Ra=xa;function Sa(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 Ma=function(e){c(i,e);var t=Sa(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}(Xs);Object.defineProperties(Ma.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const ja=Ma;function La(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 Ia=function(e){c(i,e);var t=La(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}(Xs);Object.defineProperties(Ia.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed")});const Da=Ia;var Ba=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(Ba.prototype,{baseWaterColor:Cesium.createPropertyDescriptor("baseWaterColor"),blendColor:Cesium.createPropertyDescriptor("blendColor"),specularMap:Cesium.createPropertyDescriptor("specularMap"),normalMap:Cesium.createPropertyDescriptor("normalMap")});const Ha=Ba;function Ga(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=function(e){c(i,e);var t=Ga(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}(Xs);Object.defineProperties(Na.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness")});const Fa=Na;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=function(e){c(i,e);var t=Wa(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}(Xs);Object.defineProperties(Ua.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration"),count:Cesium.createPropertyDescriptor("count")});const za=Ua;function Va(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 qa=function(e){c(i,e);var t=Va(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}(Xs);Object.defineProperties(qa.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness"),speed:Cesium.createPropertyDescriptor("speed"),rep:Cesium.createPropertyDescriptor("rep")});const Za=qa;function Ya(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 Qa=function(e){c(i,e);var t=Ya(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}(Xs);Object.defineProperties(Qa.prototype,{color:Cesium.createPropertyDescriptor("color"),brightness:Cesium.createPropertyDescriptor("brightness")});const Ka=Qa;function Xa(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 Ja=function(e){c(i,e);var t=Xa(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}(Xs);Object.defineProperties(Ja.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),copy:Cesium.createPropertyDescriptor("copy")});const $a=Ja;function el(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 tl=function(e){c(i,Cesium.PolylineCollection);var t=el(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 il(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)||Ae(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.")}()}function nl(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 rl(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 rl(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 rl(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 ol="measure-close-btn",sl="__measCloseBtnCssInjected";const al=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[sl]&&document&&"function"==typeof document.createElement){var e="\n .".concat(ol," {\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: 999;\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(ol,":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[sl]=!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=ge.create("div",ol,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=nl(this._items);try{for(i.s();!(t=i.n()).done;){var n=il(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+8+"px",o.btn.style.top=s.y-24+"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 ll(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 ul(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 ul(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 ul(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 cl=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=fe.createPointLabel(this.viewer,new Cesium.Cartesian3(0,0,0),"",fe.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 al(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:"_registerEntity",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"entities";this._currentSessionId&&this._sessions[this._currentSessionId]&&this._sessions[this._currentSessionId][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=ll(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=ll(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=ll(t.labels);try{for(u.s();!(l=u.n()).done;){var c=l.value;try{this.viewer.entities.remove(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=ge.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){ge.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 tl,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 fe.drawEntityNames()[e.name]}));return e.push.apply(e,ke(t)),e}}]),e}();function hl(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 fl=function(e){c(i,e);var t=hl(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,fe.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=fe.pickPosition(n,s,e._getObjectsToExclude());if(a){var l=fe.getPointLableString(a),u=fe.createPointLabel(n,a,l,fe.drawEntityNames().drawPoint,e.pointParas);o._pointLabels.push(u),o._registerEntity(u,"labels"),o._tempPoint.show=!1,o._showFloatingCloseBtn(t,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=fe.pickPosition(n,s,e._getObjectsToExclude());if(t)if(o._tempPoint.show=!0,o._tempPoint.point.show=!0,o.justDraw)fe.setPointPosition(o._tempPoint,t);else{var i=fe.getPointLableString(t);fe.setPointLabel(o._tempPoint,t,i)}else o._tempPoint.show=!1,o._tempPoint.point.show=!1}})))}}]),i}(cl);function pl(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 ml=function(e){c(i,e);var t=pl(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,fe.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=fe.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)fe.setPointPosition(e._tempPoint,o);else{var t=fe.getPointLableString(o);fe.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:fe.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:fe.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=fe.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=fe.createPointLabel(this.viewer,i.center,t,fe.drawEntityNames().drawpolygon),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):fe.setPointLabel(this._totalLengthPointLabel,i.center,t)}}]),i}(cl);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)}}const dl=function(e){c(i,e);var t=vl(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,fe.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=fe.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)fe.setPointPosition(a._tempPoint,r);else{var t=fe.getPointLableString(r);fe.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:fe.drawEntityNames().drawpolylinepoint,position:r,point:{pixelSize:e.pointSize,color:e.pointColor,outlineColor:e.outlineColor,outlineWidth:e.outlineWidth,disableDepthTestDistance:1e9}});e._registerEntity(s)}}),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:fe.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;fe.createPointLabelsCallback(e,(function(e,i,n,r){void 0===t._pointLabels_son[e]?(t._pointLabels_son[e]=fe.createPointLabel(t.viewer,n,r),t._pointLabels_son[e].point.show=!1,t._registerEntity(t._pointLabels_son[e],"labels")):fe.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=fe.createPointLabel(this.viewer,t,"起点"),this._startPointLabel.point.show=!1,this._registerEntity(this._startPointLabel,"labels")):fe.setPointLabel(this._startPointLabel,t,"起点")}}},{key:"showTotalLength",value:function(e){var t=fe.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=fe.createPointLabel(this.viewer,n,i),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):fe.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}(cl);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)}}const gl=function(e){c(i,e);var t=yl(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,fe.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=fe.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:fe.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=fe.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:fe.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=fe.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=fe.createPointLabel(this.viewer,s.center,o,fe.drawEntityNames().drawRec),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):fe.setPointLabel(this._totalLengthPointLabel,s.center,o)}}]),i}(cl);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 Cl=function(e){c(i,e);var t=_l(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,fe.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=fe.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)fe.setPointPosition(e._tempPoint,o);else{var t=fe.getPointLableString(o);fe.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:fe.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=fe.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=fe.createPointLabel(this.viewer,i.center,t,fe.drawEntityNames().drawpolygon),this._totalLengthPointLabel.point.show=!1,this._registerEntity(this._totalLengthPointLabel,"labels")):fe.setPointLabel(this._totalLengthPointLabel,i.center,t)}}]),i}(cl);var bl=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}(),wl=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},Pl="attribute vec4 position;\nvarying vec2 texcoord;\nvoid main(){\n texcoord = position.xy*0.5+0.5;\n gl_Position = position;\n}",Ol="#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]),wl.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,v,d;if(l=e.createProgram(),v=e.createShader(e.VERTEX_SHADER),e.attachShader(l,v),e.shaderSource(v,"attribute vec2 position;\nvoid main(){\n gl_Position = vec4(position, 0.0, 1.0);\n}"),e.compileShader(v),!e.getShaderParameter(v,e.COMPILE_STATUS))throw e.getShaderInfoLog(v);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(v),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),d=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,d,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],wl.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,v,d,y,g,_,C,b,w,P,O,E,T,A;for(null==e.prefer&&(e.prefer=["half"]),null==e.require&&(e.require=[]),null==e.throws&&(e.throws=!0),v=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!==v,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!=(E=null!=s?s.HALF_FLOAT_OES:void 0)?E: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],d=!0,g=0,b=(T=e.require).length;g<b;g++)!1===t[a=T[g]]&&(d=!1);d&&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 El=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}(),Tl=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}(),Al=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}(),kl=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 Al(this.gl,{type:n.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new Tl(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}(),xl=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 El(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 El(this.gl,{vertex:Pl,fragment:Ol+"uniform float low, high;\nvoid main(){\n gl_FragColor = vec4(clamp(texture2D(source, texcoord).rgb, low, high), 1.0);\n}"}),this.multiplyShader=new El(this.gl,{vertex:Pl,fragment:Ol+"uniform float value;\nvoid main(){\n gl_FragColor = vec4(texture2D(source, texcoord).rgb*value, 1.0);\n}"}),this.blurShader=new El(this.gl,{vertex:Pl,fragment:Ol+"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 kl(this.gl,this.width,this.height),this.nodeFront=new kl(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}(),Rl=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 Al(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 El(this.gl,{vertex:Pl,fragment:Ol+"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 xl(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 Sl(e){return new Rl(e)}function Ml(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 jl(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ml(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ml(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}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=new Cesium.WebMercatorProjection,Dl={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},Bl=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))._options=jl(jl({},Dl),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=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Kn.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=Sl({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=Il.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=Il.project(Cesium.Rectangle.southwest(this._bounds)),t=Il.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=Sl({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=me.CLEARED,this}}]),i}(Kn);Kn.registerType("heat-map");const Hl=Bl;var Gl={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 Fl(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}},Nl=new Cesium.WebMercatorProjection;function Fl(e,t,i){if(!t)return null;i||(i={}),this._cesium=e,this._options=i,this._id=Gl._getID(),this._options.gradient=this._options.gradient?this._options.gradient:Gl.defaults.gradient,this._options.maxOpacity=this._options.maxOpacity?this._options.maxOpacity:Gl.defaults.maxOpacity,this._options.minOpacity=this._options.minOpacity?this._options.minOpacity:Gl.defaults.minOpacity,this._options.blur=this._options.blur?this._options.blur:Gl.defaults.blur,this._options.backgroundColor=this._options.backgroundColor?this._options.backgroundColor:Gl.defaults.backgroundColor,this._mbounds=Gl.wgs84ToMercatorBB(t),this._setWidthAndHeight(this._mbounds),this._options.radius=Math.round(this._options.radius?this._options.radius:this.width>this.height?this.width/Gl.defaults.radiusFactor:this.height/Gl.defaults.radiusFactor),this._spacing=this._options.radius*Gl.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=Gl.mercatorToWgs84BB(this._mbounds),this._rectangle=Cesium.Rectangle.fromDegrees(this.bounds.west,this.bounds.south,this.bounds.east,this.bounds.north),this._container=Gl._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}Gl.wgs84ToMercator=function(e){var t=Nl.project(Cesium.Cartographic.fromDegrees(e.x,e.y));return{x:t.x,y:t.y}},Gl.wgs84ToMercatorBB=function(e){var t=Nl.project(Cesium.Cartographic.fromDegrees(e.west,e.south)),i=Nl.project(Cesium.Cartographic.fromDegrees(e.east,e.north));return{north:i.y,east:i.x,south:t.y,west:t.x}},Gl.mercatorToWgs84=function(e){var t=Nl.unproject(new Cesium.Cartesian3(e.x,e.y));return{x:t.longitude,y:t.latitude}},Gl.mercatorToWgs84BB=function(e){var t=Nl.unproject(new Cesium.Cartesian3(e.west,e.south)),i=Nl.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)}},Gl.deg2rad=function(e){return e*(Math.PI/180)},Gl.rad2deg=function(e){return e/(Math.PI/180)},Fl.prototype.wgs84PointToHeatmapPoint=function(e){return this.mercatorPointToHeatmapPoint(Gl.wgs84ToMercator(e))},Fl.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},Fl.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>Gl.defaults.maxCanvasSize?(this._factor=this.width/Gl.defaults.maxCanvasSize,this.height/this._factor<Gl.defaults.minCanvasSize&&(this._factor=this.height/Gl.defaults.minCanvasSize)):this.height>this.width&&this.height>Gl.defaults.maxCanvasSize?(this._factor=this.height/Gl.defaults.maxCanvasSize,this.width/this._factor<Gl.defaults.minCanvasSize&&(this._factor=this.width/Gl.defaults.minCanvasSize)):this.width<this.height&&this.width<Gl.defaults.minCanvasSize?(this._factor=this.width/Gl.defaults.minCanvasSize,this.height/this._factor>Gl.defaults.maxCanvasSize&&(this._factor=this.height/Gl.defaults.maxCanvasSize)):this.height<this.width&&this.height<Gl.defaults.minCanvasSize&&(this._factor=this.height/Gl.defaults.minCanvasSize,this.width/this._factor>Gl.defaults.maxCanvasSize&&(this._factor=this.width/Gl.defaults.maxCanvasSize)),this.width=this.width/this._factor,this.height=this.height/this._factor},Fl.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)},Fl.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},Fl.prototype.show=function(e){(this._oldEntity||this._newEntity)&&(this._oldEntity.show=e,this._newEntity.show=e)},Fl.prototype.updateLayer=function(){var e=this;Gl.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(Gl._getImageryProvider(this)))};const Wl=Gl;const Ul={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",FRONT:"front",BACK:"back",NONE:"none"};function zl(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 Vl(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?zl(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):zl(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var ql={edgeWidth:0,edgeColor:Cesium.Color.WHITE,unionClippingRegions:!1};function Zl(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 Yl(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Zl(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Zl(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}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 Kl={lerpInterval:50,bottomImage:"",sideImage:""},Xl=function(e){c(i,e);var t=Ql(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(r=t.call(this,Yl(Yl({},Kl),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 Me.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=Me.transformWGS84ToCartographic(this._positions[r]),a=Me.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(Me.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=Vl(Vl({},ql),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=xe.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?me.ENABLED:me.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 Ul.UP:t=new Cesium.Cartesian3(0,0,1);break;case Ul.DOWN:t=new Cesium.Cartesian3(0,0,-1);break;case Ul.LEFT:t=new Cesium.Cartesian3(-1,0,0);break;case Ul.RIGHT:t=new Cesium.Cartesian3(1,0,0);break;case Ul.FRONT:t=new Cesium.Cartesian3(0,-1,0);break;case Ul.BACK:t=new Cesium.Cartesian3(0,1,0)}return t}},{key:"_isCcw",value:function(e){if(!e||e.length<3)return!1;var t=Me.transformWGS84ToCartesian(this._positions[0]),i=Me.transformWGS84ToCartesian(this._positions[1]),n=Me.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=Me.transformWGS84ToCartesian(this._positions[n]),s=Me.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,Me.transformWGS84ToCartesian(this._positions[0]),new Cesium.Cartesian3),o=Cesium.Matrix4.multiplyByPoint(i,Me.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,Me.transformWGS84ToCartesian(this._positions[h]),new Cesium.Cartesian3),m=Cesium.Matrix4.multiplyByPoint(i,Me.transformWGS84ToCartesian(this._positions[f]),new Cesium.Cartesian3),v=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(v,this._distance||0))}}else if(this._direction&&this._direction!==ClippingDirection_default.NONE){var d=this._getDirectionNoraml(this._direction);if(this._angle){var y=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(this._angle));Cesium.Matrix3.multiplyByVector(y,d,d)}d&&t.push(new Cesium.ClippingPlane(d,this._distance||0))}return t}}]),e}());const Jl=Xl;const $l=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 eu=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 $l(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 $l(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 tu=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 iu(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 nu(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?iu(Object(i),!0).forEach((function(t){Z(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):iu(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}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={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:.04,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},su=function(e){c(i,e);var t=ru(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=nu(nu({},ou),r),e._data=void 0,e._canvas=document.createElement("canvas"),e._state=me.INITIALIZED,e}return a(i,[{key:"type",get:function(){return Kn.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 eu({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 tu(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=nu(nu({},this._options),t),this._nativeObjCesium.setOptions(this._options)),this._nativeObjCesium.prerender(),this._nativeObjCesium.render()),this}},{key:"setOptions",value:function(e){return this._options=nu(nu({},this._options),e),this._nativeObjCesium&&(this._nativeObjCesium.setOptions(this._options),this._nativeObjCesium.prerender(),this._nativeObjCesium.render()),this}}]),i}(Kn);Kn.registerType("wind");const au=su;var lu=Cesium,uu=lu.Cartesian3,cu=lu.Primitive,hu=lu.Material,fu=lu.Geometry,pu=lu.MaterialAppearance,mu=lu.GeometryAttribute,vu=lu.ComponentDatatype,du=lu.PrimitiveType,yu=lu.BoundingSphere,gu=lu.VertexFormat,_u=lu.GeometryAttributes,Cu=lu.Check,bu=new gu,wu=new uu,Pu=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:gu.DEFAULT;this._vertexFormat=r}return a(e,null,[{key:"pack",value:function(e,t,i){var n;return Cu.typeOf.object("value",e),Cu.defined("array",t),i=null!==(n=i)&&void 0!==n?n:0,gu.pack(e._vertexFormat,t,i),i+=gu.packedLength,uu.pack(e._normal,t,i),i+=uu.packedLength,t[i++]=e._radius,t}},{key:"unpack",value:function(e,t,i){var n;Cu.defined("array",e),t=null!==(n=t)&&void 0!==n?n:0;var r=gu.unpack(e,t,bu);t+=gu.packedLength;var o=uu.unpack(e,t,wu),s=e[t+=uu.packedLength];return defined(i)?(i._vertexFormat=gu.clone(r,i._vertexFormat),i._normal=uu.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;uu.equals(e._normal,uu.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 uu(a,-(i+n)/2+l,(i+n)/2+u),o=[1,0,0,1,0,0,1,0,0,1,0,0]):uu.equals(e._normal,uu.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 uu((i+n)/2+a,l,(i+n)/2+u),o=[0,1,0,0,1,0,0,1,0,0,1,0]):uu.equals(e._normal,uu.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 uu((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(ke(r));var c=new Float32Array([0,0,1,0,1,1,0,1]),h=new Uint16Array([0,1,2,2,3,0]);return new fu({attributes:new _u({position:new mu({componentDatatype:vu.DOUBLE,componentsPerAttribute:3,values:r}),normal:new mu({componentDatatype:vu.FLOAT,componentsPerAttribute:3,values:o}),st:new mu({componentDatatype:vu.FLOAT,componentsPerAttribute:2,values:c})}),indices:h,primitiveType:du.TRIANGLES,boundingSphere:new yu(t,(i+n)/2)})}}]),e}();Z(Pu,"packedLength",gu.packedLength+uu.packedLength+1);const Ou=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 Pu({normal:this._normal,radius:i,vertexFormat:gu.DEFAULT,center:this._center}),o=new Cesium.GeometryInstance({geometry:Pu.createGeometry(r)}),s=new cu({asynchronous:!1,geometryInstances:o,modelMatrix:this._modelMatrix,appearance:new pu({material:hu.fromType("Color",{color:this._color})})});return s.isAxisPlane=!0,s.normal=this._normal,s.axis=t.axis,s.color=this._color,s}));function Eu(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 Tu(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 Tu(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 Tu(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 Au=Cesium,ku=Au.PrimitiveCollection,xu=Au.PolylineCollection,Ru=Au.Material,Su=Au.Color,Mu=Au.Cartesian3,ju=Au.Cartesian2,Lu=Au.Matrix4,Iu=Au.Matrix3,Du=Au.Quaternion,Bu=Au.PointPrimitiveCollection,Hu=Au.ScreenSpaceEventHandler,Gu=Au.ScreenSpaceEventType,Nu=Au.Polyline,Fu=Au.Primitive,Wu=Au.Math,Uu=Au.Plane,zu=Au.Model,Vu=Au.IntersectionTests,qu=Au.Transforms,Zu=Au.PointPrimitive,Yu=Au.Event,Qu=new Mu,Ku=new Du,Xu=new Iu,Ju=new Mu,$u=(new Mu,new Lu),ec=new Lu;function tc(e,t){e instanceof Nu?e.material.uniforms.color=t:e instanceof Fu?e.appearance.material.uniforms.color=t:e instanceof Zu&&(e.color=t)}function ic(e,t){var i=new Mu,n=viewer.camera.getPickRay(e),r=new Uu(Mu.UNIT_X,0);return Uu.fromPointNormal(t.center,t.activePrimitive.normal,r),Uu.transform(r,t._modelMatrix,r),Vu.rayPlane(n,r,i),Lu.multiplyByPoint(t._inverseModelMatrix,i,i),i}var nc=new ju,rc=new ju;function oc(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=Eu(r);try{for(u.s();!(o=u.n()).done;){var c=o.value,h=c.positions.map((function(t){return Lu.multiplyByPoint(e._modelMatrix,t,new Mu)})).map((function(t){return ANOVGIS.Transform.transformCartesian3ToWindow(t,e._viewer)})),f=(s=ju.subtract.apply(ju,ke(h).concat([nc])),a=ju.subtract(i,t,rc),ju.normalize(s,s),ju.dot(s,a));n[c.axis.toLowerCase()]=f*l}}catch(e){u.e(e)}finally{u.f()}return n}}var sc="None",ac="T",lc="R",uc="S",cc=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:Su.RED,this.yAxisColor=null!==(r=m.yAxisColor)&&void 0!==r?r:Su.GREEN,this.zAxisColor=null!==(o=m.zAxisColor)&&void 0!==o?o:Su.BLUE,this.scaleAxisColor=null!==(s=m.scaleAxisColor)&&void 0!==s?s:Su.WHITE,this.activeAxisColor=null!==(a=m.activeAxisColor)&&void 0!==a?a:Su.YELLOW,this.originColor=null!==(l=m.originColor)&&void 0!==l?l:Su.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 ku,this.object=null,this._modelMatrix=void 0,this._primitives=[],this._center=new Mu,this._radius=0,this._originOffset=null!==(p=m.originOffset)&&void 0!==p?p:new Mu,this._selectedPrimitives=[],this._offset=new Mu(0,0,0),this._angle=0,this.rotatePlaneRadius=m.rotatePlaneRadius,this._mode=sc,this.preTranformEvent=new Yu,this.postTransformEvent=new Yu,this.postRoatationEvent=new Yu,this.postScaleEvent=new Yu}return a(e,[{key:"translateEnabled",get:function(){return this._translateEnabled},set:function(e){this._translateEnabled=e;var t,i=Eu(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(lc)||r.includes(uc)||(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=Eu(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(lc)&&(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=Eu(this._primitives);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.axis;r&&(r.includes(uc)&&(n.show=e))}}catch(e){i.e(e)}finally{i.f()}}},{key:"center",get:function(){return Mu.add(this._center,this._originOffset,new Mu)}},{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=Lu.inverse(e,new Lu)}},{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 Mu((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 Mu,Mu.subtract(s[1],s[0],this.xNormal),Mu.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 Mu(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 Mu,Mu.subtract(s[1],s[0],this.yNormal),Mu.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 Mu(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 Mu,Mu.subtract(s[1],s[0],this.zNormal),Mu.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 Ou({color:this.zAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Mu(0,0,1),axis:"XY"})),this.XOYPlane.relativeAxis=[this.xAxis,this.yAxis],this.XOZPlane=this.root.add(new Ou({color:this.yAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Mu(0,1,0),axis:"XZ"})),this.XOZPlane.relativeAxis=[this.xAxis,this.zAxis],this.YOZPlane=this.root.add(new Ou({color:this.xAxisColor,modelMatrix:this.modelMatrix,center:this.center,radius:this._radius,normal:new Mu(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 Bu({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 Ru(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{fabric:{type:"dasharrow",source:"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",uniforms:{color:e,gapColor:Su.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 Mu(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 Mu(0,0,1),e.splice(0);for(var o=0;o<=360;o++){var s=o/180*Math.PI;e.push(new Mu(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 Mu(0,1,0),e.splice(0);for(var a=0;a<=360;a++){var l=a/180*Math.PI;e.push(new Mu(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 Mu(-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 Mu(1,1,1);this.xNormal&&this.yNormal&&this.zNormal&&(Mu.add(this.xNormal,this.yNormal,i),Mu.add(i,this.zNormal,i)),Mu.normalize(i,i);var n=null!==(e=this.scaleAxisLength)&&void 0!==e?e:t,r=new Mu;Mu.multiplyByScalar(i,n,r),Mu.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 zu!=!1){this.modelMatrix=e.modelMatrix;var i=function(){Lu.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 Mu==!1)throw new Error("position is invalid");this._hasBindObject=!0,this.modelMatrix=qu.eastNorthUpToFixedFrame(e),this._center=new Mu,Mu.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 xu({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 Hu(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 Mu,e._angle=0,i.setInputAction((function(t){var i=t.startPosition,n=t.endPosition;e.transform(i,n)}),Gu.MOUSE_MOVE),t.scene.screenSpaceCameraController.enableRotate=!1)}}),Gu.LEFT_DOWN),i.setInputAction((function(n){e._hasBindObject&&(e.active(null),i.removeInputAction(Gu.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=[]))}),Gu.LEFT_UP),this._removeEventListener=function(){i.removeInputAction(Gu.LEFT_DOWN),i.removeInputAction(Gu.LEFT_UP),i.removeInputAction(Gu.MOUSE_MOVE)}}},{key:"active",value:function(e){if(e||this.activePrimitive){if(!e&&this.activePrimitive){if(tc(this.activePrimitive,this.activePrimitive.pcolor||this.activePrimitive.color),this.activePrimitive.isAxisPlane){var t,i=Eu(this.activePrimitive.relativeAxis);try{for(i.s();!(t=i.n()).done;){var n=t.value;tc(n,n.color)}}catch(e){i.e(e)}finally{i.f()}}return this.activePrimitive=void 0,void(this._mode=sc)}if(e.isAxisPlane){var r,o=Eu(e.relativeAxis);try{for(o.s();!(r=o.n()).done;){tc(r.value,this.activeAxisColor)}}catch(e){o.e(e)}finally{o.f()}}if(this.activePrimitive=e,tc(this.activePrimitive,this.activeAxisColor),e.axis)if(e.axis.includes("R")){this._mode=lc;var s=ic(this._mousedownPixel,this);this.rAxuStart.positions=[this.center,s],this._startLocalPosition=s}else e.axis.includes("S")?this._mode=uc:this._mode=ac}}},{key:"remove",value:function(){this._viewer.scene.primitives.remove(this.root),this._removeEventListener(),this._primitives.splice(0)}},{key:"transform",value:function(e,t){if(this.preTranformEvent.raiseEvent(Lu.clone(this.modelMatrix,{})),this.activePrimitive===this.origin){var i=ANOVGIS.Transform.transformWindowToCartesian3(t,this._viewer);Lu.setTranslation(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=Eu(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===ac)oc(this,e,t,Qu),this.translate(Qu);else if(this._mode===lc){var o=function(e,t,i){var n=e.center;Mu.subtract(t,n,t),Mu.subtract(i,n,i);var r=Mu.dot(Mu.normalize(t,t),Mu.normalize(i,i)),o=Mu.subtract(t,i,Ju),s=t,a=Mu.cross(o,s,Ju),l=e.activePrimitive.normal,u=Wu.sign(Mu.dot(a,l));return Math.acos(r)*u}(this,ic(e,this),ic(t,this));this.rotate(o)}else if(this._mode=uc){oc(this,e,t,Qu);var s=-Qu.sxyz/Mu.distance.apply(Mu,ke(this.scaleAxis.positions))+1;this.scale(new Mu(s,s,s))}this.postTransformEvent.raiseEvent(Lu.clone(this.modelMatrix,{}))}},{key:"scale",value:function(e){var t=Lu.fromScale(e,$u);Lu.multiply(this._modelMatrix,t,this._modelMatrix),this.modelMatrix=this._modelMatrix;var i,n=Eu(this.root._primitives);try{for(n.s();!(i=n.n()).done;){var r=i.value;Lu.multiply(r.modelMatrix,t,r.modelMatrix)}}catch(e){n.e(e)}finally{n.f()}this.postScaleEvent.raiseEvent(e,Lu.clone(this.modelMatrix,{}))}},{key:"rotate",value:function(e){this._angle+=e;var t=this.activePrimitive.normal,i=Lu.fromTranslation(this.center,$u),n=Du.fromAxisAngle(t,e,Ku),r=Iu.fromQuaternion(n,Xu),o=Lu.fromTranslation(Mu.negate(this.center,Ju),ec);Lu.multiply(this.modelMatrix,i,this.modelMatrix),Lu.multiplyByMatrix3(this.modelMatrix,r,this.modelMatrix),Lu.multiply(this.modelMatrix,o,this.modelMatrix);var s,a=Eu(this.root._primitives);try{for(a.s();!(s=a.n()).done;){var l=s.value;Lu.multiply(l.modelMatrix,i,l.modelMatrix),Lu.multiplyByMatrix3(l.modelMatrix,r,l.modelMatrix),Lu.multiply(l.modelMatrix,o,l.modelMatrix)}}catch(e){a.e(e)}finally{a.f()}this.postRoatationEvent.raiseEvent(e,t,Lu.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,Mu.add(this._offset,e,this._offset);var i=Lu.fromTranslation(e);Lu.multiply(this._modelMatrix,i,this._modelMatrix),this.modelMatrix=this._modelMatrix;var n,r=Eu(this.root._primitives);try{for(r.s();!(n=r.n()).done;){var o=n.value;Lu.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=Mu.clone(this.xAxis.positions[0]),i=Mu.clone(this.xAxis.positions[0]);i.x+=-e.x,this.xAux.positions=[t,i]}else{var n=Mu.clone(this.xAxis.positions[1]),r=Mu.clone(this.xAxis.positions[1]);r.x+=-e.x,this.xAux.positions=[n,r]}if(e.y<0){var o=Mu.clone(this.yAxis.positions[0]),s=Mu.clone(this.yAxis.positions[0]);s.y+=-e.y,this.yAux.positions=[o,s]}else{var a=Mu.clone(this.yAxis.positions[1]),l=Mu.clone(this.yAxis.positions[1]);l.y+=-e.y,this.yAux.positions=[a,l]}if(e.z>0){var u=Mu.clone(this.zAxis.positions[0]),c=Mu.clone(this.zAxis.positions[0]);c.z+=-e.z,this.zAux.positions=[u,c]}else{var h=Mu.clone(this.zAxis.positions[1]),f=Mu.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=Du.fromAxisAngle(this.activePrimitive.normal,-t),n=Iu.fromQuaternion(i,Xu),r=Lu.fromRotation(n,$u),o=Mu.subtract(e,this.center,Ju);Lu.multiplyByPoint(r,o,o),Mu.add(this.center,o,o),this.rAxuEnd.positions=[this.center,o]}}}]),e}();const hc=cc;var fc={CONE:"cone",CIRCLE:"circle",BOX:"box"},pc={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}},mc={damCenter:[115.602,32.432],gateCount:13,gateHeight:28,gateSpacing:65,gatePositions:null,sprayHeading:180,sprayPitch:105,emitterType:fc.CONE,coneAngle:15,circleRadius:3,boxWidth:4,boxHeight:1.5,particleImageSize:24,startColor:null,endColor:null,startScale:.8,flowPreset:"medium",systemLifetime:16},vc=function(e,t){if(!e)throw new Error("DamWaterRelease: viewer is required");this._viewer=e,this._options=Object.assign({},mc,t||{}),this._particleSystems=[],this._gatePositions=[],this._flowLevel=this._options.flowPreset,this._destroyed=!1,this._mainImage=this._createWaterTexture(this._options.particleImageSize),this._computeGatePositions()};Object.defineProperties(vc.prototype,{gatePositions:{get:function(){return this._gatePositions}},flowLevel:{get:function(){return this._flowLevel}},currentFlowParams:{get:function(){return pc[this._flowLevel]||pc.medium}},emitterType:{get:function(){return this._options.emitterType}}}),vc.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)})}},vc.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()},vc.prototype._createEmitter=function(){var e=this._options;switch(e.emitterType){case fc.CONE:return new Cesium.ConeEmitter(Cesium.Math.toRadians(e.coneAngle));case fc.CIRCLE:return new Cesium.CircleEmitter(e.circleRadius);case fc.BOX:return new Cesium.BoxEmitter(new Cesium.Cartesian3(e.boxWidth,e.boxHeight,.1));default:return new Cesium.ConeEmitter(Cesium.Math.toRadians(e.coneAngle))}},vc.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))},vc.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}))},vc.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))}},vc.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})])},vc.prototype.closeGate=function(e){var t=this._particleSystems[e];t&&(t.show=!1,t.emissionRate=0)},vc.prototype.setGateOpen=function(e,t){t?this.openGate(e):this.closeGate(e)},vc.prototype.openAllGates=function(){for(var e=0;e<this._particleSystems.length;e++)this.openGate(e)},vc.prototype.closeAllGates=function(){for(var e=0;e<this._particleSystems.length;e++)this.closeGate(e)},vc.prototype.setFlowLevel=function(e){if(pc[e]){this._flowLevel=e;for(var t=pc[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))}}},vc.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)},vc.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)},vc.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)))}},vc.prototype.setParticleImage=function(e){for(var t=0;t<this._particleSystems.length;t++)this._particleSystems[t]&&(this._particleSystems[t].image=e)},vc.prototype.getParticleSystem=function(e){return this._particleSystems[e]||null},vc.prototype.getAllParticleSystems=function(){return this._particleSystems.slice()},vc.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=[]},vc.prototype.destroy=function(){this.removeFromScene(),this._mainImage=null,this._gatePositions=[],this._destroyed=!0},vc.EmitterType=fc,vc.FLOW_PRESETS=pc,vc.DEFAULT_OPTIONS=mc;const dc=vc;var yc=i(797),gc=i.n(yc);const _c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._id=ye.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=me.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:gc(),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=me.ADDED,this):this}}]),e}();var Cc=i(802),bc=i.n(Cc);const wc=function(){function e(){n(this,e),this._id=ye.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=me.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:bc(),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=me.ADDED,this):this}}]),e}();var Pc=i(87),Oc=i.n(Pc);const Ec=function(){function e(){n(this,e),this._id=ye.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._enable=!1,this._speed=10,this._state=me.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:Oc(),uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._nativeObjCesium)}},{key:"addTo",value:function(e){return e?(this._viewer=e,this._state=me.ADDED,this):this}}]),e}();var Tc=i(35),Ac=i.n(Tc);const kc=function(){function e(t){n(this,e),this._id=ye.uuid(),this._viewer=void 0,this._nativeObjCesium=void 0,this._rotateAmount=.04,this._enable=!1,this._heading=0,this._state=me.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:Ac()},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=me.ADDED,this):this}}]),e}();const xc=function(){function e(t){if(n(this,e),!t)throw new Error("Viewer:必须传入三维球对象");this._comps={fog:new _c,rain:new wc,snow:new Ec,cloud:new kc},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 Rc={};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 Mc(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}const jc=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=Mc(Mc({},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 Lc(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 Ic=function(e){c(i,e);var t=Lc(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 Rc.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}(jc);Rc.GLOBE_ROTATE="globe_rotate";const Dc=Ic;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)}}const Hc=function(e){c(i,e);var t=Bc(i);function i(){var e;return n(this,i),(e=t.call(this,se))._registerEvent(),e}return a(i)}(le);function Gc(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 Nc=function(e){c(i,e);var t=Gc(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=xe.parsePosition(e.position),e})),r._currentIndex=0,r._timer=void 0,r._flyEvent=new Hc,r):(console.error("未定义路线!"),f(r))}return a(i,[{key:"type",get:function(){return Rc.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}(jc);Rc.FlyManager="FlyManager";const Fc=Nc;function Wc(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 Uc=function(e){c(i,e);var t=Wc(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 Rc.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=$e.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}(jc);Rc.AROUND_POINT="around_point";const zc=Uc;const Vc=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 qc=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 Zc=function(){function e(t,i,r){n(this,e),this._id=ye.uuid(),this._bid=void 0,this._positions=xe.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 Wn,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=me.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=xe.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=me.ADDED}},{key:"_onRemove",value:function(){this._state=me.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(Ye(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=qe(this._positions)/this._duration;i=this._positions.map((function(i,r,o){return 0!==r&&(t+=qe([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,Me.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 Yc=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=me.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?me.ENABLED:me.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 Qc=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=me.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?me.ENABLED:me.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 Kc=function(){function e(t){n(this,e),this._viewer=t,this.__nativeObjCesium=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=me.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?me.ENABLED:me.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 Xc=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=me.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?me.ENABLED:me.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}();const Jc=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=me.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?me.ENABLED:me.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 $c=function(){function e(t){n(this,e),this._viewer=t,this._enable=!1,this._selected=[],this._state=me.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?me.ENABLED:me.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 eh=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=me.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?me.ENABLED:me.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 th=function(){function e(t){if(n(this,e),!t)throw Error("missing viewer param");this._blackAndWhite=new Yc(t),this._bloom=new Qc(t),this._brightness=new Kc(t),this._depthOfField=new Xc(t),this._lensFlare=new Jc(t),this._night=new $c(t),this._silhouette=new eh(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:"lensFlare",get:function(){return this._lensFlare}},{key:"night",get:function(){return this._night}},{key:"silhouette",get:function(){return this._silhouette}}]),e}();function ih(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 nh=function(e){c(i,e);var t=ih(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 v=t.scene.children;n.setFromCamera(r,t.camera);var d=n.intersectObjects(v);return console.log(d),!!d[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=ge.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}(Kn);const rh=nh;var oh=200,sh={200:"成功响应"},ah={Event:"Event",Api:"Api"},lh=function(e,t,i,n,r){var o,s=ye.uuid(),a=function(e){var t;return null!==(t=sh[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}},uh=function(){function e(t){n(this,e),this.event=new le(ah),this.resMessage={},this.viewer=void 0,this.resMessage=lh(0,"engineReady",oh)}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 Pr(o.container,o),this.viewer.scene.camera.isFlying=!1,this.resMessage=lh(0,n,oh,r),void this.event.raiseEvent(ah.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=lh(0,n,oh,r,{name:"聚焦完成"}),t.event.raiseEvent(ah.Api,t.resMessage)}}))}},{key:"receiveMessage",value:function(e){this.event.addEventListener(ah.Api,e),this.event.addEventListener(ah.Event,e)}}]),e}();const ch=function(e){return new uh(e)}},384:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});const n=Cesium;var r=["version","accessToken","baseUrl","author","home_page","init","ready","use","mixin","Namespace","Initialized"],o={version:"1.8.5",accessToken:"",baseUrl:"/anov-gis-sdk/resources/",author:"zhf",home_page:"http://172.16.222.31:8866",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(626)),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(626)),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;\nuniform float speed;\nczm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n float time = fract( czm_frameNumber * speed / 1000.0);\n vec2 st = materialInput.st;\n float scalar = smoothstep(0.0,1.0,time);\n material.diffuse = color.rgb * scalar;\n material.alpha = color.a * scalar ;\n return material;\n}\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}},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 v?t:v,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 v(){}function d(){}function y(){}var g={};h(g,l,(function(){return this}));var _=Object.getPrototypeOf,C=_&&_(_(x([])));C&&C!==i&&o.call(C,l)&&(g=C);var b=y.prototype=v.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 R()}for(i.method=r,i.arg=o;;){var s=i.delegate;if(s){var a=E(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 E(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,E(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 T(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(T,this),this.reset(!0)}function x(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:R}}function R(){return{value:void 0,done:!0}}return d.prototype=y,s(b,"constructor",{value:y,configurable:!0}),s(y,"constructor",{value:d,configurable:!0}),d.displayName=h(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"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=x,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:x(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(384).Z})(),n=n.default})()));
|