earthsdk3-cesium 3.5.0-beta.19 → 3.5.0-beta.20
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.
|
@@ -3101,7 +3101,7 @@ export type IndexJsonType = {
|
|
|
3101
3101
|
\`\`\`
|
|
3102
3102
|
${kx}
|
|
3103
3103
|
\`\`\`
|
|
3104
|
-
`,xt=class xt extends c.Destroyable{constructor(e,i){super();L(this,"_flyToEvent",this.disposeVar(new c.Event));L(this,"_loadFuncReact",this.disposeVar(c.react(void 0)));L(this,"_dataSource",this.disposeVar(c.react(void 0)));L(this,"_data");L(this,"_defaultHeight",{});L(this,"_defaultBoundingSphere",new _.BoundingSphere);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}let r=()=>{this.dataSource&&o.dataSources.remove(this.dataSource,!0),this.dataSource=void 0,this._data=void 0};this.dispose(()=>{r()});{const a=this.dv(c.createProcessingFromAsyncFunc(async u=>{this.dataSource&&r(),this.url&&(typeof this.url=="object"?this._data=this.url:c.isJSON(this.url)?this._data=JSON.parse(this.url):await fetch(c.ESSceneObject.context.getStrFromEnv(this.url)).then(A=>A.json()).then(A=>{this._data=A}).catch(A=>{console.warn("ESGeoJson数据加载失败",A)}),this.dataSource=await _.GeoJsonDataSource.load(this._data),o.dataSources.add(this.dataSource).then(A=>{var f,d;const h=[];for(const p of A.entities.values)if(_.Entity.prototype&&(p.ESSceneObjectID=i),this._isEntityShow(p,e),p.polygon&&h.push(...(f=p.polygon.hierarchy)==null?void 0:f.getValue(_.JulianDate.now()).positions),p.polyline&&h.push(...(d=p.polyline.positions)==null?void 0:d.getValue(_.JulianDate.now())),p.position){const g=p.position.getValue(_.JulianDate.now());g&&h.push(g)}this._defaultBoundingSphere=_.BoundingSphere.fromPoints(h)}))})),s=()=>{a.isRunning&&a.cancel(),a.restart()};s();const l=this.dv(c.createNextAnimateFrameEvent(this.loadFunChanged,this.urlChanged));this.dispose(l.don(s))}{const a=()=>{var l,u;if(this.dataSource)if(this.dataSource.show=this.show,this.loadFun)try{this.loadFun(this.dataSource)}catch(A){console.error(A)}else{const A=this.dataSource.entities.values;for(let h=0;h<A.length;h++){const f=A[h];if(f.polygon){this._defaultHeight[f.id]||(this._defaultHeight[f.id]=(l=f.polygon.height)==null?void 0:l.getValue(_.JulianDate.now())),f.polygon.height=this.fillGround?void 0:new _.ConstantProperty(this._defaultHeight[f.id]),f.polygon.perPositionHeight=new _.ConstantProperty(!this.fillGround),f.polygon.heightReference=new _.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?_.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?_.HeightReference.CLAMP_TO_GROUND:_.HeightReference.RELATIVE_TO_GROUND),f.polygon.show=new _.ConstantProperty(this.filled??xt.defaults.filled),f.polygon.material=new _.ColorMaterialProperty(new _.Color(...this.fillColor??xt.defaults.fillColor)),f.polygon.outline=new _.ConstantProperty(!1),f.polygon.classificationType=_.ClassificationType[this.classificationType.toUpperCase()],f.polyline=new _.PolylineGraphics;const d=JSON.parse(JSON.stringify((u=f.polygon.hierarchy)==null?void 0:u.getValue(_.JulianDate.now()).positions));_.Cartesian3.equals(d[0],d[d.length-1])||d.push(d[0]),f.polyline.positions=d,f.polyline.classificationType=_.ClassificationType[this.classificationType.toUpperCase()]}if(f.polyline&&(f.polyline.classificationType=_.ClassificationType[this.classificationType.toUpperCase()],f.polyline.show=new _.ConstantProperty(this.stroked??xt.defaults.stroked),f.polyline.width=new _.ConstantProperty(this.strokeWidth??xt.defaults.strokeWidth),f.polyline.material=new _.ColorMaterialProperty(new _.Color(...this.strokeColor??xt.defaults.strokeColor)),f.polyline.clampToGround=new _.ConstantProperty(this.strokeGround)),f.billboard){f.billboard.show=new _.ConstantProperty(this.imageShow??xt.defaults.imageShow),f.billboard.width=new _.ConstantProperty(this.imageSize?this.imageSize[0]:xt.defaults.imageSize[0]),f.billboard.height=new _.ConstantProperty(this.imageSize?this.imageSize[1]:xt.defaults.imageSize[1]);const d=this.imageUrl?typeof this.imageUrl=="string"?this.imageUrl:this.imageUrl.url:xt.defaults.imageUrl;f.billboard.image=new _.ConstantProperty(c.ESSceneObject.context.getStrFromEnv(d)),f.billboard.horizontalOrigin=new _.ConstantProperty(_.HorizontalOrigin.LEFT),f.billboard.verticalOrigin=new _.ConstantProperty(_.VerticalOrigin.TOP),f.billboard.heightReference=new _.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?_.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?_.HeightReference.CLAMP_TO_GROUND:_.HeightReference.RELATIVE_TO_GROUND);const p=this.imageAnchor??xt.defaults.imageAnchor,g=this.imageOffset??xt.defaults.imageOffset;if(f.billboard.pixelOffset=new _.ConstantProperty(_.Cartesian2.fromArray([-p[0]*f.billboard.width.getValue(_.JulianDate.now())+g[0],-p[1]*f.billboard.height.getValue(_.JulianDate.now())+g[1]])),f.label=new _.LabelGraphics,!f.label)return;f.label.show=new _.ConstantProperty(this.textShow??xt.defaults.textShow),f.label.heightReference=new _.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?_.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?_.HeightReference.CLAMP_TO_GROUND:_.HeightReference.RELATIVE_TO_GROUND),f.label.text=new _.ConstantProperty(this.textProperty&&this.textProperty!==""&&f.properties&&f.properties[this.textProperty]?f.properties[this.textProperty].getValue():this.textDefaultText??xt.defaults.textDefaultText),f.label.fillColor=new _.ConstantProperty(new _.Color(...this.textColor??xt.defaults.textColor)),f.label.showBackground=new _.ConstantProperty(this.textBackgroundColor!=null);const v=this.textFontSize&&this.textFontSize!=0?this.textFontSize:xt.defaults.textFontSize,y=this.textOffset??xt.defaults.textOffset;f.label.backgroundColor=new _.ConstantProperty(new _.Color(...this.textBackgroundColor??xt.defaults.textBackgroundColor)),f.label.font=new _.ConstantProperty(`${this.textFontStyle} ${this.textFontWeight} ${v}px ${this.textFontFamily??xt.defaults.textFontFamily}`),f.label.horizontalOrigin=new _.ConstantProperty(_.HorizontalOrigin.LEFT),f.label.verticalOrigin=new _.ConstantProperty(_.VerticalOrigin.TOP),f.label.eyeOffset=new _.ConstantProperty(_.Cartesian3.fromArray([0,0,-1]));const m=this.textAnchor??xt.defaults.textAnchor;f.label.pixelOffset=new _.ConstantProperty(_.Cartesian2.fromArray([-m[0]*((this.textBackgroundColor?-14:0)+this._getTextPixelWidth(f.label.text.getValue(_.JulianDate.now()),f.label.font.getValue(_.JulianDate.now())))+y[0],-m[1]*((this.textBackgroundColor?10:0)+v)+y[1]]))}}}};a();const s=this.dv(c.createNextAnimateFrameEvent(this._dataSource.changed,this.showChanged,this.strokedChanged,this.strokeWidthChanged,this.strokeWidthTypeChanged,this.strokeColorChanged,this.strokeMaterialChanged,this.strokeMaterialParamsChanged,this.strokeGroundChanged,this.filledChanged,this.fillColorChanged,this.fillMaterialChanged,this.fillMaterialParamsChanged,this.fillGroundChanged,this.imageShowChanged,this.imageUrlChanged,this.imageSizeChanged,this.imageAnchorChanged,this.imageOffsetChanged,this.textShowChanged,this.textPropertyChanged,this.textDefaultTextChanged,this.textColorChanged,this.textBackgroundColorChanged,this.textFontFamilyChanged,this.textFontSizeChanged,this.textFontStyleChanged,this.textFontWeightChanged,this.textAnchorChanged,this.textOffsetChanged,this.heightReferenceChanged,this.classificationTypeChanged));this.dispose(s.don(a))}{const a=()=>{if(!this.dataSource)return;const l=this.dataSource.entities.values;for(let u=0;u<l.length;u++){const A=l[u];this._isEntityShow(A,e)}};a();const s=this.ad(c.createNextAnimateFrameEvent(this.minFeatureVisibleDistanceChanged,this.maxFeatureVisibleDistanceChanged,e.cameraChanged,this.showChanged));this.ad(s.don(a))}{const a=()=>{if(this.loadFuncStr)try{const s=Function(`"use strict";return (${this.loadFuncStr})`)();this.loadFun=s}catch(s){console.error(s),this.loadFun=void 0}else this.loadFun=void 0};a(),this.dispose(this.loadFuncStrChanged.disposableOn(a))}this.dispose(this.flyToEvent.disposableOn(a=>{e.actived&&this.dataSource&&(a!==void 0?o.flyTo(this.dataSource,{duration:a/1e3}).then(s=>{s||o.camera.flyToBoundingSphere(this._defaultBoundingSphere,{duration:a/1e3})}):o.flyTo(this.dataSource).then(s=>{s||o.camera.flyToBoundingSphere(this._defaultBoundingSphere)}))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get loadFun(){return this._loadFuncReact.value}set loadFun(e){this._loadFuncReact.value=e}get loadFunChanged(){return this._loadFuncReact.changed}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}_getTextPixelWidth(e,i="16px sans-serif"){const r=document.createElement("canvas").getContext("2d");return r.font=i,r.measureText(e).width}_isEntityShow(e,i){var o;if(this.minFeatureVisibleDistance==0&&this.maxFeatureVisibleDistance==0){e.show=this.show;return}if((o=i.viewer)!=null&&o.camera&&this.show){let r;if(e.polygon&&e.polygon.hierarchy)r=c.getMinMaxCorner(e.polygon.hierarchy.getValue(_.JulianDate.now()).positions.map(l=>Ue(l))).center;else if(e.polyline&&e.polyline.positions)r=c.getMinMaxCorner(e.polyline.positions.getValue(_.JulianDate.now()).map(l=>Ue(l))).center;else if(e.position){const l=e.position.getValue(_.JulianDate.now());l&&(r=Ue(l))}if(!r||isNaN(r[0]))return;const a=c.getDistancesFromPositions([r,Fn(i.viewer.camera)],"NONE")[0];let s=!1;this.minFeatureVisibleDistance<this.maxFeatureVisibleDistance?s=this.minFeatureVisibleDistance<a&&a<this.maxFeatureVisibleDistance:this.maxFeatureVisibleDistance==0?s=a>this.minFeatureVisibleDistance:this.minFeatureVisibleDistance==0&&(s=a<this.maxFeatureVisibleDistance),e.show=this.show&&s}}};L(xt,"defaults",{show:!0,allowPicking:!0,url:Qx,defaultLoadFuncStr:kx,defaultLoadFuncDocStr:pO,data:AO,dataMd:fO,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/misc/location.png",imageSize:[64,64],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:[.79,.91,.06,1],textFontFamily:"Arial",textFontSize:16,textFontWeight:"normal",textFontStyle:"normal",textAnchor:[.5,1],textOffset:[0,0],strokeWidthTypes:[["screen","screen"],["world","world"]],minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Ko=xt;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:void 0,loadFuncStr:void 0,url:void 0,stroked:void 0,strokeWidth:void 0,strokeWidthType:"world",strokeColor:c.reactArrayWithUndefined(void 0),strokeMaterial:void 0,strokeMaterialParams:c.reactJsonWithUndefined(void 0),strokeGround:void 0,filled:void 0,fillColor:c.reactArrayWithUndefined(void 0),fillMaterial:void 0,fillMaterialParams:c.reactJsonWithUndefined(void 0),fillGround:void 0,imageShow:void 0,imageUrl:void 0,imageSize:c.reactArrayWithUndefined(void 0),imageAnchor:c.reactArrayWithUndefined(void 0),imageOffset:c.reactArrayWithUndefined(void 0),textShow:void 0,textProperty:void 0,textDefaultText:void 0,textColor:c.reactArrayWithUndefined(void 0),textBackgroundColor:c.reactArrayWithUndefined(void 0),textFontFamily:void 0,textFontSize:void 0,textFontStyle:void 0,textFontWeight:void 0,textAnchor:c.reactArrayWithUndefined(void 0),textOffset:c.reactArrayWithUndefined(void 0),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE",classificationType:"TERRAIN"})})(Ko||(Ko={})),c.extendClassProps(Ko.prototype,Ko.createDefaultProps);const Ju=class Ju extends Nn{constructor(n,e){if(super(n,e),!e.viewer){console.warn("viewer is undefined!");return}const o=this.ad(new Ko(e,n.id));this.ad(c.track([o,"show"],[n,"show"])),this.ad(c.track([o,"allowPicking"],[n,"allowPicking"])),this.ad(c.track([o,"loadFuncStr"],[n,"loadFuncStr"])),this.ad(c.track([o,"url"],[n,"features"])),this.ad(c.track([o,"stroked"],[n,"stroked"])),this.ad(c.track([o,"strokeWidth"],[n,"strokeWidth"])),this.ad(c.track([o,"strokeWidthType"],[n,"strokeWidthType"])),this.ad(c.track([o,"strokeColor"],[n,"strokeColor"])),this.ad(c.track([o,"strokeMaterial"],[n,"strokeMaterial"])),this.ad(c.track([o,"strokeMaterialParams"],[n,"strokeMaterialParams"])),this.ad(c.track([o,"strokeGround"],[n,"strokeGround"])),this.ad(c.track([o,"filled"],[n,"filled"])),this.ad(c.track([o,"fillColor"],[n,"fillColor"])),this.ad(c.track([o,"fillMaterial"],[n,"fillMaterial"])),this.ad(c.track([o,"fillMaterialParams"],[n,"fillMaterialParams"])),this.ad(c.track([o,"fillGround"],[n,"fillGround"])),this.ad(c.track([o,"imageShow"],[n,"imageShow"])),this.ad(c.track([o,"imageUrl"],[n,"imageUrl"])),this.ad(c.track([o,"imageSize"],[n,"imageSize"])),this.ad(c.track([o,"imageAnchor"],[n,"imageAnchor"])),this.ad(c.track([o,"imageOffset"],[n,"imageOffset"])),this.ad(c.track([o,"textShow"],[n,"textShow"])),this.ad(c.track([o,"textProperty"],[n,"textProperty"])),this.ad(c.track([o,"textDefaultText"],[n,"textDefaultText"])),this.ad(c.track([o,"textColor"],[n,"textColor"])),this.ad(c.track([o,"textBackgroundColor"],[n,"textBackgroundColor"])),this.ad(c.track([o,"textFontFamily"],[n,"textFontFamily"])),this.ad(c.track([o,"textFontSize"],[n,"textFontSize"])),this.ad(c.track([o,"textFontStyle"],[n,"textFontStyle"])),this.ad(c.track([o,"textFontWeight"],[n,"textFontWeight"])),this.ad(c.track([o,"textAnchor"],[n,"textAnchor"])),this.ad(c.track([o,"textOffset"],[n,"textOffset"])),this.ad(c.track([o,"minFeatureVisibleDistance"],[n,"minFeatureVisibleDistance"])),this.ad(c.track([o,"maxFeatureVisibleDistance"],[n,"maxFeatureVisibleDistance"])),this.ad(c.track([o,"heightReference"],[n,"heightReference"])),this.ad(c.track([o,"classificationType"],[n,"classificationType"])),this.ad(n.flyToEvent.disposableOn(r=>{if(e.actived){if(n.flyInParam){const{position:a,rotation:s,flyDuration:l}=n.flyInParam;return Fe(e.viewer,a,void 0,s,l),!0}o.flyTo(r&&r*1e3)}}));{const r=async(a,s,l)=>{if(!e.actived)return;const u=JSON.parse(JSON.stringify(this._getFeatureByIndexOrProperties(a,s)));if(!(!u||!(u!=null&&u.positions)))if(u.type=="Point"||u.type=="MultiPoint")Gn(e,n,this.id,await this._calculateFeatureHeight(u.type=="MultiPoint"?u.positions.flat():u.positions,n.heightReference,e),1e3,l);else{const A=u.type=="Polygon"||u.type=="MultiPolygon"||u.type=="MultiLineString";let h=[];A?h=u.positions.flat(u.type=="MultiPolygon"?2:1).map(g=>this._calculateFeatureHeight(g,n.fillGround?"CLAMP_TO_GROUND":"NONE",e)):h=u.positions.map(g=>this._calculateFeatureHeight(g,n.strokeGround?"CLAMP_TO_GROUND":"NONE",e));const{minPos:f,maxPos:d,center:p}=c.getMinMaxCorner(h);Gn(e,n,this.id,p,c.getDistancesFromPositions([f,d],"NONE")[0],l)}};this.d(n.flyToFeatureEvent.don((a,s,l)=>r(a,s,l))),this.d(n.flyToFeatureIndexEvent.don((a,s)=>r(a,void 0,s)))}}_getFeatureByIndexOrProperties(n,e){var a,s,l,u,A,h,f,d;const{sceneObject:i}=this,o=i.features;if(!o)return;const r=Reflect.get(o,"features")||Reflect.get(o,"geometries");if(r){if(e){let p=r.find(g=>(g==null?void 0:g.properties[n])==e);return{type:p!=null&&p.coordinates?p.type:(a=p==null?void 0:p.geometry)==null?void 0:a.type,positions:(p==null?void 0:p.coordinates)||((s=p==null?void 0:p.geometry)==null?void 0:s.coordinates)}}else if(typeof n=="number")return{type:(l=r[n])!=null&&l.coordinates?r[n].type:(A=(u=r[n])==null?void 0:u.geometry)==null?void 0:A.type,positions:((h=r[n])==null?void 0:h.coordinates)||((d=(f=r[n])==null?void 0:f.geometry)==null?void 0:d.coordinates)}}}async _calculateFeatureHeight(n,e,i){const o=[...n];return e=="NONE"?o[2]=o[2]??0:e=="CLAMP_TO_GROUND"||!o[2]?o[2]=await i.getTerrainHeight(o)??0:o[2]+=await i.getTerrainHeight(o)??0,o}};L(Ju,"type",Ju.register("ESCesiumViewer",c.ESGeoJson.type,Ju));let lg=Ju;const ec=class ec extends on{constructor(e,i){super(e,i);L(this,"_czmGeoESRectangle");L(this,"_geoPolyline");if(this._geoPolyline=this.disposeVar(new Ye(i,e.id)),this._czmGeoESRectangle=this.disposeVar(new Ci(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._czmGeoESRectangle,a=this._geoPolyline;a.arcType="RHUMB",this.dispose(c.track([a,"color"],[e,"strokeColor"])),this.dispose(c.track([a,"width"],[e,"strokeWidth"])),this.dispose(c.track([a,"ground"],[e,"strokeGround"])),this.dispose(c.track([r,"ground"],[e,"fillGround"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"]));{const s=()=>{a.show=e.show&&e.stroked,r.show=e.show&&e.filled};s();const l=this.disposeVar(c.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged,e.filledChanged));this.dispose(l.disposableOn(s))}{const s=()=>{e.filled?r.material={type:"Color",color:e.fillColor}:r.material=void 0};s();const l=this.disposeVar(c.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(l.disposableOn(s))}{const s=()=>{const l=e.points;if(l&&l.length>=2){const{minPos:u,maxPos:A}=c.getMinMaxCorner(l);r.rectangle=[u[0],u[1],A[0],A[1]],r.height=l[0][2],r.extrudedHeight=l[0][2];const h=l.map(g=>(l&&(g[2]=l[0][2]),g)),f=h[0],d=h[1],p=[f,[f[0],d[1],f[2]],d,[d[0],f[1],d[2]]];a.positions=[...p,f]}else r.rectangle=void 0,a.positions=void 0,r.height=0,r.extrudedHeight=0};s(),this.dispose(e.pointsChanged.disposableOn(()=>s()))}}get czmGeoESRectangle(){return this._czmGeoESRectangle}flyTo(e,i){const{sceneObject:o,czmViewer:r}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):o.points?(Me(r,o,i,o.points,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmGeoESRectangle:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):o.points?(Me(r,o,i,o.points,e),!0):!1:!1}};L(ec,"type",ec.register("ESCesiumViewer",c.ESGeoRectangle.type,ec));let ug=ec;class Zl extends c.Destroyable{constructor(e,i){super();L(this,"_flyToEvent",this.disposeVar(new c.Event));L(this,"_geoPolygon");this._geoPolygon=this.disposeVar(new zr(e,i));const{geoPolygon:o}=this;this.dispose(c.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(this.flyToEvent.disposableOn(a=>{o.flyTo(a)})),this.dispose(c.bind([o,"show"],[this,"show"])),this.dispose(c.bind([o,"fill"],[this,"filled"])),this.dispose(c.bind([o,"strokeGround"],[this,"strokeGround"])),this.dispose(c.bind([o,"ground"],[this,"ground"])),this.dispose(c.bind([o,"outline"],[this,"outline"])),this.dispose(c.bind([o,"outlineColor"],[this,"outlineColor"])),this.dispose(c.bind([o,"outlineWidth"],[this,"outlineWidth"])),this.dispose(c.bind([o,"color"],[this,"color"])),this.dispose(c.bind([o,"depth"],[this,"depth"]));const r=()=>{if(this.positions&&this.positions.length>=2){const a=Tp([...this.positions,this.positions[0]]);o.positions=a}else o.positions=void 0};r(),this.dispose(this.positionsChanged.disposableOn(r))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygon(){return this._geoPolygon}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outline:!1,filled:!0,outlineColor:c.reactArray([1,1,1,1]),outlineWidth:1,color:c.reactArrayWithUndefined([1,1,1,.5]),positions:c.reactPositions(void 0),depth:0})})(Zl||(Zl={})),c.extendClassProps(Zl.prototype,Zl.createDefaultProps);const tc=class tc extends on{constructor(e,i){super(e,i);L(this,"_geoSmoothPolygon");if(this._geoSmoothPolygon=this.disposeVar(new Zl(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._geoSmoothPolygon;this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.bind([r,"positions"],[e,"points"])),this.dispose(c.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(c.track([r,"outline"],[e,"stroked"])),this.dispose(c.track([r,"outlineColor"],[e,"strokeColor"])),this.dispose(c.track([r,"outlineWidth"],[e,"strokeWidth"])),this.dispose(c.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(c.track([r,"filled"],[e,"filled"])),this.dispose(c.track([r,"color"],[e,"fillColor"])),this.dispose(c.track([r,"ground"],[e,"ground"]));{const a=()=>{r.ground=e.ground||e.fillGround};a();const s=this.dv(c.createNextAnimateFrameEvent(e.groundChanged,e.fillGroundChanged));this.d(s.don(a))}{const a=()=>{r.color=e.filled?e.fillColor:Kl.defaults.fillStyle.color};a();const s=this.disposeVar(c.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(s.disposableOn(a))}this.dispose(c.track([r,"depth"],[e,"depth"]))}get geoSmoothPolygon(){return this._geoSmoothPolygon}flyTo(e,i){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):a.positions?(Me(r,o,i,a.positions,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):a.positions?(Me(r,o,i,a.positions,e),!0):!1:!1}};L(tc,"type",tc.register("ESCesiumViewer",Kl.type,tc));let cg=tc;const nc=class nc extends He{constructor(e,i){super(e,i);L(this,"_czmModel");const o=i.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModel=this.dv(new Ht(i,e.id));const r=this._czmModel;this.d(r.readyEvent.don(s=>{r.gltf.animations&&(r.activeAnimationsJson=r.gltf.animations.map((l,u)=>({index:u,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}))),e.czmModelReadyEvent.emit(s),e.readyEvent.emit(s)})),this.ad(new Bh(o,this._czmModel)),this.d(c.track([r,"show"],[e,"show"])),this.d(c.track([r,"color"],[e,"czmColor"])),this.d(c.track([r,"nativeMaximumScale"],[e,"czmMaximumScale"])),this.d(c.track([r,"nativeMinimumPixelSize"],[e,"czmMinimumPixelSize"])),this.d(c.bind([r,"position"],[e,"position"])),this.d(c.track([r,"nativeScale"],[e,"czmNativeScale"])),this.d(c.track([r,"scale"],[e,"scale"])),this.ad(c.track([r,"imageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(c.track([r,"environmentMapManager"],[e,"czmEnvironmentMapManager"]));{const s=l=>{e.czmEnvironmentMapManager=e.czmEnvironmentMapManager?{...e.czmEnvironmentMapManager,atmosphereScatteringIntensity:l}:{atmosphereScatteringIntensity:l}};s(e.czmAtmosphereScatteringIntensity),this.ad(e.czmAtmosphereScatteringIntensityChanged.don(l=>s(l)))}{const s=()=>{var l,u;(l=e.czmEnvironmentMapManager)!=null&&l.atmosphereScatteringIntensity&&(e.czmAtmosphereScatteringIntensity=(u=e.czmEnvironmentMapManager)==null?void 0:u.atmosphereScatteringIntensity)};s(),this.ad(e.czmEnvironmentMapManagerChanged.don(s))}{const s=()=>{const l=[...e.rotation??[0,0,0]];l[0]+=e.instances&&e.instances.length!=0?0:90,r.rotation=l};s(),this.d(e.rotationChanged.don(s));{const l=()=>{if(s(),!e.instances){r.instances=e.instances;return}r.instances=e.instances.map(u=>{const A=JSON.parse(JSON.stringify(u));return!A.rotation&&(A.rotation=[0,0,0]),A.rotation[0]+=90,A})};l(),this.ad(e.instancesChanged.don(l))}}this.ad(e.setMaterialEvent.don(s=>{r.setMaterial(s)}));{const s=()=>{const l=[...r.rotation];l[0]-=e.instances&&e.instances.length!=0?0:90,e.rotation=l};s(),this.d(r.rotationChanged.don(s))}{const s=this.dv(c.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),l=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};l(),this.d(s.don(l))}const a=()=>{r.url=c.ESSceneObject.context.getStrFromEnv(Th(typeof e.url=="string"?e.url:e.url.url))};a(),this.d(e.urlChanged.don(a)),this.d(e.setNodePositionEvent.don((s,l)=>{r.setNodeTranslation(s,l)})),this.d(e.setNodeRotationEvent.don((s,l)=>{r.setNodeRotation(s,l)})),this.d(e.setNodeScaleEvent.don((s,l)=>{r.setNodeScale(s,l)})),this.d(e.printDebugInfoEvent.don(()=>{r.printDebugInfo()}))}get model(){return this._czmModel}flyTo(e,i){const{sceneObject:o,czmViewer:r,model:a}=this;return r.actived?o.flyToParam||o.flyInParam?(super.flyTo(e,i),!0):(a&&wn(r,o,i,e,a,!0),!!a):!1}};L(nc,"type",nc.register("ESCesiumViewer",c.ESGltfModel.type,nc));let hg=nc;function Vx(t,n){const e=t[0]-n[0],i=t[1]-n[1],o=t[2]-n[2];return Math.sqrt(e*e+i*i+o*o)}class $l extends c.Destroyable{constructor(e,i){super();L(this,"_pickedEvent",this.disposeVar(new c.Event));L(this,"_flyToEvent",this.disposeVar(new c.Event));L(this,"_distance",this.disposeVar(c.react(0)));L(this,"_surfaceDistance",this.disposeVar(c.react(0)));L(this,"_height",this.disposeVar(c.react(0)));L(this,"_middlePosition",this.disposeVar(c.reactArrayWithUndefined(void 0)));L(this,"_heightPosition",this.disposeVar(c.reactArrayWithUndefined(void 0)));const o=()=>{if(this.positions)if(this.positions.length>=2)if(this._middlePosition.value=[this.positions[0][0],this.positions[0][1],this.positions[1][2]],this._heightPosition.value=[this.positions[0][0],this.positions[0][1],.5*(this.positions[1][2]+this.positions[0][2])],this.arcType===void 0||this.arcType==="GEODESIC"){const a=this._surfaceDistance.value=c.geoDistance(this.positions[0],this.positions[1]),s=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(a*a+s*s)}else if(this.arcType==="RHUMB"){const a=this._surfaceDistance.value=c.geoRhumbDistance(this.positions[0],this.positions[1]),s=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(a*a+s*s)}else if(this.arcType==="NONE"){const a=c.lbhToXyz(this.positions[0]),s=c.lbhToXyz(this.positions[1]);this._distance.value=Vx(a,s),this._surfaceDistance.value=Vx(c.lbhToXyz(this._middlePosition.value),s),this._height.value=this.positions[1][2]-this.positions[0][2]}else console.warn(`未知的arcType: ${this.arcType},导致距离无法计算!`);else this._heightPosition.value=void 0,this._distance.value=0,this._surfaceDistance.value=0,this._height.value=0};o();const r=this.disposeVar(c.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged));this.dispose(r.disposableOn(o));{const a=this.disposeVar(new Ye(e,i));a.ground=!1,a.loop=!1,this.dispose(c.track([a,"allowPicking"],[this,"allowPicking"])),this.dispose(c.bind([a,"arcType"],[this,"arcType"])),this.dispose(c.bind([a,"color"],[this,"color"])),this.dispose(c.bind([a,"dashLength"],[this,"dashLength"])),this.dispose(c.bind([a,"dashPattern"],[this,"dashPattern"])),this.dispose(c.bind([a,"gapColor"],[this,"gapColor"])),this.dispose(c.bind([a,"hasArrow"],[this,"hasArrow"])),this.dispose(c.bind([a,"hasDash"],[this,"hasDash"])),this.dispose(c.bind([a,"show"],[this,"show"])),this.dispose(c.bind([a,"width"],[this,"width"])),this.dispose(c.bind([a,"depthTest"],[this,"depthTest"]));{a.loop=!0;const l=()=>{if(this.positions&&this.positions.length===2){const[u,A]=this.positions;a.positions=[u,A,[u[0],u[1],A[2]]]}else a.positions=void 0};l(),this.dispose(this.positionsChanged.disposableOn(l))}this.dispose(this.flyToEvent.disposableOn(l=>{e.actived&&a.flyTo(l)}));const s=this.disposeVar(new wt(e,i));this.dispose(c.track([s,"shadowDom"],[this,"shadowDom"])),this.dispose(c.track([s,"cssAllInitial"],[this,"cssAllInitial"])),this.dispose(c.track([s,"show"],[this,"show"]));{const l=()=>{s.position=this.heightPosition};l(),this.dispose(this.heightPositionChanged.disposableOn(l))}{const l=()=>{s.innerHTML=xo(`高度: ${Ih(this.height)}`,0)};l(),this.dispose(this.heightChanged.disposableOn(l))}this.ad(s.pickedEvent.don(l=>{Gi(l)===0&&this.pickedEvent.emit(l)}))}}get pickedEvent(){return this._pickedEvent}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}get surfaceDistance(){return this._surfaceDistance.value}get surfaceDistanceChanged(){return this._surfaceDistance.changed}get height(){return this._height.value}get heightChanged(){return this._height.changed}get middlePosition(){return this._middlePosition.value}get middlePositionChanged(){return this._middlePosition.changed}get heightPosition(){return this._heightPosition.value}get heightPositionChanged(){return this._heightPosition.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,positions:c.reactPositions(void 0),width:1,color:c.reactArray([1,1,1,1]),hasDash:!1,gapColor:c.reactArrayWithUndefined([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",depthTest:!1,shadowDom:!1,cssAllInitial:!1})})($l||($l={})),c.extendClassProps($l.prototype,$l.createDefaultProps);const ic=class ic extends on{constructor(e,i){super(e,i);L(this,"_geoHeightMeasurement");if(this._geoHeightMeasurement=this.disposeVar(new $l(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const{czmHeightMeasurement:r}=this;this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(c.bind([r,"positions"],[e,"points"]));{const a=()=>{if(e.stroked)r.width=e.strokeWidth;else{r.width=0;return}r.width=e.strokeWidth,r.color=e.strokeColor;const u=e.strokeMaterial??"normal";u==="hasDash"?(r.hasDash=!0,r.hasArrow=!1):u==="hasArrow"?(r.hasDash=!1,r.hasArrow=!0):(r.hasDash=!1,r.hasArrow=!1);const A=e.strokeStyle;if(A.material==="hasDash"&&A.materialParams)try{const h=A.materialParams;Reflect.has(h,"gapColor")&&(r.gapColor=h.gapColor??[0,0,0,0]),Reflect.has(h,"dashLength")&&(r.dashLength=h.dashLength),Reflect.has(h,"dashPattern")&&(r.dashPattern=h.dashPattern)}catch(h){console.error(h)}else r.gapColor=[0,0,0,0],r.dashLength=0,r.dashPattern=0};a();const s=this.disposeVar(c.createNextAnimateFrameEvent(e.strokeStyleChanged,e.strokedChanged));this.dispose(s.disposableOn(a))}this.dispose(r.pickedEvent.disposableOn(a=>{Gi(a)===0&&(e.allowPicking??!1)&&e.pickedEvent.emit(a)}))}get czmHeightMeasurement(){return this._geoHeightMeasurement}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):a.positions?(Me(r,o,i,a.positions,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):a.positions?(Me(r,o,i,a.positions,e),!0):!1:!1}};L(ic,"type",ic.register("ESCesiumViewer",c.ESHeightMeasurement.type,ic));let Ag=ic;const fg={czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]},rc=class rc extends He{constructor(e,i){super(e,i);L(this,"_czmModelPrimitive");const o=i.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModelPrimitive=this.disposeVar(new Ht(i,this.sceneObject.id));const r=this._czmModelPrimitive;this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.bind([r,"position"],[e,"position"])),this.dispose(Mt([r,"rotation"],[e,"rotation"])),this.dispose(c.bind([r,"scale"],[e,"scale"])),this.d(r.readyEvent.don(g=>{e.readyEvent.emit(g)}));{const g=this.dv(c.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),v=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};v(),this.d(g.don(v))}const a=c.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/worker.glb"),s=c.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/police.glb"),l=c.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/pedestrian.glb"),u=c.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/Stranger.glb"),A=c.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsMan.glb"),h=c.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsWoman.glb"),f=()=>{switch(e.mode){case"worker":r.url=a;break;case"police":r.url=s;break;case"pedestrian":r.url=l;break;case"stranger":r.url=u;break;case"suitMan":r.url=A;break;case"suitWoman":r.url=h;break;default:r.url=a;break}};this.dispose(e.modeChanged.disposableOn(()=>{f()})),f();const d=()=>{const g=e.animation??c.ESHuman.defaults.animation;if(!e.show){r.activeAnimationsJson=void 0;return}g==="walking"?r.activeAnimationsJson=fg.czmAnimationsWalk:g==="standing"?r.activeAnimationsJson=fg.czmAnimationsStand:g==="running"&&(r.activeAnimationsJson=fg.czmAnimationsRun)};d();const p=this.ad(c.createNextAnimateFrameEvent(e.showChanged,e.animationChanged));this.dispose(p.disposableOn(()=>d())),this.ad(new Bh(o,r))}get czmModelPrimitive(){return this._czmModelPrimitive}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmModelPrimitive:a}=this;return!r.actived||!r.viewer?!1:o.flyToParam||o.flyInParam?(super.flyTo(e,i),!0):(a&&wn(r,o,i,e,a,!0),!!a)}};L(rc,"type",rc.register("ESCesiumViewer",c.ESHuman.type,rc));let pg=rc;class Nx extends c.Destroyable{constructor(e,i){super();L(this,"_czmGeoCanvasImagePoi");L(this,"flyTo",(e,i)=>{if(this.czmGeoCanvasImagePoi.position){Fe(this.czmViewer.viewer,this.czmGeoCanvasImagePoi.position,1e3,Hn,e);return}this.czmGeoCanvasImagePoi.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=i,this._czmGeoCanvasImagePoi=this.disposeVar(new yi(i));const o=this._czmGeoCanvasImagePoi;o.pickOnClick=!0,this.d(o.pickedEvent.don(r=>{(e.allowPicking??!1)&&e.pickedEvent.emit(r)}));{const r=A=>{let h=A;return A.includes("inner://")&&(h="${earthsdk3-assets-script-dir}/assets/img/points/"+A.split("inner://")[1]),c.ESSceneObject.context.getStrFromEnv(Th(h))},a=()=>{const A=r(typeof e.url=="string"?e.url:e.url.url);if(o.imageUri=A,e.sizeByContent){const f=new Image;f.src=A,f.onload=()=>{o.size=[f.width,f.height]}}else{const f=e.size;o.size=[...f]}},s=this.disposeVar(c.createNextAnimateFrameEvent(e.urlChanged,e.sizeByContentChanged,e.sizeChanged));this.dispose(s.disposableOn(()=>a())),a(),this.d(c.track([o,"zOrder"],[e,"zOrder"])),this.dispose(c.track([o,"show"],[e,"show"])),this.dispose(c.bind([o,"position"],[e,"position"])),this.ad(c.bind([o,"isHoverZoom"],[e,"isHoverZoom"]));{const A=()=>{o.scale=[e.scale[1],e.scale[2]]};A(),this.dispose(e.scaleChanged.don(A))}const l=()=>{const A=e.anchor,h=e.offset;A?o.originRatioAndOffset=[...A,-h[0],-h[1]]:o.originRatioAndOffset=[0,0,0,0]},u=this.ad(c.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(u.disposableOn(()=>l())),l(),this.dispose(o.clickEvent.disposableOn(A=>{const{offsetX:h,offsetY:f}=A,p={type:A.button===0?"leftClick":A.button===2?"rightClick":void 0,add:{mousePos:[h,f]}};e.widgetEvent.emit(p)})),this.dispose(o.hoveredChanged.disposableOn(A=>{if(A===void 0)return;const h={type:A?"mouseEnter":"mouseLeave"};e.widgetEvent.emit(h)}))}}get czmGeoCanvasImagePoi(){return this._czmGeoCanvasImagePoi}}class Hx extends c.Destroyable{constructor(e,i,o){super();L(this,"_czmGeoImageModel");L(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});L(this,"_isPointEvent",!1);L(this,"flyTo",(e,i)=>{if(this.czmGeoImageModel.position)return Gn(this.czmViewer,this.sceneObject,i,this.sceneObject.position,Math.max(...this.czmGeoImageModel.size),e,!0);this.czmGeoImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=i,this._czmGeoImageModel=this.disposeVar(new $i(i,e.id));const r=this._czmGeoImageModel;this.ad(i.clickEvent.don(f=>{const d=f==null?void 0:f.pointerEvent;d&&(this._isPointEvent=!0,this._eventInfo={type:d.button==0?"leftClick":d.button==2?"rightClick":"leftClick",add:{mousePos:[d.offsetX,d.offsetY]}})})),this.d(e.pickedEvent.don(f=>{var d,p,g;f.screenPosition&&this._isPointEvent&&f.attachedInfo!="innerHoverEvent"&&((d=this._eventInfo.add)!=null&&d.mousePos)&&Math.abs(f.screenPosition[0]-((p=this._eventInfo.add)==null?void 0:p.mousePos[0]))<1&&Math.abs(f.screenPosition[1]-((g=this._eventInfo.add)==null?void 0:g.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),c.registerCreatedEventUpdate(this,e,()=>{const f=i.getEngineObject(e);this.ad(f.lastHoverResultChanged.don((d,p)=>{(d==null?void 0:d.sceneObject)==(p==null?void 0:p.sceneObject)||(d==null?void 0:d.sceneObject)!=e&&(p==null?void 0:p.sceneObject)!=e||(d!=null&&d.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:d==null?void 0:d.screenPosition}},d.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&d.sceneObject.id==e.id&&(r.scale=[r.scale[0]*1.5,r.scale[1]*1.5])),p!=null&&p.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:d==null?void 0:d.screenPosition}},p.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&p.sceneObject.id==e.id&&(r.scale=[r.scale[0]/1.5,r.scale[1]/1.5])))}))});const a=e.sizeByContent,l=(f=>{let d=f;return f.includes("inner://")&&(d="${earthsdk3-assets-script-dir}/assets/img/points/"+f.split("inner://")[1]),c.ESSceneObject.context.getStrFromEnv(Th(d))})(typeof o.sceneObject.url=="string"?o.sceneObject.url:o.sceneObject.url.url),u=new Image;u.src=l,u.onload=()=>{if(a)r.size=[u.width/100,u.height/100];else{const f=e.size;r.size=[f[0]/100,f[1]/100]}},r.uri=l,this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.bind([r,"position"],[e,"position"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"])),r.pixelSize=void 0,r.useAxis="XZ";{const f=()=>{r.scale=[e.scale[1],e.scale[2]]};f(),this.d(e.scaleChanged.don(f))}{const f=()=>{e.rotationType===0&&(r.rotationMode="WithProp",this.d(Mt([r,"rotation"],[e,"rotation"]))),e.rotationType===1&&(r.rotationMode="WithCamera"),e.rotationType===2&&(r.rotationMode="WithCameraOnlyZ")};f(),this.dispose(e.rotationTypeChanged.disposableOn(f))}const A=()=>{const f=e.anchor,d=e.offset;f?r.originRatioAndOffset=[...f,-d[0]/100,-d[1]/100]:r.originRatioAndOffset=[0,0,0,0]},h=this.ad(c.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(h.disposableOn(()=>A())),A()}get czmGeoImageModel(){return this._czmGeoImageModel}}const oc=class oc extends Gl{constructor(e,i){super(e,i);L(this,"_resetting");if(!i.viewer){console.warn("viewer is undefined!");return}const r=this.disposeVar(c.createNextAnimateFrameEvent(this.sceneObject.urlChanged,this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged));this._resetting=this.disposeVar(new c.ObjResettingWithEvent(r,()=>this.sceneObject.screenRender?new Nx(this.sceneObject,this.czmViewer):new Hx(this.sceneObject,this.czmViewer,this)))}get resetting(){return this._resetting}flyTo(e,i){const{sceneObject:o,czmViewer:r,resetting:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(a&&a.obj&&a.obj.flyTo(e,i),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(oc,"type",oc.register("ESCesiumViewer",c.ESImageLabel.type,oc));let dg=oc;function dO(t){switch(t){case"wms":return"WebMapServiceImageryProvider";case"tms":return"TileMapServiceImageryProvider";case"wmts":return"WebMapTileServiceImageryProvider";case"xyz":return"UrlTemplateImageryProvider";case"ion":return"IonImageryProvider"}}const sc=class sc extends Nn{constructor(e,i){super(e,i);L(this,"_czmImagery");if(this._czmImagery=this.dv(new Zr(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._czmImagery;{const a=this.ad(c.reactJson(""));{const u=()=>{if(typeof e.url=="string")a.value=c.ESSceneObject.context.getStrFromEnv(e.url);else{const A=e.url;A.url=c.ESSceneObject.context.getStrFromEnv(A.url),a.value=A}};u(),this.ad(e.urlChanged.don(u))}const s=()=>{var p;if(!a.value)return;const u=(((p=e.options)==null?void 0:p.type)??"auto").toLowerCase(),A=e.options??{};let h={type:"UrlTemplateImageryProvider",url:a.value,rectangle:e.rectangle,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,...A},f=a.value,d=typeof f=="string"?f:f.url;if(u==="auto"){const g=d.toLowerCase();if(g.startsWith("ion://")){const y=+g.substring(6);h={...A,assetId:y,type:"IonImageryProvider"}}else if(g.includes("{x}")||g.includes("{y}")||g.includes("{z}"))h.type="UrlTemplateImageryProvider";else if(g.includes("wmts"))h.type="WebMapTileServiceImageryProvider";else if(g.includes("wms"))h.type="WebMapServiceImageryProvider";else{if(d.includes("/tilemapresource.xml")){const v=d.split("/tilemapresource.xml").join("");typeof f=="string"?f=v:f.url=v,h.url=f}h.type="TileMapServiceImageryProvider"}}else{if(u==="tms"&&d.includes("/tilemapresource.xml")){const g=d.split("/tilemapresource.xml").join("");typeof f=="string"?f=g:f.url=g,h.url=f}else if(u==="ion"&&d.startsWith("ion://")){const v=+d.substring(6);h={...A,assetId:v,type:"IonImageryProvider"}}h.type=dO(u)}console.log("imageryProvider",h),r.imageryProvider=h};s();const l=this.dv(c.createNextAnimateFrameEvent(a.changed,e.maximumLevelChanged,e.minimumLevelChanged,e.optionsChanged,e.rectangleChanged));this.d(l.don(s))}this.d(c.track([r,"show"],[e,"show"])),this.d(c.bind([r,"alpha"],[e,"opacity"])),this.d(c.bind([r,"alpha"],[e,"czmAlpha"])),this.d(c.track([r,"splitDirection"],[e,"splitDirection"])),this.d(c.track([r,"brightness"],[e,"czmBrightness"])),this.d(c.track([r,"contrast"],[e,"czmContrast"])),this.d(c.track([r,"hue"],[e,"czmHue"])),this.d(c.track([r,"saturation"],[e,"czmSaturation"])),this.d(c.track([r,"gamma"],[e,"czmGamma"])),this.d(c.track([r,"rectangle"],[e,"rectangle"])),this.d(c.track([r,"zIndex"],[e,"zIndex"])),this.ad(c.track([r,"targetID"],[e,"targetID"]))}get czmImagery(){return this._czmImagery}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmImagery:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(a.flyTo(e&&e),o.flyOverEvent.emit(i,"over",r),!0):!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmImagery:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):(a.flyTo(e&&e),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(sc,"type",sc.register("ESCesiumViewer",c.ESImageryLayer.type,sc));let mg=sc;class mO extends c.Destroyable{constructor(e,i,o,r){super();L(this,"_show");L(this,"_czmESCustomPrimitive");L(this,"_czmTexture");this._sceneObject=e,this._show=this.disposeVar(c.react(this._sceneObject.show)),this._czmESCustomPrimitive=this.dv(new at(i,this._sceneObject.id)),this._czmTexture=this.dv(new ht(i));const a=e,s=this._czmESCustomPrimitive,l=this._czmTexture;this.dispose(c.track([s,"show"],[this,"show"])),this.dispose(c.track([s,"show"],[a,"show"])),this.dispose(c.track([s,"allowPicking"],[a,"allowPicking"])),this.dispose(c.track([s,"rotation"],[a,"rotation"])),this.dispose(c.track([s,"position"],[a,"position"])),this.dispose(c.track([s,"scale"],[a,"scale"])),this.ad(a.allowPickingChanged.don(()=>{s.allowPicking=a.allowPicking,s.pass=a.allowPicking?"TRANSLUCENT":"OVERLAY"}));{const u=()=>{const h=a.size/2,f=r[0].map(S=>S*h),d=r[1].map(S=>S*h),p=r[2].map(S=>S*h),g=r[3].map(S=>S*h),v=[...f,...d,...p,...g];let y=[0,3,2,0,2,1];(o=="north"||o=="west"||o=="bottom")&&(y=y.reverse());const m=[0,0],b=[1,0],x=[1,1],E=[0,1];let B=[];o=="east"||o=="south"?B=[...b,...m,...E,...x]:o=="west"?B=[...b,...x,...E,...m]:o=="top"?B=[...E,...x,...b,...m]:B=[...m,...b,...x,...E],s.indexTypedArray=new Uint16Array(y),s.attributes={position:{typedArray:new Float32Array(v),componentsPerAttribute:3},st:{typedArray:new Float32Array(B),componentsPerAttribute:2}},l.uri=c.ESSceneObject.context.getStrFromEnv(`\${earthsdk3-assets-script-dir}/assets/img/skybox/${a.mode}/${o}.${a.mode!="blueSky"?"png":"jpg"}`);const P=i.getCameraInfo();if(P!=null){const T=c.getDistancesFromPositions([a.position,P.position],"NONE")[0]/(a.size/2*a.autoOpacityFactor);this.changeOpacity(a.autoFollow?1:T)}const I=s.computeLocalAxisedBoundingBoxFromAttribute("position");if(!I)return;const{min:M,max:F}=I;s.setLocalAxisedBoundingBox(M,F)};u();const A=this.disposeVar(c.createNextAnimateFrameEvent(a.sizeChanged,a.modeChanged));this.dispose(A.disposableOn(u))}}get show(){return this._show.value}set show(e){this._show.value=e}get showChanged(){return this._show.changed}get czmESCustomPrimitive(){return this._czmESCustomPrimitive}get czmTexture(){return this._czmTexture}changeOpacity(e){this._czmESCustomPrimitive.uniformMap={u_image:{type:"texture",id:this._czmTexture.id},u_color:[1,1,1,1-e>=0?1-e:0]}}}class gO extends c.Destroyable{constructor(n,e,i){if(super(),!e.viewer)return;let o=!0,r;this.dispose(e.viewer.scene.preUpdate.addEventListener(()=>{a()}));function a(){var l;if(!((l=e.viewer)!=null&&l.camera))return;const s=e.getCameraInfo();if(s!=null&&(r==null||r.position[0]!=s.position[0]||r.position[1]!=s.position[1]||r.position[2]!=s.position[2]||r.rotation[0]!=s.rotation[0]||r.rotation[1]!=s.rotation[1]||r.rotation[2]!=s.rotation[2])){r=s;const A=c.getDistancesFromPositions([n.position,r.position],"NONE")[0]/(n.size/2*n.autoOpacityFactor);n.autoFollow?(n.position=r.position,o&&(o=!1,i.forEach(h=>{h.changeOpacity(1)}))):i.forEach(h=>{h.changeOpacity(A)})}}a()}}const Pt=class Pt extends He{constructor(e,i){super(e,i);L(this,"_czmSkyBoxComponents",[]);if(!i.viewer){console.warn("viewer is undefined!");return}!Pt._defaultLocalBox&&Pt._firstLoad&&(Pt._firstLoad=!1,Pt._defaultLocalBox=i.xbsjLocalBoxSources),Pt._eSLocalSkyBoxArr.push(e),this.d(()=>{Pt._eSLocalSkyBoxArr.includes(e)&&Pt._eSLocalSkyBoxArr.splice(Pt._eSLocalSkyBoxArr.indexOf(e),1),this.ChangeAutoFollow()});const r={bottom:[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]],top:[[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],south:[[-1,-1,-1],[1,-1,-1],[1,-1,1],[-1,-1,1]],north:[[-1,1,-1],[1,1,-1],[1,1,1],[-1,1,1]],east:[[1,-1,-1],[1,1,-1],[1,1,1],[1,-1,1]],west:[[-1,1,-1],[-1,1,1],[-1,-1,1],[-1,-1,-1]]};for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)){const s=r[a];this._czmSkyBoxComponents.push(this.dv(new mO(e,i,a,s)))}{const a=this.disposeVar(c.createNextAnimateFrameEvent(e.autoFollowChanged,e.autoOpacityFactorChanged));this.disposeVar(new c.ObjResettingWithEvent(a,()=>(this.ChangeAutoFollow(),new gO(e,i,this._czmSkyBoxComponents))))}{const a=()=>{this.ChangeAutoFollow()},s=this.disposeVar(c.createNextAnimateFrameEvent(e.sizeChanged,e.modeChanged,e.showChanged));this.dispose(s.disposableOn(a))}}ChangeAutoFollow(){const{czmViewer:e}=this;for(let i=Pt._eSLocalSkyBoxArr.length-1;i>=0;i--){const o=Pt._eSLocalSkyBoxArr[i];if(o.autoFollow&&o.show){e.xbsjLocalBoxSources={positiveX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/east.${o.mode!="blueSky"?"png":"jpg"}`,negativeX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/west.${o.mode!="blueSky"?"png":"jpg"}`,positiveY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/bottom.${o.mode!="blueSky"?"png":"jpg"}`,negativeY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/top.${o.mode!="blueSky"?"png":"jpg"}`,positiveZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/north.${o.mode!="blueSky"?"png":"jpg"}`,negativeZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/south.${o.mode!="blueSky"?"png":"jpg"}`};break}i==0&&(e.xbsjLocalBoxSources=Pt._defaultLocalBox)}Pt._eSLocalSkyBoxArr.length==0&&(e.xbsjLocalBoxSources=Pt._defaultLocalBox)}flyTo(e,i){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,i);{const a=o.size??c.ESLocalSkyBox.defaults.size;return o.position?(Gn(r,o,i,o.position,a,e,!0),!0):!1}}};L(Pt,"type",Pt.register("ESCesiumViewer",c.ESLocalSkyBox.type,Pt)),L(Pt,"_defaultLocalBox"),L(Pt,"_firstLoad",!0),L(Pt,"_eSLocalSkyBoxArr",[]);let gg=Pt;const ni=class ni extends He{constructor(e,i){super(e,i);L(this,"_geoCustomDivPoi");L(this,"_textFunc",this.disposeVar(c.react(void 0)));if(this._geoCustomDivPoi=this.disposeVar(new wt(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this.geoCustomDivPoi;this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.bind([r,"position"],[e,"position"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"]));{this.dispose(r.pickedEvent.disposableOn(a=>{(e.allowPicking??c.ESLocationMeasurement.defaults.allowPicking)&&e.pickedEvent.emit(a)})),this.dispose(r.innerHtmlMounted.disposableOn(a=>{const s=a.firstElementChild;s&&(s.style.pointerEvents="auto",s.style.cursor="default",s.onclick=l=>r.pickFromDiv(s,{type:"viewerPicking",pointerEvent:l}))}));{const a=()=>{if(!e.position)return;const l=(this.textFunc??ni.defaultTextFunc_度格式)(e.position);r.innerHTML=xo(l)};a();const s=this.disposeVar(c.createNextAnimateFrameEvent(e.positionChanged,this.textFuncChanged));this.dispose(s.disposableOn(a))}{const a=()=>{i.lonLatFormat??(i.lonLatFormat="DECIMAL_DEGREE"),this.textFunc=i.lonLatFormat=="DECIMAL_DEGREE"?ni.defaultTextFunc_度格式:i.lonLatFormat=="DEGREES_DECIMAL_MINUTES"?ni.defaultTextFunc_度分格式:ni.defaultTextFunc_度分秒格式};a(),this.d(i.lonLatFormatChanged.don(()=>{a()}))}}}get geoCustomDivPoi(){return this._geoCustomDivPoi}get textFunc(){return this._textFunc.value}set textFunc(e){this._textFunc.value=e}get textFuncChanged(){return this._textFunc.changed}flyTo(e,i){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(a.flyTo(e),o.flyOverEvent.emit(i,"over",r),!0):!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):(a.flyTo(e),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(ni,"type",ni.register("ESCesiumViewer",c.ESLocationMeasurement.type,ni)),L(ni,"defaultTextFunc_度格式",e=>{if(!e)return"";const[i=0,o=0,r=0]=e;return`经度: ${i.toFixed(5)}°
|
|
3104
|
+
`,xt=class xt extends c.Destroyable{constructor(e,i){super();L(this,"_flyToEvent",this.disposeVar(new c.Event));L(this,"_loadFuncReact",this.disposeVar(c.react(void 0)));L(this,"_dataSource",this.disposeVar(c.react(void 0)));L(this,"_data");L(this,"_defaultHeight",{});L(this,"_defaultBoundingSphere",new _.BoundingSphere);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}let r=()=>{this.dataSource&&o.dataSources.remove(this.dataSource,!0),this.dataSource=void 0,this._data=void 0};this.dispose(()=>{r()});{const a=this.dv(c.createProcessingFromAsyncFunc(async u=>{this.dataSource&&r(),this.url&&(typeof this.url=="object"?this._data=this.url:c.isJSON(this.url)?this._data=JSON.parse(this.url):await fetch(c.ESSceneObject.context.getStrFromEnv(this.url)).then(A=>A.json()).then(A=>{this._data=A}).catch(A=>{console.warn("ESGeoJson数据加载失败",A)}),this.dataSource=await _.GeoJsonDataSource.load(this._data),o.dataSources.add(this.dataSource).then(A=>{var f,d;const h=[];for(const p of A.entities.values)if(_.Entity.prototype&&(p.ESSceneObjectID=i),this._isEntityShow(p,e),p.polygon&&h.push(...(f=p.polygon.hierarchy)==null?void 0:f.getValue(_.JulianDate.now()).positions),p.polyline&&h.push(...(d=p.polyline.positions)==null?void 0:d.getValue(_.JulianDate.now())),p.position){const g=p.position.getValue(_.JulianDate.now());g&&h.push(g)}this._defaultBoundingSphere=_.BoundingSphere.fromPoints(h)}))})),s=()=>{a.isRunning&&a.cancel(),a.restart()};s();const l=this.dv(c.createNextAnimateFrameEvent(this.loadFunChanged,this.urlChanged));this.dispose(l.don(s))}{const a=()=>{var l,u;if(this.dataSource)if(this.dataSource.show=this.show,this.loadFun)try{this.loadFun(this.dataSource)}catch(A){console.error(A)}else{const A=this.dataSource.entities.values;for(let h=0;h<A.length;h++){const f=A[h];if(f.polygon){this._defaultHeight[f.id]||(this._defaultHeight[f.id]=(l=f.polygon.height)==null?void 0:l.getValue(_.JulianDate.now())),f.polygon.height=this.fillGround?void 0:new _.ConstantProperty(this._defaultHeight[f.id]),f.polygon.perPositionHeight=new _.ConstantProperty(!this.fillGround),f.polygon.heightReference=new _.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?_.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?_.HeightReference.CLAMP_TO_GROUND:_.HeightReference.RELATIVE_TO_GROUND),f.polygon.show=new _.ConstantProperty(this.filled??xt.defaults.filled),f.polygon.material=new _.ColorMaterialProperty(new _.Color(...this.fillColor??xt.defaults.fillColor)),f.polygon.outline=new _.ConstantProperty(!1),f.polygon.classificationType=_.ClassificationType[this.classificationType.toUpperCase()],f.polyline=new _.PolylineGraphics;const d=JSON.parse(JSON.stringify((u=f.polygon.hierarchy)==null?void 0:u.getValue(_.JulianDate.now()).positions));_.Cartesian3.equals(d[0],d[d.length-1])||d.push(d[0]),f.polyline.positions=d,f.polyline.classificationType=_.ClassificationType[this.classificationType.toUpperCase()]}if(f.polyline&&(f.polyline.classificationType=_.ClassificationType[this.classificationType.toUpperCase()],f.polyline.show=new _.ConstantProperty(this.stroked??xt.defaults.stroked),f.polyline.width=new _.ConstantProperty(this.strokeWidth??xt.defaults.strokeWidth),f.polyline.material=new _.ColorMaterialProperty(new _.Color(...this.strokeColor??xt.defaults.strokeColor)),f.polyline.clampToGround=new _.ConstantProperty(this.strokeGround)),f.billboard){f.billboard.show=new _.ConstantProperty(this.imageShow??xt.defaults.imageShow),f.billboard.width=new _.ConstantProperty(this.imageSize?this.imageSize[0]:xt.defaults.imageSize[0]),f.billboard.height=new _.ConstantProperty(this.imageSize?this.imageSize[1]:xt.defaults.imageSize[1]);const d=this.imageUrl?typeof this.imageUrl=="string"?this.imageUrl:this.imageUrl.url:xt.defaults.imageUrl;f.billboard.image=new _.ConstantProperty(c.ESSceneObject.context.getStrFromEnv(d)),f.billboard.horizontalOrigin=new _.ConstantProperty(_.HorizontalOrigin.LEFT),f.billboard.verticalOrigin=new _.ConstantProperty(_.VerticalOrigin.TOP),f.billboard.heightReference=new _.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?_.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?_.HeightReference.CLAMP_TO_GROUND:_.HeightReference.RELATIVE_TO_GROUND);const p=this.imageAnchor??xt.defaults.imageAnchor,g=this.imageOffset??xt.defaults.imageOffset;if(f.billboard.pixelOffset=new _.ConstantProperty(_.Cartesian2.fromArray([-p[0]*f.billboard.width.getValue(_.JulianDate.now())+g[0],-p[1]*f.billboard.height.getValue(_.JulianDate.now())+g[1]])),f.label=new _.LabelGraphics,!f.label)return;f.label.show=new _.ConstantProperty(this.textShow??xt.defaults.textShow),f.label.heightReference=new _.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?_.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?_.HeightReference.CLAMP_TO_GROUND:_.HeightReference.RELATIVE_TO_GROUND),f.label.text=new _.ConstantProperty(this.textProperty&&this.textProperty!==""&&f.properties&&f.properties[this.textProperty]?f.properties[this.textProperty].getValue():this.textDefaultText??xt.defaults.textDefaultText),f.label.fillColor=new _.ConstantProperty(new _.Color(...this.textColor??xt.defaults.textColor)),f.label.showBackground=new _.ConstantProperty(this.textBackgroundColor!=null);const v=this.textFontSize&&this.textFontSize!=0?this.textFontSize:xt.defaults.textFontSize,y=this.textOffset??xt.defaults.textOffset;f.label.backgroundColor=new _.ConstantProperty(new _.Color(...this.textBackgroundColor??xt.defaults.textBackgroundColor)),f.label.font=new _.ConstantProperty(`${this.textFontStyle} ${this.textFontWeight} ${v}px ${this.textFontFamily??xt.defaults.textFontFamily}`),f.label.horizontalOrigin=new _.ConstantProperty(_.HorizontalOrigin.LEFT),f.label.verticalOrigin=new _.ConstantProperty(_.VerticalOrigin.TOP),f.label.eyeOffset=new _.ConstantProperty(_.Cartesian3.fromArray([0,0,-1]));const m=this.textAnchor??xt.defaults.textAnchor;f.label.pixelOffset=new _.ConstantProperty(_.Cartesian2.fromArray([-m[0]*((this.textBackgroundColor?-14:0)+this._getTextPixelWidth(f.label.text.getValue(_.JulianDate.now()),f.label.font.getValue(_.JulianDate.now())))+y[0],-m[1]*((this.textBackgroundColor?10:0)+v)+y[1]]))}}}};a();const s=this.dv(c.createNextAnimateFrameEvent(this._dataSource.changed,this.showChanged,this.strokedChanged,this.strokeWidthChanged,this.strokeWidthTypeChanged,this.strokeColorChanged,this.strokeMaterialChanged,this.strokeMaterialParamsChanged,this.strokeGroundChanged,this.filledChanged,this.fillColorChanged,this.fillMaterialChanged,this.fillMaterialParamsChanged,this.fillGroundChanged,this.imageShowChanged,this.imageUrlChanged,this.imageSizeChanged,this.imageAnchorChanged,this.imageOffsetChanged,this.textShowChanged,this.textPropertyChanged,this.textDefaultTextChanged,this.textColorChanged,this.textBackgroundColorChanged,this.textFontFamilyChanged,this.textFontSizeChanged,this.textFontStyleChanged,this.textFontWeightChanged,this.textAnchorChanged,this.textOffsetChanged,this.heightReferenceChanged,this.classificationTypeChanged));this.dispose(s.don(a))}{const a=()=>{if(!this.dataSource)return;const l=this.dataSource.entities.values;for(let u=0;u<l.length;u++){const A=l[u];this._isEntityShow(A,e)}};a();const s=this.ad(c.createNextAnimateFrameEvent(this.minFeatureVisibleDistanceChanged,this.maxFeatureVisibleDistanceChanged,e.cameraChanged,this.showChanged));this.ad(s.don(a))}{const a=()=>{if(this.loadFuncStr)try{const s=Function(`"use strict";return (${this.loadFuncStr})`)();this.loadFun=s}catch(s){console.error(s),this.loadFun=void 0}else this.loadFun=void 0};a(),this.dispose(this.loadFuncStrChanged.disposableOn(a))}this.dispose(this.flyToEvent.disposableOn(a=>{e.actived&&this.dataSource&&(a!==void 0?o.flyTo(this.dataSource,{duration:a/1e3}).then(s=>{s||o.camera.flyToBoundingSphere(this._defaultBoundingSphere,{duration:a/1e3})}):o.flyTo(this.dataSource).then(s=>{s||o.camera.flyToBoundingSphere(this._defaultBoundingSphere)}))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get loadFun(){return this._loadFuncReact.value}set loadFun(e){this._loadFuncReact.value=e}get loadFunChanged(){return this._loadFuncReact.changed}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}_getTextPixelWidth(e,i="16px sans-serif"){const r=document.createElement("canvas").getContext("2d");return r.font=i,r.measureText(e).width}_isEntityShow(e,i){var o;if(this.minFeatureVisibleDistance==0&&this.maxFeatureVisibleDistance==0){e.show=this.show;return}if((o=i.viewer)!=null&&o.camera&&this.show){let r;if(e.polygon&&e.polygon.hierarchy)r=c.getMinMaxCorner(e.polygon.hierarchy.getValue(_.JulianDate.now()).positions.map(l=>Ue(l))).center;else if(e.polyline&&e.polyline.positions)r=c.getMinMaxCorner(e.polyline.positions.getValue(_.JulianDate.now()).map(l=>Ue(l))).center;else if(e.position){const l=e.position.getValue(_.JulianDate.now());l&&(r=Ue(l))}if(!r||isNaN(r[0]))return;const a=c.getDistancesFromPositions([r,Fn(i.viewer.camera)],"NONE")[0];let s=!1;this.minFeatureVisibleDistance<this.maxFeatureVisibleDistance?s=this.minFeatureVisibleDistance<a&&a<this.maxFeatureVisibleDistance:this.maxFeatureVisibleDistance==0?s=a>this.minFeatureVisibleDistance:this.minFeatureVisibleDistance==0&&(s=a<this.maxFeatureVisibleDistance),e.show=this.show&&s}}};L(xt,"defaults",{show:!0,allowPicking:!0,url:Qx,defaultLoadFuncStr:kx,defaultLoadFuncDocStr:pO,data:AO,dataMd:fO,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/misc/location.png",imageSize:[64,64],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:[.79,.91,.06,1],textFontFamily:"Arial",textFontSize:16,textFontWeight:"normal",textFontStyle:"normal",textAnchor:[.5,1],textOffset:[0,0],strokeWidthTypes:[["screen","screen"],["world","world"]],minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Ko=xt;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:void 0,loadFuncStr:void 0,url:void 0,stroked:void 0,strokeWidth:void 0,strokeWidthType:"world",strokeColor:c.reactArrayWithUndefined(void 0),strokeMaterial:void 0,strokeMaterialParams:c.reactJsonWithUndefined(void 0),strokeGround:void 0,filled:void 0,fillColor:c.reactArrayWithUndefined(void 0),fillMaterial:void 0,fillMaterialParams:c.reactJsonWithUndefined(void 0),fillGround:void 0,imageShow:void 0,imageUrl:void 0,imageSize:c.reactArrayWithUndefined(void 0),imageAnchor:c.reactArrayWithUndefined(void 0),imageOffset:c.reactArrayWithUndefined(void 0),textShow:void 0,textProperty:void 0,textDefaultText:void 0,textColor:c.reactArrayWithUndefined(void 0),textBackgroundColor:c.reactArrayWithUndefined(void 0),textFontFamily:void 0,textFontSize:void 0,textFontStyle:void 0,textFontWeight:void 0,textAnchor:c.reactArrayWithUndefined(void 0),textOffset:c.reactArrayWithUndefined(void 0),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE",classificationType:"TERRAIN"})})(Ko||(Ko={})),c.extendClassProps(Ko.prototype,Ko.createDefaultProps);const Ju=class Ju extends Nn{constructor(n,e){if(super(n,e),!e.viewer){console.warn("viewer is undefined!");return}const o=this.ad(new Ko(e,n.id));this.ad(c.track([o,"show"],[n,"show"])),this.ad(c.track([o,"allowPicking"],[n,"allowPicking"])),this.ad(c.track([o,"loadFuncStr"],[n,"loadFuncStr"])),this.ad(c.track([o,"url"],[n,"features"])),this.ad(c.track([o,"stroked"],[n,"stroked"])),this.ad(c.track([o,"strokeWidth"],[n,"strokeWidth"])),this.ad(c.track([o,"strokeWidthType"],[n,"strokeWidthType"])),this.ad(c.track([o,"strokeColor"],[n,"strokeColor"])),this.ad(c.track([o,"strokeMaterial"],[n,"strokeMaterial"])),this.ad(c.track([o,"strokeMaterialParams"],[n,"strokeMaterialParams"])),this.ad(c.track([o,"strokeGround"],[n,"strokeGround"])),this.ad(c.track([o,"filled"],[n,"filled"])),this.ad(c.track([o,"fillColor"],[n,"fillColor"])),this.ad(c.track([o,"fillMaterial"],[n,"fillMaterial"])),this.ad(c.track([o,"fillMaterialParams"],[n,"fillMaterialParams"])),this.ad(c.track([o,"fillGround"],[n,"fillGround"])),this.ad(c.track([o,"imageShow"],[n,"imageShow"])),this.ad(c.track([o,"imageUrl"],[n,"imageUrl"])),this.ad(c.track([o,"imageSize"],[n,"imageSize"])),this.ad(c.track([o,"imageAnchor"],[n,"imageAnchor"])),this.ad(c.track([o,"imageOffset"],[n,"imageOffset"])),this.ad(c.track([o,"textShow"],[n,"textShow"])),this.ad(c.track([o,"textProperty"],[n,"textProperty"])),this.ad(c.track([o,"textDefaultText"],[n,"textDefaultText"])),this.ad(c.track([o,"textColor"],[n,"textColor"])),this.ad(c.track([o,"textBackgroundColor"],[n,"textBackgroundColor"])),this.ad(c.track([o,"textFontFamily"],[n,"textFontFamily"])),this.ad(c.track([o,"textFontSize"],[n,"textFontSize"])),this.ad(c.track([o,"textFontStyle"],[n,"textFontStyle"])),this.ad(c.track([o,"textFontWeight"],[n,"textFontWeight"])),this.ad(c.track([o,"textAnchor"],[n,"textAnchor"])),this.ad(c.track([o,"textOffset"],[n,"textOffset"])),this.ad(c.track([o,"minFeatureVisibleDistance"],[n,"minFeatureVisibleDistance"])),this.ad(c.track([o,"maxFeatureVisibleDistance"],[n,"maxFeatureVisibleDistance"])),this.ad(c.track([o,"heightReference"],[n,"heightReference"])),this.ad(c.track([o,"classificationType"],[n,"classificationType"])),this.ad(n.flyToEvent.disposableOn(r=>{if(e.actived){if(n.flyInParam){const{position:a,rotation:s,flyDuration:l}=n.flyInParam;return Fe(e.viewer,a,void 0,s,l),!0}o.flyTo(r&&r*1e3)}}));{const r=async(a,s,l)=>{if(!e.actived)return;const u=JSON.parse(JSON.stringify(this._getFeatureByIndexOrProperties(a,s)));if(!(!u||!(u!=null&&u.positions)))if(u.type=="Point"||u.type=="MultiPoint")Gn(e,n,this.id,await this._calculateFeatureHeight(u.type=="MultiPoint"?u.positions.flat():u.positions,n.heightReference,e),1e3,l);else{const A=u.type=="Polygon"||u.type=="MultiPolygon"||u.type=="MultiLineString";let h=[];A?h=u.positions.flat(u.type=="MultiPolygon"?2:1).map(g=>this._calculateFeatureHeight(g,n.fillGround?"CLAMP_TO_GROUND":"NONE",e)):h=u.positions.map(g=>this._calculateFeatureHeight(g,n.strokeGround?"CLAMP_TO_GROUND":"NONE",e));const{minPos:f,maxPos:d,center:p}=c.getMinMaxCorner(h);Gn(e,n,this.id,p,c.getDistancesFromPositions([f,d],"NONE")[0],l)}};this.d(n.flyToFeatureEvent.don((a,s,l)=>r(a,s,l))),this.d(n.flyToFeatureIndexEvent.don((a,s)=>r(a,void 0,s)))}}_getFeatureByIndexOrProperties(n,e){var a,s,l,u,A,h,f,d;const{sceneObject:i}=this,o=i.features;if(!o)return;const r=Reflect.get(o,"features")||Reflect.get(o,"geometries");if(r){if(e){let p=r.find(g=>(g==null?void 0:g.properties[n])==e);return{type:p!=null&&p.coordinates?p.type:(a=p==null?void 0:p.geometry)==null?void 0:a.type,positions:(p==null?void 0:p.coordinates)||((s=p==null?void 0:p.geometry)==null?void 0:s.coordinates)}}else if(typeof n=="number")return{type:(l=r[n])!=null&&l.coordinates?r[n].type:(A=(u=r[n])==null?void 0:u.geometry)==null?void 0:A.type,positions:((h=r[n])==null?void 0:h.coordinates)||((d=(f=r[n])==null?void 0:f.geometry)==null?void 0:d.coordinates)}}}async _calculateFeatureHeight(n,e,i){const o=[...n];return e=="NONE"?o[2]=o[2]??0:e=="CLAMP_TO_GROUND"||!o[2]?o[2]=await i.getTerrainHeight(o)??0:o[2]+=await i.getTerrainHeight(o)??0,o}};L(Ju,"type",Ju.register("ESCesiumViewer",c.ESGeoJson.type,Ju));let lg=Ju;const ec=class ec extends on{constructor(e,i){super(e,i);L(this,"_czmGeoESRectangle");L(this,"_geoPolyline");if(this._geoPolyline=this.disposeVar(new Ye(i,e.id)),this._czmGeoESRectangle=this.disposeVar(new Ci(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._czmGeoESRectangle,a=this._geoPolyline;a.arcType="RHUMB",this.dispose(c.track([a,"color"],[e,"strokeColor"])),this.dispose(c.track([a,"width"],[e,"strokeWidth"])),this.dispose(c.track([a,"ground"],[e,"strokeGround"])),this.dispose(c.track([r,"ground"],[e,"fillGround"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"]));{const s=()=>{a.show=e.show&&e.stroked,r.show=e.show&&e.filled};s();const l=this.disposeVar(c.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged,e.filledChanged));this.dispose(l.disposableOn(s))}{const s=()=>{e.filled?r.material={type:"Color",color:e.fillColor}:r.material=void 0};s();const l=this.disposeVar(c.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(l.disposableOn(s))}{const s=()=>{const l=e.points;if(l&&l.length>=2){const{minPos:u,maxPos:A}=c.getMinMaxCorner(l);r.rectangle=[u[0],u[1],A[0],A[1]],r.height=l[0][2],r.extrudedHeight=l[0][2];const h=l.map(g=>(l&&(g[2]=l[0][2]),g)),f=h[0],d=h[1],p=[f,[f[0],d[1],f[2]],d,[d[0],f[1],d[2]]];a.positions=[...p,f]}else r.rectangle=void 0,a.positions=void 0,r.height=0,r.extrudedHeight=0};s(),this.dispose(e.pointsChanged.disposableOn(()=>s()))}}get czmGeoESRectangle(){return this._czmGeoESRectangle}flyTo(e,i){const{sceneObject:o,czmViewer:r}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):o.points?(Me(r,o,i,o.points,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmGeoESRectangle:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):o.points?(Me(r,o,i,o.points,e),!0):!1:!1}};L(ec,"type",ec.register("ESCesiumViewer",c.ESGeoRectangle.type,ec));let ug=ec;class Zl extends c.Destroyable{constructor(e,i){super();L(this,"_flyToEvent",this.disposeVar(new c.Event));L(this,"_geoPolygon");this._geoPolygon=this.disposeVar(new zr(e,i));const{geoPolygon:o}=this;this.dispose(c.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(this.flyToEvent.disposableOn(a=>{o.flyTo(a)})),this.dispose(c.bind([o,"show"],[this,"show"])),this.dispose(c.bind([o,"fill"],[this,"filled"])),this.dispose(c.bind([o,"strokeGround"],[this,"strokeGround"])),this.dispose(c.bind([o,"ground"],[this,"ground"])),this.dispose(c.bind([o,"outline"],[this,"outline"])),this.dispose(c.bind([o,"outlineColor"],[this,"outlineColor"])),this.dispose(c.bind([o,"outlineWidth"],[this,"outlineWidth"])),this.dispose(c.bind([o,"color"],[this,"color"])),this.dispose(c.bind([o,"depth"],[this,"depth"]));const r=()=>{if(this.positions&&this.positions.length>=2){const a=Tp([...this.positions,this.positions[0]]);o.positions=a}else o.positions=void 0};r(),this.dispose(this.positionsChanged.disposableOn(r))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygon(){return this._geoPolygon}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outline:!1,filled:!0,outlineColor:c.reactArray([1,1,1,1]),outlineWidth:1,color:c.reactArrayWithUndefined([1,1,1,.5]),positions:c.reactPositions(void 0),depth:0})})(Zl||(Zl={})),c.extendClassProps(Zl.prototype,Zl.createDefaultProps);const tc=class tc extends on{constructor(e,i){super(e,i);L(this,"_geoSmoothPolygon");if(this._geoSmoothPolygon=this.disposeVar(new Zl(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._geoSmoothPolygon;this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.bind([r,"positions"],[e,"points"])),this.dispose(c.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(c.track([r,"outline"],[e,"stroked"])),this.dispose(c.track([r,"outlineColor"],[e,"strokeColor"])),this.dispose(c.track([r,"outlineWidth"],[e,"strokeWidth"])),this.dispose(c.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(c.track([r,"filled"],[e,"filled"])),this.dispose(c.track([r,"color"],[e,"fillColor"])),this.dispose(c.track([r,"ground"],[e,"ground"]));{const a=()=>{r.ground=e.ground||e.fillGround};a();const s=this.dv(c.createNextAnimateFrameEvent(e.groundChanged,e.fillGroundChanged));this.d(s.don(a))}{const a=()=>{r.color=e.filled?e.fillColor:Kl.defaults.fillStyle.color};a();const s=this.disposeVar(c.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(s.disposableOn(a))}this.dispose(c.track([r,"depth"],[e,"depth"]))}get geoSmoothPolygon(){return this._geoSmoothPolygon}flyTo(e,i){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):a.positions?(Me(r,o,i,a.positions,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):a.positions?(Me(r,o,i,a.positions,e),!0):!1:!1}};L(tc,"type",tc.register("ESCesiumViewer",Kl.type,tc));let cg=tc;const nc=class nc extends He{constructor(e,i){super(e,i);L(this,"_czmModel");const o=i.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModel=this.dv(new Ht(i,e.id));const r=this._czmModel;this.d(r.readyEvent.don(s=>{var l;r.activeAnimationsJson=(l=r.gltf.animations)==null?void 0:l.map((u,A)=>({index:A,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"})),e.czmModelReadyEvent.emit(s),e.readyEvent.emit(s)})),this.ad(new Bh(o,this._czmModel)),this.d(c.track([r,"show"],[e,"show"])),this.d(c.track([r,"color"],[e,"czmColor"])),this.d(c.track([r,"nativeMaximumScale"],[e,"czmMaximumScale"])),this.d(c.track([r,"nativeMinimumPixelSize"],[e,"czmMinimumPixelSize"])),this.d(c.bind([r,"position"],[e,"position"])),this.d(c.track([r,"nativeScale"],[e,"czmNativeScale"])),this.d(c.track([r,"scale"],[e,"scale"])),this.ad(c.track([r,"imageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(c.track([r,"environmentMapManager"],[e,"czmEnvironmentMapManager"]));{const s=l=>{e.czmEnvironmentMapManager=e.czmEnvironmentMapManager?{...e.czmEnvironmentMapManager,atmosphereScatteringIntensity:l}:{atmosphereScatteringIntensity:l}};s(e.czmAtmosphereScatteringIntensity),this.ad(e.czmAtmosphereScatteringIntensityChanged.don(l=>s(l)))}{const s=()=>{var l,u;(l=e.czmEnvironmentMapManager)!=null&&l.atmosphereScatteringIntensity&&(e.czmAtmosphereScatteringIntensity=(u=e.czmEnvironmentMapManager)==null?void 0:u.atmosphereScatteringIntensity)};s(),this.ad(e.czmEnvironmentMapManagerChanged.don(s))}{const s=()=>{const l=[...e.rotation??[0,0,0]];l[0]+=e.instances&&e.instances.length!=0?0:90,r.rotation=l};s(),this.d(e.rotationChanged.don(s));{const l=()=>{if(s(),!e.instances){r.instances=e.instances;return}r.instances=e.instances.map(u=>{const A=JSON.parse(JSON.stringify(u));return!A.rotation&&(A.rotation=[0,0,0]),A.rotation[0]+=90,A})};l(),this.ad(e.instancesChanged.don(l))}}this.ad(e.setMaterialEvent.don(s=>{r.setMaterial(s)}));{const s=()=>{const l=[...r.rotation];l[0]-=e.instances&&e.instances.length!=0?0:90,e.rotation=l};s(),this.d(r.rotationChanged.don(s))}{const s=this.dv(c.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),l=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};l(),this.d(s.don(l))}const a=()=>{var s;r.url=c.ESSceneObject.context.getStrFromEnv(Th(typeof e.url=="string"?e.url:((s=e.url)==null?void 0:s.url)??c.ESGltfModel.defaults.url))};a(),this.d(e.urlChanged.don(a)),this.d(e.setNodePositionEvent.don((s,l)=>{r.setNodeTranslation(s,l)})),this.d(e.setNodeRotationEvent.don((s,l)=>{r.setNodeRotation(s,l)})),this.d(e.setNodeScaleEvent.don((s,l)=>{r.setNodeScale(s,l)})),this.d(e.printDebugInfoEvent.don(()=>{r.printDebugInfo()}))}get model(){return this._czmModel}flyTo(e,i){const{sceneObject:o,czmViewer:r,model:a}=this;return r.actived?o.flyToParam||o.flyInParam?(super.flyTo(e,i),!0):(a&&wn(r,o,i,e,a,!0),!!a):!1}};L(nc,"type",nc.register("ESCesiumViewer",c.ESGltfModel.type,nc));let hg=nc;function Vx(t,n){const e=t[0]-n[0],i=t[1]-n[1],o=t[2]-n[2];return Math.sqrt(e*e+i*i+o*o)}class $l extends c.Destroyable{constructor(e,i){super();L(this,"_pickedEvent",this.disposeVar(new c.Event));L(this,"_flyToEvent",this.disposeVar(new c.Event));L(this,"_distance",this.disposeVar(c.react(0)));L(this,"_surfaceDistance",this.disposeVar(c.react(0)));L(this,"_height",this.disposeVar(c.react(0)));L(this,"_middlePosition",this.disposeVar(c.reactArrayWithUndefined(void 0)));L(this,"_heightPosition",this.disposeVar(c.reactArrayWithUndefined(void 0)));const o=()=>{if(this.positions)if(this.positions.length>=2)if(this._middlePosition.value=[this.positions[0][0],this.positions[0][1],this.positions[1][2]],this._heightPosition.value=[this.positions[0][0],this.positions[0][1],.5*(this.positions[1][2]+this.positions[0][2])],this.arcType===void 0||this.arcType==="GEODESIC"){const a=this._surfaceDistance.value=c.geoDistance(this.positions[0],this.positions[1]),s=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(a*a+s*s)}else if(this.arcType==="RHUMB"){const a=this._surfaceDistance.value=c.geoRhumbDistance(this.positions[0],this.positions[1]),s=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(a*a+s*s)}else if(this.arcType==="NONE"){const a=c.lbhToXyz(this.positions[0]),s=c.lbhToXyz(this.positions[1]);this._distance.value=Vx(a,s),this._surfaceDistance.value=Vx(c.lbhToXyz(this._middlePosition.value),s),this._height.value=this.positions[1][2]-this.positions[0][2]}else console.warn(`未知的arcType: ${this.arcType},导致距离无法计算!`);else this._heightPosition.value=void 0,this._distance.value=0,this._surfaceDistance.value=0,this._height.value=0};o();const r=this.disposeVar(c.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged));this.dispose(r.disposableOn(o));{const a=this.disposeVar(new Ye(e,i));a.ground=!1,a.loop=!1,this.dispose(c.track([a,"allowPicking"],[this,"allowPicking"])),this.dispose(c.bind([a,"arcType"],[this,"arcType"])),this.dispose(c.bind([a,"color"],[this,"color"])),this.dispose(c.bind([a,"dashLength"],[this,"dashLength"])),this.dispose(c.bind([a,"dashPattern"],[this,"dashPattern"])),this.dispose(c.bind([a,"gapColor"],[this,"gapColor"])),this.dispose(c.bind([a,"hasArrow"],[this,"hasArrow"])),this.dispose(c.bind([a,"hasDash"],[this,"hasDash"])),this.dispose(c.bind([a,"show"],[this,"show"])),this.dispose(c.bind([a,"width"],[this,"width"])),this.dispose(c.bind([a,"depthTest"],[this,"depthTest"]));{a.loop=!0;const l=()=>{if(this.positions&&this.positions.length===2){const[u,A]=this.positions;a.positions=[u,A,[u[0],u[1],A[2]]]}else a.positions=void 0};l(),this.dispose(this.positionsChanged.disposableOn(l))}this.dispose(this.flyToEvent.disposableOn(l=>{e.actived&&a.flyTo(l)}));const s=this.disposeVar(new wt(e,i));this.dispose(c.track([s,"shadowDom"],[this,"shadowDom"])),this.dispose(c.track([s,"cssAllInitial"],[this,"cssAllInitial"])),this.dispose(c.track([s,"show"],[this,"show"]));{const l=()=>{s.position=this.heightPosition};l(),this.dispose(this.heightPositionChanged.disposableOn(l))}{const l=()=>{s.innerHTML=xo(`高度: ${Ih(this.height)}`,0)};l(),this.dispose(this.heightChanged.disposableOn(l))}this.ad(s.pickedEvent.don(l=>{Gi(l)===0&&this.pickedEvent.emit(l)}))}}get pickedEvent(){return this._pickedEvent}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}get surfaceDistance(){return this._surfaceDistance.value}get surfaceDistanceChanged(){return this._surfaceDistance.changed}get height(){return this._height.value}get heightChanged(){return this._height.changed}get middlePosition(){return this._middlePosition.value}get middlePositionChanged(){return this._middlePosition.changed}get heightPosition(){return this._heightPosition.value}get heightPositionChanged(){return this._heightPosition.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,positions:c.reactPositions(void 0),width:1,color:c.reactArray([1,1,1,1]),hasDash:!1,gapColor:c.reactArrayWithUndefined([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",depthTest:!1,shadowDom:!1,cssAllInitial:!1})})($l||($l={})),c.extendClassProps($l.prototype,$l.createDefaultProps);const ic=class ic extends on{constructor(e,i){super(e,i);L(this,"_geoHeightMeasurement");if(this._geoHeightMeasurement=this.disposeVar(new $l(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const{czmHeightMeasurement:r}=this;this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(c.bind([r,"positions"],[e,"points"]));{const a=()=>{if(e.stroked)r.width=e.strokeWidth;else{r.width=0;return}r.width=e.strokeWidth,r.color=e.strokeColor;const u=e.strokeMaterial??"normal";u==="hasDash"?(r.hasDash=!0,r.hasArrow=!1):u==="hasArrow"?(r.hasDash=!1,r.hasArrow=!0):(r.hasDash=!1,r.hasArrow=!1);const A=e.strokeStyle;if(A.material==="hasDash"&&A.materialParams)try{const h=A.materialParams;Reflect.has(h,"gapColor")&&(r.gapColor=h.gapColor??[0,0,0,0]),Reflect.has(h,"dashLength")&&(r.dashLength=h.dashLength),Reflect.has(h,"dashPattern")&&(r.dashPattern=h.dashPattern)}catch(h){console.error(h)}else r.gapColor=[0,0,0,0],r.dashLength=0,r.dashPattern=0};a();const s=this.disposeVar(c.createNextAnimateFrameEvent(e.strokeStyleChanged,e.strokedChanged));this.dispose(s.disposableOn(a))}this.dispose(r.pickedEvent.disposableOn(a=>{Gi(a)===0&&(e.allowPicking??!1)&&e.pickedEvent.emit(a)}))}get czmHeightMeasurement(){return this._geoHeightMeasurement}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):a.positions?(Me(r,o,i,a.positions,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):a.positions?(Me(r,o,i,a.positions,e),!0):!1:!1}};L(ic,"type",ic.register("ESCesiumViewer",c.ESHeightMeasurement.type,ic));let Ag=ic;const fg={czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]},rc=class rc extends He{constructor(e,i){super(e,i);L(this,"_czmModelPrimitive");const o=i.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModelPrimitive=this.disposeVar(new Ht(i,this.sceneObject.id));const r=this._czmModelPrimitive;this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.bind([r,"position"],[e,"position"])),this.dispose(Mt([r,"rotation"],[e,"rotation"])),this.dispose(c.bind([r,"scale"],[e,"scale"])),this.d(r.readyEvent.don(g=>{e.readyEvent.emit(g)}));{const g=this.dv(c.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),v=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};v(),this.d(g.don(v))}const a=c.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/worker.glb"),s=c.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/police.glb"),l=c.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/pedestrian.glb"),u=c.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/Stranger.glb"),A=c.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsMan.glb"),h=c.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsWoman.glb"),f=()=>{switch(e.mode){case"worker":r.url=a;break;case"police":r.url=s;break;case"pedestrian":r.url=l;break;case"stranger":r.url=u;break;case"suitMan":r.url=A;break;case"suitWoman":r.url=h;break;default:r.url=a;break}};this.dispose(e.modeChanged.disposableOn(()=>{f()})),f();const d=()=>{const g=e.animation??c.ESHuman.defaults.animation;if(!e.show){r.activeAnimationsJson=void 0;return}g==="walking"?r.activeAnimationsJson=fg.czmAnimationsWalk:g==="standing"?r.activeAnimationsJson=fg.czmAnimationsStand:g==="running"&&(r.activeAnimationsJson=fg.czmAnimationsRun)};d();const p=this.ad(c.createNextAnimateFrameEvent(e.showChanged,e.animationChanged));this.dispose(p.disposableOn(()=>d())),this.ad(new Bh(o,r))}get czmModelPrimitive(){return this._czmModelPrimitive}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmModelPrimitive:a}=this;return!r.actived||!r.viewer?!1:o.flyToParam||o.flyInParam?(super.flyTo(e,i),!0):(a&&wn(r,o,i,e,a,!0),!!a)}};L(rc,"type",rc.register("ESCesiumViewer",c.ESHuman.type,rc));let pg=rc;class Nx extends c.Destroyable{constructor(e,i){super();L(this,"_czmGeoCanvasImagePoi");L(this,"flyTo",(e,i)=>{if(this.czmGeoCanvasImagePoi.position){Fe(this.czmViewer.viewer,this.czmGeoCanvasImagePoi.position,1e3,Hn,e);return}this.czmGeoCanvasImagePoi.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=i,this._czmGeoCanvasImagePoi=this.disposeVar(new yi(i));const o=this._czmGeoCanvasImagePoi;o.pickOnClick=!0,this.d(o.pickedEvent.don(r=>{(e.allowPicking??!1)&&e.pickedEvent.emit(r)}));{const r=A=>{let h=A;return A.includes("inner://")&&(h="${earthsdk3-assets-script-dir}/assets/img/points/"+A.split("inner://")[1]),c.ESSceneObject.context.getStrFromEnv(Th(h))},a=()=>{const A=r(typeof e.url=="string"?e.url:e.url.url);if(o.imageUri=A,e.sizeByContent){const f=new Image;f.src=A,f.onload=()=>{o.size=[f.width,f.height]}}else{const f=e.size;o.size=[...f]}},s=this.disposeVar(c.createNextAnimateFrameEvent(e.urlChanged,e.sizeByContentChanged,e.sizeChanged));this.dispose(s.disposableOn(()=>a())),a(),this.d(c.track([o,"zOrder"],[e,"zOrder"])),this.dispose(c.track([o,"show"],[e,"show"])),this.dispose(c.bind([o,"position"],[e,"position"])),this.ad(c.bind([o,"isHoverZoom"],[e,"isHoverZoom"]));{const A=()=>{o.scale=[e.scale[1],e.scale[2]]};A(),this.dispose(e.scaleChanged.don(A))}const l=()=>{const A=e.anchor,h=e.offset;A?o.originRatioAndOffset=[...A,-h[0],-h[1]]:o.originRatioAndOffset=[0,0,0,0]},u=this.ad(c.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(u.disposableOn(()=>l())),l(),this.dispose(o.clickEvent.disposableOn(A=>{const{offsetX:h,offsetY:f}=A,p={type:A.button===0?"leftClick":A.button===2?"rightClick":void 0,add:{mousePos:[h,f]}};e.widgetEvent.emit(p)})),this.dispose(o.hoveredChanged.disposableOn(A=>{if(A===void 0)return;const h={type:A?"mouseEnter":"mouseLeave"};e.widgetEvent.emit(h)}))}}get czmGeoCanvasImagePoi(){return this._czmGeoCanvasImagePoi}}class Hx extends c.Destroyable{constructor(e,i,o){super();L(this,"_czmGeoImageModel");L(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});L(this,"_isPointEvent",!1);L(this,"flyTo",(e,i)=>{if(this.czmGeoImageModel.position)return Gn(this.czmViewer,this.sceneObject,i,this.sceneObject.position,Math.max(...this.czmGeoImageModel.size),e,!0);this.czmGeoImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=i,this._czmGeoImageModel=this.disposeVar(new $i(i,e.id));const r=this._czmGeoImageModel;this.ad(i.clickEvent.don(f=>{const d=f==null?void 0:f.pointerEvent;d&&(this._isPointEvent=!0,this._eventInfo={type:d.button==0?"leftClick":d.button==2?"rightClick":"leftClick",add:{mousePos:[d.offsetX,d.offsetY]}})})),this.d(e.pickedEvent.don(f=>{var d,p,g;f.screenPosition&&this._isPointEvent&&f.attachedInfo!="innerHoverEvent"&&((d=this._eventInfo.add)!=null&&d.mousePos)&&Math.abs(f.screenPosition[0]-((p=this._eventInfo.add)==null?void 0:p.mousePos[0]))<1&&Math.abs(f.screenPosition[1]-((g=this._eventInfo.add)==null?void 0:g.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),c.registerCreatedEventUpdate(this,e,()=>{const f=i.getEngineObject(e);this.ad(f.lastHoverResultChanged.don((d,p)=>{(d==null?void 0:d.sceneObject)==(p==null?void 0:p.sceneObject)||(d==null?void 0:d.sceneObject)!=e&&(p==null?void 0:p.sceneObject)!=e||(d!=null&&d.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:d==null?void 0:d.screenPosition}},d.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&d.sceneObject.id==e.id&&(r.scale=[r.scale[0]*1.5,r.scale[1]*1.5])),p!=null&&p.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:d==null?void 0:d.screenPosition}},p.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&p.sceneObject.id==e.id&&(r.scale=[r.scale[0]/1.5,r.scale[1]/1.5])))}))});const a=e.sizeByContent,l=(f=>{let d=f;return f.includes("inner://")&&(d="${earthsdk3-assets-script-dir}/assets/img/points/"+f.split("inner://")[1]),c.ESSceneObject.context.getStrFromEnv(Th(d))})(typeof o.sceneObject.url=="string"?o.sceneObject.url:o.sceneObject.url.url),u=new Image;u.src=l,u.onload=()=>{if(a)r.size=[u.width/100,u.height/100];else{const f=e.size;r.size=[f[0]/100,f[1]/100]}},r.uri=l,this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.bind([r,"position"],[e,"position"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"])),r.pixelSize=void 0,r.useAxis="XZ";{const f=()=>{r.scale=[e.scale[1],e.scale[2]]};f(),this.d(e.scaleChanged.don(f))}{const f=()=>{e.rotationType===0&&(r.rotationMode="WithProp",this.d(Mt([r,"rotation"],[e,"rotation"]))),e.rotationType===1&&(r.rotationMode="WithCamera"),e.rotationType===2&&(r.rotationMode="WithCameraOnlyZ")};f(),this.dispose(e.rotationTypeChanged.disposableOn(f))}const A=()=>{const f=e.anchor,d=e.offset;f?r.originRatioAndOffset=[...f,-d[0]/100,-d[1]/100]:r.originRatioAndOffset=[0,0,0,0]},h=this.ad(c.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(h.disposableOn(()=>A())),A()}get czmGeoImageModel(){return this._czmGeoImageModel}}const oc=class oc extends Gl{constructor(e,i){super(e,i);L(this,"_resetting");if(!i.viewer){console.warn("viewer is undefined!");return}const r=this.disposeVar(c.createNextAnimateFrameEvent(this.sceneObject.urlChanged,this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged));this._resetting=this.disposeVar(new c.ObjResettingWithEvent(r,()=>this.sceneObject.screenRender?new Nx(this.sceneObject,this.czmViewer):new Hx(this.sceneObject,this.czmViewer,this)))}get resetting(){return this._resetting}flyTo(e,i){const{sceneObject:o,czmViewer:r,resetting:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(a&&a.obj&&a.obj.flyTo(e,i),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(oc,"type",oc.register("ESCesiumViewer",c.ESImageLabel.type,oc));let dg=oc;function dO(t){switch(t){case"wms":return"WebMapServiceImageryProvider";case"tms":return"TileMapServiceImageryProvider";case"wmts":return"WebMapTileServiceImageryProvider";case"xyz":return"UrlTemplateImageryProvider";case"ion":return"IonImageryProvider"}}const sc=class sc extends Nn{constructor(e,i){super(e,i);L(this,"_czmImagery");if(this._czmImagery=this.dv(new Zr(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._czmImagery;{const a=this.ad(c.reactJson(""));{const u=()=>{if(typeof e.url=="string")a.value=c.ESSceneObject.context.getStrFromEnv(e.url);else{const A=e.url;A.url=c.ESSceneObject.context.getStrFromEnv(A.url),a.value=A}};u(),this.ad(e.urlChanged.don(u))}const s=()=>{var p;if(!a.value)return;const u=(((p=e.options)==null?void 0:p.type)??"auto").toLowerCase(),A=e.options??{};let h={type:"UrlTemplateImageryProvider",url:a.value,rectangle:e.rectangle,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,...A},f=a.value,d=typeof f=="string"?f:f.url;if(u==="auto"){const g=d.toLowerCase();if(g.startsWith("ion://")){const y=+g.substring(6);h={...A,assetId:y,type:"IonImageryProvider"}}else if(g.includes("{x}")||g.includes("{y}")||g.includes("{z}"))h.type="UrlTemplateImageryProvider";else if(g.includes("wmts"))h.type="WebMapTileServiceImageryProvider";else if(g.includes("wms"))h.type="WebMapServiceImageryProvider";else{if(d.includes("/tilemapresource.xml")){const v=d.split("/tilemapresource.xml").join("");typeof f=="string"?f=v:f.url=v,h.url=f}h.type="TileMapServiceImageryProvider"}}else{if(u==="tms"&&d.includes("/tilemapresource.xml")){const g=d.split("/tilemapresource.xml").join("");typeof f=="string"?f=g:f.url=g,h.url=f}else if(u==="ion"&&d.startsWith("ion://")){const v=+d.substring(6);h={...A,assetId:v,type:"IonImageryProvider"}}h.type=dO(u)}console.log("imageryProvider",h),r.imageryProvider=h};s();const l=this.dv(c.createNextAnimateFrameEvent(a.changed,e.maximumLevelChanged,e.minimumLevelChanged,e.optionsChanged,e.rectangleChanged));this.d(l.don(s))}this.d(c.track([r,"show"],[e,"show"])),this.d(c.bind([r,"alpha"],[e,"opacity"])),this.d(c.bind([r,"alpha"],[e,"czmAlpha"])),this.d(c.track([r,"splitDirection"],[e,"splitDirection"])),this.d(c.track([r,"brightness"],[e,"czmBrightness"])),this.d(c.track([r,"contrast"],[e,"czmContrast"])),this.d(c.track([r,"hue"],[e,"czmHue"])),this.d(c.track([r,"saturation"],[e,"czmSaturation"])),this.d(c.track([r,"gamma"],[e,"czmGamma"])),this.d(c.track([r,"rectangle"],[e,"rectangle"])),this.d(c.track([r,"zIndex"],[e,"zIndex"])),this.ad(c.track([r,"targetID"],[e,"targetID"]))}get czmImagery(){return this._czmImagery}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmImagery:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(a.flyTo(e&&e),o.flyOverEvent.emit(i,"over",r),!0):!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmImagery:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):(a.flyTo(e&&e),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(sc,"type",sc.register("ESCesiumViewer",c.ESImageryLayer.type,sc));let mg=sc;class mO extends c.Destroyable{constructor(e,i,o,r){super();L(this,"_show");L(this,"_czmESCustomPrimitive");L(this,"_czmTexture");this._sceneObject=e,this._show=this.disposeVar(c.react(this._sceneObject.show)),this._czmESCustomPrimitive=this.dv(new at(i,this._sceneObject.id)),this._czmTexture=this.dv(new ht(i));const a=e,s=this._czmESCustomPrimitive,l=this._czmTexture;this.dispose(c.track([s,"show"],[this,"show"])),this.dispose(c.track([s,"show"],[a,"show"])),this.dispose(c.track([s,"allowPicking"],[a,"allowPicking"])),this.dispose(c.track([s,"rotation"],[a,"rotation"])),this.dispose(c.track([s,"position"],[a,"position"])),this.dispose(c.track([s,"scale"],[a,"scale"])),this.ad(a.allowPickingChanged.don(()=>{s.allowPicking=a.allowPicking,s.pass=a.allowPicking?"TRANSLUCENT":"OVERLAY"}));{const u=()=>{const h=a.size/2,f=r[0].map(S=>S*h),d=r[1].map(S=>S*h),p=r[2].map(S=>S*h),g=r[3].map(S=>S*h),v=[...f,...d,...p,...g];let y=[0,3,2,0,2,1];(o=="north"||o=="west"||o=="bottom")&&(y=y.reverse());const m=[0,0],b=[1,0],x=[1,1],E=[0,1];let B=[];o=="east"||o=="south"?B=[...b,...m,...E,...x]:o=="west"?B=[...b,...x,...E,...m]:o=="top"?B=[...E,...x,...b,...m]:B=[...m,...b,...x,...E],s.indexTypedArray=new Uint16Array(y),s.attributes={position:{typedArray:new Float32Array(v),componentsPerAttribute:3},st:{typedArray:new Float32Array(B),componentsPerAttribute:2}},l.uri=c.ESSceneObject.context.getStrFromEnv(`\${earthsdk3-assets-script-dir}/assets/img/skybox/${a.mode}/${o}.${a.mode!="blueSky"?"png":"jpg"}`);const P=i.getCameraInfo();if(P!=null){const T=c.getDistancesFromPositions([a.position,P.position],"NONE")[0]/(a.size/2*a.autoOpacityFactor);this.changeOpacity(a.autoFollow?1:T)}const I=s.computeLocalAxisedBoundingBoxFromAttribute("position");if(!I)return;const{min:M,max:F}=I;s.setLocalAxisedBoundingBox(M,F)};u();const A=this.disposeVar(c.createNextAnimateFrameEvent(a.sizeChanged,a.modeChanged));this.dispose(A.disposableOn(u))}}get show(){return this._show.value}set show(e){this._show.value=e}get showChanged(){return this._show.changed}get czmESCustomPrimitive(){return this._czmESCustomPrimitive}get czmTexture(){return this._czmTexture}changeOpacity(e){this._czmESCustomPrimitive.uniformMap={u_image:{type:"texture",id:this._czmTexture.id},u_color:[1,1,1,1-e>=0?1-e:0]}}}class gO extends c.Destroyable{constructor(n,e,i){if(super(),!e.viewer)return;let o=!0,r;this.dispose(e.viewer.scene.preUpdate.addEventListener(()=>{a()}));function a(){var l;if(!((l=e.viewer)!=null&&l.camera))return;const s=e.getCameraInfo();if(s!=null&&(r==null||r.position[0]!=s.position[0]||r.position[1]!=s.position[1]||r.position[2]!=s.position[2]||r.rotation[0]!=s.rotation[0]||r.rotation[1]!=s.rotation[1]||r.rotation[2]!=s.rotation[2])){r=s;const A=c.getDistancesFromPositions([n.position,r.position],"NONE")[0]/(n.size/2*n.autoOpacityFactor);n.autoFollow?(n.position=r.position,o&&(o=!1,i.forEach(h=>{h.changeOpacity(1)}))):i.forEach(h=>{h.changeOpacity(A)})}}a()}}const Pt=class Pt extends He{constructor(e,i){super(e,i);L(this,"_czmSkyBoxComponents",[]);if(!i.viewer){console.warn("viewer is undefined!");return}!Pt._defaultLocalBox&&Pt._firstLoad&&(Pt._firstLoad=!1,Pt._defaultLocalBox=i.xbsjLocalBoxSources),Pt._eSLocalSkyBoxArr.push(e),this.d(()=>{Pt._eSLocalSkyBoxArr.includes(e)&&Pt._eSLocalSkyBoxArr.splice(Pt._eSLocalSkyBoxArr.indexOf(e),1),this.ChangeAutoFollow()});const r={bottom:[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]],top:[[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],south:[[-1,-1,-1],[1,-1,-1],[1,-1,1],[-1,-1,1]],north:[[-1,1,-1],[1,1,-1],[1,1,1],[-1,1,1]],east:[[1,-1,-1],[1,1,-1],[1,1,1],[1,-1,1]],west:[[-1,1,-1],[-1,1,1],[-1,-1,1],[-1,-1,-1]]};for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)){const s=r[a];this._czmSkyBoxComponents.push(this.dv(new mO(e,i,a,s)))}{const a=this.disposeVar(c.createNextAnimateFrameEvent(e.autoFollowChanged,e.autoOpacityFactorChanged));this.disposeVar(new c.ObjResettingWithEvent(a,()=>(this.ChangeAutoFollow(),new gO(e,i,this._czmSkyBoxComponents))))}{const a=()=>{this.ChangeAutoFollow()},s=this.disposeVar(c.createNextAnimateFrameEvent(e.sizeChanged,e.modeChanged,e.showChanged));this.dispose(s.disposableOn(a))}}ChangeAutoFollow(){const{czmViewer:e}=this;for(let i=Pt._eSLocalSkyBoxArr.length-1;i>=0;i--){const o=Pt._eSLocalSkyBoxArr[i];if(o.autoFollow&&o.show){e.xbsjLocalBoxSources={positiveX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/east.${o.mode!="blueSky"?"png":"jpg"}`,negativeX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/west.${o.mode!="blueSky"?"png":"jpg"}`,positiveY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/bottom.${o.mode!="blueSky"?"png":"jpg"}`,negativeY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/top.${o.mode!="blueSky"?"png":"jpg"}`,positiveZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/north.${o.mode!="blueSky"?"png":"jpg"}`,negativeZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/south.${o.mode!="blueSky"?"png":"jpg"}`};break}i==0&&(e.xbsjLocalBoxSources=Pt._defaultLocalBox)}Pt._eSLocalSkyBoxArr.length==0&&(e.xbsjLocalBoxSources=Pt._defaultLocalBox)}flyTo(e,i){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,i);{const a=o.size??c.ESLocalSkyBox.defaults.size;return o.position?(Gn(r,o,i,o.position,a,e,!0),!0):!1}}};L(Pt,"type",Pt.register("ESCesiumViewer",c.ESLocalSkyBox.type,Pt)),L(Pt,"_defaultLocalBox"),L(Pt,"_firstLoad",!0),L(Pt,"_eSLocalSkyBoxArr",[]);let gg=Pt;const ni=class ni extends He{constructor(e,i){super(e,i);L(this,"_geoCustomDivPoi");L(this,"_textFunc",this.disposeVar(c.react(void 0)));if(this._geoCustomDivPoi=this.disposeVar(new wt(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this.geoCustomDivPoi;this.dispose(c.track([r,"show"],[e,"show"])),this.dispose(c.bind([r,"position"],[e,"position"])),this.dispose(c.track([r,"allowPicking"],[e,"allowPicking"]));{this.dispose(r.pickedEvent.disposableOn(a=>{(e.allowPicking??c.ESLocationMeasurement.defaults.allowPicking)&&e.pickedEvent.emit(a)})),this.dispose(r.innerHtmlMounted.disposableOn(a=>{const s=a.firstElementChild;s&&(s.style.pointerEvents="auto",s.style.cursor="default",s.onclick=l=>r.pickFromDiv(s,{type:"viewerPicking",pointerEvent:l}))}));{const a=()=>{if(!e.position)return;const l=(this.textFunc??ni.defaultTextFunc_度格式)(e.position);r.innerHTML=xo(l)};a();const s=this.disposeVar(c.createNextAnimateFrameEvent(e.positionChanged,this.textFuncChanged));this.dispose(s.disposableOn(a))}{const a=()=>{i.lonLatFormat??(i.lonLatFormat="DECIMAL_DEGREE"),this.textFunc=i.lonLatFormat=="DECIMAL_DEGREE"?ni.defaultTextFunc_度格式:i.lonLatFormat=="DEGREES_DECIMAL_MINUTES"?ni.defaultTextFunc_度分格式:ni.defaultTextFunc_度分秒格式};a(),this.d(i.lonLatFormatChanged.don(()=>{a()}))}}}get geoCustomDivPoi(){return this._geoCustomDivPoi}get textFunc(){return this._textFunc.value}set textFunc(e){this._textFunc.value=e}get textFuncChanged(){return this._textFunc.changed}flyTo(e,i){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:a}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(a.flyTo(e),o.flyOverEvent.emit(i,"over",r),!0):!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:a}=this;return r.actived?o.flyInParam?super.flyIn(e,i):(a.flyTo(e),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(ni,"type",ni.register("ESCesiumViewer",c.ESLocationMeasurement.type,ni)),L(ni,"defaultTextFunc_度格式",e=>{if(!e)return"";const[i=0,o=0,r=0]=e;return`经度: ${i.toFixed(5)}°
|
|
3105
3105
|
纬度: ${o.toFixed(5)}°
|
|
3106
3106
|
高度: ${r.toFixed(2)}m`}),L(ni,"defaultTextFunc_度分格式",e=>{if(!e)return"";const[i,o,r]=Ep(e,!0);return`经度: ${i}
|
|
3107
3107
|
纬度: ${o}
|
|
@@ -4142,10 +4142,10 @@ async function initCesiumViewer(container, czmViewer) {
|
|
|
4142
4142
|
`;function UH(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
|
|
4143
4143
|
github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
|
|
4144
4144
|
gitee地址:${t}
|
|
4145
|
-
`;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const Nt=class Nt extends c.ESViewer{constructor(e){super(e);L(this,"_disabledInputStack",this.disposeVar(c.react(0)));L(this,"_viewer",this.dv(c.react(void 0)));L(this,"_viewerInstance");L(this,"_viewerLegend");L(this,"pickCustomAttachedInfo");L(this,"_fps",this.dv(c.react(0)));L(this,"_notSupportEditingCount",this.disposeVar(c.react(0)));L(this,"_editingSystem",Wf);L(this,"_moveObjectsProcess",this.ad(RS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new mV(this)),this.ad(new gV(this)),this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new bV(this)})),this._viewerLegend=this.dv(new TH(this)),this._viewerInstance=this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new kv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Be([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new c.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new vN(this.subContainer,this,o=>this._viewer.value=o,i.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Qn(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,i,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,i)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:i}=this;if(!i)return;const o=_.Cartographic.fromDegrees(e[0],e[1],e[2],Nt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Fn(e),rotation:gs(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:i}=this.viewer;if(!i||!e)return;const o=_.Cartesian3.fromDegrees(...e),r=_.Transforms.eastNorthUpToFixedFrame(o),a=_.Matrix4.inverse(r,new _.Matrix4),s=_.Matrix4.multiplyByPoint(a,i.positionWC,new _.Cartesian3),l=_.Cartesian3.magnitude(s);let u=-Math.asin(s.z/l);u=_.Math.toDegrees(u);let A=_.Math.PI_OVER_TWO-Math.atan(s.y/s.x);s.x>0&&(A+=s.y<0?-_.Math.PI:_.Math.PI),A=_.Math.toDegrees(A);const h=gs(i),f=h[0]-A,d=h[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:1,hDelta:f,pDelta:d}}flyIn(e,i,o,r="default"){var l;if(!i)return;const a={position:e,rotation:i,duration:(o??1)*1e3},s=(l=this.viewer)==null?void 0:l.camera;return s&&rl(s,a,r)}flyTo(e,i,o="default"){var d;const{distance:r,heading:a,pitch:s,flyDuration:l,hDelta:u,pDelta:A}=e,h={position:i,viewDistance:r,rotation:[a,s,0],duration:l*1e3,hdelta:u,pdelta:A},f=(d=this.viewer)==null?void 0:d.camera;return f&&rl(f,h,o)}flyToBoundingSphere(e,i,o=1){var h;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],a=c.getGeoBoundingSphereFromPositions(r);if(!a)return;const{center:s,radius:l}=a,u={position:s,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},A=(h=this.viewer)==null?void 0:h.camera;return A&&rl(A,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Fn(e),rotation:gs(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,a;(a=(r=this._viewerInstance)==null?void 0:r.obj)==null||a.navigationManager.changeToWalk(e,i,o),this._navigationMode.value="Walk"}changeToMap(){var e,i;(i=(e=this._viewerInstance)==null?void 0:e.obj)==null||i.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,i,o){var r,a;(a=(r=this._viewerInstance)==null?void 0:r.obj)==null||a.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,a,s){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,a,s),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,a){var s,l;(l=(s=this._viewerInstance)==null?void 0:s.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,a),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,a){var s,l;(l=(s=this._viewerInstance)==null?void 0:s.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,a),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=_.VERSION,e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=_.Cartographic.fromDegrees(e,i,void 0,Nt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(a=>this.getHeightByLonLat(...a));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await P0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(ft(e));if(i)return[i.x,i.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,i,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&i!=null&&(r.editingID=`${o.callSource}_${c.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=c.createGuid();for(let r=0;r<e.length;r++){const a=e[r],s=a.components.main??a;s.editingID=o,s&&i.push(s)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=Nt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!Nt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=Nt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return vn(e,i)}localPositionsToPositions(e,i){return _r(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=ft(e),o=new _.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(i))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(i);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},i=Nt.defaults;return{...e,more:[...e.more,new c.GroupProperty([],"通用","通用"),new c.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",RH,DH,!0),new c.FunctionProperty([],()=>Nt.getCesiumIonToken(),[],"获取官方token"),new c.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new c.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new c.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new c.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new c.GroupProperty([],"Viewer","Viewer"),new c.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new c.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new c.BooleanProperty([this,"shadows"]),new c.GroupProperty([],"比例尺","比例尺(Legend)"),new c.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new c.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new c.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new c.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new c.GroupProperty([],"场景","场景(Scene)"),new c.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new c.GroupProperty([],"Globe","Globe"),new c.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new c.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new c.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new c.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new c.BooleanProperty([this,"sceneGlobeShowSkirts"]),new c.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new c.ColorProperty([this,"sceneGlobeBaseColor"]),new c.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new c.JsonProperty([this,"sceneGlobeClippingPlanes"]),new c.StringProperty([this,"sceneGlobeClippingPlanesId"]),new c.JsonProperty([this,"sceneGlobeClippingPolygons"]),new c.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new c.GroupProperty([],"underground","underground"),new c.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new c.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new c.GroupProperty([],"Translucency","Translucency"),new c.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new c.GroupProperty([],"Sun","Sun"),new c.BooleanProperty([this,"sun"],"sun",i.sun,!0),new c.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new c.GroupProperty([],"Moon","Moon"),new c.BooleanProperty([this,"moon"],"moon",i.moon,!0),new c.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new c.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new c.GroupProperty([],"SkyBox","SkyBox"),new c.BooleanProperty([this,"sceneSkyBoxShow"]),new c.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new c.GroupProperty([],"Background","Background"),new c.BooleanProperty([this,"xbsjUseBackground"]),new c.StringProperty([this,"xbsjBackgroundImageUri"]),new c.ColorProperty([this,"xbsjBackgroundColor"]),new c.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new c.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new c.ColorProperty([this,"sceneBackgroundColor"]),new c.GroupProperty([],"Fog","Fog"),new c.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new c.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new c.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new c.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new c.GroupProperty([],"Sscc","Sscc"),new c.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new c.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new c.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new c.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new c.GroupProperty([],"后处理","后处理"),new c.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new c.GroupProperty([],"环境遮蔽","环境遮蔽"),new c.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new c.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new c.GroupProperty([],"Bloom","Bloom"),new c.BooleanProperty([this,"scenePpsBloomEnabled"]),new c.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new c.NumberProperty([this,"scenePpsBloomContrast"]),new c.NumberProperty([this,"scenePpsBloomBrightness"]),new c.NumberProperty([this,"scenePpsBloomDelta"]),new c.NumberProperty([this,"scenePpsBloomSigma"]),new c.NumberProperty([this,"scenePpsBloomStepSize"]),new c.GroupProperty([],"调试","调试"),new c.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new c.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new c.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new c.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new c.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new c.GroupProperty([],"Inspector","Inspector"),new c.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new c.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new c.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};L(Nt,"type",Nt.register("ESCesiumViewer",Nt)),L(Nt,"getCesiumIonToken",UH),L(Nt,"currentDefaultAccessToken",_.Ion.defaultAccessToken),L(Nt,"latestDefaultAccessToken"),L(Nt,"ObjectsToExcludeWrapper",wV),L(Nt,"defaults",{...c.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:_.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),L(Nt,"getHeightsScartchCarto",new _.Cartographic);let ot=Nt;(t=>{t.createDefaultProps=()=>({...c.ESViewer.createDefaultProps(),...MH()})})(ot||(ot={})),c.extendClassProps(ot.prototype,ot.createDefaultProps),re.copyright=void 0;try{const t="earthsdk3-cesium",n="3.5.0-beta.19",e="2025-10-23T01:49:54.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="6d8cabe0d96dbee0d9cdcce3808aae369317c4c5",s=((Date.now()-1761184194e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${s}个小时)
|
|
4145
|
+
`;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const Nt=class Nt extends c.ESViewer{constructor(e){super(e);L(this,"_disabledInputStack",this.disposeVar(c.react(0)));L(this,"_viewer",this.dv(c.react(void 0)));L(this,"_viewerInstance");L(this,"_viewerLegend");L(this,"pickCustomAttachedInfo");L(this,"_fps",this.dv(c.react(0)));L(this,"_notSupportEditingCount",this.disposeVar(c.react(0)));L(this,"_editingSystem",Wf);L(this,"_moveObjectsProcess",this.ad(RS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new mV(this)),this.ad(new gV(this)),this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new bV(this)})),this._viewerLegend=this.dv(new TH(this)),this._viewerInstance=this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new kv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Be([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new c.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new vN(this.subContainer,this,o=>this._viewer.value=o,i.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Qn(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,i,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,i)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:i}=this;if(!i)return;const o=_.Cartographic.fromDegrees(e[0],e[1],e[2],Nt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Fn(e),rotation:gs(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:i}=this.viewer;if(!i||!e)return;const o=_.Cartesian3.fromDegrees(...e),r=_.Transforms.eastNorthUpToFixedFrame(o),a=_.Matrix4.inverse(r,new _.Matrix4),s=_.Matrix4.multiplyByPoint(a,i.positionWC,new _.Cartesian3),l=_.Cartesian3.magnitude(s);let u=-Math.asin(s.z/l);u=_.Math.toDegrees(u);let A=_.Math.PI_OVER_TWO-Math.atan(s.y/s.x);s.x>0&&(A+=s.y<0?-_.Math.PI:_.Math.PI),A=_.Math.toDegrees(A);const h=gs(i),f=h[0]-A,d=h[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:1,hDelta:f,pDelta:d}}flyIn(e,i,o,r="default"){var l;if(!i)return;const a={position:e,rotation:i,duration:(o??1)*1e3},s=(l=this.viewer)==null?void 0:l.camera;return s&&rl(s,a,r)}flyTo(e,i,o="default"){var d;const{distance:r,heading:a,pitch:s,flyDuration:l,hDelta:u,pDelta:A}=e,h={position:i,viewDistance:r,rotation:[a,s,0],duration:l*1e3,hdelta:u,pdelta:A},f=(d=this.viewer)==null?void 0:d.camera;return f&&rl(f,h,o)}flyToBoundingSphere(e,i,o=1){var h;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],a=c.getGeoBoundingSphereFromPositions(r);if(!a)return;const{center:s,radius:l}=a,u={position:s,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},A=(h=this.viewer)==null?void 0:h.camera;return A&&rl(A,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Fn(e),rotation:gs(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,a;(a=(r=this._viewerInstance)==null?void 0:r.obj)==null||a.navigationManager.changeToWalk(e,i,o),this._navigationMode.value="Walk"}changeToMap(){var e,i;(i=(e=this._viewerInstance)==null?void 0:e.obj)==null||i.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,i,o){var r,a;(a=(r=this._viewerInstance)==null?void 0:r.obj)==null||a.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,a,s){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,a,s),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,a){var s,l;(l=(s=this._viewerInstance)==null?void 0:s.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,a),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,a){var s,l;(l=(s=this._viewerInstance)==null?void 0:s.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,a),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=_.VERSION,e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=_.Cartographic.fromDegrees(e,i,void 0,Nt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(a=>this.getHeightByLonLat(...a));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await P0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(ft(e));if(i)return[i.x,i.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,i,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&i!=null&&(r.editingID=`${o.callSource}_${c.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=c.createGuid();for(let r=0;r<e.length;r++){const a=e[r],s=a.components.main??a;s.editingID=o,s&&i.push(s)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=Nt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!Nt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=Nt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return vn(e,i)}localPositionsToPositions(e,i){return _r(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=ft(e),o=new _.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(i))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(i);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},i=Nt.defaults;return{...e,more:[...e.more,new c.GroupProperty([],"通用","通用"),new c.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",RH,DH,!0),new c.FunctionProperty([],()=>Nt.getCesiumIonToken(),[],"获取官方token"),new c.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new c.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new c.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new c.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new c.GroupProperty([],"Viewer","Viewer"),new c.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new c.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new c.BooleanProperty([this,"shadows"]),new c.GroupProperty([],"比例尺","比例尺(Legend)"),new c.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new c.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new c.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new c.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new c.GroupProperty([],"场景","场景(Scene)"),new c.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new c.GroupProperty([],"Globe","Globe"),new c.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new c.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new c.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new c.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new c.BooleanProperty([this,"sceneGlobeShowSkirts"]),new c.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new c.ColorProperty([this,"sceneGlobeBaseColor"]),new c.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new c.JsonProperty([this,"sceneGlobeClippingPlanes"]),new c.StringProperty([this,"sceneGlobeClippingPlanesId"]),new c.JsonProperty([this,"sceneGlobeClippingPolygons"]),new c.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new c.GroupProperty([],"underground","underground"),new c.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new c.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new c.GroupProperty([],"Translucency","Translucency"),new c.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new c.GroupProperty([],"Sun","Sun"),new c.BooleanProperty([this,"sun"],"sun",i.sun,!0),new c.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new c.GroupProperty([],"Moon","Moon"),new c.BooleanProperty([this,"moon"],"moon",i.moon,!0),new c.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new c.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new c.GroupProperty([],"SkyBox","SkyBox"),new c.BooleanProperty([this,"sceneSkyBoxShow"]),new c.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new c.GroupProperty([],"Background","Background"),new c.BooleanProperty([this,"xbsjUseBackground"]),new c.StringProperty([this,"xbsjBackgroundImageUri"]),new c.ColorProperty([this,"xbsjBackgroundColor"]),new c.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new c.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new c.ColorProperty([this,"sceneBackgroundColor"]),new c.GroupProperty([],"Fog","Fog"),new c.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new c.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new c.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new c.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new c.GroupProperty([],"Sscc","Sscc"),new c.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new c.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new c.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new c.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new c.GroupProperty([],"后处理","后处理"),new c.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new c.GroupProperty([],"环境遮蔽","环境遮蔽"),new c.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new c.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new c.GroupProperty([],"Bloom","Bloom"),new c.BooleanProperty([this,"scenePpsBloomEnabled"]),new c.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new c.NumberProperty([this,"scenePpsBloomContrast"]),new c.NumberProperty([this,"scenePpsBloomBrightness"]),new c.NumberProperty([this,"scenePpsBloomDelta"]),new c.NumberProperty([this,"scenePpsBloomSigma"]),new c.NumberProperty([this,"scenePpsBloomStepSize"]),new c.GroupProperty([],"调试","调试"),new c.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new c.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new c.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new c.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new c.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new c.GroupProperty([],"Inspector","Inspector"),new c.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new c.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new c.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};L(Nt,"type",Nt.register("ESCesiumViewer",Nt)),L(Nt,"getCesiumIonToken",UH),L(Nt,"currentDefaultAccessToken",_.Ion.defaultAccessToken),L(Nt,"latestDefaultAccessToken"),L(Nt,"ObjectsToExcludeWrapper",wV),L(Nt,"defaults",{...c.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:_.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),L(Nt,"getHeightsScartchCarto",new _.Cartographic);let ot=Nt;(t=>{t.createDefaultProps=()=>({...c.ESViewer.createDefaultProps(),...MH()})})(ot||(ot={})),c.extendClassProps(ot.prototype,ot.createDefaultProps),re.copyright=void 0;try{const t="earthsdk3-cesium",n="3.5.0-beta.20",e="2025-10-23T10:01:13.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="d1e7c72f07f84b9908276e9d5e2728f3852f06c6",s=((Date.now()-1761213673e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${s}个小时)
|
|
4146
4146
|
%c${o?o+`
|
|
4147
4147
|
`:""}当前网站正在使用${t},此软件版权归${i}所有
|
|
4148
|
-
`;re.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
4148
|
+
`;re.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","d1e7c72f07f84b9908276e9d5e2728f3852f06c6")},get info(){return l},get date(){return"2025-10-23T10:01:13.000Z"},get author(){return"suplyang"},get version(){return"3.5.0-beta.20"},get name(){return"earthsdk3-cesium"},get commitId(){return"d1e7c72f07f84b9908276e9d5e2728f3852f06c6"},print(){console.info(this.info,`
|
|
4149
4149
|
font-size: 18px;
|
|
4150
4150
|
font-weight: 1000;
|
|
4151
4151
|
line-height: 1;
|