earthsdk3 3.11.0 → 3.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/earthsdk3.iife.js +1429 -87
- package/dist/earthsdk3.js +7912 -5276
- package/dist/earthsdk3.umd.cjs +1421 -75
- package/dist/types/ESJTypes/ScreenManager/index.d.ts +1 -2
- package/dist/types/ESObjectManager/index.d.ts +22 -0
- package/dist/types/ESObjects/base/ESTestObject.d.ts +127 -1
- package/dist/types/ESObjects/general/ES3DTileset/index.d.ts +2 -8
- package/dist/types/ESObjects/general/ES3DTileset/type.d.ts +1 -2
- package/dist/types/ESObjects/general/ESAlarm.d.ts +1 -0
- package/dist/types/ESObjects/general/ESApertureEffect.d.ts +1 -0
- package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts +1 -0
- package/dist/types/ESObjects/general/ESAttackArrow.d.ts +1 -0
- package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts +1 -0
- package/dist/types/ESObjects/general/ESBoxClipping.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCameraView.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts +2 -0
- package/dist/types/ESObjects/general/ESCar.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCityBasePoint.d.ts +1 -0
- package/dist/types/ESObjects/general/ESClassification.d.ts +1 -0
- package/dist/types/ESObjects/general/ESClippingPlane.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/_types.d.ts +44 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/defaults.d.ts +26 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/funcs.d.ts +5 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/index.d.ts +188 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/readme/attributes.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/readme/boundingVolume.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/readme/index.d.ts +6 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/readme/indexTypeArray.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/readme/renderState.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/readme/shaderSource.d.ts +2 -0
- package/dist/types/ESObjects/general/ESCustomPrimitive/readme/uniformMap.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCylinder.d.ts +1 -0
- package/dist/types/ESObjects/general/ESCzml.d.ts +1 -0
- package/dist/types/ESObjects/general/ESDataMesh.d.ts +1 -0
- package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts +1 -0
- package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts +1 -0
- package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts +1 -0
- package/dist/types/ESObjects/general/ESDynamicWater.d.ts +1 -0
- package/dist/types/ESObjects/general/ESEntityCluster.d.ts +1 -0
- package/dist/types/ESObjects/general/ESExcavate.d.ts +1 -0
- package/dist/types/ESObjects/general/ESFeatureLayer/FeatureLayer.d.ts +12 -0
- package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts +1 -0
- package/dist/types/ESObjects/general/ESFireWall.d.ts +10 -0
- package/dist/types/ESObjects/general/ESForestTileset.d.ts +2 -0
- package/dist/types/ESObjects/general/ESFountainParticleSystem.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGeHistoryImagery/index.d.ts +62 -0
- package/dist/types/ESObjects/general/ESGeHistoryImagery/type.d.ts +14 -0
- package/dist/types/ESObjects/general/ESGeoBezierPath/index.d.ts +104 -0
- package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGeoIcon.d.ts +58 -0
- package/dist/types/ESObjects/general/ESGeoLineString.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGeoPoint.d.ts +58 -0
- package/dist/types/ESObjects/general/ESGeoPoints/index.d.ts +4 -0
- package/dist/types/ESObjects/general/ESGeoPolygon.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGeoPolygonWithFire.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGeoRectangle.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGeoSmoothPolygon.d.ts +66 -0
- package/dist/types/ESObjects/general/ESGeoWater.d.ts +1 -0
- package/dist/types/ESObjects/general/ESGltfModel.d.ts +2 -1
- package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts +1 -0
- package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts +2 -0
- package/dist/types/ESObjects/general/ESHole.d.ts +1 -0
- package/dist/types/ESObjects/general/ESHuman.d.ts +1 -0
- package/dist/types/ESObjects/general/ESHumanFountain.d.ts +2 -3
- package/dist/types/ESObjects/general/ESHumanPoi.d.ts +1 -0
- package/dist/types/ESObjects/general/ESHumans.d.ts +10 -0
- package/dist/types/ESObjects/general/ESImageLabel.d.ts +2 -0
- package/dist/types/ESObjects/general/ESKml.d.ts +70 -0
- package/dist/types/ESObjects/general/ESLandSlide.d.ts +1 -0
- package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts +1 -0
- package/dist/types/ESObjects/general/ESLocalCircle.d.ts +1 -0
- package/dist/types/ESObjects/general/ESLocalLineString.d.ts +73 -0
- package/dist/types/ESObjects/general/ESLocalLineStringZ.d.ts +79 -0
- package/dist/types/ESObjects/general/ESLocalPolygon.d.ts +1 -0
- package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts +1 -0
- package/dist/types/ESObjects/general/ESLocalRectangle.d.ts +1 -0
- package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts +1 -0
- package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts +2 -0
- package/dist/types/ESObjects/general/ESMVTLayer.d.ts +4 -0
- package/dist/types/ESObjects/general/ESNavigator.d.ts +2 -0
- package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts +1 -0
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/PolylineResetting.d.ts +4 -0
- package/dist/types/ESObjects/general/ESPipeFence.d.ts +2 -0
- package/dist/types/ESObjects/general/ESPipeline.d.ts +2 -0
- package/dist/types/ESObjects/general/ESPipeserTileset.d.ts +1 -0
- package/dist/types/ESObjects/general/ESPit.d.ts +1 -0
- package/dist/types/ESObjects/general/ESPoi2D.d.ts +1 -0
- package/dist/types/ESObjects/general/ESPoi3D.d.ts +1 -0
- package/dist/types/ESObjects/general/ESPoiTileset.d.ts +1 -0
- package/dist/types/ESObjects/general/ESPolygonFence.d.ts +1 -0
- package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts +2 -0
- package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts +1 -0
- package/dist/types/ESObjects/general/ESPolygonsFlattenedPlane.d.ts +2 -0
- package/dist/types/ESObjects/general/ESRectangle.d.ts +2 -0
- package/dist/types/ESObjects/general/ESRoad.d.ts +65 -0
- package/dist/types/ESObjects/general/ESScale.d.ts +1 -0
- package/dist/types/ESObjects/general/ESSignalInterference.d.ts +22 -0
- package/dist/types/ESObjects/general/ESSignalTransmission.d.ts +90 -0
- package/dist/types/ESObjects/general/ESSquadCombatArrow.d.ts +2 -0
- package/dist/types/ESObjects/general/ESStaticMesh.d.ts +1 -0
- package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts +1 -0
- package/dist/types/ESObjects/general/ESTerrainLayer.d.ts +1 -0
- package/dist/types/ESObjects/general/ESTerrainLayerEditing/EditingESGeoPolygon.d.ts +8 -0
- package/dist/types/ESObjects/general/ESTextLabel.d.ts +6 -0
- package/dist/types/ESObjects/general/ESUEWidget.d.ts +2 -0
- package/dist/types/ESObjects/general/ESUnrealActor.d.ts +1 -0
- package/dist/types/ESObjects/general/ESVideoFusion.d.ts +1 -0
- package/dist/types/ESObjects/general/ESViewShed.d.ts +1 -0
- package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts +1 -0
- package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts +1 -0
- package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts +2 -0
- package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts +1 -0
- package/dist/types/ESObjects/general/ESWidget.d.ts +1 -0
- package/dist/types/ESObjects/general/ESXYZLayer.d.ts +106 -0
- package/dist/types/ESObjects/general/index.d.ts +12 -0
- package/dist/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/ESMCPTools/ESMCPClient.d.ts +0 -16
- package/dist/types/ESMCPTools/index.d.ts +0 -3
- package/dist/types/ESMCPTools/tools/camera.d.ts +0 -14
- package/dist/types/ESMCPTools/tools/index.d.ts +0 -4
- package/dist/types/ESMCPTools/tools/sceneObject.d.ts +0 -18
- package/dist/types/ESMCPTools/types/CallToolResultSchema.d.ts +0 -2477
- package/dist/types/ESMCPTools/types/MCPToolType.d.ts +0 -61
- package/dist/types/ESMCPTools/types/index.d.ts +0 -2
- package/dist/types/getESProperties/ESGltfModelEditingProperties.d.ts +0 -2
- package/dist/types/getESProperties/ESObjectWithLocationProperties.d.ts +0 -2
- package/dist/types/getESProperties/index.d.ts +0 -7
package/dist/earthsdk3.umd.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(d,Re){typeof exports=="object"&&typeof module<"u"?Re(exports,require("js-binary-schema-parser"),require("
|
|
1
|
+
(function(d,Re){typeof exports=="object"&&typeof module<"u"?Re(exports,require("js-binary-schema-parser"),require("topojson-client"),require("proj4"),require("@turf/turf")):typeof define=="function"&&define.amd?define(["exports","js-binary-schema-parser","topojson-client","proj4","@turf/turf"],Re):(d=typeof globalThis<"u"?globalThis:d||self,Re(d.EarthSDK3={},d.jsBinarySchemaParser,d.topojson,d.proj4,d.turf))})(this,(function(d,Re,ts,Sl,W){"use strict";var cm=Object.defineProperty;var dm=(d,Re,ts)=>Re in d?cm(d,Re,{enumerable:!0,configurable:!0,writable:!0,value:ts}):d[Re]=ts;var a=(d,Re,ts)=>dm(d,typeof Re!="symbol"?Re+"":Re,ts);function Cl(n){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return s.default=n,Object.freeze(s)}const Cd=Cl(ts),K=Cl(W);function Pd(){var t;const n=((t=globalThis==null?void 0:globalThis.navigator)==null?void 0:t.userAgent)??"unknown";let s="Unknown";/Windows/.test(n)?s="Windows":/Macintosh/.test(n)?s="MacOS":/Linux/.test(n)?s="Linux":/Android/.test(n)?s="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(s="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?e="x64":/x86|i686|Win32/.test(n)?e="x86":/arm64|aarch64/.test(n)?e="arm64":/arm/.test(n)&&(e="arm"),{os:s.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const Td=Date.now();function Pl(n){var l;const{os:s,arch:e}=Pd(),t={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-Td)/1e3/60|0,date:new Date().toLocaleString(),href:((l=globalThis==null?void 0:globalThis.location)==null?void 0:l.href)??"unknown",os:s,arch:e},r={method:"GET",headers:new Headers,redirect:"follow"},o=globalThis.encodeURIComponent(JSON.stringify(t));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,r).then(h=>h.text()).then(h=>console.log(h)).catch(h=>console.log("error",h))}d.copyright=void 0;try{const n="earthsdk3",s="3.11.1-beta.1",e="2026-07-28T08:01:04.000Z",t="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="1556a78ab71d1ebcf231adb5033946e3a37fcbf8",l=((Date.now()-1785225664e3)/36e5).toFixed(1),h=`%c🌏 ${n}%c ${s}.${r.slice(0,8)}.${e} (距今${l}个小时)
|
|
2
2
|
%c${i?i+`
|
|
3
3
|
`:""}当前网站正在使用${n},此软件版权归${t}所有
|
|
4
|
-
`;d.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
4
|
+
`;d.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","1556a78ab71d1ebcf231adb5033946e3a37fcbf8")},get info(){return h},get date(){return"2026-07-28T08:01:04.000Z"},get author(){return"suplyang"},get version(){return"3.11.1-beta.1"},get name(){return"earthsdk3"},get commitId(){return"1556a78ab71d1ebcf231adb5033946e3a37fcbf8"},print(){console.info(this.info,`
|
|
5
5
|
font-size: 18px;
|
|
6
6
|
font-weight: 1000;
|
|
7
7
|
line-height: 1;
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
color: rgb(0, 120, 215);
|
|
19
19
|
padding-bottom: 2px;
|
|
20
20
|
padding-left: 35px;
|
|
21
|
-
`)}}),globalThis.g_XE3CopyRights=globalThis.g_XE3CopyRights||{},globalThis.g_XE3CopyRights[n]=d.copyright,globalThis.g_XE3SendProductUsageInfo=globalThis.g_XE3SendProductUsageInfo||!0,globalThis.g_XE3SendProductUsageInfo&&(setTimeout(()=>eh(d.copyright),1e3*60),setInterval(()=>eh(d.copyright),1440*60*1e3)),globalThis.g_earthsdk_copyright_print=globalThis.g_earthsdk_copyright_print??!0,globalThis.g_earthsdk_copyright_print&&d.copyright.print()}catch{console.warn("版本信息有误!")}const th=new Set;function Xi(n,s=n){th.has(s)||(th.add(s),console.warn(n))}function Ws(n){const s=Sn(n),e=()=>s[0][s[1]],t=r=>{try{s[0][s[1]]=r}catch(o){Xi(`setValue error, obj(${s[0].constructor.name}) prop(${s[1]}) error(${o})`)}},i=s[0][s[2]];return[e,t,i]}function Yl(){return!0}function Kl(){throw new Error("throwOnDestroyed")}function ih(n){for(var s in n)typeof n[s]=="function"&&(n[s]=Kl);n.isDestroyed=Yl}const mr=class mr{constructor(){a(this,"_memId",++mr._lastMemId);a(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(s){return this.disposers.push(s),s}d(s){return this.dispose(s)}disposeVar(s){return this.disposers.push(()=>s.destroy()),s}dv(s){return this.disposeVar(s)}tryDisposeVar(s){return this.disposers.push(()=>s.tryDestroy()),s}tdv(s){return this.tryDisposeVar(s)}autoDispose(s){return typeof s=="function"?this.dispose(s):this.disposeVar(s)}ad(s){return typeof s=="function"?this.dispose(s):this.disposeVar(s)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const s=this._disposers,e=s.length;for(let t=e-1;t>=0;--t)s[t]();s.length=0,this._disposers=void 0}catch(s){console.error(`destroy get error! ${s}`)}return ih(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};a(mr,"_lastMemId",-1);let b=mr,wr;function sh(n){wr=n}Object.defineProperties(b.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!wr)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new wr)}return this._toDestroyEvent}}});class En{constructor(s,e,t=!1){a(this,"_freeElements");a(this,"_usedElementsCount");a(this,"_usedElements");a(this,"_nextCreateID");a(this,"_scratchObjs");this._createDefaultFunc=s,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],t&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let s;return this._freeElements.length>0?s=this._freeElements.pop():s=this._createDefaultFunc&&this._createDefaultFunc()||{},s._cid=this._getCreateID(),s}create(){return this._create()}multiCreate(s){this._scratchObjs.length=0;for(let e=0;e<s;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(s){this._destroyFunc&&this._destroyFunc(s),s._cid=void 0}destroy(...s){const e=s.length;for(let t=0;t<e;++t)this._destroy(s[t])}}function Zl(){return{item:void 0,previous:void 0,next:void 0}}function Ql(n){n.item=void 0,n.previous=void 0,n.next=void 0}const nh=new En(Zl,Ql,!0);function yr(n,s,e){const t=nh.create();return t.item=n,t.previous=s,t.next=e,t}function rh(n){if(!n)throw new Error("node is undefined!");nh.destroy(n)}function br(n,s){s.previous&&s.next?(s.previous.next=s.next,s.next.previous=s.previous):s.previous?(s.previous.next=void 0,n.tail=s.previous):s.next?(s.next.previous=void 0,n.head=s.next):(n.head=void 0,n.tail=void 0),s.next=void 0,s.previous=void 0}class oh{constructor(s){a(this,"head");a(this,"tail");a(this,"_length");const{needLength:e}=s||{needLength:!0};this.head=void 0,this.tail=void 0,e&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(s){typeof this._length=="number"&&(this._length=s)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let s=this.head;for(;s;)yield s,s=s.next}remove(s){if(!s)throw new Error("node is undefined!");br(this,s),this._decrementLength(),rh(s)}getNode(s){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===s)return e;e=e.next}}moveAfter(s,e){if(s!==e){br(this,e);var t=s.next;s.next=e,this.tail===s?this.tail=e:t&&(t.previous=e),e.next=t,e.previous=s}}moveBefore(s,e){if(s!==e){br(this,e);var t=s.previous;s.previous=e,this.head===s?this.head=e:t&&(t.next=e),e.previous=t,e.next=s}}insertBefore(s,e){const t=yr(e,s.previous,s);return s.previous&&(s.previous.next=t),s.previous=t,this.head===s&&(this.head=t),this._incrementLength(),t}insertAfter(s,e){const t=yr(e,s,s.next);return s.next&&(s.next.previous=t),s.next=t,this.tail===s&&(this.tail=t),this._incrementLength(),t}_setFirstNode(s){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=yr(s,void 0,void 0);if(this.head=e,this.tail=e,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return e}push(s){return this.tail?this.insertAfter(this.tail,s):this._setFirstNode(s)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const s=this.tail.item;return this.remove(this.tail),s}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const s=this.head.item;return this.remove(this.head),s}unshift(s){return this.head?this.insertBefore(this.head,s):this._setFirstNode(s)}removeAll(){let s=this.head;for(;s;){const e=s.next;rh(s),s=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}function ed(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function td(n){n.func=void 0,n.scope=void 0,n._hasRemoved=!1,n._once=!1}const gi=new En(ed,td,!0);class Er{constructor(){a(this,"__dll");a(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new oh({needLength:!0}),this.__dll}_pushCurrentListener(s){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(s):this.__currentListenerStack=[this.__currentListenerStack,s]:this.__currentListenerStack=s}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(s){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(s)!==-1:this.__currentListenerStack===s:!1}do(...s){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const t=e.item;t._hasRemoved||(this._pushCurrentListener(t),t.func.call(t.scope,...s),this._popCurrentListener());const i=e.next;t._once&&!t._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let s=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){s=!1;break}e=e.next}return s}isHandlerValid(s){return!s.item._hasRemoved}nextHandler(s){if(!s.item._hasRemoved)throw new Error("handler has removed!");let e=s.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(s){if(!s.item._hasRemoved)throw new Error("handler has removed!");let e=s.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(s,e){if(s.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(s,e)}moveBefore(s,e){if(s.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(s,e)}insertBefore(s,e,t,i=!1){if(s.item._hasRemoved)throw new Error("handler has removed!");const r=gi.create();return r.func=e,r.scope=t,r._once=i,this._dll.insertBefore(s,r)}insertAfter(s,e,t,i=!1){if(s.item._hasRemoved)throw new Error("handler has removed!");const r=gi.create();return r.func=e,r.scope=t,r._once=i,this._dll.insertAfter(s,r)}_clearHasRemoved(s){s.item._hasRemoved&&!this._hasCurrentListener(s.item)&&(gi.destroy(s.item),this._dll.remove(s))}remove(s){if(!s.item||s.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(s.item)?s.item._hasRemoved=!0:(gi.destroy(s.item),this._dll.remove(s))}removeAll(){if(this.__dll&&!this._dll.empty){let s=this._dll.head;for(;s;){const e=s.next;s.item._hasRemoved||this.remove(s),s=e}}}destroy(){if(!this.__dll)return;let s=this._dll.head;for(;s;){const e=s.next,t=s;this._hasCurrentListener(t.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${t.item.func.toString()}`)),gi.destroy(t.item),this._dll.remove(t),s=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(s,e,t=!1){const i=gi.create();return i.func=s,i.scope=e,i._once=t,this._dll.push(i)}pop(){const s=this.tail;if(!s)throw new Error("pop error!");this.remove(s)}shift(){const s=this.head;if(!s)throw new Error("shift error!");this.remove(s)}unshift(s,e,t=!1){const i=gi.create();return i.func=s,i.scope=e,i._once=t,this._dll.unshift(i)}get tail(){let s=this._dll.tail;for(;s&&s.item._hasRemoved;)s=s.previous;return s}get head(){let s=this._dll.head;for(;s&&s.item._hasRemoved;)s=s.previous;return s}}class Bs{constructor(){a(this,"_listenerHandler");a(this,"_cid")}_reset(s,e){this._listenerHandler=s,this._cid=e}clone(s){return s=s??new Bs,s._reset(this._listenerHandler,this._cid),s}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const s=this._listenerHandler._cid;if(typeof s<"u"&&this._cid===s)return!0}return!1}}class Cr extends Bs{}class m extends b{constructor(){super(...arguments);a(this,"__pipe");a(this,"beforeCallback");a(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new Er,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...e){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...e),!this.isDestroyed()&&this._pipe.do(...e),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...e)}on(e,t,i=!1,r){const o=i?this._pipe.unshift(e,t,!1):this._pipe.push(e,t,!1);return r=r??new Cr,r._reset(o,o._cid),r}disposableOn(e,t,i=!1,r){const o=this.on(e,t,i,r);return()=>{o.valid&&this.off(o)}}don(e,t,i=!1,r){return this.disposableOn(e,t,i,r)}disposableWeakOn(e,t,i=!1,r){const o=new b,h=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,t,i,r)),o.dispose(this.toDestroyEvent.disposableOn(h)),h}dwon(e,t,i=!1,r){return this.disposableWeakOn(e,t,i,r)}once(e,t,i=!1,r){const o=i?this._pipe.unshift(e,t,!0):this._pipe.push(e,t,!0);return r=r??new Cr,r._reset(o,o._cid),r}disposableOnce(e,t,i=!1,r){const o=this.once(e,t,i,r);return()=>o.valid&&this.off(o)}donce(e,t,i=!1,r){const o=this.once(e,t,i,r);return()=>o.valid&&this.off(o)}off(e){if(!e.valid)throw new Error("handler is not valid!");this._pipe.remove(e._listenerHandler),e._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(Xi("The event is destroying with listeners!"),this._pipe.removeAll())}}sh(m);function Yi(n,s){return s=s??new Bs,s._reset(n,n._cid),s}class id{constructor(){a(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new Er,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...s){return this._pipe.do(...s)}isHandlerValid(s){return s.valid?this._pipe.isHandlerValid(s._listenerHandler):!1}moveAfter(s,e){if(!s.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(s._listenerHandler,e._listenerHandler)}moveBefore(s,e){if(!s.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(s._listenerHandler,e._listenerHandler)}insertBefore(s,e,t,i=!1,r){if(!s.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(s._listenerHandler,e,t,i);return Yi(o,r)}insertAfter(s,e,t,i=!1,r){if(!s.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(s._listenerHandler,e,t,i);return Yi(o,r)}remove(s){if(!s.valid)throw new Error("handler is not valid!");return this._pipe.remove(s._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(s,e,t=!1,i){const r=this._pipe.push(s,e,t);return Yi(r,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(s,e,t=!1,i){const r=this._pipe.unshift(s,e,t);return Yi(r,i)}getTail(s){const e=this._pipe.tail;if(e)return Yi(e,s)}getHead(s){const e=this._pipe.head;if(e)return Yi(e,s)}}class fe extends b{constructor(e,t,i){super();a(this,"_changed");a(this,"_value");a(this,"_oldValue");a(this,"toChangeFunc");this._equalsFunc=t,this._assignFunc=i,this._value=this._assignFunc&&this._assignFunc(e,void 0)||e}get assignFunc(){return this._assignFunc}get equalsFunc(){return this._equalsFunc}equals(e){return this._equalsFunc?this._equalsFunc(this._value,e):this._value===e}set value(e){if(this._equalsFunc?!this._equalsFunc(this._value,e):this._value!==e){if(this.toChangeFunc&&!this.toChangeFunc(e,this._value))return;this._assignFunc?(this._oldValue=this._assignFunc(this._value,this._oldValue),this._value=this._assignFunc(e,this._value)):(this._oldValue=this._value,this._value=e),this._changed&&this._changed.emit(e,this._oldValue)}}get value(){return this._value}get changed(){return this._changed||(this._changed=this.disposeVar(new m)),this._changed}forceChange(){this._changed&&this._changed.emit(this._value,this._value)}}function y(n,s,e){return new fe(n,s,e)}function F(n){return new fe(n,(s,e)=>s.length!==e.length?!1:s.every((t,i)=>t===e[i]),(s,e)=>{const t=e||new Array(s.length);return t.length=s.length,s.forEach((i,r)=>t[r]=i),t})}function ee(n){return y(n,(s,e)=>s===void 0||e===void 0?s===void 0&&e===void 0:s.length!==e.length?!1:s.every((t,i)=>t===e[i]),(s,e)=>{if(!s)return;const t=e||new Array(s.length);return t.length=s.length,s.forEach((i,r)=>t[r]=i),t})}function Cn(n,s,e){return y(n,(t,i)=>t.length!==i.length?!1:t.every((r,o)=>s&&s(r,i[o])||r===i[o]),(t,i)=>{const r=i||new Array(t.length);return r.length=t.length,t.forEach((o,h)=>{r[h]=e?e(o):o}),r})}function Xt(n,s,e){return y(n,(t,i)=>t===void 0||i===void 0?t===void 0&&i===void 0:t.length!==i.length?!1:t.every((r,o)=>s&&s(r,i[o])||r===i[o]),(t,i)=>{if(!t)return;const r=i||new Array(t.length);return r.length=t.length,t.forEach((o,h)=>{r[h]=e?e(o):o}),r})}function W(n){return new fe(n,(s,e)=>s===e||s!==void 0&&e!==void 0&&JSON.stringify(s)===JSON.stringify(e),(s,e)=>{if(s!==void 0)return JSON.parse(JSON.stringify(s))})}function te(n){return new fe(n,(s,e)=>s===e||s!==void 0&&e!==void 0&&JSON.stringify(s)===JSON.stringify(e),(s,e)=>{if(s!==void 0)return JSON.parse(JSON.stringify(s))})}function sd(n){return new fe(n,(s,e)=>{if(s===e)return!0;if(s===void 0||e===void 0)return!1;const t=Object.keys(s),i=Object.keys(e);return t.length!==i.length?!1:t.every((r,o)=>r===i[o]&&s[r]===e[r])},(s,e)=>s&&{...s})}function nd(n){return new fe(n,(s,e)=>{if(s===e)return!0;if(s===void 0||e===void 0)return!1;const t=Object.keys(s),i=Object.keys(e);return t.length!==i.length?!1:t.every((r,o)=>r===i[o]&&s[r]===e[r])},(s,e)=>s&&{...s})}function rd(n){return Cn(n,(s,e)=>s.every((t,i)=>t===e[i]),s=>[...s])}function Sr(n){return Xt(n,(s,e)=>s.every((t,i)=>t===e[i]),s=>[...s])}function od(n){return Cn(n,(s,e)=>JSON.stringify(s)===JSON.stringify(e),s=>JSON.parse(JSON.stringify(s)))}function ad(n){return Xt(n,(s,e)=>JSON.stringify(s)===JSON.stringify(e),s=>JSON.parse(JSON.stringify(s)))}function fi(n){return Sr(n)}function Pr(n){return Xt(n,(s,e)=>s.length===e.length&&s.every((t,i)=>t.every((r,o)=>r===e[i][o])),s=>s.map(e=>[...e]))}function hd(n){return Xt(n,(s,e)=>s.length===e.length&&s.every((t,i)=>t.every((r,o)=>r===e[i][o])),s=>s.map(e=>[...e]))}function Sn(n){const s=n instanceof fe?[n,"value","changed"]:[...n];return s[2]=s[2]||s[1]+"Changed",s}function Tr(n,s,e,t=!1){s[2]=s[2]||s[1]+"Changed";const i=()=>{const r=s[0][s[1]];e?n[0][n[1]]=e(r):n[0][n[1]]=r};return i(),t?s[0][s[2]].disposableWeakOn(i):s[0][s[2]].disposableOn(i)}function cd(n,s,e,t,i=!1){const r=Tr(n,s,e,i),o=Tr(s,n,t,i);return()=>(r(),o())}function _(n,s,e,t=!1){const i=n instanceof fe?[n,"value","changed"]:n,r=s instanceof fe?[s,"value","changed"]:s;return Tr(i,r,e,t)}function x(n,s,e,t,i=!1){const r=Sn(n),o=Sn(s);return cd(r,o,e,t,i)}function ld(n,s,e,t=!1){const[i]=Ws(s);return x(n,s,r=>r??e,r=>{if(!(r===e&&i()===void 0))return r},t)}function Ki(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var s=Math.random()*16|0,e=n==="x"?s:s&3|8;return e.toString(16)})}function Pn(n,s){if(!globalThis||!globalThis.setTimeout||!globalThis.clearTimeout)throw new Error("目前只适合在浏览器中使用!");let e=0;function t(){e>0&&(globalThis.clearTimeout(e),e=0)}function i(...r){t(),e=globalThis.setTimeout(n,s,...r)}return[i,t]}function Ir(n,s,...e){const t=setInterval(n,s,...e);return()=>clearInterval(t)}function Or(n,s,...e){const t=setTimeout(n,s,...e);return()=>clearTimeout(t)}function Tn(n,...s){let e;const t=()=>{const i=performance.now();n(i,...s),e=requestAnimationFrame(t)};return t(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Zi(n,...s){let e;return e=requestAnimationFrame(()=>{const i=performance.now();n(i,...s)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Hs(n,...s){let e=!1,t;return new Promise((i,r)=>{t=r,i()}).then(()=>{!e&&n(...s)}).catch(i=>{console.error(i)}),()=>(e=!0)&&t&&(t("nextMicroTask cancelled!"),t=void 0)}class In extends m{constructor(e,t,...i){super();a(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(r=>this.dispose(r[t?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class Dr extends In{constructor(...s){super(Hs,!1,...s)}}function dd(...n){return new Dr(...n)}class ud extends In{constructor(...s){super(Hs,!0,...s)}}function pd(...n){return new Dr(...n)}class On extends In{constructor(...s){super(Zi,!1,...s)}}function ae(...n){return new On(...n)}function gd(n,s){return new On(...n).don(s())}class ah extends In{constructor(...s){super(Zi,!0,...s)}}function fd(...n){return new ah(...n)}function ue(n,s,e={time:"don",immediate:!1}){const t=new On(...Array.isArray(n)?n:[n]),i=t[e.time??"don"](s);return(e.immediate??!1)&&s(),()=>{i(),t.destroy()}}function $s(n){let s;if(typeof n.next=="function")s=n;else if(typeof n[Symbol.iterator]=="function")s=n[Symbol.iterator]();else throw new Error("iteratorOrIterable error!");return s}function Fr(n,s){let e=!1;const t=$s(n);let i=-1;for(;;){const{done:r,value:o}=t.next();if(r)break;if(s(o,++i)){e=!0;break}}return e}function xr(n,s){return!Fr(n,(t,i)=>!s(t,i))}function Gs(n,s,e,t){const i=n;if(!i[s]){const r=t(),o=Object.fromEntries(Object.entries(r).filter(([h,c])=>{const l=Object.getPrototypeOf(e),u=h in l;if(u){const p=c instanceof fe?c.value:c;n[h]=p}return!u}).map(([h,c])=>c instanceof fe?[h,c]:[h,Array.isArray(c)?ee(c):y(c)]));i[s]=o}return i[s]}function Yt(n,s){var t;const e=Symbol(`${(t=n==null?void 0:n.constructor)==null?void 0:t.name}-createDefaultProps`);n.constructor.__xbsj_dpSymbol=e,n.constructor.__xbsj_createDefaultProps=s;for(let[i,r]of Object.entries(s()))if(!Reflect.has(n,i)){const o=function(h){var u,p;if(h[e])return;const c=[];let l=Object.getPrototypeOf(h);for(;l;)c.push(l),l=Object.getPrototypeOf(l);c.reverse();for(let g of c){const f=(u=g.constructor)==null?void 0:u.__xbsj_dpSymbol;if(!f)continue;const w=(p=g.constructor)==null?void 0:p.__xbsj_createDefaultProps;w&&Gs(h,f,g,w)}};Object.defineProperties(n,{[i]:{get(){return o(this),Gs(this,e,n,s)[i].value},set(h){o(this);const c=Gs(this,e,n,s)[i];if(!c){console.error("!propObj");debugger}c.value=h}},[`${i}Changed`]:{get(){return o(this),Gs(this,e,n,s)[i].changed}},[`${i}React`]:{get(){return o(this),Gs(this,e,n,s)[i]}}})}}const Js=new WeakMap;function gt(n,s,e){Js.has(n)||Js.set(n,{});const t=Js.get(n);t[s]=e}function Ae(n,s){return Js.has(n)?Js.get(n)[s]:void 0}function ft(n,s){const e=$s(n);let t=0;for(;;){const{done:i,value:r}=e.next();if(i)break;s(r,t++)}}function qs(n,s,e){const t=$s(n);let i=e,r=0;for(;;){const{done:o,value:h}=t.next();if(o)break;i=s(i,h,r++)}return i}const md=n=>++n;function kr(n){return qs(n,md,0)}function At(n){return qs(n,(s,e)=>s>e?s:e,Number.NEGATIVE_INFINITY)}function Kt(n){return qs(n,(s,e)=>s<e?s:e,Number.POSITIVE_INFINITY)}function hh(n,s){let e=n;for(let t of s)e=e[t];return e}function vd(n,s,e){if(s.length===0)throw new Error("props的数量必须大于0");const t=s.length-1,i=s[t];let r=n;for(let o=0;o<t;++o){const h=s[o];typeof r[h]>"u"&&(r[h]={}),r=r[h]}r[i]=e}function*mi(n,s){const e=$s(n);for(;;){const{done:t,value:i}=e.next();if(t)break;yield hh(i,s)}}class Xs extends b{constructor(){super();a(this,"_innerObj");a(this,"_toChangeEvent");a(this,"_changedEvent");this._innerObj=[],this.dispose(()=>{if(this.length=0,this._innerObj.length>0)throw new Error("this._innerObj.length > 0");this._toChangeEvent&&this._toChangeEvent.reset(),this._innerObj=void 0})}get toChangeEvent(){return this._toChangeEvent||(this._toChangeEvent=new m),this._toChangeEvent}get changedEvent(){return this._changedEvent||(this._changedEvent=new m),this._changedEvent}_resetArray(e){this._toChangeEvent&&this._toChangeEvent.emit([{start:0,deleteCount:this._innerObj.length,items:e}],this);const{length:t}=e;this._innerObj.length=t;for(let i=0;i<t;++i)this._innerObj[i]=e[i];this._changedEvent&&this._changedEvent.emit(this)}splice(e,t,...i){const{length:r}=this._innerObj;e=e>this._innerObj.length?this._innerObj.length:e,e>r?e=r:e<0&&(e+=r,e<0&&(e=0));const o=this._innerObj.length-e;if(t>o?t=o:t<0&&(t=0),arguments.length===1){this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:this._innerObj.length-e,items:[]}],this);const h=this._innerObj.splice(e);return this._changedEvent&&this._changedEvent.emit(this),h}else if(arguments.length===2){this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:t,items:[]}],this);const h=this._innerObj.splice(e,t);return this._changedEvent&&this._changedEvent.emit(this),h}else{this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:t,items:i}],this);const h=this._innerObj.splice(e,t,...i);return this._changedEvent&&this._changedEvent.emit(this),h}}pop(){if(this._innerObj.length===0)return;if(this._toChangeEvent){const t=this._innerObj.length-1,i=1,r=[];this._toChangeEvent.emit([{start:t,deleteCount:i,items:r}],this)}const e=this._innerObj.pop();return this._changedEvent&&this._changedEvent.emit(this),e}push(...e){if(this._toChangeEvent){const i=this._innerObj.length;this._toChangeEvent.emit([{start:i,deleteCount:0,items:e}],this)}const t=this._innerObj.push(...e);return this._changedEvent&&this._changedEvent.emit(this),t}get length(){return this._innerObj.length}set length(e){if(e<0)throw new Error("value < 0");const{length:t}=this._innerObj;if(t!==e){if(this._toChangeEvent){let i,r,o;t>e?(i=e,r=t-e,o=[]):(i=t,r=0,o=new Array(e-t)),this._toChangeEvent.emit([{start:i,deleteCount:r,items:o}],this)}this._innerObj.length=e,this._changedEvent&&this._changedEvent.emit(this)}}get(e){return this._innerObj[e]}set(e,t){const{length:i}=this._innerObj;if(e<0||e>=i)throw new Error("index < 0 || index >= length");this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:1,items:[t]}],this),this._innerObj[e]=t,this._changedEvent&&this._changedEvent.emit(this)}indexOf(e){return this._innerObj.indexOf(e)}[Symbol.iterator](){return this._innerObj[Symbol.iterator]()}}function Mr(n,s,...e){let t=n;for(let i of e){if(!t[i])if(s)t[i]={};else return;t=t[i]}return t}function _d(n,s,e){typeof e>"u"&&(s.endsWith(".gltf")?e="model/gltf+json":s.endsWith(".bin")?e="application/octet-stream":s.endsWith(".glb")?e="model/gltf-binary":s.endsWith(".jpg")||s.endsWith(".jpeg")?e="image/jpeg":s.endsWith(".png")?e="image/png":s.endsWith(".glsl")?e="text/plain":s.endsWith(".json")?e="application/json":s.endsWith(".b3dm")||s.endsWith(".i3dm")||s.endsWith("pnts")||s.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${s}: MimeType无法确定!`));const t=new Blob([n],{type:e||""});let i=URL.createObjectURL(t);var r=document.createElement("a"),o=new MouseEvent("click");r.download=s,r.href=i,r.dispatchEvent(o),URL.revokeObjectURL(i)}function wd(n,s){const e=document.createElement("a"),t=new MouseEvent("click");e.download=s||"下载",e.href=n,e.dispatchEvent(t)}function yd(){return new Promise((n,s)=>{const e=performance.now();requestAnimationFrame(t=>n(t>e))})}const Dn=n=>{let s,e;return e=t=>{t=performance.now(),s=requestAnimationFrame(e),n(t)},s=requestAnimationFrame(e),()=>{cancelAnimationFrame(s)}};function jr(n,s,e=Dn){let t=Number.NEGATIVE_INFINITY,i;function r(c){c-t>s&&i&&(n(...i),i=void 0,t=c)}const o=e&&e(r)||void 0;function h(...c){i=c}return[h,o]}const ch=[];function lh(n,s,e){if(ch.includes(n)){console.warn(`_loadJs ${n} has loaded before!`),s&&s();return}var t=document.getElementsByTagName("head")[0],i=document.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",n),i.onload=i.onreadystatechange=function(){this.readyState&&this.readyState!=="complete"||(ch.push(n),s&&s(),i.onload=i.onreadystatechange=null)},i.onerror=(r,o,h,c,l)=>{e(l)},t.appendChild(i)}function Rr(n,s=!0){if(s){const e=globalThis.L;globalThis.L&&(globalThis.L=void 0);const t=globalThis.define;return globalThis.define&&(globalThis.define=void 0),new Promise((i,r)=>{lh(n,i,r)}).then(()=>(globalThis.define=t,globalThis.L=e,Promise.resolve()))}else return new Promise((e,t)=>{lh(n,e,t)})}async function dh(n,s=""){return new Promise((e,t)=>{var i=new Image;i.crossOrigin=s,i.src=n,i.onload=()=>e(i),i.onerror=r=>t(r)})}class bd extends b{constructor(s){super(),this._owner=s}get owner(){return this._owner}}function Ed(n,s){if(n.length%3!==0)throw new Error("positions.length % 3 !== 0");const e=n.length/3;function*t(o){for(let h=0;h<e;++h)yield n[h*3+o]}const i=(s==null?void 0:s.min)??[NaN,NaN,NaN],r=(s==null?void 0:s.max)??[NaN,NaN,NaN];return i[0]=Kt(t(0))??NaN,i[1]=Kt(t(1))??NaN,i[2]=Kt(t(2))??NaN,r[0]=At(t(0))??NaN,r[1]=At(t(1))??NaN,r[2]=At(t(2))??NaN,{min:i,max:r}}async function Cd(n,s=fetch){const e=await s(n);return e.ok?await e.arrayBuffer():void 0}class Sd extends b{constructor(e){super();a(this,"_map",new Map);a(this,"_array",[]);a(this,"_createEvent",this.dv(new m));a(this,"_updateEvent",this.dv(new m));a(this,"_destroyEvent",this.dv(new m));this._idFunc=e,this.d(()=>{this._array.length>0&&console.warn("EventFromArrayUpdating: destroy with non-empty array, will trigger destroy event for all items")})}get createEvent(){return this._createEvent}get updateEvent(){return this._updateEvent}get destroyEvent(){return this._destroyEvent}update(e,t={toDel:!0,toAdd:!0,toUpdate:!0}){const{toDel:i=!0,toAdd:r=!0,toUpdate:o=!0}=t;for(let c of this._array)c.updated=!1;const h=e.length;for(let c=0;c<h;++c){const l=e[c],u=this._idFunc(l,c);if(this._map.has(u)){if(o){const p=this._map.get(u);if(!p)throw new Error("!edwi");p.updated=!0,p.item=l,this._updateEvent.emit(u,l)}}else if(r){const p={item:l,id:u,updated:!0};this._array.push(p),this._map.set(u,p),this._createEvent.emit(u,l)}}if(i){const c=this._array.filter(l=>!l.updated);this._array=this._array.filter(l=>l.updated);for(let l of c)this._map.delete(l.id);for(let l of c)this._destroyEvent.emit(l.id,l.item)}}}function Fn(n,...s){if(n>16)throw new Error("length > 16");const e=new Array(n);for(let t=0;t<n;++t)e[t]=s[t]??0;return e}class xn{constructor(s,e){this._xyzw=s,this._length=e}set 0(s){this._xyzw.x=s}set 1(s){this._xyzw.y=s}set 2(s){this._xyzw.z=s}set 3(s){this._xyzw.w=s}get 0(){return this._xyzw.x??0}get 1(){return this._xyzw.y??0}get 2(){return this._xyzw.z??0}get 3(){return this._xyzw.w??0}get length(){return this._length}}function Pd(n){return new xn(n,2)}function Td(n){return new xn(n,3)}function Id(n){return new xn(n,4)}class Od{constructor(s,e,t,i){this._array=s,this._length=e,this._start=t,this._stride=i}get length(){return this._length}set 0(s){this._array[this._start+0*this._stride]=s}set 1(s){this._array[this._start+1*this._stride]=s}set 2(s){this._array[this._start+2*this._stride]=s}set 3(s){this._array[this._start+3*this._stride]=s}set 4(s){this._array[this._start+4*this._stride]=s}set 5(s){this._array[this._start+5*this._stride]=s}set 6(s){this._array[this._start+6*this._stride]=s}set 7(s){this._array[this._start+7*this._stride]=s}set 8(s){this._array[this._start+8*this._stride]=s}set 9(s){this._array[this._start+9*this._stride]=s}set 10(s){this._array[this._start+10*this._stride]=s}set 11(s){this._array[this._start+11*this._stride]=s}set 12(s){this._array[this._start+12*this._stride]=s}set 13(s){this._array[this._start+13*this._stride]=s}set 14(s){this._array[this._start+14*this._stride]=s}set 15(s){this._array[this._start+15*this._stride]=s}set 16(s){this._array[this._start+16*this._stride]=s}get 0(){return this._array[this._start+0*this._stride]}get 1(){return this._array[this._start+1*this._stride]}get 2(){return this._array[this._start+2*this._stride]}get 3(){return this._array[this._start+3*this._stride]}get 4(){return this._array[this._start+4*this._stride]}get 5(){return this._array[this._start+5*this._stride]}get 6(){return this._array[this._start+6*this._stride]}get 7(){return this._array[this._start+7*this._stride]}get 8(){return this._array[this._start+8*this._stride]}get 9(){return this._array[this._start+9*this._stride]}get 10(){return this._array[this._start+10*this._stride]}get 11(){return this._array[this._start+11*this._stride]}get 12(){return this._array[this._start+12*this._stride]}get 13(){return this._array[this._start+13*this._stride]}get 14(){return this._array[this._start+14*this._stride]}get 15(){return this._array[this._start+15*this._stride]}get 16(){return this._array[this._start+16*this._stride]}}function Dd(n,s,e=0,t=1){return new Od(n,s,e,t)}d.Vector=void 0,(n=>{function s(P,...O){if(P=P||Fn(O.length),O.length>P.length)throw new Error("args.length > target.length");return P instanceof Float64Array?P.set(O):pt(O,P),P}n.set=s;function e(P,O){const K=P.length;for(let de=0;de<K;++de)if(!O(P[de],de))return!1;return!0}n.every=e;function t(P,O,K){const de=P.length;let je=K;for(let Rt=0;Rt<de;++Rt)je=O(je,P[Rt],Rt);return je}n.reduce=t;function*i(P){for(let O=0;O<P.length;++O)yield P[O]}n.itr=i;const r=(P,O)=>P+=O*O;function o(P){return t(P,r,0)}n.magnitudeSquared=o;function h(P){const O=o(P);return Math.sqrt(O)}n.magnitude=h;function c(P,O=1e-5){const K=o(P);return Math.abs(K-1)<O}n.isNormalized=c;let l;const u=(P,O,K)=>P+O*l[K];function p(P,O){return Z(P,O),l=O,t(P,u,0)}n.dot=p;let g;const f=(P,O,K)=>P+=(O-g[K])*(O-g[K]);function w(P,O){return Z(P,O),g=O,t(P,f,0)}n.distanceSquared=w;function E(P,O){return Math.sqrt(w(P,O))}n.distance=E;let C;const T=(P,O)=>P===C[O];function R(P,O){return Z(P,O),C=O,e(P,T)}n.equals=R;let V,I;const H=(P,O)=>Math.abs(P-V[O])<I;function q(P,O,K=0){return Z(P,O),V=O,I=K,e(P,H)}n.equalsEpsilon=q;function Z(P,O){if(P.length!==O.length)throw new Error("left.length !== right.length")}function Me(P,O,K){const de=P.length;K=K||Fn(de),Z(P,K);for(let je=0;je<de;++je)K[je]=O(P[je],je);return K}n.op1=Me;function Ge(P,O,K,de){Z(P,O),de&&Z(P,de);const je=P.length;de=de||Fn(je);for(let Rt=0;Rt<je;++Rt)de[Rt]=K(P[Rt],O[Rt]);return de}n.op2=Ge;const jt=P=>P;function pt(P,O){return Me(P,jt,O)}n.clone=pt;let ui=0;const pi=(P,O)=>P*ui;function Ya(P,O,K){return ui=O,Me(P,pi,K)}n.multiplyByScalar=Ya;function rf(P,O,K=0){const de=o(P);if(de<=K)return;const je=Math.sqrt(de);return Ya(P,1/je,O)}n.normalize=rf;function of(P,O){return Ya(P,-1,O)}n.negate=of;const af=P=>Math.abs(P);function hf(P,O){return Me(P,af,O)}n.abs=hf;const cf=P=>P-Math.floor(P);function lf(P,O){return Me(P,cf,O)}n.fract=lf;const df=(P,O)=>P-O;function uf(P,O,K){return Ge(P,O,df,K)}n.subtract=uf;const pf=(P,O)=>P+O;function gf(P,O,K){return Ge(P,O,pf,K)}n.add=gf;const ff=(P,O)=>P*O;function mf(P,O,K){return Ge(P,O,ff,K)}n.multiply=mf;const vf=(P,O)=>P/O;function _f(P,O,K){return Ge(P,O,vf,K)}n.divide=_f;let Ka;const wf=(P,O)=>P*(1-Ka)+O*Ka;function yf(P,O,K,de){return Ka=K,Ge(P,O,wf,de)}n.lerp=yf})(d.Vector||(d.Vector={}));function kn(n,s=0,e=1){return n<s?s:n>e?e:n}class Mn extends b{constructor(e,t,i,r,o,h,c,l){super();a(this,"__status");a(this,"_statusChangedEvent");a(this,"_forceCancelFunc");a(this,"_startEvent");a(this,"_progressEvent");a(this,"_completeEvent");a(this,"_cancelEvent");a(this,"_cancelledEvent");a(this,"_errorEvent");a(this,"_finishedEvent");a(this,"_processingID",-1);this._startProcessingFunc=e,this.startFunc=t,this.progressFunc=i,this.completeFunc=r,this.cancelFunc=o,this.cancelledFunc=h,this.errorFunc=c,this.finishedFunc=l,this._status="Initial",this.dispose(()=>{var u;return(u=this._statusChangedEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._startEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._progressEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._completeEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._cancelEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._cancelledEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._errorEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._finishedEvent)==null?void 0:u.destroy()}),this.dispose(()=>this.reset())}get startEvent(){return this._startEvent=this._startEvent||new m,this._startEvent}get progressEvent(){return this._progressEvent=this._progressEvent||new m,this._progressEvent}get completeEvent(){return this._completeEvent=this._completeEvent||new m,this._completeEvent}get cancelEvent(){return this._cancelEvent=this._cancelEvent||new m,this._cancelEvent}get cancelledEvent(){return this._cancelledEvent=this._cancelledEvent||new m,this._cancelledEvent}get errorEvent(){return this._errorEvent=this._errorEvent||new m,this._errorEvent}get finishedEvent(){return this._finishedEvent=this._finishedEvent||new m,this._finishedEvent}_completeFunc(e,t){this.processingID===e&&this._status==="Running"&&(this._status="Completed",this.completeFunc&&this.completeFunc(t),this._completeEvent&&this._completeEvent.emit(t),this.finishedFunc&&this.finishedFunc({status:"Completed",value:t}),this._finishedEvent&&this._finishedEvent.emit({status:"Completed",value:t}))}_cancelFunc(e){this._status==="Running"&&(this._status="Cancelling",this.cancelFunc&&this.cancelFunc(e),this._cancelEvent&&this._cancelEvent.emit(e))}_cancelledFunc(e){this._status==="Cancelling"&&(this._status="Cancelled",this.cancelledFunc&&this.cancelledFunc(e),this._cancelledEvent&&this._cancelledEvent.emit(e),this.finishedFunc&&this.finishedFunc({status:"Cancelled",cancelError:e}),this._finishedEvent&&this._finishedEvent.emit({status:"Cancelled",cancelError:e}))}_errorFunc(e,t){this.processingID===e&&this._status==="Running"&&(this._status="Error",this.errorFunc&&this.errorFunc(t),this._errorEvent&&this._errorEvent.emit(t),this.finishedFunc&&this.finishedFunc({status:"Error",error:t}),this._finishedEvent&&this._finishedEvent.emit({status:"Error",error:t}))}_progressFunc(e,t){this.processingID===e&&this._status==="Running"&&(this.progressFunc&&this.progressFunc(t),this._progressEvent&&this._progressEvent.emit(t))}_startFunc(...e){if(this._status==="Initial"){this._status="Running";const t=++this._processingID,i={completeFunc:this._completeFunc.bind(this,t),errorFunc:this._errorFunc.bind(this,t),progressFunc:this._progressFunc.bind(this,t),cancelFunc:this._cancel.bind(this,t),processingID:t},r=this._startProcessingFunc(i,...e);return this._forceCancelFunc=r,this.startFunc&&this.startFunc(...e),this._startEvent&&this._startEvent.emit(...e),t}else return console.warn("this._status !== 'Initial' but start again!"),-1}set _status(e){if(this.__status!==e){const t=this.__status;this.__status=e,this._statusChangedEvent&&this._statusChangedEvent.emit(e,t)}}get _status(){return this.__status}get processingID(){return this._processingID}get statusChangedEvent(){return this._statusChangedEvent||(this._statusChangedEvent=new m),this._statusChangedEvent}reset(e){this._status==="Running"&&this.cancel(e),this._status==="Cancelled"||this._status==="Error"||this._status==="Completed"?this._status="Initial":this._status==="Cancelling"&&console.warn("Cannot reset! (this._status === 'Cancelling')")}get status(){return this._status}cancel(e,t=this.processingID){return this._cancel(t,e)}_cancel(e,t){if(this.processingID===e)if(this._status==="Running"){if(!this._forceCancelFunc)throw new Error("this._forceCancelFunc is undefined!");this._cancelFunc(t);const i=this._forceCancelFunc(t);if(this._forceCancelFunc=void 0,i&&i instanceof Promise)return i.then(()=>{this._cancelledFunc(t)});this._cancelledFunc(t)}else console.warn("this._status !== 'Running' but cancel")}start(...e){try{return this._startFunc(...e)}catch(t){console.error(`processing start error: ${t}`)}}restart(e,...t){try{return this.isRunning&&this.cancel(e),this.isFinished&&this.reset(e),this.isInitial?this._startFunc(...t):(console.warn("restart failed!"),-1)}catch(i){console.error(`processing restart error: ${i}`)}}get isCompleted(){return this._status==="Completed"}get isCancelled(){return this._status==="Cancelled"}get isCancelling(){return this._status==="Cancelling"}get isError(){return this._status==="Error"}get isInitial(){return this._status==="Initial"}get isRunning(){return this._status==="Running"}get isFinished(){return this.isCancelled||this.isCompleted||this.isError}}let Ar=class extends Error{};function uh(n,s){typeof n=="function"?n(s):n.cancelFunc=s}class Nr extends Mn{constructor(e=300){super(({progressFunc:t,completeFunc:i,errorFunc:r})=>{const[o,h]=Pn(()=>{if(!this._lastDebounceValue)throw new Error("!this._lastDebounceValue");t([this._lastDebounceValue,this._debouncTimes]),this._debouncTimes=0},this._delayTime);return this._d=o,()=>{h()}});a(this,"_lastDebounceValue");a(this,"_debouncTimes",0);a(this,"_d");this._delayTime=e}get delayTime(){return this._delayTime}debounce(...e){this.isRunning?(++this._debouncTimes,this._lastDebounceValue=e,this._d&&this._d()):console.warn("Debouncing is not running!")}}function ph(n,s,...e){const t=new AbortController;let i=t.signal,[r,o]=e;if(o!=null&&o.signal)throw console.error("init?.signal"),new Error("init?.signal");o=o||{},o.signal=i;let h=!1;uh(n,()=>{h=!0,t.abort()});let c=fetch(r,o);return s&&(c=c.then(l=>{if(!l.ok)return l;if(!l.body)throw Error("ReadableStream not yet supported in this browser.");const u=l.headers.get("content-length"),p=u?parseInt(u,10):0;let g=0;return new Response(new ReadableStream({start(f){if(!l.body)throw new Error("!response.body");const w=l.body.getReader();E();function E(){w.read().then(({done:C,value:T})=>{if(C){f.close();return}if(!T)throw new Error("!value");if(!s)throw new Error("!progressFunc");g+=T.byteLength,s(g,p),f.enqueue(T),E()}).catch(C=>{f.error(C)})}}}),{status:l.status,statusText:l.statusText,headers:l.headers})}).catch(l=>{throw h?(l instanceof Error&&l.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new Ar("fetching cancelled!")):(l instanceof Error&&l.code===20&&console.error("error.code === 20"),l)})),c}function gh(...n){if(n.length>=1)if(typeof n[0]=="function"||typeof n[0]>"u"){const s={};let e=ph(s,...n);const{cancelFunc:t}=s;if(!t)throw new Error("!cancelResult.cancelFunc");return[t,e]}else return ph(...n);throw new Error("cancelableFetch args error!")}class Fd extends Mn{constructor(e,...t){super(({progressFunc:i,completeFunc:r,errorFunc:o},...h)=>{const c={};let l={loaded:0,total:0};const u=(f,w)=>{l.loaded=f,l.total=w,i(l)},p=this._fetchArgs||h;if(p.length===0)throw new Error("fetchArgs.length === 0");if(gh(c,u,...p).then(e).then(r).catch(f=>{f instanceof Ar||o(f)}),!c.cancelFunc)throw new Error("!cancelResult.cancelFunc");return c.cancelFunc});a(this,"_fetchArgs");t.length>0&&(this._fetchArgs=t)}get fetchArgs(){return this._fetchArgs}}function Vr(n,s,e,t){const i="_"+s,r="_"+s+"Changed",o=s+"Changed";Object.defineProperties(n.prototype,{[s]:{get(){return typeof this[i]>"u"&&typeof e<"u"&&(this[i]=e),this[i]},set(h){if(typeof this[i]>"u"&&typeof e<"u"&&(this[i]=e),t?!t(this[i],h):this[i]!==h){const c=this[i];this[i]=h,this[r]&&this[r].emit(h,c)}}},[o]:{get(){return typeof this[r]>"u"&&(this[r]=new m,typeof this.dispose<"u"&&this.dispose(()=>this[r].destroy())),this[r]}}})}class Lr extends Mn{constructor(e,t=!0){super(({progressFunc:i,completeFunc:r,errorFunc:o})=>(this._intervalFunc=i,this._intervalID&&console.error("this._intervalID should be undefined!"),this.leading&&i(),this._intervalID=setInterval(i,this.intervalTime),()=>{if(!this._intervalID)throw console.error("this._intervalID should not be undefined!"),new Error("this._intervalID should not be undefined!");clearInterval(this._intervalID),this._intervalID=void 0}));a(this,"_intervalID");a(this,"_intervalFunc");this.intervalTime=e,this.leading=t,this.dispose(this.intervalTimeChanged.disposableOn(()=>{this._intervalID&&this._intervalFunc&&(clearInterval(this._intervalID),this._intervalID=setInterval(this._intervalFunc,this.intervalTime))}))}}Vr(Lr,"leading",!0),Vr(Lr,"intervalTime",500);function xd(n,s){let e,t;const i=new Promise((o,h)=>{t=h,e=globalThis.setTimeout(()=>{e=void 0,o()},n)}),r=o=>{e&&(clearTimeout(e),e=void 0),t&&t(o??new Ar("sleep cancel error!"))};if(typeof s=="boolean"&&s)return[r,i];if(s)return uh(s,r),i}class kd{constructor(s=0,e=0,t=0,i,r){a(this,"_processData");a(this,"_lastUpdateTimeStamp",0);this.startTime=s,this.duration=e,this.delay=t,this.proccessFunc=i,this.completeFunc=r,this._processData={ratio:0,timeStamp:0,timeStampFromStart:0,timeStampFromLastUpdate:0}}update(s){const e=(s-this.startTime)/this.duration;e>=0&&(this._processData.ratio=e,this._processData.timeStamp=s,this._processData.timeStampFromStart=s-this.startTime,this._processData.timeStampFromLastUpdate=s-this._lastUpdateTimeStamp,this._lastUpdateTimeStamp=s,this.proccessFunc&&this.proccessFunc(this._processData),e>=1&&this.completeFunc&&this.completeFunc())}start(){this.startTime=performance.now()+this.delay,this._lastUpdateTimeStamp=this.startTime}}class fh extends Mn{constructor(e=1e3,t=0,i=Dn){let r;function o(){r&&r()}super(({progressFunc:c,completeFunc:l,errorFunc:u})=>{const p=this.startUpdateFunc&&this.startUpdateFunc(this._base.update.bind(this._base))||void 0;return this._base.startTime=performance.now(),this._base.duration=this.duration,this._base.delay=this.delay,this._base.proccessFunc=c,this._base.completeFunc=()=>{p&&p(),l()},this._base.start(),r=p,o});a(this,"_base");a(this,"duration");a(this,"delay");a(this,"startUpdateFunc");this._base=new kd,this.duration=e,this.delay=t,this.startUpdateFunc=i}get startTime(){return this._base.startTime}}class Md extends b{constructor(e){super();a(this,"_target",0);a(this,"_current",0);a(this,"_start",0);a(this,"_timing",new fh(Number.POSITIVE_INFINITY));a(this,"_currentChanged");this._duration=e,this._timing.progressFunc=({ratio:t})=>{t=t<0?0:t>1?1:t;const i=this._start*(1-t)+this._target*t;this._current=i,this._currentChanged&&this._currentChanged.emit(this._target,this._current)},this.dispose(()=>{this._timing.isRunning&&this._timing.cancel(),this._timing.destroy()})}reset(e,t=e){this._timing.isRunning&&this._timing.cancel(),this._target=e,this._current=t,this._start=e}set target(e){if(this._target!==e){this._target=e,this._timing.isRunning&&this._timing.cancel(),this._timing.reset(),this._start=this._current;const t=Math.abs(this._target-this._start);this._timing.duration=t*this._duration,this._timing.start()}}get target(){return this._target}get current(){return this._current}get currentChanged(){return this._currentChanged||(this._currentChanged=new m),this._currentChanged}}function mh(n,s){s=s||[];const e=n.parentNode;return e?mh(e,s.concat(e)):s}function jd(n){const s=n.composedPath&&n.composedPath()||n.path,e=n.target;if(s!=null)return s.indexOf(globalThis)<0?s.concat(globalThis):s;if(e===globalThis)return[globalThis];if(e===null)throw new Error("target === null");return[e].concat(mh(e),globalThis)}function Ee(n,s=!1){const{offsetX:e,offsetY:t}=n;let i=e,r=t;{const o=jd(n);for(let h=0;h<o.length;++h){const c=o[h];if(c!==n.currentTarget&&c instanceof HTMLElement)i+=c.clientLeft,r+=c.clientTop,i+=c.offsetLeft,r+=c.offsetTop;else break}}return s?[i*globalThis.devicePixelRatio,r*globalThis.devicePixelRatio]:[i,r]}function Qi(n,s=!1){const e=n.target,t=n.currentTarget||n.__xbsj_lastCurrentTarget__;if(!e||!t)return[n.clientX,n.clientY];const i=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=i.left+n.offsetX,h=i.top+n.offsetY,c=o-r.left,l=h-r.top;return s?[c*globalThis.devicePixelRatio,l*globalThis.devicePixelRatio]:[c,l]}class vh extends b{constructor(e){super();a(this,"_clickEvent",new m);a(this,"_dbclickEvent",new m);a(this,"_downEvent",new m);a(this,"_upEvent",new m);a(this,"_moveEvent",new m);a(this,"_debouncing",new Nr(300));this.dispose(()=>{this._clickEvent.destroy(),this._dbclickEvent.destroy(),this._downEvent.destroy(),this._upEvent.destroy(),this._moveEvent.destroy(),this._debouncing.destroy()});let t=!1,i=[0,0],r=!1;this._debouncing.progressFunc=([[u,p,g],f])=>{f===1?this._clickEvent.emit(u,p,g):f>=2?this._dbclickEvent.emit(u,p,g):console.error("point click should not be here!")},this._debouncing.start(),this.dispose(()=>{this._debouncing.isRunning&&this._debouncing.cancel(),this._debouncing.destroy()});const o=u=>{t=!0;const[p,g]=Ee(u);i[0]=p,i[1]=g,this._downEvent.emit(p,g,u)},h=u=>{const[p,g]=Ee(u);t&&!r&&this._debouncing.debounce(p,g,u),t=!1,r=!1,this._upEvent.emit(p,g,u)},c=u=>{const[p,g]=Ee(u);if(t&&!r){const[f,w]=i;(Math.abs(p-f)>3||Math.abs(g-w)>3)&&(r=!0)}this._moveEvent.emit(p,g,u)},l=()=>{t=!1,r=!1};e.addEventListener("pointerdown",o),e.addEventListener("pointerup",h),e.addEventListener("pointermove",c),e.addEventListener("pointerout",l),this.dispose(()=>{e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",h),e.removeEventListener("pointermove",c),e.removeEventListener("pointerout",l)})}get clickEvent(){return this._clickEvent}get dbclickEvent(){return this._dbclickEvent}get downEvent(){return this._downEvent}get upEvent(){return this._upEvent}get moveEvent(){return this._moveEvent}}class zr extends b{constructor(){super();a(this,"_pickRectEvent",this.disposeVar(new m));a(this,"_updateRectEvent",this.disposeVar(new m));a(this,"_pointerActionEvent",this.disposeVar(new m));a(this,"_active",this.disposeVar(y(!1)));a(this,"_pickRect",{left0:0,top0:0,left1:0,top1:0});let e=0,t=0,i=0,r=0;this.dispose(this._pointerActionEvent.disposableOn(({type:o,left:h,top:c})=>{o==="PointerDown"?(this._active.value=!0,e=h,t=c,i=h,r=c,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect)):o==="PointerMove"?this._active.value&&(i=h,r=c,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect)):o==="PointerUp"&&this._active.value&&(this._active.value=!1,i=h,r=c,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect))}))}_setPickRect({left0:e,left1:t,top0:i,top1:r}){this._pickRect.left0=e,this._pickRect.left1=t,this._pickRect.top0=i,this._pickRect.top1=r}pointerDown(e,t){this._pointerActionEvent.emit({type:"PointerDown",left:e,top:t})}pointerMove(e,t){this._pointerActionEvent.emit({type:"PointerMove",left:e,top:t})}pointerUp(e,t){this._pointerActionEvent.emit({type:"PointerUp",left:e,top:t})}reset(){this._setPickRect({left0:0,top0:0,left1:0,top1:0}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect)}get activeEvent(){return this._active.changed}get updateRectEvent(){return this._updateRectEvent}get pickRectEvent(){return this._pickRectEvent}static getLeftTopAndSize(e,t){t=t||{left:0,top:0,width:0,height:0,forward:!0};const{left0:i,top0:r,left1:o,top1:h}=e;return t.width=Math.abs(i-o),t.height=Math.abs(r-h),t.left=Math.min(i,o),t.top=Math.min(r,h),t.forward=o>i,t}static contains(e,t,i){const{left:r,top:o,width:h,height:c}=i;return e>r&&e<=r+h&&t>=o&&t<=o+c}}class Rd extends zr{constructor(s){super();const e=this.disposeVar(new vh(s));this.dispose(e.downEvent.disposableOn((o,h,c)=>c.altKey&&this.pointerDown(o,h))),this.dispose(e.moveEvent.disposableOn((o,h)=>this.pointerMove(o,h))),this.dispose(e.upEvent.disposableOn((o,h)=>this.pointerUp(o,h)));const t=document.createElement("div");t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="2px dashed red",t.style.position="absolute",t.style.boxSizing="border-box",t.style.pointerEvents="none",t.style.height="0px",t.style.width="0px",t.style.left="0px",t.style.top="0px",t.style.display="none",s.appendChild(t),this.dispose(()=>s.removeChild(t)),this.dispose(this.activeEvent.disposableOn(o=>{t.style.display=o?"block":"none"}));const i=()=>{this.reset()};s.addEventListener("contextmenu",i),this.dispose(()=>s.removeEventListener("contextmenu",i));const r={left:0,top:0,width:0,height:0,forward:!1};this.dispose(this.updateRectEvent.disposableOn(o=>{if(zr.getLeftTopAndSize(o,r)){const{left:h,top:c,width:l,height:u}=r;t.style.height=`${u|0}px`,t.style.width=`${l|0}px`,t.style.left=`${h|0}px`,t.style.top=`${c|0}px`}}))}}class et extends Error{}function Zt(n,s){Ae(n,"_promise_cancel")&&console.warn("setPromiseCancel warn: promise has cancelFunc!"),gt(n,"_promise_cancel",s)}function es(n){return Ae(n,"_promise_cancel")}function ts(n){return!!es(n)}function Ur(n,s){const e=es(n);return e?(e(s),!0):!1}function Wr(n){const[s,e]=n;return Zt(e,s),e}function is(n){let s;const e=new Promise((t,i)=>{s=i,n.then(t).catch(i)});return Zt(e,s),e}function Ad(n){let s,e;var t=new Promise((i,r)=>{e=n.disposableOn((...o)=>{e&&e(),i(o)}),s=o=>{e&&e(),r(o)}});return[s,t]}function Nd(n){const s=new m,e=new m;return n.then(t=>{s.isDestroyed()||s.emit(t)}).catch(t=>{e.isDestroyed()||e.emit(t)}),[s,e]}class Br extends b{constructor(){super();a(this,"_cancelled",!1);a(this,"_cancelError");a(this,"_promiseSet",new Set);a(this,"_disposer")}get disposer(){return this._disposer=this._disposer||new b,this._disposer}destroyImp(){this.finally()}cancel(e){var t;if(!this._cancelled){this._cancelled=!0,(t=this._disposer)==null||t.destroy(),this._cancelError=e;for(let i of this._promiseSet)Ur(i);this._promiseSet.clear()}}get cancelFuncsNum(){return qs(this._promiseSet,e=>e+1,0)}finally(){this._disposer&&!this._disposer.isDestroyed()&&this._disposer.destroy(),this._promiseSet.clear()}check(){if(this._cancelled)throw this._cancelError??new et("cancel from CancelManager!")}promise(e){return this._promiseSet.add(e),e.finally(()=>(this._promiseSet.delete(e),this.check()))}promiseAny(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ts(r)&&t.push(es(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.any(i).finally(()=>(t.forEach((r=>r(new et("cancel from promiseAny!")))),t.length=0))}promiseAll(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ts(r)&&t.push(es(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.all(i).finally(()=>(t.forEach((r=>r(new et("cancel from promiseAll!")))),t.length=0))}promiseRace(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ts(r)&&t.push(es(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.race(i).finally(()=>(t.forEach((r=>r(new et("cancel from promiseRace!")))),t.length=0))}}class me extends b{constructor(e){super();a(this,"_status","Initial");a(this,"_completeEvent");a(this,"_errorEvent");a(this,"_completeFunc");a(this,"_errorFunc");a(this,"_cancelFunc");a(this,"_runningId",-1);this._startFunc=e,this.dispose(()=>this.isRunning&&this.cancel())}get errorEvent(){return this._errorEvent||(this._errorEvent=new m),this._errorEvent}get completeEvent(){return this._completeEvent||(this._completeEvent=new m),this._completeEvent}get errorFunc(){return this._errorFunc}get completeFunc(){return this._completeFunc}set errorFunc(e){this._errorFunc!==e&&(this._errorFunc=e)}set completeFunc(e){this._completeFunc!==e&&(this._completeFunc=e)}start(...e){if(this._status!=="Initial")return;const t=++this._runningId;this._status="Running",this._cancelFunc=this._startFunc({completeFunc:i=>{var r;t===this._runningId&&this._status==="Running"&&(this._status="Completed",this._completeFunc&&this._completeFunc(i),(r=this._completeEvent)==null||r.emit(i))},errorFunc:i=>{var r;t===this._runningId&&this._status==="Running"&&(this._status="Error",this._errorFunc&&this._errorFunc(i),(r=this._errorEvent)==null||r.emit(i))},runningingID:t},...e)}cancel(e=new et("")){var t;if(this._status==="Running"){if(!this._cancelFunc)throw new Error("!this._cancelFunc");this._status="Error",this._errorFunc&&this._errorFunc(e),(t=this._errorEvent)==null||t.emit(e),this._cancelFunc(e),this._cancelFunc=void 0}}reset(){this._status==="Running"&&console.error("processing cannot reset while running. you can first cancel it!"),(this._status==="Completed"||this._status==="Error")&&(this._status="Initial")}get status(){return this._status}get isInitial(){return this._status==="Initial"}get isRunning(){return this._status==="Running"}get isCompleted(){return this._status==="Completed"}get isError(){return this._status==="Error"}get runningId(){return this._runningId}restart(e=new et(""),...t){this.isRunning&&this.cancel(e),this.reset(),this.start(...t)}restartIfNotRunning(...e){this.isRunning||(this.reset(),this.start(...e))}}function Ys(n){return(s,...e)=>{const t=new Br,{completeFunc:i,errorFunc:r}=s,o=n(t,...e).then(i).catch(r).finally(()=>t.destroy());return Zt(o,t.cancel.bind(t)),h=>Ur(o,h)}}class Vd extends me{constructor(){super(({errorFunc:e},t,i)=>{try{const[r,o]=Pn(t,i);return this._doFunc=r,o}catch(r){return e(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class Ld extends me{constructor(e,t){super(({errorFunc:i})=>{try{const[r,o]=Pn(e,t);return this._doFunc=r,o}catch(r){return i(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}function zd(n){return new me(Ys((s,...e)=>s.promise(n(...e))))}function Ud(n,...s){return new me(Ys(e=>e.promise(n(...s))))}function jn(n){return zd((...s)=>{const e=n(...s);return ts(e)?e:is(e)})}function Hr(n,...s){return Ud(()=>{const e=n(...s);return ts(e)?e:is(e)})}function Wd(n){let s;const e=new Promise((t,i)=>{s=()=>{n(),i()}});return Zt(e,s),e}function Bd(n,...s){const e=new Br,t=n(e,...s).finally(()=>e.destroy());return Zt(t,e.cancel.bind(e)),t}function Ne(n){return new me(Ys(n))}function Hd(n,...s){return new me(Ys(e=>n(e,...s)))}function _h(n,...s){const e=new AbortController;let t=e.signal,[i,r]=s;if(r!=null&&r.signal)throw console.error("init?.signal"),new Error("init?.signal");r=r||{},r.signal&&console.warn("revocableFetch error: init.signal would be override!"),r.signal=t;let o=!1;const h=()=>{o=!0,e.abort()};let c=fetch(i,r);return n&&(c=c.then(l=>{if(!l.ok)return l;if(!l.body)throw Error("ReadableStream not yet supported in this browser.");const u=l.headers.get("content-length");u||console.warn("response.headers.get('content-length') is undefined... cannot get contentLength!");const p=u?parseInt(u,10):0;let g=0;return new Response(new ReadableStream({start(f){if(!l.body)throw new Error("!response.body");const w=l.body.getReader();E();function E(){w.read().then(({done:C,value:T})=>{if(C){f.close();return}if(!T)throw new Error("!value");if(!n)throw new Error("!progressFunc");g+=T.byteLength,n(g,p),f.enqueue(T),E()}).catch(C=>{f.error(C)})}}}),{status:l.status,statusText:l.statusText,headers:l.headers})}).catch(l=>{throw o?(l instanceof Error&&l.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new et(`fetching cancelled! error: ${l}`)):(l instanceof Error&&l.code===20&&console.error("error.code === 20"),l)})),Zt(c,h),c}function $d(n,...s){return _h(n,...s)}function $r(...n){return _h(void 0,...n)}function Gd(){return jn($r)}function Jd(...n){return Hr($r,...n)}function Gr(n,...s){let e=-1;var t=new Promise((i,r)=>{n.isRunning&&n.cancel(),n.reset();const o=new b;o.dispose(n.completeEvent.disposableOn(h=>{if(i(h),o.isDestroyed()){debugger;console.error(`disposer is destroyed! ${o}`);return}o.destroy()})),o.dispose(n.errorEvent.disposableOn(h=>{if(r(h),o.isDestroyed()){debugger;console.error(`disposer is destroyed! ${o}`);return}o.destroy()})),n.start(...s),e=n.runningId});return[i=>e===n.runningId&&n.isRunning&&n.cancel(i),t]}function mt(n,s,...e){try{return s(...e)}catch(t){n(t)}}function qd(){return new me(({completeFunc:n,errorFunc:s},e)=>Zi(()=>mt(s,()=>{e&&e(),n()})))}function Xd(n){return new me(({completeFunc:s,errorFunc:e})=>Zi(()=>mt(e,()=>{n&&n(),s()})))}function Yd(){return new me(({completeFunc:n,errorFunc:s},e)=>Hs(()=>{mt(s,()=>{e&&e(),n()})}))}function Kd(n){return new me(({completeFunc:s,errorFunc:e})=>Hs(()=>{mt(e,()=>{n&&n(),s()})}))}function wh(){return new me(({completeFunc:n,errorFunc:s},e,t)=>Or(()=>{mt(s,()=>{e&&e(),n()})},t??1e3))}function yh(n,s){return new me(({completeFunc:e,errorFunc:t})=>Or(()=>{mt(t,()=>{n&&n(),e()})},s??1e3))}function Zd(){return new me(({errorFunc:n},s,e=1e3)=>Ir(()=>mt(n,s),e))}function Qd(n,s=1e3){return new me(({errorFunc:e})=>Ir(()=>mt(e,n),s))}function Ks(){return new me(({errorFunc:n},s)=>Tn(e=>mt(n,s,e)))}function ss(n){return new me(({errorFunc:s})=>Tn(e=>mt(s,n,e)))}function Zs(n,...s){let e,t;const i=new Promise((o,h)=>{t=h,e=globalThis.setTimeout(()=>{e=void 0,o(s)},n)});return Zt(i,o=>{e&&(clearTimeout(e),e=void 0),t&&t(o??new et("sleep cancel error!"))}),i}function eu(){return jn(Zs)}function tu(n,...s){return Hr(Zs,n,...s)}function vi(n,s,...e){return n.promise(Wr(Gr(Ne(async(t,...i)=>(n.disposer.dispose(()=>{t.isDestroyed()||t.cancel()}),await s(t,...i))),...e)))}function iu(n,s,...e){return n.promise(Wr(Gr(s,...e)))}class su extends me{constructor(){super(({errorFunc:e},t,i)=>{try{const[r,o]=jr(t,i);return this._doFunc=r,o}catch(r){return e(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class nu extends me{constructor(e,t){super(({errorFunc:i})=>{try{const[r,o]=jr(e,t);return this._doFunc=r,o}catch(r){return i(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class Rn extends b{constructor(e=1e3,t=Dn){super();a(this,"_speed");a(this,"_speedChangedEvent");a(this,"_duration");a(this,"_durationChangedEvent");a(this,"_loop");a(this,"startUpdateFunc");a(this,"_updateBindThis");a(this,"_cancelStartUpdateFunc");a(this,"_startTimeStamp");a(this,"_playingChangedEvent");a(this,"_startPlayingEvent");a(this,"_stopPlayingEvent");a(this,"_loopChangedEvent");a(this,"_currentTime",this.disposeVar(y(0)));this._speed=1,this._duration=e,this._loop=!1,this.startUpdateFunc=t,this._updateBindThis=this._update.bind(this),this.dispose(()=>{this._cancelStartUpdateFunc&&(this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0)}),this._startTimeStamp=Number.NaN,this.dispose(()=>{this._startPlayingEvent&&this._startPlayingEvent.reset(),this._stopPlayingEvent&&this._stopPlayingEvent.reset()})}get startPlayingEvent(){return this._startPlayingEvent=this._startPlayingEvent||new m,this._startPlayingEvent}get stopPlayingEvent(){return this._stopPlayingEvent=this._stopPlayingEvent||new m,this._stopPlayingEvent}get currentTimeChangedEvent(){return this._currentTime.changed}get loopChangedEvent(){return this._loopChangedEvent=this._loopChangedEvent||new m,this._loopChangedEvent}set loop(e){this._loop!==e&&(this._loop=e,this._loopChangedEvent&&this._loopChangedEvent.emit(this._loop))}get loop(){return this._loop}_update(e){if(Number.isNaN(this._startTimeStamp))console.warn("Number.isNaN(this._startTimeStamp)");else{const t=(e-this._startTimeStamp)*this._speed;this._setCurrentTimeInner(t)}}get currentTime(){return this._currentTime.value}set currentTime(e){this._setCurrentTimeInner(e),this._resetStartTime()}_setCurrentTimeInner(e){this._currentTime.value!==e&&(this._duration<=0?this._currentTime.value=0:e<0?this.loop?this._currentTime.value=this._duration+e%this._duration:(this._currentTime.value=0,this.playing&&this._stopPlaying()):e>this._duration?this.loop?this._currentTime.value=e%this._duration:(this._currentTime.value=this._duration,this.playing&&this._stopPlaying()):this._currentTime.value=e)}get durationChangedEvent(){return this._durationChangedEvent||(this._durationChangedEvent=new m),this._durationChangedEvent}get duration(){return this._duration}set duration(e){var t;if(e<0)console.warn("duration sholud greater than 0!");else if(this._duration!==e){const i=this._duration;this._duration=e,this._currentTime.value>this._duration&&(this._currentTime.value=this._duration),(t=this._durationChangedEvent)==null||t.emit(this._duration,i)}}get speedChangedEvent(){return this._speedChangedEvent||(this._speedChangedEvent=new m),this._speedChangedEvent}get speed(){return this._speed}set speed(e){var t;if(this._speed!==e&&e!==0){const i=this._speed;this._speed=e,this._resetStartTime(),(t=this._speedChangedEvent)==null||t.emit(this._speed,i)}}_resetStartTime(){this._startTimeStamp=performance.now()-this._currentTime.value/this._speed}_startPlaying(){var e,t;this._resetStartTime(),this._cancelStartUpdateFunc=this.startUpdateFunc(this._updateBindThis),(e=this._startPlayingEvent)==null||e.emit(this._currentTime.value),(t=this._playingChangedEvent)==null||t.emit(!0)}_stopPlaying(){var e,t;if(!this._cancelStartUpdateFunc)throw new Error("this._cancelStartUpdateFunc is undefined!");this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0,(e=this._stopPlayingEvent)==null||e.emit(this._currentTime.value),(t=this._playingChangedEvent)==null||t.emit(!1)}get playingChangedEvent(){return this._playingChangedEvent||(this._playingChangedEvent=new m),this._playingChangedEvent}get playing(){return!!this._cancelStartUpdateFunc}set playing(e){!!this._cancelStartUpdateFunc!==e&&(e?this._startPlaying():this._stopPlaying())}}class Qs extends b{constructor(e){super();a(this,"_stop",this.disposeVar(y(0)));a(this,"_current",this.disposeVar(y(0)));a(this,"_start",this.disposeVar(y(0)));a(this,"_player",this.disposeVar(new Rn(200)));this.dispose(this._player.currentTimeChangedEvent.disposableOn(t=>{let i=t/this._player.duration;i=i>1?1:i<0?0:i;const r=this._start.value,o=this._stop.value;this._current.value=r+(o-r)*i})),this.duration=e}get current(){return this._current.value}get currentChanged(){return this._current.changed}get source(){return this._start.value}get sourceChanged(){return this._start.changed}get target(){return this._stop.value}get targetChanged(){return this._stop.changed}get duration(){return this._player.duration}set duration(e){this._player.duration=e}set target(e){this._start.value=this._current.value,this._stop.value=e,this._player.currentTime=0,this._player.playing=!0}reset(e){this._start.value=e,this._current.value=e,this._stop.value=e,this._player.playing=!1}}let bh=-1;class se extends m{constructor(s,e,t,i){super(),this._domElement=s,this._type=e,this.callback=i;const r=o=>(o.__xbsj_listenerNo__=++bh,o.__xbsj_listenerTime__=Date.now(),o.__xbsj_lastCurrentTarget__=o.currentTarget,this.emit(o),this.callback&&this.callback(o));this._domElement.addEventListener(this._type,r,t),this.dispose(()=>this._domElement.removeEventListener(this._type,r,t))}static getLastLisenNo(){return bh}static getCurrentTarget(s){return s.__xbsj_lastCurrentTarget__}static getListenerNo(s){return s.__xbsj_listenerNo__}static getListenerTime(s){return s.__xbsj_listenerTime__}static on(s,e){const t=se.getLastLisenNo();return s.disposableOn(i=>{const r=se.getListenerNo(i);(r===void 0||r>t)&&e(i)})}get element(){return this._domElement}static create(s,e,t){return new se(s,e,t)}}class Jr extends b{constructor(){super();a(this,"_clickEvent",this.disposeVar(new m));a(this,"_dbclickEvent",this.disposeVar(new m));a(this,"_pointerdownEvent",this.disposeVar(new m));a(this,"_pointerupEvent",this.disposeVar(new m));a(this,"_pointermoveEvent",this.disposeVar(new m));a(this,"_pointeroutEvent",this.disposeVar(new m));a(this,"dbClickDelayTime",300);a(this,"nativeClickDelayTime",500);a(this,"clickMovementTolerantPixelSize",3);a(this,"debugging",!1);a(this,"_enabled",this.disposeVar(y(!0)));const e=this.disposeVar(Ne(async i=>{do{const r=await vi(i,c=>new Promise((l,u)=>{c.disposer.dispose(u),c.disposer.dispose(se.on(this._pointerdownEvent,l))})),o=Ee(r);if(this.debugging&&console.log(`鼠标按下 ${o.toString()}`),!await vi(i,c=>new Promise((l,u)=>{c.disposer.dispose(u);const p=setTimeout(()=>l(!0),this.nativeClickDelayTime);c.disposer.dispose(()=>clearTimeout(p)),c.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[f,w]=Ee(g),[E,C]=o;(Math.abs(f-E)>3||Math.abs(w-C)>3)&&l(!1)})),c.disposer.dispose(se.on(this._pointeroutEvent,()=>l(!1))),c.disposer.dispose(se.on(this._pointerupEvent,()=>l(!0)))}))){this.debugging&&console.log("取消1");continue}const h=await vi(i,c=>new Promise((l,u)=>{c.disposer.dispose(u);const p=setTimeout(()=>l("timeout"),this.dbClickDelayTime);c.disposer.dispose(()=>clearTimeout(p)),c.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[f,w]=Ee(g),[E,C]=o;(Math.abs(f-E)>3||Math.abs(w-C)>3)&&l("moved")})),c.disposer.dispose(se.on(this._pointerdownEvent,l)),c.disposer.dispose(se.on(this._pointeroutEvent,()=>l("pointouted"))),c.disposer.dispose(se.on(this._pointerupEvent,()=>l("pointuped")))}));if(typeof h=="string"){this.debugging&&console.log(`触发单击事件!取消双击监听!error: ${h}`),this._clickEvent.emit(r);continue}if(!await vi(i,c=>new Promise((l,u)=>{c.disposer.dispose(u);const p=setTimeout(()=>l(!1),this.nativeClickDelayTime);c.disposer.dispose(()=>clearTimeout(p)),c.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[f,w]=Ee(g),[E,C]=o;(Math.abs(f-E)>3||Math.abs(w-C)>3)&&l(!1)})),c.disposer.dispose(se.on(this._pointeroutEvent,()=>l(!1))),c.disposer.dispose(se.on(this._pointerupEvent,()=>l(!0)))}))){this.debugging&&console.log("取消2");continue}this.debugging&&console.log("触发双击事件!"),this._dbclickEvent.emit(h)}while(!0)})),t=i=>{i?e.restart():e.isRunning&&e.cancel()};t(this.enabled),this.dispose(this.enabledChanged.disposableOn(t))}get clickEvent(){return this._clickEvent}get dbclickEvent(){return this._dbclickEvent}pointerDown(e){this._pointerdownEvent.emit(e)}pointerUp(e){this._pointerupEvent.emit(e)}pointerMove(e){this._pointermoveEvent.emit(e)}pointerOut(e){this._pointeroutEvent.emit(e)}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}}class ru extends b{constructor(e,t){super();a(this,"_pointerClick",this.disposeVar(new Jr));this._div=e;const{div:i,pointerClick:r}=this,o=u=>r.pointerDown(u),h=u=>r.pointerMove(u),c=u=>r.pointerOut(u),l=u=>r.pointerUp(u);i.addEventListener("pointerdown",o,t),i.addEventListener("pointermove",h,t),i.addEventListener("pointerout",c,t),i.addEventListener("pointerup",l,t),this.dispose(()=>{i.removeEventListener("pointerdown",o,t),i.removeEventListener("pointermove",h,t),i.removeEventListener("pointerout",c,t),i.removeEventListener("pointerup",l,t)})}get div(){return this._div}get pointerClick(){return this._pointerClick}get clickEvent(){return this.pointerClick.clickEvent}get dbclickEvent(){return this.pointerClick.dbclickEvent}}class Eh extends b{constructor(){super();a(this,"_hoverEvent",this.disposeVar(new m));a(this,"_hoverOutEvent",this.disposeVar(new m));a(this,"_pointerdownEvent",this.disposeVar(new m));a(this,"_pointerupEvent",this.disposeVar(new m));a(this,"_pointermoveEvent",this.disposeVar(new m));a(this,"_pointeroutEvent",this.disposeVar(new m));a(this,"delayTime",800);const e=this.disposeVar(wh()),t=l=>{this._hoverOutEvent.emit()},i=l=>{this._hoverOutEvent.emit()};let r;const o=()=>{if(!r){console.warn("!lastPointerEvent");return}this._hoverEvent.emit(r)},h=l=>{r=l,e.restart(void 0,o,this.delayTime),this._hoverOutEvent.emit()},c=l=>{e.cancel(),this._hoverOutEvent.emit()};this.dispose(this._pointerdownEvent.disposableOn(t)),this.dispose(this._pointerupEvent.disposableOn(i)),this.dispose(this._pointermoveEvent.disposableOn(h)),this.dispose(this._pointeroutEvent.disposableOn(c))}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}pointerDown(e){this._pointerdownEvent.emit(e)}pointerUp(e){this._pointerupEvent.emit(e)}pointerMove(e){this._pointermoveEvent.emit(e)}pointerOut(e){this._pointeroutEvent.emit(e)}}class ou extends b{constructor(e,t=1500){super();a(this,"_hoverEvent",new m);a(this,"_hoverOutEvent",new m);const i=new Nr(t);this.dispose(()=>i.destroy());let r=0,o=0,h;i.progressFunc=()=>this._hoverEvent.emit(r,o,h);const c=g=>{!i.isRunning&&i.restart(),h=g,[r,o]=Ee(g),i.debounce(),this._hoverOutEvent.emit()},l=g=>{!i.isRunning&&i.restart(),h=g,[r,o]=Ee(h),i.debounce(),this._hoverOutEvent.emit()},u=g=>{!i.isRunning&&i.restart(),h=g,[r,o]=Ee(h),i.debounce(),this._hoverOutEvent.emit()},p=g=>{i.isRunning&&i.cancel(),this._hoverOutEvent.emit()};e.addEventListener("pointerdown",c),e.addEventListener("pointerup",l),e.addEventListener("pointermove",u),e.addEventListener("pointerout",p),this.dispose(()=>{e.removeEventListener("pointerdown",c),e.removeEventListener("pointerup",l),e.removeEventListener("pointermove",u),e.removeEventListener("pointerout",p)})}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}}class Ch extends b{constructor(e,t={}){super();a(this,"_needRedrawEvent");a(this,"_needPickRedrawEvent");a(this,"_id",Ki());a(this,"_clickEvent");a(this,"_clickOutEvent");a(this,"_dbclickEvent");a(this,"_dbclickOutEvent");a(this,"_actived",!1);a(this,"_activedChanged");a(this,"_hovered",!1);a(this,"_hoveredChanged");a(this,"_selected",!1);a(this,"_selectedChanged");a(this,"_opacity",1);a(this,"_opacityChanged");a(this,"_show",!0);a(this,"_showChanged");this._canvasPrimitivesContext=e;const{needRedraw:i=!0,needPickRedraw:r=!0}=t;i&&(this._needRedrawEvent=new m),r&&(this._needPickRedrawEvent=new m),this._canvasPrimitivesContext.addPoi(this),this.dispose(()=>this._canvasPrimitivesContext.removePoi(this)),this.dispose(this.showChanged.disposableOn(()=>{this.needRedraw(),this.needPickRedraw()})),this.dispose(this.opacityChanged.disposableOn(()=>this.needRedraw()))}get id(){return this._id}set id(e){this._id=e}get context(){return this._canvasPrimitivesContext}needRedraw(){this._needRedrawEvent?this._needRedrawEvent.emit():console.warn("no needRedrawEvent!")}needPickRedraw(){this._needPickRedrawEvent?this._needPickRedrawEvent.emit():console.warn("no needPickRedrawEvent!")}hasClickEvent(){return!!this._clickEvent}get clickEvent(){return this._clickEvent=this._clickEvent||new m,this._clickEvent}hasClickOutEvent(){return!!this._clickOutEvent}get clickOutEvent(){return this._clickOutEvent=this._clickOutEvent||new m,this._clickOutEvent}hasDbclickEvent(){return!!this._dbclickEvent}get dbclickEvent(){return this._dbclickEvent=this._dbclickEvent||new m,this._dbclickEvent}hasDbclickOutEvent(){return!!this._dbclickOutEvent}get dbclickOutEvent(){return this._dbclickOutEvent=this._dbclickOutEvent||new m,this._dbclickOutEvent}set actived(e){this._actived!==e&&(this._actived=e,this._activedChanged&&this._activedChanged.emit(e,this))}get actived(){return this._actived}get activedChanged(){return this._activedChanged=this._activedChanged||new m,this._activedChanged}set hovered(e){this._hovered!==e&&(this._hovered=e,this._hoveredChanged&&this._hoveredChanged.emit(e,this))}get hovered(){return this._hovered}get hoveredChanged(){return this._hoveredChanged=this._hoveredChanged||new m,this._hoveredChanged}set selected(e){this._selected!==e&&(this._selected=e,this._selectedChanged&&this._selectedChanged.emit(e,this))}get selected(){return this._selected}get selectedChanged(){return this._selectedChanged=this._selectedChanged||new m,this._selectedChanged}set opacity(e){this._opacity!==e&&(this._opacity=e,this._opacityChanged&&this._opacityChanged.emit(e,this))}get opacity(){return this._opacity}get opacityChanged(){return this._opacityChanged=this._opacityChanged||new m,this._opacityChanged}set show(e){this._show!==e&&(this._show=e,this._showChanged&&this._showChanged.emit(e,this))}get show(){return this._show}get showChanged(){return this._showChanged=this._showChanged||new m,this._showChanged}}class qr extends Ch{constructor(e,t=[0,0],i=0){super(e);a(this,"_winPosAndDepthChanged");this._winPos=t,this._depth=i,this.dispose(this.winPosAndDepthChanged.disposableOn(()=>{this.needRedraw(),this.needPickRedraw()}))}set winPos(e){(this._winPos[0]!==e[0]||this._winPos[1]!==e[1])&&(this._winPos[0]=e[0],this._winPos[1]=e[1],this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))}get winPos(){return this._winPos}set depth(e){this._depth!==e&&(this._depth=e,this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))}get depth(){return this._depth}get winPosAndDepthChanged(){return this._winPosAndDepthChanged||(this._winPosAndDepthChanged=new m),this._winPosAndDepthChanged}}function _i(n,s,e,t){const[i,r]=n,[o,h,c,l]=t,u=s[0]*e[0],p=s[1]*e[1],g=i-(u*o+c),f=r-(p*h+l);return{left:g,top:f,right:g+u,bottom:f+p}}function wi(n,s,e,t,i){n.beginPath(),n.moveTo(s,e),n.lineTo(s-t*.5,e-t*.5),n.arc(s,e-t,t*.7071067811865475,Math.PI*.75,Math.PI*.25),n.lineTo(s,e),n.fillStyle=i,n.fill()}function au(n,s,e,t,i,r){if(n.beginPath(),n.moveTo(s+t,e),n.arc(s,e,t,0,2*Math.PI),r){const o=n.createRadialGradient(s,e,0,s,e,t);o.addColorStop(0,i),o.addColorStop(1,i.replace(/[\d\.]+\)$/,"0)")),n.fillStyle=o}else n.fillStyle=i;n.fill()}function Sh(n,s,e,t,i,r){n.beginPath(),n.moveTo(s+r,e),n.lineTo(s+t-r,e),n.arcTo(s+t,e,s+t,e+r,r),n.lineTo(s+t,e+i-r),n.arcTo(s+t,e+i,s+t-r,e+i,r),n.lineTo(s+r,e+i),n.arcTo(s,e+i,s,e+i-r,r),n.lineTo(s,e+r),n.arcTo(s,e,s+r,e,r)}function Ph(n,s,e,t,i,r){n.font=i;const o=n.measureText(t),h=o.actualBoundingBoxLeft+o.actualBoundingBoxRight,c=Number.isFinite(o.fontBoundingBoxAscent)?o.fontBoundingBoxAscent:o.actualBoundingBoxAscent,l=Number.isFinite(o.fontBoundingBoxDescent)?o.fontBoundingBoxDescent:o.actualBoundingBoxDescent;let u=c+l;n.fillStyle=r,n.fillText(t,s-h*.5,e+u*.5-l)}function Th(n){const{width:s,height:e}=n,t=s instanceof SVGAnimatedLength?s.baseVal.SVG_LENGTHTYPE_PX:s,i=e instanceof SVGAnimatedLength?e.baseVal.SVG_LENGTHTYPE_PX:e,r=document.createElement("canvas");r.width=t,r.height=i;const o=r.getContext("2d");if(!o)throw new Error("!cavnasCtx");return o.drawImage(n,0,0,t,i),r}function Ih(n,s){const{width:e,height:t}=n,i=n.getContext("2d");if(!i)throw new Error("!cavnasCtx");const[r,o,h]=s.map(p=>p*255|0),c=i.getImageData(0,0,e,t),l=c.data;for(var u=0;u<l.length;u+=4)l[u]=r,l[u+1]=o,l[u+2]=h;i.putImageData(c,0,0)}function Xr(n,s,e,t=[.5,1,0,0],i,r="12px Arial",o=2,h="#FFF",c="#000A"){n.font=r;const l=n.measureText(i),u=l.actualBoundingBoxLeft+l.actualBoundingBoxRight,p=l.fontBoundingBoxAscent+l.fontBoundingBoxDescent,g=s,f=e,w=u+o*2,E=p+o*2,{left:C,top:T,bottom:R}=_i([g,f],[w,E],[1,1],t);n.fillStyle=c,Sh(n,C,T,w,E,o),n.fill(),n.fillStyle=h,n.fillText(i,C+o,R-o-l.fontBoundingBoxDescent)}function en(n){return("00"+n.toString(16).toUpperCase()).substr(-2)}function tn(n){const[s,e,t,i]=n.map(r=>r*255|0);return`#${en(s)}${en(e)}${en(t)}${en(i)}`}function Yr(n,s){const[e,t,i]=s,r=`${e}-${t}-${i}`;let o=Ae(n,r);return o||(o=Th(n),Ih(o,s),gt(n,r,o)),o}class hu extends qr{constructor(e,t,i=[32,32],r=[.5,1,0,0],o="#F00F"){super(e);a(this,"_tooltip","");a(this,"_title","");a(this,"__scale",[1,1]);a(this,"_tooltipAlpha",0);a(this,"_bgColor",[.3,.3,.3,.8]);a(this,"_bgColorHexStr",tn(this._bgColor));a(this,"_fgColor",[1,1,1,1]);a(this,"_fgColorHexStr",tn(this._fgColor));this._image=t,this._size=i,this._originRatioAndOffset=r,this._defaultColorStr=o;const h=new Qs(100),c=new Qs(100);this.dispose(()=>{h.destroy(),c.destroy()});const l=()=>{if(this._clickEvent&&!this._clickEvent.empty){const u=(1+.08*c.current)*(1+.08*h.current);this._scale=[u,u],this._tooltipAlpha=h.current}};this.dispose(this.activedChanged.disposableOn(u=>{c.target=u?1:0,this.needRedraw()})),this.dispose(this.hoveredChanged.disposableOn(u=>{h.target=u?1:0,this.needRedraw()})),this.dispose(this.selectedChanged.disposableOn(()=>{this.needRedraw()})),this.dispose(c.currentChanged.disposableOn(l)),this.dispose(h.currentChanged.disposableOn(l))}set size(e){const[t,i]=e,[r,o]=this._size;(r!==t||o!==i)&&(this._size[0]=t,this._size[1]=i,this.needRedraw(),this.needPickRedraw())}get size(){return this._size}set _scale(e){const[t,i]=e,[r,o]=this.__scale;(r!==t||o!==i)&&(this.__scale[0]=t,this.__scale[1]=i,this.needRedraw(),this.needPickRedraw())}get _scale(){return this.__scale}set fgColor(e){if(!this._fgColor.every((t,i)=>e[i]===t)){const[t,i,r,o]=e;this._fgColor.splice(0,4,t,i,r,o),this._fgColorHexStr=tn(this._fgColor),this.needRedraw()}}get fgColor(){return this._fgColor}set bgColor(e){if(!this._bgColor.every((t,i)=>e[i]===t)){const[t,i,r,o]=e;this._bgColor.splice(0,4,t,i,r,o),this._bgColorHexStr=tn(this._bgColor),this.needRedraw()}}get bgColor(){return this._bgColor}set originRatioAndOffset(e){const[t,i,r,o]=this._originRatioAndOffset,[h,c,l,u]=e;(t!==h||i!==c||r!==l||o!==u)&&(this._originRatioAndOffset.splice(0,4,h,c,l,u),this.needRedraw(),this.needPickRedraw())}get originRatioAndOffset(){return this._originRatioAndOffset}set image(e){this._image!==e&&(this._image=e,this.needRedraw())}get image(){return this._image}set defaultColorStr(e){this._defaultColorStr!==e&&(this._defaultColorStr=e,this.needRedraw())}get defaultColorStr(){return this._defaultColorStr}set tooltip(e){this._tooltip!==e&&(this._tooltip=e,this.needRedraw())}get tooltip(){return this._tooltip}set title(e){this._title!==e&&(this._title=e,this.needRedraw())}get title(){return this._title}draw(e){if(!this._show)return;const[t,i]=this._winPos,r=this._size[0]*this.__scale[0],o=this._size[1]*this.__scale[1],{left:h,top:c}=_i([t,i],this._size,this.__scale,this._originRatioAndOffset),l=e.globalAlpha;if(e.globalAlpha=this.opacity,this._image){if(this.selected){const u=Yr(this._image,[1,0,0]),{left:p,top:g}=_i([t,i+3],[r+6,o+6],[1,1],this._originRatioAndOffset);e.drawImage(u,p,g,r+6,o+6)}if(this.actived){const[u,p,g,f]=this._fgColor,w=Yr(this._image,[u,p,g]),{left:E,top:C}=_i([t,i+4],[r+8,o+8],[1,1],this._originRatioAndOffset);e.drawImage(w,E,C,r+8,o+8)}if(this.hovered){const[u,p,g,f]=this._bgColor,w=Yr(this._image,[u,p,g]),{left:E,top:C}=_i([t,i+2],[r+4,o+4],[1,1],this._originRatioAndOffset);e.drawImage(w,E,C,r+4,o+4)}e.drawImage(this._image,h,c,r,o)}else e.fillStyle=this._fgColorHexStr,e.fillRect(h,c,r,o);if(this._title!==""&&Xr(e,t+20,i-16,[0,.5,0,0],this._title,"14px Arial",4,this._fgColorHexStr,this._bgColorHexStr),e.globalAlpha=l,this._hovered&&this._tooltip!==""){const u=e.globalAlpha;e.globalAlpha=this._tooltipAlpha,Xr(e,t,i-42,[.5,1,0,0],this._tooltip,"12px Arial",4,this._fgColorHexStr,this._bgColorHexStr),e.globalAlpha=u}}drawForPick(e,t){if(!this._show)return;const[i,r]=this._winPos,o=t("default"),h=this._size[0]*this.__scale[0],c=this._size[1]*this.__scale[1],{left:l,top:u}=_i([i,r],this._size,this.__scale,this._originRatioAndOffset);e.fillStyle=o,e.fillRect(l,u,h,c)}}class cu extends qr{constructor(e){super(e);a(this,"_width",16);a(this,"_text","");a(this,"_fillStyle","#0F0");a(this,"_scale",1);a(this,"_scaleChanged");this.dispose(this.scaleChanged.disposableOn(o=>{this.needRedraw(),this.needPickRedraw()}));const t=this.disposeVar(new Qs(100)),i=this.disposeVar(new Qs(100)),r=()=>{this._clickEvent&&!this._clickEvent.empty&&(this.scale=(1+.1*i.current)*(1+.2*t.current))};this.dispose(i.currentChanged.disposableOn(r)),this.dispose(t.currentChanged.disposableOn(r)),this.dispose(this.activedChanged.disposableOn(o=>{i.target=o?1:0,this.needRedraw()})),this.dispose(this.hoveredChanged.disposableOn(o=>{t.target=o?1:0,this.needRedraw()})),this.dispose(this.selectedChanged.disposableOn(o=>{this.needRedraw()}))}set scale(e){this._scale!==e&&(this._scale=e,this._scaleChanged&&this._scaleChanged.emit(e,this))}get scale(){return this._scale}get scaleChanged(){return this._scaleChanged||(this._scaleChanged=new m),this._scaleChanged}set width(e){this._width!==e&&(this._width=e,this.needRedraw(),this.needPickRedraw())}get width(){return this._width}set text(e){this._text!==e&&(this._text=e,this.needRedraw())}get text(){return this._text}set fillStyle(e){this._fillStyle!==e&&(this._fillStyle=e,this.needRedraw())}get fillStyle(){return this._fillStyle}draw(e){if(!this._show)return;const[t,i]=this._winPos,r=e.globalAlpha;e.globalAlpha=this.opacity;const o=this._width*this._scale;this.selected&&wi(e,t,i+3,o+3,"#F00"),this.actived&&this._clickEvent&&!this._clickEvent.empty&&wi(e,t,i+5,o+5,"#FFF"),this.hovered?wi(e,t,i+3,o+3,"#000A"):wi(e,t,i+1,o+1,"#000A"),wi(e,t,i,o,this._fillStyle);const h=this._scale>1.2?"bold 14px Arial":"bold 10px Arial";Ph(e,t,i-o,this._text,h,"#000"),e.globalAlpha=r}drawForPick(e,t){if(!this._show)return;const[i,r]=this._winPos,o=this._width*this._scale,h=t("default");wi(e,i,r,o,h)}}const Oh=new ArrayBuffer(4),Dh=new Uint32Array(Oh),yi=new Uint8Array(Oh);function Fh(n){if(n>=16777215)throw new Error("uint32 > 0xFFFFFF");return Dh[0]=n,[yi[0],yi[1],yi[2]]}function xh(n,s,e){return yi[0]=n,yi[1]=s,yi[2]=e,yi[3]=0,Dh[0]}class kh extends b{constructor(){super(...arguments);a(this,"_pickColors",new Array(16777215));a(this,"_pickColorIndex",0)}reset(){for(let e=0;e<this._pickColorIndex;++e){const t=this._pickColors[e];if(!t)throw console.error("this._pickColors[i] should not be undefined!"),new Error("this._pickColors[i] should not be undefined!");t.poi=null,t.tag=""}this._pickColorIndex=0}createPickColor(e,t){const i=this._pickColorIndex;++this._pickColorIndex;const r=this._pickColors[i];r?(r.poi=e,r.tag=t):this._pickColors[i]={poi:e,tag:t};const[o,h,c]=Fh(i);return[o,h,c]}getPickInfoFromColor(e,t,i){const r=xh(e,t,i);if(r>=this._pickColorIndex){console.error("index >= this._pickColorIndex");return}const o=this._pickColors[r];if(!o){console.error("!this._pickColors[index]");return}return o}destroyImp(){this.reset()}}const Mh=(n,s)=>s.depth-n.depth;class lu extends b{constructor(){super();a(this,"_pois",[]);a(this,"_canvasElement");a(this,"_ctx");a(this,"_offscreenCanvasElement");a(this,"_offscreenCanvasElement2");a(this,"_offscreenCtx");a(this,"_offscreenCtx2");a(this,"_size",[0,0]);a(this,"_needRedraw",!1);a(this,"_needPickRedraw",!1);a(this,"_pickColorManager",new kh);const e=document.createElement("canvas");e.style.width="100%",e.style.height="100%",this._canvasElement=e;const t=e.getContext("2d");if(t===null)throw new Error("cannot get context 2d!");this._ctx=t,this._offscreenCanvasElement=document.createElement("canvas"),this._offscreenCtx=this._offscreenCanvasElement.getContext("2d"),this._offscreenCtx.imageSmoothingEnabled=!1,this._offscreenCanvasElement2=document.createElement("canvas"),this._offscreenCtx2=this._offscreenCanvasElement2.getContext("2d"),this._offscreenCtx2.imageSmoothingEnabled=!1,this.disposeVar(ss(()=>{const[r,o]=this._size,{clientWidth:h,clientHeight:c}=this._canvasElement;(r!==h||o!==c)&&(this._size[0]=h,this._size[1]=c,this._canvasElement.width=h,this._canvasElement.height=c,this._offscreenCanvasElement.width=h,this._offscreenCanvasElement.height=c,this._offscreenCanvasElement2.width=h,this._offscreenCanvasElement2.height=c,this._dirty()),this._needRedraw&&(this._needRedraw=!1,this._draw())})).start()}get element(){return this._canvasElement}get pois(){return this._pois}_dirty(){this._needRedraw=!0,this._needPickRedraw=!0}get size(){return this._size}addPoi(e){if(typeof Ae(e,"listenHandler")<"u"){console.error("可能有poi重复加载poiManager中!");return}if(this._pois.indexOf(e)!==-1){console.error("同一个poi加了多次!");return}this._pois.push(e),this._dirty();const t=e._needRedrawEvent;if(t){const r=t.on(()=>{this._needRedraw=!0});gt(e,"needRedrawEventHandler",r)}const i=e._needPickRedrawEvent;if(i){const r=i.on(()=>{this._needPickRedraw=!0});gt(e,"needPickRedrawEventHandler",r)}}removePoi(e){const t=this._pois.indexOf(e);if(t===-1){console.error("删除一个不存在的poi!");return}this._pois.splice(t,1),this._dirty();const i=e._needRedrawEvent;if(i){const o=Ae(e,"needRedrawEventHandler");o?i.off(o):console.error("poi没有listenHandler!")}const r=e._needPickRedrawEvent;if(r){const o=Ae(e,"needPickRedrawEventHandler");o?r.off(o):console.error("poi没有listenHandler!")}}_draw(){this._pois.sort(Mh);const[e,t]=this._size;this._ctx.clearRect(0,0,e,t),this._pois.forEach(i=>i.draw(this._ctx))}pick(e,t,i,r){return this._needPickRedraw&&(this._needPickRedraw=!1,this._pickDraw()),this._getPickInfo(e,t,i,r)}_pickDraw(){this._pickColorManager.reset(),this._pois.sort(Mh);const[e,t]=this._size;this._offscreenCtx.clearRect(0,0,e,t),this._pois.forEach(i=>{const r=o=>{const[h,c,l]=this._pickColorManager.createPickColor(i,o);return`rgb(${h}, ${c}, ${l})`};i.drawForPick(this._offscreenCtx,r)})}_getPickInfo(e,t,i,r){const o=this._offscreenCtx.getImageData(e,t,i,r),h=[],c=o.data.length/4;for(let l=0;l<c;++l){const u=o.data[l*4+0],p=o.data[l*4+1],g=o.data[l*4+2];if(o.data[l*4+3]===255){const w=this._pickColorManager.getPickInfoFromColor(u,p,g);if(w&&w.poi&&!h.includes(w)){let E=!0;{const[C,T]=this._size;this._offscreenCtx2.clearRect(0,0,C,T);const R=Z=>"rgb(255, 255, 255)";w.poi.drawForPick(this._offscreenCtx2,R);const V=this._offscreenCtx2.getImageData(e,t,i,r),I=V.data[l*4+0],H=V.data[l*4+1],q=V.data[l*4+2];V.data[l*4+3],I===255&&H===255&&q===255||(E=!1)}E&&h.push(w)}}}return h}}class Kr extends b{constructor(){super(...arguments);a(this,"_closeEvent");a(this,"_show",!0);a(this,"_showChanged");a(this,"_opacity",1);a(this,"_opacityChanged");a(this,"_winPos",[0,0]);a(this,"_winPosChanged")}set winPos(e){const[t,i]=e,[r,o]=this._winPos;(t!==r||i!==o)&&(this._winPos[0]=t,this._winPos[1]=i,this._winPosChanged&&this._winPosChanged.emit(this._winPos))}get winPos(){return this._winPos}get winPosChanged(){return this._winPosChanged=this._winPosChanged||new m,this._winPosChanged}set opacity(e){this._opacity!==e&&(this._opacity=e,this._opacityChanged&&this._opacityChanged.emit(this._opacity))}get opacity(){return this._opacity}get opacityChanged(){return this._opacityChanged=this._opacityChanged||new m,this._opacityChanged}set show(e){this._show!==e&&(this._show=e,this._showChanged&&this._showChanged.emit(this._show))}get show(){return this._show}get showChanged(){return this._showChanged=this._showChanged||new m,this._showChanged}get closeEvent(){return this._closeEvent||(this._closeEvent=new m),this._closeEvent}}const Zr=new WeakMap;function Qr(n){if(!Zr.has(n)){const s=new En(()=>new n,e=>e.reset());Zr.set(n,s)}return Zr.get(n)}class eo extends Kr{constructor(){super();a(this,"_div");a(this,"_contentDiv");a(this,"_originOffsetX",0);a(this,"_originOffsetY",0);a(this,"_originRatioX",.5);a(this,"_originRatioY",1);a(this,"_divChanged",new m);const e=document.createElement("div");e.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible;";const t=document.createElement("div");t.style.cssText=`position: absolute; left: ${-this._originOffsetX}px; top: ${-this._originOffsetY}px; transform: translateX(-${100*this._originRatioX}%) translateY(-${100*this._originRatioY}%); margin: 0; padding: 0; pointer-events: none;`;const i=document.createElement("div");this._contentDiv=i,t.appendChild(i),e.appendChild(t),this._div=e,this.dispose(this._divChanged.disposableOn(()=>{t.style.left=`${-this._originOffsetX}px`,t.style.top=`${-this._originOffsetY}px`,t.style.transform=`translateX(-${100*this._originRatioX}%) translateY(-${100*this._originRatioY}%)`})),this.dispose(this.winPosChanged.disposableOn(([r,o])=>{this._div.style.left=`${r}px`,this._div.style.top=`${o}px`})),this.dispose(this.opacityChanged.disposableOn(r=>{this._div.style.opacity=`${r}`})),this.dispose(this.showChanged.disposableOn(r=>{this._div.style.visibility=r?"visible":"hidden"}))}get contentDiv(){return this._contentDiv}reset(){}get originOffsetX(){return this._originOffsetX}set originOffsetX(e){this._originOffsetX!==e&&(this._originOffsetX=e,this._divChanged.emit())}get originOffsetY(){return this._originOffsetY}set originOffsetY(e){this._originOffsetY!==e&&(this._originOffsetY=e,this._divChanged.emit())}get originRatioX(){return this._originRatioX}set originRatioX(e){this._originRatioX!==e&&(this._originRatioX=e,this._divChanged.emit())}get originRatioY(){return this._originRatioY}set originRatioY(e){this._originRatioY!==e&&(this._originRatioY=e,this._divChanged.emit())}get element(){return this._div}}class jh extends b{constructor(e,t){super();a(this,"_floatDiv");a(this,"_show",!1);a(this,"_showChanged");this._customDivClass=e,this._divContainer=t,this.dispose(()=>{this.show=!1})}_updateDivPoi(){if(this._show){const{floatDiv:t}=this;t.element.parentElement||this._divContainer.appendChild(t.element)}else{const{_floatDiv:t}=this;t&&t.element.parentElement&&this._divContainer.removeChild(t.element)}}set show(e){this._show!==e&&(this._show=e,this._updateDivPoi(),this._showChanged&&this._showChanged.emit(e))}get show(){return this._show}get floatDiv(){if(!this._floatDiv){const e=Qr(this._customDivClass).create();this.dispose(()=>{Qr(this._customDivClass).destroy(e)}),this._floatDiv=e}return this._floatDiv}get showChanged(){return this._showChanged||(this._showChanged=new m),this._showChanged}}const du=["top","bottom","left","right"];function uu(n){return Object.entries(n).map(([s,e])=>du.includes(s)?`${s}: ${e}px; `:"").join("")}function Rh(n,s,e){const t=document.createElement("div");t.style.cssText=`position: absolute; ${uu(e)} background-color: ${n}; border-radius: ${s}px;`;const i='<svg viewBox="0 0 1024 1024" style="display: block;" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2420" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128zM512 832c-179.2 0-320-140.8-320-320s140.8-320 320-320 320 140.8 320 320S691.2 832 512 832z" p-id="2421" fill="#ffffff"></path><path d="M672 352c-12.8-12.8-32-12.8-44.8 0L512 467.2 396.8 352C384 339.2 364.8 339.2 352 352S339.2 384 352 396.8L467.2 512 352 627.2c-12.8 12.8-12.8 32 0 44.8s32 12.8 44.8 0L512 556.8l115.2 115.2c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L556.8 512l115.2-115.2C684.8 384 684.8 364.8 672 352z" p-id="2422" fill="#ffffff"></path></svg>';return t.innerHTML=i,t}function Ah(n,s,e="rgba(0,0,0,0.7)"){const t=document.createElement("div");t.style.cssText=`margin: 0 auto; width: ${n}px; height: ${s}px; position: relative; pointer-events: none;`;const i=document.createElement("div");return i.style.cssText=`position: absolute; left: 0px; top: 0px; width: 0; height: 0; border-left: ${n*.5}px solid transparent; border-right: ${n*.5}px solid transparent; border-top: ${s}px solid ${e};`,t.appendChild(i),[t,i]}class Nh extends eo{constructor(){super();a(this,"_borderDiv");a(this,"_closeDiv");a(this,"_innerContentDiv");a(this,"_colorStr","rgba(0, 0, 0, 0.7)");a(this,"_divColorChanged",new m);a(this,"_borderRadius",10);const e=document.createElement("div");e.style.cssText=`position: relative; background-color: ${this._colorStr}; border-radius: ${this._borderRadius}px; padding: 5px; pointer-events: all;`,this._borderDiv=e;const t=Rh(this._colorStr,10,{top:3,right:3}),[i,r]=Ah(2*this._borderRadius,2*this._borderRadius,this._colorStr),o=document.createElement("div");this._innerContentDiv=o,e.appendChild(o),e.appendChild(t),this.contentDiv.appendChild(e),this.contentDiv.appendChild(i),t.style.opacity="0.1",t.onmouseenter=()=>{t.style.opacity="1.0"},t.onmouseleave=()=>{t.style.opacity="0.1"},t.onclick=()=>{this._closeEvent&&this._closeEvent.emit()},this._closeDiv=t,this.dispose(this._divColorChanged.disposableOn(()=>{r.style.borderTopColor=this._colorStr,e.style.backgroundColor=this._colorStr,i.style.width=`${this._borderRadius*2}px`,i.style.height=`${this._borderRadius*2}px`,r.style.borderLeft=`${this._borderRadius}px`,r.style.borderRight=`${this._borderRadius}px`,r.style.borderTop=`${this._borderRadius*2}px`}));const h=c=>{c.key==="Escape"&&this._closeEvent&&this._closeEvent.emit()};document.body.addEventListener("keydown",h,!0),this.dispose(()=>{document.removeEventListener("keydown",h,!0)})}get borderDiv(){return this._borderDiv}get innerContentDiv(){return this._innerContentDiv}reset(){this.show=!1,this.opacity=0,this._closeDiv.style.opacity="0.1",super.reset()}get colorStr(){return this._colorStr}set colorStr(e){this._colorStr!==e&&(this._colorStr=e,this._divColorChanged.emit())}get borderRadius(){return this._borderRadius}set borderRadius(e){this._borderRadius!==e&&(this._borderRadius=e,this._divColorChanged.emit())}}class pu extends Nh{constructor(){super();a(this,"_iframe");a(this,"_iframeMessageEvent");const e=document.createElement("iframe");e.style.cssText="width: 100%; height: 100%; border-width: 0px; border-radius: 5px; display: block;",e.src="http://www.weather.com.cn/live/index.shtml",this._iframe=e,this.innerContentDiv.appendChild(e);const t=i=>{i.source===this._iframe.contentWindow&&(this._iframeMessageEvent?this._iframeMessageEvent.emit(i):console.warn(`iframe消息接收到未处理!data: ${i.data}`))};globalThis.addEventListener("message",t),this.dispose(()=>{globalThis.removeEventListener("message",t)})}reset(){super.reset(),this.src=""}set src(e){this._iframe.src!==e&&(this._iframe.src=e)}get src(){return this._iframe.src}get iframe(){return this._iframe}get iframeMessageEvent(){return this._iframeMessageEvent=this._iframeMessageEvent||new m,this._iframeMessageEvent}}class gu extends Kr{constructor(){super();a(this,"_div");a(this,"_contentContainer");a(this,"_text","");const e=document.createElement("div");this._div=e,e.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible; transition: opacity 0.5s;";const t=document.createElement("div");t.style.cssText="position: absolute; left: 0px; bottom: 0px; transform: translateX(-50%); margin: 0; padding: 0; pointer-events: none;";const i=document.createElement("div");i.style.cssText="position: relative; background-color: rgba(0, 0, 0, 0.7); border-radius: 5px; padding: 3px; pointer-events: all; color: white; white-space: nowrap;",i.innerText=this._text,this._div.appendChild(t),t.appendChild(i),this._contentContainer=i,this._div=e,this.dispose(this.winPosChanged.disposableOn(([r,o])=>{this._div.style.left=`${r}px`,this._div.style.top=`${o-50}px`})),this.dispose(this.opacityChanged.disposableOn(r=>{this._div.style.opacity=`${r}`})),this.dispose(this.showChanged.disposableOn(r=>{this._div.style.visibility=r?"visible":"hidden"}))}get element(){return this._div}reset(){this.opacity=1,this.show=!0}set text(e){this._text!==e&&(this._text=e,this._contentContainer.innerText=e)}get text(){return this._text}}class fu extends eo{constructor(){super(),this.contentDiv.style.backgroundColor="rgba(0, 0, 0, 0.8)",this.contentDiv.style.borderRadius="3px",this.contentDiv.style.color="rgb(255, 255, 255)",this.contentDiv.style.padding="1px 5px 1px 5px",this.contentDiv.style.fontSize="12px",this.contentDiv.style.whiteSpace="nowrap",this.contentDiv.innerText="未定义光标信息!",this.originRatioX=0,this.originRatioY=0,this.originOffsetX=-16}}class mu extends b{constructor(e,t){super();a(this,"_cursorDiv");a(this,"_pointerOut",this.disposeVar(y(!1)));a(this,"_show",this.disposeVar(y(!0)));this._cursorDiv=new jh(t,e),this.dispose(()=>this._cursorDiv.destroy());const i=o=>{const[h,c]=Ee(o);this._cursorDiv.floatDiv.winPos=[h,c]};e.addEventListener("pointermove",i),this.dispose(()=>e.removeEventListener("pointermove",i));const r=()=>{this._cursorDiv.show=this.show&&this._pointerOut.value};r(),this.dispose(this.showChanged.disposableOn(r)),this.dispose(this._pointerOut.changed.disposableOn(r))}set show(e){this._show.value=e}get show(){return this._show.value}get showChanged(){return this._show.changed}reset(){this._pointerOut.value=!1}get cursorDiv(){return this._cursorDiv}set text(e){this._cursorDiv.floatDiv.contentDiv.innerText=e}get text(){return this._cursorDiv.floatDiv.contentDiv.innerText}}function sn(n,s,e){if(!(n.tree===s.tree&&n!==s&&!n.isAncestorOf(s))||n.tree!==s.tree||!n.parent)return!1;if(!n.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");return!(s===n||n.isAncestorOf(s)||e!=="inner"&&!s.parent||e==="inner"&&!s.children)}function An(n,s,e){if(!n.tree||!s.tree||n.tree!==s.tree)return;if(!n.parent){console.warn("当前节点没有父节点,那么该节点无法被移动!");return}if(!n.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");if(s===n){console.warn("自身不能拖放到自身!");return}if(n.isAncestorOf(s)){console.warn("当前节点不能拖放到它自身的后代节点之上!");return}if(e!=="inner"&&!s.parent){console.warn("目标节点没有父节点,无法拖放!");return}if(e==="inner"&&!s.children){console.warn("无法移动到目标节点的子节点中,因为目标节点不是组节点!");return}n.tree._startTransaction();const t=n.parent.children.indexOf(n);if(n.parent.children.splice(t,1),e!=="inner"){const{parent:i}=s;if(!i||!i.children)throw new Error("!parent");const r=i.children.indexOf(s);e==="before"?i.children.splice(r,0,n):e==="after"&&i.children.splice(r+1,0,n)}else s.children.push(n);n.tree._stopTransaction()}function Vh(n,s,e){return xr(n,t=>sn(t,s,e))}function Lh(n,s,e){for(let t of n)sn(t,s,e)?An(t,s,e):console.warn(`treeItem(id: ${t.id}) cannot move...`)}const vu={checked:1,unchecked:2,indeterminate:3},_u=["checked","unchecked","indeterminate"];class zh extends b{constructor(e){super();a(this,"_collapsed",this.disposeVar(y(!1)));a(this,"_checkedStatus",this.disposeVar(y("unchecked")));a(this,"_selected",this.disposeVar(y(!1)));a(this,"_moveToPositionMode",this.disposeVar(y("none")));a(this,"_updateCheckedStatusFromChildrenEvent",this.disposeVar(new m));this._treeItem=e;const t=()=>this._treeItem.tree&&this._treeItem.tree.itemsChanged.emit([this._treeItem]);this.dispose(this._collapsed.changed.disposableOn(t)),this.dispose(this._checkedStatus.changed.disposableOn(t)),this.dispose(this._selected.changed.disposableOn(t)),this.dispose(this._moveToPositionMode.changed.disposableOn(t)),this.dispose(this._checkedStatus.changed.disposableOn(()=>this._treeItem.parent&&this._treeItem.parent.uiTreeObject.updateCheckedStatusFromChildren())),this.dispose(this._treeItem.childrenChangedEvent.disposableOn(()=>{this.updateCheckedStatusFromChildren()}));const i=this.disposeVar(ae(this._updateCheckedStatusFromChildrenEvent));this.dispose(i.disposableOn(()=>{if(!this._treeItem.children)return;let r=0;Fr(this._treeItem.children,o=>(r|=vu[o.uiTreeObject.checkedStatus],r===3)),r>0&&(this._checkedStatus.value=_u[r-1])})),this.dispose(this._treeItem.childrenResetedEvent.disposableOn(r=>{!r&&this.checkedStatus==="indeterminate"&&(this._checkedStatus.value="unchecked")}));{const r=(o,h,c=!0)=>{if(h)o.selectedItems.push(this._treeItem);else{const l=o.selectedItems.indexOf(this._treeItem);l===-1?c&&console.error("selectedItems index -1"):o.selectedItems.splice(l,1)}};this.dispose(this._selected.changed.disposableOn(o=>{const{tree:h}=this._treeItem;h&&r(h,o)})),this.dispose(()=>this.selected=!1)}}get treeItem(){return this._treeItem}get collapsed(){return this._collapsed.value}set collapsed(e){this._collapsed.value=e}get collapsedChanged(){return this._collapsed.changed}get checkedStatus(){return this._checkedStatus.value}check(e){const t=e?"checked":"unchecked";if(this._checkedStatus.value!==t&&(this._checkedStatus.value=t,this._treeItem.children))for(let i of this._treeItem.children)i.uiTreeObject.check(e)}updateCheckedStatusFromChildren(){this._updateCheckedStatusFromChildrenEvent.emit()}get checkedStatusChanged(){return this._checkedStatus.changed}get selected(){return this._selected.value}set selected(e){this._selected.value=e}get selectedChanged(){return this._selected.changed}get moveToPositionMode(){return this._moveToPositionMode.value}set moveToPositionMode(e){this._moveToPositionMode.value=e}get moveToPositionModeChanged(){return this._moveToPositionMode.changed}}const rt=class rt extends b{constructor(e,t=!1,i){super();a(this,"_children");a(this,"_childrenResetedEvent");a(this,"_childrenToChangeEvent");a(this,"_childrenChangedEvent");a(this,"_parent",this.disposeVar(y(void 0)));a(this,"_level",this.disposeVar(y(0)));a(this,"_id");a(this,"_uiTreeObject",this.disposeVar(new zh(this)));this._tree=e,this._hasChildren=t,this._id=i??Ki(),this._id!=="_ROOT"&&rt.wm.has(this._id)&&console.warn(`创建了id(${this._id})相同的树节点,会导致之前的树节点无法索引!`),rt.wm.set(this._id,this),this.dispose(()=>{if(this._id!=="_ROOT"&&!rt.wm.has(this._id)){console.warn(`树节点(${this._id})不在wm树上!`);return}rt.wm.delete(this._id)}),this.dispose(this._parent.changed.disposableOn(()=>{this._updateLevel()})),this.dispose(this._level.changed.disposableOn(()=>{if(this.children)for(let r of this.children)r._updateLevel()})),rt.allTreeItems.set(this._id,this),this.dispose(()=>{rt.allTreeItems.delete(this._id)})}static getFromId(e){return rt.wm.get(e)}get uiTreeObject(){return this._uiTreeObject}get id(){return this._id}_updateLevel(){this.parent&&(this._level.value=this.parent.level+1)}get parent(){return this._parent.value}get parentChanged(){return this._parent.changed}get children(){if(this._hasChildren){if(!this._children){const e=this.disposeVar(new Xs);this._children=e,this.dispose(e.toChangeEvent.disposableOn((r,o)=>{for(let h of r){const{start:c,deleteCount:l,items:u}=h;for(let p=c;p<c+l;++p)o.get(p)._parent.value=void 0;for(let p of u){if(p.parent)throw console.error("请检查新增的treeItem是否正在使用!"),new Error("item.parent should not exist!");p._parent.value=this}}}));const t=new Set,i=new Set;this.dispose(e.toChangeEvent.disposableOn((r,o)=>{var h;if(this.tree){t.clear(),i.clear();for(let c of r){const{start:l,deleteCount:u,items:p}=c;for(let g=l;g<l+u;++g)t.add(o.get(g));for(let g of p)i.add(g)}for(let c of t)i.has(c)&&(t.delete(c),i.delete(c));(h=this.tree)==null||h.itemChildrenToChange.emit(this,r,t,i)}})),this.dispose(e.changedEvent.disposableOn(()=>{var r;(r=this.tree)==null||r.itemChildrenChanged.emit(this)})),this.dispose(e.toChangeEvent.disposableOn((...r)=>this._childrenToChangeEvent&&this._childrenToChangeEvent.emit(...r))),this.dispose(e.changedEvent.disposableOn((...r)=>this._childrenChangedEvent&&this._childrenChangedEvent.emit(...r)))}return this._children}else return}get childrenResetedEvent(){return this._childrenResetedEvent||(this._childrenResetedEvent=new m),this._childrenResetedEvent}get childrenToChangeEvent(){return this._childrenToChangeEvent||(this._childrenToChangeEvent=new m),this._childrenToChangeEvent}get childrenChangedEvent(){return this._childrenChangedEvent||(this._childrenChangedEvent=new m),this._childrenChangedEvent}resetChildren(e=!1){this._children&&(this._children.length=0),this._hasChildren=e,this._childrenResetedEvent&&this._childrenResetedEvent.emit(e)}*getDescendants(e){const t=this,i=[],r=[];for(t.children&&t.children.length>0&&(!e||e(t))&&(i.push(0),r.push(t.children));i.length>0;){const o=i[i.length-1],h=r[r.length-1],c=h.get(o);yield c,o<h.length-1?++i[i.length-1]:(r.pop(),i.pop()),c.children&&c.children.length>0&&(!e||e(c))&&(i.push(0),r.push(c.children))}}*getAncestors(e){let t=this.parent;for(;t&&(yield t,!(e&&!e(t)));)t=t.parent}isDescendantOf(e){for(let t of this.getAncestors())if(t===e)return!0;return!1}isAncestorOf(e){return e.isDescendantOf(this)}get level(){return this._level.value}get levelChanged(){return this._level.changed}get tree(){return this._tree}canMoveTo(e,t){return sn(this,e,t)}moveTo(e,t){An(this,e,t)}detachFromParent(){if(!this.parent||!this.parent.children)return;const e=this.parent.children.indexOf(this);this.parent.children.splice(e,1)}insertNewTreeItem(e,t){if(t&&t.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&e.startsWith("Inner"))return t&&this.children.push(t),!0;if(e==="Inner")return!1;const i=this.parent;if(!i||!i.children)return!1;const r=i.children.indexOf(this);return e.endsWith("Before")?t&&i.children.splice(r,0,t):e.endsWith("After")&&t&&i.children.splice(r+1,0,t),!0}};a(rt,"wm",new Map),a(rt,"allTreeItems",new Map);let nn=rt;class Uh extends b{constructor(e){super();a(this,"_redrawEvent",this.disposeVar(new m));a(this,"_containerScrollTop",this.disposeVar(y(0)));a(this,"_containerClientHeight",this.disposeVar(y(-1)));a(this,"_container",this.disposeVar(y(void 0)));a(this,"_redrawInfo",{topFreeSpaceHeight:0,topUnvisibleItemNum:0,middleTreeItems:[],bottomFreeSpaceHeight:0,bottomUnvisibleItemNum:0});this._tree=e;const t=this._containerClientHeight,i=this._containerScrollTop,r=this._tree._forceRedrawEvent,o=this.disposeVar(ae(this._tree.itemDivHeightChanged,this._tree.itemChildrenChanged,this._tree.itemsChanged,t.changed,i.changed,r)),{redrawInfo:h}=this,c=u=>{const p=u.uiTreeObject;return!!u.children&&(!p||!p.collapsed)};this.dispose(o.disposableOn(()=>{if(h.topFreeSpaceHeight=0,h.topUnvisibleItemNum=0,h.middleTreeItems.length=0,h.bottomFreeSpaceHeight=0,h.bottomUnvisibleItemNum=0,this._containerClientHeight.value>=0){const u=kr(this._tree.getDescendants(c)),p=this._tree.itemDivHeight,g=p*u,f=At([Kt([At([g-t.value,0]),i.value]),0]),w=f/p|0,E=Math.ceil((f-w*p+t.value)/p)|0;w>0&&(h.topUnvisibleItemNum=w,h.topFreeSpaceHeight=w*this._tree.itemDivHeight);const C=w+E;let T=0;for(let V of this._tree.getDescendants(c)){if(T>=C)break;T>=w&&h.middleTreeItems.push(V),++T}const R=u-w-E;R>0&&(h.bottomUnvisibleItemNum=R,h.bottomFreeSpaceHeight=R*this._tree.itemDivHeight)}else for(let u of this._tree.getDescendants(c))h.middleTreeItems.push(u);this._redrawEvent.emit(h)}));let l;this.dispose(()=>l&&(l.destroy(),l=void 0)),this.dispose(this.containerChanged.disposableOn(u=>{l&&(l.destroy(),l=void 0),u&&(l=Ks(),l.start(()=>{const{scrollTop:p,clientHeight:g}=u;typeof p>"u"||typeof g>"u"?Xi("createUiTreeWithContainer error: conainter has no scrollTop or clientHeight property!"):(this.containerScrollTop=p,this.containerClientHeight=g)}))}))}get container(){return this._container.value}set container(e){this._container.value=e}get containerChanged(){return this._container.changed}get redrawInfo(){return this._redrawInfo}getTreeItemPos(e){const t=o=>{const h=o.uiTreeObject;return!!o.children&&(!h||!h.collapsed)};let i=0,r=!1;for(let o of this._tree.getDescendants(t)){if(o===e){r=!0;break}++i}if(r)return[i,i*this._tree.itemDivHeight]}collapseAll(){console.log("collapseAll");for(let e of this.tree.root.getDescendants()){const t=e.uiTreeObject;t.collapsed=!0}}expandAll(){console.log("expandAll");for(let e of this.tree.root.getDescendants()){const t=e.uiTreeObject;t.collapsed=!1}}get tree(){return this._tree}get redrawEvent(){return this._redrawEvent}set containerScrollTop(e){this._containerScrollTop.value=e}get containerScrollTop(){return this._containerScrollTop.value}get containerScrollTopChanged(){return this._containerScrollTop.changed}set containerClientHeight(e){this._containerClientHeight.value=e}get containerClientHeight(){return this._containerClientHeight.value}get containerClientHeightChanged(){return this._containerClientHeight.changed}*getAllItems(e){for(let t of this._tree.getDescendants())(!e||e(t))&&(yield t)}getAllSelectedItems(){return this.getAllItems(e=>e.uiTreeObject.selected)}getAllCheckedItems(){return this.getAllItems(e=>e.uiTreeObject.checkedStatus==="checked")}getAllCheckedLeafItems(){return this.getAllItems(e=>!e.children&&e.uiTreeObject.checkedStatus==="checked")}selectAllItems(e){for(let t of this.getAllItems())(!e||!e.includes(t))&&(t.uiTreeObject.selected=!0)}clearAllSelectedItems(e){for(let t of this.getAllSelectedItems())(!e||!e.includes(t))&&(t.uiTreeObject.selected=!1)}checkAllItems(e){for(let t of this.getAllItems())(!e||!e.includes(t))&&t.uiTreeObject.check(!0)}clearAllCheckedItems(e){for(let t of this.getAllCheckedItems())(!e||!e.includes(t))&&t.uiTreeObject.check(!1)}}const ti=class ti extends b{constructor(e){super();a(this,"_root",this.disposeVar(new nn(this,!0,"_ROOT")));a(this,"_itemChildrenChanged",this.disposeVar(new m));a(this,"_itemChildrenToChange",this.disposeVar(new m));a(this,"_itemsAdded",this.disposeVar(new m));a(this,"_itemsDeleted",this.disposeVar(new m));a(this,"_itemsChanged",this.disposeVar(new m));a(this,"_transactionStack",0);a(this,"_addedItems",new Set);a(this,"_deletedItems",new Set);a(this,"_selectedItems",this.disposeVar(new Xs));a(this,"_itemDivHeight",this.disposeVar(y(ti.defaultItemDivHeight)));a(this,"_forceRedrawEvent",this.disposeVar(new m));a(this,"_uiTree",this.disposeVar(new Uh(this)));this._root._tree.value=this,this.dispose(this._itemChildrenToChange.disposableOn((t,i)=>{if(!t.children){console.error("!item.children");return}for(let r of i){const{start:o,deleteCount:h,items:c}=r;for(let l=o;l<o+h;++l){const u=t.children.get(l);this._deletedItems.has(u)?console.error(`this._deletedItems.has(currentItem(${u.id}))`):this._deletedItems.add(u)}for(let l of c)this._deletedItems.has(l)?this._deletedItems.delete(l):this._addedItems.add(l)}this._execTransaction()})),e!==void 0&&(this.itemDivHeight=e)}get selectedItems(){return this._selectedItems}get lastSelectedItem(){return this._selectedItems.length>0?this._selectedItems.get(this._selectedItems.length-1):void 0}get itemDivHeight(){return this._itemDivHeight.value}set itemDivHeight(e){this._itemDivHeight.value=e}get itemDivHeightChanged(){return this._itemDivHeight.changed}forceRedraw(){this._forceRedrawEvent.emit()}get uiTree(){return this._uiTree}get root(){return this._root}get children(){return this._root.children}getDescendants(e){return this._root.getDescendants(e)}getTreeItemFromId(e){let t;for(let i of this.getDescendants())if(i.id===e){t=i;break}return t}_startTransaction(){this._transactionStack===0&&(this._deletedItems.size>0&&(console.warn("this._deletedItems.size > 0"),this._deletedItems.clear()),this._addedItems.size>0&&(console.warn("this._addedItems.size > 0"),this._addedItems.clear())),++this._transactionStack}_stopTransaction(){--this._transactionStack,this._execTransaction()}_execTransaction(){this._transactionStack===0&&(this._deletedItems.size>0&&(this._itemsDeleted.emit([...this._deletedItems]),this._deletedItems.clear()),this._addedItems.size>0&&(this._itemsAdded.emit([...this._addedItems]),this._addedItems.clear()))}get itemChildrenChanged(){return this._itemChildrenChanged}get itemChildrenToChange(){return this._itemChildrenToChange}get itemsChanged(){return this._itemsChanged}get itemsAdded(){return this._itemsAdded}get itemsDeleted(){return this._itemsDeleted}};a(ti,"defaultItemDivHeight",24),a(ti,"canMoveToTreeItem",sn),a(ti,"moveToTreeItem",An),a(ti,"canMoveToTreeItems",Vh),a(ti,"moveToTreeItems",Lh);let bi=ti;class ce extends b{constructor(e,t,i=!0,r){super();a(this,"_obj",this.disposeVar(y(void 0)));this._resetEvent=e,this._createFunc=t;const o=this._resetEvent,h=this._createFunc,c=()=>{this._obj.value&&(this._obj.value.destroy(),this._obj.value=void 0)};this.dispose(c);const l=(...u)=>{c(),this._obj.value=h(...u)};i&&(r?this._obj.value=h(...r):this._obj.value=h()),this.dispose(o.disposableOn(l))}get obj(){return this._obj.value}get objChanged(){return this._obj.changed}}class wu extends b{constructor(e,t=!0,i){super();a(this,"_event",this.disposeVar(new m));a(this,"_objResettingWithEvent");this._createFunc=e,this._execOnInit=t,this._initParams=i,this._objResettingWithEvent=this.disposeVar(new ce(this._event,this._createFunc,this._execOnInit,this._initParams))}get obj(){return this._objResettingWithEvent.obj}get objChanged(){return this._objResettingWithEvent.objChanged}reset(...e){this._event.emit(...e)}}const vr=class vr extends b{constructor(){super();a(this,"_set",new Set);a(this,"_toChangeEvent",this.dv(new m));a(this,"_changedEvent",this.dv(new m));a(this,"main");this.dispose(()=>{this._set.size!==0&&(vr.warnOnDestroying&&console.warn("this._set.size > 0"),this.clear())})}get toChange(){return this._toChangeEvent}get changed(){return this._changedEvent}add(...e){if(e.length==2&&typeof e[1]=="boolean")e[1]&&(this.main=e[0]);else for(let t of e)this._toChangeEvent.emit([],[t]),this._set.add(t),this._changedEvent.emit([],[t])}delete(...e){for(let t of e)this.main&&this.main==t&&(this.main=void 0),this._toChangeEvent.emit([t],[]),this._set.delete(t),this._changedEvent.emit([t],[])}disposableAdd(...e){return e.length==2&&typeof e[1]=="boolean"?(e[1]&&(this.main=e[0]),this.add(e[0]),()=>this.delete(e[0])):(this.add(...e),()=>this.delete(...e))}get size(){return this._set.size}clear(){const e=[...this._set];this._toChangeEvent.emit([],e),this._set.clear(),this._changedEvent.emit([],e),this.main=void 0}values(){return this._set.values()}};a(vr,"warnOnDestroying",!0);let Nn=vr;async function Wh(n){const s=[],e=[],t=n.entries();for await(const[i,r]of t){const o=r;o.kind==="file"?s.push(i):o.kind==="directory"&&e.push(i)}return{files:s,dirs:e}}async function to(n){return await(await n.getFile()).text()}async function Bh(n){const s=await to(n);try{return JSON.parse(s)}catch{return}}async function Hh(n){return await(await n.getFile()).arrayBuffer()}class $h extends b{constructor(s){super(),this._rootDirHandle=s}get rootDirHandle(){return this._rootDirHandle}async getSubFilesAndDirs(){return await Wh(this._rootDirHandle)}async getDir(s){let e=this._rootDirHandle;for(const t of s)if(e=await(e==null?void 0:e.getDirectoryHandle(t)),!e){console.log(`getDirectoryHandle ${t} failed`);return}return e}async getFile(s,e){const t=await this.getDir(s);if(t)try{return await t.getFileHandle(e)}catch(i){console.error(`未能获取当前文件 ${s.join("/")}/${e} error: ${i}`,i);return}}}class Gh extends b{constructor(e){super();a(this,"_startRootDirId",0);a(this,"_dirMap",new Map);this._prefix=e}get prefix(){return this._prefix}async getRootDirId(e){let t;try{console.log("window.showDirectoryPicker begin"),t=await globalThis.showDirectoryPicker({id:e,mode:"read"}),console.log("window.showDirectoryPicker end",t)}catch(i){console.error(`LocalFileServer getRootDirId failed: ${i}`,i);return}if(t){const i=++this._startRootDirId,r=`${this._prefix}${i}`;return this._dirMap.set(r,new $h(t)),r}}getRootDir(e){return this._dirMap.get(e)}async getFile(e){const t=e.split("/");if(t.length<2){console.warn(`LocalFileServer getFile failed: ${e}`);return}const i=t[0],r=this._dirMap.get(i);if(!r){console.warn(`LocalFileServer getFile failed: ${e}`);return}const o=t.slice(1,t.length-1),h=t[t.length-1],c=await r.getFile(o,h);if(!c){console.warn(`LocalFileServer getFile failed: ${e}`);return}return c}async getText(e){const t=await this.getFile(e);if(t)return await to(t)}async getArrayBuffer(e){const t=await this.getFile(e);if(t)return await Hh(t)}async getJson(e){const t=await this.getFile(e);if(t)return await Bh(t)}async getLocalFilePath(e,t,i){const r=await this.getRootDirId(t);if(!r){console.warn("getRootDirId error!");return}const o=this.getRootDir(r);if(!o){console.warn("getRootDir error!");return}const h=await o.getSubFilesAndDirs();if(!h.files){console.warn("getSubFilesAndDirs error! 找不到符合要求的文件!");return}const c=e?h.files.filter(l=>e.some(u=>l.endsWith(u))):h.files;if(c.length===0){console.warn("找不到符合要求的文件!");return}return`https://${r}/${c[0]}`}}const Jh=new Gh("xe2_local");async function yu(n,s,e){return await Jh.getLocalFilePath(n,s,e)}class qh extends b{constructor(e,t){super();a(this,"_processing");this._complexImage=e,this._imageUri=t,this._processing=this.disposeVar(Ne(async i=>{const r=this._complexImage,o=await i.promise(dh(this._imageUri,this._complexImage.crossOrigin));o&&o instanceof HTMLImageElement&&(r.size=[o.naturalWidth,o.naturalHeight],r.pixelFormat="RGBA",r.copyTexture({source:o}))})),this._processing.start()}get processing(){return this._processing}}const Xh=["DEPTH_COMPONENT","DEPTH_STENCIL","ALPHA","RED","RG","RGB","RGBA","LUMINANCE","LUMINANCE_ALPHA","RGB_DXT1","RGBA_DXT1","RGBA_DXT3","RGBA_DXT5","RGB_PVRTC_4BPPV1","RGB_PVRTC_2BPPV1","RGBA_PVRTC_4BPPV1","RGBA_PVRTC_2BPPV1","RGBA_ASTC","RGB_ETC1","RGB8_ETC2","RGBA8_ETC2_EAC","RGBA_BC7"],Yh=["img","gif","video","flv","hls"];let bu=class extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden",i.style.width="0px",i.style.height="0px";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}};class Kh extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new bu(this._complexImage,this._imageUri)),this._update=this.disposeVar(ss(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}function Eu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var io={},Nt={},Zh;function Cu(){if(Zh)return Nt;Zh=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.loop=Nt.conditional=Nt.parse=void 0;var n=function t(i,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(Array.isArray(r))r.forEach(function(l){return t(i,l,o,h)});else if(typeof r=="function")r(i,o,h,t);else{var c=Object.keys(r)[0];Array.isArray(r[c])?(h[c]={},t(i,r[c],o,h[c])):h[c]=r[c](i,o,h,t)}return o};Nt.parse=n;var s=function(i,r){return function(o,h,c,l){r(o,h,c)&&l(o,i,h,c)}};Nt.conditional=s;var e=function(i,r){return function(o,h,c,l){for(var u=[],p=o.pos;r(o,h,c);){var g={};if(l(o,i,h,g),o.pos===p)break;p=o.pos,u.push(g)}return u}};return Nt.loop=e,Nt}var le={},Qh;function ec(){if(Qh)return le;Qh=1,Object.defineProperty(le,"__esModule",{value:!0}),le.readBits=le.readArray=le.readUnsigned=le.readString=le.peekBytes=le.readBytes=le.peekByte=le.readByte=le.buildStream=void 0;var n=function(p){return{data:p,pos:0}};le.buildStream=n;var s=function(){return function(p){return p.data[p.pos++]}};le.readByte=s;var e=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(g){return g.data[g.pos+p]}};le.peekByte=e;var t=function(p){return function(g){return g.data.subarray(g.pos,g.pos+=p)}};le.readBytes=t;var i=function(p){return function(g){return g.data.subarray(g.pos,g.pos+p)}};le.peekBytes=i;var r=function(p){return function(g){return Array.from(t(p)(g)).map(function(f){return String.fromCharCode(f)}).join("")}};le.readString=r;var o=function(p){return function(g){var f=t(2)(g);return p?(f[1]<<8)+f[0]:(f[0]<<8)+f[1]}};le.readUnsigned=o;var h=function(p,g){return function(f,w,E){for(var C=typeof g=="function"?g(f,w,E):g,T=t(p),R=new Array(C),V=0;V<C;V++)R[V]=T(f);return R}};le.readArray=h;var c=function(p,g,f){for(var w=0,E=0;E<f;E++)w+=p[g+E]&&Math.pow(2,f-E-1);return w},l=function(p){return function(g){for(var f=s()(g),w=new Array(8),E=0;E<8;E++)w[7-E]=!!(f&1<<E);return Object.keys(p).reduce(function(C,T){var R=p[T];return R.length?C[T]=c(w,R.index,R.length):C[T]=w[R.index],C},{})}};return le.readBits=l,le}var tc;function Su(){return tc||(tc=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=Cu(),e=ec(),t={blocks:function(g){for(var f=0,w=[],E=g.data.length,C=0,T=(0,e.readByte)()(g);T!==f&&T;T=(0,e.readByte)()(g)){if(g.pos+T>=E){var R=E-g.pos;w.push((0,e.readBytes)(R)(g)),C+=R;break}w.push((0,e.readBytes)(T)(g)),C+=T}for(var V=new Uint8Array(C),I=0,H=0;H<w.length;H++)V.set(w[H],I),I+=w[H].length;return V}},i=(0,s.conditional)({gce:[{codes:(0,e.readBytes)(2)},{byteSize:(0,e.readByte)()},{extras:(0,e.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,e.readUnsigned)(!0)},{transparentColorIndex:(0,e.readByte)()},{terminator:(0,e.readByte)()}]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===249}),r=(0,s.conditional)({image:[{code:(0,e.readByte)()},{descriptor:[{left:(0,e.readUnsigned)(!0)},{top:(0,e.readUnsigned)(!0)},{width:(0,e.readUnsigned)(!0)},{height:(0,e.readUnsigned)(!0)},{lct:(0,e.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,s.conditional)({lct:(0,e.readArray)(3,function(p,g,f){return Math.pow(2,f.descriptor.lct.size+1)})},function(p,g,f){return f.descriptor.lct.exists}),{data:[{minCodeSize:(0,e.readByte)()},t]}]},function(p){return(0,e.peekByte)()(p)===44}),o=(0,s.conditional)({text:[{codes:(0,e.readBytes)(2)},{blockSize:(0,e.readByte)()},{preData:function(g,f,w){return(0,e.readBytes)(w.text.blockSize)(g)}},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===1}),h=(0,s.conditional)({application:[{codes:(0,e.readBytes)(2)},{blockSize:(0,e.readByte)()},{id:function(g,f,w){return(0,e.readString)(w.blockSize)(g)}},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===255}),c=(0,s.conditional)({comment:[{codes:(0,e.readBytes)(2)},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===254}),l=[{header:[{signature:(0,e.readString)(3)},{version:(0,e.readString)(3)}]},{lsd:[{width:(0,e.readUnsigned)(!0)},{height:(0,e.readUnsigned)(!0)},{gct:(0,e.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,e.readByte)()},{pixelAspectRatio:(0,e.readByte)()}]},(0,s.conditional)({gct:(0,e.readArray)(3,function(p,g){return Math.pow(2,g.lsd.gct.size+1)})},function(p,g){return g.lsd.gct.exists}),{frames:(0,s.loop)([i,h,c,r,o],function(p){var g=(0,e.peekByte)()(p);return g===33||g===44})}],u=l;n.default=u})(io)),io}var Pu=Su();const Tu=Eu(Pu);var Iu=ec();const Ou=(n,s)=>{const e=new Array(n.length),t=n.length/s,i=function(u,p){const g=n.slice(p*s,(p+1)*s);e.splice.apply(e,[u*s,s].concat(g))},r=[0,4,2,1],o=[8,8,4,2];for(var h=0,c=0;c<4;c++)for(var l=r[c];l<t;l+=o[c])i(l,h),h++;return e},Du=(n,s,e)=>{const r=e;var o,h,c,l,u,p,g,H,f,w,I,E,q,Z,Ge,Me;const C=new Array(e),T=new Array(4096),R=new Array(4096),V=new Array(4097);for(E=n,h=1<<E,u=h+1,o=h+2,g=-1,l=E+1,c=(1<<l)-1,f=0;f<h;f++)T[f]=0,R[f]=f;var I,H,q,Z,Me,Ge;for(I=H=q=Z=Me=Ge=0,w=0;w<r;){if(Z===0){if(H<l){I+=s[Ge]<<H,H+=8,Ge++;continue}if(f=I&c,I>>=l,H-=l,f>o||f==u)break;if(f==h){l=E+1,c=(1<<l)-1,o=h+2,g=-1;continue}if(g==-1){V[Z++]=R[f],g=f,q=f;continue}for(p=f,f==o&&(V[Z++]=q,f=g);f>h;)V[Z++]=R[f],f=T[f];q=R[f]&255,V[Z++]=q,o<4096&&(T[o]=g,R[o]=q,o++,(o&c)===0&&o<4096&&(l++,c+=o)),g=p}Z--,C[Me++]=V[Z],w++}for(w=Me;w<r;w++)C[w]=0;return C},Fu=n=>{const s=new Uint8Array(n);return Re.parse(Iu.buildStream(s),Tu)},xu=n=>{const s=n.pixels.length,e=new Uint8ClampedArray(s*4);for(var t=0;t<s;t++){const i=t*4,r=n.pixels[t],o=n.colorTable[r]||[0,0,0];e[i]=o[0],e[i+1]=o[1],e[i+2]=o[2],e[i+3]=r!==n.transparentIndex?255:0}return e},ku=(n,s,e)=>{if(!n.image){console.warn("gif frame does not have associated image.");return}const{image:t}=n,i=t.descriptor.width*t.descriptor.height;var r=Du(t.data.minCodeSize,t.data.blocks,i);t.descriptor.lct.interlaced&&(r=Ou(r,t.descriptor.width));const o={pixels:r,dims:{top:n.image.descriptor.top,left:n.image.descriptor.left,width:n.image.descriptor.width,height:n.image.descriptor.height}};return t.descriptor.lct&&t.descriptor.lct.exists?o.colorTable=t.lct:o.colorTable=s,n.gce&&(o.delay=(n.gce.delay||10)*10,o.disposalType=n.gce.extras.disposal,n.gce.extras.transparentColorGiven&&(o.transparentIndex=n.gce.transparentColorIndex)),o.patch=xu(o),o},Mu=(n,s)=>n.frames.filter(e=>e.image).map(e=>ku(e,n.gct));async function ic(n){const e=await(await fetch(n)).arrayBuffer(),t=Fu(e),i=Mu(t);return{gif:t,gifFrames:i,arrayBuffer:e}}function sc(n,s,e){return n<s?s:n>e?e:n}class nc extends Rn{constructor(e,t=!0,i){super();a(this,"_gifFrames",this.disposeVar(y(void 0)));a(this,"_gifDurations",[]);a(this,"_gifDuration",this.disposeVar(y(0)));a(this,"_gifSize",this.disposeVar(y([0,0],(e,t)=>e.every((i,r)=>i===t[r]),e=>[...e])));a(this,"_autoPlayOnLoad",this.disposeVar(y(!0)));a(this,"_gifCanvas");this._container=e,this.loop=!0;const r=document.createElement("canvas");this._gifCanvas=r,r.style.width="100%",r.style.height="100%";const o=r.getContext("2d");this._container&&this._container.appendChild(r),this.dispose(()=>this._container&&this._container.removeChild(r));let h;this.dispose(this._gifFrames.changed.disposableOn(l=>{if(!l||l.length===0){r.width=0,r.height=0;return}const{width:u,height:p}=l[0].dims;this._gifSize.value=[u,p];const g=l.length;let f=0;this._gifDurations.length=0;for(let w=0;w<g;++w)f+=l[w].delay,this._gifDurations.push(f);this._gifDuration.value=this._gifDurations[this._gifDurations.length-1],r.width=u,r.height=p,h=o.createImageData(u,p),this.currentTimeChangedEvent.emit(this.currentTime,this.currentTime),this._autoPlayOnLoad.value&&(this.currentTime=0,this.playing=!0)}));let c=-1;this.dispose(this.currentTimeChangedEvent.disposableOn(l=>{const u=sc(l/this.duration,0,1),p=this.gifDuration*u,g=this._gifFrames.value;if(g&&g.length>0){const f=this._getFrame(p);if(f===c)return;c=f;const w=g[f];if(w.disposalType!==0&&w.disposalType!==1&&w.disposalType!==2&&Xi(`gif parsed get disposalType ${w.disposalType}... frame: ${f} size: ${JSON.stringify(w.dims)}`,`gif parsed get disposalType ${w.disposalType}...`),h&&(f===0||w.disposalType===2)&&h.data.fill(0),h){const[E,C]=this._gifSize.value,{width:T,height:R,left:V,top:I}=w.dims;if(R>C)throw new Error("height > canvasHeight");for(let H=0;H<R;++H)for(let q=0;q<T;++q){const Z=H*T+q,Me=I+H,Ge=V+q,jt=Me*E+Ge,pt=h.data,ui=w.patch,pi=ui[Z*4+3]/255;pt[jt*4+0]=pt[jt*4+0]*(1-pi)+ui[Z*4+0]*pi|0,pt[jt*4+1]=pt[jt*4+1]*(1-pi)+ui[Z*4+1]*pi|0,pt[jt*4+2]=pt[jt*4+2]*(1-pi)+ui[Z*4+2]*pi|0,pt[jt*4+3]=sc(pt[jt*4+3]+ui[Z*4+3],0,255)|0}o.putImageData(h,0,0)}}else Xi("gif资源未加载!无法播放!")})),this.dispose(this._gifDuration.changed.disposableOn(()=>{this.duration=this.gifDuration})),this._autoPlayOnLoad.value=t,this._gifFrames.value=i}get gifCanvas(){return this._gifCanvas}set gifFrames(e){this._gifFrames.value=e}get gifFrames(){return this._gifFrames.value}get gifFramesChanged(){return this._gifFrames.changed}get gifSize(){return this._gifSize.value}get gifSizeChanged(){return this._gifSize.changed}get gifDuration(){return this._gifDuration.value}get gifDurationChanged(){return this._gifDuration.changed}get autoPlayOnLoad(){return this._autoPlayOnLoad.value}set autoPlayOnLoad(e){this._autoPlayOnLoad.value=e}get autoPlayOnLoadChanged(){return this._autoPlayOnLoad.changed}_getFrame(e){const t=this._gifDurations.length;for(let i=0;i<t;++i)if(e<=this._gifDurations[i])return i;throw new Error("should not be here")}}class rc extends b{constructor(e){super();a(this,"_player");a(this,"_url",this.disposeVar(y("")));a(this,"_loadGifFramesProcessing",this.disposeVar(jn(e=>is(ic(e)))));this._player=this.disposeVar(new nc(e)),this._player.autoPlayOnLoad=!0,this._loadGifFramesProcessing.completeFunc=({gifFrames:t})=>this._player.gifFrames=t,this.dispose(this._url.changed.disposableOn(t=>{this._player.gifFrames=void 0,this._loadGifFramesProcessing.restart(new et(`reload gif(${t})`),t)}))}get player(){return this._player}set url(e){this._url.value=e}get url(){return this._url.value}get loadedEvent(){return this._loadGifFramesProcessing.completeEvent}get size(){return this._player.gifSize}get sizeChanged(){return this._player.gifSizeChanged}get duration(){return this._player.gifDuration}get durationChanged(){return this._player.gifDurationChanged}}class oc extends b{constructor(e,t){super();a(this,"_gif",this.disposeVar(new rc));a(this,"_update");this._complexImage=e,this._imageUri=t,this._gif.url=this._imageUri,this._update=this.disposeVar(ss(()=>this.update())),this._update.start()}get gif(){return this._gif}update(){const{player:e}=this._gif;if(!e.gifFrames)return;const t=this._complexImage,{width:i,height:r}=e.gifCanvas;t.size=[i,r],t.pixelFormat="RGBA",t.copyTexture({source:e.gifCanvas});{const o=()=>{e.autoPlayOnLoad=this._complexImage.autoplay};o(),this.dispose(this._complexImage.autoplayChanged.disposableOn(o))}{const o=()=>{e.loop=this._complexImage.loop};o(),this.dispose(this._complexImage.loopChanged.disposableOn(o))}}}function ac(n,s){const[e,t,i]=Ws(n),r=y(void 0),o=()=>{const h=e()??s;r.value=h&&k.context.getStrFromEnv(h)};return o(),i&&r.d(i.don(o)),r.d(k.context.environmentVariablesChanged.don(o)),r}function hc(n){const s=/\${(.*?)\}/g;if(!s.test(n))return n;const e=n.replace(s,(t,i)=>{const r=k.context.getEnv(i);return r===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):r});return hc(e)}class ju extends b{constructor(e){super();a(this,"_sceneObjRefs",new Map);a(this,"_refs",{});a(this,"_refsChanged",this.dv(new m));const t=(i,r,o)=>{if(o){const h=this.getLastSceneObject(o),c=this._sceneObjRefs.get(o);if(!c)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const u=c.indexOf(i);u===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(c.splice(u,1),c.length===0&&this._sceneObjRefs.delete(o))}const l=this.getLastSceneObject(o);this._refs[o]=l,this._refsChanged.emit(l,h)}if(r){const h=this.getLastSceneObject(r),c=this._sceneObjRefs.get(r);c?(c.push(i),c.length>0&&console.warn(`同时存在多个ref${r}相同的场景对象!
|
|
22
|
-
${
|
|
23
|
-
`).join(" ")}`)):this._sceneObjRefs.set(r,[i]);const l=this.getLastSceneObject(r);this._refs[r]=l,this._refsChanged.emit(l,h)}};this.d(e.sceneObjCreatedEvent.don(i=>{const r=(o,h)=>t(i,o,h);i.ref&&r(i.ref,void 0),i.refChanged.don(r)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&t(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const t=this.getSceneObjects(e);if(t)return t[t.length-1]}getSceneObjects(e){const t=this._sceneObjRefs.get(e);if(!(!t||t.length===0))return t}}class Ru extends b{constructor(){super();a(this,"_esObjConstructors",new Map);a(this,"_sceneObjs",new Map);a(this,"_sceneObjCreatedEvent",new m);a(this,"_sceneObjToDestroyEvent",new m);a(this,"_refsManager",this.dv(new ju(this)));a(this,"_environmentVariables",globalThis.ESSDK_ENV||{});a(this,"_environmentVariablesChanged",this.dv(new m))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,t,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,t),i&>(t,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,t){if(!t||this._sceneObjs.has(t)){const r=Ki();t&&console.warn(`已存在相同id的对象!id自动变更!${t} -> ${r} 请注意:id变更可能导致引用失效!`),t=r}if(!t)throw new Error("id不能为空!");const i=new e(t);return i.id!==t&&(console.warn(`sceneObj.id(${i.id}) !== id(${t}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,t){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,t)}else return this.createSceneObjectFromClass(e,t)}createSceneObjectFromUrl(e,t){let i;const r=e.toLowerCase();if(r.includes(".gltf")||r.includes(".glb")?i="ESGltfModel":r.includes("tileset.json")?i="ES3DTileset":r.includes("layer.json")||r.includes("ion://1")?i="ESTerrainLayer":r.includes(".jpg")||r.includes(".png")||r.includes(".jpeg")||r.includes(".webp")||r.includes("image/jpg")||r.includes("image/png")||r.includes("image/jpeg")||r.includes("image/webp")?i="ESImageLabel":(r.includes("/tilemapresource.xml")||r.includes("ion://")||r.includes("wms")||r.includes("wmts")||r.includes("{x}")||r.includes("{y}")||r.includes("{z}"))&&(i="ESImageryLayer"),!!i)return this.createSceneObjectFromJson({type:i,id:t,url:e})}createSceneObjectFromJson(e){const t=this.createSceneObject(e.type,e.id);return t&&(t.json=e),t}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(typeof e=="function"){const t=[];for(const i of this._sceneObjs.values())i instanceof e&&t.push(i);return t}if(e.startsWith("ES")){const t=[];for(const i of this._sceneObjs.values())i.typeName===e&&t.push(i);return t}return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const t=this._esObjConstructors.get(e);if(t)return t}getProps(e){const t=this._getSceneObjConstructor(e);if(!t){console.warn(`cannot get constructor from type: ${e}`);return}return Ae(t,"__sceneObjExtraInfo")}setProps(e,t){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let r=Ae(i,"__sceneObjExtraInfo");r||(r={},gt(i,"__sceneObjExtraInfo",r)),Object.assign(r,t)}getProp(e,t){const i=this.getProps(e);return i&&i[t]}setProp(e,t,i){this.setProps(e,{[t]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[t,i]of Object.entries(e))this.setEnv(t,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,t){if(this._environmentVariables[e]!==t){const i=this._environmentVariables[e];this._environmentVariables[e]=t,this._environmentVariablesChanged.emit(e,t,i)}globalThis.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return hc(e)}createEnvStrReact(e,t){return ac(e,t)}createEvnStrReact(e,t){return ac(e,t)}}const B=class B extends b{constructor(e){super();a(this,"_components",this.dv(new Nn));a(this,"_viewerAttached",this.dv(new m));a(this,"_viewerDetached",this.dv(new m));a(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(t=>{t.actived&&(this.activeViewer=t),t.ad(t.activedChanged.don(i=>{i&&e.has(t)&&(this.activeViewer=t)})),e.add(t)})),this.d(this._viewerDetached.don(t=>{e.delete(t),this.activeViewer==t&&(this.activeViewer=void 0)})),e})());a(this,"_activeViewer",this.dv(y(void 0)));a(this,"_reloadEvent",this.dv(new m));a(this,"_readyEvent",this.dv(new m));a(this,"_createdEvent",this.dv(new m));a(this,"_flushEvent",this.dv(new m));a(this,"_id");a(this,"_updateFuncReact",this.dv(y(void 0)));a(this,"_toDestroyFuncReact",this.dv(y(void 0)));a(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??Ki(),this._initName();{const t=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};t(),this.d(this.execOnceFuncStrChanged.don(t))}{const t=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(r){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`)}};t(),this.d(this.updateFuncStrChanged.don(t));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||Ks(),i.restart(void 0,r=>{this.updateFunc&&this.updateFunc(this,r)}))}))}{const t=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};t(),this.d(this.toDestroyFuncStrChanged.don(t)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,t,i){Yt(t.prototype,t.createDefaultProps);const r=t.createDefaultProps();t.defaults&&(t.defaults={});for(const o of Object.keys(r))t.defaults[o]=r[o]instanceof fe?r[o].value:r[o];return this.innerRegister(e,t,i),e}static get envs(){return B.context.environmentVariables}static get $refs(){return B.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}get reloadEvent(){return this._reloadEvent}reload(){this._reloadEvent.emit()}get readyEvent(){return this._readyEvent}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const t=new Map;this.d(()=>{t.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const r=e(i);r&&t.set(i,r)})),this.d(this._viewerDetached.don(i=>{if(!t.has(i))return;const r=t.get(i);r&&(r.destroy(),t.delete(i))}))}createAttachedObject(e){const t=new Map,i=(()=>{for(let[c,l]of t.entries())l.destroy();t.clear()}),r=c=>{const l=e(c);l&&t.set(c,l)};for(let c of this.attachedViewers)r(c);const o=this._viewerAttached.don(r),h=this._viewerDetached.don(c=>{if(!t.has(c))return;const l=t.get(c);l&&(l.destroy(),t.delete(c))});return()=>{h(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(t=>new Au(t,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(e=!0){const t={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let r,o=this.defaultProps[i];o instanceof fe?r=o.equals(this[i]):r=o===this[i],r||(t[i]=this[i])}else t[i]=this[i];return t}_innerSetJson(e,t,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const r=t||[];r.push("id","type");const o=Object.keys(this.defaultProps).filter(h=>!r.includes(h));for(let h of o)if(h in e)this[h]=e[h]===null?void 0:e[h];else if(!(i??!1)){let c=this.defaultProps[h];c instanceof fe&&(c=c.value),this[h]=c}}get completeJson(){return this._innerGetJson(!1)}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getESProperties(){return{defaultMenu:"general",basic:[],general:[new A([this,"typeName"],"类型",void 0,!1,!0),new A([this,"id"],"id",void 0,!1,!0),new A([this,"name"],"名称"),new ro("JSON",()=>this._jsonStr,e=>e&&(this._jsonStr=e))],dataSource:[],location:[],coordinate:[],style:[],more:[new A([this,"ref"],"ref",void 0,!0),new z([this,"extras"],"extras",{},void 0,!0)]}}};a(B,"context",new Ru),a(B,"innerRegister",B.context.register.bind(B.context)),a(B,"defaults",{}),a(B,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:W(void 0),devTags:ee(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),a(B,"type",B.register("ESSceneObject",B,{chsName:"场景类",tags:["ESObjects"],description:""})),a(B,"create",B.context.createSceneObject.bind(B.context)),a(B,"createFromUrl",B.context.createSceneObjectFromUrl.bind(B.context)),a(B,"createFromClass",B.context.createSceneObjectFromClass.bind(B.context)),a(B,"createFromJson",B.context.createSceneObjectFromJson.bind(B.context)),a(B,"destroySceneObject",B.context.destroySceneObject.bind(B.context)),a(B,"getSceneObjById",B.context.getSceneObjectById.bind(B.context)),a(B,"getSceneObj",B.context.getSceneObject.bind(B.context)),a(B,"getEnv",B.context.getEnv.bind(B.context)),a(B,"setEnv",B.context.setEnv.bind(B.context)),a(B,"getStrFromEnv",B.context.getStrFromEnv.bind(B.context)),a(B,"getSceneObjectById",B.context.getSceneObjectById.bind(B.context)),a(B,"getSceneObject",B.context.getSceneObject.bind(B.context));let k=B;class Au extends b{constructor(s,e){super(),this.dv(new ce(s.subContainerChanged,()=>{if(s.subContainer)return e(s,s.subContainer)}))}}const _r=class _r extends b{constructor(e,t,i){super();a(this,"_id",++_r._accumId);this._name=e,this._description=t,this._callFunction=i}get id(){return this._id}get name(){return this._name}get description(){return this._description}get callFunction(){return this._callFunction}};a(_r,"_accumId",-1);let Qt=_r;class so extends Qt{constructor(s,e,t,i,r,o){super(s,e,o??(()=>{})),this._withUndefined=t,this._readonly=i,this._defaultValue=r}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Ie extends so{constructor(e,t,i,r,o,h,c){var u;const l=e instanceof fe?"未获取到属性名":e[1].toString();super(t??l,h??l,r??!1,o??!1,i,c);a(this,"_propName");a(this,"_typeName");this._reactVar=e,this._propName=l;try{this._typeName=e instanceof fe?"未获取到对象类型":(u=e[0])==null?void 0:u.typeName}catch{this._typeName="未获取到对象类型"}}get reactVar(){return this._reactVar}get propName(){return this._propName}get typeName(){return this._typeName}}class S extends Ie{get type(){return"BooleanProperty"}}class A extends Ie{get type(){return"StringProperty"}}class v extends Ie{get type(){return"NumberProperty"}}class pe extends Ie{get type(){return"Number2Property"}}class ve extends Ie{get type(){return"Number3Property"}}class Je extends Ie{get type(){return"Number4Property"}}class G extends Je{get type(){return"ColorProperty"}}class cc extends v{get type(){return"DashPatternProperty"}}class vt extends Ie{get type(){return"DateProperty"}}class no extends Ie{get type(){return"DatesProperty"}}class L extends Qt{constructor(e,t,i){super(e??"",i??"");a(this,"_placement");this._placement=t}get type(){return"DivideProperty"}get placement(){return this._placement}}class j extends Ie{constructor(s,e,t,i,r,o,h){super(s,t,i,r,o,h),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class Vt extends Ie{constructor(s,e,t,i,r,o,h){super(s,e,t,r,o,h),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class Vn extends Ie{constructor(s,e,t,i,r,o,h){super(s,e,t,r,o,h),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class N extends Qt{constructor(e,t,i,r){const o=e??"Unnamed Function";super(o,r??o);a(this,"_paramsLength");this._func=t,this._defaultParams=i,this._paramsLength=this._func.length??0}get paramsLength(){return this._paramsLength}get defaultParams(){return this._defaultParams}get isOpen(){return this._defaultParams.length!==this._paramsLength}get func(){return this._func}run(...e){this._func(...e)}get type(){return"MethodProperty"}}class ge extends Ie{constructor(s,e,t,i,r,o,h,c){super(s,i,r,o,h,c),this._step=e,this._minMax=t}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}class _t extends ve{get type(){return"PositionProperty"}}class rn extends ve{get type(){return"RotationProperty"}}function Nu(n,s){const[e,t,i]=Ws(n),[r,o,h]=Ws(s),c=y((e()??0)/(r()??3e3)),l=()=>{const u=c.value,p=r()??3e3,g=e()??0;if(!Number.isFinite(p)||!Number.isFinite(g)){console.warn(`duration || currentTime error: duration: ${p} currentTime: ${g}`);return}Math.abs(u*p-g)<.001||(p<=0?c.value=0:c.value=g/p)};return c.dispose(i.disposableOn(l)),c.dispose(h.disposableOn(l)),c.dispose(c.changed.disposableOn(()=>{const u=c.value,p=r()??3e3,g=e()??0;if(!Number.isFinite(p)||!Number.isFinite(g)){console.warn(`duration || currentTime error: duration: ${p} currentTime: ${g}`);return}Math.abs(u*p-g)<.001||t(u*p)})),c}class Ln extends Qt{constructor(e,t,i,r,o,h){super(r??"播放器",h??"播放器");a(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=t,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}a(Ln,"createPlayingRatio",Nu);class lc extends Qt{constructor(e,t,i,r,o,h){const c=r??"视角播放器";super(c,h??c);a(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=t,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class re extends Ie{constructor(s,e,t,i,r,o,h){super(s,e,t,r,o,h),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonArrayProperty"}}class z extends Ie{constructor(s,e,t,i,r,o,h){super(s,e,t,r,o,h),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class ro extends so{constructor(s,e,t,i,r,o){super(s,o??s,i??!1,r??!1),this._getFunc=e,this._setFunc=t}get getFunc(){return this._getFunc}get setFunc(){return this._setFunc}get type(){return"GetSetProperty"}}var D=(n=>(n.Place="place",n.BrushErase="brushErase",n.Translation="translation",n.Rotation="rotation",n.Scale="scale",n.DoublePointsAppend="doublePointsAppend",n.DoublePointsModify="doublePointsModify",n.CircularAppend="circularAppend",n.CircularInsert="circularInsert",n.LineStringAppend="lineStringAppend",n.LineStringInsert="lineStringInsert",n.ScatterAppend="scatterAppend",n.ScatterModify="scatterModify",n.VisibilityAppend="visibilityAppend",n.VisibilityModify="visibilityModify",n.HeightModify="heightModify",n.SinglePoint="singlePoint",n.DoublePoints="doublePoints",n))(D||{});const oo=[["地形","TERRAIN"],["3D Tiles","CESIUM_3D_TILE"],["地形和3D Tiles","BOTH"]],ao=[["直箭头","straightArrow"],["燕尾箭头","swallowTailArrow"]];var dc=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(dc||{});class Vu{constructor(s){this.childPickedInfo=s}}class Lu{constructor(s,e,t,i,r,o){this.pickResult=s,this.sceneObject=e,this.tilesetPickInfo=t,this.geojsonPickInfo=i,this.attachedInfo=r,this.screenPosition=o}assign(s){s!=null&&s.pickedResult&&(this.pickResult=s.pickedResult),s!=null&&s.sceneObject&&(this.sceneObject=s.sceneObject),s!=null&&s.tilesetPickInfo&&(this.tilesetPickInfo=s.tilesetPickInfo),s!=null&&s.geojsonPickInfo&&(this.geojsonPickInfo=s.geojsonPickInfo),s!=null&&s.attachedInfo&&(this.attachedInfo=s.attachedInfo),s!=null&&s.screenPosition&&(this.screenPosition=s.screenPosition)}}const he=class he extends k{constructor(e){super(e);a(this,"_editing",this.dv(y(!1)));a(this,"editingID");a(this,"editingBindMode","singlePoint");a(this,"_deprecated",[]);a(this,"_flyInEvent",this.dv(new m));a(this,"_flyToEvent",this.dv(new m));a(this,"_flyOverEvent",this.disposeVar(new m));a(this,"_pickedEvent",this.dv(new m));a(this,"_calcFlyToParamEvent",this.dv(new m));a(this,"_calcFlyInParamEvent",this.dv(new m));a(this,"useCalcFlyToParamInESObjectWithLocation",!1);mc(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let t=0;t<e.length;t++){const i=e[t];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(r=>{Reflect.has(this,r+"Changed")&&this.d(this[r+"Changed"].don(h=>{const c=i[r];typeof c=="string"?console.warn(`注意:${this.typeName} 的 ${r} 属性下版本将会被移除!`):Object.keys(c).forEach((l=>{h===l&&console.warn(`注意:${this.typeName} 的 ${r} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${c[l]}`)}))}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,he._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,he._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new S([this,"show"],"是否显示",he.defaults.show),new S([this,"collision"],"开启碰撞",he.defaults.collision),new S([this,"allowPicking"],"允许拾取",he.defaults.allowPicking),new N("保存观察视角",()=>this.calcFlyToParam(),[]),new N("清空飞向参数",()=>this.emptyFlyToParam(),[]),new N("保存飞入参数",()=>this.calcFlyInParam(),[]),new N("清空飞入参数",()=>this.emptyFlyInParam(),[])],more:[...e.more,new L("飞行定位"),new N("飞向",t=>this.flyTo(t),[1],"flyTo"),new z([this,"flyToParam"],"飞行参数",void 0,void 0,!0),new v([this,"flyToDistance"],"flyToDistance",void 0,!0),new v([this,"flyToHeading"],"flyToHeading",void 0,!0),new v([this,"flyToPitch"],"flyToPitch",void 0,!0),new v([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new v([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new v([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new L("飞入参数"),new N("飞入",t=>this.flyIn(t),[1],"flyIn"),new z([this,"flyInParam"],"飞入参数",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??he.defaultFlyToParam,pDelta:e}:void 0}};a(he,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:te(void 0),flyInParam:te(void 0)})),a(he,"type",he.register("ESVisualObject",he,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),a(he,"supportEditingModes",[]),a(he,"defaultFlyToParam",{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0}),a(he,"defaultFlyInParam",{position:[0,0,0],rotation:[0,0,0],flyDuration:1}),a(he,"_lastFlyInId",0),a(he,"_lastFlyToId",0);let Y=he;class uc extends b{constructor(){super();a(this,"_data",this.dv(y(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class pc extends b{constructor(){super(...arguments);a(this,"_dragStartEvent",this.dv(new m));a(this,"_dragOverEvent",this.dv(new m));a(this,"_dragLeaveEvent",this.dv(new m));a(this,"_dropEvent",this.dv(new m))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function zu(n,s){s&&(Reflect.has(s,"editing")?s.editing=!0:Reflect.has(s,"positionEditing")&&(s.positionEditing=!0))}function Uu(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function zn(n,s){Ae(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),gt(n,"__treeItem",s)}function Wu(n){return Ae(n,"__treeItem")}function Bu(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const s=document.createElement("a");s.href=n;const e=s.href;return s.remove(),e}function ho(n){if(typeof n!="string")return!1;try{const s=JSON.parse(n);return typeof s=="object"&&s!==null}catch{return!1}}function Hu(n){try{return new DOMParser().parseFromString(n,"application/xml").getElementsByTagName("parsererror").length===0}catch{return!1}}function $u(n){return n instanceof Function?n():n}function gc(n,s){for(let e of n)if(s.includes(e))return!0;return!1}function on(n,s){const e=n,t=s;return e===void 0||e.length===0||t===void 0||t.length===0?!0:gc(e,t)}function Gu(n){const s=setTimeout(()=>{n(),clearTimeout(s)})}function ns(n){let s=n%360;return s=s<0?360+s:s,s}function fc(n){return ns(n+180)-180}function Un(n,s,e){let t=ns(n),i=ns(s);Math.abs(t-i)>180&&(t<i?t+=360:i+=360);const r=t*(1-e)+i*e;return fc(r)}function co(n,s,e,t){return t=t||[0,0,0],t[0]=Un(n[0],s[0],e),t[1]=Un(n[1],s[1],e),t[2]=Un(n[2],s[2],e),t}function mc(n,s,e="editing"){const t=new b;n.ad(t);const i=s.bind(n);return t.ad(new ce(n.activeViewerChanged,()=>{const r=new b;let o=n.activeViewer;return o?(r.ad(n[`${e}Changed`].don(()=>{var h;n[`${e}`]?i():(h=(n.components.main??n).editingID)!=null&&h.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),r.ad(o.editingEvent.don(h=>{if(h.objectIDs.includes(n.id)&&h.type==="end"){const c=n.components.main??n;c.editingID&&(h.editingID.includes(c.editingID)?(c.editingID=void 0,n[e]=!1):n[e]=!c.editingID.includes("outer"))}}))):r.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),r})),n[`${e}`]&&i(),t}function vc(n){var e;const s=Array.isArray(n)?"feature":((e=n.type)==null?void 0:e.toLowerCase())??"";switch(s){case"geometrycollection":return Ju(n);case"topology":const t=n.objects,i=[];for(const r in t){const o=Jl.feature(n,t[r]);i.push(...o.features)}return{type:"FeatureCollection",features:i};case"feature":return{type:"FeatureCollection",features:Array.isArray(n)?n:[n]};case"featurecollection":return n;default:return console.warn(`GeoJson数据转换可能有误,数据类型${s}`),{type:"FeatureCollection",features:Array.isArray(n.features)?n.features:[]}}}function Ju(n,s){const e=[],t=n.geometries||[];function i(r,o={}){!r||!r.type||(r.type==="GeometryCollection"&&Array.isArray(r.geometries)?r.geometries.forEach(h=>i(h,o)):e.push({type:"Feature",geometry:r,properties:{...r.properties||{},...o}}))}return t.forEach(r=>i(r,{})),{type:"FeatureCollection",features:e}}function qu(n){const s=n.cloneNode(!0);s.style.position="fixed",s.style.visibility="hidden",s.style.pointerEvents="none",s.style.top="0",s.style.left="0",s.style.display="inline-block",document.body.appendChild(s);const e=s.getBoundingClientRect();return document.body.removeChild(s),{x:e.x,y:e.y,width:e.width,height:e.height}}function Xu(n,s,e=!1){var p,g,f,w,E,C;const t=[],i=[],r=[],o=[],h=[],c=new Set,l=new Map;if(s!=null&&s.features)for(const T of s.features){const R=((p=T.id)==null?void 0:p.toString())||((f=(g=T.properties)==null?void 0:g.id)==null?void 0:f.toString());R&&(c.add(R),l.set(R,T))}if(n!=null&&n.features)for(const T of n.features){const R=((w=T.id)==null?void 0:w.toString())||((C=(E=T.properties)==null?void 0:E.id)==null?void 0:C.toString());if(R)if(c.has(R)){if(e){const V=l.get(R);V&&_c(V,T)?o.push(R):h.push(R)}t.push(R)}else i.push(R)}for(const T of c)t.includes(T)||r.push(T);const u={unchangedIds:t,newIds:i,removedIds:r};return e&&(u.contentUnchangedIds=o,u.contentUpdatedIds=h),u}function _c(n,s){return wc(n.geometry,s.geometry)?JSON.stringify(n.properties)===JSON.stringify(s.properties):!1}function wc(n,s){if(n===s)return!0;if(!n||!s||n.type!==s.type)return!1;const e=n.coordinates,t=s.coordinates;if(n.type==="Point")return Yu(e,t);if(n.type==="LineString"||n.type==="MultiPoint")return Wn(e,t);if(n.type==="Polygon"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Wn(e[i],t[i]))return!1;return!0}if(n.type==="MultiLineString"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Wn(e[i],t[i]))return!1;return!0}if(n.type==="MultiPolygon"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++){const r=e[i],o=t[i];if(r.length!==o.length)return!1;for(let h=0;h<r.length;h++)if(!Wn(r[h],o[h]))return!1}return!0}return JSON.stringify(n)===JSON.stringify(s)}function Yu(n,s){if(!n||!s)return n===s;if(n.length!==s.length)return!1;for(let e=0;e<n.length;e++)if(Math.abs(n[e]-s[e])>1e-10)return!1;return!0}function Wn(n,s){if(n===s)return!0;if(!n||!s||n.length!==s.length)return!1;for(let e=0;e<n.length;e++){const t=n[e],i=s[e];if(t.length!==i.length)return!1;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-i[r])>1e-10)return!1}return!0}class lo extends b{constructor(e){super();a(this,"_sceneObject",this.dv(y(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const t=k.getSceneObjById(this._id);t&&(this._sceneObject.value=t),this.d(k.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(k.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class Ku extends b{constructor(e,t){super();a(this,"_sofi");this._id=e,this._sofi=this.dv(new lo(this._id));{const i=()=>{t.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class yc extends b{constructor(){super();a(this,"_id",this.dv(y(void 0)));a(this,"_sceneObject",this.dv(y(void 0)));a(this,"_resetting",this.dv(new ce(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new Ku(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class Zu extends b{constructor(e,t,i,r){super();a(this,"_sceneObjectId",this.dv(new yc));this._id=e,this._startTimeStamp=t,this._duration=i,this._parent=r,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:h=0}=this._parent,c=h-this._startTimeStamp;this.player.currentTime=kn(c,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof tt?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const Qu=`
|
|
21
|
+
`)}}),globalThis.g_XE3CopyRights=globalThis.g_XE3CopyRights||{},globalThis.g_XE3CopyRights[n]=d.copyright,globalThis.g_XE3SendProductUsageInfo=globalThis.g_XE3SendProductUsageInfo||!0,globalThis.g_XE3SendProductUsageInfo&&(setTimeout(()=>Pl(d.copyright),1e3*60),setInterval(()=>Pl(d.copyright),1440*60*1e3)),globalThis.g_earthsdk_copyright_print=globalThis.g_earthsdk_copyright_print??!0,globalThis.g_earthsdk_copyright_print&&d.copyright.print()}catch{console.warn("版本信息有误!")}const Tl=new Set;function is(n,s=n){Tl.has(s)||(Tl.add(s),console.warn(n))}function tn(n){const s=Rn(n),e=()=>s[0][s[1]],t=r=>{try{s[0][s[1]]=r}catch(o){is(`setValue error, obj(${s[0].constructor.name}) prop(${s[1]}) error(${o})`)}},i=s[0][s[2]];return[e,t,i]}function Id(){return!0}function xd(){throw new Error("throwOnDestroyed")}function Il(n){for(var s in n)typeof n[s]=="function"&&(n[s]=xd);n.isDestroyed=Id}const xr=class xr{constructor(){a(this,"_memId",++xr._lastMemId);a(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(s){return this.disposers.push(s),s}d(s){return this.dispose(s)}disposeVar(s){return this.disposers.push(()=>s.destroy()),s}dv(s){return this.disposeVar(s)}tryDisposeVar(s){return this.disposers.push(()=>s.tryDestroy()),s}tdv(s){return this.tryDisposeVar(s)}autoDispose(s){return typeof s=="function"?this.dispose(s):this.disposeVar(s)}ad(s){return typeof s=="function"?this.dispose(s):this.disposeVar(s)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const s=this._disposers,e=s.length;for(let t=e-1;t>=0;--t)s[t]();s.length=0,this._disposers=void 0}catch(s){console.error(`destroy get error! ${s}`)}return Il(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};a(xr,"_lastMemId",-1);let b=xr,Fr;function xl(n){Fr=n}Object.defineProperties(b.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!Fr)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new Fr)}return this._toDestroyEvent}}});class An{constructor(s,e,t=!1){a(this,"_freeElements");a(this,"_usedElementsCount");a(this,"_usedElements");a(this,"_nextCreateID");a(this,"_scratchObjs");this._createDefaultFunc=s,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],t&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let s;return this._freeElements.length>0?s=this._freeElements.pop():s=this._createDefaultFunc&&this._createDefaultFunc()||{},s._cid=this._getCreateID(),s}create(){return this._create()}multiCreate(s){this._scratchObjs.length=0;for(let e=0;e<s;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(s){this._destroyFunc&&this._destroyFunc(s),s._cid=void 0}destroy(...s){const e=s.length;for(let t=0;t<e;++t)this._destroy(s[t])}}function Od(){return{item:void 0,previous:void 0,next:void 0}}function Dd(n){n.item=void 0,n.previous=void 0,n.next=void 0}const Ol=new An(Od,Dd,!0);function kr(n,s,e){const t=Ol.create();return t.item=n,t.previous=s,t.next=e,t}function Dl(n){if(!n)throw new Error("node is undefined!");Ol.destroy(n)}function Mr(n,s){s.previous&&s.next?(s.previous.next=s.next,s.next.previous=s.previous):s.previous?(s.previous.next=void 0,n.tail=s.previous):s.next?(s.next.previous=void 0,n.head=s.next):(n.head=void 0,n.tail=void 0),s.next=void 0,s.previous=void 0}class Fl{constructor(s){a(this,"head");a(this,"tail");a(this,"_length");const{needLength:e}=s||{needLength:!0};this.head=void 0,this.tail=void 0,e&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(s){typeof this._length=="number"&&(this._length=s)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let s=this.head;for(;s;)yield s,s=s.next}remove(s){if(!s)throw new Error("node is undefined!");Mr(this,s),this._decrementLength(),Dl(s)}getNode(s){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===s)return e;e=e.next}}moveAfter(s,e){if(s!==e){Mr(this,e);var t=s.next;s.next=e,this.tail===s?this.tail=e:t&&(t.previous=e),e.next=t,e.previous=s}}moveBefore(s,e){if(s!==e){Mr(this,e);var t=s.previous;s.previous=e,this.head===s?this.head=e:t&&(t.next=e),e.previous=t,e.next=s}}insertBefore(s,e){const t=kr(e,s.previous,s);return s.previous&&(s.previous.next=t),s.previous=t,this.head===s&&(this.head=t),this._incrementLength(),t}insertAfter(s,e){const t=kr(e,s,s.next);return s.next&&(s.next.previous=t),s.next=t,this.tail===s&&(this.tail=t),this._incrementLength(),t}_setFirstNode(s){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=kr(s,void 0,void 0);if(this.head=e,this.tail=e,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return e}push(s){return this.tail?this.insertAfter(this.tail,s):this._setFirstNode(s)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const s=this.tail.item;return this.remove(this.tail),s}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const s=this.head.item;return this.remove(this.head),s}unshift(s){return this.head?this.insertBefore(this.head,s):this._setFirstNode(s)}removeAll(){let s=this.head;for(;s;){const e=s.next;Dl(s),s=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}function Fd(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function kd(n){n.func=void 0,n.scope=void 0,n._hasRemoved=!1,n._once=!1}const vi=new An(Fd,kd,!0);class Ar{constructor(){a(this,"__dll");a(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new Fl({needLength:!0}),this.__dll}_pushCurrentListener(s){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(s):this.__currentListenerStack=[this.__currentListenerStack,s]:this.__currentListenerStack=s}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(s){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(s)!==-1:this.__currentListenerStack===s:!1}do(...s){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const t=e.item;t._hasRemoved||(this._pushCurrentListener(t),t.func.call(t.scope,...s),this._popCurrentListener());const i=e.next;t._once&&!t._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let s=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){s=!1;break}e=e.next}return s}isHandlerValid(s){return!s.item._hasRemoved}nextHandler(s){if(!s.item._hasRemoved)throw new Error("handler has removed!");let e=s.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(s){if(!s.item._hasRemoved)throw new Error("handler has removed!");let e=s.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(s,e){if(s.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(s,e)}moveBefore(s,e){if(s.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(s,e)}insertBefore(s,e,t,i=!1){if(s.item._hasRemoved)throw new Error("handler has removed!");const r=vi.create();return r.func=e,r.scope=t,r._once=i,this._dll.insertBefore(s,r)}insertAfter(s,e,t,i=!1){if(s.item._hasRemoved)throw new Error("handler has removed!");const r=vi.create();return r.func=e,r.scope=t,r._once=i,this._dll.insertAfter(s,r)}_clearHasRemoved(s){s.item._hasRemoved&&!this._hasCurrentListener(s.item)&&(vi.destroy(s.item),this._dll.remove(s))}remove(s){if(!s.item||s.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(s.item)?s.item._hasRemoved=!0:(vi.destroy(s.item),this._dll.remove(s))}removeAll(){if(this.__dll&&!this._dll.empty){let s=this._dll.head;for(;s;){const e=s.next;s.item._hasRemoved||this.remove(s),s=e}}}destroy(){if(!this.__dll)return;let s=this._dll.head;for(;s;){const e=s.next,t=s;this._hasCurrentListener(t.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${t.item.func.toString()}`)),vi.destroy(t.item),this._dll.remove(t),s=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(s,e,t=!1){const i=vi.create();return i.func=s,i.scope=e,i._once=t,this._dll.push(i)}pop(){const s=this.tail;if(!s)throw new Error("pop error!");this.remove(s)}shift(){const s=this.head;if(!s)throw new Error("shift error!");this.remove(s)}unshift(s,e,t=!1){const i=vi.create();return i.func=s,i.scope=e,i._once=t,this._dll.unshift(i)}get tail(){let s=this._dll.tail;for(;s&&s.item._hasRemoved;)s=s.previous;return s}get head(){let s=this._dll.head;for(;s&&s.item._hasRemoved;)s=s.previous;return s}}class sn{constructor(){a(this,"_listenerHandler");a(this,"_cid")}_reset(s,e){this._listenerHandler=s,this._cid=e}clone(s){return s=s??new sn,s._reset(this._listenerHandler,this._cid),s}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const s=this._listenerHandler._cid;if(typeof s<"u"&&this._cid===s)return!0}return!1}}class jr extends sn{}class v extends b{constructor(){super(...arguments);a(this,"__pipe");a(this,"beforeCallback");a(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new Ar,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...e){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...e),!this.isDestroyed()&&this._pipe.do(...e),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...e)}on(e,t,i=!1,r){const o=i?this._pipe.unshift(e,t,!1):this._pipe.push(e,t,!1);return r=r??new jr,r._reset(o,o._cid),r}disposableOn(e,t,i=!1,r){const o=this.on(e,t,i,r);return()=>{o.valid&&this.off(o)}}don(e,t,i=!1,r){return this.disposableOn(e,t,i,r)}disposableWeakOn(e,t,i=!1,r){const o=new b,l=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,t,i,r)),o.dispose(this.toDestroyEvent.disposableOn(l)),l}dwon(e,t,i=!1,r){return this.disposableWeakOn(e,t,i,r)}once(e,t,i=!1,r){const o=i?this._pipe.unshift(e,t,!0):this._pipe.push(e,t,!0);return r=r??new jr,r._reset(o,o._cid),r}disposableOnce(e,t,i=!1,r){const o=this.once(e,t,i,r);return()=>o.valid&&this.off(o)}donce(e,t,i=!1,r){const o=this.once(e,t,i,r);return()=>o.valid&&this.off(o)}off(e){if(!e.valid)throw new Error("handler is not valid!");this._pipe.remove(e._listenerHandler),e._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(is("The event is destroying with listeners!"),this._pipe.removeAll())}}xl(v);function ss(n,s){return s=s??new sn,s._reset(n,n._cid),s}class Md{constructor(){a(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new Ar,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...s){return this._pipe.do(...s)}isHandlerValid(s){return s.valid?this._pipe.isHandlerValid(s._listenerHandler):!1}moveAfter(s,e){if(!s.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(s._listenerHandler,e._listenerHandler)}moveBefore(s,e){if(!s.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(s._listenerHandler,e._listenerHandler)}insertBefore(s,e,t,i=!1,r){if(!s.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(s._listenerHandler,e,t,i);return ss(o,r)}insertAfter(s,e,t,i=!1,r){if(!s.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(s._listenerHandler,e,t,i);return ss(o,r)}remove(s){if(!s.valid)throw new Error("handler is not valid!");return this._pipe.remove(s._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(s,e,t=!1,i){const r=this._pipe.push(s,e,t);return ss(r,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(s,e,t=!1,i){const r=this._pipe.unshift(s,e,t);return ss(r,i)}getTail(s){const e=this._pipe.tail;if(e)return ss(e,s)}getHead(s){const e=this._pipe.head;if(e)return ss(e,s)}}class ge extends b{constructor(e,t,i){super();a(this,"_changed");a(this,"_value");a(this,"_oldValue");a(this,"toChangeFunc");this._equalsFunc=t,this._assignFunc=i,this._value=this._assignFunc&&this._assignFunc(e,void 0)||e}get assignFunc(){return this._assignFunc}get equalsFunc(){return this._equalsFunc}equals(e){return this._equalsFunc?this._equalsFunc(this._value,e):this._value===e}set value(e){if(this._equalsFunc?!this._equalsFunc(this._value,e):this._value!==e){if(this.toChangeFunc&&!this.toChangeFunc(e,this._value))return;this._assignFunc?(this._oldValue=this._assignFunc(this._value,this._oldValue),this._value=this._assignFunc(e,this._value)):(this._oldValue=this._value,this._value=e),this._changed&&this._changed.emit(e,this._oldValue)}}get value(){return this._value}get changed(){return this._changed||(this._changed=this.disposeVar(new v)),this._changed}forceChange(){this._changed&&this._changed.emit(this._value,this._value)}}function w(n,s,e){return new ge(n,s,e)}function F(n){return new ge(n,(s,e)=>s.length!==e.length?!1:s.every((t,i)=>t===e[i]),(s,e)=>{const t=e||new Array(s.length);return t.length=s.length,s.forEach((i,r)=>t[r]=i),t})}function q(n){return w(n,(s,e)=>s===void 0||e===void 0?s===void 0&&e===void 0:s.length!==e.length?!1:s.every((t,i)=>t===e[i]),(s,e)=>{if(!s)return;const t=e||new Array(s.length);return t.length=s.length,s.forEach((i,r)=>t[r]=i),t})}function jn(n,s,e){return w(n,(t,i)=>t.length!==i.length?!1:t.every((r,o)=>s&&s(r,i[o])||r===i[o]),(t,i)=>{const r=i||new Array(t.length);return r.length=t.length,t.forEach((o,l)=>{r[l]=e?e(o):o}),r})}function Xt(n,s,e){return w(n,(t,i)=>t===void 0||i===void 0?t===void 0&&i===void 0:t.length!==i.length?!1:t.every((r,o)=>s&&s(r,i[o])||r===i[o]),(t,i)=>{if(!t)return;const r=i||new Array(t.length);return r.length=t.length,t.forEach((o,l)=>{r[l]=e?e(o):o}),r})}function B(n){return new ge(n,(s,e)=>s===e||s!==void 0&&e!==void 0&&JSON.stringify(s)===JSON.stringify(e),(s,e)=>{if(s!==void 0)return JSON.parse(JSON.stringify(s))})}function te(n){return new ge(n,(s,e)=>s===e||s!==void 0&&e!==void 0&&JSON.stringify(s)===JSON.stringify(e),(s,e)=>{if(s!==void 0)return JSON.parse(JSON.stringify(s))})}function Ad(n){return new ge(n,(s,e)=>{if(s===e)return!0;if(s===void 0||e===void 0)return!1;const t=Object.keys(s),i=Object.keys(e);return t.length!==i.length?!1:t.every((r,o)=>r===i[o]&&s[r]===e[r])},(s,e)=>s&&{...s})}function jd(n){return new ge(n,(s,e)=>{if(s===e)return!0;if(s===void 0||e===void 0)return!1;const t=Object.keys(s),i=Object.keys(e);return t.length!==i.length?!1:t.every((r,o)=>r===i[o]&&s[r]===e[r])},(s,e)=>s&&{...s})}function Rd(n){return jn(n,(s,e)=>s.every((t,i)=>t===e[i]),s=>[...s])}function Rr(n){return Xt(n,(s,e)=>s.every((t,i)=>t===e[i]),s=>[...s])}function Nd(n){return jn(n,(s,e)=>JSON.stringify(s)===JSON.stringify(e),s=>JSON.parse(JSON.stringify(s)))}function Ld(n){return Xt(n,(s,e)=>JSON.stringify(s)===JSON.stringify(e),s=>JSON.parse(JSON.stringify(s)))}function Yt(n){return Rr(n)}function Nr(n){return Xt(n,(s,e)=>s.length===e.length&&s.every((t,i)=>t.every((r,o)=>r===e[i][o])),s=>s.map(e=>[...e]))}function Vd(n){return Xt(n,(s,e)=>s.length===e.length&&s.every((t,i)=>t.every((r,o)=>r===e[i][o])),s=>s.map(e=>[...e]))}function Rn(n){const s=n instanceof ge?[n,"value","changed"]:[...n];return s[2]=s[2]||s[1]+"Changed",s}function Lr(n,s,e,t=!1){s[2]=s[2]||s[1]+"Changed";const i=()=>{const r=s[0][s[1]];e?n[0][n[1]]=e(r):n[0][n[1]]=r};return i(),t?s[0][s[2]].disposableWeakOn(i):s[0][s[2]].disposableOn(i)}function zd(n,s,e,t,i=!1){const r=Lr(n,s,e,i),o=Lr(s,n,t,i);return()=>(r(),o())}function _(n,s,e,t=!1){const i=n instanceof ge?[n,"value","changed"]:n,r=s instanceof ge?[s,"value","changed"]:s;return Lr(i,r,e,t)}function D(n,s,e,t,i=!1){const r=Rn(n),o=Rn(s);return zd(r,o,e,t,i)}function Ud(n,s,e,t=!1){const[i]=tn(s);return D(n,s,r=>r??e,r=>{if(!(r===e&&i()===void 0))return r},t)}function ns(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var s=Math.random()*16|0,e=n==="x"?s:s&3|8;return e.toString(16)})}function Nn(n,s){if(!globalThis||!globalThis.setTimeout||!globalThis.clearTimeout)throw new Error("目前只适合在浏览器中使用!");let e=0;function t(){e>0&&(globalThis.clearTimeout(e),e=0)}function i(...r){t(),e=globalThis.setTimeout(n,s,...r)}return[i,t]}function Vr(n,s,...e){const t=setInterval(n,s,...e);return()=>clearInterval(t)}function zr(n,s,...e){const t=setTimeout(n,s,...e);return()=>clearTimeout(t)}function Ln(n,...s){let e;const t=()=>{const i=performance.now();n(i,...s),e=requestAnimationFrame(t)};return t(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function rs(n,...s){let e;return e=requestAnimationFrame(()=>{const i=performance.now();n(i,...s)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function nn(n,...s){let e=!1,t;return new Promise((i,r)=>{t=r,i()}).then(()=>{!e&&n(...s)}).catch(i=>{console.error(i)}),()=>(e=!0)&&t&&(t("nextMicroTask cancelled!"),t=void 0)}class Vn extends v{constructor(e,t,...i){super();a(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(r=>this.dispose(r[t?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class Ur extends Vn{constructor(...s){super(nn,!1,...s)}}function Bd(...n){return new Ur(...n)}class Wd extends Vn{constructor(...s){super(nn,!0,...s)}}function Hd(...n){return new Ur(...n)}class zn extends Vn{constructor(...s){super(rs,!1,...s)}}function oe(...n){return new zn(...n)}function $d(n,s){return new zn(...n).don(s())}class kl extends Vn{constructor(...s){super(rs,!0,...s)}}function Gd(...n){return new kl(...n)}function de(n,s,e={time:"don",immediate:!1}){const t=new zn(...Array.isArray(n)?n:[n]),i=t[e.time??"don"](s);return(e.immediate??!1)&&s(),()=>{i(),t.destroy()}}function rn(n){let s;if(typeof n.next=="function")s=n;else if(typeof n[Symbol.iterator]=="function")s=n[Symbol.iterator]();else throw new Error("iteratorOrIterable error!");return s}function Br(n,s){let e=!1;const t=rn(n);let i=-1;for(;;){const{done:r,value:o}=t.next();if(r)break;if(s(o,++i)){e=!0;break}}return e}function Wr(n,s){return!Br(n,(t,i)=>!s(t,i))}function on(n,s,e,t){const i=n;if(!i[s]){const r=t(),o=Object.fromEntries(Object.entries(r).filter(([l,h])=>{const c=Object.getPrototypeOf(e),u=l in c;if(u){const p=h instanceof ge?h.value:h;n[l]=p}return!u}).map(([l,h])=>h instanceof ge?[l,h]:[l,Array.isArray(h)?q(h):w(h)]));i[s]=o}return i[s]}function Kt(n,s){var t;const e=Symbol(`${(t=n==null?void 0:n.constructor)==null?void 0:t.name}-createDefaultProps`);n.constructor.__xbsj_dpSymbol=e,n.constructor.__xbsj_createDefaultProps=s;for(let[i,r]of Object.entries(s()))if(!Reflect.has(n,i)){const o=function(l){var u,p;if(l[e])return;const h=[];let c=Object.getPrototypeOf(l);for(;c;)h.push(c),c=Object.getPrototypeOf(c);h.reverse();for(let g of h){const m=(u=g.constructor)==null?void 0:u.__xbsj_dpSymbol;if(!m)continue;const y=(p=g.constructor)==null?void 0:p.__xbsj_createDefaultProps;y&&on(l,m,g,y)}};Object.defineProperties(n,{[i]:{get(){return o(this),on(this,e,n,s)[i].value},set(l){o(this);const h=on(this,e,n,s)[i];if(!h){console.error("!propObj");debugger}h.value=l}},[`${i}Changed`]:{get(){return o(this),on(this,e,n,s)[i].changed}},[`${i}React`]:{get(){return o(this),on(this,e,n,s)[i]}}})}}const an=new WeakMap;function vt(n,s,e){an.has(n)||an.set(n,{});const t=an.get(n);t[s]=e}function Ne(n,s){return an.has(n)?an.get(n)[s]:void 0}function _t(n,s){const e=rn(n);let t=0;for(;;){const{done:i,value:r}=e.next();if(i)break;s(r,t++)}}function ln(n,s,e){const t=rn(n);let i=e,r=0;for(;;){const{done:o,value:l}=t.next();if(o)break;i=s(i,l,r++)}return i}const Jd=n=>++n;function Hr(n){return ln(n,Jd,0)}function Nt(n){return ln(n,(s,e)=>s>e?s:e,Number.NEGATIVE_INFINITY)}function Zt(n){return ln(n,(s,e)=>s<e?s:e,Number.POSITIVE_INFINITY)}function Ml(n,s){let e=n;for(let t of s)e=e[t];return e}function qd(n,s,e){if(s.length===0)throw new Error("props的数量必须大于0");const t=s.length-1,i=s[t];let r=n;for(let o=0;o<t;++o){const l=s[o];typeof r[l]>"u"&&(r[l]={}),r=r[l]}r[i]=e}function*_i(n,s){const e=rn(n);for(;;){const{done:t,value:i}=e.next();if(t)break;yield Ml(i,s)}}class hn extends b{constructor(){super();a(this,"_innerObj");a(this,"_toChangeEvent");a(this,"_changedEvent");this._innerObj=[],this.dispose(()=>{if(this.length=0,this._innerObj.length>0)throw new Error("this._innerObj.length > 0");this._toChangeEvent&&this._toChangeEvent.reset(),this._innerObj=void 0})}get toChangeEvent(){return this._toChangeEvent||(this._toChangeEvent=new v),this._toChangeEvent}get changedEvent(){return this._changedEvent||(this._changedEvent=new v),this._changedEvent}_resetArray(e){this._toChangeEvent&&this._toChangeEvent.emit([{start:0,deleteCount:this._innerObj.length,items:e}],this);const{length:t}=e;this._innerObj.length=t;for(let i=0;i<t;++i)this._innerObj[i]=e[i];this._changedEvent&&this._changedEvent.emit(this)}splice(e,t,...i){const{length:r}=this._innerObj;e=e>this._innerObj.length?this._innerObj.length:e,e>r?e=r:e<0&&(e+=r,e<0&&(e=0));const o=this._innerObj.length-e;if(t>o?t=o:t<0&&(t=0),arguments.length===1){this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:this._innerObj.length-e,items:[]}],this);const l=this._innerObj.splice(e);return this._changedEvent&&this._changedEvent.emit(this),l}else if(arguments.length===2){this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:t,items:[]}],this);const l=this._innerObj.splice(e,t);return this._changedEvent&&this._changedEvent.emit(this),l}else{this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:t,items:i}],this);const l=this._innerObj.splice(e,t,...i);return this._changedEvent&&this._changedEvent.emit(this),l}}pop(){if(this._innerObj.length===0)return;if(this._toChangeEvent){const t=this._innerObj.length-1,i=1,r=[];this._toChangeEvent.emit([{start:t,deleteCount:i,items:r}],this)}const e=this._innerObj.pop();return this._changedEvent&&this._changedEvent.emit(this),e}push(...e){if(this._toChangeEvent){const i=this._innerObj.length;this._toChangeEvent.emit([{start:i,deleteCount:0,items:e}],this)}const t=this._innerObj.push(...e);return this._changedEvent&&this._changedEvent.emit(this),t}get length(){return this._innerObj.length}set length(e){if(e<0)throw new Error("value < 0");const{length:t}=this._innerObj;if(t!==e){if(this._toChangeEvent){let i,r,o;t>e?(i=e,r=t-e,o=[]):(i=t,r=0,o=new Array(e-t)),this._toChangeEvent.emit([{start:i,deleteCount:r,items:o}],this)}this._innerObj.length=e,this._changedEvent&&this._changedEvent.emit(this)}}get(e){return this._innerObj[e]}set(e,t){const{length:i}=this._innerObj;if(e<0||e>=i)throw new Error("index < 0 || index >= length");this._toChangeEvent&&this._toChangeEvent.emit([{start:e,deleteCount:1,items:[t]}],this),this._innerObj[e]=t,this._changedEvent&&this._changedEvent.emit(this)}indexOf(e){return this._innerObj.indexOf(e)}[Symbol.iterator](){return this._innerObj[Symbol.iterator]()}}function $r(n,s,...e){let t=n;for(let i of e){if(!t[i])if(s)t[i]={};else return;t=t[i]}return t}function Xd(n,s,e){typeof e>"u"&&(s.endsWith(".gltf")?e="model/gltf+json":s.endsWith(".bin")?e="application/octet-stream":s.endsWith(".glb")?e="model/gltf-binary":s.endsWith(".jpg")||s.endsWith(".jpeg")?e="image/jpeg":s.endsWith(".png")?e="image/png":s.endsWith(".glsl")?e="text/plain":s.endsWith(".json")?e="application/json":s.endsWith(".b3dm")||s.endsWith(".i3dm")||s.endsWith("pnts")||s.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${s}: MimeType无法确定!`));const t=new Blob([n],{type:e||""});let i=URL.createObjectURL(t);var r=document.createElement("a"),o=new MouseEvent("click");r.download=s,r.href=i,r.dispatchEvent(o),URL.revokeObjectURL(i)}function Yd(n,s){const e=document.createElement("a"),t=new MouseEvent("click");e.download=s||"下载",e.href=n,e.dispatchEvent(t)}function Kd(){return new Promise((n,s)=>{const e=performance.now();requestAnimationFrame(t=>n(t>e))})}const Un=n=>{let s,e;return e=t=>{t=performance.now(),s=requestAnimationFrame(e),n(t)},s=requestAnimationFrame(e),()=>{cancelAnimationFrame(s)}};function Gr(n,s,e=Un){let t=Number.NEGATIVE_INFINITY,i;function r(h){h-t>s&&i&&(n(...i),i=void 0,t=h)}const o=e&&e(r)||void 0;function l(...h){i=h}return[l,o]}const Al=[];function jl(n,s,e){if(Al.includes(n)){console.warn(`_loadJs ${n} has loaded before!`),s&&s();return}var t=document.getElementsByTagName("head")[0],i=document.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",n),i.onload=i.onreadystatechange=function(){this.readyState&&this.readyState!=="complete"||(Al.push(n),s&&s(),i.onload=i.onreadystatechange=null)},i.onerror=(r,o,l,h,c)=>{e(c)},t.appendChild(i)}function Jr(n,s=!0){if(s){const e=globalThis.L;globalThis.L&&(globalThis.L=void 0);const t=globalThis.define;return globalThis.define&&(globalThis.define=void 0),new Promise((i,r)=>{jl(n,i,r)}).then(()=>(globalThis.define=t,globalThis.L=e,Promise.resolve()))}else return new Promise((e,t)=>{jl(n,e,t)})}async function Rl(n,s=""){return new Promise((e,t)=>{var i=new Image;i.crossOrigin=s,i.src=n,i.onload=()=>e(i),i.onerror=r=>t(r)})}class Zd extends b{constructor(s){super(),this._owner=s}get owner(){return this._owner}}function Nl(n,s){if(n.length%3!==0)throw new Error("positions.length % 3 !== 0");const e=n.length/3;function*t(o){for(let l=0;l<e;++l)yield n[l*3+o]}const i=(s==null?void 0:s.min)??[NaN,NaN,NaN],r=(s==null?void 0:s.max)??[NaN,NaN,NaN];return i[0]=Zt(t(0))??NaN,i[1]=Zt(t(1))??NaN,i[2]=Zt(t(2))??NaN,r[0]=Nt(t(0))??NaN,r[1]=Nt(t(1))??NaN,r[2]=Nt(t(2))??NaN,{min:i,max:r}}async function Qd(n,s=fetch){const e=await s(n);return e.ok?await e.arrayBuffer():void 0}class eu extends b{constructor(e){super();a(this,"_map",new Map);a(this,"_array",[]);a(this,"_createEvent",this.dv(new v));a(this,"_updateEvent",this.dv(new v));a(this,"_destroyEvent",this.dv(new v));this._idFunc=e,this.d(()=>{this._array.length>0&&console.warn("EventFromArrayUpdating: destroy with non-empty array, will trigger destroy event for all items")})}get createEvent(){return this._createEvent}get updateEvent(){return this._updateEvent}get destroyEvent(){return this._destroyEvent}update(e,t={toDel:!0,toAdd:!0,toUpdate:!0}){const{toDel:i=!0,toAdd:r=!0,toUpdate:o=!0}=t;for(let h of this._array)h.updated=!1;const l=e.length;for(let h=0;h<l;++h){const c=e[h],u=this._idFunc(c,h);if(this._map.has(u)){if(o){const p=this._map.get(u);if(!p)throw new Error("!edwi");p.updated=!0,p.item=c,this._updateEvent.emit(u,c)}}else if(r){const p={item:c,id:u,updated:!0};this._array.push(p),this._map.set(u,p),this._createEvent.emit(u,c)}}if(i){const h=this._array.filter(c=>!c.updated);this._array=this._array.filter(c=>c.updated);for(let c of h)this._map.delete(c.id);for(let c of h)this._destroyEvent.emit(c.id,c.item)}}}function Bn(n,...s){if(n>16)throw new Error("length > 16");const e=new Array(n);for(let t=0;t<n;++t)e[t]=s[t]??0;return e}class Wn{constructor(s,e){this._xyzw=s,this._length=e}set 0(s){this._xyzw.x=s}set 1(s){this._xyzw.y=s}set 2(s){this._xyzw.z=s}set 3(s){this._xyzw.w=s}get 0(){return this._xyzw.x??0}get 1(){return this._xyzw.y??0}get 2(){return this._xyzw.z??0}get 3(){return this._xyzw.w??0}get length(){return this._length}}function tu(n){return new Wn(n,2)}function iu(n){return new Wn(n,3)}function su(n){return new Wn(n,4)}class nu{constructor(s,e,t,i){this._array=s,this._length=e,this._start=t,this._stride=i}get length(){return this._length}set 0(s){this._array[this._start+0*this._stride]=s}set 1(s){this._array[this._start+1*this._stride]=s}set 2(s){this._array[this._start+2*this._stride]=s}set 3(s){this._array[this._start+3*this._stride]=s}set 4(s){this._array[this._start+4*this._stride]=s}set 5(s){this._array[this._start+5*this._stride]=s}set 6(s){this._array[this._start+6*this._stride]=s}set 7(s){this._array[this._start+7*this._stride]=s}set 8(s){this._array[this._start+8*this._stride]=s}set 9(s){this._array[this._start+9*this._stride]=s}set 10(s){this._array[this._start+10*this._stride]=s}set 11(s){this._array[this._start+11*this._stride]=s}set 12(s){this._array[this._start+12*this._stride]=s}set 13(s){this._array[this._start+13*this._stride]=s}set 14(s){this._array[this._start+14*this._stride]=s}set 15(s){this._array[this._start+15*this._stride]=s}set 16(s){this._array[this._start+16*this._stride]=s}get 0(){return this._array[this._start+0*this._stride]}get 1(){return this._array[this._start+1*this._stride]}get 2(){return this._array[this._start+2*this._stride]}get 3(){return this._array[this._start+3*this._stride]}get 4(){return this._array[this._start+4*this._stride]}get 5(){return this._array[this._start+5*this._stride]}get 6(){return this._array[this._start+6*this._stride]}get 7(){return this._array[this._start+7*this._stride]}get 8(){return this._array[this._start+8*this._stride]}get 9(){return this._array[this._start+9*this._stride]}get 10(){return this._array[this._start+10*this._stride]}get 11(){return this._array[this._start+11*this._stride]}get 12(){return this._array[this._start+12*this._stride]}get 13(){return this._array[this._start+13*this._stride]}get 14(){return this._array[this._start+14*this._stride]}get 15(){return this._array[this._start+15*this._stride]}get 16(){return this._array[this._start+16*this._stride]}}function ru(n,s,e=0,t=1){return new nu(n,s,e,t)}d.Vector=void 0,(n=>{function s(P,...O){if(P=P||Bn(O.length),O.length>P.length)throw new Error("args.length > target.length");return P instanceof Float64Array?P.set(O):mt(O,P),P}n.set=s;function e(P,O){const Z=P.length;for(let ce=0;ce<Z;++ce)if(!O(P[ce],ce))return!1;return!0}n.every=e;function t(P,O,Z){const ce=P.length;let je=Z;for(let Rt=0;Rt<ce;++Rt)je=O(je,P[Rt],Rt);return je}n.reduce=t;function*i(P){for(let O=0;O<P.length;++O)yield P[O]}n.itr=i;const r=(P,O)=>P+=O*O;function o(P){return t(P,r,0)}n.magnitudeSquared=o;function l(P){const O=o(P);return Math.sqrt(O)}n.magnitude=l;function h(P,O=1e-5){const Z=o(P);return Math.abs(Z-1)<O}n.isNormalized=h;let c;const u=(P,O,Z)=>P+O*c[Z];function p(P,O){return Q(P,O),c=O,t(P,u,0)}n.dot=p;let g;const m=(P,O,Z)=>P+=(O-g[Z])*(O-g[Z]);function y(P,O){return Q(P,O),g=O,t(P,m,0)}n.distanceSquared=y;function S(P,O){return Math.sqrt(y(P,O))}n.distance=S;let C;const T=(P,O)=>P===C[O];function V(P,O){return Q(P,O),C=O,e(P,T)}n.equals=V;let z,x;const $=(P,O)=>Math.abs(P-z[O])<x;function Y(P,O,Z=0){return Q(P,O),z=O,x=Z,e(P,$)}n.equalsEpsilon=Y;function Q(P,O){if(P.length!==O.length)throw new Error("left.length !== right.length")}function Ae(P,O,Z){const ce=P.length;Z=Z||Bn(ce),Q(P,Z);for(let je=0;je<ce;++je)Z[je]=O(P[je],je);return Z}n.op1=Ae;function qe(P,O,Z,ce){Q(P,O),ce&&Q(P,ce);const je=P.length;ce=ce||Bn(je);for(let Rt=0;Rt<je;++Rt)ce[Rt]=Z(P[Rt],O[Rt]);return ce}n.op2=qe;const jt=P=>P;function mt(P,O){return Ae(P,jt,O)}n.clone=mt;let fi=0;const mi=(P,O)=>P*fi;function El(P,O,Z){return fi=O,Ae(P,mi,Z)}n.multiplyByScalar=El;function qf(P,O,Z=0){const ce=o(P);if(ce<=Z)return;const je=Math.sqrt(ce);return El(P,1/je,O)}n.normalize=qf;function Xf(P,O){return El(P,-1,O)}n.negate=Xf;const Yf=P=>Math.abs(P);function Kf(P,O){return Ae(P,Yf,O)}n.abs=Kf;const Zf=P=>P-Math.floor(P);function Qf(P,O){return Ae(P,Zf,O)}n.fract=Qf;const em=(P,O)=>P-O;function tm(P,O,Z){return qe(P,O,em,Z)}n.subtract=tm;const im=(P,O)=>P+O;function sm(P,O,Z){return qe(P,O,im,Z)}n.add=sm;const nm=(P,O)=>P*O;function rm(P,O,Z){return qe(P,O,nm,Z)}n.multiply=rm;const om=(P,O)=>P/O;function am(P,O,Z){return qe(P,O,om,Z)}n.divide=am;let bl;const lm=(P,O)=>P*(1-bl)+O*bl;function hm(P,O,Z,ce){return bl=Z,qe(P,O,lm,ce)}n.lerp=hm})(d.Vector||(d.Vector={}));function Hn(n,s=0,e=1){return n<s?s:n>e?e:n}class $n extends b{constructor(e,t,i,r,o,l,h,c){super();a(this,"__status");a(this,"_statusChangedEvent");a(this,"_forceCancelFunc");a(this,"_startEvent");a(this,"_progressEvent");a(this,"_completeEvent");a(this,"_cancelEvent");a(this,"_cancelledEvent");a(this,"_errorEvent");a(this,"_finishedEvent");a(this,"_processingID",-1);this._startProcessingFunc=e,this.startFunc=t,this.progressFunc=i,this.completeFunc=r,this.cancelFunc=o,this.cancelledFunc=l,this.errorFunc=h,this.finishedFunc=c,this._status="Initial",this.dispose(()=>{var u;return(u=this._statusChangedEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._startEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._progressEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._completeEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._cancelEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._cancelledEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._errorEvent)==null?void 0:u.destroy()}),this.dispose(()=>{var u;return(u=this._finishedEvent)==null?void 0:u.destroy()}),this.dispose(()=>this.reset())}get startEvent(){return this._startEvent=this._startEvent||new v,this._startEvent}get progressEvent(){return this._progressEvent=this._progressEvent||new v,this._progressEvent}get completeEvent(){return this._completeEvent=this._completeEvent||new v,this._completeEvent}get cancelEvent(){return this._cancelEvent=this._cancelEvent||new v,this._cancelEvent}get cancelledEvent(){return this._cancelledEvent=this._cancelledEvent||new v,this._cancelledEvent}get errorEvent(){return this._errorEvent=this._errorEvent||new v,this._errorEvent}get finishedEvent(){return this._finishedEvent=this._finishedEvent||new v,this._finishedEvent}_completeFunc(e,t){this.processingID===e&&this._status==="Running"&&(this._status="Completed",this.completeFunc&&this.completeFunc(t),this._completeEvent&&this._completeEvent.emit(t),this.finishedFunc&&this.finishedFunc({status:"Completed",value:t}),this._finishedEvent&&this._finishedEvent.emit({status:"Completed",value:t}))}_cancelFunc(e){this._status==="Running"&&(this._status="Cancelling",this.cancelFunc&&this.cancelFunc(e),this._cancelEvent&&this._cancelEvent.emit(e))}_cancelledFunc(e){this._status==="Cancelling"&&(this._status="Cancelled",this.cancelledFunc&&this.cancelledFunc(e),this._cancelledEvent&&this._cancelledEvent.emit(e),this.finishedFunc&&this.finishedFunc({status:"Cancelled",cancelError:e}),this._finishedEvent&&this._finishedEvent.emit({status:"Cancelled",cancelError:e}))}_errorFunc(e,t){this.processingID===e&&this._status==="Running"&&(this._status="Error",this.errorFunc&&this.errorFunc(t),this._errorEvent&&this._errorEvent.emit(t),this.finishedFunc&&this.finishedFunc({status:"Error",error:t}),this._finishedEvent&&this._finishedEvent.emit({status:"Error",error:t}))}_progressFunc(e,t){this.processingID===e&&this._status==="Running"&&(this.progressFunc&&this.progressFunc(t),this._progressEvent&&this._progressEvent.emit(t))}_startFunc(...e){if(this._status==="Initial"){this._status="Running";const t=++this._processingID,i={completeFunc:this._completeFunc.bind(this,t),errorFunc:this._errorFunc.bind(this,t),progressFunc:this._progressFunc.bind(this,t),cancelFunc:this._cancel.bind(this,t),processingID:t},r=this._startProcessingFunc(i,...e);return this._forceCancelFunc=r,this.startFunc&&this.startFunc(...e),this._startEvent&&this._startEvent.emit(...e),t}else return console.warn("this._status !== 'Initial' but start again!"),-1}set _status(e){if(this.__status!==e){const t=this.__status;this.__status=e,this._statusChangedEvent&&this._statusChangedEvent.emit(e,t)}}get _status(){return this.__status}get processingID(){return this._processingID}get statusChangedEvent(){return this._statusChangedEvent||(this._statusChangedEvent=new v),this._statusChangedEvent}reset(e){this._status==="Running"&&this.cancel(e),this._status==="Cancelled"||this._status==="Error"||this._status==="Completed"?this._status="Initial":this._status==="Cancelling"&&console.warn("Cannot reset! (this._status === 'Cancelling')")}get status(){return this._status}cancel(e,t=this.processingID){return this._cancel(t,e)}_cancel(e,t){if(this.processingID===e)if(this._status==="Running"){if(!this._forceCancelFunc)throw new Error("this._forceCancelFunc is undefined!");this._cancelFunc(t);const i=this._forceCancelFunc(t);if(this._forceCancelFunc=void 0,i&&i instanceof Promise)return i.then(()=>{this._cancelledFunc(t)});this._cancelledFunc(t)}else console.warn("this._status !== 'Running' but cancel")}start(...e){try{return this._startFunc(...e)}catch(t){console.error(`processing start error: ${t}`)}}restart(e,...t){try{return this.isRunning&&this.cancel(e),this.isFinished&&this.reset(e),this.isInitial?this._startFunc(...t):(console.warn("restart failed!"),-1)}catch(i){console.error(`processing restart error: ${i}`)}}get isCompleted(){return this._status==="Completed"}get isCancelled(){return this._status==="Cancelled"}get isCancelling(){return this._status==="Cancelling"}get isError(){return this._status==="Error"}get isInitial(){return this._status==="Initial"}get isRunning(){return this._status==="Running"}get isFinished(){return this.isCancelled||this.isCompleted||this.isError}}let qr=class extends Error{};function Ll(n,s){typeof n=="function"?n(s):n.cancelFunc=s}class Xr extends $n{constructor(e=300){super(({progressFunc:t,completeFunc:i,errorFunc:r})=>{const[o,l]=Nn(()=>{if(!this._lastDebounceValue)throw new Error("!this._lastDebounceValue");t([this._lastDebounceValue,this._debouncTimes]),this._debouncTimes=0},this._delayTime);return this._d=o,()=>{l()}});a(this,"_lastDebounceValue");a(this,"_debouncTimes",0);a(this,"_d");this._delayTime=e}get delayTime(){return this._delayTime}debounce(...e){this.isRunning?(++this._debouncTimes,this._lastDebounceValue=e,this._d&&this._d()):console.warn("Debouncing is not running!")}}function Vl(n,s,...e){const t=new AbortController;let i=t.signal,[r,o]=e;if(o!=null&&o.signal)throw console.error("init?.signal"),new Error("init?.signal");o=o||{},o.signal=i;let l=!1;Ll(n,()=>{l=!0,t.abort()});let h=fetch(r,o);return s&&(h=h.then(c=>{if(!c.ok)return c;if(!c.body)throw Error("ReadableStream not yet supported in this browser.");const u=c.headers.get("content-length"),p=u?parseInt(u,10):0;let g=0;return new Response(new ReadableStream({start(m){if(!c.body)throw new Error("!response.body");const y=c.body.getReader();S();function S(){y.read().then(({done:C,value:T})=>{if(C){m.close();return}if(!T)throw new Error("!value");if(!s)throw new Error("!progressFunc");g+=T.byteLength,s(g,p),m.enqueue(T),S()}).catch(C=>{m.error(C)})}}}),{status:c.status,statusText:c.statusText,headers:c.headers})}).catch(c=>{throw l?(c instanceof Error&&c.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new qr("fetching cancelled!")):(c instanceof Error&&c.code===20&&console.error("error.code === 20"),c)})),h}function zl(...n){if(n.length>=1)if(typeof n[0]=="function"||typeof n[0]>"u"){const s={};let e=Vl(s,...n);const{cancelFunc:t}=s;if(!t)throw new Error("!cancelResult.cancelFunc");return[t,e]}else return Vl(...n);throw new Error("cancelableFetch args error!")}class ou extends $n{constructor(e,...t){super(({progressFunc:i,completeFunc:r,errorFunc:o},...l)=>{const h={};let c={loaded:0,total:0};const u=(m,y)=>{c.loaded=m,c.total=y,i(c)},p=this._fetchArgs||l;if(p.length===0)throw new Error("fetchArgs.length === 0");if(zl(h,u,...p).then(e).then(r).catch(m=>{m instanceof qr||o(m)}),!h.cancelFunc)throw new Error("!cancelResult.cancelFunc");return h.cancelFunc});a(this,"_fetchArgs");t.length>0&&(this._fetchArgs=t)}get fetchArgs(){return this._fetchArgs}}function Yr(n,s,e,t){const i="_"+s,r="_"+s+"Changed",o=s+"Changed";Object.defineProperties(n.prototype,{[s]:{get(){return typeof this[i]>"u"&&typeof e<"u"&&(this[i]=e),this[i]},set(l){if(typeof this[i]>"u"&&typeof e<"u"&&(this[i]=e),t?!t(this[i],l):this[i]!==l){const h=this[i];this[i]=l,this[r]&&this[r].emit(l,h)}}},[o]:{get(){return typeof this[r]>"u"&&(this[r]=new v,typeof this.dispose<"u"&&this.dispose(()=>this[r].destroy())),this[r]}}})}class Kr extends $n{constructor(e,t=!0){super(({progressFunc:i,completeFunc:r,errorFunc:o})=>(this._intervalFunc=i,this._intervalID&&console.error("this._intervalID should be undefined!"),this.leading&&i(),this._intervalID=setInterval(i,this.intervalTime),()=>{if(!this._intervalID)throw console.error("this._intervalID should not be undefined!"),new Error("this._intervalID should not be undefined!");clearInterval(this._intervalID),this._intervalID=void 0}));a(this,"_intervalID");a(this,"_intervalFunc");this.intervalTime=e,this.leading=t,this.dispose(this.intervalTimeChanged.disposableOn(()=>{this._intervalID&&this._intervalFunc&&(clearInterval(this._intervalID),this._intervalID=setInterval(this._intervalFunc,this.intervalTime))}))}}Yr(Kr,"leading",!0),Yr(Kr,"intervalTime",500);function au(n,s){let e,t;const i=new Promise((o,l)=>{t=l,e=globalThis.setTimeout(()=>{e=void 0,o()},n)}),r=o=>{e&&(clearTimeout(e),e=void 0),t&&t(o??new qr("sleep cancel error!"))};if(typeof s=="boolean"&&s)return[r,i];if(s)return Ll(s,r),i}class lu{constructor(s=0,e=0,t=0,i,r){a(this,"_processData");a(this,"_lastUpdateTimeStamp",0);this.startTime=s,this.duration=e,this.delay=t,this.proccessFunc=i,this.completeFunc=r,this._processData={ratio:0,timeStamp:0,timeStampFromStart:0,timeStampFromLastUpdate:0}}update(s){const e=(s-this.startTime)/this.duration;e>=0&&(this._processData.ratio=e,this._processData.timeStamp=s,this._processData.timeStampFromStart=s-this.startTime,this._processData.timeStampFromLastUpdate=s-this._lastUpdateTimeStamp,this._lastUpdateTimeStamp=s,this.proccessFunc&&this.proccessFunc(this._processData),e>=1&&this.completeFunc&&this.completeFunc())}start(){this.startTime=performance.now()+this.delay,this._lastUpdateTimeStamp=this.startTime}}class Ul extends $n{constructor(e=1e3,t=0,i=Un){let r;function o(){r&&r()}super(({progressFunc:h,completeFunc:c,errorFunc:u})=>{const p=this.startUpdateFunc&&this.startUpdateFunc(this._base.update.bind(this._base))||void 0;return this._base.startTime=performance.now(),this._base.duration=this.duration,this._base.delay=this.delay,this._base.proccessFunc=h,this._base.completeFunc=()=>{p&&p(),c()},this._base.start(),r=p,o});a(this,"_base");a(this,"duration");a(this,"delay");a(this,"startUpdateFunc");this._base=new lu,this.duration=e,this.delay=t,this.startUpdateFunc=i}get startTime(){return this._base.startTime}}class hu extends b{constructor(e){super();a(this,"_target",0);a(this,"_current",0);a(this,"_start",0);a(this,"_timing",new Ul(Number.POSITIVE_INFINITY));a(this,"_currentChanged");this._duration=e,this._timing.progressFunc=({ratio:t})=>{t=t<0?0:t>1?1:t;const i=this._start*(1-t)+this._target*t;this._current=i,this._currentChanged&&this._currentChanged.emit(this._target,this._current)},this.dispose(()=>{this._timing.isRunning&&this._timing.cancel(),this._timing.destroy()})}reset(e,t=e){this._timing.isRunning&&this._timing.cancel(),this._target=e,this._current=t,this._start=e}set target(e){if(this._target!==e){this._target=e,this._timing.isRunning&&this._timing.cancel(),this._timing.reset(),this._start=this._current;const t=Math.abs(this._target-this._start);this._timing.duration=t*this._duration,this._timing.start()}}get target(){return this._target}get current(){return this._current}get currentChanged(){return this._currentChanged||(this._currentChanged=new v),this._currentChanged}}function Bl(n,s){s=s||[];const e=n.parentNode;return e?Bl(e,s.concat(e)):s}function cu(n){const s=n.composedPath&&n.composedPath()||n.path,e=n.target;if(s!=null)return s.indexOf(globalThis)<0?s.concat(globalThis):s;if(e===globalThis)return[globalThis];if(e===null)throw new Error("target === null");return[e].concat(Bl(e),globalThis)}function we(n,s=!1){const{offsetX:e,offsetY:t}=n;let i=e,r=t;{const o=cu(n);for(let l=0;l<o.length;++l){const h=o[l];if(h!==n.currentTarget&&h instanceof HTMLElement)i+=h.clientLeft,r+=h.clientTop,i+=h.offsetLeft,r+=h.offsetTop;else break}}return s?[i*globalThis.devicePixelRatio,r*globalThis.devicePixelRatio]:[i,r]}function os(n,s=!1){const e=n.target,t=n.currentTarget||n.__xbsj_lastCurrentTarget__;if(!e||!t)return[n.clientX,n.clientY];const i=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=i.left+n.offsetX,l=i.top+n.offsetY,h=o-r.left,c=l-r.top;return s?[h*globalThis.devicePixelRatio,c*globalThis.devicePixelRatio]:[h,c]}class Wl extends b{constructor(e){super();a(this,"_clickEvent",new v);a(this,"_dbclickEvent",new v);a(this,"_downEvent",new v);a(this,"_upEvent",new v);a(this,"_moveEvent",new v);a(this,"_debouncing",new Xr(300));this.dispose(()=>{this._clickEvent.destroy(),this._dbclickEvent.destroy(),this._downEvent.destroy(),this._upEvent.destroy(),this._moveEvent.destroy(),this._debouncing.destroy()});let t=!1,i=[0,0],r=!1;this._debouncing.progressFunc=([[u,p,g],m])=>{m===1?this._clickEvent.emit(u,p,g):m>=2?this._dbclickEvent.emit(u,p,g):console.error("point click should not be here!")},this._debouncing.start(),this.dispose(()=>{this._debouncing.isRunning&&this._debouncing.cancel(),this._debouncing.destroy()});const o=u=>{t=!0;const[p,g]=we(u);i[0]=p,i[1]=g,this._downEvent.emit(p,g,u)},l=u=>{const[p,g]=we(u);t&&!r&&this._debouncing.debounce(p,g,u),t=!1,r=!1,this._upEvent.emit(p,g,u)},h=u=>{const[p,g]=we(u);if(t&&!r){const[m,y]=i;(Math.abs(p-m)>3||Math.abs(g-y)>3)&&(r=!0)}this._moveEvent.emit(p,g,u)},c=()=>{t=!1,r=!1};e.addEventListener("pointerdown",o),e.addEventListener("pointerup",l),e.addEventListener("pointermove",h),e.addEventListener("pointerout",c),this.dispose(()=>{e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",l),e.removeEventListener("pointermove",h),e.removeEventListener("pointerout",c)})}get clickEvent(){return this._clickEvent}get dbclickEvent(){return this._dbclickEvent}get downEvent(){return this._downEvent}get upEvent(){return this._upEvent}get moveEvent(){return this._moveEvent}}class Zr extends b{constructor(){super();a(this,"_pickRectEvent",this.disposeVar(new v));a(this,"_updateRectEvent",this.disposeVar(new v));a(this,"_pointerActionEvent",this.disposeVar(new v));a(this,"_active",this.disposeVar(w(!1)));a(this,"_pickRect",{left0:0,top0:0,left1:0,top1:0});let e=0,t=0,i=0,r=0;this.dispose(this._pointerActionEvent.disposableOn(({type:o,left:l,top:h})=>{o==="PointerDown"?(this._active.value=!0,e=l,t=h,i=l,r=h,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect)):o==="PointerMove"?this._active.value&&(i=l,r=h,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect)):o==="PointerUp"&&this._active.value&&(this._active.value=!1,i=l,r=h,this._setPickRect({left0:e,top0:t,left1:i,top1:r}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect))}))}_setPickRect({left0:e,left1:t,top0:i,top1:r}){this._pickRect.left0=e,this._pickRect.left1=t,this._pickRect.top0=i,this._pickRect.top1=r}pointerDown(e,t){this._pointerActionEvent.emit({type:"PointerDown",left:e,top:t})}pointerMove(e,t){this._pointerActionEvent.emit({type:"PointerMove",left:e,top:t})}pointerUp(e,t){this._pointerActionEvent.emit({type:"PointerUp",left:e,top:t})}reset(){this._setPickRect({left0:0,top0:0,left1:0,top1:0}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect)}get activeEvent(){return this._active.changed}get updateRectEvent(){return this._updateRectEvent}get pickRectEvent(){return this._pickRectEvent}static getLeftTopAndSize(e,t){t=t||{left:0,top:0,width:0,height:0,forward:!0};const{left0:i,top0:r,left1:o,top1:l}=e;return t.width=Math.abs(i-o),t.height=Math.abs(r-l),t.left=Math.min(i,o),t.top=Math.min(r,l),t.forward=o>i,t}static contains(e,t,i){const{left:r,top:o,width:l,height:h}=i;return e>r&&e<=r+l&&t>=o&&t<=o+h}}class du extends Zr{constructor(s){super();const e=this.disposeVar(new Wl(s));this.dispose(e.downEvent.disposableOn((o,l,h)=>h.altKey&&this.pointerDown(o,l))),this.dispose(e.moveEvent.disposableOn((o,l)=>this.pointerMove(o,l))),this.dispose(e.upEvent.disposableOn((o,l)=>this.pointerUp(o,l)));const t=document.createElement("div");t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="2px dashed red",t.style.position="absolute",t.style.boxSizing="border-box",t.style.pointerEvents="none",t.style.height="0px",t.style.width="0px",t.style.left="0px",t.style.top="0px",t.style.display="none",s.appendChild(t),this.dispose(()=>s.removeChild(t)),this.dispose(this.activeEvent.disposableOn(o=>{t.style.display=o?"block":"none"}));const i=()=>{this.reset()};s.addEventListener("contextmenu",i),this.dispose(()=>s.removeEventListener("contextmenu",i));const r={left:0,top:0,width:0,height:0,forward:!1};this.dispose(this.updateRectEvent.disposableOn(o=>{if(Zr.getLeftTopAndSize(o,r)){const{left:l,top:h,width:c,height:u}=r;t.style.height=`${u|0}px`,t.style.width=`${c|0}px`,t.style.left=`${l|0}px`,t.style.top=`${h|0}px`}}))}}class st extends Error{}function Qt(n,s){Ne(n,"_promise_cancel")&&console.warn("setPromiseCancel warn: promise has cancelFunc!"),vt(n,"_promise_cancel",s)}function as(n){return Ne(n,"_promise_cancel")}function ls(n){return!!as(n)}function Qr(n,s){const e=as(n);return e?(e(s),!0):!1}function eo(n){const[s,e]=n;return Qt(e,s),e}function hs(n){let s;const e=new Promise((t,i)=>{s=i,n.then(t).catch(i)});return Qt(e,s),e}function uu(n){let s,e;var t=new Promise((i,r)=>{e=n.disposableOn((...o)=>{e&&e(),i(o)}),s=o=>{e&&e(),r(o)}});return[s,t]}function pu(n){const s=new v,e=new v;return n.then(t=>{s.isDestroyed()||s.emit(t)}).catch(t=>{e.isDestroyed()||e.emit(t)}),[s,e]}class to extends b{constructor(){super();a(this,"_cancelled",!1);a(this,"_cancelError");a(this,"_promiseSet",new Set);a(this,"_disposer")}get disposer(){return this._disposer=this._disposer||new b,this._disposer}destroyImp(){this.finally()}cancel(e){var t;if(!this._cancelled){this._cancelled=!0,(t=this._disposer)==null||t.destroy(),this._cancelError=e;for(let i of this._promiseSet)Qr(i);this._promiseSet.clear()}}get cancelFuncsNum(){return ln(this._promiseSet,e=>e+1,0)}finally(){this._disposer&&!this._disposer.isDestroyed()&&this._disposer.destroy(),this._promiseSet.clear()}check(){if(this._cancelled)throw this._cancelError??new st("cancel from CancelManager!")}promise(e){return this._promiseSet.add(e),e.finally(()=>(this._promiseSet.delete(e),this.check()))}promiseAny(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ls(r)&&t.push(as(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.any(i).finally(()=>(t.forEach((r=>r(new st("cancel from promiseAny!")))),t.length=0))}promiseAll(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ls(r)&&t.push(as(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.all(i).finally(()=>(t.forEach((r=>r(new st("cancel from promiseAll!")))),t.length=0))}promiseRace(e){const t=[],i=e.map(r=>(this._promiseSet.add(r),ls(r)&&t.push(as(r)),r.finally(()=>this._promiseSet.delete(r))));return Promise.race(i).finally(()=>(t.forEach((r=>r(new st("cancel from promiseRace!")))),t.length=0))}}class fe extends b{constructor(e){super();a(this,"_status","Initial");a(this,"_completeEvent");a(this,"_errorEvent");a(this,"_completeFunc");a(this,"_errorFunc");a(this,"_cancelFunc");a(this,"_runningId",-1);this._startFunc=e,this.dispose(()=>this.isRunning&&this.cancel())}get errorEvent(){return this._errorEvent||(this._errorEvent=new v),this._errorEvent}get completeEvent(){return this._completeEvent||(this._completeEvent=new v),this._completeEvent}get errorFunc(){return this._errorFunc}get completeFunc(){return this._completeFunc}set errorFunc(e){this._errorFunc!==e&&(this._errorFunc=e)}set completeFunc(e){this._completeFunc!==e&&(this._completeFunc=e)}start(...e){if(this._status!=="Initial")return;const t=++this._runningId;this._status="Running",this._cancelFunc=this._startFunc({completeFunc:i=>{var r;t===this._runningId&&this._status==="Running"&&(this._status="Completed",this._completeFunc&&this._completeFunc(i),(r=this._completeEvent)==null||r.emit(i))},errorFunc:i=>{var r;t===this._runningId&&this._status==="Running"&&(this._status="Error",this._errorFunc&&this._errorFunc(i),(r=this._errorEvent)==null||r.emit(i))},runningingID:t},...e)}cancel(e=new st("")){var t;if(this._status==="Running"){if(!this._cancelFunc)throw new Error("!this._cancelFunc");this._status="Error",this._errorFunc&&this._errorFunc(e),(t=this._errorEvent)==null||t.emit(e),this._cancelFunc(e),this._cancelFunc=void 0}}reset(){this._status==="Running"&&console.error("processing cannot reset while running. you can first cancel it!"),(this._status==="Completed"||this._status==="Error")&&(this._status="Initial")}get status(){return this._status}get isInitial(){return this._status==="Initial"}get isRunning(){return this._status==="Running"}get isCompleted(){return this._status==="Completed"}get isError(){return this._status==="Error"}get runningId(){return this._runningId}restart(e=new st(""),...t){this.isRunning&&this.cancel(e),this.reset(),this.start(...t)}restartIfNotRunning(...e){this.isRunning||(this.reset(),this.start(...e))}}function cn(n){return(s,...e)=>{const t=new to,{completeFunc:i,errorFunc:r}=s,o=n(t,...e).then(i).catch(r).finally(()=>t.destroy());return Qt(o,t.cancel.bind(t)),l=>Qr(o,l)}}class gu extends fe{constructor(){super(({errorFunc:e},t,i)=>{try{const[r,o]=Nn(t,i);return this._doFunc=r,o}catch(r){return e(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class fu extends fe{constructor(e,t){super(({errorFunc:i})=>{try{const[r,o]=Nn(e,t);return this._doFunc=r,o}catch(r){return i(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}function mu(n){return new fe(cn((s,...e)=>s.promise(n(...e))))}function vu(n,...s){return new fe(cn(e=>e.promise(n(...s))))}function Gn(n){return mu((...s)=>{const e=n(...s);return ls(e)?e:hs(e)})}function io(n,...s){return vu(()=>{const e=n(...s);return ls(e)?e:hs(e)})}function _u(n){let s;const e=new Promise((t,i)=>{s=()=>{n(),i()}});return Qt(e,s),e}function yu(n,...s){const e=new to,t=n(e,...s).finally(()=>e.destroy());return Qt(t,e.cancel.bind(e)),t}function Le(n){return new fe(cn(n))}function wu(n,...s){return new fe(cn(e=>n(e,...s)))}function Hl(n,...s){const e=new AbortController;let t=e.signal,[i,r]=s;if(r!=null&&r.signal)throw console.error("init?.signal"),new Error("init?.signal");r=r||{},r.signal&&console.warn("revocableFetch error: init.signal would be override!"),r.signal=t;let o=!1;const l=()=>{o=!0,e.abort()};let h=fetch(i,r);return n&&(h=h.then(c=>{if(!c.ok)return c;if(!c.body)throw Error("ReadableStream not yet supported in this browser.");const u=c.headers.get("content-length");u||console.warn("response.headers.get('content-length') is undefined... cannot get contentLength!");const p=u?parseInt(u,10):0;let g=0;return new Response(new ReadableStream({start(m){if(!c.body)throw new Error("!response.body");const y=c.body.getReader();S();function S(){y.read().then(({done:C,value:T})=>{if(C){m.close();return}if(!T)throw new Error("!value");if(!n)throw new Error("!progressFunc");g+=T.byteLength,n(g,p),m.enqueue(T),S()}).catch(C=>{m.error(C)})}}}),{status:c.status,statusText:c.statusText,headers:c.headers})}).catch(c=>{throw o?(c instanceof Error&&c.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new st(`fetching cancelled! error: ${c}`)):(c instanceof Error&&c.code===20&&console.error("error.code === 20"),c)})),Qt(h,l),h}function Eu(n,...s){return Hl(n,...s)}function so(...n){return Hl(void 0,...n)}function bu(){return Gn(so)}function Su(...n){return io(so,...n)}function no(n,...s){let e=-1;var t=new Promise((i,r)=>{n.isRunning&&n.cancel(),n.reset();const o=new b;o.dispose(n.completeEvent.disposableOn(l=>{if(i(l),o.isDestroyed()){debugger;console.error(`disposer is destroyed! ${o}`);return}o.destroy()})),o.dispose(n.errorEvent.disposableOn(l=>{if(r(l),o.isDestroyed()){debugger;console.error(`disposer is destroyed! ${o}`);return}o.destroy()})),n.start(...s),e=n.runningId});return[i=>e===n.runningId&&n.isRunning&&n.cancel(i),t]}function yt(n,s,...e){try{return s(...e)}catch(t){n(t)}}function Cu(){return new fe(({completeFunc:n,errorFunc:s},e)=>rs(()=>yt(s,()=>{e&&e(),n()})))}function Pu(n){return new fe(({completeFunc:s,errorFunc:e})=>rs(()=>yt(e,()=>{n&&n(),s()})))}function Tu(){return new fe(({completeFunc:n,errorFunc:s},e)=>nn(()=>{yt(s,()=>{e&&e(),n()})}))}function Iu(n){return new fe(({completeFunc:s,errorFunc:e})=>nn(()=>{yt(e,()=>{n&&n(),s()})}))}function $l(){return new fe(({completeFunc:n,errorFunc:s},e,t)=>zr(()=>{yt(s,()=>{e&&e(),n()})},t??1e3))}function Gl(n,s){return new fe(({completeFunc:e,errorFunc:t})=>zr(()=>{yt(t,()=>{n&&n(),e()})},s??1e3))}function xu(){return new fe(({errorFunc:n},s,e=1e3)=>Vr(()=>yt(n,s),e))}function Ou(n,s=1e3){return new fe(({errorFunc:e})=>Vr(()=>yt(e,n),s))}function dn(){return new fe(({errorFunc:n},s)=>Ln(e=>yt(n,s,e)))}function cs(n){return new fe(({errorFunc:s})=>Ln(e=>yt(s,n,e)))}function un(n,...s){let e,t;const i=new Promise((o,l)=>{t=l,e=globalThis.setTimeout(()=>{e=void 0,o(s)},n)});return Qt(i,o=>{e&&(clearTimeout(e),e=void 0),t&&t(o??new st("sleep cancel error!"))}),i}function Du(){return Gn(un)}function Fu(n,...s){return io(un,n,...s)}function yi(n,s,...e){return n.promise(eo(no(Le(async(t,...i)=>(n.disposer.dispose(()=>{t.isDestroyed()||t.cancel()}),await s(t,...i))),...e)))}function ku(n,s,...e){return n.promise(eo(no(s,...e)))}class Mu extends fe{constructor(){super(({errorFunc:e},t,i)=>{try{const[r,o]=Gr(t,i);return this._doFunc=r,o}catch(r){return e(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class Au extends fe{constructor(e,t){super(({errorFunc:i})=>{try{const[r,o]=Gr(e,t);return this._doFunc=r,o}catch(r){return i(r),()=>{}}});a(this,"_doFunc")}do(...e){this._doFunc&&this._doFunc(...e)}}class Jn extends b{constructor(e=1e3,t=Un){super();a(this,"_speed");a(this,"_speedChangedEvent");a(this,"_duration");a(this,"_durationChangedEvent");a(this,"_loop");a(this,"startUpdateFunc");a(this,"_updateBindThis");a(this,"_cancelStartUpdateFunc");a(this,"_startTimeStamp");a(this,"_playingChangedEvent");a(this,"_startPlayingEvent");a(this,"_stopPlayingEvent");a(this,"_loopChangedEvent");a(this,"_currentTime",this.disposeVar(w(0)));this._speed=1,this._duration=e,this._loop=!1,this.startUpdateFunc=t,this._updateBindThis=this._update.bind(this),this.dispose(()=>{this._cancelStartUpdateFunc&&(this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0)}),this._startTimeStamp=Number.NaN,this.dispose(()=>{this._startPlayingEvent&&this._startPlayingEvent.reset(),this._stopPlayingEvent&&this._stopPlayingEvent.reset()})}get startPlayingEvent(){return this._startPlayingEvent=this._startPlayingEvent||new v,this._startPlayingEvent}get stopPlayingEvent(){return this._stopPlayingEvent=this._stopPlayingEvent||new v,this._stopPlayingEvent}get currentTimeChangedEvent(){return this._currentTime.changed}get loopChangedEvent(){return this._loopChangedEvent=this._loopChangedEvent||new v,this._loopChangedEvent}set loop(e){this._loop!==e&&(this._loop=e,this._loopChangedEvent&&this._loopChangedEvent.emit(this._loop))}get loop(){return this._loop}_update(e){if(Number.isNaN(this._startTimeStamp))console.warn("Number.isNaN(this._startTimeStamp)");else{const t=(e-this._startTimeStamp)*this._speed;this._setCurrentTimeInner(t)}}get currentTime(){return this._currentTime.value}set currentTime(e){this._setCurrentTimeInner(e),this._resetStartTime()}_setCurrentTimeInner(e){this._currentTime.value!==e&&(this._duration<=0?this._currentTime.value=0:e<0?this.loop?this._currentTime.value=this._duration+e%this._duration:(this._currentTime.value=0,this.playing&&this._stopPlaying()):e>this._duration?this.loop?this._currentTime.value=e%this._duration:(this._currentTime.value=this._duration,this.playing&&this._stopPlaying()):this._currentTime.value=e)}get durationChangedEvent(){return this._durationChangedEvent||(this._durationChangedEvent=new v),this._durationChangedEvent}get duration(){return this._duration}set duration(e){var t;if(e<0)console.warn("duration sholud greater than 0!");else if(this._duration!==e){const i=this._duration;this._duration=e,this._currentTime.value>this._duration&&(this._currentTime.value=this._duration),(t=this._durationChangedEvent)==null||t.emit(this._duration,i)}}get speedChangedEvent(){return this._speedChangedEvent||(this._speedChangedEvent=new v),this._speedChangedEvent}get speed(){return this._speed}set speed(e){var t;if(this._speed!==e&&e!==0){const i=this._speed;this._speed=e,this._resetStartTime(),(t=this._speedChangedEvent)==null||t.emit(this._speed,i)}}_resetStartTime(){this._startTimeStamp=performance.now()-this._currentTime.value/this._speed}_startPlaying(){var e,t;this._resetStartTime(),this._cancelStartUpdateFunc=this.startUpdateFunc(this._updateBindThis),(e=this._startPlayingEvent)==null||e.emit(this._currentTime.value),(t=this._playingChangedEvent)==null||t.emit(!0)}_stopPlaying(){var e,t;if(!this._cancelStartUpdateFunc)throw new Error("this._cancelStartUpdateFunc is undefined!");this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0,(e=this._stopPlayingEvent)==null||e.emit(this._currentTime.value),(t=this._playingChangedEvent)==null||t.emit(!1)}get playingChangedEvent(){return this._playingChangedEvent||(this._playingChangedEvent=new v),this._playingChangedEvent}get playing(){return!!this._cancelStartUpdateFunc}set playing(e){!!this._cancelStartUpdateFunc!==e&&(e?this._startPlaying():this._stopPlaying())}}class pn extends b{constructor(e){super();a(this,"_stop",this.disposeVar(w(0)));a(this,"_current",this.disposeVar(w(0)));a(this,"_start",this.disposeVar(w(0)));a(this,"_player",this.disposeVar(new Jn(200)));this.dispose(this._player.currentTimeChangedEvent.disposableOn(t=>{let i=t/this._player.duration;i=i>1?1:i<0?0:i;const r=this._start.value,o=this._stop.value;this._current.value=r+(o-r)*i})),this.duration=e}get current(){return this._current.value}get currentChanged(){return this._current.changed}get source(){return this._start.value}get sourceChanged(){return this._start.changed}get target(){return this._stop.value}get targetChanged(){return this._stop.changed}get duration(){return this._player.duration}set duration(e){this._player.duration=e}set target(e){this._start.value=this._current.value,this._stop.value=e,this._player.currentTime=0,this._player.playing=!0}reset(e){this._start.value=e,this._current.value=e,this._stop.value=e,this._player.playing=!1}}let Jl=-1;class se extends v{constructor(s,e,t,i){super(),this._domElement=s,this._type=e,this.callback=i;const r=o=>(o.__xbsj_listenerNo__=++Jl,o.__xbsj_listenerTime__=Date.now(),o.__xbsj_lastCurrentTarget__=o.currentTarget,this.emit(o),this.callback&&this.callback(o));this._domElement.addEventListener(this._type,r,t),this.dispose(()=>this._domElement.removeEventListener(this._type,r,t))}static getLastLisenNo(){return Jl}static getCurrentTarget(s){return s.__xbsj_lastCurrentTarget__}static getListenerNo(s){return s.__xbsj_listenerNo__}static getListenerTime(s){return s.__xbsj_listenerTime__}static on(s,e){const t=se.getLastLisenNo();return s.disposableOn(i=>{const r=se.getListenerNo(i);(r===void 0||r>t)&&e(i)})}get element(){return this._domElement}static create(s,e,t){return new se(s,e,t)}}class ro extends b{constructor(){super();a(this,"_clickEvent",this.disposeVar(new v));a(this,"_dbclickEvent",this.disposeVar(new v));a(this,"_pointerdownEvent",this.disposeVar(new v));a(this,"_pointerupEvent",this.disposeVar(new v));a(this,"_pointermoveEvent",this.disposeVar(new v));a(this,"_pointeroutEvent",this.disposeVar(new v));a(this,"dbClickDelayTime",300);a(this,"nativeClickDelayTime",500);a(this,"clickMovementTolerantPixelSize",3);a(this,"debugging",!1);a(this,"_enabled",this.disposeVar(w(!0)));const e=this.disposeVar(Le(async i=>{do{const r=await yi(i,h=>new Promise((c,u)=>{h.disposer.dispose(u),h.disposer.dispose(se.on(this._pointerdownEvent,c))})),o=we(r);if(this.debugging&&console.log(`鼠标按下 ${o.toString()}`),!await yi(i,h=>new Promise((c,u)=>{h.disposer.dispose(u);const p=setTimeout(()=>c(!0),this.nativeClickDelayTime);h.disposer.dispose(()=>clearTimeout(p)),h.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[m,y]=we(g),[S,C]=o;(Math.abs(m-S)>3||Math.abs(y-C)>3)&&c(!1)})),h.disposer.dispose(se.on(this._pointeroutEvent,()=>c(!1))),h.disposer.dispose(se.on(this._pointerupEvent,()=>c(!0)))}))){this.debugging&&console.log("取消1");continue}const l=await yi(i,h=>new Promise((c,u)=>{h.disposer.dispose(u);const p=setTimeout(()=>c("timeout"),this.dbClickDelayTime);h.disposer.dispose(()=>clearTimeout(p)),h.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[m,y]=we(g),[S,C]=o;(Math.abs(m-S)>3||Math.abs(y-C)>3)&&c("moved")})),h.disposer.dispose(se.on(this._pointerdownEvent,c)),h.disposer.dispose(se.on(this._pointeroutEvent,()=>c("pointouted"))),h.disposer.dispose(se.on(this._pointerupEvent,()=>c("pointuped")))}));if(typeof l=="string"){this.debugging&&console.log(`触发单击事件!取消双击监听!error: ${l}`),this._clickEvent.emit(r);continue}if(!await yi(i,h=>new Promise((c,u)=>{h.disposer.dispose(u);const p=setTimeout(()=>c(!1),this.nativeClickDelayTime);h.disposer.dispose(()=>clearTimeout(p)),h.disposer.dispose(se.on(this._pointermoveEvent,g=>{const[m,y]=we(g),[S,C]=o;(Math.abs(m-S)>3||Math.abs(y-C)>3)&&c(!1)})),h.disposer.dispose(se.on(this._pointeroutEvent,()=>c(!1))),h.disposer.dispose(se.on(this._pointerupEvent,()=>c(!0)))}))){this.debugging&&console.log("取消2");continue}this.debugging&&console.log("触发双击事件!"),this._dbclickEvent.emit(l)}while(!0)})),t=i=>{i?e.restart():e.isRunning&&e.cancel()};t(this.enabled),this.dispose(this.enabledChanged.disposableOn(t))}get clickEvent(){return this._clickEvent}get dbclickEvent(){return this._dbclickEvent}pointerDown(e){this._pointerdownEvent.emit(e)}pointerUp(e){this._pointerupEvent.emit(e)}pointerMove(e){this._pointermoveEvent.emit(e)}pointerOut(e){this._pointeroutEvent.emit(e)}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}}class ju extends b{constructor(e,t){super();a(this,"_pointerClick",this.disposeVar(new ro));this._div=e;const{div:i,pointerClick:r}=this,o=u=>r.pointerDown(u),l=u=>r.pointerMove(u),h=u=>r.pointerOut(u),c=u=>r.pointerUp(u);i.addEventListener("pointerdown",o,t),i.addEventListener("pointermove",l,t),i.addEventListener("pointerout",h,t),i.addEventListener("pointerup",c,t),this.dispose(()=>{i.removeEventListener("pointerdown",o,t),i.removeEventListener("pointermove",l,t),i.removeEventListener("pointerout",h,t),i.removeEventListener("pointerup",c,t)})}get div(){return this._div}get pointerClick(){return this._pointerClick}get clickEvent(){return this.pointerClick.clickEvent}get dbclickEvent(){return this.pointerClick.dbclickEvent}}class ql extends b{constructor(){super();a(this,"_hoverEvent",this.disposeVar(new v));a(this,"_hoverOutEvent",this.disposeVar(new v));a(this,"_pointerdownEvent",this.disposeVar(new v));a(this,"_pointerupEvent",this.disposeVar(new v));a(this,"_pointermoveEvent",this.disposeVar(new v));a(this,"_pointeroutEvent",this.disposeVar(new v));a(this,"delayTime",800);const e=this.disposeVar($l()),t=c=>{this._hoverOutEvent.emit()},i=c=>{this._hoverOutEvent.emit()};let r;const o=()=>{if(!r){console.warn("!lastPointerEvent");return}this._hoverEvent.emit(r)},l=c=>{r=c,e.restart(void 0,o,this.delayTime),this._hoverOutEvent.emit()},h=c=>{e.cancel(),this._hoverOutEvent.emit()};this.dispose(this._pointerdownEvent.disposableOn(t)),this.dispose(this._pointerupEvent.disposableOn(i)),this.dispose(this._pointermoveEvent.disposableOn(l)),this.dispose(this._pointeroutEvent.disposableOn(h))}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}pointerDown(e){this._pointerdownEvent.emit(e)}pointerUp(e){this._pointerupEvent.emit(e)}pointerMove(e){this._pointermoveEvent.emit(e)}pointerOut(e){this._pointeroutEvent.emit(e)}}class Ru extends b{constructor(e,t=1500){super();a(this,"_hoverEvent",new v);a(this,"_hoverOutEvent",new v);const i=new Xr(t);this.dispose(()=>i.destroy());let r=0,o=0,l;i.progressFunc=()=>this._hoverEvent.emit(r,o,l);const h=g=>{!i.isRunning&&i.restart(),l=g,[r,o]=we(g),i.debounce(),this._hoverOutEvent.emit()},c=g=>{!i.isRunning&&i.restart(),l=g,[r,o]=we(l),i.debounce(),this._hoverOutEvent.emit()},u=g=>{!i.isRunning&&i.restart(),l=g,[r,o]=we(l),i.debounce(),this._hoverOutEvent.emit()},p=g=>{i.isRunning&&i.cancel(),this._hoverOutEvent.emit()};e.addEventListener("pointerdown",h),e.addEventListener("pointerup",c),e.addEventListener("pointermove",u),e.addEventListener("pointerout",p),this.dispose(()=>{e.removeEventListener("pointerdown",h),e.removeEventListener("pointerup",c),e.removeEventListener("pointermove",u),e.removeEventListener("pointerout",p)})}get hoverEvent(){return this._hoverEvent}get hoverOutEvent(){return this._hoverOutEvent}}class Xl extends b{constructor(e,t={}){super();a(this,"_needRedrawEvent");a(this,"_needPickRedrawEvent");a(this,"_id",ns());a(this,"_clickEvent");a(this,"_clickOutEvent");a(this,"_dbclickEvent");a(this,"_dbclickOutEvent");a(this,"_actived",!1);a(this,"_activedChanged");a(this,"_hovered",!1);a(this,"_hoveredChanged");a(this,"_selected",!1);a(this,"_selectedChanged");a(this,"_opacity",1);a(this,"_opacityChanged");a(this,"_show",!0);a(this,"_showChanged");this._canvasPrimitivesContext=e;const{needRedraw:i=!0,needPickRedraw:r=!0}=t;i&&(this._needRedrawEvent=new v),r&&(this._needPickRedrawEvent=new v),this._canvasPrimitivesContext.addPoi(this),this.dispose(()=>this._canvasPrimitivesContext.removePoi(this)),this.dispose(this.showChanged.disposableOn(()=>{this.needRedraw(),this.needPickRedraw()})),this.dispose(this.opacityChanged.disposableOn(()=>this.needRedraw()))}get id(){return this._id}set id(e){this._id=e}get context(){return this._canvasPrimitivesContext}needRedraw(){this._needRedrawEvent?this._needRedrawEvent.emit():console.warn("no needRedrawEvent!")}needPickRedraw(){this._needPickRedrawEvent?this._needPickRedrawEvent.emit():console.warn("no needPickRedrawEvent!")}hasClickEvent(){return!!this._clickEvent}get clickEvent(){return this._clickEvent=this._clickEvent||new v,this._clickEvent}hasClickOutEvent(){return!!this._clickOutEvent}get clickOutEvent(){return this._clickOutEvent=this._clickOutEvent||new v,this._clickOutEvent}hasDbclickEvent(){return!!this._dbclickEvent}get dbclickEvent(){return this._dbclickEvent=this._dbclickEvent||new v,this._dbclickEvent}hasDbclickOutEvent(){return!!this._dbclickOutEvent}get dbclickOutEvent(){return this._dbclickOutEvent=this._dbclickOutEvent||new v,this._dbclickOutEvent}set actived(e){this._actived!==e&&(this._actived=e,this._activedChanged&&this._activedChanged.emit(e,this))}get actived(){return this._actived}get activedChanged(){return this._activedChanged=this._activedChanged||new v,this._activedChanged}set hovered(e){this._hovered!==e&&(this._hovered=e,this._hoveredChanged&&this._hoveredChanged.emit(e,this))}get hovered(){return this._hovered}get hoveredChanged(){return this._hoveredChanged=this._hoveredChanged||new v,this._hoveredChanged}set selected(e){this._selected!==e&&(this._selected=e,this._selectedChanged&&this._selectedChanged.emit(e,this))}get selected(){return this._selected}get selectedChanged(){return this._selectedChanged=this._selectedChanged||new v,this._selectedChanged}set opacity(e){this._opacity!==e&&(this._opacity=e,this._opacityChanged&&this._opacityChanged.emit(e,this))}get opacity(){return this._opacity}get opacityChanged(){return this._opacityChanged=this._opacityChanged||new v,this._opacityChanged}set show(e){this._show!==e&&(this._show=e,this._showChanged&&this._showChanged.emit(e,this))}get show(){return this._show}get showChanged(){return this._showChanged=this._showChanged||new v,this._showChanged}}class oo extends Xl{constructor(e,t=[0,0],i=0){super(e);a(this,"_winPosAndDepthChanged");this._winPos=t,this._depth=i,this.dispose(this.winPosAndDepthChanged.disposableOn(()=>{this.needRedraw(),this.needPickRedraw()}))}set winPos(e){(this._winPos[0]!==e[0]||this._winPos[1]!==e[1])&&(this._winPos[0]=e[0],this._winPos[1]=e[1],this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))}get winPos(){return this._winPos}set depth(e){this._depth!==e&&(this._depth=e,this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))}get depth(){return this._depth}get winPosAndDepthChanged(){return this._winPosAndDepthChanged||(this._winPosAndDepthChanged=new v),this._winPosAndDepthChanged}}function wi(n,s,e,t){const[i,r]=n,[o,l,h,c]=t,u=s[0]*e[0],p=s[1]*e[1],g=i-(u*o+h),m=r-(p*l+c);return{left:g,top:m,right:g+u,bottom:m+p}}function Ei(n,s,e,t,i){n.beginPath(),n.moveTo(s,e),n.lineTo(s-t*.5,e-t*.5),n.arc(s,e-t,t*.7071067811865475,Math.PI*.75,Math.PI*.25),n.lineTo(s,e),n.fillStyle=i,n.fill()}function Nu(n,s,e,t,i,r){if(n.beginPath(),n.moveTo(s+t,e),n.arc(s,e,t,0,2*Math.PI),r){const o=n.createRadialGradient(s,e,0,s,e,t);o.addColorStop(0,i),o.addColorStop(1,i.replace(/[\d\.]+\)$/,"0)")),n.fillStyle=o}else n.fillStyle=i;n.fill()}function Yl(n,s,e,t,i,r){n.beginPath(),n.moveTo(s+r,e),n.lineTo(s+t-r,e),n.arcTo(s+t,e,s+t,e+r,r),n.lineTo(s+t,e+i-r),n.arcTo(s+t,e+i,s+t-r,e+i,r),n.lineTo(s+r,e+i),n.arcTo(s,e+i,s,e+i-r,r),n.lineTo(s,e+r),n.arcTo(s,e,s+r,e,r)}function Kl(n,s,e,t,i,r){n.font=i;const o=n.measureText(t),l=o.actualBoundingBoxLeft+o.actualBoundingBoxRight,h=Number.isFinite(o.fontBoundingBoxAscent)?o.fontBoundingBoxAscent:o.actualBoundingBoxAscent,c=Number.isFinite(o.fontBoundingBoxDescent)?o.fontBoundingBoxDescent:o.actualBoundingBoxDescent;let u=h+c;n.fillStyle=r,n.fillText(t,s-l*.5,e+u*.5-c)}function Zl(n){const{width:s,height:e}=n,t=s instanceof SVGAnimatedLength?s.baseVal.SVG_LENGTHTYPE_PX:s,i=e instanceof SVGAnimatedLength?e.baseVal.SVG_LENGTHTYPE_PX:e,r=document.createElement("canvas");r.width=t,r.height=i;const o=r.getContext("2d");if(!o)throw new Error("!cavnasCtx");return o.drawImage(n,0,0,t,i),r}function Ql(n,s){const{width:e,height:t}=n,i=n.getContext("2d");if(!i)throw new Error("!cavnasCtx");const[r,o,l]=s.map(p=>p*255|0),h=i.getImageData(0,0,e,t),c=h.data;for(var u=0;u<c.length;u+=4)c[u]=r,c[u+1]=o,c[u+2]=l;i.putImageData(h,0,0)}function ao(n,s,e,t=[.5,1,0,0],i,r="12px Arial",o=2,l="#FFF",h="#000A"){n.font=r;const c=n.measureText(i),u=c.actualBoundingBoxLeft+c.actualBoundingBoxRight,p=c.fontBoundingBoxAscent+c.fontBoundingBoxDescent,g=s,m=e,y=u+o*2,S=p+o*2,{left:C,top:T,bottom:V}=wi([g,m],[y,S],[1,1],t);n.fillStyle=h,Yl(n,C,T,y,S,o),n.fill(),n.fillStyle=l,n.fillText(i,C+o,V-o-c.fontBoundingBoxDescent)}function gn(n){return("00"+n.toString(16).toUpperCase()).substr(-2)}function fn(n){const[s,e,t,i]=n.map(r=>r*255|0);return`#${gn(s)}${gn(e)}${gn(t)}${gn(i)}`}function lo(n,s){const[e,t,i]=s,r=`${e}-${t}-${i}`;let o=Ne(n,r);return o||(o=Zl(n),Ql(o,s),vt(n,r,o)),o}class Lu extends oo{constructor(e,t,i=[32,32],r=[.5,1,0,0],o="#F00F"){super(e);a(this,"_tooltip","");a(this,"_title","");a(this,"__scale",[1,1]);a(this,"_tooltipAlpha",0);a(this,"_bgColor",[.3,.3,.3,.8]);a(this,"_bgColorHexStr",fn(this._bgColor));a(this,"_fgColor",[1,1,1,1]);a(this,"_fgColorHexStr",fn(this._fgColor));this._image=t,this._size=i,this._originRatioAndOffset=r,this._defaultColorStr=o;const l=new pn(100),h=new pn(100);this.dispose(()=>{l.destroy(),h.destroy()});const c=()=>{if(this._clickEvent&&!this._clickEvent.empty){const u=(1+.08*h.current)*(1+.08*l.current);this._scale=[u,u],this._tooltipAlpha=l.current}};this.dispose(this.activedChanged.disposableOn(u=>{h.target=u?1:0,this.needRedraw()})),this.dispose(this.hoveredChanged.disposableOn(u=>{l.target=u?1:0,this.needRedraw()})),this.dispose(this.selectedChanged.disposableOn(()=>{this.needRedraw()})),this.dispose(h.currentChanged.disposableOn(c)),this.dispose(l.currentChanged.disposableOn(c))}set size(e){const[t,i]=e,[r,o]=this._size;(r!==t||o!==i)&&(this._size[0]=t,this._size[1]=i,this.needRedraw(),this.needPickRedraw())}get size(){return this._size}set _scale(e){const[t,i]=e,[r,o]=this.__scale;(r!==t||o!==i)&&(this.__scale[0]=t,this.__scale[1]=i,this.needRedraw(),this.needPickRedraw())}get _scale(){return this.__scale}set fgColor(e){if(!this._fgColor.every((t,i)=>e[i]===t)){const[t,i,r,o]=e;this._fgColor.splice(0,4,t,i,r,o),this._fgColorHexStr=fn(this._fgColor),this.needRedraw()}}get fgColor(){return this._fgColor}set bgColor(e){if(!this._bgColor.every((t,i)=>e[i]===t)){const[t,i,r,o]=e;this._bgColor.splice(0,4,t,i,r,o),this._bgColorHexStr=fn(this._bgColor),this.needRedraw()}}get bgColor(){return this._bgColor}set originRatioAndOffset(e){const[t,i,r,o]=this._originRatioAndOffset,[l,h,c,u]=e;(t!==l||i!==h||r!==c||o!==u)&&(this._originRatioAndOffset.splice(0,4,l,h,c,u),this.needRedraw(),this.needPickRedraw())}get originRatioAndOffset(){return this._originRatioAndOffset}set image(e){this._image!==e&&(this._image=e,this.needRedraw())}get image(){return this._image}set defaultColorStr(e){this._defaultColorStr!==e&&(this._defaultColorStr=e,this.needRedraw())}get defaultColorStr(){return this._defaultColorStr}set tooltip(e){this._tooltip!==e&&(this._tooltip=e,this.needRedraw())}get tooltip(){return this._tooltip}set title(e){this._title!==e&&(this._title=e,this.needRedraw())}get title(){return this._title}draw(e){if(!this._show)return;const[t,i]=this._winPos,r=this._size[0]*this.__scale[0],o=this._size[1]*this.__scale[1],{left:l,top:h}=wi([t,i],this._size,this.__scale,this._originRatioAndOffset),c=e.globalAlpha;if(e.globalAlpha=this.opacity,this._image){if(this.selected){const u=lo(this._image,[1,0,0]),{left:p,top:g}=wi([t,i+3],[r+6,o+6],[1,1],this._originRatioAndOffset);e.drawImage(u,p,g,r+6,o+6)}if(this.actived){const[u,p,g,m]=this._fgColor,y=lo(this._image,[u,p,g]),{left:S,top:C}=wi([t,i+4],[r+8,o+8],[1,1],this._originRatioAndOffset);e.drawImage(y,S,C,r+8,o+8)}if(this.hovered){const[u,p,g,m]=this._bgColor,y=lo(this._image,[u,p,g]),{left:S,top:C}=wi([t,i+2],[r+4,o+4],[1,1],this._originRatioAndOffset);e.drawImage(y,S,C,r+4,o+4)}e.drawImage(this._image,l,h,r,o)}else e.fillStyle=this._fgColorHexStr,e.fillRect(l,h,r,o);if(this._title!==""&&ao(e,t+20,i-16,[0,.5,0,0],this._title,"14px Arial",4,this._fgColorHexStr,this._bgColorHexStr),e.globalAlpha=c,this._hovered&&this._tooltip!==""){const u=e.globalAlpha;e.globalAlpha=this._tooltipAlpha,ao(e,t,i-42,[.5,1,0,0],this._tooltip,"12px Arial",4,this._fgColorHexStr,this._bgColorHexStr),e.globalAlpha=u}}drawForPick(e,t){if(!this._show)return;const[i,r]=this._winPos,o=t("default"),l=this._size[0]*this.__scale[0],h=this._size[1]*this.__scale[1],{left:c,top:u}=wi([i,r],this._size,this.__scale,this._originRatioAndOffset);e.fillStyle=o,e.fillRect(c,u,l,h)}}class Vu extends oo{constructor(e){super(e);a(this,"_width",16);a(this,"_text","");a(this,"_fillStyle","#0F0");a(this,"_scale",1);a(this,"_scaleChanged");this.dispose(this.scaleChanged.disposableOn(o=>{this.needRedraw(),this.needPickRedraw()}));const t=this.disposeVar(new pn(100)),i=this.disposeVar(new pn(100)),r=()=>{this._clickEvent&&!this._clickEvent.empty&&(this.scale=(1+.1*i.current)*(1+.2*t.current))};this.dispose(i.currentChanged.disposableOn(r)),this.dispose(t.currentChanged.disposableOn(r)),this.dispose(this.activedChanged.disposableOn(o=>{i.target=o?1:0,this.needRedraw()})),this.dispose(this.hoveredChanged.disposableOn(o=>{t.target=o?1:0,this.needRedraw()})),this.dispose(this.selectedChanged.disposableOn(o=>{this.needRedraw()}))}set scale(e){this._scale!==e&&(this._scale=e,this._scaleChanged&&this._scaleChanged.emit(e,this))}get scale(){return this._scale}get scaleChanged(){return this._scaleChanged||(this._scaleChanged=new v),this._scaleChanged}set width(e){this._width!==e&&(this._width=e,this.needRedraw(),this.needPickRedraw())}get width(){return this._width}set text(e){this._text!==e&&(this._text=e,this.needRedraw())}get text(){return this._text}set fillStyle(e){this._fillStyle!==e&&(this._fillStyle=e,this.needRedraw())}get fillStyle(){return this._fillStyle}draw(e){if(!this._show)return;const[t,i]=this._winPos,r=e.globalAlpha;e.globalAlpha=this.opacity;const o=this._width*this._scale;this.selected&&Ei(e,t,i+3,o+3,"#F00"),this.actived&&this._clickEvent&&!this._clickEvent.empty&&Ei(e,t,i+5,o+5,"#FFF"),this.hovered?Ei(e,t,i+3,o+3,"#000A"):Ei(e,t,i+1,o+1,"#000A"),Ei(e,t,i,o,this._fillStyle);const l=this._scale>1.2?"bold 14px Arial":"bold 10px Arial";Kl(e,t,i-o,this._text,l,"#000"),e.globalAlpha=r}drawForPick(e,t){if(!this._show)return;const[i,r]=this._winPos,o=this._width*this._scale,l=t("default");Ei(e,i,r,o,l)}}const eh=new ArrayBuffer(4),th=new Uint32Array(eh),bi=new Uint8Array(eh);function ih(n){if(n>=16777215)throw new Error("uint32 > 0xFFFFFF");return th[0]=n,[bi[0],bi[1],bi[2]]}function sh(n,s,e){return bi[0]=n,bi[1]=s,bi[2]=e,bi[3]=0,th[0]}class nh extends b{constructor(){super(...arguments);a(this,"_pickColors",new Array(16777215));a(this,"_pickColorIndex",0)}reset(){for(let e=0;e<this._pickColorIndex;++e){const t=this._pickColors[e];if(!t)throw console.error("this._pickColors[i] should not be undefined!"),new Error("this._pickColors[i] should not be undefined!");t.poi=null,t.tag=""}this._pickColorIndex=0}createPickColor(e,t){const i=this._pickColorIndex;++this._pickColorIndex;const r=this._pickColors[i];r?(r.poi=e,r.tag=t):this._pickColors[i]={poi:e,tag:t};const[o,l,h]=ih(i);return[o,l,h]}getPickInfoFromColor(e,t,i){const r=sh(e,t,i);if(r>=this._pickColorIndex){console.error("index >= this._pickColorIndex");return}const o=this._pickColors[r];if(!o){console.error("!this._pickColors[index]");return}return o}destroyImp(){this.reset()}}const rh=(n,s)=>s.depth-n.depth;class zu extends b{constructor(){super();a(this,"_pois",[]);a(this,"_canvasElement");a(this,"_ctx");a(this,"_offscreenCanvasElement");a(this,"_offscreenCanvasElement2");a(this,"_offscreenCtx");a(this,"_offscreenCtx2");a(this,"_size",[0,0]);a(this,"_needRedraw",!1);a(this,"_needPickRedraw",!1);a(this,"_pickColorManager",new nh);const e=document.createElement("canvas");e.style.width="100%",e.style.height="100%",this._canvasElement=e;const t=e.getContext("2d");if(t===null)throw new Error("cannot get context 2d!");this._ctx=t,this._offscreenCanvasElement=document.createElement("canvas"),this._offscreenCtx=this._offscreenCanvasElement.getContext("2d"),this._offscreenCtx.imageSmoothingEnabled=!1,this._offscreenCanvasElement2=document.createElement("canvas"),this._offscreenCtx2=this._offscreenCanvasElement2.getContext("2d"),this._offscreenCtx2.imageSmoothingEnabled=!1,this.disposeVar(cs(()=>{const[r,o]=this._size,{clientWidth:l,clientHeight:h}=this._canvasElement;(r!==l||o!==h)&&(this._size[0]=l,this._size[1]=h,this._canvasElement.width=l,this._canvasElement.height=h,this._offscreenCanvasElement.width=l,this._offscreenCanvasElement.height=h,this._offscreenCanvasElement2.width=l,this._offscreenCanvasElement2.height=h,this._dirty()),this._needRedraw&&(this._needRedraw=!1,this._draw())})).start()}get element(){return this._canvasElement}get pois(){return this._pois}_dirty(){this._needRedraw=!0,this._needPickRedraw=!0}get size(){return this._size}addPoi(e){if(typeof Ne(e,"listenHandler")<"u"){console.error("可能有poi重复加载poiManager中!");return}if(this._pois.indexOf(e)!==-1){console.error("同一个poi加了多次!");return}this._pois.push(e),this._dirty();const t=e._needRedrawEvent;if(t){const r=t.on(()=>{this._needRedraw=!0});vt(e,"needRedrawEventHandler",r)}const i=e._needPickRedrawEvent;if(i){const r=i.on(()=>{this._needPickRedraw=!0});vt(e,"needPickRedrawEventHandler",r)}}removePoi(e){const t=this._pois.indexOf(e);if(t===-1){console.error("删除一个不存在的poi!");return}this._pois.splice(t,1),this._dirty();const i=e._needRedrawEvent;if(i){const o=Ne(e,"needRedrawEventHandler");o?i.off(o):console.error("poi没有listenHandler!")}const r=e._needPickRedrawEvent;if(r){const o=Ne(e,"needPickRedrawEventHandler");o?r.off(o):console.error("poi没有listenHandler!")}}_draw(){this._pois.sort(rh);const[e,t]=this._size;this._ctx.clearRect(0,0,e,t),this._pois.forEach(i=>i.draw(this._ctx))}pick(e,t,i,r){return this._needPickRedraw&&(this._needPickRedraw=!1,this._pickDraw()),this._getPickInfo(e,t,i,r)}_pickDraw(){this._pickColorManager.reset(),this._pois.sort(rh);const[e,t]=this._size;this._offscreenCtx.clearRect(0,0,e,t),this._pois.forEach(i=>{const r=o=>{const[l,h,c]=this._pickColorManager.createPickColor(i,o);return`rgb(${l}, ${h}, ${c})`};i.drawForPick(this._offscreenCtx,r)})}_getPickInfo(e,t,i,r){const o=this._offscreenCtx.getImageData(e,t,i,r),l=[],h=o.data.length/4;for(let c=0;c<h;++c){const u=o.data[c*4+0],p=o.data[c*4+1],g=o.data[c*4+2];if(o.data[c*4+3]===255){const y=this._pickColorManager.getPickInfoFromColor(u,p,g);if(y&&y.poi&&!l.includes(y)){let S=!0;{const[C,T]=this._size;this._offscreenCtx2.clearRect(0,0,C,T);const V=Q=>"rgb(255, 255, 255)";y.poi.drawForPick(this._offscreenCtx2,V);const z=this._offscreenCtx2.getImageData(e,t,i,r),x=z.data[c*4+0],$=z.data[c*4+1],Y=z.data[c*4+2];z.data[c*4+3],x===255&&$===255&&Y===255||(S=!1)}S&&l.push(y)}}}return l}}class ho extends b{constructor(){super(...arguments);a(this,"_closeEvent");a(this,"_show",!0);a(this,"_showChanged");a(this,"_opacity",1);a(this,"_opacityChanged");a(this,"_winPos",[0,0]);a(this,"_winPosChanged")}set winPos(e){const[t,i]=e,[r,o]=this._winPos;(t!==r||i!==o)&&(this._winPos[0]=t,this._winPos[1]=i,this._winPosChanged&&this._winPosChanged.emit(this._winPos))}get winPos(){return this._winPos}get winPosChanged(){return this._winPosChanged=this._winPosChanged||new v,this._winPosChanged}set opacity(e){this._opacity!==e&&(this._opacity=e,this._opacityChanged&&this._opacityChanged.emit(this._opacity))}get opacity(){return this._opacity}get opacityChanged(){return this._opacityChanged=this._opacityChanged||new v,this._opacityChanged}set show(e){this._show!==e&&(this._show=e,this._showChanged&&this._showChanged.emit(this._show))}get show(){return this._show}get showChanged(){return this._showChanged=this._showChanged||new v,this._showChanged}get closeEvent(){return this._closeEvent||(this._closeEvent=new v),this._closeEvent}}const co=new WeakMap;function uo(n){if(!co.has(n)){const s=new An(()=>new n,e=>e.reset());co.set(n,s)}return co.get(n)}class po extends ho{constructor(){super();a(this,"_div");a(this,"_contentDiv");a(this,"_originOffsetX",0);a(this,"_originOffsetY",0);a(this,"_originRatioX",.5);a(this,"_originRatioY",1);a(this,"_divChanged",new v);const e=document.createElement("div");e.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible;";const t=document.createElement("div");t.style.cssText=`position: absolute; left: ${-this._originOffsetX}px; top: ${-this._originOffsetY}px; transform: translateX(-${100*this._originRatioX}%) translateY(-${100*this._originRatioY}%); margin: 0; padding: 0; pointer-events: none;`;const i=document.createElement("div");this._contentDiv=i,t.appendChild(i),e.appendChild(t),this._div=e,this.dispose(this._divChanged.disposableOn(()=>{t.style.left=`${-this._originOffsetX}px`,t.style.top=`${-this._originOffsetY}px`,t.style.transform=`translateX(-${100*this._originRatioX}%) translateY(-${100*this._originRatioY}%)`})),this.dispose(this.winPosChanged.disposableOn(([r,o])=>{this._div.style.left=`${r}px`,this._div.style.top=`${o}px`})),this.dispose(this.opacityChanged.disposableOn(r=>{this._div.style.opacity=`${r}`})),this.dispose(this.showChanged.disposableOn(r=>{this._div.style.visibility=r?"visible":"hidden"}))}get contentDiv(){return this._contentDiv}reset(){}get originOffsetX(){return this._originOffsetX}set originOffsetX(e){this._originOffsetX!==e&&(this._originOffsetX=e,this._divChanged.emit())}get originOffsetY(){return this._originOffsetY}set originOffsetY(e){this._originOffsetY!==e&&(this._originOffsetY=e,this._divChanged.emit())}get originRatioX(){return this._originRatioX}set originRatioX(e){this._originRatioX!==e&&(this._originRatioX=e,this._divChanged.emit())}get originRatioY(){return this._originRatioY}set originRatioY(e){this._originRatioY!==e&&(this._originRatioY=e,this._divChanged.emit())}get element(){return this._div}}class oh extends b{constructor(e,t){super();a(this,"_floatDiv");a(this,"_show",!1);a(this,"_showChanged");this._customDivClass=e,this._divContainer=t,this.dispose(()=>{this.show=!1})}_updateDivPoi(){if(this._show){const{floatDiv:t}=this;t.element.parentElement||this._divContainer.appendChild(t.element)}else{const{_floatDiv:t}=this;t&&t.element.parentElement&&this._divContainer.removeChild(t.element)}}set show(e){this._show!==e&&(this._show=e,this._updateDivPoi(),this._showChanged&&this._showChanged.emit(e))}get show(){return this._show}get floatDiv(){if(!this._floatDiv){const e=uo(this._customDivClass).create();this.dispose(()=>{uo(this._customDivClass).destroy(e)}),this._floatDiv=e}return this._floatDiv}get showChanged(){return this._showChanged||(this._showChanged=new v),this._showChanged}}const Uu=["top","bottom","left","right"];function Bu(n){return Object.entries(n).map(([s,e])=>Uu.includes(s)?`${s}: ${e}px; `:"").join("")}function ah(n,s,e){const t=document.createElement("div");t.style.cssText=`position: absolute; ${Bu(e)} background-color: ${n}; border-radius: ${s}px;`;const i='<svg viewBox="0 0 1024 1024" style="display: block;" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2420" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128zM512 832c-179.2 0-320-140.8-320-320s140.8-320 320-320 320 140.8 320 320S691.2 832 512 832z" p-id="2421" fill="#ffffff"></path><path d="M672 352c-12.8-12.8-32-12.8-44.8 0L512 467.2 396.8 352C384 339.2 364.8 339.2 352 352S339.2 384 352 396.8L467.2 512 352 627.2c-12.8 12.8-12.8 32 0 44.8s32 12.8 44.8 0L512 556.8l115.2 115.2c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L556.8 512l115.2-115.2C684.8 384 684.8 364.8 672 352z" p-id="2422" fill="#ffffff"></path></svg>';return t.innerHTML=i,t}function lh(n,s,e="rgba(0,0,0,0.7)"){const t=document.createElement("div");t.style.cssText=`margin: 0 auto; width: ${n}px; height: ${s}px; position: relative; pointer-events: none;`;const i=document.createElement("div");return i.style.cssText=`position: absolute; left: 0px; top: 0px; width: 0; height: 0; border-left: ${n*.5}px solid transparent; border-right: ${n*.5}px solid transparent; border-top: ${s}px solid ${e};`,t.appendChild(i),[t,i]}class hh extends po{constructor(){super();a(this,"_borderDiv");a(this,"_closeDiv");a(this,"_innerContentDiv");a(this,"_colorStr","rgba(0, 0, 0, 0.7)");a(this,"_divColorChanged",new v);a(this,"_borderRadius",10);const e=document.createElement("div");e.style.cssText=`position: relative; background-color: ${this._colorStr}; border-radius: ${this._borderRadius}px; padding: 5px; pointer-events: all;`,this._borderDiv=e;const t=ah(this._colorStr,10,{top:3,right:3}),[i,r]=lh(2*this._borderRadius,2*this._borderRadius,this._colorStr),o=document.createElement("div");this._innerContentDiv=o,e.appendChild(o),e.appendChild(t),this.contentDiv.appendChild(e),this.contentDiv.appendChild(i),t.style.opacity="0.1",t.onmouseenter=()=>{t.style.opacity="1.0"},t.onmouseleave=()=>{t.style.opacity="0.1"},t.onclick=()=>{this._closeEvent&&this._closeEvent.emit()},this._closeDiv=t,this.dispose(this._divColorChanged.disposableOn(()=>{r.style.borderTopColor=this._colorStr,e.style.backgroundColor=this._colorStr,i.style.width=`${this._borderRadius*2}px`,i.style.height=`${this._borderRadius*2}px`,r.style.borderLeft=`${this._borderRadius}px`,r.style.borderRight=`${this._borderRadius}px`,r.style.borderTop=`${this._borderRadius*2}px`}));const l=h=>{h.key==="Escape"&&this._closeEvent&&this._closeEvent.emit()};document.body.addEventListener("keydown",l,!0),this.dispose(()=>{document.removeEventListener("keydown",l,!0)})}get borderDiv(){return this._borderDiv}get innerContentDiv(){return this._innerContentDiv}reset(){this.show=!1,this.opacity=0,this._closeDiv.style.opacity="0.1",super.reset()}get colorStr(){return this._colorStr}set colorStr(e){this._colorStr!==e&&(this._colorStr=e,this._divColorChanged.emit())}get borderRadius(){return this._borderRadius}set borderRadius(e){this._borderRadius!==e&&(this._borderRadius=e,this._divColorChanged.emit())}}class Wu extends hh{constructor(){super();a(this,"_iframe");a(this,"_iframeMessageEvent");const e=document.createElement("iframe");e.style.cssText="width: 100%; height: 100%; border-width: 0px; border-radius: 5px; display: block;",e.src="http://www.weather.com.cn/live/index.shtml",this._iframe=e,this.innerContentDiv.appendChild(e);const t=i=>{i.source===this._iframe.contentWindow&&(this._iframeMessageEvent?this._iframeMessageEvent.emit(i):console.warn(`iframe消息接收到未处理!data: ${i.data}`))};globalThis.addEventListener("message",t),this.dispose(()=>{globalThis.removeEventListener("message",t)})}reset(){super.reset(),this.src=""}set src(e){this._iframe.src!==e&&(this._iframe.src=e)}get src(){return this._iframe.src}get iframe(){return this._iframe}get iframeMessageEvent(){return this._iframeMessageEvent=this._iframeMessageEvent||new v,this._iframeMessageEvent}}class Hu extends ho{constructor(){super();a(this,"_div");a(this,"_contentContainer");a(this,"_text","");const e=document.createElement("div");this._div=e,e.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible; transition: opacity 0.5s;";const t=document.createElement("div");t.style.cssText="position: absolute; left: 0px; bottom: 0px; transform: translateX(-50%); margin: 0; padding: 0; pointer-events: none;";const i=document.createElement("div");i.style.cssText="position: relative; background-color: rgba(0, 0, 0, 0.7); border-radius: 5px; padding: 3px; pointer-events: all; color: white; white-space: nowrap;",i.innerText=this._text,this._div.appendChild(t),t.appendChild(i),this._contentContainer=i,this._div=e,this.dispose(this.winPosChanged.disposableOn(([r,o])=>{this._div.style.left=`${r}px`,this._div.style.top=`${o-50}px`})),this.dispose(this.opacityChanged.disposableOn(r=>{this._div.style.opacity=`${r}`})),this.dispose(this.showChanged.disposableOn(r=>{this._div.style.visibility=r?"visible":"hidden"}))}get element(){return this._div}reset(){this.opacity=1,this.show=!0}set text(e){this._text!==e&&(this._text=e,this._contentContainer.innerText=e)}get text(){return this._text}}class $u extends po{constructor(){super(),this.contentDiv.style.backgroundColor="rgba(0, 0, 0, 0.8)",this.contentDiv.style.borderRadius="3px",this.contentDiv.style.color="rgb(255, 255, 255)",this.contentDiv.style.padding="1px 5px 1px 5px",this.contentDiv.style.fontSize="12px",this.contentDiv.style.whiteSpace="nowrap",this.contentDiv.innerText="未定义光标信息!",this.originRatioX=0,this.originRatioY=0,this.originOffsetX=-16}}class Gu extends b{constructor(e,t){super();a(this,"_cursorDiv");a(this,"_pointerOut",this.disposeVar(w(!1)));a(this,"_show",this.disposeVar(w(!0)));this._cursorDiv=new oh(t,e),this.dispose(()=>this._cursorDiv.destroy());const i=o=>{const[l,h]=we(o);this._cursorDiv.floatDiv.winPos=[l,h]};e.addEventListener("pointermove",i),this.dispose(()=>e.removeEventListener("pointermove",i));const r=()=>{this._cursorDiv.show=this.show&&this._pointerOut.value};r(),this.dispose(this.showChanged.disposableOn(r)),this.dispose(this._pointerOut.changed.disposableOn(r))}set show(e){this._show.value=e}get show(){return this._show.value}get showChanged(){return this._show.changed}reset(){this._pointerOut.value=!1}get cursorDiv(){return this._cursorDiv}set text(e){this._cursorDiv.floatDiv.contentDiv.innerText=e}get text(){return this._cursorDiv.floatDiv.contentDiv.innerText}}function mn(n,s,e){if(!(n.tree===s.tree&&n!==s&&!n.isAncestorOf(s))||n.tree!==s.tree||!n.parent)return!1;if(!n.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");return!(s===n||n.isAncestorOf(s)||e!=="inner"&&!s.parent||e==="inner"&&!s.children)}function qn(n,s,e){if(!n.tree||!s.tree||n.tree!==s.tree)return;if(!n.parent){console.warn("当前节点没有父节点,那么该节点无法被移动!");return}if(!n.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");if(s===n){console.warn("自身不能拖放到自身!");return}if(n.isAncestorOf(s)){console.warn("当前节点不能拖放到它自身的后代节点之上!");return}if(e!=="inner"&&!s.parent){console.warn("目标节点没有父节点,无法拖放!");return}if(e==="inner"&&!s.children){console.warn("无法移动到目标节点的子节点中,因为目标节点不是组节点!");return}n.tree._startTransaction();const t=n.parent.children.indexOf(n);if(n.parent.children.splice(t,1),e!=="inner"){const{parent:i}=s;if(!i||!i.children)throw new Error("!parent");const r=i.children.indexOf(s);e==="before"?i.children.splice(r,0,n):e==="after"&&i.children.splice(r+1,0,n)}else s.children.push(n);n.tree._stopTransaction()}function ch(n,s,e){return Wr(n,t=>mn(t,s,e))}function dh(n,s,e){for(let t of n)mn(t,s,e)?qn(t,s,e):console.warn(`treeItem(id: ${t.id}) cannot move...`)}const Ju={checked:1,unchecked:2,indeterminate:3},qu=["checked","unchecked","indeterminate"];class uh extends b{constructor(e){super();a(this,"_collapsed",this.disposeVar(w(!1)));a(this,"_checkedStatus",this.disposeVar(w("unchecked")));a(this,"_selected",this.disposeVar(w(!1)));a(this,"_moveToPositionMode",this.disposeVar(w("none")));a(this,"_updateCheckedStatusFromChildrenEvent",this.disposeVar(new v));this._treeItem=e;const t=()=>this._treeItem.tree&&this._treeItem.tree.itemsChanged.emit([this._treeItem]);this.dispose(this._collapsed.changed.disposableOn(t)),this.dispose(this._checkedStatus.changed.disposableOn(t)),this.dispose(this._selected.changed.disposableOn(t)),this.dispose(this._moveToPositionMode.changed.disposableOn(t)),this.dispose(this._checkedStatus.changed.disposableOn(()=>this._treeItem.parent&&this._treeItem.parent.uiTreeObject.updateCheckedStatusFromChildren())),this.dispose(this._treeItem.childrenChangedEvent.disposableOn(()=>{this.updateCheckedStatusFromChildren()}));const i=this.disposeVar(oe(this._updateCheckedStatusFromChildrenEvent));this.dispose(i.disposableOn(()=>{if(!this._treeItem.children)return;let r=0;Br(this._treeItem.children,o=>(r|=Ju[o.uiTreeObject.checkedStatus],r===3)),r>0&&(this._checkedStatus.value=qu[r-1])})),this.dispose(this._treeItem.childrenResetedEvent.disposableOn(r=>{!r&&this.checkedStatus==="indeterminate"&&(this._checkedStatus.value="unchecked")}));{const r=(o,l,h=!0)=>{if(l)o.selectedItems.push(this._treeItem);else{const c=o.selectedItems.indexOf(this._treeItem);c===-1?h&&console.error("selectedItems index -1"):o.selectedItems.splice(c,1)}};this.dispose(this._selected.changed.disposableOn(o=>{const{tree:l}=this._treeItem;l&&r(l,o)})),this.dispose(()=>this.selected=!1)}}get treeItem(){return this._treeItem}get collapsed(){return this._collapsed.value}set collapsed(e){this._collapsed.value=e}get collapsedChanged(){return this._collapsed.changed}get checkedStatus(){return this._checkedStatus.value}check(e){const t=e?"checked":"unchecked";if(this._checkedStatus.value!==t&&(this._checkedStatus.value=t,this._treeItem.children))for(let i of this._treeItem.children)i.uiTreeObject.check(e)}updateCheckedStatusFromChildren(){this._updateCheckedStatusFromChildrenEvent.emit()}get checkedStatusChanged(){return this._checkedStatus.changed}get selected(){return this._selected.value}set selected(e){this._selected.value=e}get selectedChanged(){return this._selected.changed}get moveToPositionMode(){return this._moveToPositionMode.value}set moveToPositionMode(e){this._moveToPositionMode.value=e}get moveToPositionModeChanged(){return this._moveToPositionMode.changed}}const lt=class lt extends b{constructor(e,t=!1,i){super();a(this,"_children");a(this,"_childrenResetedEvent");a(this,"_childrenToChangeEvent");a(this,"_childrenChangedEvent");a(this,"_parent",this.disposeVar(w(void 0)));a(this,"_level",this.disposeVar(w(0)));a(this,"_id");a(this,"_uiTreeObject",this.disposeVar(new uh(this)));this._tree=e,this._hasChildren=t,this._id=i??ns(),this._id!=="_ROOT"&<.wm.has(this._id)&&console.warn(`创建了id(${this._id})相同的树节点,会导致之前的树节点无法索引!`),lt.wm.set(this._id,this),this.dispose(()=>{if(this._id!=="_ROOT"&&!lt.wm.has(this._id)){console.warn(`树节点(${this._id})不在wm树上!`);return}lt.wm.delete(this._id)}),this.dispose(this._parent.changed.disposableOn(()=>{this._updateLevel()})),this.dispose(this._level.changed.disposableOn(()=>{if(this.children)for(let r of this.children)r._updateLevel()})),lt.allTreeItems.set(this._id,this),this.dispose(()=>{lt.allTreeItems.delete(this._id)})}static getFromId(e){return lt.wm.get(e)}get uiTreeObject(){return this._uiTreeObject}get id(){return this._id}_updateLevel(){this.parent&&(this._level.value=this.parent.level+1)}get parent(){return this._parent.value}get parentChanged(){return this._parent.changed}get children(){if(this._hasChildren){if(!this._children){const e=this.disposeVar(new hn);this._children=e,this.dispose(e.toChangeEvent.disposableOn((r,o)=>{for(let l of r){const{start:h,deleteCount:c,items:u}=l;for(let p=h;p<h+c;++p)o.get(p)._parent.value=void 0;for(let p of u){if(p.parent)throw console.error("请检查新增的treeItem是否正在使用!"),new Error("item.parent should not exist!");p._parent.value=this}}}));const t=new Set,i=new Set;this.dispose(e.toChangeEvent.disposableOn((r,o)=>{var l;if(this.tree){t.clear(),i.clear();for(let h of r){const{start:c,deleteCount:u,items:p}=h;for(let g=c;g<c+u;++g)t.add(o.get(g));for(let g of p)i.add(g)}for(let h of t)i.has(h)&&(t.delete(h),i.delete(h));(l=this.tree)==null||l.itemChildrenToChange.emit(this,r,t,i)}})),this.dispose(e.changedEvent.disposableOn(()=>{var r;(r=this.tree)==null||r.itemChildrenChanged.emit(this)})),this.dispose(e.toChangeEvent.disposableOn((...r)=>this._childrenToChangeEvent&&this._childrenToChangeEvent.emit(...r))),this.dispose(e.changedEvent.disposableOn((...r)=>this._childrenChangedEvent&&this._childrenChangedEvent.emit(...r)))}return this._children}else return}get childrenResetedEvent(){return this._childrenResetedEvent||(this._childrenResetedEvent=new v),this._childrenResetedEvent}get childrenToChangeEvent(){return this._childrenToChangeEvent||(this._childrenToChangeEvent=new v),this._childrenToChangeEvent}get childrenChangedEvent(){return this._childrenChangedEvent||(this._childrenChangedEvent=new v),this._childrenChangedEvent}resetChildren(e=!1){this._children&&(this._children.length=0),this._hasChildren=e,this._childrenResetedEvent&&this._childrenResetedEvent.emit(e)}*getDescendants(e){const t=this,i=[],r=[];for(t.children&&t.children.length>0&&(!e||e(t))&&(i.push(0),r.push(t.children));i.length>0;){const o=i[i.length-1],l=r[r.length-1],h=l.get(o);yield h,o<l.length-1?++i[i.length-1]:(r.pop(),i.pop()),h.children&&h.children.length>0&&(!e||e(h))&&(i.push(0),r.push(h.children))}}*getAncestors(e){let t=this.parent;for(;t&&(yield t,!(e&&!e(t)));)t=t.parent}isDescendantOf(e){for(let t of this.getAncestors())if(t===e)return!0;return!1}isAncestorOf(e){return e.isDescendantOf(this)}get level(){return this._level.value}get levelChanged(){return this._level.changed}get tree(){return this._tree}canMoveTo(e,t){return mn(this,e,t)}moveTo(e,t){qn(this,e,t)}detachFromParent(){if(!this.parent||!this.parent.children)return;const e=this.parent.children.indexOf(this);this.parent.children.splice(e,1)}insertNewTreeItem(e,t){if(t&&t.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&e.startsWith("Inner"))return t&&this.children.push(t),!0;if(e==="Inner")return!1;const i=this.parent;if(!i||!i.children)return!1;const r=i.children.indexOf(this);return e.endsWith("Before")?t&&i.children.splice(r,0,t):e.endsWith("After")&&t&&i.children.splice(r+1,0,t),!0}};a(lt,"wm",new Map),a(lt,"allTreeItems",new Map);let vn=lt;class ph extends b{constructor(e){super();a(this,"_redrawEvent",this.disposeVar(new v));a(this,"_containerScrollTop",this.disposeVar(w(0)));a(this,"_containerClientHeight",this.disposeVar(w(-1)));a(this,"_container",this.disposeVar(w(void 0)));a(this,"_redrawInfo",{topFreeSpaceHeight:0,topUnvisibleItemNum:0,middleTreeItems:[],bottomFreeSpaceHeight:0,bottomUnvisibleItemNum:0});this._tree=e;const t=this._containerClientHeight,i=this._containerScrollTop,r=this._tree._forceRedrawEvent,o=this.disposeVar(oe(this._tree.itemDivHeightChanged,this._tree.itemChildrenChanged,this._tree.itemsChanged,t.changed,i.changed,r)),{redrawInfo:l}=this,h=u=>{const p=u.uiTreeObject;return!!u.children&&(!p||!p.collapsed)};this.dispose(o.disposableOn(()=>{if(l.topFreeSpaceHeight=0,l.topUnvisibleItemNum=0,l.middleTreeItems.length=0,l.bottomFreeSpaceHeight=0,l.bottomUnvisibleItemNum=0,this._containerClientHeight.value>=0){const u=Hr(this._tree.getDescendants(h)),p=this._tree.itemDivHeight,g=p*u,m=Nt([Zt([Nt([g-t.value,0]),i.value]),0]),y=m/p|0,S=Math.ceil((m-y*p+t.value)/p)|0;y>0&&(l.topUnvisibleItemNum=y,l.topFreeSpaceHeight=y*this._tree.itemDivHeight);const C=y+S;let T=0;for(let z of this._tree.getDescendants(h)){if(T>=C)break;T>=y&&l.middleTreeItems.push(z),++T}const V=u-y-S;V>0&&(l.bottomUnvisibleItemNum=V,l.bottomFreeSpaceHeight=V*this._tree.itemDivHeight)}else for(let u of this._tree.getDescendants(h))l.middleTreeItems.push(u);this._redrawEvent.emit(l)}));let c;this.dispose(()=>c&&(c.destroy(),c=void 0)),this.dispose(this.containerChanged.disposableOn(u=>{c&&(c.destroy(),c=void 0),u&&(c=dn(),c.start(()=>{const{scrollTop:p,clientHeight:g}=u;typeof p>"u"||typeof g>"u"?is("createUiTreeWithContainer error: conainter has no scrollTop or clientHeight property!"):(this.containerScrollTop=p,this.containerClientHeight=g)}))}))}get container(){return this._container.value}set container(e){this._container.value=e}get containerChanged(){return this._container.changed}get redrawInfo(){return this._redrawInfo}getTreeItemPos(e){const t=o=>{const l=o.uiTreeObject;return!!o.children&&(!l||!l.collapsed)};let i=0,r=!1;for(let o of this._tree.getDescendants(t)){if(o===e){r=!0;break}++i}if(r)return[i,i*this._tree.itemDivHeight]}collapseAll(){console.log("collapseAll");for(let e of this.tree.root.getDescendants()){const t=e.uiTreeObject;t.collapsed=!0}}expandAll(){console.log("expandAll");for(let e of this.tree.root.getDescendants()){const t=e.uiTreeObject;t.collapsed=!1}}get tree(){return this._tree}get redrawEvent(){return this._redrawEvent}set containerScrollTop(e){this._containerScrollTop.value=e}get containerScrollTop(){return this._containerScrollTop.value}get containerScrollTopChanged(){return this._containerScrollTop.changed}set containerClientHeight(e){this._containerClientHeight.value=e}get containerClientHeight(){return this._containerClientHeight.value}get containerClientHeightChanged(){return this._containerClientHeight.changed}*getAllItems(e){for(let t of this._tree.getDescendants())(!e||e(t))&&(yield t)}getAllSelectedItems(){return this.getAllItems(e=>e.uiTreeObject.selected)}getAllCheckedItems(){return this.getAllItems(e=>e.uiTreeObject.checkedStatus==="checked")}getAllCheckedLeafItems(){return this.getAllItems(e=>!e.children&&e.uiTreeObject.checkedStatus==="checked")}selectAllItems(e){for(let t of this.getAllItems())(!e||!e.includes(t))&&(t.uiTreeObject.selected=!0)}clearAllSelectedItems(e){for(let t of this.getAllSelectedItems())(!e||!e.includes(t))&&(t.uiTreeObject.selected=!1)}checkAllItems(e){for(let t of this.getAllItems())(!e||!e.includes(t))&&t.uiTreeObject.check(!0)}clearAllCheckedItems(e){for(let t of this.getAllCheckedItems())(!e||!e.includes(t))&&t.uiTreeObject.check(!1)}}const si=class si extends b{constructor(e){super();a(this,"_root",this.disposeVar(new vn(this,!0,"_ROOT")));a(this,"_itemChildrenChanged",this.disposeVar(new v));a(this,"_itemChildrenToChange",this.disposeVar(new v));a(this,"_itemsAdded",this.disposeVar(new v));a(this,"_itemsDeleted",this.disposeVar(new v));a(this,"_itemsChanged",this.disposeVar(new v));a(this,"_transactionStack",0);a(this,"_addedItems",new Set);a(this,"_deletedItems",new Set);a(this,"_selectedItems",this.disposeVar(new hn));a(this,"_itemDivHeight",this.disposeVar(w(si.defaultItemDivHeight)));a(this,"_forceRedrawEvent",this.disposeVar(new v));a(this,"_uiTree",this.disposeVar(new ph(this)));this._root._tree.value=this,this.dispose(this._itemChildrenToChange.disposableOn((t,i)=>{if(!t.children){console.error("!item.children");return}for(let r of i){const{start:o,deleteCount:l,items:h}=r;for(let c=o;c<o+l;++c){const u=t.children.get(c);this._deletedItems.has(u)?console.error(`this._deletedItems.has(currentItem(${u.id}))`):this._deletedItems.add(u)}for(let c of h)this._deletedItems.has(c)?this._deletedItems.delete(c):this._addedItems.add(c)}this._execTransaction()})),e!==void 0&&(this.itemDivHeight=e)}get selectedItems(){return this._selectedItems}get lastSelectedItem(){return this._selectedItems.length>0?this._selectedItems.get(this._selectedItems.length-1):void 0}get itemDivHeight(){return this._itemDivHeight.value}set itemDivHeight(e){this._itemDivHeight.value=e}get itemDivHeightChanged(){return this._itemDivHeight.changed}forceRedraw(){this._forceRedrawEvent.emit()}get uiTree(){return this._uiTree}get root(){return this._root}get children(){return this._root.children}getDescendants(e){return this._root.getDescendants(e)}getTreeItemFromId(e){let t;for(let i of this.getDescendants())if(i.id===e){t=i;break}return t}_startTransaction(){this._transactionStack===0&&(this._deletedItems.size>0&&(console.warn("this._deletedItems.size > 0"),this._deletedItems.clear()),this._addedItems.size>0&&(console.warn("this._addedItems.size > 0"),this._addedItems.clear())),++this._transactionStack}_stopTransaction(){--this._transactionStack,this._execTransaction()}_execTransaction(){this._transactionStack===0&&(this._deletedItems.size>0&&(this._itemsDeleted.emit([...this._deletedItems]),this._deletedItems.clear()),this._addedItems.size>0&&(this._itemsAdded.emit([...this._addedItems]),this._addedItems.clear()))}get itemChildrenChanged(){return this._itemChildrenChanged}get itemChildrenToChange(){return this._itemChildrenToChange}get itemsChanged(){return this._itemsChanged}get itemsAdded(){return this._itemsAdded}get itemsDeleted(){return this._itemsDeleted}};a(si,"defaultItemDivHeight",24),a(si,"canMoveToTreeItem",mn),a(si,"moveToTreeItem",qn),a(si,"canMoveToTreeItems",ch),a(si,"moveToTreeItems",dh);let Si=si;class le extends b{constructor(e,t,i=!0,r){super();a(this,"_obj",this.disposeVar(w(void 0)));this._resetEvent=e,this._createFunc=t;const o=this._resetEvent,l=this._createFunc,h=()=>{this._obj.value&&(this._obj.value.destroy(),this._obj.value=void 0)};this.dispose(h);const c=(...u)=>{h(),this._obj.value=l(...u)};i&&(r?this._obj.value=l(...r):this._obj.value=l()),this.dispose(o.disposableOn(c))}get obj(){return this._obj.value}get objChanged(){return this._obj.changed}}class Xu extends b{constructor(e,t=!0,i){super();a(this,"_event",this.disposeVar(new v));a(this,"_objResettingWithEvent");this._createFunc=e,this._execOnInit=t,this._initParams=i,this._objResettingWithEvent=this.disposeVar(new le(this._event,this._createFunc,this._execOnInit,this._initParams))}get obj(){return this._objResettingWithEvent.obj}get objChanged(){return this._objResettingWithEvent.objChanged}reset(...e){this._event.emit(...e)}}const Or=class Or extends b{constructor(){super();a(this,"_set",new Set);a(this,"_toChangeEvent",this.dv(new v));a(this,"_changedEvent",this.dv(new v));a(this,"main");this.dispose(()=>{this._set.size!==0&&(Or.warnOnDestroying&&console.warn("this._set.size > 0"),this.clear())})}get toChange(){return this._toChangeEvent}get changed(){return this._changedEvent}add(...e){if(e.length==2&&typeof e[1]=="boolean")e[1]&&(this.main=e[0]);else for(let t of e)this._toChangeEvent.emit([],[t]),this._set.add(t),this._changedEvent.emit([],[t])}delete(...e){for(let t of e)this.main&&this.main==t&&(this.main=void 0),this._toChangeEvent.emit([t],[]),this._set.delete(t),this._changedEvent.emit([t],[])}disposableAdd(...e){return e.length==2&&typeof e[1]=="boolean"?(e[1]&&(this.main=e[0]),this.add(e[0]),()=>this.delete(e[0])):(this.add(...e),()=>this.delete(...e))}get size(){return this._set.size}clear(){const e=[...this._set];this._toChangeEvent.emit([],e),this._set.clear(),this._changedEvent.emit([],e),this.main=void 0}values(){return this._set.values()}};a(Or,"warnOnDestroying",!0);let Xn=Or;async function gh(n){const s=[],e=[],t=n.entries();for await(const[i,r]of t){const o=r;o.kind==="file"?s.push(i):o.kind==="directory"&&e.push(i)}return{files:s,dirs:e}}async function go(n){return await(await n.getFile()).text()}async function fh(n){const s=await go(n);try{return JSON.parse(s)}catch{return}}async function mh(n){return await(await n.getFile()).arrayBuffer()}class vh extends b{constructor(s){super(),this._rootDirHandle=s}get rootDirHandle(){return this._rootDirHandle}async getSubFilesAndDirs(){return await gh(this._rootDirHandle)}async getDir(s){let e=this._rootDirHandle;for(const t of s)if(e=await(e==null?void 0:e.getDirectoryHandle(t)),!e){console.log(`getDirectoryHandle ${t} failed`);return}return e}async getFile(s,e){const t=await this.getDir(s);if(t)try{return await t.getFileHandle(e)}catch(i){console.error(`未能获取当前文件 ${s.join("/")}/${e} error: ${i}`,i);return}}}class _h extends b{constructor(e){super();a(this,"_startRootDirId",0);a(this,"_dirMap",new Map);this._prefix=e}get prefix(){return this._prefix}async getRootDirId(e){let t;try{console.log("window.showDirectoryPicker begin"),t=await globalThis.showDirectoryPicker({id:e,mode:"read"}),console.log("window.showDirectoryPicker end",t)}catch(i){console.error(`LocalFileServer getRootDirId failed: ${i}`,i);return}if(t){const i=++this._startRootDirId,r=`${this._prefix}${i}`;return this._dirMap.set(r,new vh(t)),r}}getRootDir(e){return this._dirMap.get(e)}async getFile(e){const t=e.split("/");if(t.length<2){console.warn(`LocalFileServer getFile failed: ${e}`);return}const i=t[0],r=this._dirMap.get(i);if(!r){console.warn(`LocalFileServer getFile failed: ${e}`);return}const o=t.slice(1,t.length-1),l=t[t.length-1],h=await r.getFile(o,l);if(!h){console.warn(`LocalFileServer getFile failed: ${e}`);return}return h}async getText(e){const t=await this.getFile(e);if(t)return await go(t)}async getArrayBuffer(e){const t=await this.getFile(e);if(t)return await mh(t)}async getJson(e){const t=await this.getFile(e);if(t)return await fh(t)}async getLocalFilePath(e,t,i){const r=await this.getRootDirId(t);if(!r){console.warn("getRootDirId error!");return}const o=this.getRootDir(r);if(!o){console.warn("getRootDir error!");return}const l=await o.getSubFilesAndDirs();if(!l.files){console.warn("getSubFilesAndDirs error! 找不到符合要求的文件!");return}const h=e?l.files.filter(c=>e.some(u=>c.endsWith(u))):l.files;if(h.length===0){console.warn("找不到符合要求的文件!");return}return`https://${r}/${h[0]}`}}const yh=new _h("xe2_local");async function Yu(n,s,e){return await yh.getLocalFilePath(n,s,e)}class wh extends b{constructor(e,t){super();a(this,"_processing");this._complexImage=e,this._imageUri=t,this._processing=this.disposeVar(Le(async i=>{const r=this._complexImage,o=await i.promise(Rl(this._imageUri,this._complexImage.crossOrigin));o&&o instanceof HTMLImageElement&&(r.size=[o.naturalWidth,o.naturalHeight],r.pixelFormat="RGBA",r.copyTexture({source:o}))})),this._processing.start()}get processing(){return this._processing}}const Eh=["DEPTH_COMPONENT","DEPTH_STENCIL","ALPHA","RED","RG","RGB","RGBA","LUMINANCE","LUMINANCE_ALPHA","RGB_DXT1","RGBA_DXT1","RGBA_DXT3","RGBA_DXT5","RGB_PVRTC_4BPPV1","RGB_PVRTC_2BPPV1","RGBA_PVRTC_4BPPV1","RGBA_PVRTC_2BPPV1","RGBA_ASTC","RGB_ETC1","RGB8_ETC2","RGBA8_ETC2_EAC","RGBA_BC7"],bh=["img","gif","video","flv","hls"];let Ku=class extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden",i.style.width="0px",i.style.height="0px";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}};class Sh extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new Ku(this._complexImage,this._imageUri)),this._update=this.disposeVar(cs(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}function Zu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var fo={},Lt={},Ch;function Qu(){if(Ch)return Lt;Ch=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.loop=Lt.conditional=Lt.parse=void 0;var n=function t(i,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(Array.isArray(r))r.forEach(function(c){return t(i,c,o,l)});else if(typeof r=="function")r(i,o,l,t);else{var h=Object.keys(r)[0];Array.isArray(r[h])?(l[h]={},t(i,r[h],o,l[h])):l[h]=r[h](i,o,l,t)}return o};Lt.parse=n;var s=function(i,r){return function(o,l,h,c){r(o,l,h)&&c(o,i,l,h)}};Lt.conditional=s;var e=function(i,r){return function(o,l,h,c){for(var u=[],p=o.pos;r(o,l,h);){var g={};if(c(o,i,l,g),o.pos===p)break;p=o.pos,u.push(g)}return u}};return Lt.loop=e,Lt}var he={},Ph;function Th(){if(Ph)return he;Ph=1,Object.defineProperty(he,"__esModule",{value:!0}),he.readBits=he.readArray=he.readUnsigned=he.readString=he.peekBytes=he.readBytes=he.peekByte=he.readByte=he.buildStream=void 0;var n=function(p){return{data:p,pos:0}};he.buildStream=n;var s=function(){return function(p){return p.data[p.pos++]}};he.readByte=s;var e=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(g){return g.data[g.pos+p]}};he.peekByte=e;var t=function(p){return function(g){return g.data.subarray(g.pos,g.pos+=p)}};he.readBytes=t;var i=function(p){return function(g){return g.data.subarray(g.pos,g.pos+p)}};he.peekBytes=i;var r=function(p){return function(g){return Array.from(t(p)(g)).map(function(m){return String.fromCharCode(m)}).join("")}};he.readString=r;var o=function(p){return function(g){var m=t(2)(g);return p?(m[1]<<8)+m[0]:(m[0]<<8)+m[1]}};he.readUnsigned=o;var l=function(p,g){return function(m,y,S){for(var C=typeof g=="function"?g(m,y,S):g,T=t(p),V=new Array(C),z=0;z<C;z++)V[z]=T(m);return V}};he.readArray=l;var h=function(p,g,m){for(var y=0,S=0;S<m;S++)y+=p[g+S]&&Math.pow(2,m-S-1);return y},c=function(p){return function(g){for(var m=s()(g),y=new Array(8),S=0;S<8;S++)y[7-S]=!!(m&1<<S);return Object.keys(p).reduce(function(C,T){var V=p[T];return V.length?C[T]=h(y,V.index,V.length):C[T]=y[V.index],C},{})}};return he.readBits=c,he}var Ih;function ep(){return Ih||(Ih=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=Qu(),e=Th(),t={blocks:function(g){for(var m=0,y=[],S=g.data.length,C=0,T=(0,e.readByte)()(g);T!==m&&T;T=(0,e.readByte)()(g)){if(g.pos+T>=S){var V=S-g.pos;y.push((0,e.readBytes)(V)(g)),C+=V;break}y.push((0,e.readBytes)(T)(g)),C+=T}for(var z=new Uint8Array(C),x=0,$=0;$<y.length;$++)z.set(y[$],x),x+=y[$].length;return z}},i=(0,s.conditional)({gce:[{codes:(0,e.readBytes)(2)},{byteSize:(0,e.readByte)()},{extras:(0,e.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,e.readUnsigned)(!0)},{transparentColorIndex:(0,e.readByte)()},{terminator:(0,e.readByte)()}]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===249}),r=(0,s.conditional)({image:[{code:(0,e.readByte)()},{descriptor:[{left:(0,e.readUnsigned)(!0)},{top:(0,e.readUnsigned)(!0)},{width:(0,e.readUnsigned)(!0)},{height:(0,e.readUnsigned)(!0)},{lct:(0,e.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,s.conditional)({lct:(0,e.readArray)(3,function(p,g,m){return Math.pow(2,m.descriptor.lct.size+1)})},function(p,g,m){return m.descriptor.lct.exists}),{data:[{minCodeSize:(0,e.readByte)()},t]}]},function(p){return(0,e.peekByte)()(p)===44}),o=(0,s.conditional)({text:[{codes:(0,e.readBytes)(2)},{blockSize:(0,e.readByte)()},{preData:function(g,m,y){return(0,e.readBytes)(y.text.blockSize)(g)}},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===1}),l=(0,s.conditional)({application:[{codes:(0,e.readBytes)(2)},{blockSize:(0,e.readByte)()},{id:function(g,m,y){return(0,e.readString)(y.blockSize)(g)}},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===255}),h=(0,s.conditional)({comment:[{codes:(0,e.readBytes)(2)},t]},function(p){var g=(0,e.peekBytes)(2)(p);return g[0]===33&&g[1]===254}),c=[{header:[{signature:(0,e.readString)(3)},{version:(0,e.readString)(3)}]},{lsd:[{width:(0,e.readUnsigned)(!0)},{height:(0,e.readUnsigned)(!0)},{gct:(0,e.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,e.readByte)()},{pixelAspectRatio:(0,e.readByte)()}]},(0,s.conditional)({gct:(0,e.readArray)(3,function(p,g){return Math.pow(2,g.lsd.gct.size+1)})},function(p,g){return g.lsd.gct.exists}),{frames:(0,s.loop)([i,l,h,r,o],function(p){var g=(0,e.peekByte)()(p);return g===33||g===44})}],u=c;n.default=u})(fo)),fo}var tp=ep();const ip=Zu(tp);var sp=Th();const np=(n,s)=>{const e=new Array(n.length),t=n.length/s,i=function(u,p){const g=n.slice(p*s,(p+1)*s);e.splice.apply(e,[u*s,s].concat(g))},r=[0,4,2,1],o=[8,8,4,2];for(var l=0,h=0;h<4;h++)for(var c=r[h];c<t;c+=o[h])i(c,l),l++;return e},rp=(n,s,e)=>{const r=e;var o,l,h,c,u,p,g,$,m,y,x,S,Y,Q,qe,Ae;const C=new Array(e),T=new Array(4096),V=new Array(4096),z=new Array(4097);for(S=n,l=1<<S,u=l+1,o=l+2,g=-1,c=S+1,h=(1<<c)-1,m=0;m<l;m++)T[m]=0,V[m]=m;var x,$,Y,Q,Ae,qe;for(x=$=Y=Q=Ae=qe=0,y=0;y<r;){if(Q===0){if($<c){x+=s[qe]<<$,$+=8,qe++;continue}if(m=x&h,x>>=c,$-=c,m>o||m==u)break;if(m==l){c=S+1,h=(1<<c)-1,o=l+2,g=-1;continue}if(g==-1){z[Q++]=V[m],g=m,Y=m;continue}for(p=m,m==o&&(z[Q++]=Y,m=g);m>l;)z[Q++]=V[m],m=T[m];Y=V[m]&255,z[Q++]=Y,o<4096&&(T[o]=g,V[o]=Y,o++,(o&h)===0&&o<4096&&(c++,h+=o)),g=p}Q--,C[Ae++]=z[Q],y++}for(y=Ae;y<r;y++)C[y]=0;return C},op=n=>{const s=new Uint8Array(n);return Re.parse(sp.buildStream(s),ip)},ap=n=>{const s=n.pixels.length,e=new Uint8ClampedArray(s*4);for(var t=0;t<s;t++){const i=t*4,r=n.pixels[t],o=n.colorTable[r]||[0,0,0];e[i]=o[0],e[i+1]=o[1],e[i+2]=o[2],e[i+3]=r!==n.transparentIndex?255:0}return e},lp=(n,s,e)=>{if(!n.image){console.warn("gif frame does not have associated image.");return}const{image:t}=n,i=t.descriptor.width*t.descriptor.height;var r=rp(t.data.minCodeSize,t.data.blocks,i);t.descriptor.lct.interlaced&&(r=np(r,t.descriptor.width));const o={pixels:r,dims:{top:n.image.descriptor.top,left:n.image.descriptor.left,width:n.image.descriptor.width,height:n.image.descriptor.height}};return t.descriptor.lct&&t.descriptor.lct.exists?o.colorTable=t.lct:o.colorTable=s,n.gce&&(o.delay=(n.gce.delay||10)*10,o.disposalType=n.gce.extras.disposal,n.gce.extras.transparentColorGiven&&(o.transparentIndex=n.gce.transparentColorIndex)),o.patch=ap(o),o},hp=(n,s)=>n.frames.filter(e=>e.image).map(e=>lp(e,n.gct));async function xh(n){const e=await(await fetch(n)).arrayBuffer(),t=op(e),i=hp(t);return{gif:t,gifFrames:i,arrayBuffer:e}}function Oh(n,s,e){return n<s?s:n>e?e:n}class Dh extends Jn{constructor(e,t=!0,i){super();a(this,"_gifFrames",this.disposeVar(w(void 0)));a(this,"_gifDurations",[]);a(this,"_gifDuration",this.disposeVar(w(0)));a(this,"_gifSize",this.disposeVar(w([0,0],(e,t)=>e.every((i,r)=>i===t[r]),e=>[...e])));a(this,"_autoPlayOnLoad",this.disposeVar(w(!0)));a(this,"_gifCanvas");this._container=e,this.loop=!0;const r=document.createElement("canvas");this._gifCanvas=r,r.style.width="100%",r.style.height="100%";const o=r.getContext("2d");this._container&&this._container.appendChild(r),this.dispose(()=>this._container&&this._container.removeChild(r));let l;this.dispose(this._gifFrames.changed.disposableOn(c=>{if(!c||c.length===0){r.width=0,r.height=0;return}const{width:u,height:p}=c[0].dims;this._gifSize.value=[u,p];const g=c.length;let m=0;this._gifDurations.length=0;for(let y=0;y<g;++y)m+=c[y].delay,this._gifDurations.push(m);this._gifDuration.value=this._gifDurations[this._gifDurations.length-1],r.width=u,r.height=p,l=o.createImageData(u,p),this.currentTimeChangedEvent.emit(this.currentTime,this.currentTime),this._autoPlayOnLoad.value&&(this.currentTime=0,this.playing=!0)}));let h=-1;this.dispose(this.currentTimeChangedEvent.disposableOn(c=>{const u=Oh(c/this.duration,0,1),p=this.gifDuration*u,g=this._gifFrames.value;if(g&&g.length>0){const m=this._getFrame(p);if(m===h)return;h=m;const y=g[m];if(y.disposalType!==0&&y.disposalType!==1&&y.disposalType!==2&&is(`gif parsed get disposalType ${y.disposalType}... frame: ${m} size: ${JSON.stringify(y.dims)}`,`gif parsed get disposalType ${y.disposalType}...`),l&&(m===0||y.disposalType===2)&&l.data.fill(0),l){const[S,C]=this._gifSize.value,{width:T,height:V,left:z,top:x}=y.dims;if(V>C)throw new Error("height > canvasHeight");for(let $=0;$<V;++$)for(let Y=0;Y<T;++Y){const Q=$*T+Y,Ae=x+$,qe=z+Y,jt=Ae*S+qe,mt=l.data,fi=y.patch,mi=fi[Q*4+3]/255;mt[jt*4+0]=mt[jt*4+0]*(1-mi)+fi[Q*4+0]*mi|0,mt[jt*4+1]=mt[jt*4+1]*(1-mi)+fi[Q*4+1]*mi|0,mt[jt*4+2]=mt[jt*4+2]*(1-mi)+fi[Q*4+2]*mi|0,mt[jt*4+3]=Oh(mt[jt*4+3]+fi[Q*4+3],0,255)|0}o.putImageData(l,0,0)}}else is("gif资源未加载!无法播放!")})),this.dispose(this._gifDuration.changed.disposableOn(()=>{this.duration=this.gifDuration})),this._autoPlayOnLoad.value=t,this._gifFrames.value=i}get gifCanvas(){return this._gifCanvas}set gifFrames(e){this._gifFrames.value=e}get gifFrames(){return this._gifFrames.value}get gifFramesChanged(){return this._gifFrames.changed}get gifSize(){return this._gifSize.value}get gifSizeChanged(){return this._gifSize.changed}get gifDuration(){return this._gifDuration.value}get gifDurationChanged(){return this._gifDuration.changed}get autoPlayOnLoad(){return this._autoPlayOnLoad.value}set autoPlayOnLoad(e){this._autoPlayOnLoad.value=e}get autoPlayOnLoadChanged(){return this._autoPlayOnLoad.changed}_getFrame(e){const t=this._gifDurations.length;for(let i=0;i<t;++i)if(e<=this._gifDurations[i])return i;throw new Error("should not be here")}}class Fh extends b{constructor(e){super();a(this,"_player");a(this,"_url",this.disposeVar(w("")));a(this,"_loadGifFramesProcessing",this.disposeVar(Gn(e=>hs(xh(e)))));this._player=this.disposeVar(new Dh(e)),this._player.autoPlayOnLoad=!0,this._loadGifFramesProcessing.completeFunc=({gifFrames:t})=>this._player.gifFrames=t,this.dispose(this._url.changed.disposableOn(t=>{this._player.gifFrames=void 0,this._loadGifFramesProcessing.restart(new st(`reload gif(${t})`),t)}))}get player(){return this._player}set url(e){this._url.value=e}get url(){return this._url.value}get loadedEvent(){return this._loadGifFramesProcessing.completeEvent}get size(){return this._player.gifSize}get sizeChanged(){return this._player.gifSizeChanged}get duration(){return this._player.gifDuration}get durationChanged(){return this._player.gifDurationChanged}}class kh extends b{constructor(e,t){super();a(this,"_gif",this.disposeVar(new Fh));a(this,"_update");this._complexImage=e,this._imageUri=t,this._gif.url=this._imageUri,this._update=this.disposeVar(cs(()=>this.update())),this._update.start()}get gif(){return this._gif}update(){const{player:e}=this._gif;if(!e.gifFrames)return;const t=this._complexImage,{width:i,height:r}=e.gifCanvas;t.size=[i,r],t.pixelFormat="RGBA",t.copyTexture({source:e.gifCanvas});{const o=()=>{e.autoPlayOnLoad=this._complexImage.autoplay};o(),this.dispose(this._complexImage.autoplayChanged.disposableOn(o))}{const o=()=>{e.loop=this._complexImage.loop};o(),this.dispose(this._complexImage.loopChanged.disposableOn(o))}}}function Mh(n,s){const[e,t,i]=tn(n),r=w(void 0),o=()=>{const l=e()??s;r.value=l&&M.context.getStrFromEnv(l)};return o(),i&&r.d(i.don(o)),r.d(M.context.environmentVariablesChanged.don(o)),r}function Ah(n){const s=/\${(.*?)\}/g;if(!s.test(n))return n;const e=n.replace(s,(t,i)=>{const r=M.context.getEnv(i);return r===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):r});return Ah(e)}class cp extends b{constructor(e){super();a(this,"_sceneObjRefs",new Map);a(this,"_refs",{});a(this,"_refsChanged",this.dv(new v));const t=(i,r,o)=>{if(o){const l=this.getLastSceneObject(o),h=this._sceneObjRefs.get(o);if(!h)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const u=h.indexOf(i);u===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(h.splice(u,1),h.length===0&&this._sceneObjRefs.delete(o))}const c=this.getLastSceneObject(o);this._refs[o]=c,this._refsChanged.emit(c,l)}if(r){const l=this.getLastSceneObject(r),h=this._sceneObjRefs.get(r);h?(h.push(i),h.length>0&&console.warn(`同时存在多个ref${r}相同的场景对象!
|
|
22
|
+
${h.map(u=>`${u.id} ${u.typeName}
|
|
23
|
+
`).join(" ")}`)):this._sceneObjRefs.set(r,[i]);const c=this.getLastSceneObject(r);this._refs[r]=c,this._refsChanged.emit(c,l)}};this.d(e.sceneObjCreatedEvent.don(i=>{const r=(o,l)=>t(i,o,l);i.ref&&r(i.ref,void 0),i.refChanged.don(r)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&t(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const t=this.getSceneObjects(e);if(t)return t[t.length-1]}getSceneObjects(e){const t=this._sceneObjRefs.get(e);if(!(!t||t.length===0))return t}}class dp extends b{constructor(){super();a(this,"_esObjConstructors",new Map);a(this,"_sceneObjs",new Map);a(this,"_sceneObjCreatedEvent",new v);a(this,"_sceneObjToDestroyEvent",new v);a(this,"_refsManager",this.dv(new cp(this)));a(this,"_environmentVariables",globalThis.ESSDK_ENV||{});a(this,"_environmentVariablesChanged",this.dv(new v))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,t,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,t),i&&vt(t,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,t){if(!t||this._sceneObjs.has(t)){const r=ns();t&&console.warn(`已存在相同id的对象!id自动变更!${t} -> ${r} 请注意:id变更可能导致引用失效!`),t=r}if(!t)throw new Error("id不能为空!");const i=new e(t);return i.id!==t&&(console.warn(`sceneObj.id(${i.id}) !== id(${t}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,t){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,t)}else return this.createSceneObjectFromClass(e,t)}createSceneObjectFromUrl(e,t){let i;const r=e.toLowerCase();if(r.includes(".gltf")||r.includes(".glb")?i="ESGltfModel":r.includes("tileset.json")?i="ES3DTileset":r.includes("layer.json")||r.includes("ion://1")?i="ESTerrainLayer":r.includes(".jpg")||r.includes(".png")||r.includes(".jpeg")||r.includes(".webp")||r.includes("image/jpg")||r.includes("image/png")||r.includes("image/jpeg")||r.includes("image/webp")?i="ESImageLabel":(r.includes("/tilemapresource.xml")||r.includes("ion://")||r.includes("wms")||r.includes("wmts")||r.includes("{x}")||r.includes("{y}")||r.includes("{z}"))&&(i="ESImageryLayer"),!!i)return this.createSceneObjectFromJson({type:i,id:t,url:e})}createSceneObjectFromJson(e){const t=this.createSceneObject(e.type,e.id);return t&&(t.json=e),t}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(typeof e=="function"){const t=[];for(const i of this._sceneObjs.values())i instanceof e&&t.push(i);return t}if(e.startsWith("ES")){const t=[];for(const i of this._sceneObjs.values())i.typeName===e&&t.push(i);return t}return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const t=this._esObjConstructors.get(e);if(t)return t}getProps(e){const t=this._getSceneObjConstructor(e);if(!t){console.warn(`cannot get constructor from type: ${e}`);return}return Ne(t,"__sceneObjExtraInfo")}setProps(e,t){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let r=Ne(i,"__sceneObjExtraInfo");r||(r={},vt(i,"__sceneObjExtraInfo",r)),Object.assign(r,t)}getProp(e,t){const i=this.getProps(e);return i&&i[t]}setProp(e,t,i){this.setProps(e,{[t]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[t,i]of Object.entries(e))this.setEnv(t,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,t){if(this._environmentVariables[e]!==t){const i=this._environmentVariables[e];this._environmentVariables[e]=t,this._environmentVariablesChanged.emit(e,t,i)}globalThis.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return Ah(e)}createEnvStrReact(e,t){return Mh(e,t)}createEvnStrReact(e,t){return Mh(e,t)}}const H=class H extends b{constructor(e){super();a(this,"_components",this.dv(new Xn));a(this,"_viewerAttached",this.dv(new v));a(this,"_viewerDetached",this.dv(new v));a(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(t=>{t.actived&&(this.activeViewer=t),t.ad(t.activedChanged.don(i=>{i&&e.has(t)&&(this.activeViewer=t)})),e.add(t)})),this.d(this._viewerDetached.don(t=>{e.delete(t),this.activeViewer==t&&(this.activeViewer=void 0)})),e})());a(this,"_activeViewer",this.dv(w(void 0)));a(this,"_reloadEvent",this.dv(new v));a(this,"_readyEvent",this.dv(new v));a(this,"_createdEvent",this.dv(new v));a(this,"_flushEvent",this.dv(new v));a(this,"_id");a(this,"_updateFuncReact",this.dv(w(void 0)));a(this,"_toDestroyFuncReact",this.dv(w(void 0)));a(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??ns(),this._initName();{const t=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};t(),this.d(this.execOnceFuncStrChanged.don(t))}{const t=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(r){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`)}};t(),this.d(this.updateFuncStrChanged.don(t));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||dn(),i.restart(void 0,r=>{this.updateFunc&&this.updateFunc(this,r)}))}))}{const t=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};t(),this.d(this.toDestroyFuncStrChanged.don(t)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,t,i){Kt(t.prototype,t.createDefaultProps);const r=t.createDefaultProps();t.defaults&&(t.defaults={});for(const o of Object.keys(r))t.defaults[o]=r[o]instanceof ge?r[o].value:r[o];return this.innerRegister(e,t,i),e}static get envs(){return H.context.environmentVariables}static get $refs(){return H.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}get reloadEvent(){return this._reloadEvent}reload(){this._reloadEvent.emit()}get readyEvent(){return this._readyEvent}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const t=new Map;this.d(()=>{t.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const r=e(i);r&&t.set(i,r)})),this.d(this._viewerDetached.don(i=>{if(!t.has(i))return;const r=t.get(i);r&&(r.destroy(),t.delete(i))}))}createAttachedObject(e){const t=new Map,i=(()=>{for(let[h,c]of t.entries())c.destroy();t.clear()}),r=h=>{const c=e(h);c&&t.set(h,c)};for(let h of this.attachedViewers)r(h);const o=this._viewerAttached.don(r),l=this._viewerDetached.don(h=>{if(!t.has(h))return;const c=t.get(h);c&&(c.destroy(),t.delete(h))});return()=>{l(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(t=>new up(t,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(e=!0){const t={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let r,o=this.defaultProps[i];o instanceof ge?r=o.equals(this[i]):r=o===this[i],r||(t[i]=this[i])}else t[i]=this[i];return t}_innerSetJson(e,t,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const r=t||[];r.push("id","type");const o=Object.keys(this.defaultProps).filter(l=>!r.includes(l));for(let l of o)if(l in e)this[l]=e[l]===null?void 0:e[l];else if(!(i??!1)){let h=this.defaultProps[l];h instanceof ge&&(h=h.value),this[l]=h}}get completeJson(){return this._innerGetJson(!1)}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getESProperties(){return{defaultMenu:"general",basic:[],general:[new N([this,"typeName"],"类型",void 0,!1,!0),new N([this,"id"],"id",void 0,!1,!0),new N([this,"name"],"名称"),new _o("JSON",()=>this._jsonStr,e=>e&&(this._jsonStr=e))],dataSource:[],location:[],coordinate:[],style:[],more:[new N([this,"ref"],"ref",void 0,!0),new R([this,"extras"],"extras",{},void 0,!0)]}}};a(H,"context",new dp),a(H,"innerRegister",H.context.register.bind(H.context)),a(H,"defaults",{}),a(H,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:B(void 0),devTags:q(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),a(H,"type",H.register("ESSceneObject",H,{chsName:"场景类",tags:["ESObjects","base"],description:""})),a(H,"create",H.context.createSceneObject.bind(H.context)),a(H,"createFromUrl",H.context.createSceneObjectFromUrl.bind(H.context)),a(H,"createFromClass",H.context.createSceneObjectFromClass.bind(H.context)),a(H,"createFromJson",H.context.createSceneObjectFromJson.bind(H.context)),a(H,"destroySceneObject",H.context.destroySceneObject.bind(H.context)),a(H,"getSceneObjById",H.context.getSceneObjectById.bind(H.context)),a(H,"getSceneObj",H.context.getSceneObject.bind(H.context)),a(H,"getEnv",H.context.getEnv.bind(H.context)),a(H,"setEnv",H.context.setEnv.bind(H.context)),a(H,"getStrFromEnv",H.context.getStrFromEnv.bind(H.context)),a(H,"getSceneObjectById",H.context.getSceneObjectById.bind(H.context)),a(H,"getSceneObject",H.context.getSceneObject.bind(H.context));let M=H;class up extends b{constructor(s,e){super(),this.dv(new le(s.subContainerChanged,()=>{if(s.subContainer)return e(s,s.subContainer)}))}}const Dr=class Dr extends b{constructor(e,t,i){super();a(this,"_id",++Dr._accumId);this._name=e,this._description=t,this._callFunction=i}get id(){return this._id}get name(){return this._name}get description(){return this._description}get callFunction(){return this._callFunction}};a(Dr,"_accumId",-1);let ei=Dr;class mo extends ei{constructor(s,e,t,i,r,o){super(s,e,o??(()=>{})),this._withUndefined=t,this._readonly=i,this._defaultValue=r}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Te extends mo{constructor(e,t,i,r,o,l,h){var u;const c=e instanceof ge?"未获取到属性名":e[1].toString();super(t??c,l??c,r??!1,o??!1,i,h);a(this,"_propName");a(this,"_typeName");this._reactVar=e,this._propName=c;try{this._typeName=e instanceof ge?"未获取到对象类型":(u=e[0])==null?void 0:u.typeName}catch{this._typeName="未获取到对象类型"}}get reactVar(){return this._reactVar}get propName(){return this._propName}get typeName(){return this._typeName}}class E extends Te{get type(){return"BooleanProperty"}}class N extends Te{get type(){return"StringProperty"}}class f extends Te{get type(){return"NumberProperty"}}class ne extends Te{get type(){return"Number2Property"}}class ue extends Te{get type(){return"Number3Property"}}class Fe extends Te{get type(){return"Number4Property"}}class G extends Fe{get type(){return"ColorProperty"}}class Yn extends f{get type(){return"DashPatternProperty"}}class Ve extends Te{get type(){return"DateProperty"}}class vo extends Te{get type(){return"DatesProperty"}}class k extends ei{constructor(e,t,i){super(e??"",i??"");a(this,"_placement");this._placement=t}get type(){return"DivideProperty"}get placement(){return this._placement}}class A extends Te{constructor(s,e,t,i,r,o,l){super(s,t,i,r,o,l),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class Xe extends Te{constructor(s,e,t,i,r,o,l){super(s,e,t,r,o,l),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class _n extends Te{constructor(s,e,t,i,r,o,l){super(s,e,t,r,o,l),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class L extends ei{constructor(e,t,i,r){const o=e??"Unnamed Function";super(o,r??o);a(this,"_paramsLength");this._func=t,this._defaultParams=i,this._paramsLength=this._func.length??0}get paramsLength(){return this._paramsLength}get defaultParams(){return this._defaultParams}get isOpen(){return this._defaultParams.length!==this._paramsLength}get func(){return this._func}run(...e){this._func(...e)}get type(){return"MethodProperty"}}class pe extends Te{constructor(s,e,t,i,r,o,l,h){super(s,i,r,o,l,h),this._step=e,this._minMax=t}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}class nt extends ue{get type(){return"PositionProperty"}}class ds extends ue{get type(){return"RotationProperty"}}function pp(n,s){const[e,t,i]=tn(n),[r,o,l]=tn(s),h=w((e()??0)/(r()??3e3)),c=()=>{const u=h.value,p=r()??3e3,g=e()??0;if(!Number.isFinite(p)||!Number.isFinite(g)){console.warn(`duration || currentTime error: duration: ${p} currentTime: ${g}`);return}Math.abs(u*p-g)<.001||(p<=0?h.value=0:h.value=g/p)};return h.dispose(i.disposableOn(c)),h.dispose(l.disposableOn(c)),h.dispose(h.changed.disposableOn(()=>{const u=h.value,p=r()??3e3,g=e()??0;if(!Number.isFinite(p)||!Number.isFinite(g)){console.warn(`duration || currentTime error: duration: ${p} currentTime: ${g}`);return}Math.abs(u*p-g)<.001||t(u*p)})),h}class us extends ei{constructor(e,t,i,r,o,l){super(r??"播放器",l??"播放器");a(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=t,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}a(us,"createPlayingRatio",pp);class jh extends ei{constructor(e,t,i,r,o,l){const h=r??"视角播放器";super(h,l??h);a(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=t,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class ie extends Te{constructor(s,e,t,i,r,o,l){super(s,e,t,r,o,l),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonArrayProperty"}}class R extends Te{constructor(s,e,t,i,r,o,l){super(s,e,t,r,o,l),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class _o extends mo{constructor(s,e,t,i,r,o){super(s,o??s,i??!1,r??!1),this._getFunc=e,this._setFunc=t}get getFunc(){return this._getFunc}get setFunc(){return this._setFunc}get type(){return"GetSetProperty"}}var I=(n=>(n.Place="place",n.BrushErase="brushErase",n.Translation="translation",n.Rotation="rotation",n.Scale="scale",n.DoublePointsAppend="doublePointsAppend",n.DoublePointsModify="doublePointsModify",n.CircularAppend="circularAppend",n.CircularInsert="circularInsert",n.LineStringAppend="lineStringAppend",n.LineStringInsert="lineStringInsert",n.ScatterAppend="scatterAppend",n.ScatterModify="scatterModify",n.VisibilityAppend="visibilityAppend",n.VisibilityModify="visibilityModify",n.HeightModify="heightModify",n.SinglePoint="singlePoint",n.DoublePoints="doublePoints",n))(I||{});const yo=[["地形","TERRAIN"],["3D Tiles","CESIUM_3D_TILE"],["地形和3D Tiles","BOTH"]],wo=[["直箭头","straightArrow"],["燕尾箭头","swallowTailArrow"]];var Rh=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(Rh||{});class gp{constructor(s){this.childPickedInfo=s}}class fp{constructor(s,e,t,i,r,o){this.pickResult=s,this.sceneObject=e,this.tilesetPickInfo=t,this.geojsonPickInfo=i,this.attachedInfo=r,this.screenPosition=o}assign(s){s!=null&&s.pickedResult&&(this.pickResult=s.pickedResult),s!=null&&s.sceneObject&&(this.sceneObject=s.sceneObject),s!=null&&s.tilesetPickInfo&&(this.tilesetPickInfo=s.tilesetPickInfo),s!=null&&s.geojsonPickInfo&&(this.geojsonPickInfo=s.geojsonPickInfo),s!=null&&s.attachedInfo&&(this.attachedInfo=s.attachedInfo),s!=null&&s.screenPosition&&(this.screenPosition=s.screenPosition)}}const ae=class ae extends M{constructor(e){super(e);a(this,"_editing",this.dv(w(!1)));a(this,"editingID");a(this,"editingBindMode","singlePoint");a(this,"_deprecated",[]);a(this,"_flyInEvent",this.dv(new v));a(this,"_flyToEvent",this.dv(new v));a(this,"_flyOverEvent",this.disposeVar(new v));a(this,"_pickedEvent",this.dv(new v));a(this,"_calcFlyToParamEvent",this.dv(new v));a(this,"_calcFlyInParamEvent",this.dv(new v));a(this,"useCalcFlyToParamInESObjectWithLocation",!1);Uh(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let t=0;t<e.length;t++){const i=e[t];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(r=>{Reflect.has(this,r+"Changed")&&this.d(this[r+"Changed"].don(l=>{const h=i[r];typeof h=="string"?console.warn(`注意:${this.typeName} 的 ${r} 属性下版本将会被移除!`):Object.keys(h).forEach((c=>{l===c&&console.warn(`注意:${this.typeName} 的 ${r} 属性值 ${c} 下版本将会被移除,推荐使用属性值 ${h[c]}`)}))}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,ae._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,ae._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new E([this,"show"],"是否显示",ae.defaults.show),new E([this,"collision"],"开启碰撞",ae.defaults.collision),new E([this,"allowPicking"],"允许拾取",ae.defaults.allowPicking),new L("保存观察视角",()=>this.calcFlyToParam(),[]),new L("清空飞向参数",()=>this.emptyFlyToParam(),[]),new L("保存飞入参数",()=>this.calcFlyInParam(),[]),new L("清空飞入参数",()=>this.emptyFlyInParam(),[])],more:[...e.more,new k("飞行定位"),new L("飞向",t=>this.flyTo(t),[1],"flyTo"),new R([this,"flyToParam"],"飞行参数",void 0,void 0,!0),new f([this,"flyToDistance"],"flyToDistance",void 0,!0),new f([this,"flyToHeading"],"flyToHeading",void 0,!0),new f([this,"flyToPitch"],"flyToPitch",void 0,!0),new f([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new f([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new f([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new k("飞入参数"),new L("飞入",t=>this.flyIn(t),[1],"flyIn"),new R([this,"flyInParam"],"飞入参数",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??ae.defaultFlyToParam,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??ae.defaultFlyToParam,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??ae.defaultFlyToParam,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??ae.defaultFlyToParam,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??ae.defaultFlyToParam,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??ae.defaultFlyToParam,pDelta:e}:void 0}};a(ae,"createDefaultProps",()=>({...M.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:te(void 0),flyInParam:te(void 0)})),a(ae,"type",ae.register("ESVisualObject",ae,{chsName:"可视化对象",tags:["ESObjects","base"],description:"可视化对象"})),a(ae,"supportEditingModes",[]),a(ae,"defaultFlyToParam",{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0}),a(ae,"defaultFlyInParam",{position:[0,0,0],rotation:[0,0,0],flyDuration:1}),a(ae,"_lastFlyInId",0),a(ae,"_lastFlyToId",0);let X=ae;class Nh extends b{constructor(){super();a(this,"_data",this.dv(w(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class Lh extends b{constructor(){super(...arguments);a(this,"_dragStartEvent",this.dv(new v));a(this,"_dragOverEvent",this.dv(new v));a(this,"_dragLeaveEvent",this.dv(new v));a(this,"_dropEvent",this.dv(new v))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function mp(n,s){s&&(Reflect.has(s,"editing")?s.editing=!0:Reflect.has(s,"positionEditing")&&(s.positionEditing=!0))}function vp(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function Kn(n,s){Ne(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),vt(n,"__treeItem",s)}function _p(n){return Ne(n,"__treeItem")}function yp(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const s=document.createElement("a");s.href=n;const e=s.href;return s.remove(),e}function Eo(n){if(typeof n!="string")return!1;try{const s=JSON.parse(n);return typeof s=="object"&&s!==null}catch{return!1}}function wp(n){try{return new DOMParser().parseFromString(n,"application/xml").getElementsByTagName("parsererror").length===0}catch{return!1}}function Ep(n){return n instanceof Function?n():n}function Vh(n,s){for(let e of n)if(s.includes(e))return!0;return!1}function yn(n,s){const e=n,t=s;return e===void 0||e.length===0||t===void 0||t.length===0?!0:Vh(e,t)}function bp(n){const s=setTimeout(()=>{n(),clearTimeout(s)})}function ps(n){let s=n%360;return s=s<0?360+s:s,s}function zh(n){return ps(n+180)-180}function Zn(n,s,e){let t=ps(n),i=ps(s);Math.abs(t-i)>180&&(t<i?t+=360:i+=360);const r=t*(1-e)+i*e;return zh(r)}function bo(n,s,e,t){return t=t||[0,0,0],t[0]=Zn(n[0],s[0],e),t[1]=Zn(n[1],s[1],e),t[2]=Zn(n[2],s[2],e),t}function Uh(n,s,e="editing"){const t=new b;n.ad(t);const i=s.bind(n);return t.ad(new le(n.activeViewerChanged,()=>{const r=new b;let o=n.activeViewer;return o?(r.ad(n[`${e}Changed`].don(()=>{var l;n[`${e}`]?i():(l=(n.components.main??n).editingID)!=null&&l.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),r.ad(o.editingEvent.don(l=>{if(l.objectIDs.includes(n.id)&&l.type==="end"){const h=n.components.main??n;h.editingID&&(l.editingID.includes(h.editingID)?(h.editingID=void 0,n[e]=!1):n[e]=!h.editingID.includes("outer"))}}))):r.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),r})),n[`${e}`]&&i(),t}function Bh(n){var e;const s=Array.isArray(n)?"feature":((e=n.type)==null?void 0:e.toLowerCase())??"";switch(s){case"geometrycollection":return Sp(n);case"topology":const t=n.objects,i=[];for(const r in t){const o=Cd.feature(n,t[r]);i.push(...o.features)}return{type:"FeatureCollection",features:i};case"feature":return{type:"FeatureCollection",features:Array.isArray(n)?n:[n]};case"featurecollection":return n;default:return console.warn(`GeoJson数据转换可能有误,数据类型${s}`),{type:"FeatureCollection",features:Array.isArray(n.features)?n.features:[]}}}function Sp(n,s){const e=[],t=n.geometries||[];function i(r,o={}){!r||!r.type||(r.type==="GeometryCollection"&&Array.isArray(r.geometries)?r.geometries.forEach(l=>i(l,o)):e.push({type:"Feature",geometry:r,properties:{...r.properties||{},...o}}))}return t.forEach(r=>i(r,{})),{type:"FeatureCollection",features:e}}function Cp(n){const s=n.cloneNode(!0);s.style.position="fixed",s.style.visibility="hidden",s.style.pointerEvents="none",s.style.top="0",s.style.left="0",s.style.display="inline-block",document.body.appendChild(s);const e=s.getBoundingClientRect();return document.body.removeChild(s),{x:e.x,y:e.y,width:e.width,height:e.height}}function Pp(n,s,e=!1){var p,g,m,y,S,C;const t=[],i=[],r=[],o=[],l=[],h=new Set,c=new Map;if(s!=null&&s.features)for(const T of s.features){const V=((p=T.id)==null?void 0:p.toString())||((m=(g=T.properties)==null?void 0:g.id)==null?void 0:m.toString());V&&(h.add(V),c.set(V,T))}if(n!=null&&n.features)for(const T of n.features){const V=((y=T.id)==null?void 0:y.toString())||((C=(S=T.properties)==null?void 0:S.id)==null?void 0:C.toString());if(V)if(h.has(V)){if(e){const z=c.get(V);z&&Wh(z,T)?o.push(V):l.push(V)}t.push(V)}else i.push(V)}for(const T of h)t.includes(T)||r.push(T);const u={unchangedIds:t,newIds:i,removedIds:r};return e&&(u.contentUnchangedIds=o,u.contentUpdatedIds=l),u}function Wh(n,s){return Hh(n.geometry,s.geometry)?JSON.stringify(n.properties)===JSON.stringify(s.properties):!1}function Hh(n,s){if(n===s)return!0;if(!n||!s||n.type!==s.type)return!1;const e=n.coordinates,t=s.coordinates;if(n.type==="Point")return Tp(e,t);if(n.type==="LineString"||n.type==="MultiPoint")return Qn(e,t);if(n.type==="Polygon"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Qn(e[i],t[i]))return!1;return!0}if(n.type==="MultiLineString"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Qn(e[i],t[i]))return!1;return!0}if(n.type==="MultiPolygon"){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++){const r=e[i],o=t[i];if(r.length!==o.length)return!1;for(let l=0;l<r.length;l++)if(!Qn(r[l],o[l]))return!1}return!0}return JSON.stringify(n)===JSON.stringify(s)}function Tp(n,s){if(!n||!s)return n===s;if(n.length!==s.length)return!1;for(let e=0;e<n.length;e++)if(Math.abs(n[e]-s[e])>1e-10)return!1;return!0}function Qn(n,s){if(n===s)return!0;if(!n||!s||n.length!==s.length)return!1;for(let e=0;e<n.length;e++){const t=n[e],i=s[e];if(t.length!==i.length)return!1;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-i[r])>1e-10)return!1}return!0}class So extends b{constructor(e){super();a(this,"_sceneObject",this.dv(w(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const t=M.getSceneObjById(this._id);t&&(this._sceneObject.value=t),this.d(M.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(M.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class Ip extends b{constructor(e,t){super();a(this,"_sofi");this._id=e,this._sofi=this.dv(new So(this._id));{const i=()=>{t.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class $h extends b{constructor(){super();a(this,"_id",this.dv(w(void 0)));a(this,"_sceneObject",this.dv(w(void 0)));a(this,"_resetting",this.dv(new le(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new Ip(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class xp extends b{constructor(e,t,i,r){super();a(this,"_sceneObjectId",this.dv(new $h));this._id=e,this._startTimeStamp=t,this._duration=i,this._parent=r,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:l=0}=this._parent,h=l-this._startTimeStamp;this.player.currentTime=Hn(h,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof Ye?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const Op=`
|
|
24
24
|
用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
|
|
25
25
|
注意时间的单位是毫秒。
|
|
26
26
|
示例如下:
|
|
@@ -38,10 +38,123 @@ ${c.map(u=>`${u.id} ${u.typeName}
|
|
|
38
38
|
]
|
|
39
39
|
]
|
|
40
40
|
\`\`\`
|
|
41
|
-
`,ye=class ye extends b{constructor(){super();a(this,"_ratio",this.dv(y(0)));a(this,"_subPlayers",this.dv(new Xs));const e=this.dv(new Rn);{const o=()=>{e.loop=this.loop??ye.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??ye.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??ye.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??ye.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??ye.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??ye.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??ye.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??ye.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??ye.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??ye.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const t=()=>{const o=this.duration??ye.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??ye.defaults.currentTime)/o)};t();const i=this.dv(ae(this.currentTimeChanged,this.durationChanged));this.d(i.don(t)),this.d(()=>{const{length:o}=this._subPlayers;for(let h=0;h<o;++h)this._subPlayers.get(h).destroy();this._subPlayers.length=0});const r=()=>{for(let h of this._subPlayers)h.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(h=>{const[c,l,u]=h;return new Zu(c,l,u,this)});this._subPlayers.splice(0,0,...o)};r(),this.d(this.channelsChanged.don(r))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??ye.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};a(ye,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),a(ye,"channelsReadMe",Qu);let tt=ye;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:Xt(void 0,(s,e)=>s==null?void 0:s.every((t,i)=>t===e[i]),s=>[...s])})})(tt||(tt={})),Yt(tt.prototype,tt.createDefaultProps);class ep extends b{constructor(s,e,t,i){super(),this.disposeVar(new ce(s.sceneObjectChanged,()=>{let r;i.debug&&console.log("正在获取Event事件...");const o=s.sceneObject;if(o&&e){const h=e.split(".");if(h.length===0)i.debug&&console.warn("propNames.length === 0");else{let c=Mr(o,!1,...h);(!c||!(c instanceof m))&&(h[h.length-1]=h[h.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${h[h.length-1]})再试试!`),c=Mr(o,!1,...h),i.debug&&c&&console.warn("event仍然获取不到!")),c?c instanceof m?(r=c,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,r)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(r){const h=new b;return h.d(r.dwon(()=>t.emit())),h}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const bc=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends b{constructor(e,t,i){super();a(this,"_doEvalEvent",this.dv(new m));const r=this._doEvalEvent,o=this.disposeVar(ae(r)),h=e.map(([c,l])=>{const u=new lo(c),p=l&&new ep(u,l,r,t)||void 0;return[u,p]});this.d(()=>{h.forEach(([c,l])=>{l==null||l.destroy(),c.destroy()}),h.length=0}),this.d(r.don(()=>{const{evalMode:c="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=t;if(c==="Immediate"){const u=h.map(([p])=>p.sceneObject);(!l||u.every(p=>p!==void 0))&&i(u)}})),this.d(o.don(()=>{const{evalMode:c="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=t;if(c==="NextAnimateFrame"){const u=h.map(([p])=>p.sceneObject);(!l||u.every(p=>p!==void 0))&&i(u)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:tp}=bc;class an extends b{constructor(){super();a(this,"_evalFunc");a(this,"_forceExecute",new m);const e=this.dv(y(void 0)),t=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};t(),this.dispose(this.evalFuncStrChanged.disposableOn(t));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},r=this.disposeVar(new ce(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new tp(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=r.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(n=>{n.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:Cn([],(s,e)=>s[0]===e[0]&&s[1]===e[1],s=>[s[0],s[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:W(void 0),devTags:ee(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(an||(an={})),Yt(an.prototype,an.createDefaultProps);const Ec=Za("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function it(n){return Ec.forward(n)}function uo(n){return Ec.inverse(n)}const Cc=Za("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function ip(n){const s=Cc.forward([n[0],n[1]]);return[s[0],s[1],n[2]]}function sp(n){const s=Cc.inverse([n[0],n[1]]);return[s[0],s[1],n[2]]}function np(n,s){const e=n[0],t=n[n.length-1];(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2])&&n.push(e);const i=X.point(s),r=X.polygon([n]);return X.booleanPointInPolygon(i,r)}function rp(n,s){const e=U.lineString(n);return U.along(e,s,{units:"meters"}).geometry.coordinates}function po(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const s=U.polygon([n]);return U.area(s)}function op(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const s=U.polygon([n]),t=U.centerOfMass(s).geometry.coordinates;return[t[0],t[1],t[2]??n[0][2]??0]}function go(...n){let[s,e,t,i]=n;const[r,o,h]=s;if(Array.isArray(e)){const[c,l,u]=e,p=Math.sqrt(c*c+l*l);let g=0;p>0&&(g=Math.atan2(c,l)*(180/Math.PI),g<0&&(g+=360));const f=U.destination(U.point([r,o]),p,g,{units:"meters"});return!f||!f.geometry||!f.geometry.coordinates?void 0:(t=t||[0,0,0],t[0]=f.geometry.coordinates[0],t[1]=f.geometry.coordinates[1],t[2]=h+(u||0),t)}else{const c=U.destination(U.point([r,o]),e,t,{units:"meters"});return!c||!c.geometry||!c.geometry.coordinates?void 0:(i=i||[0,0,0],i[0]=c.geometry.coordinates[0],i[1]=c.geometry.coordinates[1],i[2]=h,i)}}function Bn(n,s){return U.distance(U.point(n),U.point(s),{units:"meters"})}function hn(n,s){return U.bearing(U.point(n),U.point(s))}function ap(n,s){return U.lineIntersect(U.lineString(n),U.lineString(s))}function hp(n,s){const e=U.point(n),t=U.point(s),i=U.midpoint(e,t),r=(n[2]+s[2])/2;return[...i.geometry.coordinates,r]}function cp(n,s){const e=U.point(s),t=U.lineString(n);return U.nearestPointOnLine(t,e,{units:"meters"})}function lp(n,s){const e=U.point(n),t=U.lineString(s);return U.pointToLineDistance(e,t,{units:"meters"})}function dp(n,s,e,t){const[i,r,o]=n,h=U.rhumbDestination(U.point([i,r]),s,e,{units:"meters"});if(!(!h||!h.geometry||!h.geometry.coordinates))return t=t||[0,0,0],t[0]=h.geometry.coordinates[0],t[1]=h.geometry.coordinates[1],t[2]=o,t}function Sc(n,s){return U.rhumbDistance(U.point(n),U.point(s),{units:"meters"})}function up(n,s){return U.rhumbBearing(U.point(n),U.point(s))}function Pc(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=U.intersect(U.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function Tc(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=U.union(U.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function Ic(n,s=500,e="meters"){const t=U.buffer(U.lineString(n),s,{units:e});if(t)return t.geometry.coordinates}function Oc(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=U.difference(U.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function Dc(n,s,e=10,t="meters"){const i={steps:e,units:t};return U.circle(n,s,i).geometry.coordinates}function fo(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=U.polygon([n]),t=U.polygon([s]);return U.booleanContains(e,t)?"oneBig":U.booleanWithin(e,t)?"twoBig":!1}function Hn(n){const s=Kt(mi(n,["0"])),e=Kt(mi(n,["1"])),t=Kt(mi(n,["2"])),i=At(mi(n,["0"])),r=At(mi(n,["1"])),o=At(mi(n,["2"]));return{minPos:[s,e,t],maxPos:[i,r,o],center:[(s+i)*.5,(e+r)*.5,(t+o)*.5]}}function Fc(n){const{minPos:s,maxPos:e,center:t}=Hn(n);if(s.some(h=>!Number.isFinite(h)||e.some(c=>!Number.isFinite(c))||t.some(c=>!Number.isFinite(c)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=Bn(s,e);let r=i*.5;const o=Math.abs(s[2]-e[2]);return o!=0&&(r=Math.sqrt(i*i+o*o)*.5),{center:t,radius:r}}function xc(n,s){const e=it(n),t=it(s);return d.Vector.distance(e,t)}function Lt(n,s){const e=[],t=n.length;let i=0;for(let r=0;r<t-1;++r){if(s===void 0||s==="GEODESIC"){const o=Bn(n[r],n[r+1]),h=Math.abs(n[r][2]-n[r+1][2]);if(h===0)i+=o;else{const c=Math.sqrt(o*o+h*h);i+=c}}else if(s==="RHUMB"){const o=Sc(n[r],n[r+1]),h=Math.abs(n[r][2]-n[r+1][2]);if(h===0)i+=o;else{const c=Math.sqrt(o*o+h*h);i+=c}}else if(s==="NONE"){const o=xc(n[r],n[r+1]);i+=o}else console.warn(`未知的arcType: ${s},导致距离无法计算!`);e.push(i)}return e}function mo(n){const s="__getXyzFromPostion";let e=Ae(n,s);return(!e||!d.Vector.equals(e[0],n))&&(e=[[...n],it(n)],gt(n,s,e)),e[1]}class pp{constructor(s={}){a(this,"points");a(this,"duration");a(this,"sharpness");a(this,"centers");a(this,"controls");a(this,"stepLength");a(this,"length");a(this,"delay");a(this,"steps");this.points=s.points||[],this.duration=s.duration||1e4,this.sharpness=s.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=s.stepLength||60,this.length=this.points.length,this.delay=0;for(let e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(let e=0;e<this.length-1;e++){const t=this.points[e],i=this.points[e+1];this.centers.push({x:(t.x+i.x)/2,y:(t.y+i.y)/2,z:(t.z+i.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(let e=0;e<this.centers.length-1;e++){const t=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,i=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,r=this.points[e+1].z-(this.centers[e].z+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+t),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+r)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+t),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+r)}])}this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength)}cacheSteps(s){const e=[];let t=this.pos(0);e.push(0);for(let i=0;i<this.duration;i+=10){const r=this.pos(i);Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)+(r.z-t.z)*(r.z-t.z))>s&&(e.push(i),t=r)}return e}vector(s){const e=this.pos(s+10),t=this.pos(s-10);return{angle:180*Math.atan2(e.y-t.y,e.x-t.x)/3.14,speed:Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)+(t.z-e.z)*(t.z-e.z))}}pos(s){let e=s-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);const t=e/this.duration;if(t>=1)return this.points[this.length-1];const i=Math.floor((this.points.length-1)*t),r=(this.length-1)*t-i;return gp(r,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])}}function gp(n,s,e,t,i){const r=fp(n);return{x:i.x*r[0]+t.x*r[1]+e.x*r[2]+s.x*r[3],y:i.y*r[0]+t.y*r[1]+e.y*r[2]+s.y*r[3],z:i.z*r[0]+t.z*r[1]+e.z*r[2]+s.z*r[3]}}function fp(n){const s=n*n;return[s*n,3*s*(1-n),3*n*(1-n)*(1-n),(1-n)*(1-n)*(1-n)]}function mp(n,s){s===void 0&&(s={});var e=s.resolution||1e3,t=s.sharpness||.85;const i=[],r=n.map(l=>{const[u,p,g]=it(l);return{x:u,y:p,z:g}});for(var o=new pp({duration:e,points:r,sharpness:t}),h=function(l){var u=o.pos(l);const p=uo([u.x,u.y,u.z]);i.push(p)},c=0;c<o.duration;c+=10)h(c);return h(o.duration),i}function rs(n,s,e){return mp(n,{resolution:s,sharpness:e})}function vo(n){return Xt(n,(s,e)=>s[0]===e[0]&&s[1]===e[1],s=>[...s])}function kc(n,s){const e=new Array;for(let t of n)e.push(s(t));return e}function $n(n,s){return n===void 0&&s===void 0?!0:!n||!s?!1:n[0]===s[0]&&n[1]===s[1]&&n[2]===s[2]}function Mc(n,s,e){var i;((i=s.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(s))?e.call(n):requestAnimationFrame(()=>Mc(n,s,e))}function vp(n,s,e,t=!0){t&&e(),n.dispose(s.disposableOn(e))}function _p(n,s){const{type:e,id:t}=n;if(e){const i=k.create(e,t);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function jc(n){const s=n.children&&xr(n.children,t=>{if(!(t instanceof Oe))throw new Error("!(treeItem instanceof SceneTreeItem)");return!t.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!s||e}class Oe extends nn{constructor(e,t=!1,i,r,o=!0){super(e,t,i);a(this,"_dragDrop");a(this,"_showChangedNotAffectChildren",!1);a(this,"_showChangedNotAffectParent",!1);a(this,"_type",this.dv(y("Unknown")));a(this,"_isExport",this.dv(y(!0)));const h=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(h)),this.name=`未命名条目(${this.id})`,this.extras=r,this._isExport.value=o;let c;const l=()=>{c&&(c(),c=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(u=>{l(),u&&(c=x([this,"name"],[u,"name"]))})),this.dispose(this.showChanged.disposableOn(u=>{if(e.setSceneObjectShowFunc(this.sceneObject,u),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let p of this.children)p instanceof Oe&&(p._showChangedNotAffectParent=!0,p.show=u,p._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Oe&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=jc(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new ce(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const u=new b;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof m){const p=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};p(),u.dispose(this.sceneObject.showChanged.disposableOn(p))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof m){const p=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};p(),u.dispose(this.sceneObject.enabledChanged.disposableOn(p))}return u})),this.childrenChangedEvent.disposableOn(()=>{const u=jc(this);this._showChangedNotAffectChildren=!0,this.show=u,this._showChangedNotAffectChildren=!1});{const u=()=>{let p="Unknown";this.sceneObject?p=this.sceneObject.typeName:this.children&&(p="Folder"),this._type.value=p};this.dispose(this.sceneObjectChanged.disposableOn(u)),this.dispose(this.childrenResetedEvent.disposableOn(u)),u()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(t){console.error(`sceneTreeItem.jsonStr error ${t}`,t)}}get completeJson(){const e=this.children&&[...this.children].filter(t=>t.isExport).map(t=>t.completeJson);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.completeJson,children:e,extras:this.extras}}get json(){const e=this.children&&[...this.children].filter(t=>t.isExport).map(t=>t.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let t of e.children){const i=new Oe(this.tree,!0);i.json=t,this.children.push(i)}}}clone(){try{const e=new Oe(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,t){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(t&&t.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return t&&this.children.push(t),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",t);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",t);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,t)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:te(void 0)})})(Oe||(Oe={})),Yt(Oe.prototype,Oe.createDefaultProps);function Rc(n,s,e){let{offsetY:t}=s;if(!s.target||!("clientTop"in s.target))return"none";t+=2,t+=s.target.clientTop;let i="none";return n.children?t<=e*.3?i="before":t>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":t<=e*.5?i="before":i="after",i}class Ac extends pc{constructor(s){super(),this._treeItem=s;const{dragStartDataManager:e}=this._treeItem.sceneTree;let t="none";const i=this.disposeVar(yh(()=>{this._treeItem.uiTreeObject.moveToPositionMode=t,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${t});`)},200));function r(o){t!==o&&(t=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const h=e;if(h.data&&h.data.type==="UITreeA"&&h.data.value!==void 0){const c=h.data.value,l=this._treeItem,{tree:u}=l;if(u){const p=[...u.selectedItems];~p.indexOf(c)||p.push(c);const g=Rc(l,o,u.itemDivHeight);if(g!=="none"&&bi.canMoveToTreeItems(p,l,g)){o.dataTransfer.dropEffect="move",r(g);return}}}o.dataTransfer.dropEffect="none",r("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const h=e;if(!(h.data&&h.data.type==="UITreeA"&&h.data.value!==void 0))return;const c=h.data.value,l=this._treeItem,{tree:u}=l;if(!u)return;const p=[...u.selectedItems];~p.indexOf(c)||p.push(c);const g=Rc(l,o,u.itemDivHeight);g!=="none"&&bi.canMoveToTreeItems(p,l,g)&&(bi.moveToTreeItems(p,l,g),h.data=void 0,r("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{t="none",i.restart()}))}}function wp(n){if(!(n instanceof Oe))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new Ac(n)}function yp(n){let s=!1;return n&&("show"in n?s=n.show??!0:"enabled"in n&&(s=n.enabled??!0)),s}function bp(n,s){n&&("show"in n?n.show=s:"enabled"in n&&(n.enabled=s))}const Ep=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function Cp(n){const s=[],{root:e={}}=n,t=[e];for(;t.length>0;){const i=t.pop();if(!i)throw new Error("!todo");if(i.children){for(let r of i.children)if(r.children&&t.unshift(r),r.sceneObj){const{type:o=void 0}=r.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(r.sceneObj)),o&&Ep.includes(o)&&s.push(r.sceneObj)}}}return s}async function Sp(n,s){const e=Cp(n);let t=0;const i=e.length;for(let r of e)if(++t,s){const o=t/i;s(o,t,i)}}class Nc extends b{constructor(e,t){super();a(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=t}get sceneTree(){return this._sceneTree}}class Pp extends b{constructor(e){super();a(this,"_jsonLoadingEvent",this.disposeVar(new m));a(this,"_setJsonProcessing",this.disposeVar(Ne(async(e,t)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),t&&await e.promise(this._sceneTree.preloadFunc(t)),this._setJson(t),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=t=>{this._jsonLoadingEvent.emit({type:"error",error:t})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(t){console.error(`json数据装配时发生错误!error: ${t}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new et("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function Tp(n){return n.name+"_clone"}function _o(n,s,e){if(n instanceof Oe)return n.insertNewTreeItem(s,e);{const t={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(t[s],e)}}function Ip(n){[n,...n.getDescendants()].forEach(s=>s.destroy())}const xe=class xe extends bi{constructor(e,t,i,r){super(i);a(this,"_jsonLoading",this.disposeVar(new Pp(this)));a(this,"createSceneObjectFunc",xe.defaultCreateSceneObjectFunc);a(this,"createTreeItemDragDropFunc",xe.defaultCreateTreeItemDragDropFunc);a(this,"preloadFunc",xe.defaultPreload);a(this,"getSceneObjectShowFunc",xe.defaultGetSceneObjectShow);a(this,"setSceneObjectShowFunc",xe.defaultSetSceneObjectShow);a(this,"getSceneTreeItemCloneNameFunc",xe.defaultGetSceneTreeItemCloneNameFunc);a(this,"debug",!1);a(this,"_contextMenu",this.disposeVar(new Nc(this,this.projectManager)));a(this,"_showPropUiOnSelecting",this.disposeVar(y(!0)));this._name=e,this._dragStartDataManager=t,this._projectManager=r,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var h,c;globalThis.lssn=this.lastSelectedItem,globalThis.lsso=(h=this.lastSelectedItem)==null?void 0:h.sceneObject,this.debug&&console.log(((c=this.lastSelectedItem)==null?void 0:c.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(h=>{for(let c of h){const l=c,{sceneObject:u}=l;u&&o.deleteSceneObject(u)&&u.destroy()&&zn(u,void 0);for(let p of l.getDescendants()){const{sceneObject:g}=p;g&&o.deleteSceneObject(g)&&g.destroy()&&zn(g,void 0)}Ip(c)}})),this.dispose(this.itemsAdded.disposableOn(h=>{for(let c of h){const l=c;l.sceneObject&&o.addSceneObject(l.sceneObject)&&zn(l.sceneObject,l)}}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const t=this.getDescendants();let i;for(let r of t)if(r.sceneObject&&r.sceneObject.id===e){i=r;break}return i}getTreeItemsFromSceneObjType(e){const t=this.getDescendants(),i=[],r=Array.isArray(e)?e:[e];for(let o of t)o.sceneObject&&r.includes(o.sceneObject.typeName)&&i.push(o);return i}getTreeItemsFromSceneObjName(e){var r;const t=this.getDescendants(),i=[];for(let o of t)(r=o.sceneObject)!=null&&r.name.includes(e)&&i.push(o);return i}get dragStartDataManager(){return this._dragStartDataManager}get completeJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.completeJson)}}}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const t=e.root.children??[];this.root.resetChildren(!0);for(let r of t){const o=new Oe(this,!0);o.json=r,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,t){const i=e||this.lastSelectedItem||this.root;return i?_o(i,t):!1}addNewTreeItem(e,t,i,r){const o=e||this.lastSelectedItem||this.root;if(o&&_o(o,t)){const h=new Oe(this,i);if(h.sceneObject=r,!_o(o,t,h))throw new Error("currentTreeItem.insertNewTreeItem return false!");return h}}createSceneObjectTreeItem(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const h=k.create(e,t);return h?this.addNewTreeItem(i,r??"FolderInnerOrAfter",!0,h):void 0}createGroupTreeItem(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const h=this.addNewTreeItem(i,r??"FolderInnerOrAfter",!0);if(!h){console.warn("addNewTreeItem error!");return}return h.name=e??"未命名组节点",h}createSceneObjectTreeItemFromClass(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const h=k.createFromClass(e,t);return h?this.addNewTreeItem(i,o,!0,h):void 0}createSceneObjectTreeItemFromJson(e,t,i){const r=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(t,r))return;const o=k.createFromJson(e);return console.log(o),o?this.addNewTreeItem(t,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let t of e)this.destroySceneObjectTreeItem(t)}};a(xe,"defaultCreateSceneObjectFunc",_p),a(xe,"defaultCreateTreeItemDragDropFunc",wp),a(xe,"defaultPreload",Sp),a(xe,"defaultGetSceneObjectShow",yp),a(xe,"defaultSetSceneObjectShow",bp),a(xe,"defaultGetSceneTreeItemCloneNameFunc",Tp);let cn=xe;const wo={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class Op extends b{constructor(e){super();a(this,"_currentPosition",this.disposeVar(ee(void 0)));a(this,"_currentRotation",this.disposeVar(ee(void 0)));a(this,"_currentHeading",this.disposeVar(y(void 0)));a(this,"_isRotating",this.disposeVar(y(!1)));a(this,"_isGround",this.disposeVar(y(!1)));a(this,"_startPosition",[0,0,0]);a(this,"_startRotation",[0,0,0]);a(this,"_processing",this.disposeVar(Ne(async(e,t,i,r)=>{const{currentPosition:o,currentRotation:h}=this;if(!o||r<=0||!h){this._currentPosition.value=t,this._currentRotation.value=i;return}const c=this._startPosition;c.splice(0,3,...o);const l=this._startRotation;l.splice(0,3,...h);let u=Date.now();const p=hn(c,t);this._currentHeading.value=p;const f=Bn(c,t)/r,w=[i[0]-l[0],i[1]-l[1],i[2]-l[2]],E=t[2]-c[2];await e.promise(new Promise(C=>{e.disposer.dispose(Tn(async()=>{let T=Date.now()-u;T=T<0?0:T,T=T>r?r:T;const R=T*f,V=go(c,R,p);if(this.isGround&&V){const I=await this._esviewer.getTerrainHeight([V[0],V[1]]);this._currentPosition.value=[V[0],V[1],I??0]}else V&&(V[2]+=E*(T/r)),this._currentPosition.value=V;if(this.isRotating){const[I,H,q]=w,Z=T/r;this._currentRotation.value=[l[0]+I*Z,l[1]+H*Z,l[2]+q*Z]}T===r&&(this._currentPosition.value=t,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,C())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,t,i){this._processing.restart(void 0,e,t,i)}cancel(){this._processing.cancel()}}const Dp=.06,Vc=1.5,Lc=2,zc=70,Uc=60;function Ei(n){return X.point(n)}function wt(n,s,e){const t=Ei(n),i=X.destination(t,e,s,{units:"meters"}),[r,o]=X.getCoords(i);return[r,o,n[2]]}function Gn(n,s){return X.bearing(Ei(n),Ei(s))}function Jn(n,s,e,t,i=1e3){const r=X.lineString([X.getCoords(X.destination(Ei(n),i,(s+180)%360,{units:"meters"})),n,X.getCoords(X.destination(Ei(n),i,s,{units:"meters"}))]),o=X.lineString([X.getCoords(X.destination(Ei(e),i,(t+180)%360,{units:"meters"})),e,X.getCoords(X.destination(Ei(e),i,t,{units:"meters"}))]),h=X.lineIntersect(r,o);if(h.features.length>0){const[c,l]=X.getCoords(h.features[0]);return[c,l,(n[2]+e[2])/2]}return e}function Wc(n,s,e,t){const i=(e-90+360)%360,r=(e+90+360)%360;n.leftPoints.push(wt(s,i-zc,t*Vc)),n.headPoints.push(wt(s,i-Uc,t*Lc)),n.headPoints.push(s),n.headPoints.push(wt(s,r+Uc,t*Lc)),n.rightPoints.push(wt(s,r+zc,t*Vc))}function Fp(n,s,e,t){const i=(s-90+360)%360,r=(s+90+360)%360,o=e*Dp*Math.min(.3,1-t);return{leftPoint:wt(n,i,o),rightPoint:wt(n,r,o),verticalLen:o}}function xp(n,s){if(!n||n.length<2)return;const e=s==="swallowTailArrow",t=n.length,i=t-1,r=Math.max(...Lt(n,"NONE")),o={leftPoints:[],rightPoints:[],headPoints:[]};let h;for(let f=0;f<t;f++){const w=n[f],E=f==i?n[n.length-2]:n[f+1],C=f==i?Gn(E,w):Gn(w,E),{leftPoint:T,rightPoint:R,verticalLen:V}=Fp(w,C,r,f/t);f===0?(o.leftPoints.push(T),o.rightPoints.push(R),e&&(o.tailPoint=wt(w,C,V))):f===i?Wc(o,w,C,V):h!==void 0?(o.leftPoints.push(Jn(o.leftPoints[f-1],h,T,C,r)),o.rightPoints.push(Jn(o.rightPoints[f-1],h,R,C,r))):(o.leftPoints.push(T),o.rightPoints.push(R)),h=C}const c=o.leftPoints,l=o.rightPoints,u=c.length>=2?rs(c):c,p=l.length>=2?rs(l):l,g=[...u,...o.headPoints,...p.reverse()];return o.tailPoint&&g.push(o.tailPoint),g.push(o.leftPoints[0]),g}function kp(n,s,e,t){const i=X.lineString([[n[0],n[1]],[s[0],s[1]]]),r=X.lineString([[e[0],e[1]],[t[0],t[1]]]);return X.lineIntersect(i,r).features.length>0}function Mp(n,s,e,t){const i=(s-90+360)%360,r=(s+90+360)%360,o=e*Math.min(.3,1-t);return{leftPoint:wt(n,i,o),rightPoint:wt(n,r,o),verticalLen:o}}function jp(n,s){if(!n||n.length<3)return;const e=s==="swallowTailArrow",t=n.length,i=t-1,r=n.slice(0,2),o=Hn(r),h=Lt(r,"NONE").pop()??0,c=Math.max(...Lt(n,"NONE")),l={leftPoints:[],rightPoints:[],headPoints:[]};let u;for(let C=1;C<t;C++){const T=C===1?o.center:n[C],R=C===i?n[t-2]:n[C+1],V=C===i?Gn(R,T):Gn(T,R);let{leftPoint:I,rightPoint:H,verticalLen:q}=Mp(T,V,h,C/t);if(C===1)l.leftPoints.push(r[0]),l.rightPoints.push(r[1]),e&&(l.tailPoint=wt(T,V,h));else if(C===i)Wc(l,T,V,q);else if(u!==void 0){if(C===2&&kp(l.leftPoints[0],I,l.rightPoints[0],H)){const Me=l.leftPoints[0];l.leftPoints[0]=l.rightPoints[0],l.rightPoints[0]=Me}const Z=C-2;l.leftPoints.push(Jn(l.leftPoints[Z],u,I,V,c)),l.rightPoints.push(Jn(l.rightPoints[Z],u,H,V,c))}else l.leftPoints.push(I),l.rightPoints.push(H);u=V}let p=l.leftPoints,g=l.rightPoints;const f=p.length>=2?rs(p):p,w=g.length>=2?rs(g):g,E=[...f,...l.headPoints,...w.reverse()];return l.tailPoint&&E.push(l.tailPoint),E.push(p[0]),E}function yo(n,s,e=!1){return e?jp(n,s):xp(n,s)}function Bc(n){let s=0;function e(t,i){i++,s=Math.max(i,s),t.forEach(r=>{Array.isArray(r)&&e(r,i)})}return e(n,0),s}const bt=class bt extends Y{constructor(e){super(e);a(this,"editingBindMode","lineString");a(this,"_area",this.dv(y(0)));a(this,"_perimeter",this.dv(y(0)));this.d(ue(this.pointsChanged,()=>{this._updateArea(),this._updatePerimeter()},{immediate:!0}))}updateEditing(){var t;const e=[];this.editingBindMode=="doublePoints"?e.push(D.DoublePoints):this.editingBindMode=="lineString"?e.push(D.LineStringAppend,D.LineStringInsert,D.Translation):this.editingBindMode=="circular"?(e.push(D.CircularAppend,D.CircularInsert,D.Translation),this.supportEditingModes().includes(D.HeightModify)&&e.push(D.HeightModify)):this.editingBindMode=="visibility"?e.push(D.VisibilityAppend,D.VisibilityModify):this.editingBindMode=="scatter"&&e.push(D.ScatterAppend,D.ScatterModify),(t=this.activeViewer)==null||t.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return po([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Lt(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],t=Lt(e,"GEODESIC");return t[t.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=Pc(this.points,e);if(!t)return;const i=t[0][0][0];if(Array.isArray(i)){const r=[...t],o=[];return r.forEach(h=>{const c=h[0].map(l=>[...l,0]);o.push(c)}),o}else return[[...t][0].map(h=>[...h,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=Tc(this.points,e);if(!t)return;const i=t[0][0][0];if(Array.isArray(i)){const r=[...t],o=[];return r.forEach(h=>{const c=h[0].map(l=>[...l,0]);o.push(c)}),o}else return[[...t][0].map(h=>[...h,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let t=[...e];const i=e[0],r=e[e.length-1];i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2]||t.push(i);const o=Oc([...this.points,this.points[0]],[...t]);if(!o)return{status:"undefined",positions:void 0};const h=[...o];if(Bc(h)===3){const c=h.map(g=>g.map(f=>[...f,0]));if(c.length<=1)return{status:"notIncluded",positions:c};const l=c[0],u=c[1];return fo([...l],[...u])==="oneBig"?{status:"included",positions:c}:{status:"notIncluded",positions:c}}else if(Bc(h)===4){const l=[...h.map(p=>p.map(g=>g.map(f=>[...f,0])))],u=[];return l.forEach(p=>{u.push(p[0])}),{status:"notIncluded",positions:u}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,t){if(this.points&&this.points.length>=2){const i=Ic(this.points,e,t);return i?[i[0].map(r=>[...r,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=fo(this.points,e);return t==="oneBig"?!0:t==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new S([this,"editing"],"编辑",!1),new re([this,"points"],"位置数组",bt.defaults.points,void 0,!0)],style:[...e.style,new L("点样式"),new S([this,"pointed"],"开启",!1),new v([this,"pointSize"],"点大小",1),new j([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new G([this,"pointColor"],"点颜色",[1,1,1,1]),new G([this,"pointOutlineColor"],"轮廓颜色",bt.defaults.pointStyle.outlineColor),new v([this,"pointOutlineWidth"],"轮廓宽度",bt.defaults.pointStyle.outlineWidth),new L("线样式"),new S([this,"stroked"],"开启线样式",!0),new S([this,"strokeGround"],"贴地",!1),new v([this,"strokeWidth"],"线宽",1),new j([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new L("面样式"),new S([this,"filled"],"开启",!1),new S([this,"fillGround"],"贴地",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new L("点样式集合"),new A([this,"pointMaterial"],"点材质"),new z([this,"pointMaterialParams"],"点材质参数",{}),new L("线样式集合"),new A([this,"strokeMaterial"],"线材质"),new z([this,"strokeMaterialParams"],"线材质参数",{}),new L("面样式集合"),new A([this,"fillMaterial"],"面材质"),new z([this,"fillMaterialParams"],"面材质参数",{})]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};a(bt,"createDefaultProps",()=>({...Y.createDefaultProps(),pointed:!1,pointStyle:W({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:W({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:fi([])})),a(bt,"type",bt.register("ESGeoVector",bt,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),a(bt,"supportEditingModes",[...Y.supportEditingModes,D.Translation]);let $=bt;const Ii=class Ii extends Y{constructor(){super(...arguments);a(this,"_statusDis",this.dv(y(!0)));a(this,"_smoothMoveEvent",this.dv(new m));a(this,"_smoothMoveWithRotationEvent",this.dv(new m));a(this,"_smoothMoveOnGroundEvent",this.dv(new m));a(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new m));a(this,"_automaticLandingEvent",this.dv(new m));a(this,"_smoothMoveKeepPitchEvent",this.dv(new m));a(this,"_smoothMoveRelativelyEvent",this.dv(new m));a(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new m));a(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var t;const e=[];this.editingBindMode=="singlePoint"?(e.push(D.SinglePoint),["ESLocationMeasurement"].includes(this.typeName)||e.push(D.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(D.Scale)):this.editingBindMode=="doublePoints"&&e.push(D.DoublePoints),(t=this.activeViewer)==null||t.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,t){this._smoothMoveEvent.emit(e,t)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,t,i){this._smoothMoveWithRotationEvent.emit(e,t,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,t,i,r){this._smoothMoveOnGroundEvent.emit(e,t,i,r)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,t,i,r,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,t,i,r,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,t){this._smoothMoveKeepPitchEvent.emit(e,t)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,t){this._smoothMoveRelativelyEvent.emit(e,t)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,t,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,t,i)}getESProperties(){const e={...super.getESProperties()},t=[...e.location,new S([this,"editing"],"是否编辑"),new N("自动落地",this.automaticLanding.bind(this),[]),new _t([this,"position"],"位置数组",[0,0,0]),new rn([this,"rotation"],"姿态数组",[0,0,0]),new ve([this,"scale"],"缩放",[1,1,1]),new v([this,"minVisibleDistance"],"最小可见距离",0),new v([this,"maxVisibleDistance"],"最大可见距离",0)];return["ESHuman","ESGltfModel","ESFountainParticleSystem","ESHumanFountain"].includes(this.typeName)&&t.push(new ve([this,"positionOffset"],"位置偏移",[0,0,0])),{...e,defaultMenu:"basic",location:t,more:[...e.more,new N("平滑移动",this.smoothMove.bind(this),[[0,0,0],0]),new N("固定方向平滑移动",this.smoothMoveKeepPitch.bind(this),[[0,0,0],0]),new N("平滑偏移",this.smoothMoveWithRotation.bind(this),[[0,0,0],[0,0,0],0]),new N("贴地平滑移动",this.smoothMoveOnGround.bind(this),[0,0,0,""]),new N("贴地平滑偏移",this.smoothMoveWithRotationOnGround.bind(this),[[0,0,0],0,0,0,""]),new N("相对平滑移动",this.smoothMoveRelatively.bind(this),[[0,0,0],0]),new N("相对平滑偏移",this.smoothMoveRelativelyWithRotation.bind(this),[[0,0,0],[0,0,0],0]),new S([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};a(Ii,"createDefaultProps",()=>({...Y.createDefaultProps(),pointed:!1,pointStyle:W({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:F([0,0,0]),rotation:F([0,0,0]),positionOffset:F([0,0,0]),scale:F([1,1,1]),minVisibleDistance:y(0),maxVisibleDistance:y(0)})),a(Ii,"type",Ii.register("ESObjectWithLocation",Ii,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),a(Ii,"supportEditingModes",[...Y.supportEditingModes,D.SinglePoint,D.Place,D.Translation,D.Rotation,D.Scale,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let M=Ii;const us=class us extends M{getESProperties(){const s={...super.getESProperties()};return{...s,style:[...s.style,new L("点样式集合"),new S([this,"pointed"],"开启点样式",!1),new v([this,"pointSize"],"点大小",1),new j([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new G([this,"pointColor"],"点颜色",[1,1,1,1]),new L("线样式集合"),new S([this,"stroked"],"开启线样式",!1),new S([this,"strokeGround"],"是否贴地(线)",!1),new v([this,"strokeWidth"],"线宽",1),new j([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new L("面样式集合"),new S([this,"filled"],"开启填充样式",!1),new S([this,"fillGround"],"是否贴地",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...s.more,new L("点样式"),new A([this,"pointMaterial"],"点材质",""),new z([this,"pointMaterialParams"],"点材质参数",{}),new L("线样式"),new A([this,"strokeMaterial"],"线材质",""),new z([this,"strokeMaterialParams"],"线材质参数",{}),new L("填充样式"),new A([this,"fillMaterial"],"面材质",""),new z([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(s){this.strokeStyle={...this.strokeStyle,width:s}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(s){this.strokeStyle={...this.strokeStyle,widthType:s}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(s){this.strokeStyle={...this.strokeStyle,color:[...s]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(s){this.strokeStyle={...this.strokeStyle,material:s}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(s){this.strokeStyle={...this.strokeStyle,materialParams:s}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(s){this.strokeStyle={...this.strokeStyle,ground:s}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(s){this.fillStyle={...this.fillStyle,color:[...s]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(s){this.fillStyle={...this.fillStyle,material:s}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(s){this.fillStyle={...this.fillStyle,materialParams:s}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(s){this.fillStyle={...this.fillStyle,ground:s}}get fillGroundChanged(){return this.fillStyleChanged}};a(us,"createDefaultProps",()=>({...M.createDefaultProps(),pointed:!1,pointStyle:W({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:W({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(us,"type",us.register("ESLocalVector",us,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let os=us;const wn=class wn extends os{};a(wn,"type",wn.register("ESLocalVector2D",wn,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let zt=wn;const Rp=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],Ap=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],ps=class ps extends M{constructor(){super(...arguments);a(this,"_widgetEvent",this.dv(new m))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S([this,"screenRender"],"屏幕渲染",!0),new S([this,"sizeByContent"],"尺寸自适应",!0),new pe([this,"size"],"尺寸大小",[100,100]),new pe([this,"anchor"],"偏移比例",[.5,1]),new pe([this,"offset"],"像素偏移",[0,0]),new j([this,"renderMode"],Ap,"渲染模式",0),new j([this,"rotationType"],Rp,"漫游旋转类型",1),new A([this,"actorTag"],"绑定对象"),new A([this,"socketName"],"插槽名称"),new ve([this,"positionOffset"],"位置偏移"),new ve([this,"rotationOffset"],"相对姿态")],more:[...e.more,new v([this,"zOrder"],"排序",0)]}}};a(ps,"createDefaultProps",()=>({...M.createDefaultProps(),screenRender:!0,size:F([100,100]),anchor:F([.5,1]),offset:F([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:F([0,0,0]),rotationOffset:F([0,0,0])})),a(ps,"type",ps.register("ESLabel",ps,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let Ve=ps;const oe=class oe extends k{constructor(s){super(s)}func(s,e=!0){s.includes("completeJson")&&console.log("ESTestObject.completeJson",this.completeJson),s.includes("json")&&console.log("ESTestObject.json",this.json),e&&console.log("ESTestObject func")}func1(s,e){s.includes("completeJson")&&console.log("ESTestObject.completeJson",this.completeJson),s.includes("json")&&console.log("ESTestObject.json",this.json),e&&console.log("ESTestObject func")}getESProperties(){return{defaultMenu:"basic",basic:[new A([this,"typeName"],"类型",void 0,!1,!0),new A([this,"id"],"id",void 0,!1,!0),new A([this,"name"],"名称"),new A([this,"ref"],"引用",void 0,!0),new z([this,"extras"],"扩展属性",{},void 0,!0),new ro("JSON",()=>this._jsonStr,s=>s&&(this._jsonStr=s))],general:[new S([this,"show"],"是否显示",oe.defaults.show),new G([this,"color"],"颜色",oe.defaults.color),new j([this,"paramType"],[["screen","screen"],["world","world"]],"参数类型",oe.defaults.paramType),new Vn([this,"text"],"内容",oe.defaults.text)],dataSource:[new vt([this,"startTime"],"开始时间",oe.defaults.startTime),new Vt([this,"code"],"js代码",oe.defaults.code),new no([this,"times"],"时间组",oe.defaults.times),new A([this,"url"],"服务地址",oe.defaults.url),new N("func",this.func.bind(this),[["completeJson","json"]]),new N("func1",(s,e)=>this.func1(s,e),[["completeJson","json"],!0])],location:[new ve([this,"positionOffset"],"位置偏移",oe.defaults.positionOffset),new _t([this,"position"],"位置数组",oe.defaults.position),new rn([this,"rotation"],"姿态数组",oe.defaults.rotation)],coordinate:[new v([this,"height"],"高度(m)",oe.defaults.height),new re([this,"points"],"位置数组",oe.defaults.points)],style:[new Je([this,"padding"],"内边距",oe.defaults.padding),new pe([this,"offset"],"像素偏移",oe.defaults.offset),new L("样式"),new cc([this,"dashPattern"],"虚线图案",255),new L("样式2"),new G([this,"color"],"颜色",oe.defaults.color),new z([this,"strokeStyle"],"线样式参数",oe.defaults.strokeStyle)],more:[]}}};a(oe,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,url:"http://localhost:8080/earthsdk3/earthsdk3.gltf",height:100,position:F([116.39,39.9,100]),rotation:F([0,-90,0]),points:fi([]),color:F([1,0,0,1]),strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),paramType:"screen",text:"默认",code:'console.log("hello world")',dashPattern:255,startTime:Date.now(),times:F([]),offset:F([10,0]),positionOffset:F([0,2,0]),padding:F([0,2,0,2])})),a(oe,"type",oe.register("ESTestObject",oe,{chsName:"测试",tags:["ESObjects"],description:""}));let bo=oe;const Et=class Et extends Y{constructor(e){super(e);a(this,"_refreshTilesetEvent",this.dv(new m));a(this,"_tilesetReadyEvent",this.dv(new m));a(this,"_supportEdit",this.dv(y(!0)));a(this,"_highlightFeatureEvent",this.dv(new m));a(this,"_highlightFeatureAndFlyToEvent",this.dv(new m));a(this,"_strokeFeatureEvent",this.disposeVar(new m));a(this,"_getFeatureTableEvent",this.dv(new m));a(this,"_featureTableResultEvent",this.dv(new m));a(this,"_getMaterialNameListEvent",this.disposeVar(new m));a(this,"_setFeatureStyleEvent",this.dv(new m));a(this,"_setFeatureColorEvent",this.dv(new m));a(this,"_setFeatureVisableEvent",this.dv(new m));a(this,"_resetFeatureStyleEvent",this.dv(new m));a(this,"setMaterialInfoEvent",this.ad(new m));a(this,"_setMaterialEvent",this.disposeVar(new m));a(this,"_clippingPlanesId",this.dv(y("")));a(this,"_clippingPlaneIds",this.dv(y([])));a(this,"_flattenedPlaneId",this.dv(y("")));a(this,"_flattenedPlaneEnabled",this.dv(y(!1)));a(this,"_clippingPlaneId",this.dv(y("")));a(this,"_excavateId",this.dv(F([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[D.Translation,D.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,t){this._highlightFeatureEvent.emit(e,t)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,t,i,r){this._highlightFeatureAndFlyToEvent.emit(e,t,i,r)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,t=[1,0,0,1]){this._strokeFeatureEvent.emit(e,t)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const t=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{t(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const t=new b;t.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(t.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{t.isDestroyed()||(t.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e,t=!1){this._setFeatureStyleEvent.emit(e,t)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,t,i=!1){this._setFeatureColorEvent.emit(e,typeof t=="string"?JSON.parse(t):t,i)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,t,i=!1){this._setFeatureVisableEvent.emit(e,typeof t=="string"?JSON.parse(t):t,i)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(e){this._resetFeatureStyleEvent.emit(e)}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(t=>{const i=new b;i.ad(this.setMaterialInfoEvent.donce(r=>{i.destroy(),t(r)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...wo}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new ge([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new j([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new j([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new z([this,"materialOverrideMap"],"材质替换",Et.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new z([this,"url"],"服务地址",Et.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new S([this,"editing"],"编辑",!1,!0),new ve([this,"offset"],"偏移",[0,0,0],!0),new rn([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new z([this,"materialParams"],"materialParams",Et.defaults.materialParams),new N("高亮要素",this.highlightFeature.bind(this),["id_value","rgba(255,0,0,1)"],"highlightFeature"),new N("高亮并且定位到要素",this.highlightFeatureAndFlyTo.bind(this),["id_value",[1116.39,39.9,100,1e3],"rgba(255,0,0,1)",1],"highlightFeatureAndFlyTo"),new N("要素着色控制",this.setFeatureColor.bind(this),["height",[{minValue:1e5,color:[1,0,0,1]},{maxValue:5e5,color:[1,1,0,1]}]],"setFeatureColor"),new N("要素可见性控制",this.setFeatureVisable.bind(this),["height",[{minValue:1e5,visable:!0},{maxValue:5e5,visable:!1}]],"setFeatureVisable"),new N("重置样式",()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new L("ue"),new N("刷新 tileset",()=>this.refreshTileset(),[],"refreshTileset"),new A([this,"actorTag"]),new S([this,"highlight"],"是否高亮"),new G([this,"highlightColor"]),new v([this,"highlightID"]),new L("czm"),new pe([this,"czmImageBasedLightingFactor"],"反射强度"),new v([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new z([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new v([this,"czmMaximumMemoryUsage"],"最大内存"),new L("常用"),new j([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new z([this,"czmStyleJson"],"czmStyle"),new S([this,"czmBackFaceCulling"]),new S([this,"czmSkipLevelOfDetail"]),new S([this,"czmDebugWireframe"]),new v([this,"cacheBytes"],"最大缓存",512*1024*1024),new L("调试信息"),new S([this,"czmDebugShowBoundingVolume"]),new S([this,"czmDebugShowContentBoundingVolume"]),new L("裁剪"),new S([this,"clippingPlaneEnabled"]),new S([this,"unionClippingRegions"]),new G([this,"clippingPlaneEdgeColor"]),new v([this,"clippingPlaneEdgeWidth"])]}}};a(Et,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:F([1,0,0,1]),offset:ee([0,0,0]),rotation:F([0,0,0]),czmImageBasedLightingFactor:F([1,1]),czmEnvironmentMapManager:te(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:W({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:F([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:te({}),featureIdLabel:0,splitDirection:"NONE",czmDebugWireframe:!1})),a(Et,"type",Et.register("ES3DTileset",Et,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),a(Et,"supportEditingModes",[...Y.supportEditingModes,D.Translation,D.Rotation]);let Le=Et;const gs=class gs extends M{constructor(e){super(e);a(this,"_isFlyInCreated",this.dv(y(!1)));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(ue([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new v([this,"radius"],"半径",10)]}}};a(gs,"createDefaultProps",()=>({...M.createDefaultProps(),mode:"cylinder",radius:10})),a(gs,"type",gs.register("ESAlarm",gs,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let Eo=gs;const Np=[["扫描","scan"],["扩散","diffuse"]],ii=class ii extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"radius"],"半径",1),new j([this,"mode"],Np,"模式",ii.defaults.mode),new G([this,"color"],"颜色",ii.defaults.color)]}}};a(ii,"createDefaultProps",()=>({...M.createDefaultProps(),radius:1,mode:"scan",color:[0,.7,1,1],collision:!1})),a(ii,"type",ii.register("ESApertureEffect",ii,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let Co=ii;const Vp=Object.entries({inner:"inner",outer:"outer",both:"both"}),De=class De extends ${constructor(e){super(e);a(this,"editingBindMode","circular")}get bufferShow(){var e;return(e=this.buffer)==null?void 0:e.show}set bufferShow(e){this.buffer={...this.buffer,show:e}}get bufferShowChanged(){return this.bufferChanged}get bufferColor(){var e;return(e=this.buffer)==null?void 0:e.color}set bufferColor(e){this.buffer={...this.buffer,color:e}}get bufferColorChanged(){return this.bufferChanged}get bufferGradient(){var e;return(e=this.buffer)==null?void 0:e.gradient}set bufferGradient(e){this.buffer={...this.buffer,gradient:e}}get bufferGradientChanged(){return this.bufferChanged}get bufferDistance(){var e;return(e=this.buffer)==null?void 0:e.distance}set bufferDistance(e){this.buffer={...this.buffer,distance:e}}get bufferDistanceChanged(){return this.bufferChanged}get bufferMode(){var e;return(e=this.buffer)==null?void 0:e.mode}set bufferMode(e){this.buffer={...this.buffer,mode:e}}get bufferModeChanged(){return this.bufferChanged}get bufferLight(){var e;return(e=this.buffer)==null?void 0:e.light}set bufferLight(e){this.buffer={...this.buffer,light:e}}get bufferLightChanged(){return this.bufferChanged}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new j([this,"classificationType"],oo,"贴地附着目标",De.defaults.classificationType),new S([this,"instancing"],"实例化渲染",De.defaults.instancing),new S([this,"bufferShow"],"缓冲区显隐",De.defaults.buffer.show),new G([this,"bufferColor"],"缓冲区颜色",De.defaults.buffer.color),new S([this,"bufferLight"],"缓冲区光照",De.defaults.buffer.light),new v([this,"bufferDistance"],"缓冲区距离",De.defaults.buffer.distance),new j([this,"bufferMode"],Vp,"缓冲区模式",De.defaults.buffer.mode),new S([this,"bufferGradient"],"缓冲区渐变",De.defaults.buffer.gradient)],coordinate:[...e.coordinate,new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)]}}};a(De,"createDefaultProps",()=>({...$.createDefaultProps(),buffer:W({show:!1,color:[0,0,0,.8],gradient:!0,distance:100,mode:"outer",light:!1}),classificationType:"TERRAIN",instancing:!1,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),a(De,"type",De.register("ESGeoPolygon",De,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),a(De,"supportEditingModes",[...$.supportEditingModes,D.CircularAppend,D.CircularInsert]);let Q=De;const Ut=class Ut extends Q{get fillMaterial(){return this.fillStyle.material}set fillMaterial(s){this.fillStyle={...this.fillStyle,material:s}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Ut.defaults.fillStyle.materialParams}set fillMaterialParams(s){this.fillStyle={...this.fillStyle??Ut.defaults.fillStyle,materialParams:s??Ut.defaults.fillStyle.materialParams}}constructor(s){super(s)}};a(Ut,"createDefaultProps",()=>({...Q.createDefaultProps(),stroked:!0,filled:!0,units:F(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:W({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:W({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Ut,"type",Ut.register("ESAreaMeasurement",Ut,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let So=Ut;const fs=class fs extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"general",more:[...s.more,new L("czm"),new A([this,"image"],"图片"),new ve([this,"translation"],"偏移")]}}};a(fs,"createDefaultProps",()=>({...M.createDefaultProps(),image:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),translation:F([0,0,0])})),a(fs,"type",fs.register("ESBlastParticleSystem",fs,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Po=fs;const ot=class ot extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new S([this,"reverse"],"反转",ot.defaults.reverse),new ve([this,"size"],"尺寸",ot.defaults.size),new G([this,"edgeColor"],"边框颜色",ot.defaults.edgeColor),new v([this,"edgeWidth"],"边框宽度",ot.defaults.edgeWidth),new A([this,"targetID"],"目标图层id",ot.defaults.targetID)]}}};a(ot,"createDefaultProps",()=>({...M.createDefaultProps(),reverse:!1,edgeColor:F([1,1,1,1]),edgeWidth:2,size:F([10,10,10]),targetID:""})),a(ot,"type",ot.register("ESBoxClipping",ot,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let To=ot;const yn=class yn extends M{constructor(){super(...arguments);a(this,"_thumbnail",this.dv(y("")));a(this,"_duration",this.dv(y(1)));a(this,"_resetWithCurrentCameraEvent",this.dv(new m));a(this,"_captureEvent",this.dv(new m))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,t="default"){this.flyInEvent.emit(e,-1,t)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,t){this._captureEvent.emit(e,t)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("视角信息"),new N("设置为当前视角",()=>this.resetWithCurrentCamera(),[]),new N("获取缩略图",(t,i)=>this.capture(t,i),[64,64],"capture"),new A([this,"thumbnail"],"缩略图","",!0),new v([this,"duration"],"飞行时间",1,!0)]}}};a(yn,"type",yn.register("ESCameraView",yn,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let qn=yn;class Xn extends b{constructor(e,t,i){super();a(this,"_view",this.dv(new qn));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,t){const h=this._view,c=t;h.duration=c.duration??1,h.position=c.position,h.rotation=c.rotation??[0,0,0],h.thumbnail=c.thumbnail??"",h.name=c.name}else{const h=(i==null?void 0:i.size)??[64,64];this.d(Zi(()=>{this._view.resetWithCurrentCamera(),this._view.capture(h[0],h[1])}))}const r=this._view,o=this.dv(ae(r.durationChanged,r.positionChanged,r.rotationChanged,r.thumbnailChanged,r.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const qe=class qe extends k{constructor(e){super(e);a(this,"_currentViewIndex",this.dv(y(-1)));a(this,"_viewWrappers",this.dv(new Xs));a(this,"_currentViewWrapper",this.dv(y(void 0)));a(this,"_container",this.dv(y(void 0)));this.initProcessing();{const t=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};t(),this.d(this._viewWrappers.changedEvent.don(t))}{const t=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};t(),this.d(this._viewWrappers.changedEvent.don(t)),this.d(this._currentViewWrapper.changed.don(t))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return kc(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const t=this._viewWrappers;if(e.every((i,r)=>{const o=t.get(r).view;return i.duration===o.duration&&$n(i.position,o.position)&&$n(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let t of e)this._viewWrappers.push(new Xn(this,t))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,t=[64,64]){this._viewWrappers.push(new Xn(this,void 0,{name:e,size:t}))}update(e,t,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return t&&(r.view.name=t),r.view.resetWithCurrentCamera(),r.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Xn(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Xn(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const t=this._viewWrappers.get(e);return this._currentViewWrapper.value=t,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const t=this._viewWrappers.get(e);t.view.resetWithCurrentCamera(),t.view.capture()}resetViewName(e,t){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=t}updateView(e,t){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=t.position,i.view.rotation=t.rotation??[0,0,0],i.view.duration=t.duration??1,i.view.thumbnail=t.thumbnail??"",i.view.name=t.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const t=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(t,this.flyMode??qe.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const t=this._getIndex(e);return this.loop??qe.defaults.loop?(this.flyToView((this._viewWrappers.length+t-1)%this._viewWrappers.length),!0):t-1<0?!1:(this.flyToView(t-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const t=this._getIndex(e);if(t===0)return;const i=this._viewWrappers.splice(t-1,1,e)[0];this._viewWrappers.set(t,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const t=this._getIndex(e);if(t===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(t+1,1,e)[0];this._viewWrappers.set(t,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const t=this._getIndex(e);return this.loop??qe.defaults.loop?(this.flyToView((t+1)%this._viewWrappers.length),!0):t+1>this._viewWrappers.length-1?!1:(this.flyToView(t+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const t=this._getIndex(e);if(t===-1){console.warn("index === -1");return}this.deleteView(t)}transitionImageUrl(e){return k.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const t=this.intervalTime??qe.defaults.intervalTime,r=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+t)*1e3;return e.promise(Zs(r)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(Ne(async i=>this._flyStep(i))),t=()=>{this.playing?e.restart():e.cancel()};t(),this.d(this.playingChanged.don(t))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new j([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",qe.defaults.flyMode),new N("添加视角",()=>this.addView(),[],"addView"),new N("插入视角",t=>this.insertView(t),[0],"insertView"),new N("清空视角",()=>this.clearAllViews(),[],"clearAllViews"),new N("当前位置插入视角",()=>this.insertView(this.currentViewIndex+1),[],"insertView"),new N("上一个视角",()=>this.flyToPrevView(),[],"flyToPrevView"),new N("下一个视角",()=>this.flyToNextView(),[],"flyToNextView"),new N("飞入指定视角",t=>this.flyToView(t),[0],"flyToView"),new N("更改指定视角为轮播视角",t=>this.setCurrentView(t),[0],"setCurrentView"),new N("删除当前视角",()=>this.deleteCurrentView(),[],"deleteCurrentView"),new N("删除指定视角",t=>this.deleteView(t),[0],"deleteView"),new N("更改指定视角为当前视角信息",t=>this.resetView(t),[0],"resetView"),new v([this,"currentViewIndex"],"当前序号",-1,!1,!0),new lc([this,"playing"],()=>this.stop(),[this,"loop"],"播放",qe.defaults),new S([this,"playing"],"是否播放"),new N("停止播放",()=>this.stop(),[],"stop"),new S([this,"loop"],"是否循环"),new v([this,"intervalTime"],"间隔时间"),new re([this,"views"],"视角集合",[],void 0,!0)]}}};a(qe,"createDefaultProps",()=>({...k.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),a(qe,"type",qe.register("ESCameraViewCollection",qe,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let Yn=qe;const ms=class ms extends M{constructor(e){super(e);a(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new v([this,"aspectRatio"],"宽高比",1.77778),new v([this,"fov"],"横向夹角",90),new v([this,"far"],"视野长度",100),new v([this,"near"],"近面距离",5)]}}};a(ms,"createDefaultProps",()=>({...M.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),a(ms,"type",ms.register("ESCameraVisibleRange",ms,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Io=ms;const vs=class vs extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new j([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};a(vs,"createDefaultProps",()=>({...M.createDefaultProps(),mode:"policeCar",allowPicking:!0})),a(vs,"type",vs.register("ESCar",vs,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let Kn=vs;const Oi=class Oi extends ${constructor(e){super(e);a(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new v([this,"height"],"高度",10)],coordinate:[...e.coordinate,new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)]}}};a(Oi,"createDefaultProps",()=>({...$.createDefaultProps(),height:10,filled:!0,fillStyle:W({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),a(Oi,"type",Oi.register("ESClassification",Oi,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),a(Oi,"supportEditingModes",[...$.supportEditingModes,D.CircularAppend,D.CircularInsert,D.HeightModify]);let Zn=Oi;const _s=class _s extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new S([this,"showArrow"],"显示箭头",!0),new G([this,"edgeColor"],"线框颜色",[1,1,1,1]),new v([this,"edgetWidth"],"线框宽度",2),new v([this,"width"],"裁剪宽度",200),new v([this,"height"],"裁剪高度",200),new A([this,"targetID"],"目标图层id","")]}}};a(_s,"createDefaultProps",()=>({...M.createDefaultProps(),showArrow:!0,edgeColor:F([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),a(_s,"type",_s.register("ESClippingPlane",_s,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let Oo=_s;class Lp extends b{constructor(s,e,t){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${t.id}) container`);{const c=()=>{const u=` ${e.cssText}
|
|
41
|
+
`,_e=class _e extends b{constructor(){super();a(this,"_ratio",this.dv(w(0)));a(this,"_subPlayers",this.dv(new hn));const e=this.dv(new Jn);{const o=()=>{e.loop=this.loop??_e.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??_e.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??_e.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??_e.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??_e.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??_e.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??_e.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??_e.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??_e.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??_e.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const t=()=>{const o=this.duration??_e.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??_e.defaults.currentTime)/o)};t();const i=this.dv(oe(this.currentTimeChanged,this.durationChanged));this.d(i.don(t)),this.d(()=>{const{length:o}=this._subPlayers;for(let l=0;l<o;++l)this._subPlayers.get(l).destroy();this._subPlayers.length=0});const r=()=>{for(let l of this._subPlayers)l.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(l=>{const[h,c,u]=l;return new xp(h,c,u,this)});this._subPlayers.splice(0,0,...o)};r(),this.d(this.channelsChanged.don(r))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??_e.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};a(_e,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),a(_e,"channelsReadMe",Op);let Ye=_e;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:Xt(void 0,(s,e)=>s==null?void 0:s.every((t,i)=>t===e[i]),s=>[...s])})})(Ye||(Ye={})),Kt(Ye.prototype,Ye.createDefaultProps);class Dp extends b{constructor(s,e,t,i){super(),this.disposeVar(new le(s.sceneObjectChanged,()=>{let r;i.debug&&console.log("正在获取Event事件...");const o=s.sceneObject;if(o&&e){const l=e.split(".");if(l.length===0)i.debug&&console.warn("propNames.length === 0");else{let h=$r(o,!1,...l);(!h||!(h instanceof v))&&(l[l.length-1]=l[l.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${l[l.length-1]})再试试!`),h=$r(o,!1,...l),i.debug&&h&&console.warn("event仍然获取不到!")),h?h instanceof v?(r=h,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,r)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(r){const l=new b;return l.d(r.dwon(()=>t.emit())),l}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const Gh=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends b{constructor(e,t,i){super();a(this,"_doEvalEvent",this.dv(new v));const r=this._doEvalEvent,o=this.disposeVar(oe(r)),l=e.map(([h,c])=>{const u=new So(h),p=c&&new Dp(u,c,r,t)||void 0;return[u,p]});this.d(()=>{l.forEach(([h,c])=>{c==null||c.destroy(),h.destroy()}),l.length=0}),this.d(r.don(()=>{const{evalMode:h="NextAnimateFrame",evalOnlyWhenObjsAllExist:c=!0}=t;if(h==="Immediate"){const u=l.map(([p])=>p.sceneObject);(!c||u.every(p=>p!==void 0))&&i(u)}})),this.d(o.don(()=>{const{evalMode:h="NextAnimateFrame",evalOnlyWhenObjsAllExist:c=!0}=t;if(h==="NextAnimateFrame"){const u=l.map(([p])=>p.sceneObject);(!c||u.every(p=>p!==void 0))&&i(u)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:Fp}=Gh;class wn extends b{constructor(){super();a(this,"_evalFunc");a(this,"_forceExecute",new v);const e=this.dv(w(void 0)),t=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};t(),this.dispose(this.evalFuncStrChanged.disposableOn(t));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},r=this.disposeVar(new le(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new Fp(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=r.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(n=>{n.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:jn([],(s,e)=>s[0]===e[0]&&s[1]===e[1],s=>[s[0],s[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:B(void 0),devTags:q(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(wn||(wn={})),Kt(wn.prototype,wn.createDefaultProps);const Jh=Sl("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function rt(n){return Jh.forward(n)}function Co(n){return Jh.inverse(n)}const qh=Sl("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function kp(n){const s=qh.forward([n[0],n[1]]);return[s[0],s[1],n[2]]}function Mp(n){const s=qh.inverse([n[0],n[1]]);return[s[0],s[1],n[2]]}function Ap(n,s){const e=n[0],t=n[n.length-1];(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2])&&n.push(e);const i=K.point(s),r=K.polygon([n]);return K.booleanPointInPolygon(i,r)}function jp(n,s){const e=W.lineString(n);return W.along(e,s,{units:"meters"}).geometry.coordinates}function Po(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const s=W.polygon([n]);return W.area(s)}function Rp(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const s=W.polygon([n]),t=W.centerOfMass(s).geometry.coordinates;return[t[0],t[1],t[2]??n[0][2]??0]}function To(...n){let[s,e,t,i]=n;const[r,o,l]=s;if(Array.isArray(e)){const[h,c,u]=e,p=Math.sqrt(h*h+c*c);let g=0;p>0&&(g=Math.atan2(h,c)*(180/Math.PI),g<0&&(g+=360));const m=W.destination(W.point([r,o]),p,g,{units:"meters"});return!m||!m.geometry||!m.geometry.coordinates?void 0:(t=t||[0,0,0],t[0]=m.geometry.coordinates[0],t[1]=m.geometry.coordinates[1],t[2]=l+(u||0),t)}else{const h=W.destination(W.point([r,o]),e,t,{units:"meters"});return!h||!h.geometry||!h.geometry.coordinates?void 0:(i=i||[0,0,0],i[0]=h.geometry.coordinates[0],i[1]=h.geometry.coordinates[1],i[2]=l,i)}}function er(n,s){return W.distance(W.point(n),W.point(s),{units:"meters"})}function En(n,s){return W.bearing(W.point(n),W.point(s))}function Np(n,s){return W.lineIntersect(W.lineString(n),W.lineString(s))}function Lp(n,s){const e=W.point(n),t=W.point(s),i=W.midpoint(e,t),r=(n[2]+s[2])/2;return[...i.geometry.coordinates,r]}function Vp(n,s){const e=W.point(s),t=W.lineString(n);return W.nearestPointOnLine(t,e,{units:"meters"})}function zp(n,s){const e=W.point(n),t=W.lineString(s);return W.pointToLineDistance(e,t,{units:"meters"})}function Up(n,s,e,t){const[i,r,o]=n,l=W.rhumbDestination(W.point([i,r]),s,e,{units:"meters"});if(!(!l||!l.geometry||!l.geometry.coordinates))return t=t||[0,0,0],t[0]=l.geometry.coordinates[0],t[1]=l.geometry.coordinates[1],t[2]=o,t}function Xh(n,s){return W.rhumbDistance(W.point(n),W.point(s),{units:"meters"})}function Bp(n,s){return W.rhumbBearing(W.point(n),W.point(s))}function Yh(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=W.intersect(W.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function Kh(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=W.union(W.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function Zh(n,s=500,e="meters"){const t=W.buffer(W.lineString(n),s,{units:e});if(t)return t.geometry.coordinates}function Qh(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=W.difference(W.polygons([[n],[s]]));if(e)return e.geometry.coordinates}function ec(n,s,e=10,t="meters"){const i={steps:e,units:t};return W.circle(n,s,i).geometry.coordinates}function Io(n,s){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(s[0][0]!==s[s.length-1][0]||s[0][1]!==s[s.length-1][1]||s[0][2]!==s[s.length-1][2])&&s.push(s[0]);const e=W.polygon([n]),t=W.polygon([s]);return W.booleanContains(e,t)?"oneBig":W.booleanWithin(e,t)?"twoBig":!1}function tr(n){const s=Zt(_i(n,["0"])),e=Zt(_i(n,["1"])),t=Zt(_i(n,["2"])),i=Nt(_i(n,["0"])),r=Nt(_i(n,["1"])),o=Nt(_i(n,["2"]));return{minPos:[s,e,t],maxPos:[i,r,o],center:[(s+i)*.5,(e+r)*.5,(t+o)*.5]}}function tc(n){const{minPos:s,maxPos:e,center:t}=tr(n);if(s.some(l=>!Number.isFinite(l)||e.some(h=>!Number.isFinite(h))||t.some(h=>!Number.isFinite(h)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=er(s,e);let r=i*.5;const o=Math.abs(s[2]-e[2]);return o!=0&&(r=Math.sqrt(i*i+o*o)*.5),{center:t,radius:r}}function ic(n,s){const e=rt(n),t=rt(s);return d.Vector.distance(e,t)}function Vt(n,s){const e=[],t=n.length;let i=0;for(let r=0;r<t-1;++r){if(s===void 0||s==="GEODESIC"){const o=er(n[r],n[r+1]),l=Math.abs(n[r][2]-n[r+1][2]);if(l===0)i+=o;else{const h=Math.sqrt(o*o+l*l);i+=h}}else if(s==="RHUMB"){const o=Xh(n[r],n[r+1]),l=Math.abs(n[r][2]-n[r+1][2]);if(l===0)i+=o;else{const h=Math.sqrt(o*o+l*l);i+=h}}else if(s==="NONE"){const o=ic(n[r],n[r+1]);i+=o}else console.warn(`未知的arcType: ${s},导致距离无法计算!`);e.push(i)}return e}function xo(n){const s="__getXyzFromPostion";let e=Ne(n,s);return(!e||!d.Vector.equals(e[0],n))&&(e=[[...n],rt(n)],vt(n,s,e)),e[1]}class Wp{constructor(s={}){a(this,"points");a(this,"duration");a(this,"sharpness");a(this,"centers");a(this,"controls");a(this,"stepLength");a(this,"length");a(this,"delay");a(this,"steps");this.points=s.points||[],this.duration=s.duration||1e4,this.sharpness=s.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=s.stepLength||60,this.length=this.points.length,this.delay=0;for(let e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(let e=0;e<this.length-1;e++){const t=this.points[e],i=this.points[e+1];this.centers.push({x:(t.x+i.x)/2,y:(t.y+i.y)/2,z:(t.z+i.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(let e=0;e<this.centers.length-1;e++){const t=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,i=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,r=this.points[e+1].z-(this.centers[e].z+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+t),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+r)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+t),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+r)}])}this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength)}cacheSteps(s){const e=[];let t=this.pos(0);e.push(0);for(let i=0;i<this.duration;i+=10){const r=this.pos(i);Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)+(r.z-t.z)*(r.z-t.z))>s&&(e.push(i),t=r)}return e}vector(s){const e=this.pos(s+10),t=this.pos(s-10);return{angle:180*Math.atan2(e.y-t.y,e.x-t.x)/3.14,speed:Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)+(t.z-e.z)*(t.z-e.z))}}pos(s){let e=s-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);const t=e/this.duration;if(t>=1)return this.points[this.length-1];const i=Math.floor((this.points.length-1)*t),r=(this.length-1)*t-i;return Hp(r,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])}}function Hp(n,s,e,t,i){const r=$p(n);return{x:i.x*r[0]+t.x*r[1]+e.x*r[2]+s.x*r[3],y:i.y*r[0]+t.y*r[1]+e.y*r[2]+s.y*r[3],z:i.z*r[0]+t.z*r[1]+e.z*r[2]+s.z*r[3]}}function $p(n){const s=n*n;return[s*n,3*s*(1-n),3*n*(1-n)*(1-n),(1-n)*(1-n)*(1-n)]}function Gp(n,s){s===void 0&&(s={});var e=s.resolution||1e3,t=s.sharpness||.85;const i=[],r=n.map(c=>{const[u,p,g]=rt(c);return{x:u,y:p,z:g}});for(var o=new Wp({duration:e,points:r,sharpness:t}),l=function(c){var u=o.pos(c);const p=Co([u.x,u.y,u.z]);i.push(p)},h=0;h<o.duration;h+=10)l(h);return l(o.duration),i}function gs(n,s,e){return Gp(n,{resolution:s,sharpness:e})}function ir(n){return Xt(n,(s,e)=>s[0]===e[0]&&s[1]===e[1],s=>[...s])}function sc(n,s){const e=new Array;for(let t of n)e.push(s(t));return e}function sr(n,s){return n===void 0&&s===void 0?!0:!n||!s?!1:n[0]===s[0]&&n[1]===s[1]&&n[2]===s[2]}function nc(n,s,e){var i;((i=s.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(s))?e.call(n):requestAnimationFrame(()=>nc(n,s,e))}function Jp(n,s,e,t=!0){t&&e(),n.dispose(s.disposableOn(e))}function qp(n,s){const{type:e,id:t}=n;if(e){const i=M.create(e,t);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function rc(n){const s=n.children&&Wr(n.children,t=>{if(!(t instanceof Ie))throw new Error("!(treeItem instanceof SceneTreeItem)");return!t.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!s||e}class Ie extends vn{constructor(e,t=!1,i,r,o=!0){super(e,t,i);a(this,"_dragDrop");a(this,"_showChangedNotAffectChildren",!1);a(this,"_showChangedNotAffectParent",!1);a(this,"_type",this.dv(w("Unknown")));a(this,"_isExport",this.dv(w(!0)));const l=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(l)),this.name=`未命名条目(${this.id})`,this.extras=r,this._isExport.value=o;let h;const c=()=>{h&&(h(),h=void 0)};this.dispose(c),this.dispose(this.sceneObjectChanged.disposableOn(u=>{c(),u&&(h=D([this,"name"],[u,"name"]))})),this.dispose(this.showChanged.disposableOn(u=>{if(e.setSceneObjectShowFunc(this.sceneObject,u),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let p of this.children)p instanceof Ie&&(p._showChangedNotAffectParent=!0,p.show=u,p._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Ie&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=rc(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new le(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const u=new b;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof v){const p=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};p(),u.dispose(this.sceneObject.showChanged.disposableOn(p))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof v){const p=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};p(),u.dispose(this.sceneObject.enabledChanged.disposableOn(p))}return u})),this.childrenChangedEvent.disposableOn(()=>{const u=rc(this);this._showChangedNotAffectChildren=!0,this.show=u,this._showChangedNotAffectChildren=!1});{const u=()=>{let p="Unknown";this.sceneObject?p=this.sceneObject.typeName:this.children&&(p="Folder"),this._type.value=p};this.dispose(this.sceneObjectChanged.disposableOn(u)),this.dispose(this.childrenResetedEvent.disposableOn(u)),u()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(t){console.error(`sceneTreeItem.jsonStr error ${t}`,t)}}get completeJson(){const e=this.children&&[...this.children].filter(t=>t.isExport).map(t=>t.completeJson);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.completeJson,children:e,extras:this.extras}}get json(){const e=this.children&&[...this.children].filter(t=>t.isExport).map(t=>t.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let t of e.children){const i=new Ie(this.tree,!0);i.json=t,this.children.push(i)}}}clone(){try{const e=new Ie(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,t){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(t&&t.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return t&&this.children.push(t),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",t);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",t);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,t)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:te(void 0)})})(Ie||(Ie={})),Kt(Ie.prototype,Ie.createDefaultProps);function oc(n,s,e){let{offsetY:t}=s;if(!s.target||!("clientTop"in s.target))return"none";t+=2,t+=s.target.clientTop;let i="none";return n.children?t<=e*.3?i="before":t>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":t<=e*.5?i="before":i="after",i}class ac extends Lh{constructor(s){super(),this._treeItem=s;const{dragStartDataManager:e}=this._treeItem.sceneTree;let t="none";const i=this.disposeVar(Gl(()=>{this._treeItem.uiTreeObject.moveToPositionMode=t,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${t});`)},200));function r(o){t!==o&&(t=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const l=e;if(l.data&&l.data.type==="UITreeA"&&l.data.value!==void 0){const h=l.data.value,c=this._treeItem,{tree:u}=c;if(u){const p=[...u.selectedItems];~p.indexOf(h)||p.push(h);const g=oc(c,o,u.itemDivHeight);if(g!=="none"&&Si.canMoveToTreeItems(p,c,g)){o.dataTransfer.dropEffect="move",r(g);return}}}o.dataTransfer.dropEffect="none",r("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const l=e;if(!(l.data&&l.data.type==="UITreeA"&&l.data.value!==void 0))return;const h=l.data.value,c=this._treeItem,{tree:u}=c;if(!u)return;const p=[...u.selectedItems];~p.indexOf(h)||p.push(h);const g=oc(c,o,u.itemDivHeight);g!=="none"&&Si.canMoveToTreeItems(p,c,g)&&(Si.moveToTreeItems(p,c,g),l.data=void 0,r("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{t="none",i.restart()}))}}function Xp(n){if(!(n instanceof Ie))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new ac(n)}function Yp(n){let s=!1;return n&&("show"in n?s=n.show??!0:"enabled"in n&&(s=n.enabled??!0)),s}function Kp(n,s){n&&("show"in n?n.show=s:"enabled"in n&&(n.enabled=s))}const Zp=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function Qp(n){const s=[],{root:e={}}=n,t=[e];for(;t.length>0;){const i=t.pop();if(!i)throw new Error("!todo");if(i.children){for(let r of i.children)if(r.children&&t.unshift(r),r.sceneObj){const{type:o=void 0}=r.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(r.sceneObj)),o&&Zp.includes(o)&&s.push(r.sceneObj)}}}return s}async function eg(n,s){const e=Qp(n);let t=0;const i=e.length;for(let r of e)if(++t,s){const o=t/i;s(o,t,i)}}class lc extends b{constructor(e,t){super();a(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=t}get sceneTree(){return this._sceneTree}}class tg extends b{constructor(e){super();a(this,"_jsonLoadingEvent",this.disposeVar(new v));a(this,"_setJsonProcessing",this.disposeVar(Le(async(e,t)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),t&&await e.promise(this._sceneTree.preloadFunc(t)),this._setJson(t),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=t=>{this._jsonLoadingEvent.emit({type:"error",error:t})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(t){console.error(`json数据装配时发生错误!error: ${t}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new st("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function ig(n){return n.name+"_clone"}function Oo(n,s,e){if(n instanceof Ie)return n.insertNewTreeItem(s,e);{const t={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(t[s],e)}}function sg(n){[n,...n.getDescendants()].forEach(s=>s.destroy())}const ke=class ke extends Si{constructor(e,t,i,r){super(i);a(this,"_jsonLoading",this.disposeVar(new tg(this)));a(this,"createSceneObjectFunc",ke.defaultCreateSceneObjectFunc);a(this,"createTreeItemDragDropFunc",ke.defaultCreateTreeItemDragDropFunc);a(this,"preloadFunc",ke.defaultPreload);a(this,"getSceneObjectShowFunc",ke.defaultGetSceneObjectShow);a(this,"setSceneObjectShowFunc",ke.defaultSetSceneObjectShow);a(this,"getSceneTreeItemCloneNameFunc",ke.defaultGetSceneTreeItemCloneNameFunc);a(this,"debug",!1);a(this,"_contextMenu",this.disposeVar(new lc(this,this.projectManager)));a(this,"_showPropUiOnSelecting",this.disposeVar(w(!0)));this._name=e,this._dragStartDataManager=t,this._projectManager=r,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var l,h;globalThis.lssn=this.lastSelectedItem,globalThis.lsso=(l=this.lastSelectedItem)==null?void 0:l.sceneObject,this.debug&&console.log(((h=this.lastSelectedItem)==null?void 0:h.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(l=>{for(let h of l){const c=h,{sceneObject:u}=c;u&&o.deleteSceneObject(u)&&u.destroy()&&Kn(u,void 0);for(let p of c.getDescendants()){const{sceneObject:g}=p;g&&o.deleteSceneObject(g)&&g.destroy()&&Kn(g,void 0)}sg(h)}})),this.dispose(this.itemsAdded.disposableOn(l=>{for(let h of l){const c=h;c.sceneObject&&o.addSceneObject(c.sceneObject)&&Kn(c.sceneObject,c)}}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const t=this.getDescendants();let i;for(let r of t)if(r.sceneObject&&r.sceneObject.id===e){i=r;break}return i}getTreeItemsFromSceneObjType(e){const t=this.getDescendants(),i=[],r=Array.isArray(e)?e:[e];for(let o of t)o.sceneObject&&r.includes(o.sceneObject.typeName)&&i.push(o);return i}getTreeItemsFromSceneObjName(e){var r;const t=this.getDescendants(),i=[];for(let o of t)(r=o.sceneObject)!=null&&r.name.includes(e)&&i.push(o);return i}get dragStartDataManager(){return this._dragStartDataManager}get completeJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.completeJson)}}}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const t=e.root.children??[];this.root.resetChildren(!0);for(let r of t){const o=new Ie(this,!0);o.json=r,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,t){const i=e||this.lastSelectedItem||this.root;return i?Oo(i,t):!1}addNewTreeItem(e,t,i,r){const o=e||this.lastSelectedItem||this.root;if(o&&Oo(o,t)){const l=new Ie(this,i);if(l.sceneObject=r,!Oo(o,t,l))throw new Error("currentTreeItem.insertNewTreeItem return false!");return l}}createSceneObjectTreeItem(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const l=M.create(e,t);return l?this.addNewTreeItem(i,r??"FolderInnerOrAfter",!0,l):void 0}createGroupTreeItem(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const l=this.addNewTreeItem(i,r??"FolderInnerOrAfter",!0);if(!l){console.warn("addNewTreeItem error!");return}return l.name=e??"未命名组节点",l}createSceneObjectTreeItemFromClass(e,t,i,r){const o=r??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const l=M.createFromClass(e,t);return l?this.addNewTreeItem(i,o,!0,l):void 0}createSceneObjectTreeItemFromJson(e,t,i){const r=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(t,r))return;const o=M.createFromJson(e);return console.log(o),o?this.addNewTreeItem(t,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let t of e)this.destroySceneObjectTreeItem(t)}};a(ke,"defaultCreateSceneObjectFunc",qp),a(ke,"defaultCreateTreeItemDragDropFunc",Xp),a(ke,"defaultPreload",eg),a(ke,"defaultGetSceneObjectShow",Yp),a(ke,"defaultSetSceneObjectShow",Kp),a(ke,"defaultGetSceneTreeItemCloneNameFunc",ig);let bn=ke;const Do={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class ng extends b{constructor(e){super();a(this,"_currentPosition",this.disposeVar(q(void 0)));a(this,"_currentRotation",this.disposeVar(q(void 0)));a(this,"_currentHeading",this.disposeVar(w(void 0)));a(this,"_isRotating",this.disposeVar(w(!1)));a(this,"_isGround",this.disposeVar(w(!1)));a(this,"_startPosition",[0,0,0]);a(this,"_startRotation",[0,0,0]);a(this,"_processing",this.disposeVar(Le(async(e,t,i,r)=>{const{currentPosition:o,currentRotation:l}=this;if(!o||r<=0||!l){this._currentPosition.value=t,this._currentRotation.value=i;return}const h=this._startPosition;h.splice(0,3,...o);const c=this._startRotation;c.splice(0,3,...l);let u=Date.now();const p=En(h,t);this._currentHeading.value=p;const m=er(h,t)/r,y=[i[0]-c[0],i[1]-c[1],i[2]-c[2]],S=t[2]-h[2];await e.promise(new Promise(C=>{e.disposer.dispose(Ln(async()=>{let T=Date.now()-u;T=T<0?0:T,T=T>r?r:T;const V=T*m,z=To(h,V,p);if(this.isGround&&z){const x=await this._esviewer.getTerrainHeight([z[0],z[1]]);this._currentPosition.value=[z[0],z[1],x??0]}else z&&(z[2]+=S*(T/r)),this._currentPosition.value=z;if(this.isRotating){const[x,$,Y]=y,Q=T/r;this._currentRotation.value=[c[0]+x*Q,c[1]+$*Q,c[2]+Y*Q]}T===r&&(this._currentPosition.value=t,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,C())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,t,i){this._processing.restart(void 0,e,t,i)}cancel(){this._processing.cancel()}}const rg=.06,hc=1.5,cc=2,dc=70,uc=60;function Ci(n){return K.point(n)}function wt(n,s,e){const t=Ci(n),i=K.destination(t,e,s,{units:"meters"}),[r,o]=K.getCoords(i);return[r,o,n[2]]}function nr(n,s){return K.bearing(Ci(n),Ci(s))}function rr(n,s,e,t,i=1e3){const r=K.lineString([K.getCoords(K.destination(Ci(n),i,(s+180)%360,{units:"meters"})),n,K.getCoords(K.destination(Ci(n),i,s,{units:"meters"}))]),o=K.lineString([K.getCoords(K.destination(Ci(e),i,(t+180)%360,{units:"meters"})),e,K.getCoords(K.destination(Ci(e),i,t,{units:"meters"}))]),l=K.lineIntersect(r,o);if(l.features.length>0){const[h,c]=K.getCoords(l.features[0]);return[h,c,(n[2]+e[2])/2]}return e}function pc(n,s,e,t){const i=(e-90+360)%360,r=(e+90+360)%360;n.leftPoints.push(wt(s,i-dc,t*hc)),n.headPoints.push(wt(s,i-uc,t*cc)),n.headPoints.push(s),n.headPoints.push(wt(s,r+uc,t*cc)),n.rightPoints.push(wt(s,r+dc,t*hc))}function og(n,s,e,t){const i=(s-90+360)%360,r=(s+90+360)%360,o=e*rg*Math.min(.3,1-t);return{leftPoint:wt(n,i,o),rightPoint:wt(n,r,o),verticalLen:o}}function ag(n,s){if(!n||n.length<2)return;const e=s==="swallowTailArrow",t=n.length,i=t-1,r=Math.max(...Vt(n,"NONE")),o={leftPoints:[],rightPoints:[],headPoints:[]};let l;for(let m=0;m<t;m++){const y=n[m],S=m==i?n[n.length-2]:n[m+1],C=m==i?nr(S,y):nr(y,S),{leftPoint:T,rightPoint:V,verticalLen:z}=og(y,C,r,m/t);m===0?(o.leftPoints.push(T),o.rightPoints.push(V),e&&(o.tailPoint=wt(y,C,z))):m===i?pc(o,y,C,z):l!==void 0?(o.leftPoints.push(rr(o.leftPoints[m-1],l,T,C,r)),o.rightPoints.push(rr(o.rightPoints[m-1],l,V,C,r))):(o.leftPoints.push(T),o.rightPoints.push(V)),l=C}const h=o.leftPoints,c=o.rightPoints,u=h.length>=2?gs(h):h,p=c.length>=2?gs(c):c,g=[...u,...o.headPoints,...p.reverse()];return o.tailPoint&&g.push(o.tailPoint),g.push(o.leftPoints[0]),g}function lg(n,s,e,t){const i=K.lineString([[n[0],n[1]],[s[0],s[1]]]),r=K.lineString([[e[0],e[1]],[t[0],t[1]]]);return K.lineIntersect(i,r).features.length>0}function hg(n,s,e,t){const i=(s-90+360)%360,r=(s+90+360)%360,o=e*Math.min(.3,1-t);return{leftPoint:wt(n,i,o),rightPoint:wt(n,r,o),verticalLen:o}}function cg(n,s){if(!n||n.length<3)return;const e=s==="swallowTailArrow",t=n.length,i=t-1,r=n.slice(0,2),o=tr(r),l=Vt(r,"NONE").pop()??0,h=Math.max(...Vt(n,"NONE")),c={leftPoints:[],rightPoints:[],headPoints:[]};let u;for(let C=1;C<t;C++){const T=C===1?o.center:n[C],V=C===i?n[t-2]:n[C+1],z=C===i?nr(V,T):nr(T,V);let{leftPoint:x,rightPoint:$,verticalLen:Y}=hg(T,z,l,C/t);if(C===1)c.leftPoints.push(r[0]),c.rightPoints.push(r[1]),e&&(c.tailPoint=wt(T,z,l));else if(C===i)pc(c,T,z,Y);else if(u!==void 0){if(C===2&&lg(c.leftPoints[0],x,c.rightPoints[0],$)){const Ae=c.leftPoints[0];c.leftPoints[0]=c.rightPoints[0],c.rightPoints[0]=Ae}const Q=C-2;c.leftPoints.push(rr(c.leftPoints[Q],u,x,z,h)),c.rightPoints.push(rr(c.rightPoints[Q],u,$,z,h))}else c.leftPoints.push(x),c.rightPoints.push($);u=z}let p=c.leftPoints,g=c.rightPoints;const m=p.length>=2?gs(p):p,y=g.length>=2?gs(g):g,S=[...m,...c.headPoints,...y.reverse()];return c.tailPoint&&S.push(c.tailPoint),S.push(p[0]),S}function Fo(n,s,e=!1){return e?cg(n,s):ag(n,s)}function gc(n){let s=0;function e(t,i){i++,s=Math.max(i,s),t.forEach(r=>{Array.isArray(r)&&e(r,i)})}return e(n,0),s}const bt=class bt extends X{constructor(e){super(e);a(this,"editingBindMode","lineString");a(this,"_area",this.dv(w(0)));a(this,"_perimeter",this.dv(w(0)));this.d(de(this.pointsChanged,()=>{this._updateArea(),this._updatePerimeter()},{immediate:!0}))}updateEditing(){var t;const e=[];this.editingBindMode=="doublePoints"?e.push(I.DoublePoints):this.editingBindMode=="lineString"?e.push(I.LineStringAppend,I.LineStringInsert,I.Translation):this.editingBindMode=="circular"?(e.push(I.CircularAppend,I.CircularInsert,I.Translation),this.supportEditingModes().includes(I.HeightModify)&&e.push(I.HeightModify)):this.editingBindMode=="visibility"?e.push(I.VisibilityAppend,I.VisibilityModify):this.editingBindMode=="scatter"&&e.push(I.ScatterAppend,I.ScatterModify),(t=this.activeViewer)==null||t.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Po([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Vt(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],t=Vt(e,"GEODESIC");return t[t.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=Yh(this.points,e);if(!t)return;const i=t[0][0][0];if(Array.isArray(i)){const r=[...t],o=[];return r.forEach(l=>{const h=l[0].map(c=>[...c,0]);o.push(h)}),o}else return[[...t][0].map(l=>[...l,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=Kh(this.points,e);if(!t)return;const i=t[0][0][0];if(Array.isArray(i)){const r=[...t],o=[];return r.forEach(l=>{const h=l[0].map(c=>[...c,0]);o.push(h)}),o}else return[[...t][0].map(l=>[...l,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let t=[...e];const i=e[0],r=e[e.length-1];i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2]||t.push(i);const o=Qh([...this.points,this.points[0]],[...t]);if(!o)return{status:"undefined",positions:void 0};const l=[...o];if(gc(l)===3){const h=l.map(g=>g.map(m=>[...m,0]));if(h.length<=1)return{status:"notIncluded",positions:h};const c=h[0],u=h[1];return Io([...c],[...u])==="oneBig"?{status:"included",positions:h}:{status:"notIncluded",positions:h}}else if(gc(l)===4){const c=[...l.map(p=>p.map(g=>g.map(m=>[...m,0])))],u=[];return c.forEach(p=>{u.push(p[0])}),{status:"notIncluded",positions:u}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,t){if(this.points&&this.points.length>=2){const i=Zh(this.points,e,t);return i?[i[0].map(r=>[...r,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const t=Io(this.points,e);return t==="oneBig"?!0:t==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new E([this,"editing"],"编辑",!1),new ie([this,"points"],"位置数组",bt.defaults.points,void 0,!0)],style:[...e.style,new k("点样式"),new E([this,"pointed"],"开启",!1),new f([this,"pointSize"],"点大小",1),new A([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new G([this,"pointColor"],"点颜色",[1,1,1,1]),new G([this,"pointOutlineColor"],"轮廓颜色",bt.defaults.pointStyle.outlineColor),new f([this,"pointOutlineWidth"],"轮廓宽度",bt.defaults.pointStyle.outlineWidth),new k("线样式"),new E([this,"stroked"],"开启线样式",!0),new E([this,"strokeGround"],"贴地",!1),new f([this,"strokeWidth"],"线宽",1),new A([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new k("面样式"),new E([this,"filled"],"开启",!1),new E([this,"fillGround"],"贴地",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new k("点样式集合"),new N([this,"pointMaterial"],"点材质"),new R([this,"pointMaterialParams"],"点材质参数",{}),new k("线样式集合"),new N([this,"strokeMaterial"],"线材质"),new R([this,"strokeMaterialParams"],"线材质参数",{}),new k("面样式集合"),new N([this,"fillMaterial"],"面材质"),new R([this,"fillMaterialParams"],"面材质参数",{})]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};a(bt,"createDefaultProps",()=>({...X.createDefaultProps(),pointed:!1,pointStyle:B({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:B({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:B({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:Yt([])})),a(bt,"type",bt.register("ESGeoVector",bt,{chsName:"地理矢量",tags:["ESObjects","base"],description:"地理矢量"})),a(bt,"supportEditingModes",[...X.supportEditingModes,I.Translation]);let U=bt;const Oi=class Oi extends X{constructor(){super(...arguments);a(this,"_statusDis",this.dv(w(!0)));a(this,"_smoothMoveEvent",this.dv(new v));a(this,"_smoothMoveWithRotationEvent",this.dv(new v));a(this,"_smoothMoveOnGroundEvent",this.dv(new v));a(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new v));a(this,"_automaticLandingEvent",this.dv(new v));a(this,"_smoothMoveKeepPitchEvent",this.dv(new v));a(this,"_smoothMoveRelativelyEvent",this.dv(new v));a(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new v));a(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var t;const e=[];this.editingBindMode=="singlePoint"?(e.push(I.SinglePoint),["ESLocationMeasurement"].includes(this.typeName)||e.push(I.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(I.Scale)):this.editingBindMode=="doublePoints"&&e.push(I.DoublePoints),(t=this.activeViewer)==null||t.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,t){this._smoothMoveEvent.emit(e,t)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,t,i){this._smoothMoveWithRotationEvent.emit(e,t,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,t,i,r){this._smoothMoveOnGroundEvent.emit(e,t,i,r)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,t,i,r,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,t,i,r,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,t){this._smoothMoveKeepPitchEvent.emit(e,t)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,t){this._smoothMoveRelativelyEvent.emit(e,t)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,t,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,t,i)}getESProperties(){const e={...super.getESProperties()},t=[...e.location,new E([this,"editing"],"是否编辑"),new L("自动落地",this.automaticLanding.bind(this),[]),new nt([this,"position"],"位置数组",[0,0,0]),new ds([this,"rotation"],"姿态数组",[0,0,0]),new ue([this,"scale"],"缩放",[1,1,1]),new f([this,"minVisibleDistance"],"最小可见距离",0),new f([this,"maxVisibleDistance"],"最大可见距离",0)];return["ESHuman","ESGltfModel","ESFountainParticleSystem","ESHumanFountain"].includes(this.typeName)&&t.push(new ue([this,"positionOffset"],"位置偏移",[0,0,0])),{...e,defaultMenu:"basic",location:t,more:[...e.more,new L("平滑移动",this.smoothMove.bind(this),[[0,0,0],0]),new L("固定方向平滑移动",this.smoothMoveKeepPitch.bind(this),[[0,0,0],0]),new L("平滑偏移",this.smoothMoveWithRotation.bind(this),[[0,0,0],[0,0,0],0]),new L("贴地平滑移动",this.smoothMoveOnGround.bind(this),[0,0,0,""]),new L("贴地平滑偏移",this.smoothMoveWithRotationOnGround.bind(this),[[0,0,0],0,0,0,""]),new L("相对平滑移动",this.smoothMoveRelatively.bind(this),[[0,0,0],0]),new L("相对平滑偏移",this.smoothMoveRelativelyWithRotation.bind(this),[[0,0,0],[0,0,0],0]),new E([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};a(Oi,"createDefaultProps",()=>({...X.createDefaultProps(),pointed:!1,pointStyle:B({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:F([0,0,0]),rotation:F([0,0,0]),positionOffset:F([0,0,0]),scale:F([1,1,1]),minVisibleDistance:w(0),maxVisibleDistance:w(0)})),a(Oi,"type",Oi.register("ESObjectWithLocation",Oi,{chsName:"对象位置",tags:["ESObjects","base"],description:"对象位置"})),a(Oi,"supportEditingModes",[...X.supportEditingModes,I.SinglePoint,I.Place,I.Translation,I.Rotation,I.Scale,I.DoublePoints,I.DoublePointsAppend,I.DoublePointsModify]);let j=Oi;const Es=class Es extends j{getESProperties(){const s={...super.getESProperties()};return{...s,style:[...s.style,new k("点样式集合"),new E([this,"pointed"],"开启点样式",!1),new f([this,"pointSize"],"点大小",1),new A([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new G([this,"pointColor"],"点颜色",[1,1,1,1]),new k("线样式集合"),new E([this,"stroked"],"开启线样式",!1),new E([this,"strokeGround"],"是否贴地(线)",!1),new f([this,"strokeWidth"],"线宽",1),new A([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new k("面样式集合"),new E([this,"filled"],"开启填充样式",!1),new E([this,"fillGround"],"是否贴地",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...s.more,new k("点样式"),new N([this,"pointMaterial"],"点材质",""),new R([this,"pointMaterialParams"],"点材质参数",{}),new k("线样式"),new N([this,"strokeMaterial"],"线材质",""),new R([this,"strokeMaterialParams"],"线材质参数",{}),new k("填充样式"),new N([this,"fillMaterial"],"面材质",""),new R([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(s){this.strokeStyle={...this.strokeStyle,width:s}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(s){this.strokeStyle={...this.strokeStyle,widthType:s}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(s){this.strokeStyle={...this.strokeStyle,color:[...s]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(s){this.strokeStyle={...this.strokeStyle,material:s}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(s){this.strokeStyle={...this.strokeStyle,materialParams:s}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(s){this.strokeStyle={...this.strokeStyle,ground:s}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(s){this.fillStyle={...this.fillStyle,color:[...s]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(s){this.fillStyle={...this.fillStyle,material:s}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(s){this.fillStyle={...this.fillStyle,materialParams:s}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(s){this.fillStyle={...this.fillStyle,ground:s}}get fillGroundChanged(){return this.fillStyleChanged}};a(Es,"createDefaultProps",()=>({...j.createDefaultProps(),pointed:!1,pointStyle:B({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:B({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:B({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Es,"type",Es.register("ESLocalVector",Es,{chsName:"本地矢量",tags:["ESObjects","base"],description:"本地矢量对象"}));let ti=Es;const Fn=class Fn extends ti{};a(Fn,"type",Fn.register("ESLocalVector2D",Fn,{chsName:"本地矢量2D",tags:["ESObjects","base"],description:"本地矢量2D对象"}));let ot=Fn;const dg=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],ug=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],bs=class bs extends j{constructor(){super(...arguments);a(this,"_widgetEvent",this.dv(new v))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new E([this,"screenRender"],"屏幕渲染",!0),new E([this,"sizeByContent"],"尺寸自适应",!0),new ne([this,"size"],"尺寸大小",[100,100]),new ne([this,"anchor"],"偏移比例",[.5,1]),new ne([this,"offset"],"像素偏移",[0,0]),new A([this,"renderMode"],ug,"渲染模式",0),new A([this,"rotationType"],dg,"漫游旋转类型",1),new N([this,"actorTag"],"绑定对象"),new N([this,"socketName"],"插槽名称"),new ue([this,"positionOffset"],"位置偏移"),new ue([this,"rotationOffset"],"相对姿态")],more:[...e.more,new f([this,"zOrder"],"排序",0)]}}};a(bs,"createDefaultProps",()=>({...j.createDefaultProps(),screenRender:!0,size:F([100,100]),anchor:F([.5,1]),offset:F([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:F([0,0,0]),rotationOffset:F([0,0,0])})),a(bs,"type",bs.register("ESLabel",bs,{chsName:"标签",tags:["ESObjects","base"],description:"标签对象"}));let ze=bs;const re=class re extends M{constructor(e){super(e);a(this,"_testEvent",this.dv(new v))}get testEvent(){return this._testEvent}func(e,t=!0){e.includes("completeJson")&&console.log("ESTestObject.completeJson",this.completeJson),e.includes("json")&&console.log("ESTestObject.json",this.json),t&&console.log("ESTestObject func"),this._testEvent.emit(e,t)}func1(e,t){e.includes("completeJson")&&console.log("ESTestObject.completeJson",this.completeJson),e.includes("json")&&console.log("ESTestObject.json",this.json),t&&console.log("ESTestObject func"),this._testEvent.emit(e,t)}getPadding(){return this.padding}getESProperties(){return{defaultMenu:"basic",basic:[new N([this,"typeName"],"类型",void 0,!1,!0),new N([this,"id"],"id",void 0,!1,!0),new N([this,"name"],"名称"),new N([this,"ref"],"引用",void 0,!0),new R([this,"extras"],"扩展属性",{},void 0,!0),new _o("JSON",()=>this._jsonStr,e=>e&&(this._jsonStr=e))],general:[new E([this,"show"],"是否显示",re.defaults.show),new G([this,"color"],"颜色",re.defaults.color),new A([this,"paramType"],[["screen","screen"],["world","world"]],"参数类型",re.defaults.paramType),new _n([this,"text"],"内容",re.defaults.text)],dataSource:[new Ve([this,"startTime"],"开始时间",re.defaults.startTime),new Xe([this,"code"],"js代码",re.defaults.code),new vo([this,"times"],"时间组",re.defaults.times),new N([this,"url"],"服务地址",re.defaults.url),new L("func",this.func.bind(this),[["completeJson","json"]]),new L("func1",(e,t)=>this.func1(e,t),[["completeJson","json"],!0])],location:[new ue([this,"positionOffset"],"位置偏移",re.defaults.positionOffset),new nt([this,"position"],"位置数组",re.defaults.position),new ds([this,"rotation"],"姿态数组",re.defaults.rotation)],coordinate:[new f([this,"height"],"高度(m)",re.defaults.height),new ie([this,"points"],"位置数组",re.defaults.points)],style:[new Fe([this,"padding"],"内边距",re.defaults.padding),new ne([this,"offset"],"像素偏移",re.defaults.offset),new k("样式"),new Yn([this,"dashPattern"],"虚线图案",255),new k("样式2"),new G([this,"color"],"颜色",re.defaults.color),new R([this,"strokeStyle"],"线样式参数",re.defaults.strokeStyle)],more:[]}}};a(re,"createDefaultProps",()=>({...M.createDefaultProps(),show:!0,url:"http://localhost:8080/earthsdk3/earthsdk3.gltf",height:100,position:F([116.39,39.9,100]),rotation:F([0,-90,0]),points:Yt([]),color:F([1,0,0,1]),strokeStyle:B({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),paramType:"screen",text:"默认",code:'console.log("hello world")',dashPattern:255,startTime:Date.now(),times:F([]),offset:F([10,0]),positionOffset:F([0,2,0]),padding:F([0,2,0,2])})),a(re,"type",re.register("ESTestObject",re,{chsName:"测试对象",tags:["ESObjects","base"],description:'ESTestObject 是 earthsdk3 场景对象的规范示例(测试对象),用于演示对象的标准写法:规范的注册元数据、带 JSDoc 的响应式属性、带 JSDoc 的方法、以及业务事件的声明模式。对象json示例: { "id": "test_xxx", "type": "ESTestObject", "name": "测试对象", "show": true, "position": [116.39, 39.9, 100], "url": "http://localhost:8080/earthsdk3/earthsdk3.gltf" }'}));let ko=re;const St=class St extends X{constructor(e){super(e);a(this,"_refreshTilesetEvent",this.dv(new v));a(this,"_tilesetReadyEvent",this.dv(new v));a(this,"_supportEdit",this.dv(w(!0)));a(this,"_highlightFeatureEvent",this.dv(new v));a(this,"_highlightFeatureAndFlyToEvent",this.dv(new v));a(this,"_strokeFeatureEvent",this.disposeVar(new v));a(this,"_getFeatureTableEvent",this.dv(new v));a(this,"_featureTableResultEvent",this.dv(new v));a(this,"_getMaterialNameListEvent",this.disposeVar(new v));a(this,"_setFeatureStyleEvent",this.dv(new v));a(this,"_setFeatureColorEvent",this.dv(new v));a(this,"_setFeatureVisableEvent",this.dv(new v));a(this,"_resetFeatureStyleEvent",this.dv(new v));a(this,"setMaterialInfoEvent",this.ad(new v));a(this,"_setMaterialEvent",this.disposeVar(new v));a(this,"_clippingPlanesId",this.dv(w("")));a(this,"_clippingPlaneIds",this.dv(w([])));a(this,"_flattenedPlaneId",this.dv(w("")));a(this,"_flattenedPlaneEnabled",this.dv(w(!1)));a(this,"_clippingPlaneId",this.dv(w("")));a(this,"_excavateId",this.dv(F([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[I.Translation,I.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,t){this._highlightFeatureEvent.emit(e,t)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,t,i,r){this._highlightFeatureAndFlyToEvent.emit(e,t,i,r)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,t=[1,0,0,1]){this._strokeFeatureEvent.emit(e,t)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const t=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{t(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const t=new b;t.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(t.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{t.isDestroyed()||(t.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e,t=!1){this._setFeatureStyleEvent.emit(e,t)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,t,i=!1){this._setFeatureColorEvent.emit(e,typeof t=="string"?JSON.parse(t):t,i)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,t,i=!1){this._setFeatureVisableEvent.emit(e,typeof t=="string"?JSON.parse(t):t,i)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(e){this._resetFeatureStyleEvent.emit(e)}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(t=>{const i=new b;i.ad(this.setMaterialInfoEvent.donce(r=>{i.destroy(),t(r)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...Do}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new pe([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new A([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new A([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new R([this,"materialOverrideMap"],"材质替换",St.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new R([this,"url"],"服务地址",St.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new E([this,"editing"],"编辑",!1,!0),new ue([this,"offset"],"偏移",[0,0,0],!0),new ds([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new R([this,"materialParams"],"materialParams",St.defaults.materialParams),new L("高亮要素",this.highlightFeature.bind(this),["id_value","rgba(255,0,0,1)"],"highlightFeature"),new L("高亮并且定位到要素",this.highlightFeatureAndFlyTo.bind(this),["id_value",[1116.39,39.9,100,1e3],"rgba(255,0,0,1)",1],"highlightFeatureAndFlyTo"),new L("要素着色控制",this.setFeatureColor.bind(this),["height",[{minValue:1e5,color:[1,0,0,1]},{maxValue:5e5,color:[1,1,0,1]}]],"setFeatureColor"),new L("要素可见性控制",this.setFeatureVisable.bind(this),["height",[{minValue:1e5,visable:!0},{maxValue:5e5,visable:!1}]],"setFeatureVisable"),new L("重置样式",()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new k("ue"),new L("刷新 tileset",()=>this.refreshTileset(),[],"refreshTileset"),new N([this,"actorTag"]),new E([this,"highlight"],"是否高亮"),new G([this,"highlightColor"]),new f([this,"highlightID"]),new k("czm"),new ne([this,"czmImageBasedLightingFactor"],"反射强度"),new f([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new R([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new f([this,"czmMaximumMemoryUsage"],"最大内存"),new k("常用"),new A([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new R([this,"czmStyleJson"],"czmStyle"),new E([this,"czmBackFaceCulling"]),new E([this,"czmSkipLevelOfDetail"]),new E([this,"czmDebugWireframe"]),new f([this,"cacheBytes"],"最大缓存",512*1024*1024),new k("调试信息"),new E([this,"czmDebugShowBoundingVolume"]),new E([this,"czmDebugShowContentBoundingVolume"]),new k("裁剪"),new E([this,"clippingPlaneEnabled"]),new E([this,"unionClippingRegions"]),new G([this,"clippingPlaneEdgeColor"]),new f([this,"clippingPlaneEdgeWidth"])]}}};a(St,"createDefaultProps",()=>({...X.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:F([1,0,0,1]),offset:q([0,0,0]),rotation:F([0,0,0]),czmImageBasedLightingFactor:F([1,1]),czmEnvironmentMapManager:te(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:B({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:F([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:te({}),featureIdLabel:0,splitDirection:"NONE",czmDebugWireframe:!1})),a(St,"type",St.register("ES3DTileset",St,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ES3DTileset 是 EarthSDK3 中用于管理和加载 3D Tiles 数据的核心可视化对象。
|
|
42
|
+
对象json示例:
|
|
43
|
+
{
|
|
44
|
+
"id": "3dtileset_xxx",
|
|
45
|
+
"type": "ES3DTileset",
|
|
46
|
+
"name": "工厂",
|
|
47
|
+
"url": "http://localhost:9004/tile/model/service/ortwkTiV/tileset.json"
|
|
48
|
+
}
|
|
49
|
+
`})),a(St,"supportEditingModes",[...X.supportEditingModes,I.Translation,I.Rotation]);let Ue=St;const Ss=class Ss extends j{constructor(e){super(e);a(this,"_isFlyInCreated",this.dv(w(!1)));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(de([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new f([this,"radius"],"半径",10)]}}};a(Ss,"createDefaultProps",()=>({...j.createDefaultProps(),mode:"cylinder",radius:10})),a(Ss,"type",Ss.register("ESAlarm",Ss,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESAlarm 是用于在场景中指定位置显示报警警示范围(柱状或圆形)的对象。
|
|
50
|
+
对象json示例:
|
|
51
|
+
{
|
|
52
|
+
"id": "alarm_xxx",
|
|
53
|
+
"type": "ESAlarm",
|
|
54
|
+
"name": "报警",
|
|
55
|
+
"position": [116.39, 39.9, 0],
|
|
56
|
+
"radius": 10
|
|
57
|
+
}
|
|
58
|
+
`}));let Mo=Ss;const pg=[["扫描","scan"],["扩散","diffuse"]],ni=class ni extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new f([this,"radius"],"半径",1),new A([this,"mode"],pg,"模式",ni.defaults.mode),new G([this,"color"],"颜色",ni.defaults.color)]}}};a(ni,"createDefaultProps",()=>({...j.createDefaultProps(),radius:1,mode:"scan",color:[0,.7,1,1],collision:!1})),a(ni,"type",ni.register("ESApertureEffect",ni,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESApertureEffect 是用于在场景中指定位置显示光圈特效(扫描或扩散)的对象。
|
|
59
|
+
对象json示例:
|
|
60
|
+
{
|
|
61
|
+
"id": "apertureeffect_xxx",
|
|
62
|
+
"type": "ESApertureEffect",
|
|
63
|
+
"name": "光圈特效",
|
|
64
|
+
"position": [116.39, 39.9, 0],
|
|
65
|
+
"radius": 1
|
|
66
|
+
}
|
|
67
|
+
`}));let Ao=ni;const gg=Object.entries({inner:"inner",outer:"outer",both:"both"}),xe=class xe extends U{constructor(e){super(e);a(this,"editingBindMode","circular")}get bufferShow(){var e;return(e=this.buffer)==null?void 0:e.show}set bufferShow(e){this.buffer={...this.buffer,show:e}}get bufferShowChanged(){return this.bufferChanged}get bufferColor(){var e;return(e=this.buffer)==null?void 0:e.color}set bufferColor(e){this.buffer={...this.buffer,color:e}}get bufferColorChanged(){return this.bufferChanged}get bufferGradient(){var e;return(e=this.buffer)==null?void 0:e.gradient}set bufferGradient(e){this.buffer={...this.buffer,gradient:e}}get bufferGradientChanged(){return this.bufferChanged}get bufferDistance(){var e;return(e=this.buffer)==null?void 0:e.distance}set bufferDistance(e){this.buffer={...this.buffer,distance:e}}get bufferDistanceChanged(){return this.bufferChanged}get bufferMode(){var e;return(e=this.buffer)==null?void 0:e.mode}set bufferMode(e){this.buffer={...this.buffer,mode:e}}get bufferModeChanged(){return this.bufferChanged}get bufferLight(){var e;return(e=this.buffer)==null?void 0:e.light}set bufferLight(e){this.buffer={...this.buffer,light:e}}get bufferLightChanged(){return this.bufferChanged}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new A([this,"classificationType"],yo,"贴地附着目标",xe.defaults.classificationType),new E([this,"instancing"],"实例化渲染",xe.defaults.instancing),new E([this,"bufferShow"],"缓冲区显隐",xe.defaults.buffer.show),new G([this,"bufferColor"],"缓冲区颜色",xe.defaults.buffer.color),new E([this,"bufferLight"],"缓冲区光照",xe.defaults.buffer.light),new f([this,"bufferDistance"],"缓冲区距离",xe.defaults.buffer.distance),new A([this,"bufferMode"],gg,"缓冲区模式",xe.defaults.buffer.mode),new E([this,"bufferGradient"],"缓冲区渐变",xe.defaults.buffer.gradient)],coordinate:[...e.coordinate,new f([this,"area"],"面积",0,!1,!0),new f([this,"perimeter"],"周长",0,!1,!0)]}}};a(xe,"createDefaultProps",()=>({...U.createDefaultProps(),buffer:B({show:!1,color:[0,0,0,.8],gradient:!0,distance:100,mode:"outer",light:!1}),classificationType:"TERRAIN",instancing:!1,fillStyle:B({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:B({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),a(xe,"type",xe.register("ESGeoPolygon",xe,{chsName:"地理多边形",tags:["ESObjects"],description:`ESGeoPolygon 是用于表示和操作地理多边形的对象,支持填充、描边和缓冲区等样式设置。
|
|
68
|
+
对象json示例:
|
|
69
|
+
{
|
|
70
|
+
"id": "polygon_xxx",
|
|
71
|
+
"type": "ESGeoPolygon",
|
|
72
|
+
"name": "地理多边形",
|
|
73
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]]
|
|
74
|
+
}
|
|
75
|
+
`})),a(xe,"supportEditingModes",[...U.supportEditingModes,I.CircularAppend,I.CircularInsert]);let ee=xe;const zt=class zt extends ee{get fillMaterial(){return this.fillStyle.material}set fillMaterial(s){this.fillStyle={...this.fillStyle,material:s}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:zt.defaults.fillStyle.materialParams}set fillMaterialParams(s){this.fillStyle={...this.fillStyle??zt.defaults.fillStyle,materialParams:s??zt.defaults.fillStyle.materialParams}}constructor(s){super(s)}};a(zt,"createDefaultProps",()=>({...ee.createDefaultProps(),stroked:!0,filled:!0,units:F(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:B({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:B({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(zt,"type",zt.register("ESAreaMeasurement",zt,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:`ESAreaMeasurement 是用于在场景中通过多边形区域进行面积测量的对象。
|
|
76
|
+
对象json示例:
|
|
77
|
+
{
|
|
78
|
+
"id": "areameasurement_xxx",
|
|
79
|
+
"type": "ESAreaMeasurement",
|
|
80
|
+
"name": "面积测量",
|
|
81
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]]
|
|
82
|
+
}
|
|
83
|
+
`}));let jo=zt;const Cs=class Cs extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"general",more:[...s.more,new k("czm"),new N([this,"image"],"图片"),new ue([this,"translation"],"偏移")]}}};a(Cs,"createDefaultProps",()=>({...j.createDefaultProps(),image:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),translation:F([0,0,0])})),a(Cs,"type",Cs.register("ESBlastParticleSystem",Cs,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESBlastParticleSystem 是用于在场景中指定位置创建粒子爆炸效果的对象。
|
|
84
|
+
对象json示例:
|
|
85
|
+
{
|
|
86
|
+
"id": "blastparticlesystem_xxx",
|
|
87
|
+
"type": "ESBlastParticleSystem",
|
|
88
|
+
"name": "粒子爆炸",
|
|
89
|
+
"position": [116.39, 39.9, 0]
|
|
90
|
+
}
|
|
91
|
+
`}));let Ro=Cs;const ht=class ht extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new E([this,"reverse"],"反转",ht.defaults.reverse),new ue([this,"size"],"尺寸",ht.defaults.size),new G([this,"edgeColor"],"边框颜色",ht.defaults.edgeColor),new f([this,"edgeWidth"],"边框宽度",ht.defaults.edgeWidth),new N([this,"targetID"],"目标图层id",ht.defaults.targetID)]}}};a(ht,"createDefaultProps",()=>({...j.createDefaultProps(),reverse:!1,edgeColor:F([1,1,1,1]),edgeWidth:2,size:F([10,10,10]),targetID:""})),a(ht,"type",ht.register("ESBoxClipping",ht,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:`ESBoxClipping 是用于通过盒体对 3D 场景中的对象进行体裁剪的对象。
|
|
92
|
+
对象json示例:
|
|
93
|
+
{
|
|
94
|
+
"id": "boxclipping_xxx",
|
|
95
|
+
"type": "ESBoxClipping",
|
|
96
|
+
"name": "体剖切",
|
|
97
|
+
"position": [116.39, 39.9, 0],
|
|
98
|
+
"size": [10, 10, 10]
|
|
99
|
+
}
|
|
100
|
+
`}));let No=ht;const kn=class kn extends j{constructor(){super(...arguments);a(this,"_thumbnail",this.dv(w("")));a(this,"_duration",this.dv(w(1)));a(this,"_resetWithCurrentCameraEvent",this.dv(new v));a(this,"_captureEvent",this.dv(new v))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,t="default"){this.flyInEvent.emit(e,-1,t)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,t){this._captureEvent.emit(e,t)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("视角信息"),new L("设置为当前视角",()=>this.resetWithCurrentCamera(),[]),new L("获取缩略图",(t,i)=>this.capture(t,i),[64,64],"capture"),new N([this,"thumbnail"],"缩略图","",!0),new f([this,"duration"],"飞行时间",1,!0)]}}};a(kn,"type",kn.register("ESCameraView",kn,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESCameraView 是用于表示和管理场景视角(相机视点)的对象。
|
|
101
|
+
对象json示例:
|
|
102
|
+
{
|
|
103
|
+
"id": "cameraview_xxx",
|
|
104
|
+
"type": "ESCameraView",
|
|
105
|
+
"name": "视角",
|
|
106
|
+
"position": [116.39, 39.9, 0]
|
|
107
|
+
}
|
|
108
|
+
`}));let or=kn;class ar extends b{constructor(e,t,i){super();a(this,"_view",this.dv(new or));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,t){const l=this._view,h=t;l.duration=h.duration??1,l.position=h.position,l.rotation=h.rotation??[0,0,0],l.thumbnail=h.thumbnail??"",l.name=h.name}else{const l=(i==null?void 0:i.size)??[64,64];this.d(rs(()=>{this._view.resetWithCurrentCamera(),this._view.capture(l[0],l[1])}))}const r=this._view,o=this.dv(oe(r.durationChanged,r.positionChanged,r.rotationChanged,r.thumbnailChanged,r.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const Ke=class Ke extends M{constructor(e){super(e);a(this,"_currentViewIndex",this.dv(w(-1)));a(this,"_viewWrappers",this.dv(new hn));a(this,"_currentViewWrapper",this.dv(w(void 0)));a(this,"_container",this.dv(w(void 0)));this.initProcessing();{const t=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};t(),this.d(this._viewWrappers.changedEvent.don(t))}{const t=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};t(),this.d(this._viewWrappers.changedEvent.don(t)),this.d(this._currentViewWrapper.changed.don(t))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return sc(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const t=this._viewWrappers;if(e.every((i,r)=>{const o=t.get(r).view;return i.duration===o.duration&&sr(i.position,o.position)&&sr(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let t of e)this._viewWrappers.push(new ar(this,t))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,t=[64,64]){this._viewWrappers.push(new ar(this,void 0,{name:e,size:t}))}update(e,t,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return t&&(r.view.name=t),r.view.resetWithCurrentCamera(),r.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new ar(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new ar(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const t=this._viewWrappers.get(e);return this._currentViewWrapper.value=t,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const t=this._viewWrappers.get(e);t.view.resetWithCurrentCamera(),t.view.capture()}resetViewName(e,t){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=t}updateView(e,t){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=t.position,i.view.rotation=t.rotation??[0,0,0],i.view.duration=t.duration??1,i.view.thumbnail=t.thumbnail??"",i.view.name=t.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const t=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(t,this.flyMode??Ke.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const t=this._getIndex(e);return this.loop??Ke.defaults.loop?(this.flyToView((this._viewWrappers.length+t-1)%this._viewWrappers.length),!0):t-1<0?!1:(this.flyToView(t-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const t=this._getIndex(e);if(t===0)return;const i=this._viewWrappers.splice(t-1,1,e)[0];this._viewWrappers.set(t,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const t=this._getIndex(e);if(t===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(t+1,1,e)[0];this._viewWrappers.set(t,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const t=this._getIndex(e);return this.loop??Ke.defaults.loop?(this.flyToView((t+1)%this._viewWrappers.length),!0):t+1>this._viewWrappers.length-1?!1:(this.flyToView(t+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const t=this._getIndex(e);if(t===-1){console.warn("index === -1");return}this.deleteView(t)}transitionImageUrl(e){return M.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const t=this.intervalTime??Ke.defaults.intervalTime,r=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+t)*1e3;return e.promise(un(r)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(Le(async i=>this._flyStep(i))),t=()=>{this.playing?e.restart():e.cancel()};t(),this.d(this.playingChanged.don(t))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new A([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",Ke.defaults.flyMode),new L("添加视角",()=>this.addView(),[],"addView"),new L("插入视角",t=>this.insertView(t),[0],"insertView"),new L("清空视角",()=>this.clearAllViews(),[],"clearAllViews"),new L("当前位置插入视角",()=>this.insertView(this.currentViewIndex+1),[],"insertView"),new L("上一个视角",()=>this.flyToPrevView(),[],"flyToPrevView"),new L("下一个视角",()=>this.flyToNextView(),[],"flyToNextView"),new L("飞入指定视角",t=>this.flyToView(t),[0],"flyToView"),new L("更改指定视角为轮播视角",t=>this.setCurrentView(t),[0],"setCurrentView"),new L("删除当前视角",()=>this.deleteCurrentView(),[],"deleteCurrentView"),new L("删除指定视角",t=>this.deleteView(t),[0],"deleteView"),new L("更改指定视角为当前视角信息",t=>this.resetView(t),[0],"resetView"),new f([this,"currentViewIndex"],"当前序号",-1,!1,!0),new jh([this,"playing"],()=>this.stop(),[this,"loop"],"播放",Ke.defaults),new E([this,"playing"],"是否播放"),new L("停止播放",()=>this.stop(),[],"stop"),new E([this,"loop"],"是否循环"),new f([this,"intervalTime"],"间隔时间"),new ie([this,"views"],"视角集合",[],void 0,!0)]}}};a(Ke,"createDefaultProps",()=>({...M.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),a(Ke,"type",Ke.register("ESCameraViewCollection",Ke,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESCameraViewCollection 是用于管理一组相机视角并支持视角切换、飞行与轮播播放的对象。
|
|
109
|
+
对象json示例:
|
|
110
|
+
{
|
|
111
|
+
"id": "cameraviewcollection_xxx",
|
|
112
|
+
"type": "ESCameraViewCollection",
|
|
113
|
+
"name": "视角集合",
|
|
114
|
+
"flyMode": "default",
|
|
115
|
+
"intervalTime": 5,
|
|
116
|
+
"views":[{ "position":[116.39,39.9,1000],"rotation":[0,-90,0]}]
|
|
117
|
+
}
|
|
118
|
+
`}));let lr=Ke;const Ps=class Ps extends j{constructor(e){super(e);a(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new f([this,"aspectRatio"],"宽高比",1.77778),new f([this,"fov"],"横向夹角",90),new f([this,"far"],"视野长度",100),new f([this,"near"],"近面距离",5)]}}};a(Ps,"createDefaultProps",()=>({...j.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),a(Ps,"type",Ps.register("ESCameraVisibleRange",Ps,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESCameraVisibleRange 是用于在场景中显示摄像头可视范围的对象。
|
|
119
|
+
对象json示例:
|
|
120
|
+
{
|
|
121
|
+
"id": "cameravisiblerange_xxx",
|
|
122
|
+
"type": "ESCameraVisibleRange",
|
|
123
|
+
"name": "摄像头可视域",
|
|
124
|
+
"position": [116.39, 39.9, 0],
|
|
125
|
+
"fov": 90
|
|
126
|
+
}
|
|
127
|
+
`}));let Lo=Ps;const Ts=class Ts extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new A([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};a(Ts,"createDefaultProps",()=>({...j.createDefaultProps(),mode:"policeCar",allowPicking:!0})),a(Ts,"type",Ts.register("ESCar",Ts,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESCar 是用于在场景中显示车辆模型(如警车)的对象。
|
|
128
|
+
对象json示例:
|
|
129
|
+
{
|
|
130
|
+
"id": "car_xxx",
|
|
131
|
+
"type": "ESCar",
|
|
132
|
+
"name": "车辆",
|
|
133
|
+
"position": [116.39, 39.9, 0],
|
|
134
|
+
"mode": "policeCar"
|
|
135
|
+
}
|
|
136
|
+
`}));let hr=Ts;const Di=class Di extends U{constructor(e){super(e);a(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new f([this,"height"],"高度",10)],coordinate:[...e.coordinate,new f([this,"area"],"面积",0,!1,!0),new f([this,"perimeter"],"周长",0,!1,!0)]}}};a(Di,"createDefaultProps",()=>({...U.createDefaultProps(),height:10,filled:!0,fillStyle:B({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),a(Di,"type",Di.register("ESClassification",Di,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESClassification 是用于对倾斜摄影数据进行单体化(分类)处理的对象。
|
|
137
|
+
对象json示例:
|
|
138
|
+
{
|
|
139
|
+
"id": "classification_xxx",
|
|
140
|
+
"type": "ESClassification",
|
|
141
|
+
"name": "倾斜单体化",
|
|
142
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
143
|
+
"height": 10
|
|
144
|
+
}
|
|
145
|
+
`})),a(Di,"supportEditingModes",[...U.supportEditingModes,I.CircularAppend,I.CircularInsert,I.HeightModify]);let cr=Di;const Is=class Is extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new E([this,"showArrow"],"显示箭头",!0),new G([this,"edgeColor"],"线框颜色",[1,1,1,1]),new f([this,"edgetWidth"],"线框宽度",2),new f([this,"width"],"裁剪宽度",200),new f([this,"height"],"裁剪高度",200),new N([this,"targetID"],"目标图层id","")]}}};a(Is,"createDefaultProps",()=>({...j.createDefaultProps(),showArrow:!0,edgeColor:F([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),a(Is,"type",Is.register("ESClippingPlane",Is,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESClippingPlane 是用于通过平面裁剪 3D 场景中对象的裁切对象。
|
|
146
|
+
对象json示例:
|
|
147
|
+
{
|
|
148
|
+
"id": "clippingplane_xxx",
|
|
149
|
+
"type": "ESClippingPlane",
|
|
150
|
+
"name": "裁切",
|
|
151
|
+
"position": [116.39, 39.9, 0],
|
|
152
|
+
"width": 200
|
|
153
|
+
}
|
|
154
|
+
`}));let Vo=Is;class fg extends b{constructor(s,e,t){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${t.id}) container`);{const h=()=>{const u=` ${e.cssText}
|
|
42
155
|
${e.cssAllInitial?"all: initial;":""}
|
|
43
156
|
${e.show?"":"display: none"}
|
|
44
|
-
`;i.style.cssText=u};
|
|
157
|
+
`;i.style.cssText=u};h();const c=this.dv(oe(e.cssAllInitialChanged,e.cssTextChanged,e.showChanged));this.d(c.don(h))}s.appendChild(i),this.d(()=>s.removeChild(i));const r=this.dv(oe(e.instanceClassChanged,e.containerChanged,e.shadowDomChanged)),o=this.dv(new le(r,()=>{const{instanceClass:h,container:c}=e;if(!h||c)return;let u=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),e.shadowDom){const p=i.appendChild(document.createElement("div"));p.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${t.id}) container shadowDiv`),u=p.attachShadow({mode:"open"}).appendChild(document.createElement("div")),u.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${t.id}) container shadowDiv div`)}return new h(u,e,t)})),{_updateEvent:l}=e;this.d(l.don(h=>{if(o.obj)try{h(o.obj,e,t)}catch(c){console.error(`ESCustomDiv update error! ${c}`)}}))}}const fc=`class MyDiv {
|
|
45
158
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
46
159
|
// customDiv指向当前的CustomDiv场景对象
|
|
47
160
|
// viewer指定当前的视口
|
|
@@ -79,11 +192,11 @@ ${c.map(u=>`${u.id} ${u.typeName}
|
|
|
79
192
|
destroy() {
|
|
80
193
|
this._container.removeChild(this._div);
|
|
81
194
|
}
|
|
82
|
-
}`,
|
|
195
|
+
}`,mg=`示例代码:
|
|
83
196
|
\`\`\`
|
|
84
|
-
${
|
|
197
|
+
${fc}
|
|
85
198
|
\`\`\`
|
|
86
|
-
`,
|
|
199
|
+
`,Ze=class Ze extends M{constructor(e){super(e);a(this,"_updateEvent",this.dv(new v));a(this,"_instanceClassReact",this.dv(w(void 0)));a(this,"_innerHtmlMounted",this.dv(new v));a(this,"_container",this.dv(w(void 0)));this.registerAttachedObjectForContainer((i,r)=>new fg(r,this,i));{const i=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};i(),this.d(this.instanceClassStrChanged.don(i))}{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const r=`class MyDiv {
|
|
87
200
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
88
201
|
// customDiv指向当前的CustomDiv场景对象
|
|
89
202
|
// viewer指定当前的视口
|
|
@@ -104,13 +217,64 @@ ${Hc}
|
|
|
104
217
|
}`;this.instanceClassStr=r};i(),this.d(this.innerHTMLChanged.don(i))}const t=document.createElement("div");t.setAttribute("xe2-div",`ESCustomDiv(${this.id}) container`);{const i=()=>{const o=` ${this.cssText};
|
|
105
218
|
${this.cssAllInitial?"all: initial;":""}
|
|
106
219
|
${this.show?"":"display: none;"}
|
|
107
|
-
`;t.style.cssText=o};i();const r=this.dv(
|
|
220
|
+
`;t.style.cssText=o};i();const r=this.dv(oe(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(r.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const r=document.getElementById(this.containerId);r instanceof HTMLElement?this.container=r:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends b{constructor(o){super(),o.appendChild(t),this.d(()=>o.removeChild(t))}}this.dv(new le(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(oe(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new le(i,()=>{if(!this.container||!this.instanceClass)return;let r=t;if(t.firstElementChild&&t.removeChild(t.firstElementChild),this.shadowDom){const o=t.appendChild(document.createElement("div"));o.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),r=o.attachShadow({mode:"open"}).appendChild(document.createElement("div")),r.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(r,this,void 0)}))}}update(e){this._updateEvent.emit(e)}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}get innerHtmlMounted(){return this._innerHtmlMounted}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}getESProperties(){const e={...super.getESProperties()},t=i=>{i||alert("evalFuncStr为空,无法执行!");try{const r=i&&Function(`"use strict";return (${i})`)();this.update(r)}catch(r){alert(`updateDivFunc error: ${r}`)}};return{...e,more:[...e.more,new k("ESCustomDiv"),new E([this,"show"],"显示"),new Xe([this,"instanceClassStr"],"实例类",fc,mg,!0),new Xe([this,"innerHTML"],"innerHTML",Ze.defaultInnerHTML,Ze.innerHTMLReadMe,!0),new L("强制更新",t,["(divClass, dom, viewer) => divClass.update && divClass.update()"],"update"),new E([this,"allowPicking"],"允许拾取",!0),new N([this,"containerId"],"容器ID",Ze.defaults.containerId,!0),new E([this,"shadowDom"],"shadowDom"),new E([this,"cssAllInitial"],"cssAllInitial"),new N([this,"cssText"],"cssText")]}}};a(Ze,"createDefaultProps",()=>({...M.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:"",shadowDom:!1,cssAllInitial:!1,cssText:""})),a(Ze,"type",Ze.register("ESCustomDiv",Ze,{chsName:"ESCustomDiv",tags:["ESObjects"],description:`ESCustomDiv 是用于在场景中创建和管理自定义 HTML div 元素的对象。
|
|
221
|
+
对象json示例:
|
|
222
|
+
{
|
|
223
|
+
"id": "customdiv_xxx",
|
|
224
|
+
"type": "ESCustomDiv",
|
|
225
|
+
"name": "自定义div",
|
|
226
|
+
"cssText": "color: white;",
|
|
227
|
+
"shadowDom": false
|
|
228
|
+
}
|
|
229
|
+
`})),a(Ze,"defaultInnerHTML",` <!-- z-index样式需要设置,否则可能导致看不到!-->
|
|
108
230
|
<div style="width: 300px; height: 50px; z-index: 100; position: absolute; left: 10px; top: 10px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
|
|
109
|
-
`),a(
|
|
231
|
+
`),a(Ze,"innerHTMLReadMe",` 示例代码:
|
|
110
232
|
\`\`\`
|
|
111
|
-
${
|
|
233
|
+
${Ze.defaultInnerHTML}
|
|
112
234
|
\`\`\`
|
|
113
|
-
`);let
|
|
235
|
+
`);let dr=Ze;const Fi=class Fi extends j{constructor(e){super(e);a(this,"_maxTime",this.dv(w(23)))}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new R([this,"url"]),new f([this,"maxTime"],"maxTime",23,!0,!0),new f([this,"currentTime"]),new f([this,"minPropValue"]),new f([this,"maxPropValue"]),new ie([this,"colorStops"],"colorStops",Fi.defaults.colorStops,void 0,!0)]}}};a(Fi,"createDefaultProps",()=>({...j.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:te([{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}])})),a(Fi,"type",Fi.register("ESDataMesh",Fi,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESDataMesh 是用于对数值数据进行面着色展示的可视化对象。
|
|
236
|
+
对象json示例:
|
|
237
|
+
{
|
|
238
|
+
"id": "datamesh_xxx",
|
|
239
|
+
"type": "ESDataMesh",
|
|
240
|
+
"name": "数值面着色",
|
|
241
|
+
"position": [116.39, 39.9, 0],
|
|
242
|
+
"url": "http://114.242.26.126:6003/ESDataMesh/water-assets2/"
|
|
243
|
+
}
|
|
244
|
+
`}));let zo=Fi;const ri=class ri extends U{constructor(e){super(e);a(this,"_distance",this.dv(w(0)));a(this,"editingBindMode","lineString");const t=()=>{this._distance.value=this.getDistance()??0};t(),this.d(this.pointsChanged.don(t))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new A([this,"classificationType"],yo,"贴地附着目标",ri.defaults.classificationType)],coordinate:[...e.coordinate,new f([this,"distance"],"长度",0,!1,!0)]}}};a(ri,"createDefaultProps",()=>({...U.createDefaultProps(),classificationType:"TERRAIN",stroked:!0,strokeStyle:B({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(ri,"type",ri.register("ESGeoLineString",ri,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoLineString 是用于表示和操作地理折线的对象,支持计算折线距离和设置线样式。
|
|
245
|
+
对象json示例:
|
|
246
|
+
{
|
|
247
|
+
"id": "linestring_xxx",
|
|
248
|
+
"type": "ESGeoLineString",
|
|
249
|
+
"name": "地理折线",
|
|
250
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]]
|
|
251
|
+
}
|
|
252
|
+
`})),a(ri,"supportEditingModes",[...U.supportEditingModes,I.LineStringAppend,I.LineStringInsert]);let ve=ri;const xs=class xs extends ve{constructor(s){super(s)}};a(xs,"createDefaultProps",()=>({...ve.createDefaultProps(),strokeStyle:B({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(xs,"type",xs.register("ESDistanceMeasurement",xs,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:`ESDistanceMeasurement 是用于测量地理空间距离的对象。
|
|
253
|
+
对象json示例:
|
|
254
|
+
{
|
|
255
|
+
"id": "distancemeasurement_xxx",
|
|
256
|
+
"type": "ESDistanceMeasurement",
|
|
257
|
+
"name": "距离测量",
|
|
258
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]]
|
|
259
|
+
}
|
|
260
|
+
`}));let Uo=xs;const oi=class oi extends ee{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new A([this,"mode"],oi.modes,"模式","in"),new N([this,"targetID"],"目标图层id","")]}}};a(oi,"createDefaultProps",()=>({...ee.createDefaultProps(),mode:"in",targetID:"",filled:!1})),a(oi,"type",oi.register("ESExcavate",oi,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESExcavate 是用于在地形上进行挖坑操作的对象。
|
|
261
|
+
对象json示例:
|
|
262
|
+
{
|
|
263
|
+
"id": "excavate_xxx",
|
|
264
|
+
"type": "ESExcavate",
|
|
265
|
+
"name": "挖坑",
|
|
266
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
267
|
+
"mode": "in"
|
|
268
|
+
}
|
|
269
|
+
`})),a(oi,"modes",[["向内","in"],["向外","out"]]);let Sn=oi;const Os=class Os extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"general",basic:[...s.basic,new E([this,"smokeShow"],"显示烟雾")],more:[...s.more,new N([this,"image"],"图片"),new ue([this,"translation"],"偏移")]}}};a(Os,"createDefaultProps",()=>({...j.createDefaultProps(),image:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/fire.png"),translation:F([0,0,0]),smokeShow:!1})),a(Os,"type",Os.register("ESFireParticleSystem",Os,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESFireParticleSystem 是用于创建和管理粒子烟火效果的对象。
|
|
270
|
+
对象json示例:
|
|
271
|
+
{
|
|
272
|
+
"id": "fireparticlesystem_xxx",
|
|
273
|
+
"type": "ESFireParticleSystem",
|
|
274
|
+
"name": "粒子烟火",
|
|
275
|
+
"position": [116.39, 39.9, 0]
|
|
276
|
+
}
|
|
277
|
+
`}));let ur=Os;const vg=`
|
|
114
278
|
## 参数类型为 ESTreeType
|
|
115
279
|
\`\`\`js
|
|
116
280
|
type ESJVector2D = [number, number]
|
|
@@ -120,7 +284,15 @@ ${Hc}
|
|
|
120
284
|
space: number
|
|
121
285
|
}
|
|
122
286
|
\`\`\`
|
|
123
|
-
`,
|
|
287
|
+
`,ki=class ki extends X{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new R([this,"url"],"路径",!0),new ie([this,"treeTypes"],"treeTypes",[],void 0,!0),new R([this,"xiaoBanWidget"],"xiaoBanWidget",ki.defaults.xiaoBanWidget,vg,!0),new N([this,"youShiSZ"]),new N([this,"diLei"]),new N([this,"senLinLB"]),new N([this,"labelMaterial"]),new f([this,"heightOffset"])]}}};a(ki,"createDefaultProps",()=>({...X.createDefaultProps(),url:"",treeTypes:te([]),xiaoBanWidget:te({class:"WidgetBlueprint'/ESFoliage/ESDefaultXiaoBan.ESDefaultXiaoBan",pivot:[.5,1],space:1}),youShiSZ:"StringTable'/ESFoliage/You_Shi_SZ.You_Shi_SZ'",diLei:"StringTable'/ESFoliage/Di_Lei.Di_Lei'",senLinLB:"StringTable'/ESFoliage/Sen_Lin_LB.Sen_Lin_LB'",labelMaterial:"Material'/ESFoliage/ES3DWidgetMaterial.ES3DWidgetMaterial'",heightOffset:40})),a(ki,"type",ki.register("ESForestTileset",ki,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:`ESForestTileset 是用于管理和渲染森林切片图层的对象。
|
|
288
|
+
对象json示例:
|
|
289
|
+
{
|
|
290
|
+
"id": "foresttileset_xxx",
|
|
291
|
+
"type": "ESForestTileset",
|
|
292
|
+
"name": "森林切片图层",
|
|
293
|
+
"url": "http://localhost:9004/forest/tileset.json"
|
|
294
|
+
}
|
|
295
|
+
`}));let Bo=ki;const mc=`class MyDiv {
|
|
124
296
|
// container是Poi的div
|
|
125
297
|
// geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
|
|
126
298
|
// viewer指定当前的视口
|
|
@@ -151,16 +323,16 @@ ${Hc}
|
|
|
151
323
|
destroy() {
|
|
152
324
|
this._container.removeChild(this._div);
|
|
153
325
|
}
|
|
154
|
-
}`,
|
|
326
|
+
}`,_g=`示例代码:
|
|
155
327
|
\`\`\`
|
|
156
|
-
${
|
|
328
|
+
${mc}
|
|
157
329
|
\`\`\`
|
|
158
|
-
`,
|
|
159
|
-
`,
|
|
330
|
+
`,Wo=`<div style="width: 300px; height: 50px; background: rgba(120, 120, 0, 0.7); color: white; font-size: 30px; line-height: 50px; border: 1px solid white;">Hello world!</div>
|
|
331
|
+
`,yg=`示例代码:
|
|
160
332
|
\`\`\`
|
|
161
|
-
${
|
|
333
|
+
${Wo}
|
|
162
334
|
\`\`\`
|
|
163
|
-
`,
|
|
335
|
+
`,ct=class ct extends j{constructor(e){super(e);a(this,"_widgetEvent",this.dv(new v));a(this,"_echartsFunReact",this.dv(w(void 0)));a(this,"_instanceClassReact",this.dv(w(void 0)));const t=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};t(),this.d(this.instanceClassStrChanged.don(t));{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const r=`class MyDiv {
|
|
164
336
|
// container是Poi的div
|
|
165
337
|
// geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
|
|
166
338
|
// viewer指定当前的视口
|
|
@@ -176,7 +348,87 @@ ${Gc}
|
|
|
176
348
|
destroy() {
|
|
177
349
|
this._container.removeChild(this._div);
|
|
178
350
|
}
|
|
179
|
-
}`;this.instanceClassStr=r};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(e){this._echartsFunReact.value=e}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new v([this,"opacity"],"透明度",at.defaults.opacity,!0),new v([this,"zOrder"],"zOrder",at.defaults.zOrder,!0),new pe([this,"anchor"],"偏移比例",at.defaults.anchor,!0),new Vt([this,"innerHTML"],"innerHTML",at.defaults.innerHTML,Bp,!0),new Vt([this,"instanceClassStr"],"实例类",at.defaults.instanceClassStr,Wp,!0),new S([this,"renderInUE"],"是否在UE中渲染",!0,!1)]}}};a(at,"createDefaultProps",()=>({...M.createDefaultProps(),opacity:1,anchor:F([.5,1]),instanceClassStr:$c,innerHTML:Gc,zOrder:0,renderInUE:!1})),a(at,"type",at.register("ESGeoDiv",at,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"}));let ko=at;const xi=class xi extends we{constructor(e){super(e);a(this,"_line",this.ad(new we));a(this,"_arrowPolygon",this.ad(new Q));this.ad(this.components.disposableAdd(this.line,!0)),this.line.show=!1,this.ad(this.components.disposableAdd(this.arrowPolygon));const{line:t,arrowPolygon:i}=this;this.ad(x([t,"points"],[this,"points"])),this.ad(ue([this.pointsChanged,this.modeChanged],()=>{this.updateArrowPolygon()},{immediate:!0})),this.ad(_([i,"show"],[this,"show"])),this.ad(_([i,"collision"],[this,"collision"])),this.ad(_([i,"allowPicking"],[this,"allowPicking"])),this.ad(_([i,"filled"],[this,"filled"])),this.ad(_([i,"fillGround"],[this,"fillGround"])),this.ad(_([i,"fillColor"],[this,"fillColor"])),this.ad(_([i,"fillMaterial"],[this,"fillMaterial"])),this.ad(_([i,"fillMaterialParams"],[this,"fillMaterialParams"])),this.ad(_([i,"stroked"],[this,"stroked"])),this.ad(_([i,"strokeGround"],[this,"strokeGround"])),this.ad(_([i,"strokeColor"],[this,"strokeColor"])),this.ad(_([i,"strokeMaterial"],[this,"strokeMaterial"])),this.ad(_([i,"strokeMaterialParams"],[this,"strokeMaterialParams"])),this.ad(_([i,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([i,"strokeWidthType"],[this,"strokeWidthType"])),this.ad(_([i,"classificationType"],[this,"classificationType"]))}get line(){return this._line}get arrowPolygon(){return this._arrowPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new j([this,"mode"],ao,"箭头模式",xi.defaults.mode)]}}updateArrowPolygon(){const e=this.points;if(!e||e.length<2){this._arrowPolygon.points=[];return}let t=yo(e,this.mode);t&&t.length>=3?this._arrowPolygon.points=[...t,t[0]]:this._arrowPolygon.points=[]}};a(xi,"createDefaultProps",()=>({...we.createDefaultProps(),mode:"straightArrow",stroked:!1,filled:!0,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(xi,"type",xi.register("ESSquadCombatArrow",xi,{chsName:"分队战斗箭头",tags:["ESObjects","_ES_Impl_Cesium"],description:"分队战斗箭头,军事标绘箭头类,支持直箭头和燕尾箭头"}));let Mo=xi;const ki=class ki extends Q{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new S([this,"fireShow"],"显示火焰",!0),new v([this,"fireHeight"],"火焰高度",ki.defaults.fireHeight)]}}};a(ki,"createDefaultProps",()=>({...Q.createDefaultProps(),fireShow:!0,fireHeight:W(15)})),a(ki,"type",ki.register("ESGeoPolygonWithFire",ki,{chsName:"火焰多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_OL","_ES_Impl_UE"],description:"带火焰效果的地理多边形"}));let jo=ki;const Ue=class Ue extends ${constructor(e){super(e);a(this,"editingBindMode","circular");a(this,"fires",[]);this.ad(()=>{this.clear()}),this.ad(ue([this.pointsChanged,this.interpolationCountChanged,this.useFireParticleSystemChanged],()=>{this.clear(),this.createFires()},{immediate:!0}))}createFires(){if(!this.points||this.points.length<2||!this.useFireParticleSystem)return;let e=this.interpolationCount,t=this.points;for(;e>0;)e--,t=this.interpolationPoints(t);t.forEach(i=>{const r=new er;this.fires.push(r),this.components.add(r),r.position=i,r.ad(_([r,"show"],[this,"show"])),r.ad(_([r,"collision"],[this,"collision"])),r.ad(_([r,"allowPicking"],[this,"allowPicking"])),r.ad(_([r,"smokeShow"],[this,"smokeShow"])),r.ad(_([r,"scale"],[this,"scale"]))})}interpolationPoints(e){return e.map((t,i)=>{const r=e[(i+1)%e.length],{center:o}=Hn([t,r]);return[t,o]}).flat()}clear(){this.fires.forEach(e=>{this.components.delete(e),e.destroy()}),this.fires=[]}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L("火焰参数"),new S([this,"useFireParticleSystem"],"使用粒子系统",Ue.defaults.useFireParticleSystem),new v([this,"interpolationCount"],"火焰粒子插值次数",Ue.defaults.interpolationCount),new S([this,"smokeShow"],"粒子显示烟雾",Ue.defaults.smokeShow),new ve([this,"scale"],"缩放",[1,1,1]),new v([this,"fireWidth"],"火焰宽度(米)",Ue.defaults.fireWidth),new v([this,"fireHeight"],"火焰高度(米)",Ue.defaults.fireHeight),new v([this,"fireIntensity"],"火焰强度",Ue.defaults.fireIntensity),new v([this,"stepCount"],"步进次数(16-256)",void 0)]}}};a(Ue,"createDefaultProps",()=>({...$.createDefaultProps(),fireWidth:5,fireHeight:10,fireIntensity:1,stepCount:64,interpolationCount:1,useFireParticleSystem:!0,smokeShow:!1,scale:F([1,1,1])})),a(Ue,"type",Ue.register("ESFireWall",Ue,{chsName:"火焰墙",tags:["ESObjects","_ES_Impl_Cesium"],description:"火焰墙效果对象"})),a(Ue,"supportEditingModes",[...$.supportEditingModes,D.CircularAppend,D.CircularInsert,D.Translation,D.HeightModify]);let Ro=Ue;const Mi=class Mi extends ${constructor(e){super(e);a(this,"editingBindMode","doublePoints")}toPolygon(){if(this.points&&this.points.length>=2){const e=[...this.points][0],t=[...this.points][1];return[e,[e[0],t[1],e[2]],t,[t[0],e[1],t[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const e=[...this.points],t=e[0],i=e[1],r=[t,[t[0],i[1],t[2]],i,[i[0],t[1],i[2]]];this._area.value=po(r)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const e=[...this.points],t=e[0],i=e[1],r=[t,[t[0],i[1],t[2]],i,[i[0],t[1],i[2]]],o=[...r,r[0]],h=Lt(o,"GEODESIC"),c=h[h.length-1];this._perimeter.value=c}else this._perimeter.value=0}getESProperties(){const e=super.getESProperties();return{...e,coordinate:[...e.coordinate,new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)]}}};a(Mi,"createDefaultProps",()=>({...$.createDefaultProps(),collision:!1,stroked:!0,filled:!0,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),a(Mi,"type",Mi.register("ESGeoRectangle",Mi,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),a(Mi,"supportEditingModes",[...$.supportEditingModes,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let Ao=Mi;const No={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},ri=class ri extends M{constructor(e){super(e);a(this,"_nodeTransformations",this.dv(y(void 0)));a(this,"_czmModelReadyEvent",this.dv(new m));a(this,"_setNodePositionEvent",this.dv(new m));a(this,"_setNodeRotationEvent",this.dv(new m));a(this,"_setNodeScaleEvent",this.dv(new m));a(this,"_printDebugInfoEvent",this.dv(new m));a(this,"setMaterialInfoEvent",this.ad(new m));a(this,"_setMaterialEvent",this.disposeVar(new m))}get nodeTransformations(){return this._nodeTransformations.value}set nodeTransformations(e){this._nodeTransformations.value=e}get nodeTransformationsChanged(){return this._nodeTransformations.changed}get czmModelReadyEvent(){return this._czmModelReadyEvent}deleteNodeTransformation(e){if(!this.nodeTransformations||!this.nodeTransformations[e])return;const t={...this.nodeTransformations};delete t[e],this.nodeTransformations=t}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(e,t){this._setNodePositionEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...No};if(t.some(r=>!Number.isFinite(r))){console.error(`setNodePosition error: ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,translationX:t[0],translationY:t[1],translationZ:t[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(e,t){this._setNodeRotationEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...No};if(t.some(r=>!Number.isFinite(r))){console.error(`setNodeRotation error: ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,rotationHeading:t[0],rotationPitch:t[1],rotationRoll:t[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(e,t){this._setNodeScaleEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...No};if(t.some(r=>!Number.isFinite(r)||r<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,scaleX:t[0],scaleY:t[1],scaleZ:t[2]}}}getNodePosition(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.translationX,t.translationY,t.translationZ]}getNodeRotation(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.rotationHeading,t.rotationPitch,t.rotationRoll]}getNodeScale(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.scaleX,t.scaleY,t.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(t=>{const i=new b;i.ad(this.setMaterialInfoEvent.donce(r=>{i.destroy(),t(r)})),this._setMaterialEvent.emit(e)})}setLight122(){this.czmEnvironmentMapManager={...wo}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",dataSource:[...e.dataSource,new z([this,"url"],"模型路径",ri.defaults.url,void 0,!0),new re([this,"instances"],"实例化矩阵",ri.defaults.instances,void 0,!0)],more:[...e.more,new v([this,"czmAnimationsIndex"],"动画索引",void 0,!0),new pe([this,"czmImageBasedLightingFactor"]),new v([this,"czmAtmosphereScatteringIntensity"]),new z([this,"czmEnvironmentMapManager"]),new N("控制台输出模型信息",()=>this.printDebugInfo(),[],"printDebugInfo"),new v([this,"czmMaximumScale"],"最大缩放比例",void 0,!0),new v([this,"czmNativeScale"],"统一缩放值"),new v([this,"czmMinimumPixelSize"],"最小像素尺寸"),new G([this,"czmColor"],"颜色")]}}};a(ri,"createDefaultProps",()=>({...M.createDefaultProps(),url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/building.glb"),czmAnimationsIndex:void 0,czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:F([1,1,1,1]),allowPicking:!0,instances:ee([]),czmImageBasedLightingFactor:F([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:te(void 0)})),a(ri,"type",ri.register("ESGltfModel",ri,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"}));let yt=ri;const We=class We extends M{constructor(e){super(e);a(this,"_aiMoveToEvent",this.dv(new m));a(this,"_stopAIMoveEvent",this.dv(new m))}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(e,t){this._aiMoveToEvent.emit(e,t)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"mode"],We.modes,"模式",We.defaults.mode,!0),new j([this,"animation"],We.animations,"动画",We.defaults.animation,!0),new re([this,"instances"],"实例化矩阵",We.defaults.instances,void 0,!0)],more:[...e.more,new N("自动寻路",this.aiMoveTo.bind(this),[[0,0,0],0],"aiMoveTo,UE生效"),new N("停止自动寻路",()=>this.stopAIMove(),[],"stopAIMove")]}}};a(We,"createDefaultProps",()=>({...M.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0,instances:ee([])})),a(We,"type",We.register("ESHuman",We,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),a(We,"modes",[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"],["维修工","repairMan"],["消防员","fireMan"],["消防员-水泵","firefighterWithWaterPump"],["消防员-打火鞭","firefighterWithFirestick"],["消防员-点火器","firefighterWithDripIgniter"],["消防员-风力灭火机","firefighterWithBlower"],["消防员-水枪","firefighterWithHose"],["消防员-灭火弹","firefighterWithThrowable"],["消防员-工具包","firefighterWithToolkit"],["消防员-行走","firefighterWalking"],["消防员-防护服","firefighterUniform"]]),a(We,"animations",[["站立","standing"],["行走","walking"],["奔跑","running"]]);let ze=We;const ji=class ji extends Ve{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new z([this,"url"],"图片路径",ji.defaults.url),new S([this,"isHoverZoom"],"悬浮放大"),new S([this,"hoverHighlight"],"悬浮高亮")]}}};a(ji,"createDefaultProps",()=>({...Ve.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1,hoverHighlight:!1,renderMode:4})),a(ji,"type",ji.register("ESImageLabel",ji,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"基础图片标签。"}));let tr=ji;const Ct=class Ct extends Y{constructor(s){super(s),this.ad(x([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(x([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"dataSource",basic:[...s.basic,new v([this,"zIndex"],"层级序号",Ct.defaults.zIndex)],dataSource:[...s.dataSource,new z([this,"url"],"影像服务地址"),new Je([this,"rectangle"],"矩形范围",Ct.defaults.rectangle,!0),new ge([this,"maximumLevel"],1,[1,24],"最大级别",Ct.defaults.maximumLevel,!0),new z([this,"options"],"options",Ct.defaults.options,void 0,!0),new A([this,"targetID"],"targetID"),new ge([this,"opacity"],.01,[0,1],"opacity",1)],more:[...s.more,new L("通用"),new v([this,"height"],"高度"),new A([this,"actorTag"]),new A([this,"componentTag"]),new v([this,"minimumLevel"]),new L("图像"),new v([this,"czmAlpha"],"透明度"),new v([this,"czmBrightness"],"亮度"),new v([this,"czmContrast"],"对比度"),new v([this,"czmHue"],"色相"),new v([this,"czmSaturation"],"饱和度"),new v([this,"czmGamma"],"伽马值")]}}};a(Ct,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",rectangle:te([-180,-90,180,90]),options:te(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,opacity:1,splitDirection:"NONE"})),a(Ct,"type",Ct.register("ESImageryLayer",Ct,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"影像图层"}));let dn=Ct;const Hp=`
|
|
351
|
+
}`;this.instanceClassStr=r};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(e){this._echartsFunReact.value=e}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new f([this,"opacity"],"透明度",ct.defaults.opacity,!0),new f([this,"zOrder"],"zOrder",ct.defaults.zOrder,!0),new ne([this,"anchor"],"偏移比例",ct.defaults.anchor,!0),new Xe([this,"innerHTML"],"innerHTML",ct.defaults.innerHTML,yg,!0),new Xe([this,"instanceClassStr"],"实例类",ct.defaults.instanceClassStr,_g,!0),new E([this,"renderInUE"],"是否在UE中渲染",!0,!1)]}}};a(ct,"createDefaultProps",()=>({...j.createDefaultProps(),opacity:1,anchor:F([.5,1]),instanceClassStr:mc,innerHTML:Wo,zOrder:0,renderInUE:!1})),a(ct,"type",ct.register("ESGeoDiv",ct,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoDiv 是用于在地理指定位置显示自定义 HTML 小部件的对象。
|
|
352
|
+
对象json示例:
|
|
353
|
+
{
|
|
354
|
+
"id": "geodiv_xxx",
|
|
355
|
+
"type": "ESGeoDiv",
|
|
356
|
+
"name": "地理DIV",
|
|
357
|
+
"position": [116.39, 39.9, 0],
|
|
358
|
+
"innerHTML":${Wo},
|
|
359
|
+
"opacity": 1
|
|
360
|
+
}
|
|
361
|
+
`}));let Ho=ct;const Mi=class Mi extends ve{constructor(e){super(e);a(this,"_line",this.ad(new ve));a(this,"_arrowPolygon",this.ad(new ee));this.ad(this.components.disposableAdd(this.line,!0)),this.line.show=!1,this.ad(this.components.disposableAdd(this.arrowPolygon));const{line:t,arrowPolygon:i}=this;this.ad(D([t,"points"],[this,"points"])),this.ad(de([this.pointsChanged,this.modeChanged],()=>{this.updateArrowPolygon()},{immediate:!0})),this.ad(_([i,"show"],[this,"show"])),this.ad(_([i,"collision"],[this,"collision"])),this.ad(_([i,"allowPicking"],[this,"allowPicking"])),this.ad(_([i,"filled"],[this,"filled"])),this.ad(_([i,"fillGround"],[this,"fillGround"])),this.ad(_([i,"fillColor"],[this,"fillColor"])),this.ad(_([i,"fillMaterial"],[this,"fillMaterial"])),this.ad(_([i,"fillMaterialParams"],[this,"fillMaterialParams"])),this.ad(_([i,"stroked"],[this,"stroked"])),this.ad(_([i,"strokeGround"],[this,"strokeGround"])),this.ad(_([i,"strokeColor"],[this,"strokeColor"])),this.ad(_([i,"strokeMaterial"],[this,"strokeMaterial"])),this.ad(_([i,"strokeMaterialParams"],[this,"strokeMaterialParams"])),this.ad(_([i,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([i,"strokeWidthType"],[this,"strokeWidthType"])),this.ad(_([i,"classificationType"],[this,"classificationType"]))}get line(){return this._line}get arrowPolygon(){return this._arrowPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new A([this,"mode"],wo,"箭头模式",Mi.defaults.mode)]}}updateArrowPolygon(){const e=this.points;if(!e||e.length<2){this._arrowPolygon.points=[];return}let t=Fo(e,this.mode);t&&t.length>=3?this._arrowPolygon.points=[...t,t[0]]:this._arrowPolygon.points=[]}};a(Mi,"createDefaultProps",()=>({...ve.createDefaultProps(),mode:"straightArrow",stroked:!1,filled:!0,fillStyle:B({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(Mi,"type",Mi.register("ESSquadCombatArrow",Mi,{chsName:"分队战斗箭头",tags:["ESObjects","_ES_Impl_Cesium"],description:`ESSquadCombatArrow 是用于在场景中绘制军事标绘箭头(直箭头或燕尾箭头)的对象。
|
|
362
|
+
对象json示例:
|
|
363
|
+
{
|
|
364
|
+
"id": "squadcombatarrow_xxx",
|
|
365
|
+
"type": "ESSquadCombatArrow",
|
|
366
|
+
"name": "分队战斗箭头",
|
|
367
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
368
|
+
"mode": "straightArrow"
|
|
369
|
+
}
|
|
370
|
+
`}));let $o=Mi;const Ai=class Ai extends ee{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new E([this,"fireShow"],"显示火焰",!0),new f([this,"fireHeight"],"火焰高度",Ai.defaults.fireHeight)]}}};a(Ai,"createDefaultProps",()=>({...ee.createDefaultProps(),fireShow:!0,fireHeight:B(15)})),a(Ai,"type",Ai.register("ESGeoPolygonWithFire",Ai,{chsName:"火焰多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_OL","_ES_Impl_UE"],description:`ESGeoPolygonWithFire 是用于创建带有火焰特效的地理多边形的对象,边框和填充区域以火焰粒子呈现。
|
|
371
|
+
对象json示例:
|
|
372
|
+
{
|
|
373
|
+
"id": "polygonwithfire_xxx",
|
|
374
|
+
"type": "ESGeoPolygonWithFire",
|
|
375
|
+
"name": "火焰多边形",
|
|
376
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
377
|
+
"fireHeight": 15
|
|
378
|
+
}
|
|
379
|
+
`}));let Go=Ai;const We=class We extends U{constructor(e){super(e);a(this,"editingBindMode","circular");a(this,"fires",[]);this.ad(()=>{this.clear()}),this.ad(de([this.pointsChanged,this.interpolationCountChanged,this.useFireParticleSystemChanged],()=>{this.clear(),this.createFires()},{immediate:!0}))}createFires(){if(!this.points||this.points.length<2||!this.useFireParticleSystem)return;let e=this.interpolationCount,t=this.points;for(;e>0;)e--,t=this.interpolationPoints(t);t.forEach(i=>{const r=new ur;this.fires.push(r),this.components.add(r),r.position=i,r.ad(_([r,"show"],[this,"show"])),r.ad(_([r,"collision"],[this,"collision"])),r.ad(_([r,"allowPicking"],[this,"allowPicking"])),r.ad(_([r,"smokeShow"],[this,"smokeShow"])),r.ad(_([r,"scale"],[this,"scale"]))})}interpolationPoints(e){return e.map((t,i)=>{const r=e[(i+1)%e.length],{center:o}=tr([t,r]);return[t,o]}).flat()}clear(){this.fires.forEach(e=>{this.components.delete(e),e.destroy()}),this.fires=[]}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new k("火焰参数"),new E([this,"useFireParticleSystem"],"使用粒子系统",We.defaults.useFireParticleSystem),new f([this,"interpolationCount"],"火焰粒子插值次数",We.defaults.interpolationCount),new E([this,"smokeShow"],"粒子显示烟雾",We.defaults.smokeShow),new ue([this,"scale"],"缩放",[1,1,1]),new f([this,"fireWidth"],"火焰宽度(米)",We.defaults.fireWidth),new f([this,"fireHeight"],"火焰高度(米)",We.defaults.fireHeight),new f([this,"fireIntensity"],"火焰强度",We.defaults.fireIntensity),new f([this,"stepCount"],"步进次数(16-256)",void 0)]}}};a(We,"createDefaultProps",()=>({...U.createDefaultProps(),fireWidth:5,fireHeight:10,fireIntensity:1,stepCount:64,interpolationCount:1,useFireParticleSystem:!0,smokeShow:!1,scale:F([1,1,1])})),a(We,"type",We.register("ESFireWall",We,{chsName:"火焰墙",tags:["ESObjects","_ES_Impl_Cesium"],description:`ESFireWall 是用于创建环形火焰墙效果的对象。
|
|
380
|
+
对象json示例:
|
|
381
|
+
{
|
|
382
|
+
"id": "firewall_xxx",
|
|
383
|
+
"type": "ESFireWall",
|
|
384
|
+
"name": "火焰墙",
|
|
385
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
386
|
+
"fireHeight": 10
|
|
387
|
+
}
|
|
388
|
+
`})),a(We,"supportEditingModes",[...U.supportEditingModes,I.CircularAppend,I.CircularInsert,I.Translation,I.HeightModify]);let Jo=We;const ji=class ji extends U{constructor(e){super(e);a(this,"editingBindMode","doublePoints")}toPolygon(){if(this.points&&this.points.length>=2){const e=[...this.points][0],t=[...this.points][1];return[e,[e[0],t[1],e[2]],t,[t[0],e[1],t[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const e=[...this.points],t=e[0],i=e[1],r=[t,[t[0],i[1],t[2]],i,[i[0],t[1],i[2]]];this._area.value=Po(r)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const e=[...this.points],t=e[0],i=e[1],r=[t,[t[0],i[1],t[2]],i,[i[0],t[1],i[2]]],o=[...r,r[0]],l=Vt(o,"GEODESIC"),h=l[l.length-1];this._perimeter.value=h}else this._perimeter.value=0}getESProperties(){const e=super.getESProperties();return{...e,coordinate:[...e.coordinate,new f([this,"area"],"面积",0,!1,!0),new f([this,"perimeter"],"周长",0,!1,!0)]}}};a(ji,"createDefaultProps",()=>({...U.createDefaultProps(),collision:!1,stroked:!0,filled:!0,fillStyle:B({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),a(ji,"type",ji.register("ESGeoRectangle",ji,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoRectangle 是用于表示和操作地理矩形的对象,通过两个对角点定义矩形并计算面积和周长。
|
|
389
|
+
对象json示例:
|
|
390
|
+
{
|
|
391
|
+
"id": "rectangle_xxx",
|
|
392
|
+
"type": "ESGeoRectangle",
|
|
393
|
+
"name": "矩形",
|
|
394
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.91, 0]]
|
|
395
|
+
}
|
|
396
|
+
`})),a(ji,"supportEditingModes",[...U.supportEditingModes,I.DoublePoints,I.DoublePointsAppend,I.DoublePointsModify]);let qo=ji;const Xo={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},ai=class ai extends j{constructor(e){super(e);a(this,"_nodeTransformations",this.dv(w(void 0)));a(this,"_czmModelReadyEvent",this.dv(new v));a(this,"_setNodePositionEvent",this.dv(new v));a(this,"_setNodeRotationEvent",this.dv(new v));a(this,"_setNodeScaleEvent",this.dv(new v));a(this,"_printDebugInfoEvent",this.dv(new v));a(this,"setMaterialInfoEvent",this.ad(new v));a(this,"_setMaterialEvent",this.disposeVar(new v))}get nodeTransformations(){return this._nodeTransformations.value}set nodeTransformations(e){this._nodeTransformations.value=e}get nodeTransformationsChanged(){return this._nodeTransformations.changed}get czmModelReadyEvent(){return this._czmModelReadyEvent}deleteNodeTransformation(e){if(!this.nodeTransformations||!this.nodeTransformations[e])return;const t={...this.nodeTransformations};delete t[e],this.nodeTransformations=t}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(e,t){this._setNodePositionEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...Xo};if(t.some(r=>!Number.isFinite(r))){console.error(`setNodePosition error: ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,translationX:t[0],translationY:t[1],translationZ:t[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(e,t){this._setNodeRotationEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...Xo};if(t.some(r=>!Number.isFinite(r))){console.error(`setNodeRotation error: ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,rotationHeading:t[0],rotationPitch:t[1],rotationRoll:t[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(e,t){this._setNodeScaleEvent.emit(e,t),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...Xo};if(t.some(r=>!Number.isFinite(r)||r<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${e} ${t}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,scaleX:t[0],scaleY:t[1],scaleZ:t[2]}}}getNodePosition(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.translationX,t.translationY,t.translationZ]}getNodeRotation(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.rotationHeading,t.rotationPitch,t.rotationRoll]}getNodeScale(e){if(!this.nodeTransformations)return;const t=this.nodeTransformations[e];if(t)return[t.scaleX,t.scaleY,t.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(t=>{const i=new b;i.ad(this.setMaterialInfoEvent.donce(r=>{i.destroy(),t(r)})),this._setMaterialEvent.emit(e)})}setLight122(){this.czmEnvironmentMapManager={...Do}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",dataSource:[...e.dataSource,new R([this,"url"],"模型路径",ai.defaults.url,void 0,!0),new ie([this,"instances"],"实例化矩阵",ai.defaults.instances,void 0,!0)],more:[...e.more,new f([this,"czmAnimationsIndex"],"动画索引",void 0,!0),new ne([this,"czmImageBasedLightingFactor"]),new f([this,"czmAtmosphereScatteringIntensity"]),new R([this,"czmEnvironmentMapManager"]),new L("控制台输出模型信息",()=>this.printDebugInfo(),[],"printDebugInfo"),new f([this,"czmMaximumScale"],"最大缩放比例",void 0,!0),new f([this,"czmNativeScale"],"统一缩放值"),new f([this,"czmMinimumPixelSize"],"最小像素尺寸"),new G([this,"czmColor"],"颜色")]}}};a(ai,"createDefaultProps",()=>({...j.createDefaultProps(),url:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/building.glb"),czmAnimationsIndex:void 0,czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:F([1,1,1,1]),allowPicking:!0,instances:q([]),czmImageBasedLightingFactor:F([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:te(void 0)})),a(ai,"type",ai.register("ESGltfModel",ai,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGltfModel 是用于加载和操作 glTF/GLB 模型的对象,支持模型节点变换、材质设置和动画播放。
|
|
397
|
+
对象json示例:
|
|
398
|
+
{
|
|
399
|
+
"id": "gltfmodel_xxx",
|
|
400
|
+
"type": "ESGltfModel",
|
|
401
|
+
"name": "模型",
|
|
402
|
+
"position": [116.39, 39.9, 0],
|
|
403
|
+
"url": ${M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/building.glb")}
|
|
404
|
+
}
|
|
405
|
+
`}));let Et=ai;const He=class He extends j{constructor(e){super(e);a(this,"_aiMoveToEvent",this.dv(new v));a(this,"_stopAIMoveEvent",this.dv(new v))}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(e,t){this._aiMoveToEvent.emit(e,t)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"mode"],He.modes,"模式",He.defaults.mode,!0),new A([this,"animation"],He.animations,"动画",He.defaults.animation,!0),new ie([this,"instances"],"实例化矩阵",He.defaults.instances,void 0,!0)],more:[...e.more,new L("自动寻路",this.aiMoveTo.bind(this),[[0,0,0],0],"aiMoveTo,UE生效"),new L("停止自动寻路",()=>this.stopAIMove(),[],"stopAIMove")]}}};a(He,"createDefaultProps",()=>({...j.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0,instances:q([])})),a(He,"type",He.register("ESHuman",He,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESHuman 是用于模拟场景中人员行为的对象,支持多种人员类型和动画状态。
|
|
406
|
+
对象json示例:
|
|
407
|
+
{
|
|
408
|
+
"id": "human_xxx",
|
|
409
|
+
"type": "ESHuman",
|
|
410
|
+
"name": "人员",
|
|
411
|
+
"position": [116.39, 39.9, 0],
|
|
412
|
+
"mode": "worker"
|
|
413
|
+
}
|
|
414
|
+
`})),a(He,"modes",[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"],["维修工","repairMan"],["消防员","fireMan"],["消防员-水泵","firefighterWithWaterPump"],["消防员-打火鞭","firefighterWithFirestick"],["消防员-点火器","firefighterWithDripIgniter"],["消防员-风力灭火机","firefighterWithBlower"],["消防员-水枪","firefighterWithHose"],["消防员-灭火弹","firefighterWithThrowable"],["消防员-工具包","firefighterWithToolkit"],["消防员-行走","firefighterWalking"],["消防员-防护服","firefighterUniform"]]),a(He,"animations",[["站立","standing"],["行走","walking"],["奔跑","running"]]);let Be=He;const Ri=class Ri extends ze{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new R([this,"url"],"图片路径",Ri.defaults.url),new E([this,"isHoverZoom"],"悬浮放大"),new E([this,"hoverHighlight"],"悬浮高亮")]}}};a(Ri,"createDefaultProps",()=>({...ze.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1,hoverHighlight:!1,renderMode:4})),a(Ri,"type",Ri.register("ESImageLabel",Ri,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:`ESImageLabel 是用于在场景中指定位置显示图片标签的可视化对象。
|
|
415
|
+
对象json示例:
|
|
416
|
+
{
|
|
417
|
+
"id": "imagelabel_xxx",
|
|
418
|
+
"type": "ESImageLabel",
|
|
419
|
+
"name": "图片标签",
|
|
420
|
+
"position": [116.39, 39.9, 0],
|
|
421
|
+
"url": "inner://CameraBlue.png"
|
|
422
|
+
}
|
|
423
|
+
`}));let pr=Ri;const Ct=class Ct extends X{constructor(s){super(s),this.ad(D([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(D([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"dataSource",basic:[...s.basic,new f([this,"zIndex"],"层级序号",Ct.defaults.zIndex)],dataSource:[...s.dataSource,new R([this,"url"],"影像服务地址"),new Fe([this,"rectangle"],"矩形范围",Ct.defaults.rectangle,!0),new pe([this,"maximumLevel"],1,[1,24],"最大级别",Ct.defaults.maximumLevel,!0),new R([this,"options"],"options",Ct.defaults.options,void 0,!0),new N([this,"targetID"],"targetID"),new pe([this,"opacity"],.01,[0,1],"opacity",1)],more:[...s.more,new k("通用"),new f([this,"height"],"高度"),new N([this,"actorTag"]),new N([this,"componentTag"]),new f([this,"minimumLevel"]),new k("图像"),new f([this,"czmAlpha"],"透明度"),new f([this,"czmBrightness"],"亮度"),new f([this,"czmContrast"],"对比度"),new f([this,"czmHue"],"色相"),new f([this,"czmSaturation"],"饱和度"),new f([this,"czmGamma"],"伽马值")]}}};a(Ct,"createDefaultProps",()=>({...X.createDefaultProps(),url:"",rectangle:te([-180,-90,180,90]),options:te(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,opacity:1,splitDirection:"NONE"})),a(Ct,"type",Ct.register("ESImageryLayer",Ct,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:`ESImageryLayer 是用于加载和显示影像图层的对象,支持透明度、亮度等视觉效果调节。
|
|
424
|
+
对象json示例:
|
|
425
|
+
{
|
|
426
|
+
"id": "imagerylayer_xxx",
|
|
427
|
+
"type": "ESImageryLayer",
|
|
428
|
+
"name": "影像图层",
|
|
429
|
+
"url": "https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
|
|
430
|
+
}
|
|
431
|
+
`}));let fs=Ct;const wg=`
|
|
180
432
|
# 声明文件
|
|
181
433
|
### options 类型
|
|
182
434
|
\`\`\`javascript
|
|
@@ -282,14 +534,155 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
282
534
|
};
|
|
283
535
|
|
|
284
536
|
\`\`\`
|
|
285
|
-
`,ht=class ht extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"size"],"尺寸",ht.defaults.size),new S([this,"autoFollow"],"自动跟随",ht.defaults.autoFollow),new j([this,"mode"],ht.modes,"模式","blueSky")],more:[...s.more,new v([this,"autoOpacityFactor"],"自动消失系数",ht.defaults.autoOpacityFactor)]}}};a(ht,"createDefaultProps",()=>({...M.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),a(ht,"type",ht.register("ESLocalSkyBox",ht,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),a(ht,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let Vo=ht;const bn=class bn extends M{constructor(e){super(e);a(this,"_location",this.disposeVar(y(void 0)));{const t=()=>{this.location=this.position};t(),this.ad(this.positionChanged.don(t))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};a(bn,"type",bn.register("ESLocationMeasurement",bn,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let Lo=bn;const be=class be extends M{constructor(e){super(e);a(this,"_player",this.dv(new tt));{const t=be.defaults;this.d(x([this._player,"loop"],[this,"playingLoop"],i=>i??t.playingLoop,i=>i??t.playingLoop)),this.d(x([this._player,"currentTime"],[this,"currentTime"],i=>i??t.currentTime,i=>i??t.currentTime)),this.d(x([this._player,"duration"],[this,"duration"],i=>i??t.duration,i=>i??t.duration)),this.d(x([this._player,"playing"],[this,"playing"],i=>i??t.playing,i=>i??t.playing)),this.d(x([this._player,"speed"],[this,"playingSpeed"],i=>i??t.playingSpeed,i=>i??t.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("通用"),new N("飞入",t=>this.flyTo(t),[1e3],"flyTo"),new Vt([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new v([this,"emissionRate"],"发射率",5,!0),new S([this,"loop"],"是否循环",!0,!0),new v([this,"particleScale"],"等级",1,!0),new v([this,"startScale"],"初始等级",void 0,!0),new v([this,"endScale"],"结束等级",be.defaults.endScale,!0),new G([this,"color"],"颜色",void 0,!0),new G([this,"startColor"],"初始颜色",void 0,!0),new G([this,"endColor"],"结束颜色",void 0,!0),new S([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new v([this,"speed"],"速度",1,!0),new v([this,"minimumSpeed"],"最小速度",void 0,!0),new v([this,"maximumSpeed"],"最大速度",void 0,!0),new v([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new v([this,"particleLife"],"粒子生命周期",be.defaults.particleLife,!0),new v([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new v([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new v([this,"mass"],"块数量",1,!0),new v([this,"minimumMass"],"最小块数量",void 0,!0),new v([this,"maximumMass"],"最大块数量",void 0,!0),new pe([this,"imageSize"],"图片尺寸",be.defaults.imageSize,!0),new pe([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new pe([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new A([this,"image"],"图片",be.defaults.image,!0),new ve([this,"translation"],"偏移",[0,0,0],!0),new re([this,"bursts"],"bursts",[]),new z([this,"emitter"],"emitter",be.defaults.emitter),new L("播放器"),new v([this,"ratio"],"播放比率",0,!0),new Ln([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new S([this,"playingLoop"],"是否循环",be.defaults.playingLoop,!0),new v([this,"currentTime"],"当前时间",be.defaults.currentTime,!0),new v([this,"duration"],"过渡时间",be.defaults.duration,!0),new S([this,"playing"],"是否播放",be.defaults.playing,!0),new v([this,"playingSpeed"],"播放速度",be.defaults.playingSpeed,!0)]}}};a(be,"createDefaultProps",()=>({...M.createDefaultProps(),emitter:te({type:"CircleEmitter",radius:.5}),bursts:Sr(void 0),translation:ee(void 0),image:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),imageSize:ee([20,20]),minimumImageSize:ee(void 0),maximumImageSize:ee(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:ee(void 0),startColor:ee(void 0),endColor:ee(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),a(be,"type",be.register("ESParticleSystemPrimitive",be,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let ir=be;const ct=class ct extends Ve{constructor(e){super(e);a(this,"initialStyle",this.ad(te(void 0)));a(this,"_getInitialStyleEvent",this.disposeVar(new m))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const t=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{t(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"mode"],ct.modes,"模式",ct.defaults.mode),new z([this,"style"],"样式",ct.defaults.style),new S([this,"autoAnchor"],"自动锚点对齐",ct.defaults.autoAnchor)]}}};a(ct,"createDefaultProps",()=>({...Ve.createDefaultProps(),mode:"SquareH01",style:W({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),a(ct,"type",ct.register("ESPoi2D",ct,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),a(ct,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let un=ct;const St=class St extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new j([this,"mode"],St.modes,"模式",St.defaults.mode),new z([this,"style"],"样式",St.defaults.style)]}}};a(St,"createDefaultProps",()=>({...M.createDefaultProps(),mode:"triangle",style:W({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),a(St,"type",St.register("ESPoi3D",St,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),a(St,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let zo=St;const bs=class bs extends Q{constructor(e){super(e);a(this,"_czmFlattenedPlaneId",this.dv(y("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"targetID"],"目标图层id","")]}}};a(bs,"createDefaultProps",()=>({...Q.createDefaultProps(),targetID:"",filled:!1})),a(bs,"type",bs.register("ESPolygonFlattenedPlane",bs,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let Uo=bs;const Es=class Es extends Y{constructor(e){super(e);a(this,"_czmFlattenedPlaneId",this.dv(y("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"targetID"],"目标图层id","")],style:[...e.style,new S([this,"stroked"],"开启线样式",!1),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new v([this,"strokeWidth"],"线宽",1),new S([this,"filled"],"开启填充样式",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,.5]),new S([this,"strokeGround"],"线贴地",!1),new S([this,"fillGround"],"填充贴地",!1)]}}};a(Es,"createDefaultProps",()=>({...Y.createDefaultProps(),targetID:"",filled:!1,stroked:!1,strokeColor:F([1,1,1,1]),strokeWidth:1,fillColor:F([1,1,1,.5]),strokeGround:!1,fillGround:!1,pointsSet:Pr([])})),a(Es,"type",Es.register("ESPolygonsFlattenedPlane",Es,{chsName:"多压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonsFlattenedPlane"}));let Wo=Es;const Jc=async(n,s,e)=>{const{viewer:t}=n;if(!t){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await t.callUeFunc({f:"AddTrees",p:{id:s,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},qc=async(n,s)=>{const{viewer:e}=n;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const t=await e.callUeFunc({f:"RemoveAllTrees",p:{id:s}});return t.error&&console.error("RemoveAllTrees:",t.error),t},Xc=async(n,s,e)=>{const{viewer:t}=n;if(!t){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await t.callUeFunc({f:"UpdateTreeParams",p:{id:s,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},Yc=async(n,s,e,t)=>{const{viewer:i}=n;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const r=await i.callUeFunc({f:"CutDownTrees",p:{id:s,TreeIds:e,TimeLength:t}});return r.error&&console.error("CutDownTrees:",r.error),r},Kc=async(n,s,e,t,i)=>{const{viewer:r}=n;if(!r){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await r.callUeFunc({f:"GrowthSimulation",p:{id:s,ToParams:e,SwitchTime:i,TimeLength:t}});return o.error&&console.error("GrowthSimulation:",o.error),o},Cs=class Cs extends Y{constructor(e){super(e);a(this,"_addTreesEvent",this.dv(new m));a(this,"_removeAllTreesEvent",this.dv(new m));a(this,"_updateTreeParamsEvent",this.dv(new m));a(this,"_cutDownTreesEvent",this.dv(new m));a(this,"_growthSimulationEvent",this.dv(new m))}async addTreesCallFunc(e,t){return await Jc(e,this.id,t)}async updateTreeParamsCallFunc(e,t){return await Xc(e,this.id,t)}async cutDownTreesCallFunc(e,t,i){return await Yc(e,this.id,t,i)}async removeAllTreesCallFunc(e){return await qc(e,this.id)}async growthSimulationCallFunc(e,t,i,r){return await Kc(e,this.id,t,i,r)}async getIdByComponentNameAndHitItem(e,t,i){return await e.getIdByComponentNameAndHitItem(this.id,t,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,t){this._cutDownTreesEvent.emit(e,t)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,t,i){this._growthSimulationEvent.emit(e,t,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("通用"),new re([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new v([this,"stumpId"],"树桩id"),new v([this,"intervalTime"],"动画间隔时间"),new v([this,"switchIntervalTime"],"切换间隔时间")]}}};a(Cs,"createDefaultProps",()=>({...Y.createDefaultProps(),treeTypes:te([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),a(Cs,"type",Cs.register("ESSeparateFoliage",Cs,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let Bo=Cs;function sr(n,s,e){const t="buffer"in n,i=t?n.buffer:n;t&&(s+=n.byteOffset);const r=new Array(e),o=new DataView(i);for(let h=0;h<e;++h){const c=o.getUint8(s+h);r[h]=String.fromCharCode(c)}return r.join("")}function nr(n,s){const e="buffer"in n,t=e?n.buffer:n;return e&&(s+=n.byteOffset),new DataView(t).getUint32(s,!0)}function Zc(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,s,e)}function $p(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,s,e)}function Gp(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,s,e)}function Jp(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,s,e)}function Qc(n){if(sr(n,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=nr(n,4);if(e!==2){console.error("Unsupported glTF version");return}const t=nr(n,8);if(t!==n.byteLength){console.error("Invalid glTF length");return}const i=nr(n,12);if(i+12+4>t){console.error("Invalid glTF chunk length");return}if(sr(n,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=sr(n,20,i),h={version:e,length:t,gltfJson:o};if(20+i<n.byteLength){const c=nr(n,20+i);if(sr(n,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const u=Zc(n,20+i+8,c);h.gltfBinary=u}return h}globalThis.parseGlb=Qc;function el(n){const s=Qc(n);if(s===void 0||!s.gltfBinary)return;const e=JSON.parse(s.gltfJson);return e.nodes.map(t=>{var i=e.meshes[t.mesh],r=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,h=e.accessors[r],c=e.bufferViews[h.bufferView];if(!s.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const l=Jp(s.gltfBinary,c.byteOffset??0,c.byteLength/4);var u=e.accessors[o],p=e.bufferViews[u.bufferView];if(!s.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let g;return u.componentType===5121?g=Zc(s.gltfBinary,p.byteOffset??0,p.byteLength/1):u.componentType===5123?g=$p(s.gltfBinary,p.byteOffset??0,p.byteLength/2):u.componentType===5125&&(g=Gp(s.gltfBinary,p.byteOffset??0,p.byteLength/4)),{name:t.name,posBuffer:l,indicesBuffer:g}})}globalThis.parseWaterGlb=el;const Ce=class Ce extends M{constructor(e){super(e);a(this,"_submergingData");a(this,"_allMoments",[]);{const t=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(r=>{this._submergingData=el(r);const o=this._submergingData.map(h=>Date.parse(h.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit(void 0)})}).catch(i=>{console.log(i)})};t(),this.d(this.urlChanged.don(()=>{t()}))}this.ad(ue([this.waterColorChanged,this.frequencyChanged,this.amplitudeChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"url"],"Url地址",Ce.defaults.url),new ge([this,"amplitude"],.01,[0,1],"振幅",Ce.defaults.amplitude),new v([this,"frequency"],"频率",Ce.defaults.frequency),new v([this,"currentTime"],"当前时间",Ce.defaults.currentTime),new z([this,"materialParams"],"材质参数",Ce.defaults.materialParams),new j([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new G([this,"waterColor"],"水的底色",Ce.defaults.waterColor),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",Ce.defaults.waveVelocity),new v([this,"flowSpeed"],"水流速度",Ce.defaults.flowSpeed),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ce.defaults.specularIntensity),new ge([this,"murkiness"],.01,[0,10],"水体浑浊度",Ce.defaults.murkiness)]}}};a(Ce,"createDefaultProps",()=>({...M.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:W({}),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),a(Ce,"type",Ce.register("ESSubmergingAnalysis",Ce,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let Ho=Ce;const Ri=class Ri extends Q{constructor(e){super(e);a(this,"_groundHeight",this.disposeVar(y(0)));a(this,"_startEvent",this.dv(new m));a(this,"_stopEvent",this.dv(new m));this.ad(ue(this.pointsChanged,()=>{var t,i;this.groundHeight=((i=(t=this.points)==null?void 0:t[0])==null?void 0:i[2])??0},{immediate:!0}))}get groundHeight(){return this._groundHeight.value}set groundHeight(e){this._groundHeight.value=e}get groundHeightChanged(){return this._groundHeight.changed}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new G([this,"startColor"],"起始颜色"),new G([this,"endColor"],"结束颜色"),new v([this,"progress"],"计算进度(%)",0,!0),new v([this,"height"],"分析区域高度(m)"),new v([this,"groundHeight"],"地面高度(m)",0,!1,!0),new v([this,"sampleDistance"],"采样间距(m)"),new vt([this,"startTime"],"起始时间(ms)"),new vt([this,"endTime"],"结束时间(ms)"),new v([this,"spanTime"],"时间跨度(h)"),new N("开始分析",()=>this.start(),[],"start"),new N("结束分析",()=>this.stop(),[],"stop")]}}};a(Ri,"createDefaultProps",()=>({...Q.createDefaultProps(),height:30,sampleDistance:10,startColor:F([1,1,0,1]),endColor:F([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),a(Ri,"type",Ri.register("ESSunshineAnalysis",Ri,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),a(Ri,"supportEditingModes",[...Q.supportEditingModes,D.HeightModify]);let $o=Ri;const Wt=class Wt extends Y{constructor(e){super(e);a(this,"_activateEvent",this.disposeVar(new m));a(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new v([this,"zIndex"],"层级序号",Wt.defaults.zIndex)],dataSource:[...e.dataSource,new z([this,"url"],"地形服务地址",Wt.defaults.url),new Je([this,"rectangle"],"矩形范围",Wt.defaults.rectangle)],more:[...e.more,new v([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new v([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};a(Wt,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:F([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0})),a(Wt,"type",Wt.register("ESTerrainLayer",Wt,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"}));let Go=Wt;const lt=class lt extends Ve{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new G([this,"color"],"文本颜色",[1,1,1,1]),new v([this,"fontSize"],"文字大小",14),new Vn([this,"text"],"内容",lt.defaults.text,void 0,!0),new G([this,"backgroundColor"],"背景颜色",lt.defaults.backgroundColor),new Je([this,"padding"],"内边距",lt.defaults.padding),new G([this,"borderColor"],"边界颜色"),new Je([this,"borderRadius"],"边界圆角"),new v([this,"borderWidth"],"边界宽度"),new v([this,"rotate"],"旋转角度",lt.defaults.rotate)],more:[...s.more,new L("czm"),new S([this,"textEditingInteraction"],"文本编辑交互"),new S([this,"textEditing"],"文本编辑"),new v([this,"width"],"宽度",lt.defaults.width,!0),new v([this,"opacity"],"透明度"),new j([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new j([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};a(lt,"createDefaultProps",()=>({...Ve.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:F([1,1,1,1]),backgroundColor:F([0,0,0,.8]),padding:F([5,5,5,5]),borderRadius:F([6,6,6,6]),borderWidth:0,borderColor:F([1,1,1,1]),borderStyle:"solid",rotate:0})),a(lt,"type",lt.register("ESTextLabel",lt,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let as=lt;const qp=`
|
|
537
|
+
`,dt=class dt extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new f([this,"size"],"尺寸",dt.defaults.size),new E([this,"autoFollow"],"自动跟随",dt.defaults.autoFollow),new A([this,"mode"],dt.modes,"模式","blueSky")],more:[...s.more,new f([this,"autoOpacityFactor"],"自动消失系数",dt.defaults.autoOpacityFactor)]}}};a(dt,"createDefaultProps",()=>({...j.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),a(dt,"type",dt.register("ESLocalSkyBox",dt,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESLocalSkyBox 是用于在场景中创建局部天空盒效果(支持多种预设天空模式)的可视化对象。
|
|
538
|
+
对象json示例:
|
|
539
|
+
{
|
|
540
|
+
"id": "localskybox_xxx",
|
|
541
|
+
"type": "ESLocalSkyBox",
|
|
542
|
+
"name": "局部天空盒",
|
|
543
|
+
"position": [116.39, 39.9, 0],
|
|
544
|
+
"mode": "blueSky"
|
|
545
|
+
}
|
|
546
|
+
`})),a(dt,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let Yo=dt;const Mn=class Mn extends j{constructor(e){super(e);a(this,"_location",this.disposeVar(w(void 0)));{const t=()=>{this.location=this.position};t(),this.ad(this.positionChanged.don(t))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};a(Mn,"type",Mn.register("ESLocationMeasurement",Mn,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:`ESLocationMeasurement 是用于在三维场景中创建位置测量点并实时监控位置信息的对象。
|
|
547
|
+
对象json示例:
|
|
548
|
+
{
|
|
549
|
+
"id": "locationmeasurement_xxx",
|
|
550
|
+
"type": "ESLocationMeasurement",
|
|
551
|
+
"name": "位置测量点",
|
|
552
|
+
"position": [116.39, 39.9, 0]
|
|
553
|
+
}
|
|
554
|
+
`}));let Ko=Mn;const ye=class ye extends j{constructor(e){super(e);a(this,"_player",this.dv(new Ye));{const t=ye.defaults;this.d(D([this._player,"loop"],[this,"playingLoop"],i=>i??t.playingLoop,i=>i??t.playingLoop)),this.d(D([this._player,"currentTime"],[this,"currentTime"],i=>i??t.currentTime,i=>i??t.currentTime)),this.d(D([this._player,"duration"],[this,"duration"],i=>i??t.duration,i=>i??t.duration)),this.d(D([this._player,"playing"],[this,"playing"],i=>i??t.playing,i=>i??t.playing)),this.d(D([this._player,"speed"],[this,"playingSpeed"],i=>i??t.playingSpeed,i=>i??t.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new L("飞入",t=>this.flyTo(t),[1e3],"flyTo"),new Xe([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new f([this,"emissionRate"],"发射率",5,!0),new E([this,"loop"],"是否循环",!0,!0),new f([this,"particleScale"],"等级",1,!0),new f([this,"startScale"],"初始等级",void 0,!0),new f([this,"endScale"],"结束等级",ye.defaults.endScale,!0),new G([this,"color"],"颜色",void 0,!0),new G([this,"startColor"],"初始颜色",void 0,!0),new G([this,"endColor"],"结束颜色",void 0,!0),new E([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new f([this,"speed"],"速度",1,!0),new f([this,"minimumSpeed"],"最小速度",void 0,!0),new f([this,"maximumSpeed"],"最大速度",void 0,!0),new f([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new f([this,"particleLife"],"粒子生命周期",ye.defaults.particleLife,!0),new f([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new f([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new f([this,"mass"],"块数量",1,!0),new f([this,"minimumMass"],"最小块数量",void 0,!0),new f([this,"maximumMass"],"最大块数量",void 0,!0),new ne([this,"imageSize"],"图片尺寸",ye.defaults.imageSize,!0),new ne([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new ne([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new N([this,"image"],"图片",ye.defaults.image,!0),new ue([this,"translation"],"偏移",[0,0,0],!0),new ie([this,"bursts"],"bursts",[]),new R([this,"emitter"],"emitter",ye.defaults.emitter),new k("播放器"),new f([this,"ratio"],"播放比率",0,!0),new us([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new E([this,"playingLoop"],"是否循环",ye.defaults.playingLoop,!0),new f([this,"currentTime"],"当前时间",ye.defaults.currentTime,!0),new f([this,"duration"],"过渡时间",ye.defaults.duration,!0),new E([this,"playing"],"是否播放",ye.defaults.playing,!0),new f([this,"playingSpeed"],"播放速度",ye.defaults.playingSpeed,!0)]}}};a(ye,"createDefaultProps",()=>({...j.createDefaultProps(),emitter:te({type:"CircleEmitter",radius:.5}),bursts:Rr(void 0),translation:q(void 0),image:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),imageSize:q([20,20]),minimumImageSize:q(void 0),maximumImageSize:q(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:q(void 0),startColor:q(void 0),endColor:q(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),a(ye,"type",ye.register("ESParticleSystemPrimitive",ye,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESParticleSystemPrimitive 是用于在场景中指定位置生成和播放粒子特效(基于 Primitive API)的对象。
|
|
555
|
+
对象json示例:
|
|
556
|
+
{
|
|
557
|
+
"id": "particlesystemprimitive_xxx",
|
|
558
|
+
"type": "ESParticleSystemPrimitive",
|
|
559
|
+
"name": "粒子",
|
|
560
|
+
"position": [116.39, 39.9, 0],
|
|
561
|
+
"speed": 5
|
|
562
|
+
}
|
|
563
|
+
`}));let gr=ye;const ut=class ut extends ze{constructor(e){super(e);a(this,"initialStyle",this.ad(te(void 0)));a(this,"_getInitialStyleEvent",this.disposeVar(new v))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const t=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{t(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"mode"],ut.modes,"模式",ut.defaults.mode),new R([this,"style"],"样式",ut.defaults.style),new E([this,"autoAnchor"],"自动锚点对齐",ut.defaults.autoAnchor)]}}};a(ut,"createDefaultProps",()=>({...ze.createDefaultProps(),mode:"SquareH01",style:B({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),a(ut,"type",ut.register("ESPoi2D",ut,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPoi2D 是用于在场景中创建各种样式点标记(POI)的可视化对象。
|
|
564
|
+
对象json示例:
|
|
565
|
+
{
|
|
566
|
+
"id": "poi2d_xxx",
|
|
567
|
+
"type": "ESPoi2D",
|
|
568
|
+
"name": "2D点标记",
|
|
569
|
+
"position": [116.39, 39.9, 0],
|
|
570
|
+
"mode": "SquareH01"
|
|
571
|
+
}
|
|
572
|
+
`})),a(ut,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let Cn=ut;const Pt=class Pt extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new A([this,"mode"],Pt.modes,"模式",Pt.defaults.mode),new R([this,"style"],"样式",Pt.defaults.style)]}}};a(Pt,"createDefaultProps",()=>({...j.createDefaultProps(),mode:"triangle",style:B({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),a(Pt,"type",Pt.register("ESPoi3D",Pt,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPoi3D 是用于在三维场景中创建和管理 POI(兴趣点)对象的可视化对象。
|
|
573
|
+
对象json示例:
|
|
574
|
+
{
|
|
575
|
+
"id": "poi3d_xxx",
|
|
576
|
+
"type": "ESPoi3D",
|
|
577
|
+
"name": "3D点标记",
|
|
578
|
+
"position": [116.39, 39.9, 0],
|
|
579
|
+
"mode": "triangle"
|
|
580
|
+
}
|
|
581
|
+
`})),a(Pt,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let Zo=Pt;const Ds=class Ds extends ee{constructor(e){super(e);a(this,"_czmFlattenedPlaneId",this.dv(w("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N([this,"targetID"],"目标图层id","")]}}};a(Ds,"createDefaultProps",()=>({...ee.createDefaultProps(),targetID:"",filled:!1})),a(Ds,"type",Ds.register("ESPolygonFlattenedPlane",Ds,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPolygonFlattenedPlane 是用于在三维场景中创建压平地形的多边形区域并关联瓦片图层实现压平效果的地理矢量对象。
|
|
582
|
+
对象json示例:
|
|
583
|
+
{
|
|
584
|
+
"id": "polygonflattenedplane_xxx",
|
|
585
|
+
"type": "ESPolygonFlattenedPlane",
|
|
586
|
+
"name": "压平",
|
|
587
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
588
|
+
"targetID": "tileset_xxx"
|
|
589
|
+
}
|
|
590
|
+
`}));let Qo=Ds;const Fs=class Fs extends X{constructor(e){super(e);a(this,"_czmFlattenedPlaneId",this.dv(w("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N([this,"targetID"],"目标图层id","")],style:[...e.style,new E([this,"stroked"],"开启线样式",!1),new G([this,"strokeColor"],"线颜色",[1,1,1,1]),new f([this,"strokeWidth"],"线宽",1),new E([this,"filled"],"开启填充样式",!1),new G([this,"fillColor"],"填充颜色",[1,1,1,.5]),new E([this,"strokeGround"],"线贴地",!1),new E([this,"fillGround"],"填充贴地",!1)]}}};a(Fs,"createDefaultProps",()=>({...X.createDefaultProps(),targetID:"",filled:!1,stroked:!1,strokeColor:F([1,1,1,1]),strokeWidth:1,fillColor:F([1,1,1,.5]),strokeGround:!1,fillGround:!1,pointsSet:Nr([])})),a(Fs,"type",Fs.register("ESPolygonsFlattenedPlane",Fs,{chsName:"多压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPolygonsFlattenedPlane 是用于在三维场景中同时压平多个多边形区域的可视化对象。
|
|
591
|
+
对象json示例:
|
|
592
|
+
{
|
|
593
|
+
"id": "polygonsflattenedplane_xxx",
|
|
594
|
+
"type": "ESPolygonsFlattenedPlane",
|
|
595
|
+
"name": "多压平",
|
|
596
|
+
"targetID": "tileset_xxx",
|
|
597
|
+
"pointsSet": [[[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]]]
|
|
598
|
+
}
|
|
599
|
+
`}));let ea=Fs;const vc=async(n,s,e)=>{const{viewer:t}=n;if(!t){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await t.callUeFunc({f:"AddTrees",p:{id:s,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},_c=async(n,s)=>{const{viewer:e}=n;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const t=await e.callUeFunc({f:"RemoveAllTrees",p:{id:s}});return t.error&&console.error("RemoveAllTrees:",t.error),t},yc=async(n,s,e)=>{const{viewer:t}=n;if(!t){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await t.callUeFunc({f:"UpdateTreeParams",p:{id:s,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},wc=async(n,s,e,t)=>{const{viewer:i}=n;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const r=await i.callUeFunc({f:"CutDownTrees",p:{id:s,TreeIds:e,TimeLength:t}});return r.error&&console.error("CutDownTrees:",r.error),r},Ec=async(n,s,e,t,i)=>{const{viewer:r}=n;if(!r){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await r.callUeFunc({f:"GrowthSimulation",p:{id:s,ToParams:e,SwitchTime:i,TimeLength:t}});return o.error&&console.error("GrowthSimulation:",o.error),o},ks=class ks extends X{constructor(e){super(e);a(this,"_addTreesEvent",this.dv(new v));a(this,"_removeAllTreesEvent",this.dv(new v));a(this,"_updateTreeParamsEvent",this.dv(new v));a(this,"_cutDownTreesEvent",this.dv(new v));a(this,"_growthSimulationEvent",this.dv(new v))}async addTreesCallFunc(e,t){return await vc(e,this.id,t)}async updateTreeParamsCallFunc(e,t){return await yc(e,this.id,t)}async cutDownTreesCallFunc(e,t,i){return await wc(e,this.id,t,i)}async removeAllTreesCallFunc(e){return await _c(e,this.id)}async growthSimulationCallFunc(e,t,i,r){return await Ec(e,this.id,t,i,r)}async getIdByComponentNameAndHitItem(e,t,i){return await e.getIdByComponentNameAndHitItem(this.id,t,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,t){this._cutDownTreesEvent.emit(e,t)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,t,i){this._growthSimulationEvent.emit(e,t,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new ie([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new f([this,"stumpId"],"树桩id"),new f([this,"intervalTime"],"动画间隔时间"),new f([this,"switchIntervalTime"],"切换间隔时间")]}}};a(ks,"createDefaultProps",()=>({...X.createDefaultProps(),treeTypes:te([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),a(ks,"type",ks.register("ESSeparateFoliage",ks,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:`ESSeparateFoliage 是用于管理和控制森林中单体树木(添加、砍伐、生长模拟)的对象。
|
|
600
|
+
对象json示例:
|
|
601
|
+
{
|
|
602
|
+
"id": "separatefoliage_xxx",
|
|
603
|
+
"type": "ESSeparateFoliage",
|
|
604
|
+
"name": "单体控制森林",
|
|
605
|
+
"treeTypes": [{"name": "杨树", "meshPath": "/Game/Foliage/Poplar"}]
|
|
606
|
+
}
|
|
607
|
+
`}));let ta=ks;function fr(n,s,e){const t="buffer"in n,i=t?n.buffer:n;t&&(s+=n.byteOffset);const r=new Array(e),o=new DataView(i);for(let l=0;l<e;++l){const h=o.getUint8(s+l);r[l]=String.fromCharCode(h)}return r.join("")}function mr(n,s){const e="buffer"in n,t=e?n.buffer:n;return e&&(s+=n.byteOffset),new DataView(t).getUint32(s,!0)}function bc(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,s,e)}function Eg(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,s,e)}function bg(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,s,e)}function Sg(n,s,e){const t="buffer"in n,i=t?n.buffer:n;if(t&&(s+=n.byteOffset),s+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,s,e)}function Sc(n){if(fr(n,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=mr(n,4);if(e!==2){console.error("Unsupported glTF version");return}const t=mr(n,8);if(t!==n.byteLength){console.error("Invalid glTF length");return}const i=mr(n,12);if(i+12+4>t){console.error("Invalid glTF chunk length");return}if(fr(n,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=fr(n,20,i),l={version:e,length:t,gltfJson:o};if(20+i<n.byteLength){const h=mr(n,20+i);if(fr(n,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const u=bc(n,20+i+8,h);l.gltfBinary=u}return l}globalThis.parseGlb=Sc;function Cc(n){const s=Sc(n);if(s===void 0||!s.gltfBinary)return;const e=JSON.parse(s.gltfJson);return e.nodes.map(t=>{var i=e.meshes[t.mesh],r=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,l=e.accessors[r],h=e.bufferViews[l.bufferView];if(!s.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const c=Sg(s.gltfBinary,h.byteOffset??0,h.byteLength/4);var u=e.accessors[o],p=e.bufferViews[u.bufferView];if(!s.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let g;return u.componentType===5121?g=bc(s.gltfBinary,p.byteOffset??0,p.byteLength/1):u.componentType===5123?g=Eg(s.gltfBinary,p.byteOffset??0,p.byteLength/2):u.componentType===5125&&(g=bg(s.gltfBinary,p.byteOffset??0,p.byteLength/4)),{name:t.name,posBuffer:c,indicesBuffer:g}})}globalThis.parseWaterGlb=Cc;const Ee=class Ee extends j{constructor(e){super(e);a(this,"_submergingData");a(this,"_allMoments",[]);{const t=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(r=>{this._submergingData=Cc(r);const o=this._submergingData.map(l=>Date.parse(l.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit(void 0)})}).catch(i=>{console.log(i)})};t(),this.d(this.urlChanged.don(()=>{t()}))}this.ad(de([this.waterColorChanged,this.frequencyChanged,this.amplitudeChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N([this,"url"],"Url地址",Ee.defaults.url),new pe([this,"amplitude"],.01,[0,1],"振幅",Ee.defaults.amplitude),new f([this,"frequency"],"频率",Ee.defaults.frequency),new f([this,"currentTime"],"当前时间",Ee.defaults.currentTime),new R([this,"materialParams"],"材质参数",Ee.defaults.materialParams),new A([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new G([this,"waterColor"],"水的底色",Ee.defaults.waterColor),new pe([this,"waveVelocity"],.01,[0,1],"波动频率",Ee.defaults.waveVelocity),new f([this,"flowSpeed"],"水流速度",Ee.defaults.flowSpeed),new pe([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ee.defaults.specularIntensity),new pe([this,"murkiness"],.01,[0,10],"水体浑浊度",Ee.defaults.murkiness)]}}};a(Ee,"createDefaultProps",()=>({...j.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:B({}),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),a(Ee,"type",Ee.register("ESSubmergingAnalysis",Ee,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESSubmergingAnalysis 是用于在指定位置加载水体数据进行淹没分析的对象。
|
|
608
|
+
对象json示例:
|
|
609
|
+
{
|
|
610
|
+
"id": "submerginganalysis_xxx",
|
|
611
|
+
"type": "ESSubmergingAnalysis",
|
|
612
|
+
"name": "淹没分析",
|
|
613
|
+
"position": [116.39, 39.9, 0],
|
|
614
|
+
"url": "http://localhost:9004/water/submerging.glb"
|
|
615
|
+
}
|
|
616
|
+
`}));let ia=Ee;const Ni=class Ni extends ee{constructor(e){super(e);a(this,"_groundHeight",this.disposeVar(w(0)));a(this,"_startEvent",this.dv(new v));a(this,"_stopEvent",this.dv(new v));this.ad(de(this.pointsChanged,()=>{var t,i;this.groundHeight=((i=(t=this.points)==null?void 0:t[0])==null?void 0:i[2])??0},{immediate:!0}))}get groundHeight(){return this._groundHeight.value}set groundHeight(e){this._groundHeight.value=e}get groundHeightChanged(){return this._groundHeight.changed}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new G([this,"startColor"],"起始颜色"),new G([this,"endColor"],"结束颜色"),new f([this,"progress"],"计算进度(%)",0,!0),new f([this,"height"],"分析区域高度(m)"),new f([this,"groundHeight"],"地面高度(m)",0,!1,!0),new f([this,"sampleDistance"],"采样间距(m)"),new Ve([this,"startTime"],"起始时间(ms)"),new Ve([this,"endTime"],"结束时间(ms)"),new f([this,"spanTime"],"时间跨度(h)"),new L("开始分析",()=>this.start(),[],"start"),new L("结束分析",()=>this.stop(),[],"stop")]}}};a(Ni,"createDefaultProps",()=>({...ee.createDefaultProps(),height:30,sampleDistance:10,startColor:F([1,1,0,1]),endColor:F([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),a(Ni,"type",Ni.register("ESSunshineAnalysis",Ni,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESSunshineAnalysis 是用于在指定多边形区域内进行日照时长分析的可视化对象。
|
|
617
|
+
对象json示例:
|
|
618
|
+
{
|
|
619
|
+
"id": "sunshineanalysis_xxx",
|
|
620
|
+
"type": "ESSunshineAnalysis",
|
|
621
|
+
"name": "日照分析",
|
|
622
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
623
|
+
"height": 30
|
|
624
|
+
}
|
|
625
|
+
`})),a(Ni,"supportEditingModes",[...ee.supportEditingModes,I.HeightModify]);let sa=Ni;const Ut=class Ut extends X{constructor(e){super(e);a(this,"_activateEvent",this.disposeVar(new v));a(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new f([this,"zIndex"],"层级序号",Ut.defaults.zIndex)],dataSource:[...e.dataSource,new R([this,"url"],"地形服务地址",Ut.defaults.url),new Fe([this,"rectangle"],"矩形范围",Ut.defaults.rectangle)],more:[...e.more,new f([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new f([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};a(Ut,"createDefaultProps",()=>({...X.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:F([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0})),a(Ut,"type",Ut.register("ESTerrainLayer",Ut,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESTerrainLayer 是用于在场景中加载和管理地形图层的数据源对象。
|
|
626
|
+
对象json示例:
|
|
627
|
+
{
|
|
628
|
+
"id": "terrainlayer_xxx",
|
|
629
|
+
"type": "ESTerrainLayer",
|
|
630
|
+
"name": "地形图层",
|
|
631
|
+
"url": "http://inner.earthsdk.com/layer.json"
|
|
632
|
+
}
|
|
633
|
+
`}));let na=Ut;const pt=class pt extends ze{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new G([this,"color"],"文本颜色",[1,1,1,1]),new f([this,"fontSize"],"文字大小",14),new _n([this,"text"],"内容",pt.defaults.text,void 0,!0),new G([this,"backgroundColor"],"背景颜色",pt.defaults.backgroundColor),new Fe([this,"padding"],"内边距",pt.defaults.padding),new G([this,"borderColor"],"边界颜色"),new Fe([this,"borderRadius"],"边界圆角"),new f([this,"borderWidth"],"边界宽度"),new f([this,"rotate"],"旋转角度",pt.defaults.rotate)],more:[...s.more,new k("czm"),new E([this,"textEditingInteraction"],"文本编辑交互"),new E([this,"textEditing"],"文本编辑"),new f([this,"width"],"宽度",pt.defaults.width,!0),new f([this,"opacity"],"透明度"),new A([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new A([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};a(pt,"createDefaultProps",()=>({...ze.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:F([1,1,1,1]),backgroundColor:F([0,0,0,.8]),padding:F([5,5,5,5]),borderRadius:F([6,6,6,6]),borderWidth:0,borderColor:F([1,1,1,1]),borderStyle:"solid",rotate:0})),a(pt,"type",pt.register("ESTextLabel",pt,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESTextLabel 是用于在场景中指定位置显示自定义样式的文本标签对象。
|
|
634
|
+
对象json示例:
|
|
635
|
+
{
|
|
636
|
+
"id": "textlabel_xxx",
|
|
637
|
+
"type": "ESTextLabel",
|
|
638
|
+
"name": "文本标签",
|
|
639
|
+
"position": [116.39, 39.9, 0],
|
|
640
|
+
"text": "请输入文字"
|
|
641
|
+
}
|
|
642
|
+
`}));let ms=pt;const Cg=`
|
|
286
643
|
#### 默认值如下
|
|
287
644
|
\`\`\`js
|
|
288
645
|
{
|
|
289
646
|
"Title": "示例",
|
|
290
647
|
"Content": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
291
648
|
}
|
|
292
|
-
\`\`\``,
|
|
649
|
+
\`\`\``,Qe=class Qe extends ze{constructor(e){super(e);a(this,"_callFunctionEvent",this.disposeVar(new v));a(this,"_callFunctionResultEvent",this.dv(new v))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,t){return new Promise(i=>{const r=new b,o=setTimeout(()=>{r.isDestroyed()||(r.destroy(),i(void 0))},1e4);r.d(this._callFunctionResultEvent.donce(l=>{r.isDestroyed()||(r.destroy(),i(l),clearTimeout(o))})),this._callFunctionEvent.emit(e,t)})}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ue([this,"positionOffset"],"positionOffset",Qe.defaults.positionOffset),new ue([this,"rotationOffset"],"rotationOffset",Qe.defaults.rotationOffset),new N([this,"actorTag"],"actorTag",Qe.defaults.actorTag),new N([this,"widgetClass"],"widgetClass",Qe.defaults.widgetClass),new N([this,"socketName"],"socketName",Qe.defaults.socketName),new R([this,"info"],"info",Qe.defaults.info,Cg,!0)],more:[...e.more,new L("回调函数",this.callFunction.bind(this),["",""],"callFunction")]}}};a(Qe,"createDefaultProps",()=>({...ze.createDefaultProps(),widgetClass:"",info:te({Title:"标题示例",Content:"内容示例"})})),a(Qe,"type",Qe.register("ESUEWidget",Qe,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESUEWidget 是用于在场景中指定位置创建和管理 Unreal Engine 部件(UI 交互面板)的对象。
|
|
650
|
+
对象json示例:
|
|
651
|
+
{
|
|
652
|
+
"id": "uewidget_xxx",
|
|
653
|
+
"type": "ESUEWidget",
|
|
654
|
+
"name": "部件",
|
|
655
|
+
"position": [116.39, 39.9, 0],
|
|
656
|
+
"widgetClass": "/Game/UI/MyWidget.MyWidget"
|
|
657
|
+
}
|
|
658
|
+
`}));let ra=Qe;const Ms=class Ms extends j{constructor(){super(...arguments);a(this,"_callFunctionEvent",this.dv(new v));a(this,"_callFunctionResultEvent",this.dv(new v));a(this,"_actorEvent",this.dv(new v));a(this,"_lastActorStatus",this.dv(w("null")))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,t){return new Promise(i=>{const r=new b,o=setTimeout(()=>{r.isDestroyed()||(r.destroy(),i(void 0))},1e4);r.d(this._callFunctionResultEvent.donce(l=>{r.isDestroyed()||(r.destroy(),i(l),clearTimeout(o))})),this._callFunctionEvent.emit(e,t)})}getBoundSphereWithChildren(e){return new Promise((t,i)=>{t(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(e){this._lastActorStatus.value=e}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N([this,"actorTag"],"actorTag",""),new N([this,"actorClass"],"actorClass",""),new E([this,"highlight"],"是否高亮",!1)],more:[...e.more,new L("回调函数",this.callFunction.bind(this),["",""],"callFunction")]}}};a(Ms,"createDefaultProps",()=>({...j.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})),a(Ms,"type",Ms.register("ESUnrealActor",Ms,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESUnrealActor 是用于在场景中指定位置绑定和管理 Unreal Engine Actor 对象的对象。
|
|
659
|
+
对象json示例:
|
|
660
|
+
{
|
|
661
|
+
"id": "unrealactor_xxx",
|
|
662
|
+
"type": "ESUnrealActor",
|
|
663
|
+
"name": "UnrealActor",
|
|
664
|
+
"position": [116.39, 39.9, 0],
|
|
665
|
+
"actorTag": "MyActor"
|
|
666
|
+
}
|
|
667
|
+
`}));let oa=Ms;const be=class be extends j{constructor(e){super(e);a(this,"editingBindMode","doublePoints");a(this,"_resetWithCameraInfoEvent",this.dv(new v));this.collision=!1}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new E([this,"looping"],"循环",be.defaults.looping),new E([this,"showFrustum"],"视椎体",be.defaults.showFrustum),new f([this,"aspectRatio"],"宽高比",be.defaults.aspectRatio),new f([this,"fov"],"横向夹角",be.defaults.fov),new f([this,"far"],"视野长度",be.defaults.far),new f([this,"near"],"近面距离",be.defaults.near),new R([this,"videoStreamUrl"],"视频路径",be.defaults.videoStreamUrl),new f([this,"zIndex"],"显示优先级",be.defaults.zIndex),new A([this,"videoStreamType"],be.videoStreamTypes,"视频类型","video")],more:[...e.more,new L("以当前相机状态重置",()=>this.resetWithCameraInfo(),[],"resetWithCameraInfo")]}}};a(be,"createDefaultProps",()=>({...j.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})),a(be,"type",be.register("ESVideoFusion",be,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESVideoFusion 是用于在场景中指定位置将视频流投影融合到三维场景中的对象。
|
|
668
|
+
对象json示例:
|
|
669
|
+
{
|
|
670
|
+
"id": "videofusion_xxx",
|
|
671
|
+
"type": "ESVideoFusion",
|
|
672
|
+
"name": "视频融合",
|
|
673
|
+
"position": [116.39, 39.9, 0],
|
|
674
|
+
"videoStreamUrl": "http://localhost:9004/video/test.mp4"
|
|
675
|
+
}
|
|
676
|
+
`})),a(be,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]);let aa=be;const et=class et extends j{constructor(e){super(e);a(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new E([this,"showFrustum"],"视椎体",et.defaults.showFrustum),new f([this,"aspectRatio"],"宽高比",et.defaults.aspectRatio),new f([this,"fov"],"横向夹角",et.defaults.fov),new f([this,"near"],"近面距离",et.defaults.near),new f([this,"far"],"视野长度",et.defaults.far),new f([this,"zIndex"],"显示优先级",et.defaults.zIndex)]}}};a(et,"createDefaultProps",()=>({...j.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0,collision:!1})),a(et,"type",et.register("ESViewShed",et,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESViewShed 是用于在场景中指定位置进行视域(可视范围)分析的对象。
|
|
677
|
+
对象json示例:
|
|
678
|
+
{
|
|
679
|
+
"id": "viewshed_xxx",
|
|
680
|
+
"type": "ESViewShed",
|
|
681
|
+
"name": "视域分析",
|
|
682
|
+
"position": [116.39, 39.9, 0],
|
|
683
|
+
"fov": 90
|
|
684
|
+
}
|
|
685
|
+
`}));let la=et;const Pg=`
|
|
293
686
|
#### 默认值如下
|
|
294
687
|
\`\`\`js
|
|
295
688
|
{
|
|
@@ -297,7 +690,24 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
297
690
|
"Key":"Value",
|
|
298
691
|
"内容": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
299
692
|
}
|
|
300
|
-
\`\`\``,
|
|
693
|
+
\`\`\``,li=class li extends ze{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new R([this,"info"],"信息",li.defaults.info,Pg,!0)],more:[...s.more,new k("ue"),new nt([this,"positionOffset"],"坐标偏移"),new nt([this,"rotationOffset"],"旋转偏移"),new N([this,"actorTag"]),new N([this,"widgetClass"]),new N([this,"socketName"]),new k("czm"),new f([this,"opacity"],"透明度",li.defaults.opacity,!0)]}}};a(li,"createDefaultProps",()=>({...ze.createDefaultProps(),info:B({title:"标题示例",内容:"内容示例"}),widgetClass:"WidgetBlueprint'/EarthSDKForUE/Widget/WBP_ES_DefaultInfo.WBP_ES_DefaultInfo'",actorTag:"",socketName:"",positionOffset:F([0,0,0]),rotationOffset:F([0,0,0]),opacity:1})),a(li,"type",li.register("ESWidget",li,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESWidget 是用于在场景中指定位置显示可交互 UI 部件(信息面板)的对象。
|
|
694
|
+
对象json示例:
|
|
695
|
+
{
|
|
696
|
+
"id": "widget_xxx",
|
|
697
|
+
"type": "ESWidget",
|
|
698
|
+
"name": "部件",
|
|
699
|
+
"position": [116.39, 39.9, 0],
|
|
700
|
+
"info": { "title": "标题示例", "内容": "内容示例" }
|
|
701
|
+
}
|
|
702
|
+
`}));let ha=li;const Li=class Li extends U{constructor(e){super(e);a(this,"_direction",this.disposeVar(w(0)));a(this,"editingBindMode","doublePoints");{const t=()=>{this.direction=this.points&&this.points.length>=2?ps(En(this.points[0],this.points[1])):0};t(),this.ad(this.pointsChanged.don(t))}}get direction(){return this._direction.value}set direction(e){this._direction.value=e}get directionChanged(){return this._direction.changed}};a(Li,"createDefaultProps",()=>({...U.createDefaultProps(),stroked:!0,strokeStyle:B({width:10,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Li,"type",Li.register("ESDirectionMeasurement",Li,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:`ESDirectionMeasurement 是用于测量两点间方位角的对象。
|
|
703
|
+
对象json示例:
|
|
704
|
+
{
|
|
705
|
+
"id": "directionmeasurement_xxx",
|
|
706
|
+
"type": "ESDirectionMeasurement",
|
|
707
|
+
"name": "方位角测量",
|
|
708
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0]]
|
|
709
|
+
}
|
|
710
|
+
`})),a(Li,"supportEditingModes",[...U.supportEditingModes,I.Rotation,I.Scale,I.DoublePoints,I.DoublePointsAppend,I.DoublePointsModify]);let ca=Li;const Tg={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[116.2,39.56]},properties:{title:"swimming","marker-symbol":"swimming","marker-color":"#8F1312"}},{type:"Feature",geometry:{type:"Point",coordinates:[115.2,38.56]},properties:{title:"8","marker-symbol":"8","marker-color":"#46117E"}},{type:"Feature",geometry:{type:"Point",coordinates:[114.2,37.56]},properties:{title:"6","marker-symbol":"6","marker-color":"#713291"}}]},Ig=`properties是一个包含三个属性的对象,title表示标题,marker-symbol表示点位的文字内容,marker-color表示点位颜色,properties可以删除,然后使用场景对象属性设置。
|
|
301
711
|
\`\`\`
|
|
302
712
|
{
|
|
303
713
|
"type": "FeatureCollection",
|
|
@@ -350,7 +760,7 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
350
760
|
]
|
|
351
761
|
}
|
|
352
762
|
\`\`\`
|
|
353
|
-
`,
|
|
763
|
+
`,da=`// dataSource
|
|
354
764
|
(dataSource) => {
|
|
355
765
|
if (dataSource) {
|
|
356
766
|
dataSource.show = true;
|
|
@@ -376,11 +786,241 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
376
786
|
}
|
|
377
787
|
}
|
|
378
788
|
}
|
|
379
|
-
`,
|
|
789
|
+
`,Pc=`示例代码
|
|
380
790
|
\`\`\`
|
|
381
|
-
${
|
|
791
|
+
${da}
|
|
382
792
|
\`\`\`
|
|
383
|
-
`,Zp=k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/misc/2.geojson"),J=class J extends Y{constructor(e){super(e);a(this,"_flyToFeatureEvent",this.dv(new m));a(this,"_flyToFeatureIndexEvent",this.dv(new m));a(this,"_setFeatureStyleEvent",this.disposeVar(new m));a(this,"_resetFeatureStyleEvent",this.disposeVar(new m));a(this,"_features",this.disposeVar(te(void 0)));a(this,"pickedInfoType","FeatureCollection");a(this,"abortController");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,t,i){this._flyToFeatureEvent.emit(e,t,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,t){this._flyToFeatureIndexEvent.emit(e,t)}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e,t=!1){this._setFeatureStyleEvent.emit(e,t)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}getFeatureTable(){if(this.features){let e={};return vc(this.features).features.forEach(t=>{Object.assign(e,t.properties)}),Object.keys(e).forEach(t=>{e[t]=typeof e[t]}),e}else console.log("数据未加载完成,请稍后调用此方法getFeatureTable()")}_updateUrl(){var e;if(this.abortController&&this.abortController.abort(),!this.url){this.features=void 0;return}if(typeof this.url=="object")this.features=this.url;else if(ho(this.url))this.features=JSON.parse(this.url);else{this.abortController=new AbortController;const t=this.abortController.signal;fetch(k.context.getStrFromEnv(this.url),{signal:t}).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{i.name!="AbortError"&&console.warn("ESGeoJson数据加载失败",i)})}this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new z([this,"url"],"服务地址",J.defaults.url),new v([this,"minFeatureVisibleDistance"],"要素最小可视距离",J.defaults.minFeatureVisibleDistance),new v([this,"maxFeatureVisibleDistance"],"要素最大可视距离",J.defaults.maxFeatureVisibleDistance),new j([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考"),new j([this,"classificationType"],J.classificationTypes,"贴地附着目标",J.defaults.classificationType),new v([this,"zIndex"],"层级排序",J.defaults.zIndex)],style:[...e.style,new L("点样式集合"),new S([this,"textShow"],"是否显示",J.defaults.textShow),new pe([this,"textAnchor"],"锚点",J.defaults.anchor),new A([this,"textProperty"],"标注显示属性",J.defaults.textStyle.textProperty),new A([this,"textDefaultText"],"默认文本",J.defaults.textStyle.defaultText),new G([this,"textColor"],"文本颜色",J.defaults.textStyle.color),new G([this,"textBackgroundColor"],"文本背景颜色",J.defaults.textStyle.backgroundColor),new A([this,"textFontStyle"],"字体样式",J.defaults.textStyle.fontStyle),new A([this,"textFontWeight"],"字体粗细",J.defaults.textStyle.fontWeight),new v([this,"textFontSize"],"字体大小",J.defaults.textStyle.fontSize),new pe([this,"textOffset"],"像素偏移",J.defaults.textStyle.offset),new L("点图片样式集合"),new S([this,"imageShow"],"是否显示",J.defaults.imageShow),new pe([this,"imageAnchor"],"锚点",J.defaults.imageStyle.anchor),new z([this,"imageUrl"],"图片地址",J.defaults.imageStyle.url),new pe([this,"imageSize"],"图片大小",J.defaults.imageStyle.size),new pe([this,"imageOffset"],"像素偏移",J.defaults.imageStyle.offset),new L("线样式集合"),new S([this,"stroked"],"是否显示",J.defaults.stroked),new S([this,"strokeGround"],"贴地",J.defaults.strokeStyle.ground),new v([this,"strokeWidth"],"线宽",J.defaults.strokeStyle.width),new j([this,"strokeWidthType"],J.strokeStyleWidthTypes,"线宽类型"),new G([this,"strokeColor"],"线颜色",J.defaults.strokeStyle.color),new A([this,"strokeMaterial"],"线材质",J.defaults.strokeStyle.material),new z([this,"strokeMaterialParams"],"线材质参数",J.defaults.strokeStyle.materialParams),new L("面样式集合"),new S([this,"filled"],"是否显示",J.defaults.filled),new S([this,"fillGround"],"贴地",J.defaults.fillStyle.ground),new G([this,"fillColor"],"填充颜色",J.defaults.fillStyle.color),new A([this,"fillMaterial"],"填充材质",J.defaults.fillStyle.material),new z([this,"fillMaterialParams"],"填充材质参数",J.defaults.fillStyle.materialParams)],more:[...e.more,new L("标注文本样式"),new A([this,"textFontFamily"],"字体",J.defaults.textStyle.fontFamily),new v([this,"zOrder"],"点排序优先级",J.defaults.zOrder),new L("通用"),new Vt([this,"loadFuncStr"],"loadFnStr",Qo,tl,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};a(J,"createDefaultProps",()=>({...Y.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:Zp,stroked:!0,strokeStyle:W({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:W({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:W({url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/location.png"),size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:W({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE",classificationType:"TERRAIN",zIndex:0})),a(J,"type",J.register("ESGeoJson",J,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),a(J,"strokeStyleWidthTypes",[["screen","screen"],["world","world"]]),a(J,"classificationTypes",[["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]]);let pn=J;const Ni=class Ni extends ${constructor(e){super(e);a(this,"editingBindMode","doublePoints");a(this,"_height",this.disposeVar(y(0)));{const t=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};t(),this.ad(this.pointsChanged.don(t))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};a(Ni,"createDefaultProps",()=>({...$.createDefaultProps(),stroked:!0,strokeStyle:W({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Ni,"type",Ni.register("ESHeightMeasurement",Ni,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),a(Ni,"supportEditingModes",[...$.supportEditingModes,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let ea=Ni;const Vi=class Vi extends zt{constructor(e){super(e);a(this,"_area",this.dv(y(0)));a(this,"_perimeter",this.dv(y(0)));a(this,"editingBindMode","doublePoints");const t=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};t(),this.d(this.radiusChanged.don(t))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,t){return Dc([...this.position],this.radius,e,t)[0].map(r=>[...r,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new v([this,"radius"],"圆半径",1,!0),new re([this,"instances"],"实例化矩阵",Vi.defaults.instances,void 0,!0)],coordinate:[...e.coordinate,new S([this,"editing"],"是否编辑"),new _t([this,"position"],"三维坐标",[0,0,0],!0),new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)]}}};a(Vi,"createDefaultProps",()=>({...zt.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),instances:ee([])})),a(Vi,"type",Vi.register("ESLocalCircle",Vi,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let ta=Vi;const Ps=class Ps extends zt{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new re([this,"points"],"坐标",[])]}}};a(Ps,"createDefaultProps",()=>({...zt.createDefaultProps(),points:vo([]),filled:!0})),a(Ps,"type",Ps.register("ESLocalPolygon",Ps,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let gn=Ps;const Ts=class Ts extends os{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new re([this,"points"],"本地位置数组",[])]}}};a(Ts,"createDefaultProps",()=>({...os.createDefaultProps(),points:fi(void 0),filled:!0})),a(Ts,"type",Ts.register("ESLocalPolygonZ",Ts,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let ia=Ts;const Is=class Is extends zt{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"width"],"宽度"),new v([this,"height"],"高度")]}}};a(Is,"createDefaultProps",()=>({...zt.createDefaultProps(),width:5e5,height:3e5,filled:!0})),a(Is,"type",Is.register("ESLocalRectangle",Is,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let sa=Is;const Pt=class Pt extends ${constructor(e){super(e);a(this,"editingBindMode","lineString");a(this,"_distance",this.dv(y(0)));a(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const t=()=>{if(this.points&&this.points.length>=2){const i=Lt(this.points,"GEODESIC"),r=i[i.length-1];this._distance.value=r}else this._distance.value=0};t(),this.d(this.pointsChanged.don(t))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new v([this,"height"],"高度",10),new v([this,"width"],"宽度",10),new j([this,"materialMode"],Pt.materialModes,"模式",Pt.defaults.materialMode)],coordinate:[...e.coordinate,new v([this,"distance"],"距离",0,!1,!0)]}}};a(Pt,"createDefaultProps",()=>({...$.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:W({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),a(Pt,"type",Pt.register("ESPipeFence",Pt,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),a(Pt,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),a(Pt,"supportEditingModes",[...$.supportEditingModes,D.LineStringAppend,D.LineStringInsert]);let rr=Pt;const Bt=class Bt extends Le{constructor(e){super(e);a(this,"_setLayerVisibleEvent",this.dv(new m));a(this,"_setLayerColorEvent",this.dv(new m))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,t){this._setLayerVisibleEvent.emit(e,t)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,t){this._setLayerColorEvent.emit(e,t)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("ESPipeserTileset"),new N("设置图层可见性",this.setLayerVisible.bind(this),["",""],"setLayerVisible"),new N("设置图层颜色",this.setLayerColor.bind(this),["",""],"setLayerColor"),new j([this,"colorMode"],Bt.colorModes,"colorMode",Bt.defaults.colorMode,!0)]}}};a(Bt,"createDefaultProps",()=>({...Le.createDefaultProps(),colorMode:"default"})),a(Bt,"type",Bt.register("ESPipeserTileset",Bt,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),a(Bt,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let na=Bt;const Ht=class Ht extends ${constructor(e){super(e);a(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new v([this,"area"],"面积",0,!1,!0),new v([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new v([this,"height"],"高度",10),new j([this,"materialMode"],Ht.materialModes,"模式","danger")]}}};a(Ht,"createDefaultProps",()=>({...$.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),a(Ht,"type",Ht.register("ESPolygonFence",Ht,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),a(Ht,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),a(Ht,"supportEditingModes",[...$.supportEditingModes,D.CircularAppend,D.CircularInsert,D.HeightModify]);let or=Ht;const ai=class ai extends ${constructor(e){super(e);a(this,"_deprecated",["ground"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());a(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("通用"),new S([this,"ground"],"是否贴地"),new S([this,"outlineTranslucent"],"轮廓线半透明"),new v([this,"height"],"高度"),new v([this,"extrudedHeight"],"拉伸高度"),new Je([this,"rectangle"],"范围",ai.defaults.rectangle,!0),new v([this,"stRotation"],"纹理旋转角度"),new v([this,"rotation"],"旋转角度"),new S([this,"pointEditing"],"是否单点编辑")]}}};a(ai,"createDefaultProps",()=>({...$.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:ee(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),a(ai,"type",ai.register("ESRectangle",ai,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),a(ai,"supportEditingModes",[...$.supportEditingModes,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify]);let ra=ai;const Os=class Os extends Q{getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new re([this,"innerRings"],"裁切多边形数组",[],void 0,!0),new S([this,"gradient"],"是否使用渐变填充",!1),new S([this,"light"],"是否使用光照",!1)]}}};a(Os,"createDefaultProps",()=>({...Q.createDefaultProps(),innerRings:Pr([]),gradient:!1,light:!1})),a(Os,"type",Os.register("ESPolygonWithHole",Os,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let oa=Os;const hi=class hi extends Q{constructor(e){super(e);a(this,"_startEvent",this.disposeVar(new m));a(this,"_stopEvent",this.dv(new m));a(this,"_surfaceArea",this.disposeVar(y(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("表面积测量"),new N("开始计算",()=>this.start(),[],"start"),new N("停止计算",()=>this.stop(),[],"stop"),new v([this,"interpolation"],"插值距离",hi.defaults.interpolation),new v([this,"offsetHeight"],"偏移高度",hi.defaults.offsetHeight)]}}};a(hi,"createDefaultProps",()=>({...Q.createDefaultProps(),interpolation:.5,offsetHeight:0,units:F(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(hi,"type",hi.register("ESSurfaceAreaMeasurement",hi,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let aa=hi;const ci=class ci extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"downloadProgress"],"下载进度",ci.defaults.downloadProgress,!0,!0),new z([this,"importOptions"],"导入参数",ci.defaults.importOptions,void 0,!0)],dataSource:[...s.dataSource,new z([this,"url"],"路径")]}}};a(ci,"createDefaultProps",()=>({...M.createDefaultProps(),url:"",importOptions:te({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),a(ci,"type",ci.register("ESDatasmithRuntimeModel",ci,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let ha=ci;const Pe=class Pe extends gn{constructor(s){super(s),this.ad(ue([this.waterColorChanged,this.waterImageChanged,this.frequencyChanged,this.amplitudeChanged,this.flowDirectionChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new j([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Pe.defaults.waterType),new v([this,"frequency"],"频率",Pe.defaults.frequency),new ge([this,"amplitude"],.01,[0,1],"振幅",Pe.defaults.amplitude),new ge([this,"flowDirection"],1,[0,360],"流向",Pe.defaults.flowDirection),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",Pe.defaults.waveVelocity),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Pe.defaults.specularIntensity),new ge([this,"murkiness"],.1,[0,10],"水体浑浊度",Pe.defaults.murkiness),new v([this,"flowSpeed"],"水流速度",Pe.defaults.flowSpeed),new G([this,"waterColor"],"水的底色",Pe.defaults.waterColor),new z([this,"waterImage"],"水的图片",Pe.defaults.waterImage)]}}};a(Pe,"createDefaultProps",()=>({...gn.createDefaultProps(),allowPicking:!0,waterImage:te(void 0),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),a(Pe,"type",Pe.register("ESDynamicWater",Pe,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let ca=Pe;const Te=class Te extends Q{constructor(s){super(s),this.ad(ue([this.waterColorChanged,this.waterImageChanged,this.frequencyChanged,this.amplitudeChanged,this.flowDirectionChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"basic",basic:[...s.basic,new j([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Te.defaults.waterType),new v([this,"frequency"],"频率",Te.defaults.frequency),new ge([this,"amplitude"],.01,[0,1],"振幅",Te.defaults.amplitude),new ge([this,"flowDirection"],1,[0,360],"流向",Te.defaults.flowDirection),new ge([this,"waveVelocity"],.01,[0,1],"波动频率",Te.defaults.waveVelocity),new ge([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Te.defaults.specularIntensity),new ge([this,"murkiness"],.1,[0,10],"水体浑浊度",Te.defaults.murkiness),new v([this,"flowSpeed"],"水流速度",Te.defaults.flowSpeed),new G([this,"waterColor"],"水的底色",Te.defaults.waterColor),new z([this,"waterImage"],"水的图片",Te.defaults.waterImage)]}}};a(Te,"createDefaultProps",()=>({...Q.createDefaultProps(),allowPicking:!0,waterImage:te({}),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),a(Te,"type",Te.register("ESGeoWater",Te,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let la=Te;const Li=class Li extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"downloadProgress"],"下载进度",Li.defaults.downloadProgress,!0,!0),new A([this,"levelName"],"levelName",""),new v([this,"levelLoadDistance"],"levelLoadDistance",1e3),new ve([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...s.dataSource,new z([this,"url"],"url","")]}}};a(Li,"createDefaultProps",()=>({...M.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:F([0,0,0]),levelLoadDistance:1e3})),a(Li,"type",Li.register("ESLevelRuntimeModel",Li,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let da=Li;const Be=class Be extends we{constructor(e){super(e);a(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new v([this,"radius"],"半径",Be.defaults.radius),new v([this,"sides"],"圆边数",Be.defaults.sides),new v([this,"speed"],"材质速度",Be.defaults.speed),new j([this,"materialMode"],Be.materialModes,"材质模式",Be.defaults.materialMode),new z([this,"materialImage"],"材质图片和重复度",Be.defaults.materialImage)]}}};a(Be,"createDefaultProps",()=>({...we.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:W({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:W({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),a(Be,"type",Be.register("ESPipeline",Be,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),a(Be,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let ua=Be;const Tt=class Tt extends ${constructor(e){super(e);a(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new G([this,"visibleColor"],"可视区域颜色",Tt.defaults.visibleColor),new G([this,"invisibleColor"],"遮挡区域颜色",Tt.defaults.invisibleColor),new v([this,"heightOffset"],"视点高度偏移",Tt.defaults.heightOffset)]}}};a(Tt,"createDefaultProps",()=>({...$.createDefaultProps(),visibleColor:F([0,1,0,1]),invisibleColor:F([1,0,0,1]),heightOffset:0})),a(Tt,"type",Tt.register("ESVisibilityAnalysis",Tt,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),a(Tt,"supportEditingModes",[...$.supportEditingModes,D.VisibilityAppend,D.VisibilityModify]);let pa=Tt;const Ds=class Ds extends Q{constructor(e){super(e);a(this,"_startEvent",this.dv(new m));a(this,"_clearEvent",this.dv(new m));a(this,"_volume",this.disposeVar(y(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new L("通用"),new v([this,"planeHeight"],"基准面高程",void 0,!0),new v([this,"gridWidth"],"采样间距 m"),new v([this,"cutVolume"],"挖方",0,!1,!0),new v([this,"fillVolume"],"填方",0,!1,!0),new v([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new v([this,"progress"],"计算进度",0,!1,!0),new N("开始分析",()=>this.start(),[],"start"),new N("清空分析结果",()=>this.clear(),[],"clear"),new S([this,"depthTest"],"是否开启深度检测")]}}};a(Ds,"createDefaultProps",()=>({...Q.createDefaultProps(),planeHeight:y(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:W({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Ds,"type",Ds.register("ESVolumeMeasurement",Ds,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let ga=Ds;const Fs=class Fs extends ze{constructor(e){super(e);a(this,"_human",this.dv(new ze));a(this,"_poi",this.dv(new un));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:t,_poi:i}=this;this.d(_([t,"show"],[this,"show"])),this.d(_([i,"show"],[this,"show"])),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"scale"],[this,"scale"])),this.d(_([i,"scale"],[this,"scale"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(x([t,"flyInParam"],[this,"flyInParam"])),this.d(x([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"animation"],[this,"animation"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([t,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(_([i,"name"],[this,"name"])),this.d(_([i,"mode"],[this,"poiMode"])),this.d(_([i,"autoAnchor"],[this,"autoAnchor"])),this.d(_([i,"screenRender"],[this,"screenRender"])),this.d(_([i,"size"],[this,"size"])),this.d(_([i,"anchor"],[this,"anchor"])),this.d(_([i,"sizeByContent"],[this,"sizeByContent"])),this.d(_([i,"renderMode"],[this,"renderMode"])),this.d(_([i,"rotationType"],[this,"rotationType"])),this.d(_([i,"zOrder"],[this,"zOrder"])),this.d(_([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(x([t,"position"],[this,"position"])),this.d(x([t,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(r=>{t.flyIn(r)})),this.d(this.flyToEvent.don(r=>{t.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{t.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{t.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((r,o)=>{t.smoothMove(r,o)})),this.d(this.smoothMoveWithRotationEvent.don((r,o,h)=>{t.smoothMoveWithRotation(r,o,h)})),this.d(this.smoothMoveOnGroundEvent.don((r,o,h,c)=>{t.smoothMoveOnGround(r,o,h,c)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((r,o,h,c,l)=>{t.smoothMoveWithRotationOnGround(r,o,h,c,l)})),this.d(this.automaticLandingEvent.don(()=>{t.automaticLanding()})),this.d(this._human.readyEvent.don(r=>{this.readyEvent.emit(r)}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"poiMode"],un.modes,"poi模式","SquareH01"),new v([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};a(Fs,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:W({}),autoAnchor:!0,screenRender:!0,size:F([100,100]),anchor:F([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...ze.createDefaultProps()})),a(Fs,"type",Fs.register("ESHumanPoi",Fs,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let fa=Fs;const It=class It extends M{constructor(s){super(s)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"basic",basic:[new A([this,"image"],"图片",It.defaults.image),new v([this,"height"],"喷泉高度",It.defaults.height),new v([this,"spread"],"扩散角度",It.defaults.spread),new v([this,"emissionRate"],"发射率",It.defaults.emissionRate)]}}};a(It,"createDefaultProps",()=>({...M.createDefaultProps(),image:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),height:10,spread:5,emissionRate:50})),a(It,"type",It.register("ESFountainParticleSystem",It,{chsName:"粒子喷泉",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子喷泉"}));let ar=It;const He=class He extends ze{constructor(e){super(e);a(this,"_human",this.dv(new ze));a(this,"_fountain",this.dv(new ar));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._fountain));{const{_human:t,_fountain:i}=this;this.ad(ue([this.showChanged,this.humanShowChanged,this.fountainShowChanged],()=>{t.show=this.show&&this.humanShow,i.show=this.show&&this.fountainShow},{immediate:!0})),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"scale"],[this,"scale"])),this.d(_([i,"scale"],[this,"scale"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(x([t,"flyInParam"],[this,"flyInParam"])),this.d(x([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"animation"],[this,"animation"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([t,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.ad(ue([this.positionOffsetChanged,this.fountainOffsetChanged],()=>{t.positionOffset=this.positionOffset,i.positionOffset=[this.positionOffset[0]+this.fountainOffset[0],this.positionOffset[1]+this.fountainOffset[1],this.positionOffset[2]+this.fountainOffset[2]]},{immediate:!0})),this.d(x([t,"position"],[this,"position"])),this.d(x([t,"rotation"],[this,"rotation"])),this.d(x([i,"position"],[this,"position"])),this.ad(ue(this.rotationChanged,()=>{i.rotation=[this.rotation[0],this.rotation[1]-30,this.rotation[2]]},{immediate:!0})),this.d(_([i,"image"],[this,"fountainImage"])),this.d(_([i,"height"],[this,"fountainHeight"])),this.d(_([i,"spread"],[this,"fountainSpread"])),this.d(_([i,"emissionRate"],[this,"fountainEmissionRate"])),this.d(this.flyInEvent.don(r=>{t.flyIn(r)})),this.d(this.flyToEvent.don(r=>{t.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{t.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{t.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((r,o)=>{t.smoothMove(r,o)})),this.d(this.smoothMoveWithRotationEvent.don((r,o,h)=>{t.smoothMoveWithRotation(r,o,h)})),this.d(this.smoothMoveOnGroundEvent.don((r,o,h,c)=>{t.smoothMoveOnGround(r,o,h,c)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((r,o,h,c,l)=>{t.smoothMoveWithRotationOnGround(r,o,h,c,l)})),this.d(this.automaticLandingEvent.don(()=>{t.automaticLanding()})),this.d(this._human.readyEvent.don(r=>{this.readyEvent.emit(r)}))}}get human(){return this._human}get fountain(){return this._fountain}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new S([this,"humanShow"],"人物显隐",He.defaults.humanShow),new S([this,"fountainShow"],"喷泉显隐",He.defaults.fountainShow),new A([this,"fountainImage"],"喷泉图片",He.defaults.fountainImage),new ve([this,"fountainOffset"],"喷泉偏移",He.defaults.fountainOffset),new v([this,"fountainHeight"],"喷泉高度",He.defaults.fountainHeight),new v([this,"fountainSpread"],"喷泉扩散角度",He.defaults.fountainSpread),new v([this,"fountainEmissionRate"],"喷泉发射率",He.defaults.fountainEmissionRate)]}}};a(He,"createDefaultProps",()=>({...ze.createDefaultProps(),humanShow:!0,fountainShow:!0,fountainImage:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),fountainOffset:F([0,0,0]),fountainHeight:10,fountainSpread:5,fountainEmissionRate:50})),a(He,"type",He.register("ESHumanFountain",He,{chsName:"人员喷泉",tags:["ESObjects"],description:"ESHuman + ESFountainParticleSystem组合对象,喷泉从人物手中喷出"}));let ma=He;const Ze=class Ze extends Q{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new v([this,"depth"],"深度",Ze.defaults.depth),new v([this,"interpolation"],"插值",Ze.defaults.interpolation),new v([this,"opacity"],"透明度",Ze.defaults.opacity),new z([this,"sideImage"],"侧面图片",Ze.defaults.sideImage),new z([this,"bottomImage"],"底面图片",Ze.defaults.bottomImage),new v([this,"extendBoundary"],"外扩边界采样高度",Ze.defaults.extendBoundary)]}}};a(Ze,"createDefaultProps",()=>({...Q.createDefaultProps(),depth:100,sideImage:W({url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:W({url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0,extendBoundary:1})),a(Ze,"type",Ze.register("ESPit",Ze,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let hs=Ze;const xs=class xs extends hs{constructor(e){super(e);a(this,"_excavate",this.dv(new ln));a(this,"_pit",this.dv(new hs));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:t,_pit:i}=this;this.d(_([t,"show"],[this,"show"])),this.d(_([i,"show"],[this,"show"])),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(x([i,"points"],[this,"points"])),this.d(_([t,"points"],[this,"points"])),this.d(_([i,"pointed"],[this,"pointed"])),this.d(_([t,"pointed"],[this,"pointed"])),this.d(_([i,"pointStyle"],[this,"pointStyle"])),this.d(_([t,"pointStyle"],[this,"pointStyle"])),this.d(_([i,"stroked"],[this,"stroked"])),this.d(_([t,"stroked"],[this,"stroked"])),this.d(_([i,"strokeStyle"],[this,"strokeStyle"])),this.d(_([t,"strokeStyle"],[this,"strokeStyle"])),this.d(_([i,"filled"],[this,"filled"])),this.d(_([i,"fillStyle"],[this,"fillStyle"])),this.d(_([t,"fillStyle"],[this,"fillStyle"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"targetID"],[this,"targetID"])),this.d(_([i,"depth"],[this,"depth"])),this.d(_([i,"sideImage"],[this,"sideImage"])),this.d(_([i,"bottomImage"],[this,"bottomImage"])),this.d(_([i,"opacity"],[this,"opacity"])),this.d(_([i,"interpolation"],[this,"interpolation"])),this.d(x([i,"flyInParam"],[this,"flyInParam"])),this.d(x([i,"flyToParam"],[this,"flyToParam"])),this.ad(x([i,"extendBoundary"],[this,"extendBoundary"])),this.d(this.flyInEvent.don(r=>{i.flyIn(r)})),this.d(this.flyToEvent.don(r=>{i.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new j([this,"mode"],ln.modes,"模式","in"),new A([this,"targetID"],"目标图层id","")]}}};a(xs,"createDefaultProps",()=>({...hs.createDefaultProps(),mode:"in",targetID:""})),a(xs,"type",xs.register("ESHole",xs,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let va=xs;function il(n){return n.startsWith("/")&&!n.startsWith("//")}function hr(n){var s;return!n||/^https?:\/\//i.test(n)?n:il(n)&&typeof globalThis<"u"&&((s=globalThis.location)!=null&&s.origin)?`${globalThis.location.origin}${n}`:n}function cr(n){var e;return(e=hr(n).match(/^(https?:\/\/[^/]+)/i))==null?void 0:e[1]}function sl(n){var e;return(e=hr(n).match(/^(https?:\/\/[^:]+)/i))==null?void 0:e[1]}function Ci(n){return n==="CesiumlabDesktop"?"/cim":""}function nl(n){if(/\/cim\/ts\//.test(n))return"CesiumlabDesktop";if(/\/ts\/(?:info|tiles|featuretiles)\//.test(n))return"CIMRTS"}function rl(n){const s=n.match(/(?:\/cim)?\/ts\/info\/([^?/]+)/);return s==null?void 0:s[1]}function Qp(n,s,e){const t=Ci(s);return`${n}${t}/ts/info/${e}`}function ol(n,s,e,t=Date.now()){const i=Ci(s);return`${n}${i}/ts/tiles/${e}/tileset.json?t=${t}`}function al(n,s,e,t){const i=Ci(s);return`${n}${i}/ts/featuretiles/${e}/${t}/tileset.json`}const lr={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},hl=async(n,s,e,t,i="CIMRTS")=>{try{const r=globalThis.localStorage.getItem("Authorization"),o=Ci(i);let h=n+`${o}${lr.layerconfigfind}?tileServiceName=${s}`;e&&(h+=`&earthdstoken=${encodeURIComponent(t)}`);const c={headers:{...!e&&r?{Authorization:r}:{}},mode:"cors"},u=await(await fetch(h,c)).text();return JSON.parse(u)}catch(r){console.error(r)}},cl=async(n,s,e,t,i,r="CIMRTS")=>{try{const o=globalThis.localStorage.getItem("Authorization"),h=Ci(r);let c=n+`${h}${lr.layerconfigsave}`;const l=i??{};e&&(c+=`?earthdstoken=${encodeURIComponent(t)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&o?{Authorization:o}:{}},mode:"cors",body:JSON.stringify({tileServiceName:s,layerConfig:JSON.stringify(l)})},g=await(await fetch(c,u)).text();return JSON.parse(g)}catch(o){console.error(o)}},ll=async(n,s,e)=>{try{const t=globalThis.localStorage.getItem("Authorization");let i=n;s&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const r={headers:{...!s&&t?{Authorization:t}:{}},mode:"cors"},h=await(await fetch(i,r)).text(),c=JSON.parse(h);if(c.status=="ok")return c.data.port;console.error(c.status);return}catch(t){console.error(t)}},dl=async(n,s,e,t,i,r="CIMRTS")=>{try{const o={tileServiceName:s,featureId:e},h=globalThis.localStorage.getItem("Authorization"),c=Ci(r);let l=n+`${c}${lr.featureproperty}`;t&&(l+=`?earthdstoken=${encodeURIComponent(i)}`);const p=await(await fetch(l,{method:"post",headers:{"Content-Type":"application/json",...!t&&h?{Authorization:h}:{}},body:JSON.stringify(o),mode:"cors"})).text(),g=JSON.parse(p);if(g.status=="ok")return g.data;console.error(g.data.status);return}catch(o){console.error(o)}},ks=class ks extends Le{constructor(e){super(e);a(this,"_es3DTileset",this.dv(new Le));a(this,"_ids",this.dv(W([])));a(this,"_platform",this.dv(y("CIMRTS")));a(this,"_visJson",this.disposeVar(y({})));a(this,"_highlightInner3DtilesetEvent",this.dv(new m));a(this,"_removeHighlightInner3DtilesetEvent",this.dv(new m));a(this,"_tilesetServePort",this.dv(y("")));this.collision=!1;{const t=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return}this.url?(this.syncPlatformFromUrl(),this.refresh()):this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{t()})),this.d(this.platformChanged.don(()=>{t()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const t=this._es3DTileset;this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(x([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"actorTag"],[this,"actorTag"])),this.d(_([t,"materialMode"],[this,"materialMode"])),this.d(_([t,"highlight"],[this,"highlight"])),this.d(_([t,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(_([t,"highlightID"],[this,"highlightID"])),this.d(_([t,"highlightColor"],[this,"highlightColor"])),this.d(x([t,"offset"],[this,"offset"])),this.d(x([t,"rotation"],[this,"rotation"])),this.d(_([t,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(_([t,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(_([t,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(_([t,"czmClassificationType"],[this,"czmClassificationType"])),this.d(_([t,"czmStyleJson"],[this,"czmStyleJson"])),this.d(_([t,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(_([t,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(_([t,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(_([t,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(_([t,"colorBlendMode"],[this,"colorBlendMode"])),this.d(_([t,"cacheBytes"],[this,"cacheBytes"])),this.d(_([t,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(_([t,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(_([t,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(_([t,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(_([t,"materialParams"],[this,"materialParams"])),this.d(x([t,"supportEdit"],[this,"supportEdit"])),this.d(x([t,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(x([t,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(x([t,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(x([t,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(x([t,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(x([t,"excavateId"],[this,"excavateId"]))}{const t=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{t.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{t.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{t.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{t.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{t.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{t.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{t.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{t.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{t.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{t.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{t.calcFlyInParam(...i)}))}{const t=this._es3DTileset;this.d(t.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(t.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const t=()=>{this.es3DTileset.show=this.show};t(),this.d(this.showChanged.don(()=>{t()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get platform(){return this._platform.value}get platformChanged(){return this._platform.changed}set platform(e){this._platform.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,t){var i;if((i=this.layerConfig)!=null&&i.length){const r={};r[t[0].value]=t[0].visable,this.visJson={...this.visJson,...r}}else this.setFeatureVisableEvent.emit(e,typeof t=="string"?JSON.parse(t):t,!0)}async getFeatureProperty(e){return await dl(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken,this.platform)}async getLayerConfig(){const e=await hl(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,this.platform);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await cl(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e,this.platform)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,t){var h,c,l;const i=await e.pick(t),r=i.sceneObject;return!r||r.id!==this.id&&r.typeName!="ESRtsFeatureEditing"?void 0:r.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(h=i==null?void 0:i.tilesetPickInfo)==null?void 0:h.id],{featureId:(c=i==null?void 0:i.tilesetPickInfo)==null?void 0:c.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await ll(hr(this.url),this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){if(!this.url||typeof this.url!="string")return;const e=+new Date,t=cr(this.url);t&&(this.syncPlatformFromUrl(),this._es3DTileset.offset=[0,0,0],this._es3DTileset.rotation=[0,0,0],this._es3DTileset.url=ol(t,this.platform,this.tileServiceName,e),console.log("3dtileset url:",this._es3DTileset.url))}syncPlatformFromUrl(){if(typeof this.url!="string"||!this.url)return;const e=nl(this.url);e&&e!==this.platform&&(this._platform.value=e)}get baseUrl(){if(this.url&&typeof this.url=="string"){const e=cr(this.url);if(!e)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return e}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01")}get tileServiceName(){if(this.url&&typeof this.url=="string"){const e=rl(this.url);if(!e)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/cim/ts/info/ms01");return e}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/cim/ts/info/ms01")}get tileServiceIp(){if(this.url&&typeof this.url=="string"){const e=sl(this.url);if(!e)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return e}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new re([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};a(ks,"createDefaultProps",()=>({...Le.createDefaultProps(),layerConfig:te([]),isSameIP:!1,useEarthDSToken:!1,earthdstoken:""})),a(ks,"type",ks.register("ESRtsTileset",ks,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let _a=ks;function eg(n){return typeof n=="number"&&!isNaN(n)}const Ms=class Ms extends Le{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation,offset:this.offset}}set json(s){this._innerSetJson(s)}async init(s,e){this.featureId=e;const t=await s.getFeatureProperty(e);this.uiShowprops=t.props.map(h=>({featureClassName:h.name,fields:h.props?h.props.map(c=>({key:c.name,type:c.type,value:c.type!="double"?c.value:eg(c.value)?Number(c.value.toFixed(3)):""})):[]})),this.datasetName=t.datasetName,s.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{s.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=typeof s.url=="string"?s.url:"",r=cr(i),o=s.tileServiceName;if(!r)throw new Error("ESRtsFeatureEditing: 无法解析服务地址");this.url=al(r,s.platform,o,this.featureId),this.allowPicking=!0,this.d(this.pickedEvent.don(h=>{h.assign({sceneObject:s}),s.pickedEvent.emit(h)})),this.d(()=>{this.editing=!1,s.removeHighlightDSFeature(this)})}constructor(s){super(s)}};a(Ms,"createDefaultProps",()=>({...Le.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:W({}),changeMaterial:te(void 0),uiShowprops:W({}),props:W({})})),a(Ms,"type",Ms.register("ESRtsFeatureEditing",Ms,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let wa=Ms;const tg=async(n,s,e)=>{try{const t=globalThis.localStorage.getItem("Authorization");let i=n;s&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const r={headers:{...!s&&t?{Authorization:t}:{}},mode:"cors"},h=await(await fetch(i,r)).text(),c=JSON.parse(h);if(c.status=="ok")return c.data.port;console.error(c.status);return}catch(t){console.error(t)}};function ig(n){return n==="CesiumlabDesktop"?"/osgb":""}function sg(n){if(/\/osgb\/ts\//.test(n))return"CesiumlabDesktop";if(/\/ts\/(?:info|tiles|featuretiles)\//.test(n))return"CIMRTS"}function ul(n){const s=n.match(/(?:\/osgb)?\/ts\/info\/([^?/]+)/);return s==null?void 0:s[1]}function ng(n,s,e,t=Date.now()){const i=ig(e);return`${n}:${s}${i}/tiles/tileset.json?t=${t}`}const js=class js extends Le{constructor(e){super(e);a(this,"_es3DTileset",this.dv(new Le));a(this,"_platform",this.dv(y("CIMRTS")));a(this,"_tilesetServePort",this.dv(y("")));this.collision=!1;{const t=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?(this.syncPlatformFromUrl(),this.refresh()):this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{t()})),this.d(this.platformChanged.don(()=>{t()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const t=this._es3DTileset;this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(x([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"actorTag"],[this,"actorTag"])),this.d(_([t,"materialMode"],[this,"materialMode"])),this.d(_([t,"highlight"],[this,"highlight"])),this.d(_([t,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(_([t,"highlightID"],[this,"highlightID"])),this.d(_([t,"highlightColor"],[this,"highlightColor"])),this.d(x([t,"offset"],[this,"offset"])),this.d(x([t,"rotation"],[this,"rotation"])),this.d(_([t,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(_([t,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(_([t,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(_([t,"czmClassificationType"],[this,"czmClassificationType"])),this.d(_([t,"czmStyleJson"],[this,"czmStyleJson"])),this.d(_([t,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(_([t,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(_([t,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(_([t,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(_([t,"colorBlendMode"],[this,"colorBlendMode"])),this.d(_([t,"cacheBytes"],[this,"cacheBytes"])),this.d(_([t,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(_([t,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(_([t,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(_([t,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(_([t,"materialParams"],[this,"materialParams"])),this.d(x([t,"supportEdit"],[this,"supportEdit"])),this.d(x([t,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(x([t,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(x([t,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(x([t,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(x([t,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(x([t,"excavateId"],[this,"excavateId"]))}{const t=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{t.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{t.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{t.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{t.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{t.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{t.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{t.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{t.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{t.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{t.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{t.calcFlyInParam(...i)}))}{const t=this._es3DTileset;this.d(t.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(t.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const t=()=>{this.es3DTileset.show=this.show};t(),this.d(this.showChanged.don(()=>{t()}))}}get es3DTileset(){return this._es3DTileset}get platform(){return this._platform.value}get platformChanged(){return this._platform.changed}set platform(e){this._platform.value=e}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await tg(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){if(!this.url||typeof this.url!="string"||!ul(this.url))return;const t=+new Date;this.syncPlatformFromUrl();const i=await this.getport(),r=this.tileServiceIp;this._es3DTileset.offset=[0,0,0],this._es3DTileset.rotation=[0,0,0],this._es3DTileset.url=ng(r,i,this.platform,t),console.log("3dtileset url:",this._es3DTileset.url)}syncPlatformFromUrl(){if(typeof this.url!="string"||!this.url)return;const e=sg(this.url);e&&e!==this.platform&&(this._platform.value=e)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const t=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!t)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return t}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const t=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!t)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return t}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){if(this.url&&typeof this.url=="string"){const e=ul(this.url);if(!e)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/osgb/ts/info/ms01");return e}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/osgb/ts/info/ms01")}};a(js,"createDefaultProps",()=>({...Le.createDefaultProps(),isSameIP:!1,useEarthDSToken:!1,earthdstoken:""})),a(js,"type",js.register("ESMsTileset",js,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ya=js;const pl={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
|
|
793
|
+
`,Tc=M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/misc/2.geojson"),J=class J extends X{constructor(e){super(e);a(this,"_flyToFeatureEvent",this.dv(new v));a(this,"_flyToFeatureIndexEvent",this.dv(new v));a(this,"_setFeatureStyleEvent",this.disposeVar(new v));a(this,"_resetFeatureStyleEvent",this.disposeVar(new v));a(this,"_features",this.disposeVar(te(void 0)));a(this,"pickedInfoType","FeatureCollection");a(this,"abortController");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,t,i){this._flyToFeatureEvent.emit(e,t,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,t){this._flyToFeatureIndexEvent.emit(e,t)}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e,t=!1){this._setFeatureStyleEvent.emit(e,t)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}getFeatureTable(){if(this.features){let e={};return Bh(this.features).features.forEach(t=>{Object.assign(e,t.properties)}),Object.keys(e).forEach(t=>{e[t]=typeof e[t]}),e}else console.log("数据未加载完成,请稍后调用此方法getFeatureTable()")}_updateUrl(){var e;if(this.abortController&&this.abortController.abort(),!this.url){this.features=void 0;return}if(typeof this.url=="object")this.features=this.url;else if(Eo(this.url))this.features=JSON.parse(this.url);else{this.abortController=new AbortController;const t=this.abortController.signal;fetch(M.context.getStrFromEnv(this.url),{signal:t}).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{i.name!="AbortError"&&console.warn("ESGeoJson数据加载失败",i)})}this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new R([this,"url"],"服务地址",J.defaults.url),new f([this,"minFeatureVisibleDistance"],"要素最小可视距离",J.defaults.minFeatureVisibleDistance),new f([this,"maxFeatureVisibleDistance"],"要素最大可视距离",J.defaults.maxFeatureVisibleDistance),new A([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考"),new A([this,"classificationType"],J.classificationTypes,"贴地附着目标",J.defaults.classificationType),new f([this,"zIndex"],"层级排序",J.defaults.zIndex)],style:[...e.style,new k("点样式集合"),new E([this,"textShow"],"是否显示",J.defaults.textShow),new ne([this,"textAnchor"],"锚点",J.defaults.anchor),new N([this,"textProperty"],"标注显示属性",J.defaults.textStyle.textProperty),new N([this,"textDefaultText"],"默认文本",J.defaults.textStyle.defaultText),new G([this,"textColor"],"文本颜色",J.defaults.textStyle.color),new G([this,"textBackgroundColor"],"文本背景颜色",J.defaults.textStyle.backgroundColor),new N([this,"textFontStyle"],"字体样式",J.defaults.textStyle.fontStyle),new N([this,"textFontWeight"],"字体粗细",J.defaults.textStyle.fontWeight),new f([this,"textFontSize"],"字体大小",J.defaults.textStyle.fontSize),new ne([this,"textOffset"],"像素偏移",J.defaults.textStyle.offset),new k("点图片样式集合"),new E([this,"imageShow"],"是否显示",J.defaults.imageShow),new ne([this,"imageAnchor"],"锚点",J.defaults.imageStyle.anchor),new R([this,"imageUrl"],"图片地址",J.defaults.imageStyle.url),new ne([this,"imageSize"],"图片大小",J.defaults.imageStyle.size),new ne([this,"imageOffset"],"像素偏移",J.defaults.imageStyle.offset),new k("线样式集合"),new E([this,"stroked"],"是否显示",J.defaults.stroked),new E([this,"strokeGround"],"贴地",J.defaults.strokeStyle.ground),new f([this,"strokeWidth"],"线宽",J.defaults.strokeStyle.width),new A([this,"strokeWidthType"],J.strokeStyleWidthTypes,"线宽类型"),new G([this,"strokeColor"],"线颜色",J.defaults.strokeStyle.color),new N([this,"strokeMaterial"],"线材质",J.defaults.strokeStyle.material),new R([this,"strokeMaterialParams"],"线材质参数",J.defaults.strokeStyle.materialParams),new k("面样式集合"),new E([this,"filled"],"是否显示",J.defaults.filled),new E([this,"fillGround"],"贴地",J.defaults.fillStyle.ground),new G([this,"fillColor"],"填充颜色",J.defaults.fillStyle.color),new N([this,"fillMaterial"],"填充材质",J.defaults.fillStyle.material),new R([this,"fillMaterialParams"],"填充材质参数",J.defaults.fillStyle.materialParams)],more:[...e.more,new k("标注文本样式"),new N([this,"textFontFamily"],"字体",J.defaults.textStyle.fontFamily),new f([this,"zOrder"],"点排序优先级",J.defaults.zOrder),new k("通用"),new Xe([this,"loadFuncStr"],"loadFnStr",da,Pc,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};a(J,"createDefaultProps",()=>({...X.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:Tc,stroked:!0,strokeStyle:B({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:B({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:B({url:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/location.png"),size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:B({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE",classificationType:"TERRAIN",zIndex:0})),a(J,"type",J.register("ESGeoJson",J,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoJson 是用于加载和渲染 GeoJson 矢量数据并支持点、线、面样式配置的对象。
|
|
794
|
+
对象json示例:
|
|
795
|
+
{
|
|
796
|
+
"id": "geojson_xxx",
|
|
797
|
+
"type": "ESGeoJson",
|
|
798
|
+
"name": "GeoJson数据",
|
|
799
|
+
"url": ${Tc}
|
|
800
|
+
}
|
|
801
|
+
`})),a(J,"strokeStyleWidthTypes",[["screen","screen"],["world","world"]]),a(J,"classificationTypes",[["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]]);let Pn=J;const Vi=class Vi extends U{constructor(e){super(e);a(this,"editingBindMode","doublePoints");a(this,"_height",this.disposeVar(w(0)));{const t=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};t(),this.ad(this.pointsChanged.don(t))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};a(Vi,"createDefaultProps",()=>({...U.createDefaultProps(),stroked:!0,strokeStyle:B({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Vi,"type",Vi.register("ESHeightMeasurement",Vi,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESHeightMeasurement 是用于测量地理空间中两点之间高度差的对象。
|
|
802
|
+
对象json示例:
|
|
803
|
+
{
|
|
804
|
+
"id": "heightmeasurement_xxx",
|
|
805
|
+
"type": "ESHeightMeasurement",
|
|
806
|
+
"name": "高度测量",
|
|
807
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 10]]
|
|
808
|
+
}
|
|
809
|
+
`})),a(Vi,"supportEditingModes",[...U.supportEditingModes,I.DoublePoints,I.DoublePointsAppend,I.DoublePointsModify]);let ua=Vi;const zi=class zi extends ot{constructor(e){super(e);a(this,"_area",this.dv(w(0)));a(this,"_perimeter",this.dv(w(0)));a(this,"editingBindMode","doublePoints");const t=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};t(),this.d(this.radiusChanged.don(t))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,t){return ec([...this.position],this.radius,e,t)[0].map(r=>[...r,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new f([this,"radius"],"圆半径",1,!0),new ie([this,"instances"],"实例化矩阵",zi.defaults.instances,void 0,!0)],coordinate:[...e.coordinate,new E([this,"editing"],"是否编辑"),new nt([this,"position"],"三维坐标",[0,0,0],!0),new f([this,"area"],"面积",0,!1,!0),new f([this,"perimeter"],"周长",0,!1,!0)]}}};a(zi,"createDefaultProps",()=>({...ot.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:B({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),instances:q([])})),a(zi,"type",zi.register("ESLocalCircle",zi,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESLocalCircle 是用于在局部坐标系中创建和管理圆形几何对象的可视化对象。
|
|
810
|
+
对象json示例:
|
|
811
|
+
{
|
|
812
|
+
"id": "localcircle_xxx",
|
|
813
|
+
"type": "ESLocalCircle",
|
|
814
|
+
"name": "局部坐标圆形",
|
|
815
|
+
"position": [116.39, 39.9, 0],
|
|
816
|
+
"radius": 1
|
|
817
|
+
}
|
|
818
|
+
`}));let pa=zi;const As=class As extends ot{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new ie([this,"points"],"坐标",[])]}}};a(As,"createDefaultProps",()=>({...ot.createDefaultProps(),points:ir([]),filled:!0})),a(As,"type",As.register("ESLocalPolygon",As,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESLocalPolygon 是用于在局部 2D 坐标系中创建和管理多边形几何对象的可视化对象。
|
|
819
|
+
对象json示例:
|
|
820
|
+
{
|
|
821
|
+
"id": "localpolygon_xxx",
|
|
822
|
+
"type": "ESLocalPolygon",
|
|
823
|
+
"name": "局部2D坐标多边形",
|
|
824
|
+
"position": [116.39, 39.9, 0],
|
|
825
|
+
"points": [[0, 0], [10, 0], [10, 10]]
|
|
826
|
+
}
|
|
827
|
+
`}));let Tn=As;const js=class js extends ti{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new ie([this,"points"],"本地位置数组",[])]}}};a(js,"createDefaultProps",()=>({...ti.createDefaultProps(),points:Yt(void 0),filled:!0})),a(js,"type",js.register("ESLocalPolygonZ",js,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESLocalPolygonZ 是用于在局部坐标系中创建和管理具有高度信息的三维多边形对象的可视化对象。
|
|
828
|
+
对象json示例:
|
|
829
|
+
{
|
|
830
|
+
"id": "localpolygonz_xxx",
|
|
831
|
+
"type": "ESLocalPolygonZ",
|
|
832
|
+
"name": "局部坐标多边形",
|
|
833
|
+
"position": [116.39, 39.9, 0],
|
|
834
|
+
"points": [[0, 0, 0], [10, 0, 0], [10, 10, 0]]
|
|
835
|
+
}
|
|
836
|
+
`}));let ga=js;const Rs=class Rs extends ot{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new f([this,"width"],"宽度"),new f([this,"height"],"高度")]}}};a(Rs,"createDefaultProps",()=>({...ot.createDefaultProps(),width:5e5,height:3e5,filled:!0})),a(Rs,"type",Rs.register("ESLocalRectangle",Rs,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESLocalRectangle 是用于在局部坐标系中通过宽度和高度创建矩形几何对象的可视化对象。
|
|
837
|
+
对象json示例:
|
|
838
|
+
{
|
|
839
|
+
"id": "localrectangle_xxx",
|
|
840
|
+
"type": "ESLocalRectangle",
|
|
841
|
+
"name": "局部坐标四边形",
|
|
842
|
+
"position": [116.39, 39.9, 0],
|
|
843
|
+
"width": 500000
|
|
844
|
+
}
|
|
845
|
+
`}));let fa=Rs;const Tt=class Tt extends U{constructor(e){super(e);a(this,"editingBindMode","lineString");a(this,"_distance",this.dv(w(0)));a(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const t=()=>{if(this.points&&this.points.length>=2){const i=Vt(this.points,"GEODESIC"),r=i[i.length-1];this._distance.value=r}else this._distance.value=0};t(),this.d(this.pointsChanged.don(t))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new f([this,"height"],"高度",10),new f([this,"width"],"宽度",10),new A([this,"materialMode"],Tt.materialModes,"模式",Tt.defaults.materialMode)],coordinate:[...e.coordinate,new f([this,"distance"],"距离",0,!1,!0)]}}};a(Tt,"createDefaultProps",()=>({...U.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:B({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),a(Tt,"type",Tt.register("ESPipeFence",Tt,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPipeFence 是用于在三维场景中创建和管理管道状电子围栏的地理矢量对象。
|
|
846
|
+
对象json示例:
|
|
847
|
+
{
|
|
848
|
+
"id": "pipefence_xxx",
|
|
849
|
+
"type": "ESPipeFence",
|
|
850
|
+
"name": "管道电子围栏",
|
|
851
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
852
|
+
"height": 10
|
|
853
|
+
}
|
|
854
|
+
`})),a(Tt,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),a(Tt,"supportEditingModes",[...U.supportEditingModes,I.LineStringAppend,I.LineStringInsert]);let vr=Tt;const Bt=class Bt extends Ue{constructor(e){super(e);a(this,"_setLayerVisibleEvent",this.dv(new v));a(this,"_setLayerColorEvent",this.dv(new v))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,t){this._setLayerVisibleEvent.emit(e,t)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,t){this._setLayerColorEvent.emit(e,t)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("ESPipeserTileset"),new L("设置图层可见性",this.setLayerVisible.bind(this),["",""],"setLayerVisible"),new L("设置图层颜色",this.setLayerColor.bind(this),["",""],"setLayerColor"),new A([this,"colorMode"],Bt.colorModes,"colorMode",Bt.defaults.colorMode,!0)]}}};a(Bt,"createDefaultProps",()=>({...Ue.createDefaultProps(),colorMode:"default"})),a(Bt,"type",Bt.register("ESPipeserTileset",Bt,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPipeserTileset 是专门用于管理和渲染 PipeSer 管线系统三维数据的 3D 瓦片集图层对象。
|
|
855
|
+
对象json示例:
|
|
856
|
+
{
|
|
857
|
+
"id": "pipesertileset_xxx",
|
|
858
|
+
"type": "ESPipeserTileset",
|
|
859
|
+
"name": "PipeSer图层",
|
|
860
|
+
"url": "http://localhost:9004/tile/model/service/ortwkTiV/tileset.json",
|
|
861
|
+
"colorMode": "default"
|
|
862
|
+
}
|
|
863
|
+
`})),a(Bt,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let ma=Bt;const Wt=class Wt extends U{constructor(e){super(e);a(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new f([this,"area"],"面积",0,!1,!0),new f([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new f([this,"height"],"高度",10),new A([this,"materialMode"],Wt.materialModes,"模式","danger")]}}};a(Wt,"createDefaultProps",()=>({...U.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),a(Wt,"type",Wt.register("ESPolygonFence",Wt,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPolygonFence 是用于在三维场景中创建和管理多边形形状电子围栏的地理矢量对象。
|
|
864
|
+
对象json示例:
|
|
865
|
+
{
|
|
866
|
+
"id": "polygonfence_xxx",
|
|
867
|
+
"type": "ESPolygonFence",
|
|
868
|
+
"name": "多边形电子围栏",
|
|
869
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
870
|
+
"height": 10,
|
|
871
|
+
"materialMode":"danger"
|
|
872
|
+
}
|
|
873
|
+
`})),a(Wt,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),a(Wt,"supportEditingModes",[...U.supportEditingModes,I.CircularAppend,I.CircularInsert,I.HeightModify]);let _r=Wt;const hi=class hi extends U{constructor(e){super(e);a(this,"_deprecated",["ground"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());a(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new E([this,"ground"],"是否贴地"),new E([this,"outlineTranslucent"],"轮廓线半透明"),new f([this,"height"],"高度"),new f([this,"extrudedHeight"],"拉伸高度"),new Fe([this,"rectangle"],"范围",hi.defaults.rectangle,!0),new f([this,"stRotation"],"纹理旋转角度"),new f([this,"rotation"],"旋转角度"),new E([this,"pointEditing"],"是否单点编辑")]}}};a(hi,"createDefaultProps",()=>({...U.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:q(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),a(hi,"type",hi.register("ESRectangle",hi,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESRectangle 是用于在三维场景中创建和管理矩形几何对象的地理矢量对象。
|
|
874
|
+
对象json示例:
|
|
875
|
+
{
|
|
876
|
+
"id": "rectangle_xxx",
|
|
877
|
+
"type": "ESRectangle",
|
|
878
|
+
"name": "矩形",
|
|
879
|
+
"rectangle": [116.39, 39.9, 116.40, 39.91]
|
|
880
|
+
}
|
|
881
|
+
`})),a(hi,"supportEditingModes",[...U.supportEditingModes,I.DoublePoints,I.DoublePointsAppend,I.DoublePointsModify]);let va=hi;const Ns=class Ns extends ee{getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new ie([this,"innerRings"],"裁切多边形数组",[],void 0,!0),new E([this,"gradient"],"是否使用渐变填充",!1),new E([this,"light"],"是否使用光照",!1)]}}};a(Ns,"createDefaultProps",()=>({...ee.createDefaultProps(),innerRings:Nr([]),gradient:!1,light:!1})),a(Ns,"type",Ns.register("ESPolygonWithHole",Ns,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPolygonWithHole 是用于创建和管理带有内部空洞的多边形几何对象的地理矢量对象。
|
|
882
|
+
对象json示例:
|
|
883
|
+
{
|
|
884
|
+
"id": "polygonwithhole_xxx",
|
|
885
|
+
"type": "ESPolygonWithHole",
|
|
886
|
+
"name": "内部裁切多边形",
|
|
887
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
888
|
+
"innerRings": [[[116.395, 39.905, 0], [116.398, 39.905, 0], [116.398, 39.908, 0]]]
|
|
889
|
+
}
|
|
890
|
+
`}));let _a=Ns;const ci=class ci extends ee{constructor(e){super(e);a(this,"_startEvent",this.disposeVar(new v));a(this,"_stopEvent",this.dv(new v));a(this,"_surfaceArea",this.disposeVar(w(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("表面积测量"),new L("开始计算",()=>this.start(),[],"start"),new L("停止计算",()=>this.stop(),[],"stop"),new f([this,"interpolation"],"插值距离",ci.defaults.interpolation),new f([this,"offsetHeight"],"偏移高度",ci.defaults.offsetHeight)]}}};a(ci,"createDefaultProps",()=>({...ee.createDefaultProps(),interpolation:.5,offsetHeight:0,units:F(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:B({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(ci,"type",ci.register("ESSurfaceAreaMeasurement",ci,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESSurfaceAreaMeasurement 是用于在三维场景中测量多边形区域表面积的对象。
|
|
891
|
+
对象json示例:
|
|
892
|
+
{
|
|
893
|
+
"id": "surfaceareameasurement_xxx",
|
|
894
|
+
"type": "ESSurfaceAreaMeasurement",
|
|
895
|
+
"name": "表面积测量",
|
|
896
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
897
|
+
"interpolation": 0.5
|
|
898
|
+
}
|
|
899
|
+
`}));let ya=ci;const di=class di extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new f([this,"downloadProgress"],"下载进度",di.defaults.downloadProgress,!0,!0),new R([this,"importOptions"],"导入参数",di.defaults.importOptions,void 0,!0)],dataSource:[...s.dataSource,new R([this,"url"],"路径")]}}};a(di,"createDefaultProps",()=>({...j.createDefaultProps(),url:"",importOptions:te({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),a(di,"type",di.register("ESDatasmithRuntimeModel",di,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESDatasmithRuntimeModel 是用于加载和展示 Datasmith 模型的可视化对象。
|
|
900
|
+
对象json示例:
|
|
901
|
+
{
|
|
902
|
+
"id": "datasmithruntimemodel_xxx",
|
|
903
|
+
"type": "ESDatasmithRuntimeModel",
|
|
904
|
+
"name": "Datasmith Model",
|
|
905
|
+
"position": [116.39, 39.9, 0],
|
|
906
|
+
"url": "http://localhost:9004/datasmith/model.datasmith"
|
|
907
|
+
}
|
|
908
|
+
`}));let wa=di;const Se=class Se extends Tn{constructor(s){super(s),this.ad(de([this.waterColorChanged,this.waterImageChanged,this.frequencyChanged,this.amplitudeChanged,this.flowDirectionChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new A([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Se.defaults.waterType),new f([this,"frequency"],"频率",Se.defaults.frequency),new pe([this,"amplitude"],.01,[0,1],"振幅",Se.defaults.amplitude),new pe([this,"flowDirection"],1,[0,360],"流向",Se.defaults.flowDirection),new pe([this,"waveVelocity"],.01,[0,1],"波动频率",Se.defaults.waveVelocity),new pe([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Se.defaults.specularIntensity),new pe([this,"murkiness"],.1,[0,10],"水体浑浊度",Se.defaults.murkiness),new f([this,"flowSpeed"],"水流速度",Se.defaults.flowSpeed),new G([this,"waterColor"],"水的底色",Se.defaults.waterColor),new R([this,"waterImage"],"水的图片",Se.defaults.waterImage)]}}};a(Se,"createDefaultProps",()=>({...Tn.createDefaultProps(),allowPicking:!0,waterImage:te(void 0),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),a(Se,"type",Se.register("ESDynamicWater",Se,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESDynamicWater 是用于在场景中渲染动态水面效果的对象。
|
|
909
|
+
对象json示例:
|
|
910
|
+
{
|
|
911
|
+
"id": "dynamicwater_xxx",
|
|
912
|
+
"type": "ESDynamicWater",
|
|
913
|
+
"name": "动态水面",
|
|
914
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
915
|
+
"waterType": "river"
|
|
916
|
+
}
|
|
917
|
+
`}));let Ea=Se;const Ce=class Ce extends ee{constructor(s){super(s),this.ad(de([this.waterColorChanged,this.waterImageChanged,this.frequencyChanged,this.amplitudeChanged,this.flowDirectionChanged,this.waveVelocityChanged,this.specularIntensityChanged,this.murkinessChanged,this.flowSpeedChanged],()=>{this.waterType="custom"}))}getESProperties(){const s={...super.getESProperties()};return{...s,defaultMenu:"basic",basic:[...s.basic,new A([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Ce.defaults.waterType),new f([this,"frequency"],"频率",Ce.defaults.frequency),new pe([this,"amplitude"],.01,[0,1],"振幅",Ce.defaults.amplitude),new pe([this,"flowDirection"],1,[0,360],"流向",Ce.defaults.flowDirection),new pe([this,"waveVelocity"],.01,[0,1],"波动频率",Ce.defaults.waveVelocity),new pe([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ce.defaults.specularIntensity),new pe([this,"murkiness"],.1,[0,10],"水体浑浊度",Ce.defaults.murkiness),new f([this,"flowSpeed"],"水流速度",Ce.defaults.flowSpeed),new G([this,"waterColor"],"水的底色",Ce.defaults.waterColor),new R([this,"waterImage"],"水的图片",Ce.defaults.waterImage)]}}};a(Ce,"createDefaultProps",()=>({...ee.createDefaultProps(),allowPicking:!0,waterImage:te({}),waterColor:[.15,.16,0,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),a(Ce,"type",Ce.register("ESGeoWater",Ce,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoWater 是用于表示和渲染地理动态水面的对象,支持设置水色、波动、流向等水面效果。
|
|
918
|
+
对象json示例:
|
|
919
|
+
{
|
|
920
|
+
"id": "water_xxx",
|
|
921
|
+
"type": "ESGeoWater",
|
|
922
|
+
"name": "地理水面",
|
|
923
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
924
|
+
"waterType": "river"
|
|
925
|
+
}
|
|
926
|
+
`}));let ba=Ce;const Ui=class Ui extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new f([this,"downloadProgress"],"下载进度",Ui.defaults.downloadProgress,!0,!0),new N([this,"levelName"],"levelName",""),new f([this,"levelLoadDistance"],"levelLoadDistance",1e3),new ue([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...s.dataSource,new R([this,"url"],"url","")]}}};a(Ui,"createDefaultProps",()=>({...j.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:F([0,0,0]),levelLoadDistance:1e3})),a(Ui,"type",Ui.register("ESLevelRuntimeModel",Ui,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESLevelRuntimeModel 是用于在场景中加载和管理 UE 关卡包资源的模型对象。
|
|
927
|
+
对象json示例:
|
|
928
|
+
{
|
|
929
|
+
"id": "levelruntimemodel_xxx",
|
|
930
|
+
"type": "ESLevelRuntimeModel",
|
|
931
|
+
"name": "关卡包模型",
|
|
932
|
+
"position": [116.39, 39.9, 0],
|
|
933
|
+
"url": "http://localhost:9004/level/levelxxx.pak"
|
|
934
|
+
}
|
|
935
|
+
`}));let Sa=Ui;const $e=class $e extends ve{constructor(e){super(e);a(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new f([this,"radius"],"半径",$e.defaults.radius),new f([this,"sides"],"圆边数",$e.defaults.sides),new f([this,"speed"],"材质速度",$e.defaults.speed),new A([this,"materialMode"],$e.materialModes,"材质模式",$e.defaults.materialMode),new R([this,"materialImage"],"材质图片和重复度",$e.defaults.materialImage)]}}};a($e,"createDefaultProps",()=>({...ve.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:B({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:B({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),a($e,"type",$e.register("ESPipeline",$e,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPipeline 是用于在三维场景中创建和管理具有圆形截面管线对象的地理矢量对象。
|
|
936
|
+
对象json示例:
|
|
937
|
+
{
|
|
938
|
+
"id": "pipeline_xxx",
|
|
939
|
+
"type": "ESPipeline",
|
|
940
|
+
"name": "管线",
|
|
941
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
942
|
+
"radius": 10
|
|
943
|
+
}
|
|
944
|
+
`})),a($e,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let Ca=$e;const It=class It extends U{constructor(e){super(e);a(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new G([this,"visibleColor"],"可视区域颜色",It.defaults.visibleColor),new G([this,"invisibleColor"],"遮挡区域颜色",It.defaults.invisibleColor),new f([this,"heightOffset"],"视点高度偏移",It.defaults.heightOffset)]}}};a(It,"createDefaultProps",()=>({...U.createDefaultProps(),visibleColor:F([0,1,0,1]),invisibleColor:F([1,0,0,1]),heightOffset:0})),a(It,"type",It.register("ESVisibilityAnalysis",It,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESVisibilityAnalysis 是用于在场景中分析观察点与目标点之间通视情况的对象。
|
|
945
|
+
对象json示例:
|
|
946
|
+
{
|
|
947
|
+
"id": "visibilityanalysis_xxx",
|
|
948
|
+
"type": "ESVisibilityAnalysis",
|
|
949
|
+
"name": "通视分析",
|
|
950
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
951
|
+
"visibleColor": [0, 1, 0, 1]
|
|
952
|
+
}
|
|
953
|
+
`})),a(It,"supportEditingModes",[...U.supportEditingModes,I.VisibilityAppend,I.VisibilityModify]);let Pa=It;const Ls=class Ls extends ee{constructor(e){super(e);a(this,"_startEvent",this.dv(new v));a(this,"_clearEvent",this.dv(new v));a(this,"_volume",this.disposeVar(w(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new f([this,"planeHeight"],"基准面高程",void 0,!0),new f([this,"gridWidth"],"采样间距 m"),new f([this,"cutVolume"],"挖方",0,!1,!0),new f([this,"fillVolume"],"填方",0,!1,!0),new f([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new f([this,"progress"],"计算进度",0,!1,!0),new L("开始分析",()=>this.start(),[],"start"),new L("清空分析结果",()=>this.clear(),[],"clear"),new E([this,"depthTest"],"是否开启深度检测")]}}};a(Ls,"createDefaultProps",()=>({...ee.createDefaultProps(),planeHeight:w(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:B({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Ls,"type",Ls.register("ESVolumeMeasurement",Ls,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESVolumeMeasurement 是用于在三维场景中绘制多边形区域并进行挖方、填方体积计算与测量的对象。
|
|
954
|
+
对象json示例:
|
|
955
|
+
{
|
|
956
|
+
"id": "volumemeasurement_xxx",
|
|
957
|
+
"type": "ESVolumeMeasurement",
|
|
958
|
+
"name": "体积测量",
|
|
959
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
960
|
+
"planeHeight": 0
|
|
961
|
+
}
|
|
962
|
+
`}));let Ta=Ls;const Vs=class Vs extends Be{constructor(e){super(e);a(this,"_human",this.dv(new Be));a(this,"_poi",this.dv(new Cn));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:t,_poi:i}=this;this.d(_([t,"show"],[this,"show"])),this.d(_([i,"show"],[this,"show"])),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"scale"],[this,"scale"])),this.d(_([i,"scale"],[this,"scale"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(D([t,"flyInParam"],[this,"flyInParam"])),this.d(D([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"animation"],[this,"animation"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([t,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(_([i,"name"],[this,"name"])),this.d(_([i,"mode"],[this,"poiMode"])),this.d(_([i,"autoAnchor"],[this,"autoAnchor"])),this.d(_([i,"screenRender"],[this,"screenRender"])),this.d(_([i,"size"],[this,"size"])),this.d(_([i,"anchor"],[this,"anchor"])),this.d(_([i,"sizeByContent"],[this,"sizeByContent"])),this.d(_([i,"renderMode"],[this,"renderMode"])),this.d(_([i,"rotationType"],[this,"rotationType"])),this.d(_([i,"zOrder"],[this,"zOrder"])),this.d(_([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(D([t,"position"],[this,"position"])),this.d(D([t,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(r=>{t.flyIn(r)})),this.d(this.flyToEvent.don(r=>{t.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{t.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{t.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((r,o)=>{t.smoothMove(r,o)})),this.d(this.smoothMoveWithRotationEvent.don((r,o,l)=>{t.smoothMoveWithRotation(r,o,l)})),this.d(this.smoothMoveOnGroundEvent.don((r,o,l,h)=>{t.smoothMoveOnGround(r,o,l,h)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((r,o,l,h,c)=>{t.smoothMoveWithRotationOnGround(r,o,l,h,c)})),this.d(this.automaticLandingEvent.don(()=>{t.automaticLanding()})),this.d(this._human.readyEvent.don(r=>{this.readyEvent.emit(r)}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"poiMode"],Cn.modes,"poi模式","SquareH01"),new f([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};a(Vs,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:B({}),autoAnchor:!0,screenRender:!0,size:F([100,100]),anchor:F([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Be.createDefaultProps()})),a(Vs,"type",Vs.register("ESHumanPoi",Vs,{chsName:"人员poi",tags:["ESObjects"],description:`ESHumanPoi 是组合了人员与二维点标记的对象,在场景中同时显示人员模型和 POI 标签。
|
|
963
|
+
对象json示例:
|
|
964
|
+
{
|
|
965
|
+
"id": "humanpoi_xxx",
|
|
966
|
+
"type": "ESHumanPoi",
|
|
967
|
+
"name": "人员poi",
|
|
968
|
+
"position": [116.39, 39.9, 0],
|
|
969
|
+
"poiMode": "SquareH01"
|
|
970
|
+
}
|
|
971
|
+
`}));let Ia=Vs;const xt=class xt extends j{constructor(s){super(s)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"basic",basic:[new N([this,"image"],"图片",xt.defaults.image),new f([this,"height"],"喷泉高度",xt.defaults.height),new f([this,"spread"],"扩散角度",xt.defaults.spread),new f([this,"emissionRate"],"发射率",xt.defaults.emissionRate)]}}};a(xt,"createDefaultProps",()=>({...j.createDefaultProps(),image:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),height:10,spread:5,emissionRate:50})),a(xt,"type",xt.register("ESFountainParticleSystem",xt,{chsName:"粒子喷泉",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESFountainParticleSystem 是用于创建粒子喷泉效果的对象。
|
|
972
|
+
对象json示例:
|
|
973
|
+
{
|
|
974
|
+
"id": "fountainparticlesystem_xxx",
|
|
975
|
+
"type": "ESFountainParticleSystem",
|
|
976
|
+
"name": "粒子喷泉",
|
|
977
|
+
"position": [116.39, 39.9, 0],
|
|
978
|
+
"height": 10
|
|
979
|
+
}
|
|
980
|
+
`}));let yr=xt;const Ge=class Ge extends Be{constructor(e){super(e);a(this,"_human",this.dv(new Be));a(this,"_fountain",this.dv(new yr));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._fountain));{const{_human:t,_fountain:i}=this;this.ad(de([this.showChanged,this.humanShowChanged,this.fountainShowChanged],()=>{t.show=this.show&&this.humanShow,i.show=this.show&&this.fountainShow},{immediate:!0})),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"scale"],[this,"scale"])),this.d(_([i,"scale"],[this,"scale"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(D([t,"flyInParam"],[this,"flyInParam"])),this.d(D([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"animation"],[this,"animation"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(_([t,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.ad(de([this.positionOffsetChanged,this.fountainOffsetChanged],()=>{t.positionOffset=this.positionOffset,i.positionOffset=[this.positionOffset[0]+this.fountainOffset[0],this.positionOffset[1]+this.fountainOffset[1],this.positionOffset[2]+this.fountainOffset[2]]},{immediate:!0})),this.d(D([t,"position"],[this,"position"])),this.d(D([t,"rotation"],[this,"rotation"])),this.d(D([i,"position"],[this,"position"])),this.ad(de(this.rotationChanged,()=>{i.rotation=[this.rotation[0],this.rotation[1]-30,this.rotation[2]]},{immediate:!0})),this.d(_([i,"image"],[this,"fountainImage"])),this.d(_([i,"height"],[this,"fountainHeight"])),this.d(_([i,"spread"],[this,"fountainSpread"])),this.d(_([i,"emissionRate"],[this,"fountainEmissionRate"])),this.d(this.flyInEvent.don(r=>{t.flyIn(r)})),this.d(this.flyToEvent.don(r=>{t.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{t.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{t.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((r,o)=>{t.smoothMove(r,o)})),this.d(this.smoothMoveWithRotationEvent.don((r,o,l)=>{t.smoothMoveWithRotation(r,o,l)})),this.d(this.smoothMoveOnGroundEvent.don((r,o,l,h)=>{t.smoothMoveOnGround(r,o,l,h)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((r,o,l,h,c)=>{t.smoothMoveWithRotationOnGround(r,o,l,h,c)})),this.d(this.automaticLandingEvent.don(()=>{t.automaticLanding()})),this.d(this._human.readyEvent.don(r=>{this.readyEvent.emit(r)}))}}get human(){return this._human}get fountain(){return this._fountain}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new E([this,"humanShow"],"人物显隐",Ge.defaults.humanShow),new E([this,"fountainShow"],"喷泉显隐",Ge.defaults.fountainShow),new N([this,"fountainImage"],"喷泉图片",Ge.defaults.fountainImage),new ue([this,"fountainOffset"],"喷泉偏移",Ge.defaults.fountainOffset),new f([this,"fountainHeight"],"喷泉高度",Ge.defaults.fountainHeight),new f([this,"fountainSpread"],"喷泉扩散角度",Ge.defaults.fountainSpread),new f([this,"fountainEmissionRate"],"喷泉发射率",Ge.defaults.fountainEmissionRate)]}}};a(Ge,"createDefaultProps",()=>({...Be.createDefaultProps(),humanShow:!0,fountainShow:!0,fountainImage:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/smoke.png"),fountainOffset:F([0,0,0]),fountainHeight:10,fountainSpread:5,fountainEmissionRate:50})),a(Ge,"type",Ge.register("ESHumanFountain",Ge,{chsName:"人员喷泉",tags:["ESObjects"],description:`ESHumanFountain 是组合了人员与喷泉粒子效果的对象,喷泉从人物手中喷出。
|
|
981
|
+
对象json示例:
|
|
982
|
+
{
|
|
983
|
+
"id": "humanfountain_xxx",
|
|
984
|
+
"type": "ESHumanFountain",
|
|
985
|
+
"name": "人员喷泉",
|
|
986
|
+
"position": [116.39, 39.9, 0],
|
|
987
|
+
"fountainHeight": 10
|
|
988
|
+
}
|
|
989
|
+
`}));let xa=Ge;const tt=class tt extends ee{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new f([this,"depth"],"深度",tt.defaults.depth),new f([this,"interpolation"],"插值",tt.defaults.interpolation),new f([this,"opacity"],"透明度",tt.defaults.opacity),new R([this,"sideImage"],"侧面图片",tt.defaults.sideImage),new R([this,"bottomImage"],"底面图片",tt.defaults.bottomImage),new f([this,"extendBoundary"],"外扩边界采样高度",tt.defaults.extendBoundary)]}}};a(tt,"createDefaultProps",()=>({...ee.createDefaultProps(),depth:100,sideImage:B({url:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:B({url:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0,extendBoundary:1})),a(tt,"type",tt.register("ESPit",tt,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPit 是用于在三维场景中创建具有深度的多边形坑洞对象的地理矢量对象。
|
|
990
|
+
对象json示例:
|
|
991
|
+
{
|
|
992
|
+
"id": "pit_xxx",
|
|
993
|
+
"type": "ESPit",
|
|
994
|
+
"name": "坑",
|
|
995
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
996
|
+
"depth": 100
|
|
997
|
+
}
|
|
998
|
+
`}));let vs=tt;const zs=class zs extends vs{constructor(e){super(e);a(this,"_excavate",this.dv(new Sn));a(this,"_pit",this.dv(new vs));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:t,_pit:i}=this;this.d(_([t,"show"],[this,"show"])),this.d(_([i,"show"],[this,"show"])),this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([i,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(D([i,"points"],[this,"points"])),this.d(_([t,"points"],[this,"points"])),this.d(_([i,"pointed"],[this,"pointed"])),this.d(_([t,"pointed"],[this,"pointed"])),this.d(_([i,"pointStyle"],[this,"pointStyle"])),this.d(_([t,"pointStyle"],[this,"pointStyle"])),this.d(_([i,"stroked"],[this,"stroked"])),this.d(_([t,"stroked"],[this,"stroked"])),this.d(_([i,"strokeStyle"],[this,"strokeStyle"])),this.d(_([t,"strokeStyle"],[this,"strokeStyle"])),this.d(_([i,"filled"],[this,"filled"])),this.d(_([i,"fillStyle"],[this,"fillStyle"])),this.d(_([t,"fillStyle"],[this,"fillStyle"])),this.d(_([t,"mode"],[this,"mode"])),this.d(_([t,"targetID"],[this,"targetID"])),this.d(_([i,"depth"],[this,"depth"])),this.d(_([i,"sideImage"],[this,"sideImage"])),this.d(_([i,"bottomImage"],[this,"bottomImage"])),this.d(_([i,"opacity"],[this,"opacity"])),this.d(_([i,"interpolation"],[this,"interpolation"])),this.d(D([i,"flyInParam"],[this,"flyInParam"])),this.d(D([i,"flyToParam"],[this,"flyToParam"])),this.ad(D([i,"extendBoundary"],[this,"extendBoundary"])),this.d(this.flyInEvent.don(r=>{i.flyIn(r)})),this.d(this.flyToEvent.don(r=>{i.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"mode"],Sn.modes,"模式","in"),new N([this,"targetID"],"目标图层id","")]}}};a(zs,"createDefaultProps",()=>({...vs.createDefaultProps(),mode:"in",targetID:""})),a(zs,"type",zs.register("ESHole",zs,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:`ESHole 是用于表示带有材质和深度的挖坑对象,支持挖坑方向和目标图层设置。
|
|
999
|
+
对象json示例:
|
|
1000
|
+
{
|
|
1001
|
+
"id": "hole_xxx",
|
|
1002
|
+
"type": "ESHole",
|
|
1003
|
+
"name": "挖坑",
|
|
1004
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1005
|
+
"mode": "in"
|
|
1006
|
+
}
|
|
1007
|
+
`}));let Oa=zs;function Ic(n){return n.startsWith("/")&&!n.startsWith("//")}function wr(n){var s;return!n||/^https?:\/\//i.test(n)?n:Ic(n)&&typeof globalThis<"u"&&((s=globalThis.location)!=null&&s.origin)?`${globalThis.location.origin}${n}`:n}function Er(n){var e;return(e=wr(n).match(/^(https?:\/\/[^/]+)/i))==null?void 0:e[1]}function xc(n){var e;return(e=wr(n).match(/^(https?:\/\/[^:]+)/i))==null?void 0:e[1]}function Pi(n){return n==="CesiumlabDesktop"?"/cim":""}function Oc(n){if(/\/cim\/ts\//.test(n))return"CesiumlabDesktop";if(/\/ts\/(?:info|tiles|featuretiles)\//.test(n))return"CIMRTS"}function Dc(n){const s=n.match(/(?:\/cim)?\/ts\/info\/([^?/]+)/);return s==null?void 0:s[1]}function xg(n,s,e){const t=Pi(s);return`${n}${t}/ts/info/${e}`}function Fc(n,s,e,t=Date.now()){const i=Pi(s);return`${n}${i}/ts/tiles/${e}/tileset.json?t=${t}`}function kc(n,s,e,t){const i=Pi(s);return`${n}${i}/ts/featuretiles/${e}/${t}/tileset.json`}const br={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},Mc=async(n,s,e,t,i="CIMRTS")=>{try{const r=globalThis.localStorage.getItem("Authorization"),o=Pi(i);let l=n+`${o}${br.layerconfigfind}?tileServiceName=${s}`;e&&(l+=`&earthdstoken=${encodeURIComponent(t)}`);const h={headers:{...!e&&r?{Authorization:r}:{}},mode:"cors"},u=await(await fetch(l,h)).text();return JSON.parse(u)}catch(r){console.error(r)}},Ac=async(n,s,e,t,i,r="CIMRTS")=>{try{const o=globalThis.localStorage.getItem("Authorization"),l=Pi(r);let h=n+`${l}${br.layerconfigsave}`;const c=i??{};e&&(h+=`?earthdstoken=${encodeURIComponent(t)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&o?{Authorization:o}:{}},mode:"cors",body:JSON.stringify({tileServiceName:s,layerConfig:JSON.stringify(c)})},g=await(await fetch(h,u)).text();return JSON.parse(g)}catch(o){console.error(o)}},jc=async(n,s,e)=>{try{const t=globalThis.localStorage.getItem("Authorization");let i=n;s&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const r={headers:{...!s&&t?{Authorization:t}:{}},mode:"cors"},l=await(await fetch(i,r)).text(),h=JSON.parse(l);if(h.status=="ok")return h.data.port;console.error(h.status);return}catch(t){console.error(t)}},Rc=async(n,s,e,t,i,r="CIMRTS")=>{try{const o={tileServiceName:s,featureId:e},l=globalThis.localStorage.getItem("Authorization"),h=Pi(r);let c=n+`${h}${br.featureproperty}`;t&&(c+=`?earthdstoken=${encodeURIComponent(i)}`);const p=await(await fetch(c,{method:"post",headers:{"Content-Type":"application/json",...!t&&l?{Authorization:l}:{}},body:JSON.stringify(o),mode:"cors"})).text(),g=JSON.parse(p);if(g.status=="ok")return g.data;console.error(g.data.status);return}catch(o){console.error(o)}},Us=class Us extends Ue{constructor(e){super(e);a(this,"_es3DTileset",this.dv(new Ue));a(this,"_ids",this.dv(B([])));a(this,"_platform",this.dv(w("CIMRTS")));a(this,"_visJson",this.disposeVar(w({})));a(this,"_highlightInner3DtilesetEvent",this.dv(new v));a(this,"_removeHighlightInner3DtilesetEvent",this.dv(new v));a(this,"_tilesetServePort",this.dv(w("")));this.collision=!1;{const t=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return}this.url?(this.syncPlatformFromUrl(),this.refresh()):this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{t()})),this.d(this.platformChanged.don(()=>{t()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const t=this._es3DTileset;this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(D([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"actorTag"],[this,"actorTag"])),this.d(_([t,"materialMode"],[this,"materialMode"])),this.d(_([t,"highlight"],[this,"highlight"])),this.d(_([t,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(_([t,"highlightID"],[this,"highlightID"])),this.d(_([t,"highlightColor"],[this,"highlightColor"])),this.d(D([t,"offset"],[this,"offset"])),this.d(D([t,"rotation"],[this,"rotation"])),this.d(_([t,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(_([t,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(_([t,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(_([t,"czmClassificationType"],[this,"czmClassificationType"])),this.d(_([t,"czmStyleJson"],[this,"czmStyleJson"])),this.d(_([t,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(_([t,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(_([t,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(_([t,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(_([t,"colorBlendMode"],[this,"colorBlendMode"])),this.d(_([t,"cacheBytes"],[this,"cacheBytes"])),this.d(_([t,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(_([t,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(_([t,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(_([t,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(_([t,"materialParams"],[this,"materialParams"])),this.d(D([t,"supportEdit"],[this,"supportEdit"])),this.d(D([t,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(D([t,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(D([t,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(D([t,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(D([t,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(D([t,"excavateId"],[this,"excavateId"]))}{const t=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{t.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{t.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{t.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{t.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{t.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{t.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{t.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{t.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{t.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{t.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{t.calcFlyInParam(...i)}))}{const t=this._es3DTileset;this.d(t.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(t.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const t=()=>{this.es3DTileset.show=this.show};t(),this.d(this.showChanged.don(()=>{t()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get platform(){return this._platform.value}get platformChanged(){return this._platform.changed}set platform(e){this._platform.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,t){var i;if((i=this.layerConfig)!=null&&i.length){const r={};r[t[0].value]=t[0].visable,this.visJson={...this.visJson,...r}}else this.setFeatureVisableEvent.emit(e,typeof t=="string"?JSON.parse(t):t,!0)}async getFeatureProperty(e){return await Rc(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken,this.platform)}async getLayerConfig(){const e=await Mc(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,this.platform);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await Ac(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e,this.platform)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,t){var l,h,c;const i=await e.pick(t),r=i.sceneObject;return!r||r.id!==this.id&&r.typeName!="ESRtsFeatureEditing"?void 0:r.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(l=i==null?void 0:i.tilesetPickInfo)==null?void 0:l.id],{featureId:(h=i==null?void 0:i.tilesetPickInfo)==null?void 0:h.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(c=i==null?void 0:i.sceneObject)==null?void 0:c.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await jc(wr(this.url),this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){if(!this.url||typeof this.url!="string")return;const e=+new Date,t=Er(this.url);t&&(this.syncPlatformFromUrl(),this._es3DTileset.offset=[0,0,0],this._es3DTileset.rotation=[0,0,0],this._es3DTileset.url=Fc(t,this.platform,this.tileServiceName,e),console.log("3dtileset url:",this._es3DTileset.url))}syncPlatformFromUrl(){if(typeof this.url!="string"||!this.url)return;const e=Oc(this.url);e&&e!==this.platform&&(this._platform.value=e)}get baseUrl(){if(this.url&&typeof this.url=="string"){const e=Er(this.url);if(!e)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return e}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01")}get tileServiceName(){if(this.url&&typeof this.url=="string"){const e=Dc(this.url);if(!e)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/cim/ts/info/ms01");return e}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/cim/ts/info/ms01")}get tileServiceIp(){if(this.url&&typeof this.url=="string"){const e=xc(this.url);if(!e)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01");return e}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01 或 /ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ie([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};a(Us,"createDefaultProps",()=>({...Ue.createDefaultProps(),layerConfig:te([]),isSameIP:!1,useEarthDSToken:!1,earthdstoken:""})),a(Us,"type",Us.register("ESRtsTileset",Us,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESRtsTileset 是用于加载和管理实时3DTileset图层并提供要素高亮与拾取功能的对象。
|
|
1008
|
+
对象json示例:
|
|
1009
|
+
{
|
|
1010
|
+
"id": "rtstileset_xxx",
|
|
1011
|
+
"type": "ESRtsTileset",
|
|
1012
|
+
"name": "CIMRTS实时3DTileset图层",
|
|
1013
|
+
"url": "http://localhost:9009/ts/info/ts01"
|
|
1014
|
+
}
|
|
1015
|
+
`}));let Da=Us;function Og(n){return typeof n=="number"&&!isNaN(n)}const Bs=class Bs extends Ue{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation,offset:this.offset}}set json(s){this._innerSetJson(s)}async init(s,e){this.featureId=e;const t=await s.getFeatureProperty(e);this.uiShowprops=t.props.map(l=>({featureClassName:l.name,fields:l.props?l.props.map(h=>({key:h.name,type:h.type,value:h.type!="double"?h.value:Og(h.value)?Number(h.value.toFixed(3)):""})):[]})),this.datasetName=t.datasetName,s.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{s.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=typeof s.url=="string"?s.url:"",r=Er(i),o=s.tileServiceName;if(!r)throw new Error("ESRtsFeatureEditing: 无法解析服务地址");this.url=kc(r,s.platform,o,this.featureId),this.allowPicking=!0,this.d(this.pickedEvent.don(l=>{l.assign({sceneObject:s}),s.pickedEvent.emit(l)})),this.d(()=>{this.editing=!1,s.removeHighlightDSFeature(this)})}constructor(s){super(s)}};a(Bs,"createDefaultProps",()=>({...Ue.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:B({}),changeMaterial:te(void 0),uiShowprops:B({}),props:B({})})),a(Bs,"type",Bs.register("ESRtsFeatureEditing",Bs,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESRtsFeatureEditing"}));let Fa=Bs;const Dg=async(n,s,e)=>{try{const t=globalThis.localStorage.getItem("Authorization");let i=n;s&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const r={headers:{...!s&&t?{Authorization:t}:{}},mode:"cors"},l=await(await fetch(i,r)).text(),h=JSON.parse(l);if(h.status=="ok")return h.data.port;console.error(h.status);return}catch(t){console.error(t)}};function Fg(n){return n==="CesiumlabDesktop"?"/osgb":""}function kg(n){if(/\/osgb\/ts\//.test(n))return"CesiumlabDesktop";if(/\/ts\/(?:info|tiles|featuretiles)\//.test(n))return"CIMRTS"}function Nc(n){const s=n.match(/(?:\/osgb)?\/ts\/info\/([^?/]+)/);return s==null?void 0:s[1]}function Mg(n,s,e,t=Date.now()){const i=Fg(e);return`${n}:${s}${i}/tiles/tileset.json?t=${t}`}const Ws=class Ws extends Ue{constructor(e){super(e);a(this,"_es3DTileset",this.dv(new Ue));a(this,"_platform",this.dv(w("CIMRTS")));a(this,"_tilesetServePort",this.dv(w("")));this.collision=!1;{const t=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?(this.syncPlatformFromUrl(),this.refresh()):this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{t()})),this.d(this.platformChanged.don(()=>{t()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const t=this._es3DTileset;this.d(_([t,"allowPicking"],[this,"allowPicking"])),this.d(_([t,"collision"],[this,"collision"])),this.d(D([t,"flyToParam"],[this,"flyToParam"])),this.d(_([t,"actorTag"],[this,"actorTag"])),this.d(_([t,"materialMode"],[this,"materialMode"])),this.d(_([t,"highlight"],[this,"highlight"])),this.d(_([t,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(_([t,"highlightID"],[this,"highlightID"])),this.d(_([t,"highlightColor"],[this,"highlightColor"])),this.d(D([t,"offset"],[this,"offset"])),this.d(D([t,"rotation"],[this,"rotation"])),this.d(_([t,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(_([t,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(_([t,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(_([t,"czmClassificationType"],[this,"czmClassificationType"])),this.d(_([t,"czmStyleJson"],[this,"czmStyleJson"])),this.d(_([t,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(_([t,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(_([t,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(_([t,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(_([t,"colorBlendMode"],[this,"colorBlendMode"])),this.d(_([t,"cacheBytes"],[this,"cacheBytes"])),this.d(_([t,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(_([t,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(_([t,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(_([t,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(_([t,"materialParams"],[this,"materialParams"])),this.d(D([t,"supportEdit"],[this,"supportEdit"])),this.d(D([t,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(D([t,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(D([t,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(D([t,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(D([t,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(D([t,"excavateId"],[this,"excavateId"]))}{const t=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{t.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{t.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{t.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{t.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{t.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{t.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{t.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{t.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{t.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{t.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{t.calcFlyInParam(...i)}))}{const t=this._es3DTileset;this.d(t.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(t.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const t=()=>{this.es3DTileset.show=this.show};t(),this.d(this.showChanged.don(()=>{t()}))}}get es3DTileset(){return this._es3DTileset}get platform(){return this._platform.value}get platformChanged(){return this._platform.changed}set platform(e){this._platform.value=e}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await Dg(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){if(!this.url||typeof this.url!="string"||!Nc(this.url))return;const t=+new Date;this.syncPlatformFromUrl();const i=await this.getport(),r=this.tileServiceIp;this._es3DTileset.offset=[0,0,0],this._es3DTileset.rotation=[0,0,0],this._es3DTileset.url=Mg(r,i,this.platform,t),console.log("3dtileset url:",this._es3DTileset.url)}syncPlatformFromUrl(){if(typeof this.url!="string"||!this.url)return;const e=kg(this.url);e&&e!==this.platform&&(this._platform.value=e)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const t=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!t)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return t}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const t=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!t)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return t}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){if(this.url&&typeof this.url=="string"){const e=Nc(this.url);if(!e)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/osgb/ts/info/ms01");return e}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01 或 http://localhost:9109/osgb/ts/info/ms01")}};a(Ws,"createDefaultProps",()=>({...Ue.createDefaultProps(),isSameIP:!1,useEarthDSToken:!1,earthdstoken:""})),a(Ws,"type",Ws.register("ESMsTileset",Ws,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESMsTileset 是用于加载和操作 Modelser 实时 3D Tiles 图层的对象。
|
|
1016
|
+
对象json示例:
|
|
1017
|
+
{
|
|
1018
|
+
"id": "mstileset_xxx",
|
|
1019
|
+
"type": "ESMsTileset",
|
|
1020
|
+
"name": "实时3DTileset",
|
|
1021
|
+
"url": "http://localhost:9009/ts/info/ms01"
|
|
1022
|
+
}
|
|
1023
|
+
`}));let ka=Ws;const Lc={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
|
|
384
1024
|
## 参数类型为 ESPoiType[]
|
|
385
1025
|
\`\`\`js
|
|
386
1026
|
type Vector2D = [number, number]
|
|
@@ -393,7 +1033,59 @@ ${Qo}
|
|
|
393
1033
|
hiddenDistance: number
|
|
394
1034
|
}
|
|
395
1035
|
\`\`\`
|
|
396
|
-
`},zi=class zi extends Y{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L("通用"),new z([this,"url"],"路径"),new re([this,"poiTypes"],zi.defaults.poiTypes,pl.sampleValue),new v([this,"heightOffset"])]}}};a(zi,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",poiTypes:te(pl.defaultValue),heightOffset:40})),a(zi,"type",zi.register("ESPoiTileset",zi,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let ba=zi;const Rs=class Rs extends k{getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L("通用"),new S([this,"show"],"是否显示"),new j([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new pe([this,"cssPosition"],"位置")]}}};a(Rs,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),a(Rs,"type",Rs.register("ESScale",Rs,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Ea=Rs;const Ot=class Ot extends Q{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new v([this,"height"],"高度",Ot.defaults.height,!0),new v([this,"extrudedHeight"],"拉伸高度",Ot.defaults.extrudedHeight,!0),new S([this,"perPositionHeight"],"应用每个位置高度",Ot.defaults.perPositionHeight,!0)]}}};a(Ot,"createDefaultProps",()=>({...Q.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),a(Ot,"type",Ot.register("ESGeoExtrudedPolygon",Ot,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),a(Ot,"supportEditingModes",[...Q.supportEditingModes,D.HeightModify]);let Si=Ot;const Ui=class Ui extends Q{constructor(e){super(e);a(this,"_classification",this.dv(new Zn));a(this,"_geoExtrudedPolygon",this.dv(new Si));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:t,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(x([i,"flyInParam"],[this,"flyInParam"])),this.d(x([i,"flyToParam"],[this,"flyToParam"])),this.d(x([i,"points"],[this,"points"])),this.d(x([i,"extrudedHeight"],[this,"height"])),this.d(x([t,"fillColor"],[this,"overheightColor"])),this.d(x([i,"fillColor"],[this,"standardColor"]));{const r=()=>{const{height:o,points:h,maxHeight:c}=this;if(!h)return;const l=h.map(u=>[u[0],u[1],o]);t.points=l,t.height=c-o,c-o<=0?t.show=!1:t.show=this.show&&this.filled};r(),this.d(ue([this.heightChanged,this.pointsChanged,this.maxHeightChanged],r))}{const r=()=>{const{show:o,filled:h}=this;t.show=o&&h,i.show=o&&h};r(),this.d(ue([this.showChanged,this.filledChanged],r))}this.d(this.flyInEvent.don(r=>{i.flyIn(r)})),this.d(this.flyToEvent.don(r=>{i.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new v([this,"height"],"高度",10),new v([this,"maxHeight"],"最高高度",200),new G([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new G([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};a(Ui,"createDefaultProps",()=>({...Q.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),a(Ui,"type",Ui.register("ESHeightLimitAnalysis",Ui,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),a(Ui,"supportEditingModes",[...Q.supportEditingModes,D.HeightModify]);let Ca=Ui;const dt=class dt extends Y{constructor(e){super(e);a(this,"_widgetEvent",this.dv(new m));a(this,"_data",this.dv(y(void 0)));{const t=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:ho(this.url)?this.data=JSON.parse(this.url):fetch(k.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};t(),this.d(this.urlChanged.don(t))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new z([this,"url"],"地址",dt.defaults.url),new v([this,"pixelRange"],"集合范围",dt.defaults.pixelRange),new v([this,"minimumClusterSize"],"最小数量",dt.defaults.minimumClusterSize),new j([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","NONE")],more:[...e.more,new z([this,"style"],"style",dt.defaults.style),new S([this,"perspective"],"透视效果",dt.defaults.perspective)]}}};a(dt,"createDefaultProps",()=>({...Y.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:te({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"NONE",perspective:!1})),a(dt,"type",dt.register("ESEntityCluster",dt,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Sa=dt;class fn extends b{constructor(){super();a(this,"_player",this.disposeVar(new tt));const e=this._player;{const t=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};t(),this.d(this.startTimeChanged.don(t)),this.d(this.stopTimeChanged.don(t))}this.d(x([e,"playing"],[this,"playing"])),this.d(x([e,"loop"],[this,"loop"])),this.d(x([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const t=this.currentTime-this.startTime;e.currentTime=kn(t,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(n=>{n.createDefaultProps=()=>({...k.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(fn||(fn={})),Yt(fn.prototype,fn.createDefaultProps);const As=class As extends k{constructor(e){super(e);a(this,"_absolutePlayer",this.dv(new fn));const t=this.absolutePlayer;this.d(x([t,"currentTime"],[this,"currentTime"])),this.d(x([t,"startTime"],[this,"startTime"])),this.d(x([t,"stopTime"],[this,"stopTime"])),this.d(x([t,"playing"],[this,"playing"])),this.d(x([t,"loop"],[this,"loop"])),this.d(x([t,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Ln([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new vt([this,"currentTime"],"currentTime"),new vt([this,"startTime"]),new vt([this,"stopTime"]),new S([this,"playing"]),new S([this,"loop"]),new v([this,"speed"])]}}};a(As,"createDefaultProps",()=>({...k.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),a(As,"type",As.register("ESPlayer",As,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let cs=As;function gl(n,s=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),t=e.length;if(t===0)return e;if(t===1)return(!e[0][2]===void 0||s)&&(e[0][2]=void 0),e;for(let i=1;i<t;++i){if(e[i][2]!==void 0&&!s)continue;const r=e[i-1][1],o=e[i][1],h=it(r),c=it(o),l=d.Vector.distance(h,c);if(l===0){e[i][2]=e[i-1][2];continue}const u=hn(r,o),p=o[2]-r[2],g=Math.asin(p/l)*180/Math.PI,f=Number.isFinite(u)?u:0,w=Number.isFinite(g)?g:0;e[i][2]=[f,w,0]}return(e[0][2]===void 0||s)&&(e[0][2]=t>1?e[1][2]:void 0),e}function fl(n,s=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),t=e.length;if(t===0)return e;if(t===1)return(!e[0][2]===void 0||s)&&(e[0][2]=void 0),e;for(let i=t-2;i>=0;--i){if(e[i][2]!==void 0&&!s)continue;const r=e[i][1],o=e[i+1][1],h=it(r),c=it(o),l=d.Vector.distance(h,c);if(l===0){e[i][2]=e[i+1][2];continue}const u=hn(r,o),p=o[2]-r[2],g=Math.asin(p/l)*180/Math.PI,f=Number.isFinite(u)?u:0,w=Number.isFinite(g)?g:0;e[i][2]=[f,w,0]}return(e[t-1][2]===void 0||s)&&(e[t-1][2]=t>1?e[t-2][2]:[0,0,0]),e}function rg(n,s=!1){const e=gl(n,s),t=fl(n,s);if(e.length!==t.length)throw new Error("p.length !== n.length");const i=e.length;for(let r=0;r<i;r++){const o=e[r][2],h=t[r][2];o===void 0&&h===void 0?e[r][2]=void 0:o===void 0?e[r][2]=h:h===void 0?e[r][2]=o:e[r][2]=co(o,h,.5)}return e}function og(n,s,e){let i;if(!n.timePosRots)return;const r=[],o=n.timePosRots.length;if(!(o<=2)){r.push(n.timePosRots[0]);for(let h=1;h<o-1;++h){const c=n.timePosRots[h-1][0],l=n.timePosRots[h][0],u=n.timePosRots[h+1][0],p=n.accumDistances[h-1],g=n.accumDistances[h],f=n.accumDistances[h+1],w=g-p;if(w!==0){const C=w-(i??(s.length==1?s[0]:s[h-1]||s[s.length-1])*.5);let T=(C<0?0:C)/w;Number.isNaN(T)&&(T=0);const R=(1-T)*c+T*l,V=n.getCurrent(R);V&&r.push([R,V.position,V.rotation])}e&&r.push(n.timePosRots[h]);const E=f-g;if(E!==0){let C=(s.length==1?s[0]:s[h-1]||s[s.length-1])*.5;const T=(s.length==1?s[0]:s[h]||s[s.length-1])*.5||0;C+T>E?(C=E*(C/(C+T)),i=E-C):i=void 0;let R=(C<0?0:C)/E;Number.isNaN(R)&&(R=0);const V=(1-R)*l+R*u,I=n.getCurrent(V);I&&r.push([V,I.position,I.rotation])}}r.push(n.timePosRots[o-1]),n.timePosRots=r}}function ml(n,s){if(s<0)return[void 0,0];if(s>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,s+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const t=s-e;return[n[t][2],t]}function vl(n,s){if(s<0)return[void 0,0];if(s>=n.length)return[void 0,n.length-1];const e=n.slice(s).findIndex(([,,i])=>i!==void 0),t=e===-1?n.length-1:s+e;return[n[t][2],t]}function ag(n,s,e="Lerp"){let t,i,r,o;if(n.length!==0){if(s<=n[0][0])t=n[0][1],i=n[0][2],r=0,o=0;else if(s>=n[n.length-1][0]){const[c,l,u]=n[n.length-1];t=l,i=u,r=n.length-2,o=1}else{const c=n.findIndex(([l])=>s<=l);if(c===-1)throw new Error("nextIndex === -1");r=c-1;{const[l,u]=n[r],[p,g]=n[c],f=(s-l)/(p-l),w=mo(u),E=mo(g),C=d.Vector.lerp(w,E,f);t=uo(C),o=f}{let[l,u]=ml(n,r),[p,g]=vl(n,c);if(e==="Lerp")if(l&&p){if(u<0||g>=n.length)throw new Error("Invalid rotation index");const f=(s-n[u][0])/(n[g][0]-n[u][0]);i=co(l,p,f)}else l?i=l:p?i=p:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&p&&(i=p)}}return{position:t,rotation:i,index:r,ratio:o}}}function hg(n){try{const s=JSON.parse(n);if(Array.isArray(s)&&s.length>0){const e=typeof s[0][0]=="number",t=Array.isArray(s[0][1])&&s[0][1].length===3;return e&&t?s:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),t=[],i=e.length;for(let r=0;r<i;++r){const o=e[r],h=o.split(/[^0-9e\.\+\-]+/).filter(c=>c!=="").map(c=>+c);h.length<4?console.warn(`第${r+1}行数据无法解析成路径的数据, 原内容为: ${o}`):h.length<7?t.push([h[0],[h[1],h[2],h[3]],void 0]):t.push([h[0],[h[1],h[2],h[3]],[h[4],h[5],h[6]]])}return t}}function cg(n,s,e){const{timePosRots:t}=n;if(!t)throw new Error("!timePosRots");if(t.length===0)throw new Error("timePosRots.length === 0");s=Math.max(s,t[0][0]),e=Math.min(e,t[t.length-1][0]);const i=n.getCurrent(s),r=n.getCurrent(e);if(!i||!r)return;const o=[];i.ratio<1&&o.push([s,i.position,i.rotation]);for(let h=i.index+1;h<=r.index;++h)o.push(t[h]);return r.ratio>0&&o.push([e,r.position,r.rotation]),o}const lg=`
|
|
1036
|
+
`},Bi=class Bi extends X{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new k("通用"),new R([this,"url"],"路径"),new ie([this,"poiTypes"],Bi.defaults.poiTypes,Lc.sampleValue),new f([this,"heightOffset"])]}}};a(Bi,"createDefaultProps",()=>({...X.createDefaultProps(),url:"",poiTypes:te(Lc.defaultValue),heightOffset:40})),a(Bi,"type",Bi.register("ESPoiTileset",Bi,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:`ESPoiTileset 是用于管理和渲染三维场景中 POI(兴趣点)瓦片集数据的可视化对象。
|
|
1037
|
+
对象json示例:
|
|
1038
|
+
{
|
|
1039
|
+
"id": "poitileset_xxx",
|
|
1040
|
+
"type": "ESPoiTileset",
|
|
1041
|
+
"name": "POI瓦片集",
|
|
1042
|
+
"url": "http://localhost:9004/tile/model/service/ortwkTiV/tileset.json",
|
|
1043
|
+
"heightOffset": 40
|
|
1044
|
+
}
|
|
1045
|
+
`}));let Ma=Bi;const Hs=class Hs extends M{getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new k("通用"),new E([this,"show"],"是否显示"),new A([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new ne([this,"cssPosition"],"位置")]}}};a(Hs,"createDefaultProps",()=>({...M.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),a(Hs,"type",Hs.register("ESScale",Hs,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESScale 是用于在三维场景中显示比例尺组件以反映对象实际尺寸比例的可视化对象。
|
|
1046
|
+
对象json示例:
|
|
1047
|
+
{
|
|
1048
|
+
"id": "scale_xxx",
|
|
1049
|
+
"type": "ESScale",
|
|
1050
|
+
"name": "比例尺",
|
|
1051
|
+
"screenPosition": "right"
|
|
1052
|
+
}
|
|
1053
|
+
`}));let Aa=Hs;const Ot=class Ot extends ee{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new f([this,"height"],"高度",Ot.defaults.height,!0),new f([this,"extrudedHeight"],"拉伸高度",Ot.defaults.extrudedHeight,!0),new E([this,"perPositionHeight"],"应用每个位置高度",Ot.defaults.perPositionHeight,!0)]}}};a(Ot,"createDefaultProps",()=>({...ee.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),a(Ot,"type",Ot.register("ESGeoExtrudedPolygon",Ot,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoExtrudedPolygon 是用于表示和操作拉升多边形体的对象,通过设置拉伸高度将多边形拉伸为三维体。
|
|
1054
|
+
对象json示例:
|
|
1055
|
+
{
|
|
1056
|
+
"id": "extrudedpolygon_xxx",
|
|
1057
|
+
"type": "ESGeoExtrudedPolygon",
|
|
1058
|
+
"name": "拉升多边形体",
|
|
1059
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1060
|
+
"extrudedHeight": 10
|
|
1061
|
+
}
|
|
1062
|
+
`})),a(Ot,"supportEditingModes",[...ee.supportEditingModes,I.HeightModify]);let Ti=Ot;const Wi=class Wi extends ee{constructor(e){super(e);a(this,"_classification",this.dv(new cr));a(this,"_geoExtrudedPolygon",this.dv(new Ti));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:t,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(_([t,"collision"],[this,"collision"])),this.d(_([i,"collision"],[this,"collision"])),this.d(D([i,"flyInParam"],[this,"flyInParam"])),this.d(D([i,"flyToParam"],[this,"flyToParam"])),this.d(D([i,"points"],[this,"points"])),this.d(D([i,"extrudedHeight"],[this,"height"])),this.d(D([t,"fillColor"],[this,"overheightColor"])),this.d(D([i,"fillColor"],[this,"standardColor"]));{const r=()=>{const{height:o,points:l,maxHeight:h}=this;if(!l)return;const c=l.map(u=>[u[0],u[1],o]);t.points=c,t.height=h-o,h-o<=0?t.show=!1:t.show=this.show&&this.filled};r(),this.d(de([this.heightChanged,this.pointsChanged,this.maxHeightChanged],r))}{const r=()=>{const{show:o,filled:l}=this;t.show=o&&l,i.show=o&&l};r(),this.d(de([this.showChanged,this.filledChanged],r))}this.d(this.flyInEvent.don(r=>{i.flyIn(r)})),this.d(this.flyToEvent.don(r=>{i.flyTo(r)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new f([this,"height"],"高度",10),new f([this,"maxHeight"],"最高高度",200),new G([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new G([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};a(Wi,"createDefaultProps",()=>({...ee.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),a(Wi,"type",Wi.register("ESHeightLimitAnalysis",Wi,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESHeightLimitAnalysis 是用于进行控高分析的对象,分析和展示特定区域的高度限制。
|
|
1063
|
+
对象json示例:
|
|
1064
|
+
{
|
|
1065
|
+
"id": "heightlimitanalysis_xxx",
|
|
1066
|
+
"type": "ESHeightLimitAnalysis",
|
|
1067
|
+
"name": "控高分析",
|
|
1068
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1069
|
+
"maxHeight": 200
|
|
1070
|
+
}
|
|
1071
|
+
`})),a(Wi,"supportEditingModes",[...ee.supportEditingModes,I.HeightModify]);let ja=Wi;const gt=class gt extends X{constructor(e){super(e);a(this,"_widgetEvent",this.dv(new v));a(this,"_data",this.dv(w(void 0)));{const t=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Eo(this.url)?this.data=JSON.parse(this.url):fetch(M.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};t(),this.d(this.urlChanged.don(t))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new R([this,"url"],"地址",gt.defaults.url),new f([this,"pixelRange"],"集合范围",gt.defaults.pixelRange),new f([this,"minimumClusterSize"],"最小数量",gt.defaults.minimumClusterSize),new A([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","NONE")],more:[...e.more,new R([this,"style"],"style",gt.defaults.style),new E([this,"perspective"],"透视效果",gt.defaults.perspective)]}}};a(gt,"createDefaultProps",()=>({...X.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:te({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"NONE",perspective:!1})),a(gt,"type",gt.register("ESEntityCluster",gt,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESEntityCluster 是用于聚合 POI 标注以提高渲染性能的对象。
|
|
1072
|
+
对象json示例:
|
|
1073
|
+
{
|
|
1074
|
+
"id": "entitycluster_xxx",
|
|
1075
|
+
"type": "ESEntityCluster",
|
|
1076
|
+
"name": "Poi聚合",
|
|
1077
|
+
"url": "http://localhost:9004/poi/data.json"
|
|
1078
|
+
}
|
|
1079
|
+
`}));let Ra=gt;class In extends b{constructor(){super();a(this,"_player",this.disposeVar(new Ye));const e=this._player;{const t=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};t(),this.d(this.startTimeChanged.don(t)),this.d(this.stopTimeChanged.don(t))}this.d(D([e,"playing"],[this,"playing"])),this.d(D([e,"loop"],[this,"loop"])),this.d(D([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const t=this.currentTime-this.startTime;e.currentTime=Hn(t,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(n=>{n.createDefaultProps=()=>({...M.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(In||(In={})),Kt(In.prototype,In.createDefaultProps);const $s=class $s extends M{constructor(e){super(e);a(this,"_absolutePlayer",this.dv(new In));const t=this.absolutePlayer;this.d(D([t,"currentTime"],[this,"currentTime"])),this.d(D([t,"startTime"],[this,"startTime"])),this.d(D([t,"stopTime"],[this,"stopTime"])),this.d(D([t,"playing"],[this,"playing"])),this.d(D([t,"loop"],[this,"loop"])),this.d(D([t,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new us([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new Ve([this,"currentTime"],"currentTime"),new Ve([this,"startTime"]),new Ve([this,"stopTime"]),new E([this,"playing"]),new E([this,"loop"]),new f([this,"speed"])]}}};a($s,"createDefaultProps",()=>({...M.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),a($s,"type",$s.register("ESPlayer",$s,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:`ESPlayer 是用于控制场景时间播放、暂停、循环及播放速度的播放器对象。
|
|
1080
|
+
对象json示例:
|
|
1081
|
+
{
|
|
1082
|
+
"id": "player_xxx",
|
|
1083
|
+
"type": "ESPlayer",
|
|
1084
|
+
"name": "播放器",
|
|
1085
|
+
"playing": true,
|
|
1086
|
+
"speed": 1
|
|
1087
|
+
}
|
|
1088
|
+
`}));let _s=$s;function Vc(n,s=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),t=e.length;if(t===0)return e;if(t===1)return(!e[0][2]===void 0||s)&&(e[0][2]=void 0),e;for(let i=1;i<t;++i){if(e[i][2]!==void 0&&!s)continue;const r=e[i-1][1],o=e[i][1],l=rt(r),h=rt(o),c=d.Vector.distance(l,h);if(c===0){e[i][2]=e[i-1][2];continue}const u=En(r,o),p=o[2]-r[2],g=Math.asin(p/c)*180/Math.PI,m=Number.isFinite(u)?u:0,y=Number.isFinite(g)?g:0;e[i][2]=[m,y,0]}return(e[0][2]===void 0||s)&&(e[0][2]=t>1?e[1][2]:void 0),e}function zc(n,s=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),t=e.length;if(t===0)return e;if(t===1)return(!e[0][2]===void 0||s)&&(e[0][2]=void 0),e;for(let i=t-2;i>=0;--i){if(e[i][2]!==void 0&&!s)continue;const r=e[i][1],o=e[i+1][1],l=rt(r),h=rt(o),c=d.Vector.distance(l,h);if(c===0){e[i][2]=e[i+1][2];continue}const u=En(r,o),p=o[2]-r[2],g=Math.asin(p/c)*180/Math.PI,m=Number.isFinite(u)?u:0,y=Number.isFinite(g)?g:0;e[i][2]=[m,y,0]}return(e[t-1][2]===void 0||s)&&(e[t-1][2]=t>1?e[t-2][2]:[0,0,0]),e}function Ag(n,s=!1){const e=Vc(n,s),t=zc(n,s);if(e.length!==t.length)throw new Error("p.length !== n.length");const i=e.length;for(let r=0;r<i;r++){const o=e[r][2],l=t[r][2];o===void 0&&l===void 0?e[r][2]=void 0:o===void 0?e[r][2]=l:l===void 0?e[r][2]=o:e[r][2]=bo(o,l,.5)}return e}function jg(n,s,e){let i;if(!n.timePosRots)return;const r=[],o=n.timePosRots.length;if(!(o<=2)){r.push(n.timePosRots[0]);for(let l=1;l<o-1;++l){const h=n.timePosRots[l-1][0],c=n.timePosRots[l][0],u=n.timePosRots[l+1][0],p=n.accumDistances[l-1],g=n.accumDistances[l],m=n.accumDistances[l+1],y=g-p;if(y!==0){const C=y-(i??(s.length==1?s[0]:s[l-1]||s[s.length-1])*.5);let T=(C<0?0:C)/y;Number.isNaN(T)&&(T=0);const V=(1-T)*h+T*c,z=n.getCurrent(V);z&&r.push([V,z.position,z.rotation])}e&&r.push(n.timePosRots[l]);const S=m-g;if(S!==0){let C=(s.length==1?s[0]:s[l-1]||s[s.length-1])*.5;const T=(s.length==1?s[0]:s[l]||s[s.length-1])*.5||0;C+T>S?(C=S*(C/(C+T)),i=S-C):i=void 0;let V=(C<0?0:C)/S;Number.isNaN(V)&&(V=0);const z=(1-V)*c+V*u,x=n.getCurrent(z);x&&r.push([z,x.position,x.rotation])}}r.push(n.timePosRots[o-1]),n.timePosRots=r}}function Uc(n,s){if(s<0)return[void 0,0];if(s>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,s+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const t=s-e;return[n[t][2],t]}function Bc(n,s){if(s<0)return[void 0,0];if(s>=n.length)return[void 0,n.length-1];const e=n.slice(s).findIndex(([,,i])=>i!==void 0),t=e===-1?n.length-1:s+e;return[n[t][2],t]}function Rg(n,s,e="Lerp"){let t,i,r,o;if(n.length!==0){if(s<=n[0][0])t=n[0][1],i=n[0][2],r=0,o=0;else if(s>=n[n.length-1][0]){const[h,c,u]=n[n.length-1];t=c,i=u,r=n.length-2,o=1}else{const h=n.findIndex(([c])=>s<=c);if(h===-1)throw new Error("nextIndex === -1");r=h-1;{const[c,u]=n[r],[p,g]=n[h],m=(s-c)/(p-c),y=xo(u),S=xo(g),C=d.Vector.lerp(y,S,m);t=Co(C),o=m}{let[c,u]=Uc(n,r),[p,g]=Bc(n,h);if(e==="Lerp")if(c&&p){if(u<0||g>=n.length)throw new Error("Invalid rotation index");const m=(s-n[u][0])/(n[g][0]-n[u][0]);i=bo(c,p,m)}else c?i=c:p?i=p:i=void 0;else e==="Prev"?c&&(i=c):e==="Next"&&p&&(i=p)}}return{position:t,rotation:i,index:r,ratio:o}}}function Ng(n){try{const s=JSON.parse(n);if(Array.isArray(s)&&s.length>0){const e=typeof s[0][0]=="number",t=Array.isArray(s[0][1])&&s[0][1].length===3;return e&&t?s:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),t=[],i=e.length;for(let r=0;r<i;++r){const o=e[r],l=o.split(/[^0-9e\.\+\-]+/).filter(h=>h!=="").map(h=>+h);l.length<4?console.warn(`第${r+1}行数据无法解析成路径的数据, 原内容为: ${o}`):l.length<7?t.push([l[0],[l[1],l[2],l[3]],void 0]):t.push([l[0],[l[1],l[2],l[3]],[l[4],l[5],l[6]]])}return t}}function Lg(n,s,e){const{timePosRots:t}=n;if(!t)throw new Error("!timePosRots");if(t.length===0)throw new Error("timePosRots.length === 0");s=Math.max(s,t[0][0]),e=Math.min(e,t[t.length-1][0]);const i=n.getCurrent(s),r=n.getCurrent(e);if(!i||!r)return;const o=[];i.ratio<1&&o.push([s,i.position,i.rotation]);for(let l=i.index+1;l<=r.index;++l)o.push(t[l]);return r.ratio>0&&o.push([e,r.position,r.rotation]),o}const Vg=`
|
|
397
1089
|
timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
|
|
398
1090
|
\`\`\`
|
|
399
1091
|
[
|
|
@@ -438,7 +1130,43 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
438
1130
|
]
|
|
439
1131
|
]
|
|
440
1132
|
\`\`\`
|
|
441
|
-
`,Fe=class Fe extends b{constructor(e,t){super();a(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});a(this,"_currentInfo",this.disposeVar(y(void 0,(e,t)=>!1)));a(this,"_player");a(this,"_flyToEvent",this.disposeVar(new m));a(this,"_accumDistancesChanged",this.disposeVar(new m));a(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));a(this,"_accumDistancesDirty",!1);a(this,"_accumDistances",[]);a(this,"_getCurrentFunc",this.disposeVar(y(void 0)));this._player=this.disposeVar(new tt);const i=()=>{const r=this.getCurrent(this.currentTime??0);if(r===void 0)this._currentInfo.value=void 0;else{const{index:o,position:h,rotation:c,ratio:l}=r;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=h,this._scratchCurrentInfo.rotation=c,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(x([this._player,"loop"],[this,"loop"]));{const r=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};r(),this.dispose(this.currentTimeChanged.disposableOn(r))}{const r=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};r(),this.dispose(this._player.currentTimeChanged.disposableOn(r))}this.dispose(x([this._player,"duration"],[this,"duration"])),this.dispose(x([this._player,"playing"],[this,"playing"])),this.dispose(x([this._player,"speed"],[this,"speed"]));{const r=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};r();const o=this.disposeVar(ae(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(r))}{const r=()=>{const o=this.timePosRots;if(!o)return;let h=0;const c=o.length;for(let l=0;l<c;++l){const u=o[l][0];if(u<0)console.warn("地理路径的时间戳不能小于0!");else if(u<h){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${u}`);break}}};r(),this.dispose(this.timePosRotsChanged.disposableOn(r))}{const r=this.disposeVar(Ne(async o=>{if(!this.dataUri)return;await o.promise(Zs(1e3));const h=await o.promise(fetch(this.dataUri)),c=await o.promise(h.text());this.timePosRots=Fe.parseData(c)}));this.dispose(this.dataUriChanged.disposableOn(()=>{r.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=Fe.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(!this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)this._accumDistances=[];else{const e=this.timePosRots.length;let t=0;const i=[];let r=it(this.timePosRots[0][1]);i.push(t);for(let o=1;o<e;++o){const h=it(this.timePosRots[o][1]),c=d.Vector.distance(h,r);r=h,t+=c,i.push(t)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&ag(this.timePosRots,e,this.rotLerpMode)}subPath(e,t){return this.timePosRots&&cg(this,e,t)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Fe.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Fe.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Fe.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,t){og(this,e,t)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};a(Fe,"computeRotIfUndefinedUsingPrevLine",gl),a(Fe,"computeRotIfUndefinedUsingNextLine",fl),a(Fe,"computeRotIfUndefinedUsingLerp",rg),a(Fe,"getLeftRotation",ml),a(Fe,"getRightRotation",vl),a(Fe,"parseData",hg),a(Fe,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),a(Fe,"timePosRotsMd",lg);let ei=Fe;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:Xt(void 0,(s,e)=>s[0]===e[0]&&s[1].every((t,i)=>t===e[1][i])&&s[2]===e[2]===void 0||s[2]!==void 0&&e[2]!==void 0&&s[2].every((t,i)=>e[2][i]),s=>[s[0],[...s[1]],s[2]&&[...s[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:F([1,1,1,1]),hasDash:!1,gapColor:F([0,0,0,0]),dashLength:16,dashPattern:255,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(ei||(ei={})),Yt(ei.prototype,ei.createDefaultProps);const Wi=class Wi extends we{constructor(e){super(e);a(this,"_path");a(this,"_currentPositionChanged",this.dv(new m));a(this,"_currentRotationChanged",this.dv(new m));a(this,"_currentChanged",this.dv(new m));a(this,"_deprecated",[]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this._path=this.dv(new ei),this.d(this._path.currentInfoChanged.don(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.d(this._path.currentInfoChanged.don(()=>this._currentRotationChanged.emit(this.currentRotation))),this.d(this._path.currentInfoChanged.don(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const t=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const r=this.timeStamps.length,o=this.points.length,h=Math.min(r,o),c=[];for(let l=0;l<h;++l)c.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=c,this.rotationRadius.some(l=>l>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.dv(ae(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));t(),this.d(i.don(t))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[ns(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new no([this,"timeStamps"],"时间序列",[],!0,void 0,void 0,()=>{if(!(!this.points||this.points.length<2))return Lt(this.points,"GEODESIC")}),new v([this,"speed"],"线条流速",1),new j([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new re([this,"rotationRadius"],"拐弯半径",Wi.defaults.rotationRadius)],more:[...e.more,new ve([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};a(Wi,"createDefaultProps",()=>({...we.createDefaultProps(),timeStamps:ee(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:W({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{arrowColor:[1,1,1,1]},ground:!1}),rotationRadius:[5]})),a(Wi,"type",Wi.register("ESPath",Wi,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let ls=Wi;const Bi=class Bi extends ${constructor(e){super(e);a(this,"_lineString",this.dv(new we));this.components.disposableAdd(this._lineString,!1),this.stroked=!0,this.d(ue([this.pointsChanged,this.resolutionChanged,this.sharpnessChanged],()=>{try{if(this.points&&this.points.length>=2){const t=rs(this.points,this.resolution,this.sharpness);this._lineString.points=t}else this._lineString.points=void 0}catch(t){console.error(t),this._lineString.points=void 0}},{immediate:!0})),this.d(_([this._lineString,"show"],[this,"show"])),this.d(_([this._lineString,"allowPicking"],[this,"allowPicking"])),this.d(_([this._lineString,"collision"],[this,"collision"])),this.d(_([this._lineString,"stroked"],[this,"stroked"])),this.d(_([this._lineString,"strokeStyle"],[this,"strokeStyle"])),this.d(x([this._lineString,"flyInParam"],[this,"flyInParam"])),this.d(x([this._lineString,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(t=>{this._lineString.flyIn(t)})),this.d(this.flyToEvent.don(t=>{this._lineString.flyTo(t)})),this.d(this.calcFlyToParamEvent.don(()=>{this._lineString.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{this._lineString.calcFlyInParam()}))}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new v([this,"resolution"],"解析度",1e3),new v([this,"sharpness"],"锐利度",.85)]}}get lineString(){return this._lineString}};a(Bi,"createDefaultProps",()=>({...$.createDefaultProps(),resolution:1e3,sharpness:.85})),a(Bi,"type",Bi.register("ESGeoBezierSpline",Bi,{chsName:"贝塞尔曲线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"贝塞尔曲线"})),a(Bi,"supportEditingModes",[...$.supportEditingModes,D.LineStringAppend,D.LineStringInsert]);let Pa=Bi;const li=class li extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L,new S([this,"textEditingInteraction"],"文本编辑交互"),new S([this,"textEditing"],"文本编辑"),new v([this,"width"],"宽度",li.defaults.width,!0),new Vn([this,"text"],"内容",li.defaults.text,void 0,!0),new Je([this,"originRatioAndOffset"],"原点比例和偏移"),new v([this,"opacity"],"透明度"),new v([this,"fontSize"],"字体大小"),new G([this,"color"],"字体颜色"),new G([this,"backgroundColor"],"背景颜色"),new Je([this,"padding"],"内边距"),new Je([this,"borderRadius"],"边框圆角"),new G([this,"borderColor"],"边框颜色"),new v([this,"borderWidth"],"边框宽度"),new j([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new j([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};a(li,"createDefaultProps",()=>({...M.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:F([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:F([1,1,1,1]),backgroundColor:F([0,0,0,.8]),padding:F([5,5,5,5]),borderRadius:F([6,6,6,6]),borderWidth:0,borderColor:F([1,1,1,1]),borderStyle:"solid"})),a(li,"type",li.register("ESGeoDivTextPoi",li,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let Ta=li;const Ns=class Ns extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new G([this,"color"],"颜色",[1,1,0,1])]}}};a(Ns,"createDefaultProps",()=>({...M.createDefaultProps(),color:F([1,1,0,1])})),a(Ns,"type",Ns.register("ESCityBasePoint",Ns,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let Ia=Ns;const _l=`(dataSource) => {
|
|
1133
|
+
`,Oe=class Oe extends b{constructor(e,t){super();a(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});a(this,"_currentInfo",this.disposeVar(w(void 0,(e,t)=>!1)));a(this,"_player");a(this,"_flyToEvent",this.disposeVar(new v));a(this,"_accumDistancesChanged",this.disposeVar(new v));a(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));a(this,"_accumDistancesDirty",!1);a(this,"_accumDistances",[]);a(this,"_getCurrentFunc",this.disposeVar(w(void 0)));this._player=this.disposeVar(new Ye);const i=()=>{const r=this.getCurrent(this.currentTime??0);if(r===void 0)this._currentInfo.value=void 0;else{const{index:o,position:l,rotation:h,ratio:c}=r;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=l,this._scratchCurrentInfo.rotation=h,this._scratchCurrentInfo.ratio=c,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(D([this._player,"loop"],[this,"loop"]));{const r=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};r(),this.dispose(this.currentTimeChanged.disposableOn(r))}{const r=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};r(),this.dispose(this._player.currentTimeChanged.disposableOn(r))}this.dispose(D([this._player,"duration"],[this,"duration"])),this.dispose(D([this._player,"playing"],[this,"playing"])),this.dispose(D([this._player,"speed"],[this,"speed"]));{const r=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};r();const o=this.disposeVar(oe(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(r))}{const r=()=>{const o=this.timePosRots;if(!o)return;let l=0;const h=o.length;for(let c=0;c<h;++c){const u=o[c][0];if(u<0)console.warn("地理路径的时间戳不能小于0!");else if(u<l){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${c} time: ${u}`);break}}};r(),this.dispose(this.timePosRotsChanged.disposableOn(r))}{const r=this.disposeVar(Le(async o=>{if(!this.dataUri)return;await o.promise(un(1e3));const l=await o.promise(fetch(this.dataUri)),h=await o.promise(l.text());this.timePosRots=Oe.parseData(h)}));this.dispose(this.dataUriChanged.disposableOn(()=>{r.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=Oe.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(!this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)this._accumDistances=[];else{const e=this.timePosRots.length;let t=0;const i=[];let r=rt(this.timePosRots[0][1]);i.push(t);for(let o=1;o<e;++o){const l=rt(this.timePosRots[o][1]),h=d.Vector.distance(l,r);r=l,t+=h,i.push(t)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&Rg(this.timePosRots,e,this.rotLerpMode)}subPath(e,t){return this.timePosRots&&Lg(this,e,t)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Oe.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Oe.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Oe.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,t){jg(this,e,t)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};a(Oe,"computeRotIfUndefinedUsingPrevLine",Vc),a(Oe,"computeRotIfUndefinedUsingNextLine",zc),a(Oe,"computeRotIfUndefinedUsingLerp",Ag),a(Oe,"getLeftRotation",Uc),a(Oe,"getRightRotation",Bc),a(Oe,"parseData",Ng),a(Oe,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),a(Oe,"timePosRotsMd",Vg);let ii=Oe;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:Xt(void 0,(s,e)=>s[0]===e[0]&&s[1].every((t,i)=>t===e[1][i])&&s[2]===e[2]===void 0||s[2]!==void 0&&e[2]!==void 0&&s[2].every((t,i)=>e[2][i]),s=>[s[0],[...s[1]],s[2]&&[...s[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:F([1,1,1,1]),hasDash:!1,gapColor:F([0,0,0,0]),dashLength:16,dashPattern:255,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(ii||(ii={})),Kt(ii.prototype,ii.createDefaultProps);const Hi=class Hi extends ve{constructor(e){super(e);a(this,"_path");a(this,"_currentPositionChanged",this.dv(new v));a(this,"_currentRotationChanged",this.dv(new v));a(this,"_currentChanged",this.dv(new v));a(this,"_deprecated",[]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this._path=this.dv(new ii),this.d(this._path.currentInfoChanged.don(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.d(this._path.currentInfoChanged.don(()=>this._currentRotationChanged.emit(this.currentRotation))),this.d(this._path.currentInfoChanged.don(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const t=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const r=this.timeStamps.length,o=this.points.length,l=Math.min(r,o),h=[];for(let c=0;c<l;++c)h.push([this.timeStamps[c],this.points[c]]);this._path.timePosRots=h,this.rotationRadius.some(c=>c>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.dv(oe(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));t(),this.d(i.don(t))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[ps(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new vo([this,"timeStamps"],"时间序列",[],!0,void 0,void 0,()=>{if(!(!this.points||this.points.length<2))return Vt(this.points,"GEODESIC")}),new f([this,"speed"],"线条流速",1),new A([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new ie([this,"rotationRadius"],"拐弯半径",Hi.defaults.rotationRadius)],more:[...e.more,new ue([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};a(Hi,"createDefaultProps",()=>({...ve.createDefaultProps(),timeStamps:q(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:B({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{arrowColor:[1,1,1,1]},ground:!1}),rotationRadius:[5]})),a(Hi,"type",Hi.register("ESPath",Hi,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESPath 是用于表示和播放沿路径运动的地理线对象,支持时间序列与流速控制。
|
|
1134
|
+
对象json示例:
|
|
1135
|
+
{
|
|
1136
|
+
"id": "path_xxx",
|
|
1137
|
+
"type": "ESPath",
|
|
1138
|
+
"name": "路径",
|
|
1139
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1140
|
+
"speed": 1
|
|
1141
|
+
}
|
|
1142
|
+
`}));let ys=Hi;const $i=class $i extends U{constructor(e){super(e);a(this,"_lineString",this.dv(new ve));this.components.disposableAdd(this._lineString,!1),this.stroked=!0,this.d(de([this.pointsChanged,this.resolutionChanged,this.sharpnessChanged],()=>{try{if(this.points&&this.points.length>=2){const t=gs(this.points,this.resolution,this.sharpness);this._lineString.points=t}else this._lineString.points=void 0}catch(t){console.error(t),this._lineString.points=void 0}},{immediate:!0})),this.d(_([this._lineString,"show"],[this,"show"])),this.d(_([this._lineString,"allowPicking"],[this,"allowPicking"])),this.d(_([this._lineString,"collision"],[this,"collision"])),this.d(_([this._lineString,"stroked"],[this,"stroked"])),this.d(_([this._lineString,"strokeStyle"],[this,"strokeStyle"])),this.d(D([this._lineString,"flyInParam"],[this,"flyInParam"])),this.d(D([this._lineString,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(t=>{this._lineString.flyIn(t)})),this.d(this.flyToEvent.don(t=>{this._lineString.flyTo(t)})),this.d(this.calcFlyToParamEvent.don(()=>{this._lineString.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{this._lineString.calcFlyInParam()}))}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new f([this,"resolution"],"解析度",1e3),new f([this,"sharpness"],"锐利度",.85)]}}get lineString(){return this._lineString}};a($i,"createDefaultProps",()=>({...U.createDefaultProps(),resolution:1e3,sharpness:.85})),a($i,"type",$i.register("ESGeoBezierSpline",$i,{chsName:"贝塞尔曲线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoBezierSpline 是用于根据控制点生成贝塞尔曲线的地理线对象。
|
|
1143
|
+
对象json示例:
|
|
1144
|
+
{
|
|
1145
|
+
"id": "geobezierspline_xxx",
|
|
1146
|
+
"type": "ESGeoBezierSpline",
|
|
1147
|
+
"name": "贝塞尔曲线",
|
|
1148
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1149
|
+
"resolution": 1000
|
|
1150
|
+
}
|
|
1151
|
+
`})),a($i,"supportEditingModes",[...U.supportEditingModes,I.LineStringAppend,I.LineStringInsert]);let Na=$i;const ui=class ui extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new k,new E([this,"textEditingInteraction"],"文本编辑交互"),new E([this,"textEditing"],"文本编辑"),new f([this,"width"],"宽度",ui.defaults.width,!0),new _n([this,"text"],"内容",ui.defaults.text,void 0,!0),new Fe([this,"originRatioAndOffset"],"原点比例和偏移"),new f([this,"opacity"],"透明度"),new f([this,"fontSize"],"字体大小"),new G([this,"color"],"字体颜色"),new G([this,"backgroundColor"],"背景颜色"),new Fe([this,"padding"],"内边距"),new Fe([this,"borderRadius"],"边框圆角"),new G([this,"borderColor"],"边框颜色"),new f([this,"borderWidth"],"边框宽度"),new A([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new A([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};a(ui,"createDefaultProps",()=>({...j.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:F([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:F([1,1,1,1]),backgroundColor:F([0,0,0,.8]),padding:F([5,5,5,5]),borderRadius:F([6,6,6,6]),borderWidth:0,borderColor:F([1,1,1,1]),borderStyle:"solid"})),a(ui,"type",ui.register("ESGeoDivTextPoi",ui,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoDivTextPoi 是用于在场景中显示带文本标签的地理点对象。
|
|
1152
|
+
对象json示例:
|
|
1153
|
+
{
|
|
1154
|
+
"id": "geodivtextpoi_xxx",
|
|
1155
|
+
"type": "ESGeoDivTextPoi",
|
|
1156
|
+
"name": "图标点",
|
|
1157
|
+
"position": [116.39, 39.9, 0],
|
|
1158
|
+
"text": "请输入文字"
|
|
1159
|
+
}
|
|
1160
|
+
`}));let La=ui;const Gs=class Gs extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new G([this,"color"],"颜色",[1,1,0,1])]}}};a(Gs,"createDefaultProps",()=>({...j.createDefaultProps(),color:F([1,1,0,1])})),a(Gs,"type",Gs.register("ESCityBasePoint",Gs,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:`ESCityBasePoint 是用于在场景中表示城市关键基准点的对象。
|
|
1161
|
+
对象json示例:
|
|
1162
|
+
{
|
|
1163
|
+
"id": "citybasepoint_xxx",
|
|
1164
|
+
"type": "ESCityBasePoint",
|
|
1165
|
+
"name": "城市基点",
|
|
1166
|
+
"position": [116.39, 39.9, 0],
|
|
1167
|
+
"color": [1, 1, 0, 1]
|
|
1168
|
+
}
|
|
1169
|
+
`}));let Va=Gs;const Wc=`(dataSource) => {
|
|
442
1170
|
var entities = dataSource.entities.values;
|
|
443
1171
|
|
|
444
1172
|
for (var i = 0; i < entities.length; i++) {
|
|
@@ -453,49 +1181,667 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
453
1181
|
}
|
|
454
1182
|
}
|
|
455
1183
|
}
|
|
456
|
-
`,
|
|
457
|
-
\`\`\`
|
|
458
|
-
${
|
|
459
|
-
\`\`\`
|
|
460
|
-
|
|
461
|
-
`,Oa=Date.now(),Dt=class Dt extends k{constructor(e){super(e);a(this,"_flyToEvent",this.disposeVar(new m));a(this,"_resetClockEvent",this.disposeVar(new m));this.ad(x([this,"uri"],[this,"url"]))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new z([this,"url"],"路径",k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/misc/simple.czml"),void 0,!0),new S([this,"clockEnabled"],"启用",!1),new v([this,"multiplier"],"倍速",Dt.defaults.multiplier),new S([this,"autoResetClock"],"自动设置时钟",!0),new vt([this,"startTime"],"开始时间",Dt.defaults.startTime,!0),new vt([this,"stopTime"],"结束时间",Dt.defaults.stopTime,!0),new vt([this,"currentTime"],"当前时间",Dt.defaults.currentTime,!0),new j([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new j([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new S([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new S([this,"show"],"是否显示",!0),new S([this,"collision"],"开启碰撞",!1),new S([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new N("飞入",t=>this.flyTo(t),[1e3],"flyTo"),new N("重置时钟",()=>this.resetClock(),[],"resetClock"),new Vt([this,"loadFuncStr"],"loadFnStr",_l,dg,!0)]}}};a(Dt,"createDefaultProps",()=>({show:!0,uri:void 0,url:void 0,allowPicking:!1,autoResetClock:!0,clockEnabled:!1,startTime:Oa,stopTime:Oa+1440*60*1e3,currentTime:Oa,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...k.createDefaultProps()})),a(Dt,"type",Dt.register("ESCzml",Dt,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let Da=Dt;const Vs=class Vs extends k{getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L,new S([this,"show"],"是否显示"),new v([this,"cssSize"],"尺寸"),new pe([this,"cssPosition"],"位置"),new A([this,"imgUrl"],"图片地址")]}}};a(Vs,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),a(Vs,"type",Vs.register("ESNavigator",Vs,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let Fa=Vs;const Ft=class Ft extends k{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L("通用"),new S([this,"show"],"是否显示",Ft.defaults.show),new v([this,"height"],"高度",Ft.defaults.height,!0),new v([this,"fontSize"],"文字大小",Ft.defaults.fontSize,!0),new G([this,"bgColor"],"背景颜色",Ft.defaults.bgColor,!0)]}}};a(Ft,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:F([71/255,71/255,71/255,.8])})),a(Ft,"type",Ft.register("ESViewerStatusBar",Ft,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let xa=Ft;const xt=class xt extends k{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new L("通用"),new S([this,"show"],"是否显示",xt.defaults.show),new v([this,"height"],"高度",xt.defaults.height,!0),new v([this,"fontSize"],"文字大小",xt.defaults.fontSize,!0),new G([this,"bgColor"],"背景颜色",xt.defaults.bgColor,!0)]}}};a(xt,"createDefaultProps",()=>({...k.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:F([71/255,71/255,71/255,.8])})),a(xt,"type",xt.register("ESViewerStatusBarScale",xt,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let ka=xt;const Ls=class Ls extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new A([this,"url"],"路径","",!0),new v([this,"progress"],"进度",0,!1,!0)]}}};a(Ls,"createDefaultProps",()=>({...M.createDefaultProps(),url:"",progress:0})),a(Ls,"type",Ls.register("ESGaussianSplatting",Ls,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let Ma=Ls;class ug extends b{constructor(s,e){if(super(),!e)return;const t=this.ad(new Q);t.stroked=!0,this.ad(s.components.disposableAdd(t)),this.ad(x([t,"points"],[s,"areaLiftingPoints"])),this.ad(t.editingChanged.don(()=>{t.editing||!this.isDestroyed()&&this.destroy()})),t.editing=!0}}var wl=(n=>(n[n.None=0]="None",n[n.Up=1]="Up",n[n.Down=2]="Down",n))(wl||{}),yl=(n=>(n[n.CLICK=0]="CLICK",n[n.MOVE=1]="MOVE",n))(yl||{}),bl=(n=>(n[n.Smooth=0]="Smooth",n[n.Linear=1]="Linear",n[n.Spherical=2]="Spherical",n[n.Tip=3]="Tip",n[n.Hard=4]="Hard",n))(bl||{});const _e=class _e extends M{constructor(e){super(e);a(this,"_startEvent",this.disposeVar(new m));a(this,"_configs",this.disposeVar(ee(void 0)));a(this,"_heights",this.disposeVar(y({})));a(this,"_heightsEvent",this.ad(new m));a(this,"_areaLiftingUpdateEvent",this.disposeVar(new m));const t=this.ad(ae(this.modeChanged,this.startEvent));this.ad(new ce(t,()=>{var i;if(this.areaLiftingPoints=void 0,this.mode=="areaLifting")return new ug(this,this.activeViewer);(i=this.activeViewer)==null||i.startEditing(this,D.BrushErase)}))}updateEditing(){var e;$n(this.position,[0,0,0])||(this.position=[0,0,0]),(e=this.activeViewer)==null||e.startEditing(this,D.Place,{callSource:"inner"})}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get configs(){return this._configs.value}set configs(e){this._configs.value=e}get configsChanged(){return this._configs.changed}getConfig(...e){var t,i;if(typeof e[0]=="number")return(t=this.configs)==null?void 0:t.find(r=>r.x===e[0]&&r.y===e[1]);if(typeof e[0]=="string")return(i=this.configs)==null?void 0:i.find(r=>r.url===e[0])}get heights(){return this._heights.value}set heights(e){this._heights.value=e}get heightsChanged(){return this._heights.changed}get heightsEvent(){return this._heightsEvent}getHeights(){return new Promise((e,t)=>{const i=new b;i.ad(this._heightsEvent.don(o=>{o!=="start"&&(!i.isDestroyed()&&i.destroy(),e(o))})),this._heightsEvent.emit("start");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get areaLiftingUpdateEvent(){return this._areaLiftingUpdateEvent}areaLiftingUpdate(){this._areaLiftingUpdateEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new N("开始编辑",()=>{this.start()},[],"start"),new j([this,"mode"],_e.modes,"编辑模式",_e.defaults.mode)],basic:[...e.basic,new z([this,"url"],"URL"),new z([this,"tileInfo"],"瓦片信息配置"),new v([this,"maxHeight"],"最大高度"),new v([this,"minHeight"],"最小高度"),new v([this,"offset"],"偏移"),new S([this,"autoLoadHeights"],"自动加载高度"),new L("刷写设置"),new v([this,"brushEraseRadius"],"编辑半径"),new pe([this,"brushEraseRadiusRange"],"编辑半径范围",void 0,!0,!0),new j([this,"brushEraseMode"],Object.entries(["CTRL","SHIFT","NONE"]),"刷写模式"),new j([this,"brushErasePickReference"],_e.brushErasePickReferences,"选择参考"),new _t([this,"brushErasePosition"],"刷写位置"),new _t([this,"brushEraseStartPosition"],"刷写起始位置"),new j([this,"brushEraseFalloff"],_e.brushEarseFalloffs,"刷写衰减函数"),new j([this,"brushEraseRayDirection"],[["Up","Up"],["Down","Down"]],"刷写射线方向"),new L("平整设置"),new j([this,"flattenMode"],_e.flattenModes,"平整模式",0),new j([this,"flattenPick"],_e.flattenPicks,"平整选择",0),new v([this,"flattenOffset"],"平整偏移",-.01),new L("区域升降设置"),new re([this,"areaLiftingPoints"],"区域升降位置",[]),new v([this,"areaLiftingOffset"],"区域升降偏移",1),new N("区域升降更新",()=>{this.areaLiftingUpdate()},[],"areaLiftingUpdate"),new L("围栏设置"),new re([this,"fencePoints"],"围栏位置",[])]}}};a(_e,"createDefaultProps",()=>({...M.createDefaultProps(),allowPicking:!0,url:"",maxHeight:0,minHeight:0,offset:.01,tileInfo:W({tileCountX:65,tileCountY:65,tileMaximumLevel:15,tilesPerAxis:5,format:"heights"}),mode:y("sculpt"),autoLoadHeights:!1,brushEraseRadius:100,brushEraseRadiusRange:F([0,100]),brushErasePosition:F([0,0,0]),brushEraseStartPosition:F([0,0,0]),brushEraseMode:y("NONE"),brushErasePickReference:y("NONE"),brushEraseRayDirection:y("Down"),brushEraseFalloff:y(4),flattenMode:y(0),flattenPick:y(1),flattenOffset:-.01,areaLiftingPoints:fi(void 0),areaLiftingOffset:1,fencePoints:fi(void 0),fenceMode:y("in")})),a(_e,"modes",[["雕刻","sculpt"],["抹除","erase"],["平滑","smooth"],["平整","flatten"],["区域升降","areaLifting"]]),a(_e,"brushErasePickReferences",[["无限制","NONE"],["地形图层","ESTerrainLayerEditing"],["3DTiles","ES3DTileset"]]),a(_e,"flattenModes",[["None",0],["Up",1],["Down",2]]),a(_e,"flattenPicks",[["CLICK",0],["MOVE",1]]),a(_e,"brushEarseFalloffs",[["平滑",0],["线性",1],["硬边",4],["球形",2],["尖顶",3]]),a(_e,"invalidValue",-1e4),a(_e,"type",_e.register("ESTerrainLayerEditing",_e,{chsName:"地形图层编辑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于对地形数据进行编辑"})),a(_e,"supportEditingModes",[...M.supportEditingModes,D.Place,D.BrushErase]);let mn=_e;const $e=class $e extends ${constructor(e){super(e);a(this,"editingBindMode","doublePoints");a(this,"_startEvent",this.disposeVar(new m));a(this,"_replayEvent",this.disposeVar(new m));this.ad(this.startEvent.don(()=>{var t;(t=this.activeViewer)==null||t.startEditing(this,D.BrushErase)}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get replayEvent(){return this._replayEvent}replay(){this._replayEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N("开始编辑",()=>this.start(),[]),new N("重播",()=>this.replay(),[]),new S([this,"showImage"],"显示影像",$e.defaults.showImage),new v([this,"flowSpeed"],"流动速度",$e.defaults.flowSpeed),new v([this,"gravity"],"重力加速度",$e.defaults.gravity),new v([this,"strength"],"泥石流强度",$e.defaults.strength),new v([this,"resistance"],"泥石流阻力(越大越快平息)",$e.defaults.resistance),new v([this,"terrainOffset"],"地形高度偏移",$e.defaults.terrainOffset),new re([this,"slidePoints"],"滑坡点数组",$.defaults.slidePoints,void 0),new L("刷写设置"),new v([this,"brushEraseRadius"],"编辑半径"),new pe([this,"brushEraseRadiusRange"],"编辑半径范围",void 0,!0,!0),new j([this,"brushEraseMode"],Object.entries(["CTRL","SHIFT","NONE"]),"刷写模式"),new j([this,"brushErasePickReference"],mn.brushErasePickReferences,"选择参考"),new _t([this,"brushErasePosition"],"刷写位置"),new _t([this,"brushEraseStartPosition"],"刷写起始位置"),new j([this,"brushEraseFalloff"],mn.brushEarseFalloffs,"刷写衰减函数"),new j([this,"brushEraseRayDirection"],[["Up","Up"],["Down","Down"]],"刷写射线方向")]}}};a($e,"createDefaultProps",()=>({...$.createDefaultProps(),brushEraseRadius:100,brushEraseRadiusRange:F([0,1e3]),brushErasePosition:F([0,0,0]),brushEraseStartPosition:F([0,0,0]),brushEraseMode:y("NONE"),brushErasePickReference:y("NONE"),brushEraseRayDirection:y("Down"),terrainOffset:5,flowSpeed:1,gravity:9.8,slidePoints:F([]),strength:1,showImage:!0,resistance:.98,stroked:!0,strokeStyle:W({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!0})})),a($e,"type",$e.register("ESLandSlide",$e,{chsName:"滑坡泥石流分析",tags:["ESObjects","_ES_Impl_Cesium"],description:"滑坡泥石流分析对象"})),a($e,"supportEditingModes",[...$.supportEditingModes,D.DoublePoints,D.DoublePointsAppend,D.DoublePointsModify,D.BrushErase]);let ja=$e;const Hi=class Hi extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new A([this,"mesh"],"mesh地址",Hi.defaults.mesh)]}}};a(Hi,"createDefaultProps",()=>({...M.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),a(Hi,"type",Hi.register("ESStaticMesh",Hi,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let Ra=Hi;const zs=class zs extends ${constructor(e){super(e);a(this,"_startEvent",this.dv(new m));a(this,"_clearEvent",this.dv(new m));a(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Si),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(_([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(_([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(_([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(_([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(_([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(_([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N("开始分析",()=>this.start(),[],"start"),new N("清除分析",()=>this.clear(),[],"clear"),new re([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new re([this,"depths"],"深度值",[],void 0,!1,!0),new v([this,"radius"],"半径",1e4,!0)]}}};a(zs,"createDefaultProps",()=>({...$.createDefaultProps(),windowPositions:vo([]),depths:ee([]),radius:y(1e4)})),a(zs,"type",zs.register("ESSkylineAnalysis",zs,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let Aa=zs;const $t=class $t extends Y{constructor(s){super(s)}getESProperties(){const s=super.getESProperties();return{...s,basic:[...s.basic,new re([this,"data"],"数据",[],void 0,!0),new z([this,"gradient"],"渐变",$t.defaults.gradient,void 0,!0),new v([this,"radius"],"半径",$t.defaults.radius,void 0,!0),new v([this,"blur"],"模糊",$t.defaults.blur,!0),new S([this,"is3D"],"is3D",!1,!0)]}}};a($t,"createDefaultProps",()=>({...Y.createDefaultProps(),is3D:y(!1),data:fi([]),gradient:te({".5":"green",".7":"yellow",".95":"red"}),radius:y(10),blur:y(.85)})),a($t,"type",$t.register("ESHeatMap",$t,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let dr=$t;const $i=class $i extends ${constructor(e){super(e);a(this,"editingBindMode","scatter")}};a($i,"createDefaultProps",()=>({...$.createDefaultProps(),pointed:!0})),a($i,"type",$i.register("ESGeoPoints",$i,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),a($i,"supportEditingModes",[...$.supportEditingModes,D.ScatterAppend,D.ScatterModify]);let vn=$i;const El=async(n,s=[],e)=>{const t=[];for(const i of s){const{coordinates:r}=i.geometry;for(const o of r){const h=await Promise.all(o.map(async c=>{let l=c[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const u=await n.getTerrainHeight([c[0],c[1]])??0;l=(e.height??l)+u}else e.type==="terrain"&&(l=await n.getTerrainHeight([c[0],c[1]])??0);return[c[0],c[1],l]}));t.push({...i,points:h})}}return t},Cl=async(n,s=[],e)=>await Promise.all(s.map(async t=>{var c,l,u,p,g,f,w,E,C;const i=((c=t.geometry)==null?void 0:c.x)??((u=(l=t.geometry)==null?void 0:l.coordinates)==null?void 0:u[0]),r=((p=t.geometry)==null?void 0:p.y)??((f=(g=t.geometry)==null?void 0:g.coordinates)==null?void 0:f[1]);let h=((w=t.geometry)==null?void 0:w.z)??((C=(E=t.geometry)==null?void 0:E.coordinates)==null?void 0:C[2])??0;if(e)if(e.type==="absolute")h=e.height??h;else if(e.type==="relative"){const T=await n.getTerrainHeight([i,r])??0;h=(e.height??h)+T}else e.type==="terrain"&&(h=await n.getTerrainHeight([i,r])??0);return{...t,points:[i,r,h]}})),Sl=async(n,s=[],e)=>{const t=[];return await Promise.all(s.map(async i=>{const{coordinates:r}=i.geometry;await Promise.all(r.map(async o=>{const h=await Promise.all(o.map(async c=>{let l=c[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const u=await n.getTerrainHeight([c[0],c[1]])??0;l=(e.height??l)+u}else e.type==="terrain"&&(l=await n.getTerrainHeight([c[0],c[1]])??0);return[c[0],c[1],l]}));t.push({...i,points:h})}))})),t};function pg(n){const s=X.lineString(n),e=X.length(s),t=X.along(s,e/2);return[t.geometry.coordinates[0],t.geometry.coordinates[1],t.geometry.coordinates[2]||0]}function gg(n,s){const e=X.lineString(n),t=X.length(e),i=Math.floor(t/s),r=[];if(r.push(n[0]),i<1)return[n[0]];for(let o=1;o<i;o+=1){const h=X.along(e,t*(o/i));r.push([h.geometry.coordinates[0],h.geometry.coordinates[1],h.geometry.coordinates[2]||0])}return r}function fg(n){const s=[...n];JSON.stringify(n[0])!==JSON.stringify(n[n.length-1])&&s.push(n[0]);const e=X.polygon([s]),t=X.center(e);return[t.geometry.coordinates[0],t.geometry.coordinates[1],t.geometry.coordinates[2]||0]}function Pl(n,s,e){const t=n.dv(new as);for(const i in e)i!=="type"&&(t[i]=e[i]);t.position=s,n.d(n.components.disposableAdd(t))}function Na(n,s,e,t){let i=t.textTemplate||t.symbol.text||"";const r=/{{(.*?)}}/;for(;r.test(i);){const u=i.match(r);if(u){const p=u[1].trim(),g=e[`${p}`]||"-";i=i.replace(u[0],g)}}let o=t.symbol;const{minVisibleDistance:h,maxVisibleDistance:c}=t;h&&c&&(o={...o,minVisibleDistance:h,maxVisibleDistance:c});const l={...o,text:i};Pl(n,s,l)}function ds(n,s){const e={width:null,height:null,color:null,opacity:null,rotation:null};return s.forEach(t=>{t.type==="size"?t.axis==="width"?e.width=n[t.field]||null:t.axis==="height"&&(e.height=n[t.field]||null):t.type==="color"?e.color=n[t.field]||null:t.type==="opacity"?e.opacity=n[t.field]||null:t.type==="rotation"&&(e.rotation=n[t.field]||null)}),e}function Va(n,s,e){const i={...s.symbol};if(e&&e.length>0){const r=ds(n,e);for(let o in r)i[o]!==void 0&&r[o]!==null&&(i[o]=r[o])}return i}function La(n,s,e){var l,u;const t=s,{uniqueValueInfos:i,field:r,fieldDelimiter:o,defaultSymbol:h}=t;let c={...h};if(Array.isArray(r)){const g=r.map(f=>n[f]??"").join(o);c=((l=i.find(f=>f.value==g))==null?void 0:l.symbol)||h}else c=((u=i.find(p=>p.value==n[r]))==null?void 0:u.symbol)||h;if(e&&e.length>0){const p=ds(n,e);for(let g in p)c[g]!==void 0&&p[g]!==null&&(c[g]=p[g])}return c}function za(n,s,e){const t=s,{classBreakInfos:i,field:r,defaultSymbol:o}=t;let h=o;const c=n[r];if(c===void 0||typeof c!="number")h=o;else{const l=i.find(u=>c<=u.maxValue&&c>=u.minValue);l?h=l.symbol:h=o}if(e&&e.length>0){const l=ds(n,e);for(let u in l)h[u]!==void 0&&l[u]!==null&&(h[u]=l[u])}return h}function mg(n,s){function e(l,u,p,g){const f=H=>H*Math.PI/180,w=H=>H*180/Math.PI,E=f(l),C=f(p),T=f(g-u),R=Math.sin(T)*Math.cos(C),V=Math.cos(E)*Math.sin(C)-Math.sin(E)*Math.cos(C)*Math.cos(T),I=Math.atan2(R,V);return(w(I)+360)%360}function t(l,u,p,g,f){const E=Z=>Z*Math.PI/180,C=Z=>Z*180/Math.PI,T=g/6371e3,R=E(f),V=E(l),I=E(u),H=Math.asin(Math.sin(V)*Math.cos(T)+Math.cos(V)*Math.sin(T)*Math.cos(R)),q=I+Math.atan2(Math.sin(R)*Math.sin(T)*Math.cos(V),Math.cos(T)-Math.sin(V)*Math.sin(H));return{lat:C(H),lng:C(q),alt:p}}function i(l){const u=[];l.length>1&&u.push(e(l[0].lat,l[0].lng,l[1].lat,l[1].lng));for(let p=1;p<l.length-1;p++){const g=e(l[p-1].lat,l[p-1].lng,l[p].lat,l[p].lng),f=e(l[p].lat,l[p].lng,l[p+1].lat,l[p+1].lng);let w=(g+f)/2;Math.abs(g-f)>180&&(w=(w+180)%360),u.push(w)}return l.length>1&&u.push(e(l[l.length-2].lat,l[l.length-2].lng,l[l.length-1].lat,l[l.length-1].lng)),l.length===1&&u.push(0),u}if(!n||n.length<2)throw new Error("至少需要两个点才能生成路径");if(s<=0)throw new Error("宽度必须大于0");const r=s/2,o=i(n),h=[],c=[];for(let l=0;l<n.length;l++){const u=(o[l]+90)%360,p=(o[l]+270)%360,g=n[l].alt!==void 0?n[l].alt:0;h.push(t(n[l].lat,n[l].lng,g,r,u)),c.push(t(n[l].lat,n[l].lng,g,r,p))}return h.concat(c.reverse())}function vg(n,s,e,t){function i(E){return E*(Math.PI/180)}const r=6378137,o=i(n),h=i(s),c=i(e),l=i(t),u=c-o,p=l-h,g=Math.sin(u/2)**2+Math.cos(o)*Math.cos(c)*Math.sin(p/2)**2,f=2*Math.atan2(Math.sqrt(g),Math.sqrt(1-g));return r*f}const Tl=(n,s,e)=>Array.isArray(s)?s.map(r=>n[r]??"").join(e):n[s]??"";function Il(n,s){const t={...s.symbol};return{points:n.map(i=>i.points),symbol:t}}function Ol(n,s){const e=s,{uniqueValueInfos:t,field:i,fieldDelimiter:r,defaultSymbol:o}=e,h=[],c=t.reduce((u,p)=>{const g=p.value.toString();return u[g]={points:[],value:p.value,symbol:p.symbol},u},{});for(let u=0;u<n.length;u++){const p=n[u],g=Tl(p,i,r);if(g!==void 0&&g!==""){const f=c[g.toString()];f?f.points.push(p.points):h.push(p.points)}else h.push(p.points)}const l=[];for(let u in c){const{points:p,symbol:g}=c[u];p.length>0&&l.push({points:p,symbol:g})}return h.length>0&&l.push({points:h,symbol:o}),l}function Dl(n,s){const e=s,{classBreakInfos:t,field:i,defaultSymbol:r}=e,o=[],h=t.map(l=>({...l,points:[]}));for(let l=0;l<n.length;l++){const u=n[l],p=u[i];if(p===void 0||typeof p!="number")o.push(u.points);else{const g=h.findIndex(f=>p<=f.maxValue&&p>=f.minValue);g!==-1?h[g].points.push(u.points):o.push(u.points)}}const c=[];return h.forEach(l=>{l.points.length>0&&c.push({points:l.points,symbol:l.symbol})}),o.length>0&&c.push({points:o,symbol:r}),c}function _g(n,s,e=[]){const i={...s.symbol},r=n.map(o=>{const h=ds(o,e);return{position:o.points,rotation:h.rotation||i.rotation||[0,0,0],scale:i.scale||[1,1,1]}});return{url:i.url,locations:r}}function wg(n,s,e=[]){const t=s,{uniqueValueInfos:i,field:r,fieldDelimiter:o}=t,h=t.defaultSymbol,c=[],l=i.reduce((p,g)=>{const f=g.value.toString();return p[f]={locations:[],value:g.value,symbol:g.symbol},p},{});for(let p=0;p<n.length;p++){const g=n[p],f=Tl(g,r,o);if(f){const w=l[f.toString()];if(w){const E=ds(g,e);w.locations.push({position:g.points,rotation:E.rotation||h.rotation||[0,0,0],scale:h.scale||[1,1,1]})}else c.push({position:g.points,rotation:h.rotation||[0,0,0],scale:h.scale||[1,1,1]})}else c.push({position:g.points,rotation:h.rotation||[0,0,0],scale:h.scale||[1,1,1]})}const u=[];for(let p in l){const{locations:g,symbol:f}=l[p];g.length>0&&u.push({url:f.url,locations:g})}return c.length>0&&u.push({url:h.url,locations:c}),u}function yg(n,s,e=[]){const t=s,{classBreakInfos:i,field:r}=t,o=t.defaultSymbol,h=[],c=i.map(u=>({...u,locations:[]}));for(let u=0;u<n.length;u++){const p=n[u],g=p[r];if(g===void 0||typeof g!="number")h.push({position:p.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const f=c.findIndex(w=>g<=w.maxValue&&g>=w.minValue);if(f!==-1){const w=ds(p,e);c[f].locations.push({position:p.points,rotation:w.rotation||o.rotation||[0,0,0],scale:c[f].symbol.scale||[1,1,1]})}else h.push({position:p.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const l=[];return c.forEach(u=>{u.locations.length>0&&l.push({url:u.symbol.url,locations:u.locations})}),h.length>0&&l.push({url:o.url,locations:h}),l}class bg extends b{constructor(e,t,i,r){super();a(this,"labelingInfo");this.sceneObject=e;const o=t;if(r&&ft(o,h=>{this.renderLabel(h,r)}),i)if(i.type==="simple"){const{visualVariables:h}=i;if(i.symbol.type==="simple-point"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染!");const c=Il(o,i);this._simplePointAllRender(c.points,c.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染成图标!");const c=Il(o,i);this._imageAllRender(c.points,c.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:c,locations:l}=_g(o,i,h);this._modelAllRender(c,l);return}for(let c=0;c<o.length;c++){const l=Va(o[c],i,h);this.render(o[c],l)}}else if(i.type==="unique-value"){const{visualVariables:h}=i;if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染!"),Ol(o,i).forEach(({points:g,symbol:f})=>{this._simplePointAllRender(g,f)});return}if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染成图标!"),Ol(o,i).forEach(({points:g,symbol:f})=>{this._imageAllRender(g,f)});return}if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),wg(o,i,h).forEach(({url:g,locations:f})=>{this._modelAllRender(g,f)});return}for(let p=0;p<o.length;p++){const g=La(o[p],i,h);this.render(o[p],g)}}else if(i.type==="class-breaks"){const{visualVariables:h}=i;if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染!"),Dl(o,i).forEach(({points:g,symbol:f})=>{this._simplePointAllRender(g,f)});return}if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!h||h.length==0)){console.log("PointLayer:大批量点渲染成图标!"),Dl(o,i).forEach(({points:g,symbol:f})=>{this._imageAllRender(g,f)});return}if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),yg(o,i,h).forEach(({url:g,locations:f})=>{this._modelAllRender(g,f)});return}for(let p=0;p<o.length;p++){const g=za(o[p],i,h);this.render(o[p],g)}}else if(i.type==="heatmap"){const{field:h,fieldValueMax:c,fieldValueMin:l}=i;console.time();const u=o.map(p=>{const{points:g}=p;if(h&&typeof h=="string"){let f=p[h];typeof f=="number"&&(typeof c=="number"&&f>c&&(f=c),typeof l=="number"&&f<l&&(f=l),g[2]=f)}return g});this.renderHeatmap(u,i)}else console.error("PointLayer: renderer type is not supported")}renderLabel(e,t){const{points:i}=e;Na(this.sceneObject,i,e,t)}renderHeatmap(e,t){const{is3D:i,radius:r,blur:o,gradient:h}=t,c=this.dv(new dr);this.d(this.sceneObject.components.disposableAdd(c)),c.is3D=i,c.radius=r,c.blur=o,h&&(c.gradient={...h}),c.data=e}render(e,t){t.type==="simple-point"?this._simplePointRender(e,t):t.type==="ESImageLabel"?this._simpleImageRender(e,t):t.type==="ESGltfModel"?this._simpleModelRender(e,t):t.type==="ESTextLabel"?Pl(this.sceneObject,e.points,t):t.type==="ESParticleSystemPrimitive"?this._simpleParticleRender(e,t):console.error(" PointLayer: symbol type is not supported")}_simplePointRender(e,t){const{points:i}=e,{size:r,color:o,outlineColor:h,outlineWidth:c}=t,l=this.dv(new vn);this.d(this.sceneObject.components.disposableAdd(l)),l.pointed=!0,l.pointOutlineColor=h,l.pointOutlineWidth=c,l.pointSize=r,l.pointColor=o,l.allowPicking=(t==null?void 0:t.allowPicking)??!0,l.extras={selected:!1},l.points=[i]}_simplePointAllRender(e,t){const{size:i,color:r,outlineColor:o,outlineWidth:h}=t,c=this.dv(new vn);this.d(this.sceneObject.components.disposableAdd(c)),c.pointed=!0,c.pointOutlineColor=o,c.pointOutlineWidth=h,c.pointSize=i,c.pointColor=r,c.allowPicking=(t==null?void 0:t.allowPicking)??!0,c.points=[...e]}_simpleImageRender(e,t){const{points:i}=e,{rotation:r,offset:o,size:h,url:c,screenRender:l,anchor:u,renderMode:p,rotationType:g}=t,f=this.dv(new tr),w=this.dv(new as);this.d(this.sceneObject.components.disposableAdd(f)),this.d(this.sceneObject.components.disposableAdd(w)),f.url=c,f.renderMode=p??0,r&&(f.rotation=r),o&&(f.offset=o),f.size=h||[32,32],u&&(f.anchor=u),g&&(f.rotationType=g),f.screenRender=l??!0,f.allowPicking=(t==null?void 0:t.allowPicking)??!0,f.extras={selected:!1},f.position=[...i],f.sizeByContent=!1,w.allowPicking=(t==null?void 0:t.allowPicking)??!0;const E=h?Math.max(...h)+10:Math.max(...f.size)+10;w.sizeByContent=!1,w.screenRender=!0,w.size=[E,E],w.borderRadius=[E,E,E,E],w.padding=[E/2,E/2,E/2,E/2],w.borderWidth=E/10,w.offset=[0,E/10+5],w.text="",w.backgroundColor=[0,0,0,0],w.borderColor=[0,0,0,0]}_imageAllRender(e,t){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e}}]},r=this.dv(new pn);this.d(this.sceneObject.components.disposableAdd(r));const o=this.dv(new as);this.d(this.sceneObject.components.disposableAdd(o)),r.textDefaultText="";const{offset:h,size:c,url:l,anchor:u}=t;r.imageUrl=l,u&&(r.imageAnchor=u),h&&(r.imageOffset=h),r.imageSize=c||[32,32],r.url=i,r.allowPicking=(t==null?void 0:t.allowPicking)??!0,r.extras={selected:!1},o.allowPicking=!0;const p=c?Math.max(...c)+10:Math.max(...r.imageSize)+10;o.sizeByContent=!1,o.size=[p,p],o.borderRadius=[p,p,p,p],o.padding=[p/2,p/2,p/2,p/2],o.borderWidth=p/10,o.offset=[0,p/10+5],o.text="",o.backgroundColor=[0,0,0,0],o.borderColor=[0,0,0,0]}_simpleModelRender(e,t){const{points:i}=e,{rotation:r,scale:o,url:h}=t,c=this.dv(new yt);this.d(this.sceneObject.components.disposableAdd(c)),c.url=h,r&&(c.rotation=r),o&&(c.scale=o),c.position=[...i]}_modelAllRender(e,t){const i=this.dv(new yt);this.d(this.sceneObject.components.disposableAdd(i)),i.url=e,i.instances=t}_simpleParticleRender(e,t){const{points:i}=e,r=this.dv(new ir);this.d(this.sceneObject.components.disposableAdd(r)),r.position=[...i],Object.keys(t).forEach(o=>{r[o]=t[o]})}}class Eg extends b{constructor(s,e,t,i){super(),this.sceneObject=s;const r=e;if(i&&ft(r,o=>{this.renderLabel(o,i)}),t)if(t.type==="simple"){const{visualVariables:o}=t;ft(r,h=>{const c=Va(h,t,o);this.render(h,c)})}else if(t.type==="unique-value"){const{visualVariables:o}=t;ft(r,h=>{const c=La(h,t,o);this.render(h,c)})}else if(t.type==="class-breaks"){const{visualVariables:o}=t;ft(r,h=>{const c=za(h,t,o);this.render(h,c)})}else console.error("PolyLineLayer: renderer type is not supported")}render(s,e){console.log("PolyLineLayer: render",s,e),e.type==="simple-line"?this._simpleLineRender(s,e):e.type==="ESPolygonFence"?this._esPolygonFenceRender(s,e):e.type==="ESPipeFence"?this._esPipeFenceRender(s,e):e.type==="ESPath"?this._esPathRender(s,e):e.type==="ESlineInterpolationModel"?this._eslineInterpolationModelRender(s,e):e.type==="ESlineWall"?this._eslineWallRender(s,e):console.error("PolyLineLayer: symbol type is not supported")}_simpleLineRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new we);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.stroked=!0,i.strokeColor=e.color,i.strokeWidth=e.width||1,i.allowPicking=(e==null?void 0:e.allowPicking)??!0,i.extras={selected:!1}}_esPolygonFenceRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new or);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.height=e.height,i.materialMode=e.materialMode}_esPipeFenceRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new rr);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.height=e.height,i.width=e.width,i.materialMode=e.materialMode}_esPathRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ls),r=this.dv(new cs);if(this.d(this.sceneObject.components.disposableAdd(i)),this.d(this.sceneObject.components.disposableAdd(r)),i.points=[...t],i.speed=e.speed,i.strokeColor=e.color,i.materialMode=e.materialMode,i.strokeWidth=e.width||1,e!=null&&e.runModel){const h=e==null?void 0:e.runSpeed,c=e==null?void 0:e.modelSymbol;let l;switch(e==null?void 0:e.runModel){case"ESHuman":l=this.dv(new ze);break;case"ESCar":l=this.dv(new Kn);break;case"ESGltfModel":l=this.dv(new yt)}if(this.d(this.sceneObject.components.disposableAdd(l)),c)for(let p in c)l[p]=c[p];const u=[0];for(var o=0;o<t.length-1;o+=1){const p=t[o],g=t[o+1],f=vg(p[1],p[0],g[1],g[0]);u.push(u[o]+Math.ceil(f/h)*1e3)}i.timeStamps=u,e!=null&&e.runSpeed&&(i.currentPositionChanged.don(p=>{i.currentPosition&&(l.position=i.currentPosition,i.currentRotation&&(l.rotation=i.currentRotation))}),r.startTime=0,r.stopTime=u[u.length-1],r.playing=!0,r.loop=(e==null?void 0:e.runLoop)??!0,r.currentTimeChanged.don(p=>{i.path.currentTime=p}))}}_eslineInterpolationModelRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=(e==null?void 0:e.interpolationDistance)??0;if(!i)return;const r=gg(t,i/1e3),o=this.dv(new yt);this.d(this.sceneObject.components.disposableAdd(o)),o.url=e.url,o.instances=r.map(h=>({position:h,rotation:e.rotation,scale:e.scale}))}_eslineWallRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=e.height??0,r=e.width??0,o=e.extrudedHeight??0,h=t.map(u=>({lng:(u==null?void 0:u[0])??0,lat:(u==null?void 0:u[1])??0,alt:(u==null?void 0:u[2])??0})),c=mg(h,r).map(u=>[(u==null?void 0:u.lng)??0,(u==null?void 0:u.lat)??0,(u==null?void 0:u.alt)??0]),l=this.dv(new Si);this.d(this.sceneObject.components.disposableAdd(l)),l.height=i,l.extrudedHeight=o,l.filled=e.filled??!0,l.fillColor=e.fillColor,l.allowPicking=(e==null?void 0:e.allowPicking)??!0,l.extras={selected:!1},l.points=c}renderLabel(s,e){const{points:t}=s,i=pg(t);Na(this.sceneObject,i,s,e)}}function Fl(n,s){try{JSON.stringify(n[n.length-1])!==JSON.stringify(n[0])&&n.push(n[0]);const e=X.featureCollection(n.map(c=>X.point(c))),t=X.polygon([n]),i={gridType:"point",units:"meters"};return X.interpolate(e,s,i).features.map(c=>c.geometry.coordinates)[0][0].filter(c=>X.booleanPointInPolygon(X.point(c),t))}catch(e){return console.error(e),[]}}class Cg extends b{constructor(s,e,t,i){super(),this.sceneObject=s;const r=e;if(i&&ft(r,o=>{this.renderLabel(o,i)}),t)if(t.type==="simple"){const{visualVariables:o}=t;ft(r,h=>{const c=Va(h,t,o);this.render(h,c)})}else if(t.type==="unique-value"){const{visualVariables:o}=t;ft(r,h=>{const c=La(h,t,o);this.render(h,c)})}else if(t.type==="class-breaks"){const{visualVariables:o}=t;ft(r,h=>{const c=za(h,t,o);this.render(h,c)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(s,e){const{points:t}=s;console.log("PolygonLayer: renderLabel",t);const i=fg(t);Na(this.sceneObject,i,s,e)}render(s,e){e.type==="simple-fill"?this._simplePolygonRender(s,e):e.type==="ESGeoExtrudedPolygon"?this._esGeoExtrudedPolygonRender(s,e):e.type==="PolygonInterpolateESGltfModel"?this._polygonInterpolateESGltfModelRender(s,e):e.type==="PolygonInterpolateESImageLabel"?this._polygonInterpolateESImageLabelRender(s,e):console.error("PolyLineLayer: symbol type is not supported")}_simplePolygonRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{color:i,outline:r,filled:o,ground:h}=e,{width:c,color:l,stroked:u}=r,p=this.dv(new Q);this.d(this.sceneObject.components.disposableAdd(p)),p.stroked=u??!1,p.strokeColor=l??[1,1,1,1],p.strokeWidth=c??1,p.filled=o??!0,p.fillGround=h??!1,p.fillColor=i??[1,1,1,1],p.allowPicking=(e==null?void 0:e.allowPicking)??!0,p.extras={selected:!1},p.points=[...t]}_esGeoExtrudedPolygonRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,extrudedHeight:r,color:o}=e,h=this.dv(new Si);this.d(this.sceneObject.components.disposableAdd(h)),h.height=i,h.extrudedHeight=r,h.filled=!0,h.fillColor=o,h.allowPicking=(e==null?void 0:e.allowPicking)??!0,h.extras={selected:!1},h.points=[...t]}_polygonInterpolateESGltfModelRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:r,url:o,rotation:h,scale:c}=e,l=Fl(t,r??10),u=this.dv(new yt);this.d(this.sceneObject.components.disposableAdd(u)),u.url=o,u.instances=l.map(p=>({position:[...p,i??0],rotation:h??[0,0,0],scale:c??[1,1,1]}))}_polygonInterpolateESImageLabelRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:r,offset:o,size:h,url:c,anchor:l}=e,p={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...Fl(t,r??10).map(f=>[...f,i??0])]}}]},g=this.dv(new pn);this.d(this.sceneObject.components.disposableAdd(g)),g.textDefaultText="",g.imageUrl=c,l&&(g.imageAnchor=l),o&&(g.imageOffset=o),h&&(g.imageSize=h),g.url=p}}class Sg extends b{constructor(e,t){super();a(this,"_initEvent",this.dv(new m));const i=this,r=async()=>{try{const h=e.featureProps;if(!h)return;const{heightMode:c,features:l,layerType:u,url:p}=h;let g=[];if(!l&&p){let f=await fetch(p).then(w=>w.json());return f=(f==null?void 0:f.features)??f,u==="polylineVector"?g=await El(t,f,c):u==="polygonVector"?g=await Sl(t,f,c):u==="pointVector"&&(g=await Cl(t,f,c)),g}else u==="polylineVector"?g=await El(t,l,c):u==="polygonVector"?g=await Sl(t,l,c):u==="pointVector"&&(g=await Cl(t,l,c));return g}catch(h){console.error(h);return}},o=this.dv(ae(this._initEvent,e.featurePropsChanged));i.dv(new ce(o,()=>{if(!e.featureProps)return;const h=e.featureProps;let c;return(async()=>{const{layerType:u,renderer:p,labelingInfo:g}=h,f=await r();!f||f.length===0||(u==="pointVector"?c=new bg(e,f,p,g):u==="polylineVector"?c=new Eg(e,f,p,g):u==="polygonVector"&&(c=new Cg(e,f,p,g)),console.log("polygonVectorLayer","createLayer",c))})().catch(console.error),{destroy:()=>{var u;(u=c==null?void 0:c.destroy)==null||u.call(c),c=void 0}}}));{const h=(c,l=1)=>{const u=Fc(c);if(!u)return;const{center:p,radius:g}=u;t.flyTo({distance:g*4,heading:0,pitch:-90,flyDuration:l??1,hDelta:0,pDelta:0},p)};i.d(e.flyToEvent.don(async c=>{const{featureProps:l}=e;if(!l)return;const u=await r();if(!u)return;let p=[];l.layerType==="polylineVector"?p=u.map(g=>g.points).flat():l.layerType==="polygonVector"?p=u.map(g=>g.points).flat():l.layerType==="pointVector"&&(p=u.map(g=>g.points)),p.length!==0&&h(p,c)}))}}init(){this._initEvent.emit()}}const Us=class Us extends Y{constructor(e){super(e);a(this,"featureLayerMap",new Map);const t=this;t.d(t.viewerAttached.don(i=>{if(console.log("ESFeatureLayer","viewerAttached",i.id),t.featureLayerMap.has(i.id))return;const r=new Sg(t,i);r.init(),t.featureLayerMap.set(i.id,r)})),t.d(t.viewerDetached.don(i=>{var r;console.log("ESFeatureLayer","viewerDetached",i.id),t.featureLayerMap.has(i.id)&&((r=t.featureLayerMap.get(i.id))==null||r.destroy(),t.featureLayerMap.delete(i.id))})),t.d(()=>{for(const i of t.featureLayerMap.values())i.destroy();t.featureLayerMap.clear()}),t.d(ue(t.showChanged,()=>{for(const i of t.components.values())Reflect.has(i,"show")&&(i.show=t.show)},{immediate:!0}))}};a(Us,"createDefaultProps",()=>({...Y.createDefaultProps(),featureProps:te(void 0)})),a(Us,"type",Us.register("ESFeatureLayer",Us,{chsName:"矢量图层",tags:["ESObjects"],description:"ESFeatureLayer"}));let Ua=Us;const Pg=[["256",256],["512",512],["1024",1024]],Tg=[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]],ke=class ke extends Y{constructor(e){super(e);a(this,"_pickFeaturesEvent",this.dv(new m));this.ad(x([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(x([this,"czmAlpha"],[this,"opacity"]))}get pickFeaturesEvent(){return this._pickFeaturesEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new A([this,"accessToken"],"令牌",ke.defaults.accessToken),new Je([this,"rectangle"],"矩形范围",ke.defaults.rectangle),new z([this,"url"],"服务地址",ke.defaults.url),new z([this,"style"],"样式配置",ke.defaults.style),new v([this,"zIndex"],"层级序号",ke.defaults.zIndex),new j([this,"tileSize"],Pg,"瓦片大小",256),new ge([this,"maximumLevel"],1,[1,24],"最大层级",ke.defaults.maximumLevel),new ge([this,"minimumLevel"],1,[0,24],"最小层级",ke.defaults.minimumLevel),new j([this,"scheme"],[["tms","tms"],["xyz","xyz"]],"影像切片规则",ke.defaults.scheme),new j([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考"),new A([this,"targetID"],"targetID")],more:[...e.more,new L("通用"),new j([this,"splitDirection"],Tg,"splitDirection","NONE"),new L("czm"),new v([this,"czmAlpha"],"透明度"),new v([this,"czmBrightness"],"亮度"),new v([this,"czmContrast"],"对比度"),new v([this,"czmHue"],"色相"),new v([this,"czmSaturation"],"饱和度"),new v([this,"czmGamma"],"伽马值")]}}};a(ke,"createDefaultProps",()=>({...Y.createDefaultProps(),rectangle:te([-180,-90,180,90]),url:W(""),zIndex:0,accessToken:"",tileSize:256,maximumLevel:18,minimumLevel:0,style:ee([]),scheme:y("xyz"),czmSplitDirection:"NONE",heightReference:"NONE",czmAlpha:1,opacity:1,splitDirection:"NONE",targetID:"",czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1})),a(ke,"type",ke.register("ESMVTLayer",ke,{chsName:"矢量瓦片图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"用于加载矢量瓦片图层。"}));let Wa=ke;const kt=class kt extends M{constructor(s){super(s)}getESProperties(){return{...{...super.getESProperties()},basic:[new v([this,"radius"],"半径",kt.defaults.radius),new v([this,"height"],"高度",kt.defaults.height),new G([this,"color"],"颜色",kt.defaults.color),new z([this,"materialParams"],"材质参数",kt.defaults.materialParams)]}}};a(kt,"createDefaultProps",()=>({...M.createDefaultProps(),radius:2,height:10,color:F([.204,.596,.859,1]),materialParams:W({ringSpeed:1,ringColor:[1,1,1,1],ringWidth:.03,sides:10,ringRatio:1,ringRepeat:1,ringBottomMove:!1})})),a(kt,"type",kt.register("ESCylinder",kt,{chsName:"圆柱",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"圆柱体"}));let Pi=kt;const ut=class ut extends dn{constructor(s){super(s)}getESProperties(){const s=super.getESProperties();return{...s,dataSource:[...s.dataSource,new j([this,"videoStreamType"],ut.videoStreamTypes,"数据源类型",ut.defaults.videoStreamType),new S([this,"looping"],"循环播放",ut.defaults.looping),new S([this,"play"],"播放状态",ut.defaults.play)]}}};a(ut,"createDefaultProps",()=>({...dn.createDefaultProps(),videoStreamType:"video",looping:!0,play:!0})),a(ut,"type",ut.register("ESMediaLayer",ut,{chsName:"媒体图层",tags:["ESObjects","_ES_Impl_Cesium"],description:"用于添加数据源为图片或者视频的图层"})),a(ut,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"]]);let Ba=ut;const Mt=class Mt extends Y{constructor(e){super(e);a(this,"_getRepairPolygonEvent",this.disposeVar(new m));a(this,"_getIndicesEvent",this.disposeVar(new m));a(this,"_startEvent",this.disposeVar(new m))}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general",basic:[new z([this,"urls"],"URL",Mt.defaults.urls),new j([this,"mode"],Mt.modes,"模式",Mt.defaults.mode),new N("开始编辑",()=>this.start(),[])]}}get getRepairPolygonEvent(){return this._getRepairPolygonEvent}getRepairPolygon(){return new Promise((e,t)=>{const i=new b;i.ad(this._getRepairPolygonEvent.don(o=>{o!="get"&&e(o)})),this.getRepairPolygonEvent.emit("get");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get getIndicesEvent(){return this._getIndicesEvent}getIndices(){return new Promise((e,t)=>{const i=new b;i.ad(this._getIndicesEvent.don(o=>{o!="get"&&e(o)})),this.getIndicesEvent.emit("get");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}};a(Mt,"createDefaultProps",()=>({...Y.createDefaultProps(),urls:ee([]),mode:"repair",allowPicking:!0})),a(Mt,"type",Mt.register("ESGltfModelEditing",Mt,{chsName:"GLTF模型编辑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载GLTF模型的 ES 对象"})),a(Mt,"modes",[["删除","delete"],["修复","repair"]]);let Ha=Mt;const di=class di extends ze{constructor(e){super(e);a(this,"humans",[]);a(this,"humansOffset",new Map);this.ad(this.clear.bind(this)),this.updateHumans();const t=this.ad(ae(this.instancesCountChanged,this.radiusChanged));this.ad(t.don(this.updateHumans.bind(this)))}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new v([this,"instancesCount"],"实例数量",1,di.defaults.instancesCount),new v([this,"radius"],"半径",1,di.defaults.radius)]}}updateHumans(){for(this.clear();this.humans.length+1<this.instancesCount;){const e=new ze;this.humansOffset.set(e.id,[Math.random()*this.radius,Math.random()*this.radius,0]),this.humans.push(e),this.components.add(e),e.d(_([e,"show"],[this,"show"])),e.d(_([e,"allowPicking"],[this,"allowPicking"])),e.d(_([e,"scale"],[this,"scale"])),e.d(_([e,"collision"],[this,"collision"])),e.d(x([e,"flyInParam"],[this,"flyInParam"])),e.d(x([e,"flyToParam"],[this,"flyToParam"])),e.d(_([e,"animation"],[this,"animation"])),e.d(_([e,"mode"],[this,"mode"])),e.d(_([e,"minVisibleDistance"],[this,"minVisibleDistance"])),e.d(_([e,"maxVisibleDistance"],[this,"maxVisibleDistance"])),e.d(ue([this.positionChanged],()=>{const t=go(this.position,this.humansOffset.get(e.id)??[0,0,0]);t&&(e.position=t)},{immediate:!0})),e.d(x([e,"rotation"],[this,"rotation"])),e.d(this.flyInEvent.don(t=>{e.flyIn(t)})),e.d(this.flyToEvent.don(t=>{e.flyTo(t)})),e.d(this.calcFlyToParamEvent.don(()=>{e.calcFlyToParam()})),e.d(this.calcFlyInParamEvent.don(()=>{e.calcFlyInParam()})),e.d(this.smoothMoveEvent.don((t,i)=>{e.smoothMove(t,i)})),e.d(this.smoothMoveWithRotationEvent.don((t,i,r)=>{e.smoothMoveWithRotation(t,i,r)})),e.d(this.smoothMoveOnGroundEvent.don((t,i,r,o)=>{e.smoothMoveOnGround(t,i,r,o)})),e.d(this.smoothMoveWithRotationOnGroundEvent.don((t,i,r,o,h)=>{e.smoothMoveWithRotationOnGround(t,i,r,o,h)})),e.d(this.automaticLandingEvent.don(()=>{e.automaticLanding()})),e.d(e.readyEvent.don(t=>{this.readyEvent.emit(t)}))}}clear(){this.humans.forEach(e=>{this.components.delete(e)}),this.humans=[],this.humansOffset.clear()}};a(di,"createDefaultProps",()=>({...ze.createDefaultProps(),instancesCount:1,radius:1})),a(di,"type",di.register("ESHumans",di,{chsName:"人员(批量)",tags:["ESObjects"],description:"批量创建ESHumans对象"}));let $a=di;const Gi=class Gi extends we{constructor(e){super(e);a(this,"_line",this.ad(new we));a(this,"_arrowPolygon",this.ad(new Q));this.ad(this.components.disposableAdd(this.line,!0)),this.line.show=!1,this.ad(this.components.disposableAdd(this.arrowPolygon));const{line:t,arrowPolygon:i}=this;this.ad(x([t,"points"],[this,"points"])),this.ad(ue([this.pointsChanged,this.modeChanged],()=>{this.updateArrowPolygon()},{immediate:!0})),this.ad(_([i,"show"],[this,"show"])),this.ad(_([i,"collision"],[this,"collision"])),this.ad(_([i,"allowPicking"],[this,"allowPicking"])),this.ad(_([i,"filled"],[this,"filled"])),this.ad(_([i,"fillGround"],[this,"fillGround"])),this.ad(_([i,"fillColor"],[this,"fillColor"])),this.ad(_([i,"fillMaterial"],[this,"fillMaterial"])),this.ad(_([i,"fillMaterialParams"],[this,"fillMaterialParams"])),this.ad(_([i,"stroked"],[this,"stroked"])),this.ad(_([i,"strokeGround"],[this,"strokeGround"])),this.ad(_([i,"strokeColor"],[this,"strokeColor"])),this.ad(_([i,"strokeMaterial"],[this,"strokeMaterial"])),this.ad(_([i,"strokeMaterialParams"],[this,"strokeMaterialParams"])),this.ad(_([i,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([i,"strokeWidthType"],[this,"strokeWidthType"])),this.ad(_([i,"classificationType"],[this,"classificationType"]))}get line(){return this._line}get arrowPolygon(){return this._arrowPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new j([this,"mode"],ao,"箭头模式",Gi.defaults.mode)]}}updateArrowPolygon(){const e=this.points;if(!e||e.length<3){this._arrowPolygon.points=[];return}let t=yo(e,this.mode,!0);t&&t.length>=3?this._arrowPolygon.points=[...t,t[0]]:this._arrowPolygon.points=[]}};a(Gi,"createDefaultProps",()=>({...we.createDefaultProps(),mode:"straightArrow",stroked:!1,filled:!0,fillStyle:W({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(Gi,"type",Gi.register("ESAttackArrow",Gi,{chsName:"进攻箭头",tags:["ESObjects","_ES_Impl_Cesium"],description:"进攻箭头,军事标绘箭头类,支持直箭头和燕尾箭头"}));let Ga=Gi;const Ji=class Ji extends yt{constructor(e){super(e);a(this,"esCylinder",this.dv(new Pi));const t=this.esCylinder;t.color=[1,1,1,0],this.ad(this.components.disposableAdd(this.esCylinder)),this.ad(_([t,"show"],[this,"show"])),this.ad(_([t,"collision"],[this,"collision"])),this.ad(_([t,"allowPicking"],[this,"allowPicking"])),this.ad(_([t,"position"],[this,"position"])),this.ad(_([t,"radius"],[this,"esCylinderRadius"])),this.ad(_([t,"height"],[this,"esCylinderHeight"])),this.ad(_([t,"materialParams"],[this,"esCylinderMaterialParams"])),this.ad(ue(this.esCylinderRotationChanged,()=>{const i=this.esCylinderRotation;t.rotation=[i[0],i[1]-180,i[2]]},{immediate:!0}))}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new rn([this,"esCylinderRotation"],"波动方向",Ji.defaults.esCylinderRotation),new v([this,"esCylinderRadius"],"半径",Pi.defaults.esCylinderRadius),new v([this,"esCylinderHeight"],"高度",Pi.defaults.esCylinderHeight),new z([this,"esCylinderMaterialParams"],"材质参数",Pi.defaults.esCylinderMaterialParams)]}}};a(Ji,"createDefaultProps",()=>({...yt.createDefaultProps(),url:k.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/CesiumDrone.glb"),esCylinderRotation:F([0,0,0]),esCylinderRadius:2,esCylinderHeight:10,esCylinderMaterialParams:W({ringSpeed:1,ringColor:[1,1,0,1],ringWidth:.03,sides:10,ringRatio:1,ringRepeat:10,ringBottomMove:!0})})),a(Ji,"type",Ji.register("ESSignalInterference",Ji,{chsName:"信号干扰",tags:["ESObjects"],description:"信号干扰"}));let Ja=Ji;const Gt=class Gt extends b{constructor(){super();a(this,"_loading",!1);a(this,"_loadedEvent",this.disposeVar(new m));a(this,"_loaded",!1);a(this,"_loadedPromiseResolve");a(this,"_loadedPromise",new Promise(e=>{this._loadedPromiseResolve=e}));a(this,"_processing");this._processing=this.disposeVar(Ne(async e=>{if(this._loading=!0,globalThis.Hls)console.info("可能系统已经加载hlsjs,此处不再加载!");else{const t=k.context.getStrFromEnv(Gt.path);await e.promise(Rr(t))}this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve()})),this._processing.start()}get loading(){return this._loading}get loadedEvent(){return this._loadedEvent}get loaded(){return this._loaded}get loadedPromise(){return this._loadedPromise}get processing(){return this._processing}static instance(){return Gt._instance=Gt._instance||new Gt,Gt._instance}};a(Gt,"path","${xr-utils-script-dir}/xr-static/xr-utils/hlsjs/1.4.12/hls.min.js"),a(Gt,"_instance");let ur=Gt,Ig=class extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}};class Og extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_processing");this._complexImage=e,this._videoSrc=t,this._videoDom=this.disposeVar(new Ig(this._complexImage,"")),this._processing=this.disposeVar(Ne(async i=>{const{videoSrc:r}=this,o=ur.instance();await i.promise(o.loadedPromise);const h=globalThis.Hls,c=new h,l=this.element;await vi(i,()=>new Promise((u,p)=>{l.xbsjHLS=c,c.attachMedia(l),c.on(h.Events.MEDIA_ATTACHED,()=>{c.loadSource(r),c.on(h.Events.MANIFEST_PARSED,(g,f)=>{l.play(),u()})}),c.on(h.Events.ERROR,(g,f)=>{const{type:w,details:E,fatal:C}=f;C&&(c.destroy(),p(E))})}))})),this._processing.start()}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class xl extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new Og(this._complexImage,this._imageUri)),this._update=this.disposeVar(ss(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}const Jt=class Jt extends b{constructor(){super();a(this,"_loading",!1);a(this,"_loadedEvent",this.disposeVar(new m));a(this,"_loaded",!1);a(this,"_loadedPromiseResolve");a(this,"_loadedPromise",new Promise(e=>{this._loadedPromiseResolve=e}));a(this,"_processing");this._processing=this.disposeVar(Ne(async e=>{if(this._loading=!0,globalThis.flvjs)console.info("可能系统已经加载flvjs,此处不再加载!");else{const t=k.context.getStrFromEnv(Jt.path);await e.promise(Rr(t))}this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve()})),this._processing.start()}get loading(){return this._loading}get loadedEvent(){return this._loadedEvent}get loaded(){return this._loaded}get loadedPromise(){return this._loadedPromise}get processing(){return this._processing}static instance(){return Jt._instance=Jt._instance||new Jt,Jt._instance}};a(Jt,"path","${xr-utils-script-dir}/xr-static/xr-utils/flvjs/1.6.2/flv.min.js"),a(Jt,"_instance");let pr=Jt;class Dg extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}}class Fg extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_processing");this._complexImage=e,this._videoSrc=t,this._videoDom=this.disposeVar(new Dg(this._complexImage,"")),this._processing=this.disposeVar(Ne(async i=>{const{videoSrc:r}=this,o=pr.instance();await i.promise(o.loadedPromise);const h=globalThis.flvjs,c=this.element;await vi(i,()=>new Promise((l,u)=>{if(!h.isSupported()){u("flvjs不支持!");return}var p=h.createPlayer({type:"flv",url:r});p.attachMediaElement(c),p.load(),p.play(),c.xbsjFlvPlayer=p}))})),this._processing.start()}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class kl extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new Fg(e,this._imageUri)),this._update=this.disposeVar(ss(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}function Ml(n){const s=n.substring(n.lastIndexOf(".")+1);return _n.suffixTypes[s]}class _n extends b{constructor(){super();a(this,"_enabled",this.disposeVar(y(!1)));a(this,"_uri",this.disposeVar(y("")));a(this,"_type",this.disposeVar(y(void 0)));a(this,"_size",this.disposeVar(ee(void 0)));a(this,"_pixelFormat",this.disposeVar(y("RGBA")));a(this,"_flipY",this.disposeVar(y(!0)));a(this,"_crossOriginReact",this.disposeVar(y("")));a(this,"_autoplayReact",this.disposeVar(y(!0)));a(this,"_loopReact",this.disposeVar(y(!0)));a(this,"_copyTextureEvent",this.disposeVar(new m));a(this,"_imageProcessingResettingEvent",this.disposeVar(ae(this.enabledChanged,this.uriChanged,this.typeChanged)));a(this,"_imageProcessingResetting",this.disposeVar(new ce(this._imageProcessingResettingEvent,()=>{if(!this.enabled||!this.uri)return;let{type:e}=this;if(e||(e=Ml(this.uri)),!!e){if(e==="img")return new qh(this,this.uri);if(e==="video")return new Kh(this,this.uri);if(e==="gif")return new oc(this,this.uri);if(e==="hls")return new xl(this,this.uri);if(e==="flv")return new kl(this,this.uri)}})));a(this,"_createNativeTextureEvent",this.disposeVar(ae(this.enabledChanged,this.sizeChanged,this.pixelFormatChanged,this.flipYChanged)))}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}get uri(){return this._uri.value}set uri(e){this._uri.value=e}get uriChanged(){return this._uri.changed}get type(){return this._type.value}set type(e){this._type.value=e}get typeChanged(){return this._type.changed}get size(){return this._size.value}set size(e){this._size.value=e}get sizeChanged(){return this._size.changed}get pixelFormat(){return this._pixelFormat.value}set pixelFormat(e){this._pixelFormat.value=e}get pixelFormatChanged(){return this._pixelFormat.changed}get flipY(){return this._flipY.value}set flipY(e){this._flipY.value=e}get flipYChanged(){return this._flipY.changed}get crossOrigin(){return this._crossOriginReact.value}set crossOrigin(e){this._crossOriginReact.value=e}get crossOriginChanged(){return this._crossOriginReact.changed}get autoplay(){return this._autoplayReact.value}set autoplay(e){this._autoplayReact.value=e}get autoplayChanged(){return this._autoplayReact.changed}get loop(){return this._loopReact.value}set loop(e){this._loopReact.value=e}get loopChanged(){return this._loopReact.changed}get copyTextureEvent(){return this._copyTextureEvent}copyTexture(e){this._createNativeTextureEvent.flush(),this._copyTextureEvent.emit(e)}get imageProcessingResetting(){return this._imageProcessingResetting}get createNativeTextureEvent(){return this._createNativeTextureEvent}copyFromCanvas(e){if(e.width<=0||e.height<=0){console.warn("canvas.width <= 0 || canvas.height <= 0");return}this.size=[e.width,e.height],this.pixelFormat="RGBA",this.copyTexture({source:e})}}a(_n,"types",Yh),a(_n,"czmPixelFormats",Xh),a(_n,"suffixTypes",{png:"img",jpg:"img",svg:"img",webp:"img",gif:"gif",mp4:"video",mov:"video",webm:"video",flv:"flv",m3u8:"hls"});const xg=[0,0,0,0];class kg{constructor(){a(this,"_value",[]);a(this,"_valueStr","[]");a(this,"_valueChanged");this.value=[{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}]}get valueChanged(){return this._valueChanged||(this._valueChanged=new m),this._valueChanged}set value(s){if(s.length===0){console.error("value.length === 0");return}let e;if(this._value.length===s.length){const i=[...s].sort((r,o)=>r.ratio-o.ratio);if(e=JSON.stringify(i),this._valueStr===e)return}e=e||JSON.stringify([...s].sort((i,r)=>i.ratio-r.ratio));const t=this._value;if(this._value=JSON.parse(e),this._value.length===0)throw console.error("this._colorStops.length === 0"),new Error("this._colorStops.length === 0");this._valueChanged&&this._valueChanged.emit(this._value,t)}get value(){return JSON.parse(JSON.stringify(this._value))}get valueStr(){return this._valueStr}get minRatio(){return this._value[0].ratio}get maxRatio(){return this._value[this._value.length-1].ratio}_getRatioIndex(s){if(s<this._value[0].ratio||s>this._value[this._value.length-1].ratio)throw console.error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio"),new Error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio");let e=this._value.length;for(let t=0;t<e-1;++t)if(s>=this._value[t].ratio&&s<=this._value[t+1].ratio)return t;throw console.error("shoud not be here!"),new Error("shoud not be here!")}getRatioColor(s,e){s=kn(s,this.minRatio,this.maxRatio);const t=this._getRatioIndex(s),i=this._value[t],r=this._value[t+1],o=(s-i.ratio)/(r.ratio-i.ratio);for(let h=0;h<4;++h)e[h]=i.rgba[h]*(1-o)+r.rgba[h]*o;if(e.some(Number.isNaN)){console.error("result NaN");return}return e}getColorsInUint8(s){if(s.length%4!==0)throw console.error("result.length % 4 !== 0"),new Error("result.length % 4 !== 0");const e=s.length/4,t=1/e;for(let i=0;i<e;++i){const r=xg;this.getRatioColor((i+.5)*t,r)||r.splice(0,4,0,0,0,0);for(let o=0;o<4;++o)s[i*4+o]=255*r[o]|0}return s}}class Mg extends b{constructor(){super(...arguments);a(this,"registerEngines",{})}register(e,t,i){const r=this.registerEngines[e]||new Map;return r.has(t)&&console.warn(`register warn:${e}中${t}的实现类已经被注册,再次注册会覆盖。`),r.set(t,i),this.registerEngines[e]=r,t}getEngineObjConstructor(e,t){const i=this.registerEngines[t];if(!i)return;let r=e.constructor,o=e.typeName,h=i.get(o);if(h)return h;if(e.components.main)return;const c=o;for(;o!=="ESSceneObject"&&(r=r.getParentClass(),!!r);)if(o=r.type,h=i.get(o),h)return console.warn(`未找到${c}在${t}中对应的实现类! 使用父类${o}的实现类!`),h}createEngineObject(e,t){const i=this.getEngineObjConstructor(e,t.typeName);if(i){const r=new i(e,t);return r.createdEvent.emit(),r}else{const r=new Ti(e,t);return r.createdEvent.emit(),r}}}class jg extends b{constructor(){super(...arguments);a(this,"registerEngines",{})}register(e,t,i){const r=this.registerEngines[e]||new Map;r.has(t)&&console.warn(`register warn:${e}中${t}的实现类已经被注册,再次注册会覆盖。`),r.set(t,i),this.registerEngines[e]=r}getEngineObjConstructor(e,t){const r=(this.registerEngines[t]||new Map).get(e);if(r)return r;console.warn(`未找到${e}在${t}中对应的实现类!`)}createEngineObject(e,t){const i=this.getEngineObjConstructor(e.typeName,t.typeName);if(i){const r=new i(e,t);return r.createdEvent.emit(),r}else{const r=new Ti(e,t);return r.createdEvent.emit(),r}}}const Qe=class Qe extends b{constructor(e,t,i=!1){super();a(this,"_createdEvent",this.dv(new m));a(this,"_id",++Qe._accumId);this._sceneObject=e,this._viewer=t;{if(i)return;const r=(o,h)=>{for(let c of o)this._viewer.delete(c);for(let c of h)c.parentID=this.sceneObject.id,this._viewer.add(c)};r([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(r)),this.d(()=>r(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};a(Qe,"context",new Mg),a(Qe,"contextEditing",new jg),a(Qe,"register",Qe.context.register.bind(Qe.context)),a(Qe,"registerEditing",Qe.contextEditing.register.bind(Qe.contextEditing)),a(Qe,"_accumId",-1);let Ti=Qe;function ie(n,s,e){return{content:[{type:"text",text:JSON.stringify({toolName:n,status:"error",msg:e?"执行失败,"+e:"执行失败",data:s},null,2)}]}}function st(n,s,e){return{content:[{type:"text",text:JSON.stringify({toolName:n,status:"success",msg:e?"执行成功,"+e:"执行成功",data:s},null,2)}]}}const jl=n=>[{name:"flyTo",params:{description:"相机飞行定位,根据对象id来改变相机视角位置或查询真实地点名称信息来改变相机视角位置",inputSchema:{option:ne.discriminatedUnion("mode",[ne.object({mode:ne.literal("SceneObject").describe("对象定位模式:分析用户提供的名称是否是场景对象的名称"),id:ne.string().describe("场景对象的唯一标识 id")}).describe("分析用户提供的名称是否是场景对象的名称,是则使用 SceneObject 模式并使用该对象属性值id作为参数"),ne.object({mode:ne.literal("RealPlace").describe("真实地点定位模式:用于定位现实世界中的城市、国家或地名"),longitude:ne.number().min(-180).max(180).describe("经度,单位:度,范围 [-180, 180]"),latitude:ne.number().min(-90).max(90).describe("纬度,单位:度,范围 [-90, 90]"),height:ne.number().optional().default(0).describe("高度,单位:米,默认值为 0")}).describe("真实地点定位模式:用于定位现实世界中的城市、国家或地名,而非场景对象的名称,并主动提供经度、纬度和高度信息")]).describe(`相机定位参数规范:
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
`,inputSchema:{roll:ne.number().describe("翻滚角(°),0度时画面保持水平,必须参数,取值范围 -180~180").min(-180).max(180)}},func:async({roll:s})=>{var e,t;try{const i=(e=n.activeViewer)==null?void 0:e.getCurrentCameraInfo();if(!i)return ie("cameraRoll",null,"未查询到当前相机信息");const r=[i.rotation[0],i.rotation[1],s];return(t=n.activeViewer)==null||t.flyIn(i.position,r),st("cameraRoll",{newRotation:r})}catch(i){return ie("cameraRoll",i)}}},{name:"cameraDistance",params:{description:"控制相机与当前目标或视点之间的距离变化,实现相机画面的拉近或拉远。通过 mode 参数指定缩放方向(near 表示拉近,far 表示拉远)",inputSchema:{mode:ne.enum(["near","far"]).describe("缩放模式,near表示相机画面拉近,far表示相机画面拉远")}},func:async({mode:s})=>{var e,t,i,r,o;try{console.log("cameraDistance",s);const h=(e=n.activeViewer)==null?void 0:e.getCurrentCameraInfo();if(!h)return ie("cameraDistance",null,"未查询到当前相机信息");const c=(i=(t=n.activeViewer)==null?void 0:t.container)==null?void 0:i.getBoundingClientRect();if(!c)return ie("cameraDistance",null,"未查询到当前相机容器信息");const l=[c.width/2,c.height/2],u=await((r=n.activeViewer)==null?void 0:r.pickPosition(l));if(!u)return ie("cameraDistance",null,"未查询到视点位置");const p=s==="near"?.2:-.2,g=[h.position[0]+(u[0]-h.position[0])*p,h.position[1]+(u[1]-h.position[1])*p,h.position[2]+(u[2]-h.position[2])*p];return(o=n.activeViewer)==null||o.flyIn(g,h.rotation),st("cameraDistance",{mode:s,newPosition:g})}catch(h){return ie("cameraDistance",h)}}}],Rl=n=>[{name:"deleteSceneObject",params:{description:"提供对象id来删除单个或多个场景对象,把对象从场景中移除",inputSchema:{ids:ne.array(ne.string().describe("场景对象 id")).describe("需要删除的场景对象 id 列表").default([])}},func:async({ids:s})=>{var e;try{if(s.length===0)return ie("deleteSceneObject",null,"未指定对象id");const t=[];for(const i of s){const r=n.sceneTree.getTreeItemFromSceneObjId(i);if(!r){t.push(`删除失败,未查询到ID为 ${i} 的对象`);continue}n.sceneTree.destroySceneObjectTreeItem(r),t.push(`成功删除对象 ${(e=r==null?void 0:r.sceneObject)==null?void 0:e.id}`)}return st("deleteSceneObject",t)}catch(t){return ie("deleteSceneObject",t)}}},{name:"createSceneObjectFromJson",params:{description:"根据对象JSON来创建场景对象,必须符合格式 { type: string,id: string, ...} ",inputSchema:{json:ne.object({id:ne.string().describe("对象id"),type:ne.string().describe("对象类型,例如:ESImageLayer")}).passthrough().describe("场景对象JSON,必须保证 id 和 type 存在,严格使用用户提供的JSON,不允许添加额外属性")}},func:async({json:s})=>{var e;try{if(![...k.context.typeNames].includes(s.type))return ie("createSceneObjectFromJson",null,`未查询到类型为 ${s.type} 的对象类型`);const i=n.sceneTree.createSceneObjectTreeItemFromJson(s);return i?st("createSceneObjectFromJson",(e=i==null?void 0:i.sceneObject)==null?void 0:e.completeJson):ie("createSceneObjectFromJson",null,`创建 ${s.type} 对象失败`)}catch(t){return ie("createSceneObjectFromJson",t)}}},{name:"setSceneObjectProperty",params:{description:"设置对象的属性值,更改指定对象的某个属性值,参数从场景JSON中查询",inputSchema:{id:ne.string().describe("对象id"),property:ne.string().describe("对象属性名,例如:show"),value:ne.any().describe("对象属性值,例如: true")}},func:async({id:s,property:e,value:t})=>{try{const i=n.getSceneObjectById(s);return i?Reflect.has(i,e)?(i[e]=t,st("setSceneObjectProperty",`对象 ${i.name} 的 ${e} 属性为 ${JSON.stringify(t)}`)):ie("setSceneObjectProperty",null,`对象 ${i.name} 没有属性 ${e}`):ie("setSceneObjectProperty",null,`未查询到ID为 ${s} 的对象`)}catch(i){return ie("setSceneObjectProperty",i)}}}],Al=n=>[...jl(n),...Rl(n)],Rg=Gl;function Nl(n){return Rg(n)}class Ag extends b{constructor(e){super();a(this,"_tools",new Map);e&&Al(e).forEach(i=>{this.registerTool(i)})}toolTransformParams(e){const{description:t,inputSchema:i,outputSchema:r}=e.params,o=ne.z.object(i||{}),h=ne.z.object(r||{}),c=Nl(o),l=Nl(h);return{name:e.name,description:t,inputSchema:c,outputSchema:l}}async listTools(){return Promise.resolve(Array.from(this._tools.values()).map(this.toolTransformParams))}registerTool(e){this._tools.set(e.name,e)}async callTool(e){const{name:t,arguments:i}=e,r=this._tools.get(t);if(!r||!r.func)throw new Error(`ESTool "${t}" does not exist.`);return await r.func(i)}getTools(){return Array.from(this._tools.values())}}function Vl(n){return typeof n=="string"?document.getElementById(n):n}function qa(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const s=document.createElement("div");return s.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(s),s}class Ll extends b{constructor(e,t){super();a(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=t;const i=this._listeningSceneObjects,r=(o,h)=>{if(o)for(let c of o){const l=i.get(c);l&&(l.destroy(),i.delete(c))}if(h)for(let c of h){if(i.get(c)){console.warn(`listeningSceneObjects已存在某对象:${c.name}`,c);debugger}const u=this.createSceneObjectListeningFunc(c);u&&i.set(c,u)}};r(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(r)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class Ng extends b{constructor(s){super(),this._esObjectsManager=s;{const e=this._esObjectsManager;class t extends b{constructor(r){super(),this._esPath=r,this.dv(new ce(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class h extends b{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const u=()=>{const p=e.activeViewer;p&&(this._esPath.path.currentTime=p.simulationTime)};u(),this.d(o.simulationTimeChanged.don(u))}}return new h(this._esPath)}))}}this.dv(new Ll(e.sceneObjectsManager,i=>{if(i instanceof ls)return new t(i)}))}{const e=this._esObjectsManager;class t extends b{constructor(r){super();const o=()=>{const h=e.activeViewer;h&&(h.simulationTime=r.currentTime??0)};o(),this.d(r.currentTimeChanged.don(o))}}this.dv(new Ll(e.sceneObjectsManager,i=>{if(i instanceof cs)return new t(i)}))}}}class Vg extends b{constructor(s){super(),s.forEach(e=>{this.d(e.path.currentPositionChanged.don(t=>{t&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...t])})})),this.d(e.path.currentRotationChanged.don(t=>{t&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...t])})}))})}}class Lg extends b{constructor(e){super();a(this,"_player");a(this,"_channels",this.dv(F([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new ce(this.channelsChanged,()=>{if(this.channels.length===0)return;const t=[];for(let i=0;i<this.channels.length;i++){const r=this.channels[i],o=k.getSceneObjById(r.pathId);if(!o||!(o instanceof ls))continue;const c=r.sceneObjectIds.map(l=>k.getSceneObjById(l)).filter(l=>l!==void 0);c.length!==0&&t.push({path:o,sceneObjects:c})}if(t.length!==0)return new Vg(t)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function zl(n,s,e,t){if(e)t.currentActiveEditing=[n,s];else if(t.currentActiveEditing){const[i,r]=t.currentActiveEditing;i===n&&r===s&&(e||(t.currentActiveEditing=void 0))}}const zg=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class Ug extends b{constructor(s,e){super(),this._sceneObject=s;const t=this._sceneObject;for(let i of zg){const r=i+"Changed",o=t[r];if(o){{const h=t[i];zl(t,i,h,e)}this.dispose(o.disposableOn((h=>zl(t,i,h,e))))}}}get sceneObject(){return this._sceneObject}}class Wg extends b{constructor(){super();a(this,"_currentActiveEditing",this.disposeVar(ee(void 0)));a(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,t)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),t){const[i,r]=t;i[r]===!0&&(i[r]=!1)}if(e){const[i,r]=e;i[r]=!0}})),k.context.sceneObjCreatedEvent.don(e=>{e.dv(new Ug(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class Bg extends b{constructor(){super();a(this,"_sceneObjects",new Set);a(this,"_sceneObjectsToChange",this.dv(new m));this.d(()=>{const e=kr(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,t){const i=k.context.createSceneObject(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromUrl(e,t){const i=k.context.createSceneObjectFromUrl(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,t){const i=k.context.createSceneObjectFromClass(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const t=k.context.createSceneObjectFromJson(e);return t&&this.addSceneObject(t),t}}class Hg extends b{constructor(e){super();a(this,"_enabled",this.dv(y(!1)));a(this,"_cursorPosition",y(void 0));a(this,"quickPickPosition",!0);let t=new b;const i=()=>{t&&(t.destroy(),t=void 0)};this.d(i);const r=()=>{if(i(),!e||!this._enabled.value)return;t=new b;const o=t.dv(y(void 0)),h=t.dv(ae(o.changed));t.d(e.pointerMoveEvent.don(l=>{l.pointerEvent&&(o.value=Ee(l.pointerEvent))}));const c=t.dv(Ne(async l=>{if(o.value)if(this.quickPickPosition){const u=await l.promise(is(e.quickPickPosition(o.value)));this._cursorPosition.value=u}else{const u=await l.promise(is(e.pickPosition(o.value)));this._cursorPosition.value=u}}));t.d(h.don(()=>{c.restart()}))};r(),this.d(this._enabled.changed.don(r))}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}get cursorPosition(){return this._cursorPosition.value}get cursorPositionChanged(){return this._cursorPosition.changed}}class $g extends b{constructor(e){super();a(this,"cursorPositionInfo");this.viewer=e,this.cursorPositionInfo=this.dv(new Hg(this.viewer))}}class Gg extends b{constructor(e){super();a(this,"viewer");const t=this.viewer=e;this.ad(new ce(t.rollerShutterChanged,()=>{const i=t.container;if(!i||!t.rollerShutter)return;const r=new b;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),r.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),r}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const t=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",t)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",t)}),e}}class Jg extends b{constructor(e){super();a(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new Gg(e))}}function Ul(n,s){return n.length===s.length&&n.every((e,t)=>e===s[t])}class qg extends b{constructor(s){super(),this._viewer=s,this.d(_([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class Xg extends b{constructor(s,e){super(),this._viewer=s,this._activeViewer=e;const t=nt.createCommonProps(),i=[];Object.keys(t).forEach(c=>{const l=this._activeViewer[c+"Changed"];i.push(l)});const r=this.dv(ae(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(t).forEach(c=>{this._viewer[c]=this._activeViewer[c]})};this.d(r.don(o));const h=this.dv(Ks());h.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const c=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!c)return;const{position:u,rotation:p}=c;l&&Ul(u,l.position)&&Ul(p,l.rotation)||this._viewer.flyIn(u,p,0)}),this.d(()=>h.cancel())}}const Yg=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
1184
|
+
`,zg=`data 路径都可以使用下面回调函数
|
|
1185
|
+
\`\`\`
|
|
1186
|
+
${Wc}
|
|
1187
|
+
\`\`\`
|
|
1188
|
+
|
|
1189
|
+
`,za=Date.now(),Dt=class Dt extends M{constructor(e){super(e);a(this,"_flyToEvent",this.disposeVar(new v));a(this,"_resetClockEvent",this.disposeVar(new v));this.ad(D([this,"uri"],[this,"url"]))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"url"],"路径",M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/misc/simple.czml"),void 0,!0),new E([this,"clockEnabled"],"启用",!1),new f([this,"multiplier"],"倍速",Dt.defaults.multiplier),new E([this,"autoResetClock"],"自动设置时钟",!0),new Ve([this,"startTime"],"开始时间",Dt.defaults.startTime,!0),new Ve([this,"stopTime"],"结束时间",Dt.defaults.stopTime,!0),new Ve([this,"currentTime"],"当前时间",Dt.defaults.currentTime,!0),new A([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new A([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new E([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new E([this,"show"],"是否显示",!0),new E([this,"collision"],"开启碰撞",!1),new E([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new L("飞入",t=>this.flyTo(t),[1e3],"flyTo"),new L("重置时钟",()=>this.resetClock(),[],"resetClock"),new Xe([this,"loadFuncStr"],"loadFnStr",Wc,zg,!0)]}}};a(Dt,"createDefaultProps",()=>({show:!0,uri:void 0,url:void 0,allowPicking:!1,autoResetClock:!0,clockEnabled:!1,startTime:za,stopTime:za+1440*60*1e3,currentTime:za,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...M.createDefaultProps()})),a(Dt,"type",Dt.register("ESCzml",Dt,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESCzml 是用于加载和操作 CZML 数据(描述时空动态数据)的对象。
|
|
1190
|
+
对象json示例:
|
|
1191
|
+
{
|
|
1192
|
+
"id": "czml_xxx",
|
|
1193
|
+
"type": "ESCzml",
|
|
1194
|
+
"name": "Czml数据",
|
|
1195
|
+
"url": "http://localhost:9004/data/xxx.czml"
|
|
1196
|
+
}
|
|
1197
|
+
`}));let Ua=Dt;const Js=class Js extends M{getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new k,new E([this,"show"],"是否显示"),new f([this,"cssSize"],"尺寸"),new ne([this,"cssPosition"],"位置"),new N([this,"imgUrl"],"图片地址")]}}};a(Js,"createDefaultProps",()=>({...M.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),a(Js,"type",Js.register("ESNavigator",Js,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESNavigator 是用于在 3D 场景中显示和控制导航指示器(指南针)的控件对象。
|
|
1198
|
+
对象json示例:
|
|
1199
|
+
{
|
|
1200
|
+
"id": "navigator_xxx",
|
|
1201
|
+
"type": "ESNavigator",
|
|
1202
|
+
"name": "导航控件",
|
|
1203
|
+
"show": true,
|
|
1204
|
+
"cssSize": 100
|
|
1205
|
+
}
|
|
1206
|
+
`}));let Ba=Js;const Ft=class Ft extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new k("通用"),new E([this,"show"],"是否显示",Ft.defaults.show),new f([this,"height"],"高度",Ft.defaults.height,!0),new f([this,"fontSize"],"文字大小",Ft.defaults.fontSize,!0),new G([this,"bgColor"],"背景颜色",Ft.defaults.bgColor,!0)]}}};a(Ft,"createDefaultProps",()=>({...M.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:F([71/255,71/255,71/255,.8])})),a(Ft,"type",Ft.register("ESViewerStatusBar",Ft,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESViewerStatusBar 是用于在场景查看器底部显示状态栏信息的组件对象。
|
|
1207
|
+
对象json示例:
|
|
1208
|
+
{
|
|
1209
|
+
"id": "viewerstatusbar_xxx",
|
|
1210
|
+
"type": "ESViewerStatusBar",
|
|
1211
|
+
"name": "状态栏",
|
|
1212
|
+
"show": true,
|
|
1213
|
+
"height": 30
|
|
1214
|
+
}
|
|
1215
|
+
`}));let Wa=Ft;const kt=class kt extends M{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new k("通用"),new E([this,"show"],"是否显示",kt.defaults.show),new f([this,"height"],"高度",kt.defaults.height,!0),new f([this,"fontSize"],"文字大小",kt.defaults.fontSize,!0),new G([this,"bgColor"],"背景颜色",kt.defaults.bgColor,!0)]}}};a(kt,"createDefaultProps",()=>({...M.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:F([71/255,71/255,71/255,.8])})),a(kt,"type",kt.register("ESViewerStatusBarScale",kt,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESViewerStatusBarScale 是用于在场景查看器中显示比例尺状态栏的组件对象。
|
|
1216
|
+
对象json示例:
|
|
1217
|
+
{
|
|
1218
|
+
"id": "viewerstatusbarscale_xxx",
|
|
1219
|
+
"type": "ESViewerStatusBarScale",
|
|
1220
|
+
"name": "比例尺状态栏",
|
|
1221
|
+
"show": true,
|
|
1222
|
+
"height": 30
|
|
1223
|
+
}
|
|
1224
|
+
`}));let Ha=kt;const Hc=M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/location.png"),Gi=class Gi extends j{getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new N([this,"url"],"URL",Hc),new ne([this,"size_m"],"大小(米)",[10,10]),new ne([this,"minmaxScale"],"缩放范围",[0,2])]}}constructor(s){super(s)}};a(Gi,"createDefaultProps",()=>({...j.createDefaultProps(),url:Hc,size_m:[10,10],minmaxScale:[0,2]})),a(Gi,"type",Gi.register("ESGeoIcon",Gi,{chsName:"地理图标",tags:["ESObjects","_ES_Impl_Openlayers"],description:`ESGeoIcon 是用于在场景中指定位置显示自定义图标图片的可视化对象。
|
|
1225
|
+
对象json示例:
|
|
1226
|
+
{
|
|
1227
|
+
"type": "ESGeoIcon",
|
|
1228
|
+
"position": [116.39, 39.9, 0],
|
|
1229
|
+
"url": "\${earthsdk3-assets-script-dir}/assets/img/location.png"
|
|
1230
|
+
}
|
|
1231
|
+
`})),a(Gi,"supportEditingModes",[...j.supportEditingModes]);let $a=Gi;const Ji=class Ji extends j{getESProperties(){const s={...super.getESProperties()};return{...s,coordinate:[...s.coordinate,new f([this,"distance"],"长度",0,!1,!0)],style:[new k("点样式"),new E([this,"pointed"],"开启",!1),new f([this,"pointSize"],"点大小",1),new A([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new G([this,"pointColor"],"点颜色",[1,1,1,1])],basic:[...s.basic,new A([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new f([this,"radius"],"半径",10)]}}constructor(s){super(s)}};a(Ji,"createDefaultProps",()=>({...j.createDefaultProps(),pointed:!0,pointStyle:B({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2})})),a(Ji,"type",Ji.register("ESGeoPoint",Ji,{chsName:"地理点",tags:["ESObjects","_ES_Impl_Openlayers"],description:`ESGeoPoint 是用于在地图中显示地理点标记的可视化对象,支持自定义点样式。
|
|
1232
|
+
对象json示例:
|
|
1233
|
+
{
|
|
1234
|
+
"type": "ESGeoPoint",
|
|
1235
|
+
"position": [116.39, 39.9, 0]
|
|
1236
|
+
}
|
|
1237
|
+
`})),a(Ji,"supportEditingModes",[...j.supportEditingModes]);let Ga=Ji;const qs=class qs extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new N([this,"url"],"路径","",!0),new f([this,"progress"],"进度",0,!1,!0)]}}};a(qs,"createDefaultProps",()=>({...j.createDefaultProps(),url:"",progress:0})),a(qs,"type",qs.register("ESGaussianSplatting",qs,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGaussianSplatting 是用于加载和展示高斯溅射模型的对象。
|
|
1238
|
+
对象json示例:
|
|
1239
|
+
{
|
|
1240
|
+
"id": "gaussiansplatting_xxx",
|
|
1241
|
+
"type": "ESGaussianSplatting",
|
|
1242
|
+
"name": "高斯溅射模型",
|
|
1243
|
+
"position": [116.39, 39.9, 0],
|
|
1244
|
+
"url": "http://localhost:9004/gaussian/model.splat"
|
|
1245
|
+
}
|
|
1246
|
+
`}));let Ja=qs;class Ug extends b{constructor(s,e){if(super(),!e)return;const t=this.ad(new ee);t.stroked=!0,this.ad(s.components.disposableAdd(t)),this.ad(D([t,"points"],[s,"areaLiftingPoints"])),this.ad(t.editingChanged.don(()=>{t.editing||!this.isDestroyed()&&this.destroy()})),t.editing=!0}}var $c=(n=>(n[n.None=0]="None",n[n.Up=1]="Up",n[n.Down=2]="Down",n))($c||{}),Gc=(n=>(n[n.CLICK=0]="CLICK",n[n.MOVE=1]="MOVE",n))(Gc||{}),Jc=(n=>(n[n.Smooth=0]="Smooth",n[n.Linear=1]="Linear",n[n.Spherical=2]="Spherical",n[n.Tip=3]="Tip",n[n.Hard=4]="Hard",n))(Jc||{});const me=class me extends j{constructor(e){super(e);a(this,"_startEvent",this.disposeVar(new v));a(this,"_configs",this.disposeVar(q(void 0)));a(this,"_heights",this.disposeVar(w({})));a(this,"_heightsEvent",this.ad(new v));a(this,"_areaLiftingUpdateEvent",this.disposeVar(new v));const t=this.ad(oe(this.modeChanged,this.startEvent));this.ad(new le(t,()=>{var i;if(this.areaLiftingPoints=void 0,this.mode=="areaLifting")return new Ug(this,this.activeViewer);(i=this.activeViewer)==null||i.startEditing(this,I.BrushErase)}))}updateEditing(){var e;sr(this.position,[0,0,0])||(this.position=[0,0,0]),(e=this.activeViewer)==null||e.startEditing(this,I.Place,{callSource:"inner"})}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get configs(){return this._configs.value}set configs(e){this._configs.value=e}get configsChanged(){return this._configs.changed}getConfig(...e){var t,i;if(typeof e[0]=="number")return(t=this.configs)==null?void 0:t.find(r=>r.x===e[0]&&r.y===e[1]);if(typeof e[0]=="string")return(i=this.configs)==null?void 0:i.find(r=>r.url===e[0])}get heights(){return this._heights.value}set heights(e){this._heights.value=e}get heightsChanged(){return this._heights.changed}get heightsEvent(){return this._heightsEvent}getHeights(){return new Promise((e,t)=>{const i=new b;i.ad(this._heightsEvent.don(o=>{o!=="start"&&(!i.isDestroyed()&&i.destroy(),e(o))})),this._heightsEvent.emit("start");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get areaLiftingUpdateEvent(){return this._areaLiftingUpdateEvent}areaLiftingUpdate(){this._areaLiftingUpdateEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L("开始编辑",()=>{this.start()},[],"start"),new A([this,"mode"],me.modes,"编辑模式",me.defaults.mode)],basic:[...e.basic,new R([this,"url"],"URL"),new R([this,"tileInfo"],"瓦片信息配置"),new f([this,"maxHeight"],"最大高度"),new f([this,"minHeight"],"最小高度"),new f([this,"offset"],"偏移"),new E([this,"autoLoadHeights"],"自动加载高度"),new k("刷写设置"),new f([this,"brushEraseRadius"],"编辑半径"),new ne([this,"brushEraseRadiusRange"],"编辑半径范围",void 0,!0,!0),new A([this,"brushEraseMode"],Object.entries(["CTRL","SHIFT","NONE"]),"刷写模式"),new A([this,"brushErasePickReference"],me.brushErasePickReferences,"选择参考"),new nt([this,"brushErasePosition"],"刷写位置"),new nt([this,"brushEraseStartPosition"],"刷写起始位置"),new A([this,"brushEraseFalloff"],me.brushEarseFalloffs,"刷写衰减函数"),new A([this,"brushEraseRayDirection"],[["Up","Up"],["Down","Down"]],"刷写射线方向"),new k("平整设置"),new A([this,"flattenMode"],me.flattenModes,"平整模式",0),new A([this,"flattenPick"],me.flattenPicks,"平整选择",0),new f([this,"flattenOffset"],"平整偏移",-.01),new k("区域升降设置"),new ie([this,"areaLiftingPoints"],"区域升降位置",[]),new f([this,"areaLiftingOffset"],"区域升降偏移",1),new L("区域升降更新",()=>{this.areaLiftingUpdate()},[],"areaLiftingUpdate"),new k("围栏设置"),new ie([this,"fencePoints"],"围栏位置",[])]}}};a(me,"createDefaultProps",()=>({...j.createDefaultProps(),allowPicking:!0,url:"",maxHeight:0,minHeight:0,offset:.01,tileInfo:B({tileCountX:65,tileCountY:65,tileMaximumLevel:15,tilesPerAxis:5,format:"heights"}),mode:w("sculpt"),autoLoadHeights:!1,brushEraseRadius:100,brushEraseRadiusRange:F([0,100]),brushErasePosition:F([0,0,0]),brushEraseStartPosition:F([0,0,0]),brushEraseMode:w("NONE"),brushErasePickReference:w("NONE"),brushEraseRayDirection:w("Down"),brushEraseFalloff:w(4),flattenMode:w(0),flattenPick:w(1),flattenOffset:-.01,areaLiftingPoints:Yt(void 0),areaLiftingOffset:1,fencePoints:Yt(void 0),fenceMode:w("in")})),a(me,"modes",[["雕刻","sculpt"],["抹除","erase"],["平滑","smooth"],["平整","flatten"],["区域升降","areaLifting"]]),a(me,"brushErasePickReferences",[["无限制","NONE"],["地形图层","ESTerrainLayerEditing"],["3DTiles","ES3DTileset"]]),a(me,"flattenModes",[["None",0],["Up",1],["Down",2]]),a(me,"flattenPicks",[["CLICK",0],["MOVE",1]]),a(me,"brushEarseFalloffs",[["平滑",0],["线性",1],["硬边",4],["球形",2],["尖顶",3]]),a(me,"invalidValue",-1e4),a(me,"type",me.register("ESTerrainLayerEditing",me,{chsName:"地形图层编辑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESTerrainLayerEditing 是用于对地形图层进行雕刻、抹除、平滑、平整及区域升降等编辑操作的对象。"})),a(me,"supportEditingModes",[...j.supportEditingModes,I.Place,I.BrushErase]);let xn=me;const Je=class Je extends U{constructor(e){super(e);a(this,"editingBindMode","doublePoints");a(this,"_startEvent",this.disposeVar(new v));a(this,"_replayEvent",this.disposeVar(new v));this.ad(this.startEvent.don(()=>{var t;(t=this.activeViewer)==null||t.startEditing(this,I.BrushErase)}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get replayEvent(){return this._replayEvent}replay(){this._replayEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L("开始编辑",()=>this.start(),[]),new L("重播",()=>this.replay(),[]),new E([this,"showImage"],"显示影像",Je.defaults.showImage),new f([this,"flowSpeed"],"流动速度",Je.defaults.flowSpeed),new f([this,"gravity"],"重力加速度",Je.defaults.gravity),new f([this,"strength"],"泥石流强度",Je.defaults.strength),new f([this,"resistance"],"泥石流阻力(越大越快平息)",Je.defaults.resistance),new f([this,"terrainOffset"],"地形高度偏移",Je.defaults.terrainOffset),new ie([this,"slidePoints"],"滑坡点数组",U.defaults.slidePoints,void 0),new k("刷写设置"),new f([this,"brushEraseRadius"],"编辑半径"),new ne([this,"brushEraseRadiusRange"],"编辑半径范围",void 0,!0,!0),new A([this,"brushEraseMode"],Object.entries(["CTRL","SHIFT","NONE"]),"刷写模式"),new A([this,"brushErasePickReference"],xn.brushErasePickReferences,"选择参考"),new nt([this,"brushErasePosition"],"刷写位置"),new nt([this,"brushEraseStartPosition"],"刷写起始位置"),new A([this,"brushEraseFalloff"],xn.brushEarseFalloffs,"刷写衰减函数"),new A([this,"brushEraseRayDirection"],[["Up","Up"],["Down","Down"]],"刷写射线方向")]}}};a(Je,"createDefaultProps",()=>({...U.createDefaultProps(),brushEraseRadius:100,brushEraseRadiusRange:F([0,1e3]),brushErasePosition:F([0,0,0]),brushEraseStartPosition:F([0,0,0]),brushEraseMode:w("NONE"),brushErasePickReference:w("NONE"),brushEraseRayDirection:w("Down"),terrainOffset:5,flowSpeed:1,gravity:9.8,slidePoints:F([]),strength:1,showImage:!0,resistance:.98,stroked:!0,strokeStyle:B({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!0})})),a(Je,"type",Je.register("ESLandSlide",Je,{chsName:"滑坡泥石流分析",tags:["ESObjects","_ES_Impl_Cesium"],description:`ESLandSlide 是用于在场景中通过双点绘制区域进行滑坡泥石流分析的对象。
|
|
1247
|
+
对象json示例:
|
|
1248
|
+
{
|
|
1249
|
+
"id": "landslide_xxx",
|
|
1250
|
+
"type": "ESLandSlide",
|
|
1251
|
+
"name": "滑坡泥石流分析",
|
|
1252
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1253
|
+
"flowSpeed": 1.0
|
|
1254
|
+
}
|
|
1255
|
+
`})),a(Je,"supportEditingModes",[...U.supportEditingModes,I.DoublePoints,I.DoublePointsAppend,I.DoublePointsModify,I.BrushErase]);let qa=Je;const qi=class qi extends j{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new N([this,"mesh"],"mesh地址",qi.defaults.mesh)]}}};a(qi,"createDefaultProps",()=>({...j.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),a(qi,"type",qi.register("ESStaticMesh",qi,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:`ESStaticMesh 是用于在 Unreal Engine 场景中指定位置创建和管理静态网格对象的对象。
|
|
1256
|
+
对象json示例:
|
|
1257
|
+
{
|
|
1258
|
+
"id": "staticmesh_xxx",
|
|
1259
|
+
"type": "ESStaticMesh",
|
|
1260
|
+
"name": "静态网格",
|
|
1261
|
+
"position": [116.39, 39.9, 0]
|
|
1262
|
+
}
|
|
1263
|
+
`}));let Xa=qi;const Xs=class Xs extends U{constructor(e){super(e);a(this,"_startEvent",this.dv(new v));a(this,"_clearEvent",this.dv(new v));a(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Ti),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(_([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(_([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(_([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(_([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(_([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(_([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L("开始分析",()=>this.start(),[],"start"),new L("清除分析",()=>this.clear(),[],"clear"),new ie([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new ie([this,"depths"],"深度值",[],void 0,!1,!0),new f([this,"radius"],"半径",1e4,!0)]}}};a(Xs,"createDefaultProps",()=>({...U.createDefaultProps(),windowPositions:ir([]),depths:q([]),radius:w(1e4)})),a(Xs,"type",Xs.register("ESSkylineAnalysis",Xs,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESSkylineAnalysis 是用于沿指定观察点进行天际线分析的可视化对象。
|
|
1264
|
+
对象json示例:
|
|
1265
|
+
{
|
|
1266
|
+
"id": "skylineanalysis_xxx",
|
|
1267
|
+
"type": "ESSkylineAnalysis",
|
|
1268
|
+
"name": "天际线分析",
|
|
1269
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1270
|
+
"radius": 10000
|
|
1271
|
+
}
|
|
1272
|
+
`}));let Ya=Xs;const Ht=class Ht extends X{constructor(s){super(s)}getESProperties(){const s=super.getESProperties();return{...s,basic:[...s.basic,new ie([this,"data"],"数据",[],void 0,!0),new R([this,"gradient"],"渐变",Ht.defaults.gradient,void 0,!0),new f([this,"radius"],"半径",Ht.defaults.radius,void 0,!0),new f([this,"blur"],"模糊",Ht.defaults.blur,!0),new E([this,"is3D"],"is3D",!1,!0)]}}};a(Ht,"createDefaultProps",()=>({...X.createDefaultProps(),is3D:w(!1),data:Yt([]),gradient:te({".5":"green",".7":"yellow",".95":"red"}),radius:w(10),blur:w(.85)})),a(Ht,"type",Ht.register("ESHeatMap",Ht,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESHeatMap 是用于在场景中显示热力图的可视化对象。
|
|
1273
|
+
对象json示例:
|
|
1274
|
+
{
|
|
1275
|
+
"id": "heatmap_xxx",
|
|
1276
|
+
"type": "ESHeatMap",
|
|
1277
|
+
"name": "热力图",
|
|
1278
|
+
"radius": 10,
|
|
1279
|
+
"blur": 0.85,
|
|
1280
|
+
"data":[[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]]
|
|
1281
|
+
}
|
|
1282
|
+
`}));let Sr=Ht;const Xi=class Xi extends U{constructor(e){super(e);a(this,"editingBindMode","scatter")}};a(Xi,"createDefaultProps",()=>({...U.createDefaultProps(),pointed:!0})),a(Xi,"type",Xi.register("ESGeoPoints",Xi,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:`ESGeoPoints 是用于在地图中可视化地理点集合的对象。
|
|
1283
|
+
对象json示例:
|
|
1284
|
+
{
|
|
1285
|
+
"id": "geopoints_xxx",
|
|
1286
|
+
"type": "ESGeoPoints",
|
|
1287
|
+
"name": "地理点集合",
|
|
1288
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1289
|
+
"pointed": true
|
|
1290
|
+
}
|
|
1291
|
+
`})),a(Xi,"supportEditingModes",[...U.supportEditingModes,I.ScatterAppend,I.ScatterModify]);let On=Xi;const qc=async(n,s=[],e)=>{const t=[];for(const i of s){const{coordinates:r}=i.geometry;for(const o of r){const l=await Promise.all(o.map(async h=>{let c=h[2]??0;if(e)if(e.type==="absolute")c=e.height??c;else if(e.type==="relative"){const u=await n.getTerrainHeight([h[0],h[1]])??0;c=(e.height??c)+u}else e.type==="terrain"&&(c=await n.getTerrainHeight([h[0],h[1]])??0);return[h[0],h[1],c]}));t.push({...i,points:l})}}return t},Xc=async(n,s=[],e)=>await Promise.all(s.map(async t=>{var h,c,u,p,g,m,y,S,C;const i=((h=t.geometry)==null?void 0:h.x)??((u=(c=t.geometry)==null?void 0:c.coordinates)==null?void 0:u[0]),r=((p=t.geometry)==null?void 0:p.y)??((m=(g=t.geometry)==null?void 0:g.coordinates)==null?void 0:m[1]);let l=((y=t.geometry)==null?void 0:y.z)??((C=(S=t.geometry)==null?void 0:S.coordinates)==null?void 0:C[2])??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const T=await n.getTerrainHeight([i,r])??0;l=(e.height??l)+T}else e.type==="terrain"&&(l=await n.getTerrainHeight([i,r])??0);return{...t,points:[i,r,l]}})),Yc=async(n,s=[],e)=>{const t=[];return await Promise.all(s.map(async i=>{const{coordinates:r}=i.geometry;await Promise.all(r.map(async o=>{const l=await Promise.all(o.map(async h=>{let c=h[2]??0;if(e)if(e.type==="absolute")c=e.height??c;else if(e.type==="relative"){const u=await n.getTerrainHeight([h[0],h[1]])??0;c=(e.height??c)+u}else e.type==="terrain"&&(c=await n.getTerrainHeight([h[0],h[1]])??0);return[h[0],h[1],c]}));t.push({...i,points:l})}))})),t};function Bg(n){const s=K.lineString(n),e=K.length(s),t=K.along(s,e/2);return[t.geometry.coordinates[0],t.geometry.coordinates[1],t.geometry.coordinates[2]||0]}function Wg(n,s){const e=K.lineString(n),t=K.length(e),i=Math.floor(t/s),r=[];if(r.push(n[0]),i<1)return[n[0]];for(let o=1;o<i;o+=1){const l=K.along(e,t*(o/i));r.push([l.geometry.coordinates[0],l.geometry.coordinates[1],l.geometry.coordinates[2]||0])}return r}function Hg(n){const s=[...n];JSON.stringify(n[0])!==JSON.stringify(n[n.length-1])&&s.push(n[0]);const e=K.polygon([s]),t=K.center(e);return[t.geometry.coordinates[0],t.geometry.coordinates[1],t.geometry.coordinates[2]||0]}function Kc(n,s,e){const t=n.dv(new ms);for(const i in e)i!=="type"&&(t[i]=e[i]);t.position=s,n.d(n.components.disposableAdd(t))}function Ka(n,s,e,t){let i=t.textTemplate||t.symbol.text||"";const r=/{{(.*?)}}/;for(;r.test(i);){const u=i.match(r);if(u){const p=u[1].trim(),g=e[`${p}`]||"-";i=i.replace(u[0],g)}}let o=t.symbol;const{minVisibleDistance:l,maxVisibleDistance:h}=t;l&&h&&(o={...o,minVisibleDistance:l,maxVisibleDistance:h});const c={...o,text:i};Kc(n,s,c)}function ws(n,s){const e={width:null,height:null,color:null,opacity:null,rotation:null};return s.forEach(t=>{t.type==="size"?t.axis==="width"?e.width=n[t.field]||null:t.axis==="height"&&(e.height=n[t.field]||null):t.type==="color"?e.color=n[t.field]||null:t.type==="opacity"?e.opacity=n[t.field]||null:t.type==="rotation"&&(e.rotation=n[t.field]||null)}),e}function Za(n,s,e){const i={...s.symbol};if(e&&e.length>0){const r=ws(n,e);for(let o in r)i[o]!==void 0&&r[o]!==null&&(i[o]=r[o])}return i}function Qa(n,s,e){var c,u;const t=s,{uniqueValueInfos:i,field:r,fieldDelimiter:o,defaultSymbol:l}=t;let h={...l};if(Array.isArray(r)){const g=r.map(m=>n[m]??"").join(o);h=((c=i.find(m=>m.value==g))==null?void 0:c.symbol)||l}else h=((u=i.find(p=>p.value==n[r]))==null?void 0:u.symbol)||l;if(e&&e.length>0){const p=ws(n,e);for(let g in p)h[g]!==void 0&&p[g]!==null&&(h[g]=p[g])}return h}function el(n,s,e){const t=s,{classBreakInfos:i,field:r,defaultSymbol:o}=t;let l=o;const h=n[r];if(h===void 0||typeof h!="number")l=o;else{const c=i.find(u=>h<=u.maxValue&&h>=u.minValue);c?l=c.symbol:l=o}if(e&&e.length>0){const c=ws(n,e);for(let u in c)l[u]!==void 0&&c[u]!==null&&(l[u]=c[u])}return l}function $g(n,s){function e(c,u,p,g){const m=$=>$*Math.PI/180,y=$=>$*180/Math.PI,S=m(c),C=m(p),T=m(g-u),V=Math.sin(T)*Math.cos(C),z=Math.cos(S)*Math.sin(C)-Math.sin(S)*Math.cos(C)*Math.cos(T),x=Math.atan2(V,z);return(y(x)+360)%360}function t(c,u,p,g,m){const S=Q=>Q*Math.PI/180,C=Q=>Q*180/Math.PI,T=g/6371e3,V=S(m),z=S(c),x=S(u),$=Math.asin(Math.sin(z)*Math.cos(T)+Math.cos(z)*Math.sin(T)*Math.cos(V)),Y=x+Math.atan2(Math.sin(V)*Math.sin(T)*Math.cos(z),Math.cos(T)-Math.sin(z)*Math.sin($));return{lat:C($),lng:C(Y),alt:p}}function i(c){const u=[];c.length>1&&u.push(e(c[0].lat,c[0].lng,c[1].lat,c[1].lng));for(let p=1;p<c.length-1;p++){const g=e(c[p-1].lat,c[p-1].lng,c[p].lat,c[p].lng),m=e(c[p].lat,c[p].lng,c[p+1].lat,c[p+1].lng);let y=(g+m)/2;Math.abs(g-m)>180&&(y=(y+180)%360),u.push(y)}return c.length>1&&u.push(e(c[c.length-2].lat,c[c.length-2].lng,c[c.length-1].lat,c[c.length-1].lng)),c.length===1&&u.push(0),u}if(!n||n.length<2)throw new Error("至少需要两个点才能生成路径");if(s<=0)throw new Error("宽度必须大于0");const r=s/2,o=i(n),l=[],h=[];for(let c=0;c<n.length;c++){const u=(o[c]+90)%360,p=(o[c]+270)%360,g=n[c].alt!==void 0?n[c].alt:0;l.push(t(n[c].lat,n[c].lng,g,r,u)),h.push(t(n[c].lat,n[c].lng,g,r,p))}return l.concat(h.reverse())}function Gg(n,s,e,t){function i(S){return S*(Math.PI/180)}const r=6378137,o=i(n),l=i(s),h=i(e),c=i(t),u=h-o,p=c-l,g=Math.sin(u/2)**2+Math.cos(o)*Math.cos(h)*Math.sin(p/2)**2,m=2*Math.atan2(Math.sqrt(g),Math.sqrt(1-g));return r*m}const Zc=(n,s,e)=>Array.isArray(s)?s.map(r=>n[r]??"").join(e):n[s]??"";function Qc(n,s){const t={...s.symbol};return{points:n.map(i=>i.points),symbol:t}}function ed(n,s){const e=s,{uniqueValueInfos:t,field:i,fieldDelimiter:r,defaultSymbol:o}=e,l=[],h=t.reduce((u,p)=>{const g=p.value.toString();return u[g]={points:[],value:p.value,symbol:p.symbol},u},{});for(let u=0;u<n.length;u++){const p=n[u],g=Zc(p,i,r);if(g!==void 0&&g!==""){const m=h[g.toString()];m?m.points.push(p.points):l.push(p.points)}else l.push(p.points)}const c=[];for(let u in h){const{points:p,symbol:g}=h[u];p.length>0&&c.push({points:p,symbol:g})}return l.length>0&&c.push({points:l,symbol:o}),c}function td(n,s){const e=s,{classBreakInfos:t,field:i,defaultSymbol:r}=e,o=[],l=t.map(c=>({...c,points:[]}));for(let c=0;c<n.length;c++){const u=n[c],p=u[i];if(p===void 0||typeof p!="number")o.push(u.points);else{const g=l.findIndex(m=>p<=m.maxValue&&p>=m.minValue);g!==-1?l[g].points.push(u.points):o.push(u.points)}}const h=[];return l.forEach(c=>{c.points.length>0&&h.push({points:c.points,symbol:c.symbol})}),o.length>0&&h.push({points:o,symbol:r}),h}function Jg(n,s,e=[]){const i={...s.symbol},r=n.map(o=>{const l=ws(o,e);return{position:o.points,rotation:l.rotation||i.rotation||[0,0,0],scale:i.scale||[1,1,1]}});return{url:i.url,locations:r}}function qg(n,s,e=[]){const t=s,{uniqueValueInfos:i,field:r,fieldDelimiter:o}=t,l=t.defaultSymbol,h=[],c=i.reduce((p,g)=>{const m=g.value.toString();return p[m]={locations:[],value:g.value,symbol:g.symbol},p},{});for(let p=0;p<n.length;p++){const g=n[p],m=Zc(g,r,o);if(m){const y=c[m.toString()];if(y){const S=ws(g,e);y.locations.push({position:g.points,rotation:S.rotation||l.rotation||[0,0,0],scale:l.scale||[1,1,1]})}else h.push({position:g.points,rotation:l.rotation||[0,0,0],scale:l.scale||[1,1,1]})}else h.push({position:g.points,rotation:l.rotation||[0,0,0],scale:l.scale||[1,1,1]})}const u=[];for(let p in c){const{locations:g,symbol:m}=c[p];g.length>0&&u.push({url:m.url,locations:g})}return h.length>0&&u.push({url:l.url,locations:h}),u}function Xg(n,s,e=[]){const t=s,{classBreakInfos:i,field:r}=t,o=t.defaultSymbol,l=[],h=i.map(u=>({...u,locations:[]}));for(let u=0;u<n.length;u++){const p=n[u],g=p[r];if(g===void 0||typeof g!="number")l.push({position:p.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const m=h.findIndex(y=>g<=y.maxValue&&g>=y.minValue);if(m!==-1){const y=ws(p,e);h[m].locations.push({position:p.points,rotation:y.rotation||o.rotation||[0,0,0],scale:h[m].symbol.scale||[1,1,1]})}else l.push({position:p.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const c=[];return h.forEach(u=>{u.locations.length>0&&c.push({url:u.symbol.url,locations:u.locations})}),l.length>0&&c.push({url:o.url,locations:l}),c}class Yg extends b{constructor(e,t,i,r){super();a(this,"labelingInfo");this.sceneObject=e;const o=t;if(r&&_t(o,l=>{this.renderLabel(l,r)}),i)if(i.type==="simple"){const{visualVariables:l}=i;if(i.symbol.type==="simple-point"&&(!l||l.length==0)){console.log("PointLayer:大批量点渲染!");const h=Qc(o,i);this._simplePointAllRender(h.points,h.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!l||l.length==0)){console.log("PointLayer:大批量点渲染成图标!");const h=Qc(o,i);this._imageAllRender(h.points,h.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:h,locations:c}=Jg(o,i,l);this._modelAllRender(h,c);return}for(let h=0;h<o.length;h++){const c=Za(o[h],i,l);this.render(o[h],c)}}else if(i.type==="unique-value"){const{visualVariables:l}=i;if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!l||l.length==0)){console.log("PointLayer:大批量点渲染!"),ed(o,i).forEach(({points:g,symbol:m})=>{this._simplePointAllRender(g,m)});return}if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!l||l.length==0)){console.log("PointLayer:大批量点渲染成图标!"),ed(o,i).forEach(({points:g,symbol:m})=>{this._imageAllRender(g,m)});return}if(i.uniqueValueInfos.findIndex(p=>p.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),qg(o,i,l).forEach(({url:g,locations:m})=>{this._modelAllRender(g,m)});return}for(let p=0;p<o.length;p++){const g=Qa(o[p],i,l);this.render(o[p],g)}}else if(i.type==="class-breaks"){const{visualVariables:l}=i;if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!l||l.length==0)){console.log("PointLayer:大批量点渲染!"),td(o,i).forEach(({points:g,symbol:m})=>{this._simplePointAllRender(g,m)});return}if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!l||l.length==0)){console.log("PointLayer:大批量点渲染成图标!"),td(o,i).forEach(({points:g,symbol:m})=>{this._imageAllRender(g,m)});return}if(i.classBreakInfos.findIndex(p=>p.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),Xg(o,i,l).forEach(({url:g,locations:m})=>{this._modelAllRender(g,m)});return}for(let p=0;p<o.length;p++){const g=el(o[p],i,l);this.render(o[p],g)}}else if(i.type==="heatmap"){const{field:l,fieldValueMax:h,fieldValueMin:c}=i;console.time();const u=o.map(p=>{const{points:g}=p;if(l&&typeof l=="string"){let m=p[l];typeof m=="number"&&(typeof h=="number"&&m>h&&(m=h),typeof c=="number"&&m<c&&(m=c),g[2]=m)}return g});this.renderHeatmap(u,i)}else console.error("PointLayer: renderer type is not supported")}renderLabel(e,t){const{points:i}=e;Ka(this.sceneObject,i,e,t)}renderHeatmap(e,t){const{is3D:i,radius:r,blur:o,gradient:l}=t,h=this.dv(new Sr);this.d(this.sceneObject.components.disposableAdd(h)),h.is3D=i,h.radius=r,h.blur=o,l&&(h.gradient={...l}),h.data=e}render(e,t){t.type==="simple-point"?this._simplePointRender(e,t):t.type==="ESImageLabel"?this._simpleImageRender(e,t):t.type==="ESGltfModel"?this._simpleModelRender(e,t):t.type==="ESTextLabel"?Kc(this.sceneObject,e.points,t):t.type==="ESParticleSystemPrimitive"?this._simpleParticleRender(e,t):console.error(" PointLayer: symbol type is not supported")}_simplePointRender(e,t){const{points:i}=e,{size:r,color:o,outlineColor:l,outlineWidth:h}=t,c=this.dv(new On);this.d(this.sceneObject.components.disposableAdd(c)),c.pointed=!0,c.pointOutlineColor=l,c.pointOutlineWidth=h,c.pointSize=r,c.pointColor=o,c.allowPicking=(t==null?void 0:t.allowPicking)??!0,c.extras={selected:!1},c.points=[i]}_simplePointAllRender(e,t){const{size:i,color:r,outlineColor:o,outlineWidth:l}=t,h=this.dv(new On);this.d(this.sceneObject.components.disposableAdd(h)),h.pointed=!0,h.pointOutlineColor=o,h.pointOutlineWidth=l,h.pointSize=i,h.pointColor=r,h.allowPicking=(t==null?void 0:t.allowPicking)??!0,h.points=[...e]}_simpleImageRender(e,t){const{points:i}=e,{rotation:r,offset:o,size:l,url:h,screenRender:c,anchor:u,renderMode:p,rotationType:g}=t,m=this.dv(new pr),y=this.dv(new ms);this.d(this.sceneObject.components.disposableAdd(m)),this.d(this.sceneObject.components.disposableAdd(y)),m.url=h,m.renderMode=p??0,r&&(m.rotation=r),o&&(m.offset=o),m.size=l||[32,32],u&&(m.anchor=u),g&&(m.rotationType=g),m.screenRender=c??!0,m.allowPicking=(t==null?void 0:t.allowPicking)??!0,m.extras={selected:!1},m.position=[...i],m.sizeByContent=!1,y.allowPicking=(t==null?void 0:t.allowPicking)??!0;const S=l?Math.max(...l)+10:Math.max(...m.size)+10;y.sizeByContent=!1,y.screenRender=!0,y.size=[S,S],y.borderRadius=[S,S,S,S],y.padding=[S/2,S/2,S/2,S/2],y.borderWidth=S/10,y.offset=[0,S/10+5],y.text="",y.backgroundColor=[0,0,0,0],y.borderColor=[0,0,0,0]}_imageAllRender(e,t){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e}}]},r=this.dv(new Pn);this.d(this.sceneObject.components.disposableAdd(r));const o=this.dv(new ms);this.d(this.sceneObject.components.disposableAdd(o)),r.textDefaultText="";const{offset:l,size:h,url:c,anchor:u}=t;r.imageUrl=c,u&&(r.imageAnchor=u),l&&(r.imageOffset=l),r.imageSize=h||[32,32],r.url=i,r.allowPicking=(t==null?void 0:t.allowPicking)??!0,r.extras={selected:!1},o.allowPicking=!0;const p=h?Math.max(...h)+10:Math.max(...r.imageSize)+10;o.sizeByContent=!1,o.size=[p,p],o.borderRadius=[p,p,p,p],o.padding=[p/2,p/2,p/2,p/2],o.borderWidth=p/10,o.offset=[0,p/10+5],o.text="",o.backgroundColor=[0,0,0,0],o.borderColor=[0,0,0,0]}_simpleModelRender(e,t){const{points:i}=e,{rotation:r,scale:o,url:l}=t,h=this.dv(new Et);this.d(this.sceneObject.components.disposableAdd(h)),h.url=l,r&&(h.rotation=r),o&&(h.scale=o),h.position=[...i]}_modelAllRender(e,t){const i=this.dv(new Et);this.d(this.sceneObject.components.disposableAdd(i)),i.url=e,i.instances=t}_simpleParticleRender(e,t){const{points:i}=e,r=this.dv(new gr);this.d(this.sceneObject.components.disposableAdd(r)),r.position=[...i],Object.keys(t).forEach(o=>{r[o]=t[o]})}}class Kg extends b{constructor(s,e,t,i){super(),this.sceneObject=s;const r=e;if(i&&_t(r,o=>{this.renderLabel(o,i)}),t)if(t.type==="simple"){const{visualVariables:o}=t;_t(r,l=>{const h=Za(l,t,o);this.render(l,h)})}else if(t.type==="unique-value"){const{visualVariables:o}=t;_t(r,l=>{const h=Qa(l,t,o);this.render(l,h)})}else if(t.type==="class-breaks"){const{visualVariables:o}=t;_t(r,l=>{const h=el(l,t,o);this.render(l,h)})}else console.error("PolyLineLayer: renderer type is not supported")}render(s,e){console.log("PolyLineLayer: render",s,e),e.type==="simple-line"?this._simpleLineRender(s,e):e.type==="ESPolygonFence"?this._esPolygonFenceRender(s,e):e.type==="ESPipeFence"?this._esPipeFenceRender(s,e):e.type==="ESPath"?this._esPathRender(s,e):e.type==="ESlineInterpolationModel"?this._eslineInterpolationModelRender(s,e):e.type==="ESlineWall"?this._eslineWallRender(s,e):console.error("PolyLineLayer: symbol type is not supported")}_simpleLineRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ve);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.stroked=!0,i.strokeColor=e.color,i.strokeWidth=e.width||1,i.allowPicking=(e==null?void 0:e.allowPicking)??!0,i.extras={selected:!1}}_esPolygonFenceRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new _r);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.height=e.height,i.materialMode=e.materialMode}_esPipeFenceRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new vr);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...t],i.height=e.height,i.width=e.width,i.materialMode=e.materialMode}_esPathRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new ys),r=this.dv(new _s);if(this.d(this.sceneObject.components.disposableAdd(i)),this.d(this.sceneObject.components.disposableAdd(r)),i.points=[...t],i.speed=e.speed,i.strokeColor=e.color,i.materialMode=e.materialMode,i.strokeWidth=e.width||1,e!=null&&e.runModel){const l=e==null?void 0:e.runSpeed,h=e==null?void 0:e.modelSymbol;let c;switch(e==null?void 0:e.runModel){case"ESHuman":c=this.dv(new Be);break;case"ESCar":c=this.dv(new hr);break;case"ESGltfModel":c=this.dv(new Et)}if(this.d(this.sceneObject.components.disposableAdd(c)),h)for(let p in h)c[p]=h[p];const u=[0];for(var o=0;o<t.length-1;o+=1){const p=t[o],g=t[o+1],m=Gg(p[1],p[0],g[1],g[0]);u.push(u[o]+Math.ceil(m/l)*1e3)}i.timeStamps=u,e!=null&&e.runSpeed&&(i.currentPositionChanged.don(p=>{i.currentPosition&&(c.position=i.currentPosition,i.currentRotation&&(c.rotation=i.currentRotation))}),r.startTime=0,r.stopTime=u[u.length-1],r.playing=!0,r.loop=(e==null?void 0:e.runLoop)??!0,r.currentTimeChanged.don(p=>{i.path.currentTime=p}))}}_eslineInterpolationModelRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=(e==null?void 0:e.interpolationDistance)??0;if(!i)return;const r=Wg(t,i/1e3),o=this.dv(new Et);this.d(this.sceneObject.components.disposableAdd(o)),o.url=e.url,o.instances=r.map(l=>({position:l,rotation:e.rotation,scale:e.scale}))}_eslineWallRender(s,e){const{points:t}=s;if(t.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=e.height??0,r=e.width??0,o=e.extrudedHeight??0,l=t.map(u=>({lng:(u==null?void 0:u[0])??0,lat:(u==null?void 0:u[1])??0,alt:(u==null?void 0:u[2])??0})),h=$g(l,r).map(u=>[(u==null?void 0:u.lng)??0,(u==null?void 0:u.lat)??0,(u==null?void 0:u.alt)??0]),c=this.dv(new Ti);this.d(this.sceneObject.components.disposableAdd(c)),c.height=i,c.extrudedHeight=o,c.filled=e.filled??!0,c.fillColor=e.fillColor,c.allowPicking=(e==null?void 0:e.allowPicking)??!0,c.extras={selected:!1},c.points=h}renderLabel(s,e){const{points:t}=s,i=Bg(t);Ka(this.sceneObject,i,s,e)}}function id(n,s){try{JSON.stringify(n[n.length-1])!==JSON.stringify(n[0])&&n.push(n[0]);const e=K.featureCollection(n.map(h=>K.point(h))),t=K.polygon([n]),i={gridType:"point",units:"meters"};return K.interpolate(e,s,i).features.map(h=>h.geometry.coordinates)[0][0].filter(h=>K.booleanPointInPolygon(K.point(h),t))}catch(e){return console.error(e),[]}}class Zg extends b{constructor(s,e,t,i){super(),this.sceneObject=s;const r=e;if(i&&_t(r,o=>{this.renderLabel(o,i)}),t)if(t.type==="simple"){const{visualVariables:o}=t;_t(r,l=>{const h=Za(l,t,o);this.render(l,h)})}else if(t.type==="unique-value"){const{visualVariables:o}=t;_t(r,l=>{const h=Qa(l,t,o);this.render(l,h)})}else if(t.type==="class-breaks"){const{visualVariables:o}=t;_t(r,l=>{const h=el(l,t,o);this.render(l,h)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(s,e){const{points:t}=s;console.log("PolygonLayer: renderLabel",t);const i=Hg(t);Ka(this.sceneObject,i,s,e)}render(s,e){e.type==="simple-fill"?this._simplePolygonRender(s,e):e.type==="ESGeoExtrudedPolygon"?this._esGeoExtrudedPolygonRender(s,e):e.type==="PolygonInterpolateESGltfModel"?this._polygonInterpolateESGltfModelRender(s,e):e.type==="PolygonInterpolateESImageLabel"?this._polygonInterpolateESImageLabelRender(s,e):console.error("PolyLineLayer: symbol type is not supported")}_simplePolygonRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{color:i,outline:r,filled:o,ground:l}=e,{width:h,color:c,stroked:u}=r,p=this.dv(new ee);this.d(this.sceneObject.components.disposableAdd(p)),p.stroked=u??!1,p.strokeColor=c??[1,1,1,1],p.strokeWidth=h??1,p.filled=o??!0,p.fillGround=l??!1,p.fillColor=i??[1,1,1,1],p.allowPicking=(e==null?void 0:e.allowPicking)??!0,p.extras={selected:!1},p.points=[...t]}_esGeoExtrudedPolygonRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,extrudedHeight:r,color:o}=e,l=this.dv(new Ti);this.d(this.sceneObject.components.disposableAdd(l)),l.height=i,l.extrudedHeight=r,l.filled=!0,l.fillColor=o,l.allowPicking=(e==null?void 0:e.allowPicking)??!0,l.extras={selected:!1},l.points=[...t]}_polygonInterpolateESGltfModelRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:r,url:o,rotation:l,scale:h}=e,c=id(t,r??10),u=this.dv(new Et);this.d(this.sceneObject.components.disposableAdd(u)),u.url=o,u.instances=c.map(p=>({position:[...p,i??0],rotation:l??[0,0,0],scale:h??[1,1,1]}))}_polygonInterpolateESImageLabelRender(s,e){const{points:t}=s;if(t.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:r,offset:o,size:l,url:h,anchor:c}=e,p={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...id(t,r??10).map(m=>[...m,i??0])]}}]},g=this.dv(new Pn);this.d(this.sceneObject.components.disposableAdd(g)),g.textDefaultText="",g.imageUrl=h,c&&(g.imageAnchor=c),o&&(g.imageOffset=o),l&&(g.imageSize=l),g.url=p}}class Qg extends b{constructor(e,t){super();a(this,"_initEvent",this.dv(new v));const i=this,r=async()=>{try{const l=e.featureProps;if(!l)return;const{heightMode:h,features:c,layerType:u,url:p}=l;let g=[];if(!c&&p){let m=await fetch(p).then(y=>y.json());return m=(m==null?void 0:m.features)??m,u==="polylineVector"?g=await qc(t,m,h):u==="polygonVector"?g=await Yc(t,m,h):u==="pointVector"&&(g=await Xc(t,m,h)),g}else u==="polylineVector"?g=await qc(t,c,h):u==="polygonVector"?g=await Yc(t,c,h):u==="pointVector"&&(g=await Xc(t,c,h));return g}catch(l){console.error(l);return}},o=this.dv(oe(this._initEvent,e.featurePropsChanged));i.dv(new le(o,()=>{if(!e.featureProps)return;const l=e.featureProps;let h;return(async()=>{const{layerType:u,renderer:p,labelingInfo:g}=l,m=await r();!m||m.length===0||(u==="pointVector"?h=new Yg(e,m,p,g):u==="polylineVector"?h=new Kg(e,m,p,g):u==="polygonVector"&&(h=new Zg(e,m,p,g)),console.log("polygonVectorLayer","createLayer",h))})().catch(console.error),{destroy:()=>{var u;(u=h==null?void 0:h.destroy)==null||u.call(h),h=void 0}}}));{const l=(h,c=1)=>{const u=tc(h);if(!u)return;const{center:p,radius:g}=u;t.flyTo({distance:g*4,heading:0,pitch:-90,flyDuration:c??1,hDelta:0,pDelta:0},p)};i.d(e.flyToEvent.don(async h=>{const{featureProps:c}=e;if(!c)return;const u=await r();if(!u)return;let p=[];c.layerType==="polylineVector"?p=u.map(g=>g.points).flat():c.layerType==="polygonVector"?p=u.map(g=>g.points).flat():c.layerType==="pointVector"&&(p=u.map(g=>g.points)),p.length!==0&&l(p,h)}))}}init(){this._initEvent.emit()}}const Ys=class Ys extends X{constructor(e){super(e);a(this,"featureLayerMap",new Map);const t=this;t.d(t.viewerAttached.don(i=>{if(console.log("ESFeatureLayer","viewerAttached",i.id),t.featureLayerMap.has(i.id))return;const r=new Qg(t,i);r.init(),t.featureLayerMap.set(i.id,r)})),t.d(t.viewerDetached.don(i=>{var r;console.log("ESFeatureLayer","viewerDetached",i.id),t.featureLayerMap.has(i.id)&&((r=t.featureLayerMap.get(i.id))==null||r.destroy(),t.featureLayerMap.delete(i.id))})),t.d(()=>{for(const i of t.featureLayerMap.values())i.destroy();t.featureLayerMap.clear()}),t.d(de(t.showChanged,()=>{for(const i of t.components.values())Reflect.has(i,"show")&&(i.show=t.show)},{immediate:!0}))}};a(Ys,"createDefaultProps",()=>({...X.createDefaultProps(),featureProps:te(void 0)})),a(Ys,"type",Ys.register("ESFeatureLayer",Ys,{chsName:"要素图层",tags:["ESObjects"],description:`ESFeatureLayer 是用于在场景中加载和显示要素图层的对象。
|
|
1292
|
+
对象json示例:
|
|
1293
|
+
{
|
|
1294
|
+
"id": "featurelayer_xxx",
|
|
1295
|
+
"type": "ESFeatureLayer",
|
|
1296
|
+
"name": "要素图层"
|
|
1297
|
+
}
|
|
1298
|
+
`}));let tl=Ys;const ef=[["256",256],["512",512],["1024",1024]],tf=[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]],Me=class Me extends X{constructor(e){super(e);a(this,"_pickFeaturesEvent",this.dv(new v));this.ad(D([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(D([this,"czmAlpha"],[this,"opacity"]))}get pickFeaturesEvent(){return this._pickFeaturesEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N([this,"accessToken"],"令牌",Me.defaults.accessToken),new Fe([this,"rectangle"],"矩形范围",Me.defaults.rectangle),new R([this,"url"],"服务地址",Me.defaults.url),new R([this,"style"],"样式配置",Me.defaults.style),new f([this,"zIndex"],"层级序号",Me.defaults.zIndex),new A([this,"tileSize"],ef,"瓦片大小",256),new pe([this,"maximumLevel"],1,[1,24],"最大层级",Me.defaults.maximumLevel),new pe([this,"minimumLevel"],1,[0,24],"最小层级",Me.defaults.minimumLevel),new A([this,"scheme"],[["tms","tms"],["xyz","xyz"]],"影像切片规则",Me.defaults.scheme),new A([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考"),new N([this,"targetID"],"targetID")],more:[...e.more,new k("通用"),new A([this,"splitDirection"],tf,"splitDirection","NONE"),new k("czm"),new f([this,"czmAlpha"],"透明度"),new f([this,"czmBrightness"],"亮度"),new f([this,"czmContrast"],"对比度"),new f([this,"czmHue"],"色相"),new f([this,"czmSaturation"],"饱和度"),new f([this,"czmGamma"],"伽马值")]}}};a(Me,"createDefaultProps",()=>({...X.createDefaultProps(),rectangle:te([-180,-90,180,90]),url:B(""),zIndex:0,accessToken:"",tileSize:256,maximumLevel:18,minimumLevel:0,style:q([]),scheme:w("xyz"),czmSplitDirection:"NONE",heightReference:"NONE",czmAlpha:1,opacity:1,splitDirection:"NONE",targetID:"",czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1})),a(Me,"type",Me.register("ESMVTLayer",Me,{chsName:"矢量瓦片图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:`ESMVTLayer 是用于在场景中加载和显示矢量瓦片(MVT)图层的可视化对象。
|
|
1299
|
+
对象json示例:
|
|
1300
|
+
{
|
|
1301
|
+
"id": "mvtlayer_xxx",
|
|
1302
|
+
"type": "ESMVTLayer",
|
|
1303
|
+
"name": "矢量瓦片图层",
|
|
1304
|
+
"url": "http://localhost:9004/mvt/{z}/{x}/{y}.pbf",
|
|
1305
|
+
"opacity": 1
|
|
1306
|
+
}
|
|
1307
|
+
`}));let il=Me;const Mt=class Mt extends j{constructor(s){super(s)}getESProperties(){return{...{...super.getESProperties()},basic:[new f([this,"radius"],"半径",Mt.defaults.radius),new f([this,"height"],"高度",Mt.defaults.height),new G([this,"color"],"颜色",Mt.defaults.color),new R([this,"materialParams"],"材质参数",Mt.defaults.materialParams)]}}};a(Mt,"createDefaultProps",()=>({...j.createDefaultProps(),radius:2,height:10,color:F([.204,.596,.859,1]),materialParams:B({ringSpeed:1,ringColor:[1,1,1,1],ringWidth:.03,sides:10,ringRatio:1,ringRepeat:1,ringBottomMove:!1})})),a(Mt,"type",Mt.register("ESCylinder",Mt,{chsName:"圆柱",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESCylinder 是用于在场景中指定位置显示圆柱体几何的对象。
|
|
1308
|
+
对象json示例:
|
|
1309
|
+
{
|
|
1310
|
+
"id": "cylinder_xxx",
|
|
1311
|
+
"type": "ESCylinder",
|
|
1312
|
+
"name": "圆柱",
|
|
1313
|
+
"position": [116.39, 39.9, 0],
|
|
1314
|
+
"radius": 2
|
|
1315
|
+
}
|
|
1316
|
+
`}));let Ii=Mt;const ft=class ft extends fs{constructor(s){super(s)}getESProperties(){const s=super.getESProperties();return{...s,dataSource:[...s.dataSource,new A([this,"videoStreamType"],ft.videoStreamTypes,"数据源类型",ft.defaults.videoStreamType),new E([this,"looping"],"循环播放",ft.defaults.looping),new E([this,"play"],"播放状态",ft.defaults.play)]}}};a(ft,"createDefaultProps",()=>({...fs.createDefaultProps(),videoStreamType:"video",looping:!0,play:!0})),a(ft,"type",ft.register("ESMediaLayer",ft,{chsName:"媒体图层",tags:["ESObjects","_ES_Impl_Cesium"],description:`ESMediaLayer 是用于添加图片或视频数据源图层的对象。
|
|
1317
|
+
对象json示例:
|
|
1318
|
+
{
|
|
1319
|
+
"id": "medialayer_xxx",
|
|
1320
|
+
"type": "ESMediaLayer",
|
|
1321
|
+
"name": "媒体图层",
|
|
1322
|
+
"url": "http://localhost:9004/video.mp4",
|
|
1323
|
+
"videoStreamType": "video"
|
|
1324
|
+
}
|
|
1325
|
+
`})),a(ft,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"]]);let sl=ft;const At=class At extends X{constructor(e){super(e);a(this,"_getRepairPolygonEvent",this.disposeVar(new v));a(this,"_getIndicesEvent",this.disposeVar(new v));a(this,"_startEvent",this.disposeVar(new v))}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general",basic:[new R([this,"urls"],"URL",At.defaults.urls),new A([this,"mode"],At.modes,"模式",At.defaults.mode),new L("开始编辑",()=>this.start(),[])]}}get getRepairPolygonEvent(){return this._getRepairPolygonEvent}getRepairPolygon(){return new Promise((e,t)=>{const i=new b;i.ad(this._getRepairPolygonEvent.don(o=>{o!="get"&&e(o)})),this.getRepairPolygonEvent.emit("get");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get getIndicesEvent(){return this._getIndicesEvent}getIndices(){return new Promise((e,t)=>{const i=new b;i.ad(this._getIndicesEvent.don(o=>{o!="get"&&e(o)})),this.getIndicesEvent.emit("get");const r=setTimeout(()=>{i.isDestroyed()||(i.destroy(),e(void 0))},2e3);i.ad(()=>clearTimeout(r))})}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}};a(At,"createDefaultProps",()=>({...X.createDefaultProps(),urls:q([]),mode:"repair",allowPicking:!0})),a(At,"type",At.register("ESGltfModelEditing",At,{chsName:"ESGltfModelEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGltfModelEditing"})),a(At,"modes",[["删除","delete"],["修复","repair"]]);let nl=At;const pi=class pi extends Be{constructor(e){super(e);a(this,"humans",[]);a(this,"humansOffset",new Map);this.ad(this.clear.bind(this)),this.updateHumans();const t=this.ad(oe(this.instancesCountChanged,this.radiusChanged));this.ad(t.don(this.updateHumans.bind(this)))}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new f([this,"instancesCount"],"实例数量",1,pi.defaults.instancesCount),new f([this,"radius"],"半径",1,pi.defaults.radius)]}}updateHumans(){for(this.clear();this.humans.length+1<this.instancesCount;){const e=new Be;this.humansOffset.set(e.id,[Math.random()*this.radius,Math.random()*this.radius,0]),this.humans.push(e),this.components.add(e),e.d(_([e,"show"],[this,"show"])),e.d(_([e,"allowPicking"],[this,"allowPicking"])),e.d(_([e,"scale"],[this,"scale"])),e.d(_([e,"collision"],[this,"collision"])),e.d(D([e,"flyInParam"],[this,"flyInParam"])),e.d(D([e,"flyToParam"],[this,"flyToParam"])),e.d(_([e,"animation"],[this,"animation"])),e.d(_([e,"mode"],[this,"mode"])),e.d(_([e,"minVisibleDistance"],[this,"minVisibleDistance"])),e.d(_([e,"maxVisibleDistance"],[this,"maxVisibleDistance"])),e.d(de([this.positionChanged],()=>{const t=To(this.position,this.humansOffset.get(e.id)??[0,0,0]);t&&(e.position=t)},{immediate:!0})),e.d(D([e,"rotation"],[this,"rotation"])),e.d(this.flyInEvent.don(t=>{e.flyIn(t)})),e.d(this.flyToEvent.don(t=>{e.flyTo(t)})),e.d(this.calcFlyToParamEvent.don(()=>{e.calcFlyToParam()})),e.d(this.calcFlyInParamEvent.don(()=>{e.calcFlyInParam()})),e.d(this.smoothMoveEvent.don((t,i)=>{e.smoothMove(t,i)})),e.d(this.smoothMoveWithRotationEvent.don((t,i,r)=>{e.smoothMoveWithRotation(t,i,r)})),e.d(this.smoothMoveOnGroundEvent.don((t,i,r,o)=>{e.smoothMoveOnGround(t,i,r,o)})),e.d(this.smoothMoveWithRotationOnGroundEvent.don((t,i,r,o,l)=>{e.smoothMoveWithRotationOnGround(t,i,r,o,l)})),e.d(this.automaticLandingEvent.don(()=>{e.automaticLanding()})),e.d(e.readyEvent.don(t=>{this.readyEvent.emit(t)}))}}clear(){this.humans.forEach(e=>{this.components.delete(e)}),this.humans=[],this.humansOffset.clear()}};a(pi,"createDefaultProps",()=>({...Be.createDefaultProps(),instancesCount:1,radius:1})),a(pi,"type",pi.register("ESHumans",pi,{chsName:"人员(批量)",tags:["ESObjects"],description:`ESHumans 是用于在场景中指定位置批量创建人员(角色)实例的可视化对象。
|
|
1326
|
+
对象json示例:
|
|
1327
|
+
{
|
|
1328
|
+
"id": "humans_xxx",
|
|
1329
|
+
"type": "ESHumans",
|
|
1330
|
+
"name": "人员(批量)",
|
|
1331
|
+
"position": [116.39, 39.9, 0],
|
|
1332
|
+
"radius": 1
|
|
1333
|
+
}
|
|
1334
|
+
`}));let rl=pi;const Yi=class Yi extends ve{constructor(e){super(e);a(this,"_line",this.ad(new ve));a(this,"_arrowPolygon",this.ad(new ee));this.ad(this.components.disposableAdd(this.line,!0)),this.line.show=!1,this.ad(this.components.disposableAdd(this.arrowPolygon));const{line:t,arrowPolygon:i}=this;this.ad(D([t,"points"],[this,"points"])),this.ad(de([this.pointsChanged,this.modeChanged],()=>{this.updateArrowPolygon()},{immediate:!0})),this.ad(_([i,"show"],[this,"show"])),this.ad(_([i,"collision"],[this,"collision"])),this.ad(_([i,"allowPicking"],[this,"allowPicking"])),this.ad(_([i,"filled"],[this,"filled"])),this.ad(_([i,"fillGround"],[this,"fillGround"])),this.ad(_([i,"fillColor"],[this,"fillColor"])),this.ad(_([i,"fillMaterial"],[this,"fillMaterial"])),this.ad(_([i,"fillMaterialParams"],[this,"fillMaterialParams"])),this.ad(_([i,"stroked"],[this,"stroked"])),this.ad(_([i,"strokeGround"],[this,"strokeGround"])),this.ad(_([i,"strokeColor"],[this,"strokeColor"])),this.ad(_([i,"strokeMaterial"],[this,"strokeMaterial"])),this.ad(_([i,"strokeMaterialParams"],[this,"strokeMaterialParams"])),this.ad(_([i,"strokeWidth"],[this,"strokeWidth"])),this.ad(_([i,"strokeWidthType"],[this,"strokeWidthType"])),this.ad(_([i,"classificationType"],[this,"classificationType"]))}get line(){return this._line}get arrowPolygon(){return this._arrowPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new A([this,"mode"],wo,"箭头模式",Yi.defaults.mode)]}}updateArrowPolygon(){const e=this.points;if(!e||e.length<3){this._arrowPolygon.points=[];return}let t=Fo(e,this.mode,!0);t&&t.length>=3?this._arrowPolygon.points=[...t,t[0]]:this._arrowPolygon.points=[]}};a(Yi,"createDefaultProps",()=>({...ve.createDefaultProps(),mode:"straightArrow",stroked:!1,filled:!0,fillStyle:B({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),a(Yi,"type",Yi.register("ESAttackArrow",Yi,{chsName:"进攻箭头",tags:["ESObjects","_ES_Impl_Cesium"],description:`ESAttackArrow 是用于在场景中绘制军事标绘进攻箭头(直箭头或燕尾箭头)的对象。
|
|
1335
|
+
对象json示例:
|
|
1336
|
+
{
|
|
1337
|
+
"id": "attackarrow_xxx",
|
|
1338
|
+
"type": "ESAttackArrow",
|
|
1339
|
+
"name": "进攻箭头",
|
|
1340
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1341
|
+
"mode": "straightArrow"
|
|
1342
|
+
}
|
|
1343
|
+
`}));let ol=Yi;const Ki=class Ki extends Et{constructor(e){super(e);a(this,"esCylinder",this.dv(new Ii));const t=this.esCylinder;t.color=[1,1,1,0],this.ad(this.components.disposableAdd(this.esCylinder)),this.ad(_([t,"show"],[this,"show"])),this.ad(_([t,"collision"],[this,"collision"])),this.ad(_([t,"allowPicking"],[this,"allowPicking"])),this.ad(_([t,"position"],[this,"position"])),this.ad(_([t,"radius"],[this,"esCylinderRadius"])),this.ad(_([t,"height"],[this,"esCylinderHeight"])),this.ad(_([t,"materialParams"],[this,"esCylinderMaterialParams"])),this.ad(de(this.esCylinderRotationChanged,()=>{const i=this.esCylinderRotation;t.rotation=[i[0],i[1]-180,i[2]]},{immediate:!0}))}getESProperties(){const e=super.getESProperties();return{...e,basic:[...e.basic,new ds([this,"esCylinderRotation"],"波动方向",Ki.defaults.esCylinderRotation),new f([this,"esCylinderRadius"],"半径",Ii.defaults.esCylinderRadius),new f([this,"esCylinderHeight"],"高度",Ii.defaults.esCylinderHeight),new R([this,"esCylinderMaterialParams"],"材质参数",Ii.defaults.esCylinderMaterialParams)]}}};a(Ki,"createDefaultProps",()=>({...Et.createDefaultProps(),url:M.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/CesiumDrone.glb"),esCylinderRotation:F([0,0,0]),esCylinderRadius:2,esCylinderHeight:10,esCylinderMaterialParams:B({ringSpeed:1,ringColor:[1,1,0,1],ringWidth:.03,sides:10,ringRatio:1,ringRepeat:10,ringBottomMove:!0})})),a(Ki,"type",Ki.register("ESSignalInterference",Ki,{chsName:"信号干扰",tags:["ESObjects"],description:`ESSignalInterference 是用于在场景中指定位置显示信号干扰效果(圆柱体波动材质)的对象。
|
|
1344
|
+
对象json示例:
|
|
1345
|
+
{
|
|
1346
|
+
"id": "signalinterference_xxx",
|
|
1347
|
+
"type": "ESSignalInterference",
|
|
1348
|
+
"name": "信号干扰",
|
|
1349
|
+
"position": [116.39, 39.9, 0]
|
|
1350
|
+
}
|
|
1351
|
+
`}));let al=Ki;const gi=class gi extends U{constructor(e){super(e);a(this,"_deprecated",["ground"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());a(this,"_geoPolylinePath");a(this,"_currentDistance",this.disposeVar(w(0)))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[I.LineStringAppend,I.LineStringInsert],{callSource:"inner"})}get geoPolylinePath(){return this._geoPolylinePath}set geoPolylinePath(e){this._geoPolylinePath=e}get geoPath(){return this._geoPolylinePath.geoPath}get ratio(){return this._geoPolylinePath.ratio}set ratio(e){this._geoPolylinePath.ratio=e}get ratioChanged(){return this._geoPolylinePath.ratioChanged}get currentDistance(){return this._currentDistance.value}set currentDistance(e){this._currentDistance.value=e}get currentDistanceChanged(){return this._currentDistance.changed}get timePosRots(){return this.geoPath.timePosRots}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new E([this,"currentPoiShow"],"是否显示当前",!0),new f([this,"currentDistance"],"当前距离",0),new f([this,"resolution"],"分辨率",1e3),new f([this,"sharpness"],"锐化程度",.85),new k("折线"),new R([this,"timePosRots"],"timePosRots",[],void 0,!1,!0),new f([this,"leadTime"],"折线超前显示时长",0),new f([this,"trailTime"],"折线滞后显示时长",0),new k("播放器"),new us([this,"playing"],[this._geoPolylinePath,"ratio"],[this,"loop"],"播放器"),new E([this,"loop"],"是否循环"),new f([this,"currentTime"],"当前时间"),new f([this,"duration"],"过渡时间"),new E([this,"playing"],"是否播放"),new f([this,"speed"],"播放速度"),new k("折线"),new E([this,"ground"],"是否贴地"),new E([this,"depthTest"],"是否开启深度检测"),new A([this,"arcType"],[["直线","NONE"],["地理直线","GEODESIC"],["地理恒向线","RHUMB"]],"弧线类型",gi.defaults.arcType)]}}};a(gi,"createDefaultProps",()=>({...U.createDefaultProps(),currentPoiShow:!0,ground:!1,arcType:"GEODESIC",loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,resolution:1e3,sharpness:.85,depthTest:!1,leadTime:0,trailTime:0,stroked:!0})),a(gi,"type",gi.register("ESGeoBezierPath",gi,{chsName:"贝塞尔曲线路径",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoBezierPath 是用于在场景中创建贝塞尔曲线路径并支持轨迹动画播放的对象。
|
|
1352
|
+
对象json示例:
|
|
1353
|
+
{
|
|
1354
|
+
"type": "ESGeoBezierPath",
|
|
1355
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]],
|
|
1356
|
+
"resolution": 1000,
|
|
1357
|
+
"sharpness": 0.85
|
|
1358
|
+
}
|
|
1359
|
+
`})),a(gi,"supportEditingModes",[...U.supportEditingModes,I.LineStringAppend,I.LineStringInsert]);let ll=gi;const Zi=class Zi extends U{constructor(e){super(e);a(this,"_deprecated",["ground"]);a(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());a(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new E([this,"ground"],"是否贴地",!1,!0),new f([this,"depth"],"厚度",16,!0)]}}};a(Zi,"createDefaultProps",()=>({...U.createDefaultProps(),ground:!1,depth:0,stroked:!0,filled:!0,fillStyle:B({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),a(Zi,"type",Zi.register("ESGeoSmoothPolygon",Zi,{chsName:"平滑多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESGeoSmoothPolygon 是用于在场景中创建平滑多边形对象的地理矢量对象,支持填充和描边。
|
|
1360
|
+
对象json示例:
|
|
1361
|
+
{
|
|
1362
|
+
"type": "ESGeoSmoothPolygon",
|
|
1363
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.9, 0], [116.40, 39.91, 0]]
|
|
1364
|
+
}
|
|
1365
|
+
`})),a(Zi,"supportEditingModes",[...U.supportEditingModes,I.CircularAppend,I.CircularInsert]);let hl=Zi;const Ks=class Ks extends ot{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new k("折线"),new ie([this,"points"],"局部坐标数组",[]),new k("czm"),new E([this,"loop"],"首尾相连",!0),new E([this,"hasDash"],"是否为虚线",!0),new G([this,"gapColor"],"间隔颜色",[0,0,0,0]),new f([this,"dashLength"],"虚线长度",16),new Yn([this,"dashPattern"],"虚线图案",255),new E([this,"hasArrow"],"是否带箭头",!0),new E([this,"depthTest"],"是否开启深度检测",!1)]}}};a(Ks,"createDefaultProps",()=>({...ot.createDefaultProps(),points:ir(void 0),loop:!0,hasDash:!0,gapColor:F([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!0,depthTest:!1,stroked:!0})),a(Ks,"type",Ks.register("ESLocalLineString",Ks,{chsName:"局部2D坐标折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESLocalLineString 是用于在局部 2D 坐标系中创建和显示折线路径的可视化对象。
|
|
1366
|
+
对象json示例:
|
|
1367
|
+
{
|
|
1368
|
+
"type": "ESLocalLineString",
|
|
1369
|
+
"position": [116.39, 39.9, 0],
|
|
1370
|
+
"points": [[0, 0], [100, 0], [100, 100]]
|
|
1371
|
+
}
|
|
1372
|
+
`}));let cl=Ks;const Zs=class Zs extends ti{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,more:[...s.more,new k("通用"),new ie([this,"points"],"本地位置数组",[]),new k("czm"),new E([this,"loop"],"首尾相连",!0),new E([this,"hasDash"],"是否为虚线",!0),new G([this,"gapColor"],"间隔颜色",[0,0,0,0]),new f([this,"dashLength"],"虚线长度",16),new Yn([this,"dashPattern"],"虚线图案",255),new E([this,"hasArrow"],"是否带箭头",!0),new E([this,"depthTest"],"是否开启深度检测",!1)]}}};a(Zs,"createDefaultProps",()=>({...ti.createDefaultProps(),points:Yt(void 0),loop:!0,width:void 0,color:q(void 0),hasDash:!0,gapColor:F([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!0,depthTest:!1,stroked:!0})),a(Zs,"type",Zs.register("ESLocalLineStringZ",Zs,{chsName:"局部坐标折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESLocalLineStringZ 是用于在局部坐标系中创建和显示带有高度信息的三维折线的可视化对象。
|
|
1373
|
+
对象json示例:
|
|
1374
|
+
{
|
|
1375
|
+
"type": "ESLocalLineStringZ",
|
|
1376
|
+
"position": [116.39, 39.9, 0],
|
|
1377
|
+
"points": [[0, 0, 0], [100, 0, 10], [100, 100, 20]]
|
|
1378
|
+
}
|
|
1379
|
+
`}));let dl=Zs;const sd=`in vec3 position;
|
|
1380
|
+
in vec3 normal;
|
|
1381
|
+
in vec2 st;
|
|
1382
|
+
out vec3 v_normalEC;
|
|
1383
|
+
out vec2 v_st;
|
|
1384
|
+
void main()
|
|
1385
|
+
{
|
|
1386
|
+
v_normalEC = czm_normal * normal;
|
|
1387
|
+
v_st = st;
|
|
1388
|
+
gl_Position = czm_modelViewProjection * vec4(position, 1.0);
|
|
1389
|
+
}
|
|
1390
|
+
`,nd=`in vec2 v_st;
|
|
1391
|
+
uniform sampler2D u_image;
|
|
1392
|
+
uniform vec4 u_color;
|
|
1393
|
+
void main()
|
|
1394
|
+
{
|
|
1395
|
+
vec4 imageColor = texture(u_image, v_st);
|
|
1396
|
+
out_FragColor = imageColor * u_color;
|
|
1397
|
+
}
|
|
1398
|
+
`,rd={type:"LocalAxisedBoundingBox",data:{min:[0,-1,0],max:[1,0,0]}},od={depthTest:{enabled:!0},cull:{enabled:!0,face:1029},depthMask:!1,blending:{enabled:!0,equationRgb:32774,equationAlpha:32774,functionSourceRgb:770,functionSourceAlpha:1,functionDestinationRgb:771,functionDestinationAlpha:771}},ad={u_image:{type:"image",uri:""},u_color:[1,1,0,1]},ld={position:{typedArray:new Float32Array([0,0,0,0,-1,0,1,-1,0,0,0,0,1,-1,0,1,0,0]),componentsPerAttribute:3},normal:{typedArray:new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1]),componentsPerAttribute:3},textureCoordinates:{typedArray:new Float32Array([0,1,0,0,1,0,0,1,1,0,1,1]),componentsPerAttribute:2}},hd=new Uint16Array([0,1,2,3,4,5]),cd={Float32Array,Float64Array,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array};function dd(n){const s={};for(let e of Object.keys(n)){const{typedArray:t,componentsPerAttribute:i,usage:r,normalize:o}=n[e];s[e]={typedArray:{type:t.constructor.name,array:[...t.values()]},componentsPerAttribute:i,usage:r,normalize:o}}return s}function sf(n){const s={};for(let e of Object.keys(n)){const{typedArray:{type:t,array:i},componentsPerAttribute:r,usage:o,normalize:l}=n[e],h=cd[t];if(!h)throw new Error(`不支持的 TypedArray 类型: ${t}`);s[e]={typedArray:new h(i),componentsPerAttribute:r,usage:o,normalize:l}}return s}function ud(n){return{type:n.constructor.name,array:[...n.values()]}}function nf(n){const{type:s,array:e}=n,t=cd[s];if(!t)throw new Error(`不支持的 TypedArray 类型: ${s}`);return new t(e)}const rf=[["POINTS","POINTS"],["LINES","LINES"],["LINE_LOOP","LINE_LOOP"],["LINE_STRIP","LINE_STRIP"],["TRIANGLES","TRIANGLES"],["TRIANGLE_STRIP","TRIANGLE_STRIP"],["TRIANGLE_FAN","TRIANGLE_FAN"]],of=[["ENVIRONMENT","ENVIRONMENT"],["COMPUTE","COMPUTE"],["GLOBE","GLOBE"],["TERRAIN_CLASSIFICATION","TERRAIN_CLASSIFICATION"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["CESIUM_3D_TILE_CLASSIFICATION","CESIUM_3D_TILE_CLASSIFICATION"],["CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW","CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW"],["OPAQUE","OPAQUE"],["TRANSLUCENT","TRANSLUCENT"],["OVERLAY","OVERLAY"],["NUMBER_OF_PASSES","NUMBER_OF_PASSES"]],af=`### 默认使用的渲染状态
|
|
1399
|
+
\`\`\`
|
|
1400
|
+
{
|
|
1401
|
+
depthTest: {
|
|
1402
|
+
enabled: true,
|
|
1403
|
+
},
|
|
1404
|
+
cull: {
|
|
1405
|
+
enabled: true,
|
|
1406
|
+
face: 1029,
|
|
1407
|
+
},
|
|
1408
|
+
blending: {
|
|
1409
|
+
enabled: true,
|
|
1410
|
+
equationRgb: 0x8006,
|
|
1411
|
+
equationAlpha: 0x8006,
|
|
1412
|
+
functionSourceRgb: 0x0302,
|
|
1413
|
+
functionSourceAlpha: 1,
|
|
1414
|
+
functionDestinationRgb: 0x0303,
|
|
1415
|
+
functionDestinationAlpha: 0x0303,
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
\`\`\`
|
|
1419
|
+
|
|
1420
|
+
### 所有状态值说明
|
|
1421
|
+
\`\`\`
|
|
1422
|
+
interface RenderStateOptions {
|
|
1423
|
+
// 默认值:2305 可选值: 2304(CLOCKWISE顺时针), 2305(COUNTER_CLOCKWISE逆时针)
|
|
1424
|
+
frontFace?: number,
|
|
1425
|
+
cull?: {
|
|
1426
|
+
enabled?: boolean, // false
|
|
1427
|
+
// 默认值:1029 可选值:1028(FRONT), 1029(BACK), 1032(FRONT_AND_BACK)
|
|
1428
|
+
face?: CullFace, // CullFace.BACK
|
|
1429
|
+
},
|
|
1430
|
+
lineWidth?: number, // 1 windows系统只能是,显卡驱动原因,设置其他数值不起作用!
|
|
1431
|
+
polygonOffset?: {
|
|
1432
|
+
enabled?: boolean, // false
|
|
1433
|
+
factor?: number, // 0,
|
|
1434
|
+
units?: number, // 0
|
|
1435
|
+
},
|
|
1436
|
+
scissorTest?: {
|
|
1437
|
+
enabled?: boolean, // false,
|
|
1438
|
+
rectangle?: {
|
|
1439
|
+
x?: number, // 0,
|
|
1440
|
+
y?: number, // 0,
|
|
1441
|
+
width?: number, // 0,
|
|
1442
|
+
height?: number, // 0
|
|
1443
|
+
}
|
|
1444
|
+
},
|
|
1445
|
+
depthRange?: {
|
|
1446
|
+
near?: number, // 0,
|
|
1447
|
+
far?: number, // 1
|
|
1448
|
+
},
|
|
1449
|
+
depthTest?: {
|
|
1450
|
+
enabled?: boolean; // false,
|
|
1451
|
+
// 默认值:513 可选值:512(NEVER), 513(LESS), 514(EQUAL), 515(LESS_OR_EQUAL),
|
|
1452
|
+
// 516(GREATER), 517(NOT_EQUAL), 518(GREATER_OR_EQUAL), 519(ALWAYS)
|
|
1453
|
+
func?: number;
|
|
1454
|
+
},
|
|
1455
|
+
colorMask?: {
|
|
1456
|
+
red?: boolean, // true,
|
|
1457
|
+
green?: boolean, // true,
|
|
1458
|
+
blue?: boolean, // true,
|
|
1459
|
+
alpha?: boolean, // true
|
|
1460
|
+
},
|
|
1461
|
+
depthMask?: boolean, // true,
|
|
1462
|
+
stencilMask?: number, // ~0
|
|
1463
|
+
blending?: {
|
|
1464
|
+
enabled?: boolean, // false,
|
|
1465
|
+
color?: {
|
|
1466
|
+
red?: number, // 0.0,
|
|
1467
|
+
green?: number, // 0.0,
|
|
1468
|
+
blue?: number, // 0.0,
|
|
1469
|
+
alpha?: number, // 0.0
|
|
1470
|
+
},
|
|
1471
|
+
// 默认值:32774, 可选值:32774(ADD), 32778(SUBTRACT), 32779(REVERSE_SUBTRACT), 32775(MIN), MIN(MAX)
|
|
1472
|
+
equationRgb?: BlendEquation, // BlendEquation.ADD,
|
|
1473
|
+
// 默认值:32774, 可选值:32774(ADD), 32778(SUBTRACT), 32779(REVERSE_SUBTRACT), 32775(MIN), MIN(MAX)
|
|
1474
|
+
equationAlpha?: BlendEquation, // BlendEquation.ADD,
|
|
1475
|
+
// BlendFunction类型可选值:0(ZERO), 1(ONE), 768(SOURCE_COLOR), 769(ONE_MINUS_SOURCE_COLOR),
|
|
1476
|
+
// 774(DESTINATION_COLOR), 775(ONE_MINUS_DESTINATION_COLOR), 770(SOURCE_ALPHA),
|
|
1477
|
+
// 771(ONE_MINUS_SOURCE_ALPHA), 772(DESTINATION_ALPHA), 773(ONE_MINUS_DESTINATION_ALPHA),
|
|
1478
|
+
// 32769(CONSTANT_COLOR), 32770(ONE_MINUS_CONSTANT_COLOR), 32771(CONSTANT_ALPHA),
|
|
1479
|
+
// 32772(ONE_MINUS_CONSTANT_ALPHA), 776(SOURCE_ALPHA_SATURATE)
|
|
1480
|
+
// 默认值:1, 可选值参见上方BlendFunction类型可选值
|
|
1481
|
+
functionSourceRgb?: BlendFunction, // BlendFunction.ONE,
|
|
1482
|
+
// 默认值:1, 可选值参见上方BlendFunction类型可选值
|
|
1483
|
+
functionSourceAlpha?: BlendFunction, // BlendFunction.ONE,
|
|
1484
|
+
// 默认值:0, 可选值参见上方BlendFunction类型可选值
|
|
1485
|
+
functionDestinationRgb?: BlendFunction, // BlendFunction.ZERO,
|
|
1486
|
+
// 默认值:0, 可选值参见上方BlendFunction类型可选值
|
|
1487
|
+
functionDestinationAlpha?: BlendFunction, // BlendFunction.ZERO
|
|
1488
|
+
},
|
|
1489
|
+
stencilTest?: {
|
|
1490
|
+
enabled?: boolean, // false,
|
|
1491
|
+
// StencilFunction类型可选值:512(NEVER), 513(LESS), 514(EQUAL), 515(LESS_OR_EQUAL),
|
|
1492
|
+
// 516(GREATER), 517(NOT_EQUAL), 518(GREATER_OR_EQUAL), 519(ALWAYS)
|
|
1493
|
+
// 默认值 519, 可选值参见StencilFunction类型可选值
|
|
1494
|
+
frontFunction?: StencilFunction, // StencilFunction.ALWAYS,
|
|
1495
|
+
// 默认值 519, 可选值参见StencilFunction类型可选值
|
|
1496
|
+
backFunction?: StencilFunction, // StencilFunction.ALWAYS,
|
|
1497
|
+
reference?: number; // 0,
|
|
1498
|
+
mask?: number; // ~0,
|
|
1499
|
+
// StencilOperation类型可选值:0(ZERO), 7680(KEEP), 7681(REPLACE), 7682(INCREMENT),
|
|
1500
|
+
// 7683(DECREMENT), 5386(INVERT), 34055(INCREMENT_WRAP), 34056(DECREMENT_WRAP)
|
|
1501
|
+
frontOperation?: {
|
|
1502
|
+
// 默认值:7680,可选值参见上方StencilOperation类型可选值
|
|
1503
|
+
fail?: StencilOperation, // StencilOperation.KEEP,
|
|
1504
|
+
// 默认值:7680,可选值参见上方StencilOperation类型可选值
|
|
1505
|
+
zFail?: StencilOperation, // StencilOperation.KEEP,
|
|
1506
|
+
// 默认值:7680,可选值参见上方StencilOperation类型可选值
|
|
1507
|
+
zPass?: StencilOperation, // StencilOperation.KEEP
|
|
1508
|
+
},
|
|
1509
|
+
backOperation?: {
|
|
1510
|
+
// 默认值:7680,可选值参见上方StencilOperation类型可选值
|
|
1511
|
+
fail?: StencilOperation, // StencilOperation.KEEP,
|
|
1512
|
+
// 默认值:7680,可选值参见上方StencilOperation类型可选值
|
|
1513
|
+
zFail?: StencilOperation, // StencilOperation.KEEP,
|
|
1514
|
+
// 默认值:7680,可选值参见上方StencilOperation类型可选值
|
|
1515
|
+
zPass?: StencilOperation, // StencilOperation.KEEP
|
|
1516
|
+
}
|
|
1517
|
+
},
|
|
1518
|
+
sampleCoverage?: {
|
|
1519
|
+
enabled?: boolean, // false,
|
|
1520
|
+
value?: number, // 1.0,
|
|
1521
|
+
invert?: boolean, // false
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
\`\`\`
|
|
1525
|
+
`,lf=`### 默认的BoundingVolume
|
|
1526
|
+
\`\`\`
|
|
1527
|
+
type: 'LocalAxisedBoundingBox',
|
|
1528
|
+
data: {
|
|
1529
|
+
min: [0, -1, 0],
|
|
1530
|
+
max: [1, 0, 0],
|
|
1531
|
+
}
|
|
1532
|
+
\`\`\`
|
|
1533
|
+
|
|
1534
|
+
### BoundingVolume类型规格
|
|
1535
|
+
\`\`\`
|
|
1536
|
+
export type BoundingVolumeJsonType = {
|
|
1537
|
+
type: 'BoundingSphere'; // BoundingSphere表示世界坐标系下的包围球, center为[经度, 纬度, 高度], radius单位为米
|
|
1538
|
+
data: { center: [number, number, number], radius: number };
|
|
1539
|
+
} | {
|
|
1540
|
+
type: 'LocalBoundingSphere'; // LocalBoundingSphere表示本地坐标系下的包围球, center本地坐标系下的[x, y, z],单位是米, radius单位为米
|
|
1541
|
+
data: { center: [number, number, number], radius: number };
|
|
1542
|
+
} | {
|
|
1543
|
+
type: 'BoundingRectangle'; // 指定地球上的矩形区域,分别用最西侧经度、最南侧纬度、最东侧经度、最北侧纬度来表示一个矩形范围
|
|
1544
|
+
data: [west: number, south: number, east: number, north: number];
|
|
1545
|
+
} | {
|
|
1546
|
+
type: 'LocalAxisedBoundingBox'; // 本地坐标系下,min为最小角点,max为最大角点,推荐使用此种方式!
|
|
1547
|
+
data: {
|
|
1548
|
+
min: [number, number, number];
|
|
1549
|
+
max: [number, number, number];
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
\`\`\`
|
|
1553
|
+
`,hf=`### 默认顶点Shader示例
|
|
1554
|
+
\`\`\`
|
|
1555
|
+
in vec3 position;
|
|
1556
|
+
in vec3 normal;
|
|
1557
|
+
in vec2 st;
|
|
1558
|
+
out vec3 v_normalEC;
|
|
1559
|
+
out vec2 v_st;
|
|
1560
|
+
void main()
|
|
1561
|
+
{
|
|
1562
|
+
// 如果这一句注释,要相应地注释掉attribute中的normal,也就是说顶点属性要和shader中的一一匹配!
|
|
1563
|
+
v_normalEC = czm_normal * normal;
|
|
1564
|
+
v_st = st;
|
|
1565
|
+
gl_Position = czm_modelViewProjection * vec4(position, 1.0);
|
|
1566
|
+
}
|
|
1567
|
+
\`\`\`
|
|
1568
|
+
|
|
1569
|
+
### 相对完整的顶点Shader
|
|
1570
|
+
\`\`\`
|
|
1571
|
+
// vtxf 使用double类型的position进行计算
|
|
1572
|
+
// in vec3 position3DHigh;
|
|
1573
|
+
// in vec3 position3DLow;
|
|
1574
|
+
in vec3 position;
|
|
1575
|
+
in vec3 normal;
|
|
1576
|
+
in vec2 st;
|
|
1577
|
+
in float batchId;
|
|
1578
|
+
out vec3 v_positionEC;
|
|
1579
|
+
out vec3 v_normalEC;
|
|
1580
|
+
out vec2 v_st;
|
|
1581
|
+
void main()
|
|
1582
|
+
{
|
|
1583
|
+
// vtxf 使用double类型的position进行计算
|
|
1584
|
+
// vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
|
|
1585
|
+
// v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
|
|
1586
|
+
// v_normalEC = czm_normal * normal; // normal in eye coordinates
|
|
1587
|
+
// v_st = st;
|
|
1588
|
+
// gl_Position = czm_modelViewProjectionRelativeToEye * p;
|
|
1589
|
+
v_positionEC = (czm_modelView * vec4(position, 1.0)).xyz; // position in eye coordinates
|
|
1590
|
+
v_normalEC = czm_normal * normal; // normal in eye coordinates
|
|
1591
|
+
v_st = st;
|
|
1592
|
+
gl_Position = czm_modelViewProjection * vec4(position, 1.0);
|
|
1593
|
+
}
|
|
1594
|
+
\`\`\`
|
|
1595
|
+
`,cf=`### 默认片元Shader示例
|
|
1596
|
+
\`\`\`
|
|
1597
|
+
in vec2 v_st;
|
|
1598
|
+
uniform sampler2D u_image;
|
|
1599
|
+
uniform vec4 u_color;
|
|
1600
|
+
void main()
|
|
1601
|
+
{
|
|
1602
|
+
vec4 imageColor = texture(u_image, v_st);
|
|
1603
|
+
out_FragColor = imageColor * u_color;
|
|
1604
|
+
}
|
|
1605
|
+
\`\`\`
|
|
1606
|
+
|
|
1607
|
+
### xe2VisibleAlpha使用示例
|
|
1608
|
+
xe2VisibleAlpha是根据视距范围自动计算出来的alpha值,用来设置透明,产生渐显的效果。
|
|
1609
|
+
\`\`\`
|
|
1610
|
+
in vec2 v_st;
|
|
1611
|
+
uniform sampler2D u_image;
|
|
1612
|
+
uniform vec4 u_color;
|
|
1613
|
+
uniform float u_xe2VisibleAlpha;
|
|
1614
|
+
void main()
|
|
1615
|
+
{
|
|
1616
|
+
vec4 imageColor = texture(u_image, v_st);
|
|
1617
|
+
out_FragColor = imageColor * u_color * vec4(1., 1., 1., u_xe2VisibleAlpha);
|
|
1618
|
+
}
|
|
1619
|
+
\`\`\`
|
|
1620
|
+
|
|
1621
|
+
### 相对完整的片元Shader示例
|
|
1622
|
+
\`\`\`
|
|
1623
|
+
in vec3 v_positionEC;
|
|
1624
|
+
in vec3 v_normalEC;
|
|
1625
|
+
in vec2 v_st;
|
|
1626
|
+
uniform sampler2D myImage;
|
|
1627
|
+
void main()
|
|
1628
|
+
{
|
|
1629
|
+
vec3 positionToEyeEC = -v_positionEC;
|
|
1630
|
+
vec3 normalEC = normalize(v_normalEC);
|
|
1631
|
+
#ifdef FACE_FORWARD
|
|
1632
|
+
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
|
|
1633
|
+
#endif
|
|
1634
|
+
czm_materialInput materialInput;
|
|
1635
|
+
materialInput.normalEC = normalEC;
|
|
1636
|
+
materialInput.positionToEyeEC = positionToEyeEC;
|
|
1637
|
+
materialInput.st = v_st;
|
|
1638
|
+
//czm_material material = czm_getMaterial(materialInput);
|
|
1639
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
1640
|
+
vec4 imageColor = texture(myImage, materialInput.st);
|
|
1641
|
+
material.diffuse = imageColor.rgb;
|
|
1642
|
+
material.alpha = imageColor.a;
|
|
1643
|
+
// #ifdef FLAT
|
|
1644
|
+
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
|
|
1645
|
+
// #else
|
|
1646
|
+
// out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
|
|
1647
|
+
// #endif
|
|
1648
|
+
}
|
|
1649
|
+
\`\`\`
|
|
1650
|
+
`,df=`### 默认使用的UniformMap
|
|
1651
|
+
\`\`\`
|
|
1652
|
+
{
|
|
1653
|
+
"myImage": {
|
|
1654
|
+
"type": "image",
|
|
1655
|
+
"uri": "\${earthsdk3-assets-script-dir}/assets/img/location.png"
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
\`\`\`
|
|
1659
|
+
|
|
1660
|
+
### 示例1
|
|
1661
|
+
\`\`\`
|
|
1662
|
+
{
|
|
1663
|
+
"myImage": {
|
|
1664
|
+
"type": "image",
|
|
1665
|
+
"uri": "\${earthsdk3-assets-script-dir}/assets/img/location.png"
|
|
1666
|
+
},
|
|
1667
|
+
"ratio": 0.5,
|
|
1668
|
+
}
|
|
1669
|
+
\`\`\`
|
|
1670
|
+
|
|
1671
|
+
### 示例2
|
|
1672
|
+
\`\`\`
|
|
1673
|
+
{
|
|
1674
|
+
"u_image": {
|
|
1675
|
+
"type": "texture",
|
|
1676
|
+
"id": "3010d3bd-cbf8-46cd-939f-c0b39b926255"
|
|
1677
|
+
},
|
|
1678
|
+
"ratio": 0.5,
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
\`\`\`
|
|
1682
|
+
|
|
1683
|
+
### 示例3
|
|
1684
|
+
\`\`\`
|
|
1685
|
+
{
|
|
1686
|
+
"ratioAndStart": [0.5, 0.7],
|
|
1687
|
+
}
|
|
1688
|
+
\`\`\`
|
|
1689
|
+
|
|
1690
|
+
### UniformMap类型规格
|
|
1691
|
+
\`\`\`
|
|
1692
|
+
export type CzmCustomPrimitiveUniformType = number | [number, number] | [number, number, number] | [number, number, number, number] | { type: 'image', uri: string };
|
|
1693
|
+
export type CzmCustomPrimitiveUniformMapType = { [k: string]: CzmCustomPrimitiveUniformType };
|
|
1694
|
+
\`\`\`
|
|
1695
|
+
`,uf=`### 默认的顶点属性
|
|
1696
|
+
\`\`\`
|
|
1697
|
+
{
|
|
1698
|
+
position: {
|
|
1699
|
+
typedArray: new Float32Array([0, 0, 0, 0, -1, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, 1, 0, 0]),
|
|
1700
|
+
componentsPerAttribute: 3,
|
|
1701
|
+
},
|
|
1702
|
+
normal: {
|
|
1703
|
+
typedArray: new Float32Array([0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1]),
|
|
1704
|
+
componentsPerAttribute: 3,
|
|
1705
|
+
},
|
|
1706
|
+
textureCoordinates: {
|
|
1707
|
+
typedArray: new Float32Array([0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1]),
|
|
1708
|
+
componentsPerAttribute: 2,
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
\`\`\`
|
|
1712
|
+
|
|
1713
|
+
### Attributes类型规格
|
|
1714
|
+
\`\`\`
|
|
1715
|
+
export type AttributeJsonType = {
|
|
1716
|
+
typedArray: {
|
|
1717
|
+
type: 'Float32Array' | 'Float64Array' | 'Int8Array' | 'Uint8Array' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array';
|
|
1718
|
+
array: number[];
|
|
1719
|
+
};
|
|
1720
|
+
componentsPerAttribute: 1 | 2 | 3 | 4;
|
|
1721
|
+
usage?: Cesium.BufferUsage;
|
|
1722
|
+
normalize?: boolean;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
export type AttributesJsonType = {
|
|
1726
|
+
[k: string]: AttributeJsonType;
|
|
1727
|
+
}
|
|
1728
|
+
\`\`\`
|
|
1729
|
+
`,pf=`### 默认的索引数组
|
|
1730
|
+
\`\`\`
|
|
1731
|
+
{
|
|
1732
|
+
"type": "Uint16Array",
|
|
1733
|
+
"array": [0, 1, 2, 3, 4, 5]
|
|
1734
|
+
}
|
|
1735
|
+
\`\`\`
|
|
1736
|
+
|
|
1737
|
+
### 索引类型规格说明
|
|
1738
|
+
\`\`\`
|
|
1739
|
+
export type IndexJsonType = {
|
|
1740
|
+
type: 'Uint8Array' | 'Uint16Array' | 'Uint32Array';
|
|
1741
|
+
array: number[];
|
|
1742
|
+
}
|
|
1743
|
+
\`\`\`
|
|
1744
|
+
`,De=class De extends j{constructor(e){super(e);a(this,"_attributes",this.disposeVar(w(void 0)));a(this,"_indexTypedArray",this.disposeVar(w(void 0)))}get attributesJson(){return this.attributes&&dd(this.attributes)}set attributesJson(e){const t=JSON.stringify(this.attributesJson),i=JSON.stringify(e);t!==i&&(this.attributes=e&&sf(e))}get attributesJsonChanged(){return this.attributesChanged}get indexTypedArrayJson(){return this.indexTypedArray&&ud(this.indexTypedArray)}set indexTypedArrayJson(e){const t=JSON.stringify(this.indexTypedArrayJson),i=JSON.stringify(e);t!==i&&(this.indexTypedArray=e&&nf(e))}get indexTypedArrayJsonChanged(){return this.indexTypedArrayChanged}get attributes(){return this._attributes.value}set attributes(e){this._attributes.value=e}get attributesChanged(){return this._attributes.changed}get indexTypedArray(){return this._indexTypedArray.value}set indexTypedArray(e){this._indexTypedArray.value=e}get indexTypedArrayChanged(){return this._indexTypedArray.changed}setUniformMap(e){if(Object.entries(e).some(([i,r])=>r===null))return;const t={...this.uniformMap??{},...e};this.uniformMap=t}setLocalBoundingSphere(e,t=[0,0,0]){if(!Number.isFinite(e)||e<=0){console.warn(`!Number.isFinite(radius) || radius <= 0 radius: ${e}`);return}this.boundingVolume={type:"LocalBoundingSphere",data:{center:t,radius:e}}}setLocalAxisedBoundingBox(e,t){if(e.some(i=>!Number.isFinite(i))||t.some(i=>!Number.isFinite(i))){console.warn(`setLocalAxisedBoundingBox error, min: ${e.toString()}, max: ${t.toString()}`);return}this.boundingVolume={type:"LocalAxisedBoundingBox",data:{min:e,max:t}}}computeLocalAxisedBoundingBoxFromAttribute(e="a_position"){if(!this.attributes||!this.attributes[e]){console.warn(`attributes[${e}]不存在!无法获取!`);return}const t=this.attributes[e];if(!("typedArray"in t)||!(t.typedArray instanceof Float32Array)){console.warn(`!('typedArray' in posAttribute) || !(posAttribute.typedArray instanceof Float32Array) attributeName: ${e}`);return}if(!("componentsPerAttribute"in t)||t.componentsPerAttribute!==3){console.warn(`!('componentsPerAttribute' in posAttribute) || posAttribute.componentsPerAttribute !== 3 attributeName: ${e}`);return}const{min:i,max:r}=De.getMinMaxPosition(t.typedArray);if(!i.some(o=>!Number.isFinite(o)||r.some(l=>!Number.isFinite(l))))return{min:i,max:r}}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new Fe([this,"viewDistanceRange"],"可视范围控制",void 0,!0),new E([this,"viewDistanceDebug"],"可视距离调试"),new k("屏幕像素"),new f([this,"maximumScale"],"最大缩放值",3,!0),new f([this,"minimumScale"],"最小缩放值",1,!0),new f([this,"pixelSize"],"屏幕像素",5,!0),new E([this,"showSceneScale"],"显示缩放值",!1,!0),new k("图元属性"),new R([this,"modelMatrix"],"模型矩阵",void 0,void 0,!0),new E([this,"cull"],"是否拣选",void 0,!0),new R([this,"boundingVolume"],"包围体",rd,lf,!0),new A([this,"pass"],of,"渲染顺序","TRANSLUCENT",!0),new A([this,"primitiveType"],rf,"图元类型","TRIANGLES",!0),new R([this,"renderState"],"渲染状态",od,af,!0),new Xe([this,"vertexShaderSource"],"顶点着色器",sd,hf,!0),new Xe([this,"fragmentShaderSource"],"片元着色器",nd,cf,!0),new R([this,"uniformMap"],"一致性变量(uniform)",ad,df,!0),new R([this,"attributesJson"],"顶点属性(attributes)",dd(ld),uf,!0),new R([this,"indexTypedArrayJson"],"索引(index)",ud(hd),pf,!0),new f([this,"count"],"count",0,!0),new f([this,"offset"],"offset",0,!0),new f([this,"instanceCount"],"instanceCount",0,!0),new L("自动计算包围盒",t=>{const i=this.computeLocalAxisedBoundingBoxFromAttribute(t);if(!i)return;const{min:r,max:o}=i;this.setLocalAxisedBoundingBox(r,o)},["position"],"setLocalAxisedBoundingBox"),new k("本地变换"),new nt([this,"localPosition"],"本地偏移",void 0,!0),new ds([this,"localRotation"],"本地姿态",void 0,!0),new ue([this,"localScale"],"本地缩放",[1,1,1],!0),new R([this,"localModelMatrix"],"本地模型矩阵",void 0,void 0,!0),new k("调试"),new E([this,"debugShowBoundingVolume"],"debugShowBoundingVolume",!1,!0),new f([this,"debugOverlappingFrustums"],"debugOverlappingFrustums",0,!0),new k("Czm特有"),new E([this,"occlude"],"occlude",!0,!0),new E([this,"castShadows"],"castShadows",!1,!0),new E([this,"receiveShadows"],"receiveShadows",!1,!0),new E([this,"executeInClosestFrustum"],"executeInClosestFrustum",!1,!0),new E([this,"pickOnly"],"pickOnly",!1,!0),new E([this,"depthForTranslucentClassification"],"depthForTranslucentClassification",!1,!0)]}}};a(De,"createDefaultProps",()=>({...j.createDefaultProps(),maximumScale:void 0,minimumScale:void 0,pixelSize:void 0,showSceneScale:void 0,modelMatrix:q(void 0),cull:w(void 0),boundingVolume:B(void 0),renderState:B(void 0),primitiveType:void 0,pass:void 0,vertexShaderSource:void 0,fragmentShaderSource:void 0,uniformMap:B(void 0),localPosition:q(void 0),localRotation:q(void 0),localScale:q(void 0),localModelMatrix:q(void 0),occlude:void 0,count:void 0,offset:void 0,instanceCount:void 0,castShadows:void 0,receiveShadows:void 0,executeInClosestFrustum:void 0,debugShowBoundingVolume:void 0,debugOverlappingFrustums:void 0,pickOnly:void 0,depthForTranslucentClassification:void 0,viewDistanceRange:q(void 0),viewDistanceDebug:!1})),a(De,"type",De.register("ESCustomPrimitive",De,{chsName:"ES自定义图元",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESCustomPrimitive 是用于在场景中创建自定义渲染图元的对象,支持自定义着色器(顶点/片元)、顶点属性、包围盒和渲染状态。
|
|
1745
|
+
对象json示例:
|
|
1746
|
+
{
|
|
1747
|
+
"type": "ESCustomPrimitive",
|
|
1748
|
+
"position": [116.39, 39.9, 0],
|
|
1749
|
+
"primitiveType": "TRIANGLES"
|
|
1750
|
+
}
|
|
1751
|
+
`})),a(De,"defaultRenderState",od),a(De,"defaultVertexShaderSource",sd),a(De,"defaultFragmentShaderSource",nd),a(De,"defaultUniformMap",ad),a(De,"defaultBoundingVolume",rd),a(De,"defaultAttribute",ld),a(De,"defaultIndexTypedArray",hd),a(De,"getMinMaxPosition",Nl);let ul=De;const Qi=class Qi extends U{constructor(e){super(e);a(this,"editingBindMode","lineString")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new f([this,"width"],"线宽"),new A([this,"arcType"],[["直线","NONE"],["地理直线","GEODESIC"],["地理恒向线","RHUMB"]],"弧线类型","GEODESIC"),new N([this,"imageUrl"],"道路图片"),new ne([this,"repeat"],"重复次数")]}}};a(Qi,"createDefaultProps",()=>({...U.createDefaultProps(),width:50,arcType:"GEODESIC",imageUrl:"${earthsdk3-assets-script-dir}/assets/img/roads/4.jpg",repeat:[100,1],stroked:!0})),a(Qi,"type",Qi.register("ESRoad",Qi,{chsName:"贴地道路",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESRoad 是用于在场景中创建贴地道路线对象的可视化对象,支持自定义纹理。
|
|
1752
|
+
对象json示例:
|
|
1753
|
+
{
|
|
1754
|
+
"type": "ESRoad",
|
|
1755
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.91, 0]],
|
|
1756
|
+
"width": 50
|
|
1757
|
+
}
|
|
1758
|
+
`})),a(Qi,"supportEditingModes",[...U.supportEditingModes,I.LineStringAppend,I.LineStringInsert]);let pl=Qi;const $t=class $t extends U{constructor(e){super(e);a(this,"editingBindMode","lineString");a(this,"_player");this._player=this.disposeVar(new Ye);{const t=$t.defaults;this.dispose(D([this._player,"loop"],[this,"loop"],i=>i??t.loop,i=>i??t.loop)),this.dispose(D([this._player,"currentTime"],[this,"currentTime"],i=>i??t.currentTime,i=>i??t.currentTime)),this.dispose(D([this._player,"duration"],[this,"duration"],i=>i??t.duration,i=>i??t.duration)),this.dispose(D([this._player,"playing"],[this,"playing"],i=>i??t.playing,i=>i??t.playing)),this.dispose(D([this._player,"speed"],[this,"speed"],i=>i??t.speed,i=>i??t.speed))}this.stroked=!0,this.strokeColor=[0,1,0,.3]}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new k("通用"),new f([this,"startTime"],"起始时间"),new f([this,"transmissionTime"],"传输时间"),new f([this,"heightRatio"],"高度比率"),new A([this,"arcType"],[["直线","NONE"],["地理直线","GEODESIC"],["地理恒向线","RHUMB"]],"弧线类型","GEODESIC"),new E([this,"brightening"],"变亮"),new E([this,"depthTest"],"深度监测"),new N([this,"imageUrl"],"图片路径",$t.defaults.imageUrl,!0),new f([this,"repeat"],"图像重复次数"),new A([this,"bidirectional"],[["正向",0],["反向",1],["双向",2],["无",3]],"运动方向",0),new k("播放器"),new us([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new E([this,"loop"],"是否循环"),new f([this.player,"currentTime"],"当前时间"),new f([this,"duration"],"过渡时间"),new E([this,"playing"],"是否播放"),new f([this,"speed"],"播放速度")]}}};a($t,"createDefaultProps",()=>({...U.createDefaultProps(),imageUrl:"${earthsdk3-assets-script-dir}/assets/img/signal.png",repeat:5,bidirectional:0,startTime:0,transmissionTime:3e3,arcType:"GEODESIC",brightening:!1,depthTest:!0,heightRatio:1,loop:!0,currentTime:0,duration:3e3,speed:1,playing:!0})),a($t,"type",$t.register("ESSignalTransmission",$t,{chsName:"信号传输器",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESSignalTransmission 是用于在场景中显示信号传输动画的线状对象,支持双向传输、多种弧线类型。
|
|
1759
|
+
对象json示例:
|
|
1760
|
+
{
|
|
1761
|
+
"type": "ESSignalTransmission",
|
|
1762
|
+
"points": [[116.39, 39.9, 0], [116.40, 39.91, 0]]
|
|
1763
|
+
}
|
|
1764
|
+
`})),a($t,"supportEditingModes",[...U.supportEditingModes,I.LineStringAppend,I.LineStringInsert]);let gl=$t;const pd=`async (dataSource, viewer) => {
|
|
1765
|
+
viewer.clock.shouldAnimate = false;
|
|
1766
|
+
const rider = dataSource.entities.getById("tour");
|
|
1767
|
+
await viewer.flyTo(rider)
|
|
1768
|
+
|
|
1769
|
+
viewer.trackedEntity = rider;
|
|
1770
|
+
viewer.selectedEntity = viewer.trackedEntity;
|
|
1771
|
+
viewer.clock.multiplier = 30;
|
|
1772
|
+
viewer.clock.shouldAnimate = true;
|
|
1773
|
+
}
|
|
1774
|
+
`,gf=`\${earthsdk3-assets-script-dir}/assets/misc/bikeRide.kml
|
|
1775
|
+
|
|
1776
|
+
该路径可以使用下面回调函数
|
|
1777
|
+
\`\`\`
|
|
1778
|
+
${pd}
|
|
1779
|
+
\`\`\`
|
|
1780
|
+
|
|
1781
|
+
\${earthsdk3-assets-script-dir}/assets/misc/facilities/facilities.kml
|
|
1782
|
+
|
|
1783
|
+
该路径可以使用下面回调函数
|
|
1784
|
+
\`\`\`
|
|
1785
|
+
(dataSource) => {
|
|
1786
|
+
var entities = dataSource.entities.values;
|
|
1787
|
+
|
|
1788
|
+
for (var i = 0; i < entities.length; i++) {
|
|
1789
|
+
var entity = entities[i];
|
|
1790
|
+
if (Cesium.defined(entity.billboard)) {
|
|
1791
|
+
// entity.label = undefined; // 去掉文字的显示
|
|
1792
|
+
|
|
1793
|
+
entity.point = new Cesium.PointGraphics({
|
|
1794
|
+
color: Cesium.Color.BLUE,
|
|
1795
|
+
pixelSize: 10
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
\`\`\`
|
|
1802
|
+
|
|
1803
|
+
\${earthsdk3-assets-script-dir}/assets/misc/gdpPerCapita2008.kmz
|
|
1804
|
+
|
|
1805
|
+
该路径可以使用下面回调函数
|
|
1806
|
+
\`\`\`
|
|
1807
|
+
(dataSource) => {
|
|
1808
|
+
var entities = dataSource.entities.values;
|
|
1809
|
+
|
|
1810
|
+
for (var i = 0; i < entities.length; i++) {
|
|
1811
|
+
var entity = entities[i];
|
|
1812
|
+
if (Cesium.defined(entity.billboard)) {
|
|
1813
|
+
// entity.label = undefined; // 去掉文字的显示
|
|
1814
|
+
|
|
1815
|
+
entity.point = new Cesium.PointGraphics({
|
|
1816
|
+
color: Cesium.Color.YELLOW,
|
|
1817
|
+
pixelSize: 20
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
\`\`\`
|
|
1824
|
+
`,fl=Date.now(),Pe=class Pe extends M{constructor(e){super(e);a(this,"_flyToEvent",this.disposeVar(new v));a(this,"_resetClockEvent",this.disposeVar(new v))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new _n([this,"data"],"数据",void 0,void 0,!0),new R([this,"uri"],"路径",Pe.defaults.uri,void 0,!0),new E([this,"autoResetClock"],"自动设置时钟",Pe.defaults.autoResetClock),new E([this,"clockEnabled"],"启用",Pe.defaults.clockEnabled),new E([this,"shouldAnimate"],"是否启用动画",Pe.defaults.shouldAnimate),new Ve([this,"startTime"],"开始时间",Pe.defaults.startTime,!0),new Ve([this,"stopTime"],"结束时间",Pe.defaults.stopTime),new Ve([this,"currentTime"],"当前时间",Pe.defaults.currentTime,!0),new f([this,"multiplier"],"倍速",Pe.defaults.multiplier),new A([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep",Pe.defaults.clockStep),new A([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange",Pe.defaults.clockRange)],general:[...e.general,new E([this,"show"],"是否显示",!0),new E([this,"collision"],"开启碰撞",!1),new E([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new k("通用"),new L("飞入",t=>this.flyTo(t),[1e3],"flyTo"),new Xe([this,"loadFuncStr"],"loadFnStr",pd,gf,!0),new L("重设时钟",()=>this.resetClock(),[],"resetClock")]}}};a(Pe,"createDefaultProps",()=>({...M.createDefaultProps(),show:!0,uri:void 0,allowPicking:!1,loadFuncStr:void 0,data:void 0,autoResetClock:!0,clockEnabled:!1,startTime:fl,stopTime:fl+1440*60*1e3,currentTime:fl,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,clampToGround:!1})),a(Pe,"type",Pe.register("ESKml",Pe,{chsName:"ESKml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:`ESKml 是用于在场景中加载和显示 KML/KMZ 数据的对象,支持路径、地标和时空数据。
|
|
1825
|
+
对象json示例:
|
|
1826
|
+
{
|
|
1827
|
+
"type": "ESKml",
|
|
1828
|
+
"uri": "\${earthsdk3-assets-script-dir}/assets/misc/bikeRide.kml"
|
|
1829
|
+
}
|
|
1830
|
+
`}));let ml=Pe;const ff=n=>{const s=[{maxAlt:25e7,level:0},{maxAlt:25e6,level:1},{maxAlt:9e6,level:2},{maxAlt:7e6,level:3},{maxAlt:44e5,level:4},{maxAlt:2e6,level:5},{maxAlt:1e6,level:6},{maxAlt:493977,level:7},{maxAlt:218047,level:8},{maxAlt:124961,level:9},{maxAlt:56110,level:10},{maxAlt:4e4,level:11},{maxAlt:13222,level:12},{maxAlt:7e3,level:13},{maxAlt:4e3,level:14},{maxAlt:2500,level:15},{maxAlt:1500,level:16},{maxAlt:600,level:17},{maxAlt:250,level:18},{maxAlt:150,level:19},{maxAlt:50,level:20}];for(const{maxAlt:e,level:t}of s)if(n>=e)return t;return 20},mf=async(n,s,e)=>(await fetch(`https://tileser.giiiis.com/xyzinfo/${e}/${n}/${s}`)).json(),vf=async n=>{var c;const s=(c=n.getCurrentCameraInfo())==null?void 0:c.position;if(!s)return;const e=s[0],t=s[1],i=s[2],r=ff(i);let o=Math.floor((e+180)/360*Math.pow(2,r+1)),l=Math.floor((90-t)/180*Math.pow(2,r));return await mf(o,l,r)};class _f extends b{constructor(s,e,t){super();const i=async()=>{const o=await vf(s);e.datesEvent.emit(o,s)};i();let r;r=setInterval(()=>{i()},3e3),this.d(()=>r&&clearInterval(r));{const o=()=>{const l=e.currentDate?e.currentDate:0;t.url=`https://tileser.giiiis.com/timetile/tms/${l}/tilemapresource.xml`};o(),this.d(e.currentDateChanged.don(o))}}}const Qs=class Qs extends X{constructor(e){super(e);a(this,"_esImageryLayer",this.dv(new fs));a(this,"_datesEvent",this.dv(new v));const t=this._esImageryLayer;this.d(this.components.disposableAdd(t)),t.zIndex=1,t.minimumLevel=1,t.maximumLevel=18,this.d(_([t,"show"],[this,"show"])),this.d(_([t,"zIndex"],[this,"zIndex"])),this.d(_([t,"rectangle"],[this,"rectangle"])),this.d(D([t,"flyInParam"],[this,"flyInParam"])),this.d(D([t,"flyToParam"],[this,"flyToParam"])),this.registerAttachedObjectForContainer(i=>new _f(i,this,t)),this.d(this.flyInEvent.don(i=>{t.flyIn(i)})),this.d(this.flyToEvent.don(i=>{t.flyTo(i)})),this.d(this.calcFlyToParamEvent.don(()=>{t.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{t.calcFlyInParam()}))}get esImageryLayer(){return this._esImageryLayer}get datesEvent(){return this._datesEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new N([this,"currentDate"],"时间","0"),new f([this,"zIndex"],"层级",0),new Fe([this,"rectangle"],"矩形范围",[-180,-90,180,90])]}}};a(Qs,"createDefaultProps",()=>({...X.createDefaultProps(),currentDate:"",zIndex:0,rectangle:F([-180,-90,180,90])})),a(Qs,"type",Qs.register("ESGeHistoryImagery",Qs,{chsName:"谷歌历史影像",tags:["ESObjects","_ES_Impl_UE"],description:`ESGeHistoryImagery 是用于在场景中加载和显示谷歌历史影像图层的对象,支持按时间选择影像数据。
|
|
1831
|
+
对象json示例:
|
|
1832
|
+
{
|
|
1833
|
+
"type": "ESGeHistoryImagery",
|
|
1834
|
+
"currentDate": "2020-01-01",
|
|
1835
|
+
"rectangle": [-180, -90, 180, 90]
|
|
1836
|
+
}
|
|
1837
|
+
`}));let vl=Qs;const en=class en extends X{constructor(s){super(s)}getESProperties(){const s={...super.getESProperties()};return{...s,basic:[...s.basic,new R([this,"url"],"url",void 0),new f([this,"zIndex"],"层级",0),new f([this,"maxZoom"],"最大缩放级别",0),new f([this,"minZoom"],"最小缩放级别",0)]}}};a(en,"createDefaultProps",()=>({...X.createDefaultProps(),attributions:q(void 0),attributionsCollapsible:void 0,cacheSize:void 0,crossOrigin:void 0,interpolate:void 0,projection:te(void 0),reprojectionErrorThreshold:void 0,maxZoom:void 0,minZoom:void 0,opaque:void 0,maxResolution:void 0,minResolution:void 0,tileSize:void 0,maxTilesDownload:void 0,tileLoadFunction:void 0,tileUrlFunction:void 0,url:void 0,urls:q(void 0),wrapX:void 0,transition:void 0,show:!0,zIndex:1,visible:!0,extent:q(void 0),zoomOffset:void 0,tilePixelRatio:void 0,gutter:void 0,zDirection:void 0,tileGrid:te(void 0),key:void 0})),a(en,"type",en.register("ESXYZLayer",en,{chsName:"OL简单xyz图层",tags:["ESObjects","_ES_Impl_Openlayers"],description:`ESXYZLayer 是用于在 OpenLayers 地图中加载和显示 XYZ 瓦片图层的对象。
|
|
1838
|
+
对象json示例:
|
|
1839
|
+
{
|
|
1840
|
+
"type": "ESXYZLayer",
|
|
1841
|
+
"url": "http://t0.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}",
|
|
1842
|
+
"maxZoom": 18
|
|
1843
|
+
}
|
|
1844
|
+
`}));let _l=en;const Gt=class Gt extends b{constructor(){super();a(this,"_loading",!1);a(this,"_loadedEvent",this.disposeVar(new v));a(this,"_loaded",!1);a(this,"_loadedPromiseResolve");a(this,"_loadedPromise",new Promise(e=>{this._loadedPromiseResolve=e}));a(this,"_processing");this._processing=this.disposeVar(Le(async e=>{if(this._loading=!0,globalThis.Hls)console.info("可能系统已经加载hlsjs,此处不再加载!");else{const t=M.context.getStrFromEnv(Gt.path);await e.promise(Jr(t))}this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve()})),this._processing.start()}get loading(){return this._loading}get loadedEvent(){return this._loadedEvent}get loaded(){return this._loaded}get loadedPromise(){return this._loadedPromise}get processing(){return this._processing}static instance(){return Gt._instance=Gt._instance||new Gt,Gt._instance}};a(Gt,"path","${xr-utils-script-dir}/xr-static/xr-utils/hlsjs/1.4.12/hls.min.js"),a(Gt,"_instance");let Cr=Gt,yf=class extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}};class wf extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_processing");this._complexImage=e,this._videoSrc=t,this._videoDom=this.disposeVar(new yf(this._complexImage,"")),this._processing=this.disposeVar(Le(async i=>{const{videoSrc:r}=this,o=Cr.instance();await i.promise(o.loadedPromise);const l=globalThis.Hls,h=new l,c=this.element;await yi(i,()=>new Promise((u,p)=>{c.xbsjHLS=h,h.attachMedia(c),h.on(l.Events.MEDIA_ATTACHED,()=>{h.loadSource(r),h.on(l.Events.MANIFEST_PARSED,(g,m)=>{c.play(),u()})}),h.on(l.Events.ERROR,(g,m)=>{const{type:y,details:S,fatal:C}=m;C&&(h.destroy(),p(S))})}))})),this._processing.start()}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class gd extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new wf(this._complexImage,this._imageUri)),this._update=this.disposeVar(cs(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}const Jt=class Jt extends b{constructor(){super();a(this,"_loading",!1);a(this,"_loadedEvent",this.disposeVar(new v));a(this,"_loaded",!1);a(this,"_loadedPromiseResolve");a(this,"_loadedPromise",new Promise(e=>{this._loadedPromiseResolve=e}));a(this,"_processing");this._processing=this.disposeVar(Le(async e=>{if(this._loading=!0,globalThis.flvjs)console.info("可能系统已经加载flvjs,此处不再加载!");else{const t=M.context.getStrFromEnv(Jt.path);await e.promise(Jr(t))}this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve()})),this._processing.start()}get loading(){return this._loading}get loadedEvent(){return this._loadedEvent}get loaded(){return this._loaded}get loadedPromise(){return this._loadedPromise}get processing(){return this._processing}static instance(){return Jt._instance=Jt._instance||new Jt,Jt._instance}};a(Jt,"path","${xr-utils-script-dir}/xr-static/xr-utils/flvjs/1.6.2/flv.min.js"),a(Jt,"_instance");let Pr=Jt;class Ef extends b{constructor(e,t){super();a(this,"_element");this._complexImage=e,this._videoSrc=t;var i=document.createElement("video");i.src=this._videoSrc,i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.zIndex="-100",i.style.visibility="hidden";{const r=()=>{i.crossOrigin=this._complexImage.crossOrigin};r(),this.dispose(this._complexImage.crossOriginChanged.disposableOn(r))}{const r=()=>{i.autoplay=this._complexImage.autoplay};r(),this.dispose(this._complexImage.autoplayChanged.disposableOn(r))}{const r=()=>{i.loop=this._complexImage.loop};r(),this.dispose(this._complexImage.loopChanged.disposableOn(r))}i.muted=!0,document.body.appendChild(i),this._element=i,this.dispose(()=>document.body.removeChild(i))}get element(){return this._element}}class bf extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_processing");this._complexImage=e,this._videoSrc=t,this._videoDom=this.disposeVar(new Ef(this._complexImage,"")),this._processing=this.disposeVar(Le(async i=>{const{videoSrc:r}=this,o=Pr.instance();await i.promise(o.loadedPromise);const l=globalThis.flvjs,h=this.element;await yi(i,()=>new Promise((c,u)=>{if(!l.isSupported()){u("flvjs不支持!");return}var p=l.createPlayer({type:"flv",url:r});p.attachMediaElement(h),p.load(),p.play(),h.xbsjFlvPlayer=p}))})),this._processing.start()}get videoSrc(){return this._videoSrc}get videoDom(){return this._videoDom}get element(){return this.videoDom.element}get processing(){return this._processing}}class fd extends b{constructor(e,t){super();a(this,"_videoDom");a(this,"_update");this._complexImage=e,this._imageUri=t,this._videoDom=this.disposeVar(new bf(e,this._imageUri)),this._update=this.disposeVar(cs(()=>this.update())),this._update.start()}get videoDom(){return this._videoDom}get videoElement(){return this._videoDom.element}update(){if(this.videoElement.readyState<2)return;const e=this._complexImage,{videoWidth:t,videoHeight:i}=this.videoElement;e.size=[t,i],e.pixelFormat="RGBA",e.copyTexture({source:this.videoElement})}}function md(n){const s=n.substring(n.lastIndexOf(".")+1);return Dn.suffixTypes[s]}class Dn extends b{constructor(){super();a(this,"_enabled",this.disposeVar(w(!1)));a(this,"_uri",this.disposeVar(w("")));a(this,"_type",this.disposeVar(w(void 0)));a(this,"_size",this.disposeVar(q(void 0)));a(this,"_pixelFormat",this.disposeVar(w("RGBA")));a(this,"_flipY",this.disposeVar(w(!0)));a(this,"_crossOriginReact",this.disposeVar(w("")));a(this,"_autoplayReact",this.disposeVar(w(!0)));a(this,"_loopReact",this.disposeVar(w(!0)));a(this,"_copyTextureEvent",this.disposeVar(new v));a(this,"_imageProcessingResettingEvent",this.disposeVar(oe(this.enabledChanged,this.uriChanged,this.typeChanged)));a(this,"_imageProcessingResetting",this.disposeVar(new le(this._imageProcessingResettingEvent,()=>{if(!this.enabled||!this.uri)return;let{type:e}=this;if(e||(e=md(this.uri)),!!e){if(e==="img")return new wh(this,this.uri);if(e==="video")return new Sh(this,this.uri);if(e==="gif")return new kh(this,this.uri);if(e==="hls")return new gd(this,this.uri);if(e==="flv")return new fd(this,this.uri)}})));a(this,"_createNativeTextureEvent",this.disposeVar(oe(this.enabledChanged,this.sizeChanged,this.pixelFormatChanged,this.flipYChanged)))}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}get uri(){return this._uri.value}set uri(e){this._uri.value=e}get uriChanged(){return this._uri.changed}get type(){return this._type.value}set type(e){this._type.value=e}get typeChanged(){return this._type.changed}get size(){return this._size.value}set size(e){this._size.value=e}get sizeChanged(){return this._size.changed}get pixelFormat(){return this._pixelFormat.value}set pixelFormat(e){this._pixelFormat.value=e}get pixelFormatChanged(){return this._pixelFormat.changed}get flipY(){return this._flipY.value}set flipY(e){this._flipY.value=e}get flipYChanged(){return this._flipY.changed}get crossOrigin(){return this._crossOriginReact.value}set crossOrigin(e){this._crossOriginReact.value=e}get crossOriginChanged(){return this._crossOriginReact.changed}get autoplay(){return this._autoplayReact.value}set autoplay(e){this._autoplayReact.value=e}get autoplayChanged(){return this._autoplayReact.changed}get loop(){return this._loopReact.value}set loop(e){this._loopReact.value=e}get loopChanged(){return this._loopReact.changed}get copyTextureEvent(){return this._copyTextureEvent}copyTexture(e){this._createNativeTextureEvent.flush(),this._copyTextureEvent.emit(e)}get imageProcessingResetting(){return this._imageProcessingResetting}get createNativeTextureEvent(){return this._createNativeTextureEvent}copyFromCanvas(e){if(e.width<=0||e.height<=0){console.warn("canvas.width <= 0 || canvas.height <= 0");return}this.size=[e.width,e.height],this.pixelFormat="RGBA",this.copyTexture({source:e})}}a(Dn,"types",bh),a(Dn,"czmPixelFormats",Eh),a(Dn,"suffixTypes",{png:"img",jpg:"img",svg:"img",webp:"img",gif:"gif",mp4:"video",mov:"video",webm:"video",flv:"flv",m3u8:"hls"});const Sf=[0,0,0,0];class Cf{constructor(){a(this,"_value",[]);a(this,"_valueStr","[]");a(this,"_valueChanged");this.value=[{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}]}get valueChanged(){return this._valueChanged||(this._valueChanged=new v),this._valueChanged}set value(s){if(s.length===0){console.error("value.length === 0");return}let e;if(this._value.length===s.length){const i=[...s].sort((r,o)=>r.ratio-o.ratio);if(e=JSON.stringify(i),this._valueStr===e)return}e=e||JSON.stringify([...s].sort((i,r)=>i.ratio-r.ratio));const t=this._value;if(this._value=JSON.parse(e),this._value.length===0)throw console.error("this._colorStops.length === 0"),new Error("this._colorStops.length === 0");this._valueChanged&&this._valueChanged.emit(this._value,t)}get value(){return JSON.parse(JSON.stringify(this._value))}get valueStr(){return this._valueStr}get minRatio(){return this._value[0].ratio}get maxRatio(){return this._value[this._value.length-1].ratio}_getRatioIndex(s){if(s<this._value[0].ratio||s>this._value[this._value.length-1].ratio)throw console.error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio"),new Error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio");let e=this._value.length;for(let t=0;t<e-1;++t)if(s>=this._value[t].ratio&&s<=this._value[t+1].ratio)return t;throw console.error("shoud not be here!"),new Error("shoud not be here!")}getRatioColor(s,e){s=Hn(s,this.minRatio,this.maxRatio);const t=this._getRatioIndex(s),i=this._value[t],r=this._value[t+1],o=(s-i.ratio)/(r.ratio-i.ratio);for(let l=0;l<4;++l)e[l]=i.rgba[l]*(1-o)+r.rgba[l]*o;if(e.some(Number.isNaN)){console.error("result NaN");return}return e}getColorsInUint8(s){if(s.length%4!==0)throw console.error("result.length % 4 !== 0"),new Error("result.length % 4 !== 0");const e=s.length/4,t=1/e;for(let i=0;i<e;++i){const r=Sf;this.getRatioColor((i+.5)*t,r)||r.splice(0,4,0,0,0,0);for(let o=0;o<4;++o)s[i*4+o]=255*r[o]|0}return s}}class Pf extends b{constructor(){super(...arguments);a(this,"registerEngines",{})}register(e,t,i){const r=this.registerEngines[e]||new Map;return r.has(t)&&console.warn(`register warn:${e}中${t}的实现类已经被注册,再次注册会覆盖。`),r.set(t,i),this.registerEngines[e]=r,t}getEngineObjConstructor(e,t){const i=this.registerEngines[t];if(!i)return;let r=e.constructor,o=e.typeName,l=i.get(o);if(l)return l;if(e.components.main)return;const h=o;for(;o!=="ESSceneObject"&&(r=r.getParentClass(),!!r);)if(o=r.type,l=i.get(o),l)return console.warn(`未找到${h}在${t}中对应的实现类! 使用父类${o}的实现类!`),l}createEngineObject(e,t){const i=this.getEngineObjConstructor(e,t.typeName);if(i){const r=new i(e,t);return r.createdEvent.emit(),r}else{const r=new xi(e,t);return r.createdEvent.emit(),r}}}class Tf extends b{constructor(){super(...arguments);a(this,"registerEngines",{})}register(e,t,i){const r=this.registerEngines[e]||new Map;r.has(t)&&console.warn(`register warn:${e}中${t}的实现类已经被注册,再次注册会覆盖。`),r.set(t,i),this.registerEngines[e]=r}getEngineObjConstructor(e,t){const r=(this.registerEngines[t]||new Map).get(e);if(r)return r;console.warn(`未找到${e}在${t}中对应的实现类!`)}createEngineObject(e,t){const i=this.getEngineObjConstructor(e.typeName,t.typeName);if(i){const r=new i(e,t);return r.createdEvent.emit(),r}else{const r=new xi(e,t);return r.createdEvent.emit(),r}}}const it=class it extends b{constructor(e,t,i=!1){super();a(this,"_createdEvent",this.dv(new v));a(this,"_id",++it._accumId);this._sceneObject=e,this._viewer=t;{if(i)return;const r=(o,l)=>{for(let h of o)this._viewer.delete(h);for(let h of l)h.parentID=this.sceneObject.id,this._viewer.add(h)};r([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(r)),this.d(()=>r(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};a(it,"context",new Pf),a(it,"contextEditing",new Tf),a(it,"register",it.context.register.bind(it.context)),a(it,"registerEditing",it.contextEditing.register.bind(it.contextEditing)),a(it,"_accumId",-1);let xi=it;function vd(n){return typeof n=="string"?document.getElementById(n):n}function yl(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const s=document.createElement("div");return s.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(s),s}class _d extends b{constructor(e,t){super();a(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=t;const i=this._listeningSceneObjects,r=(o,l)=>{if(o)for(let h of o){const c=i.get(h);c&&(c.destroy(),i.delete(h))}if(l)for(let h of l){if(i.get(h)){console.warn(`listeningSceneObjects已存在某对象:${h.name}`,h);debugger}const u=this.createSceneObjectListeningFunc(h);u&&i.set(h,u)}};r(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(r)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class If extends b{constructor(s){super(),this._esObjectsManager=s;{const e=this._esObjectsManager;class t extends b{constructor(r){super(),this._esPath=r,this.dv(new le(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class l extends b{constructor(c){if(super(),this._esPath=c,!o)throw new Error("!viewer");const u=()=>{const p=e.activeViewer;p&&(this._esPath.path.currentTime=p.simulationTime)};u(),this.d(o.simulationTimeChanged.don(u))}}return new l(this._esPath)}))}}this.dv(new _d(e.sceneObjectsManager,i=>{if(i instanceof ys)return new t(i)}))}{const e=this._esObjectsManager;class t extends b{constructor(r){super();const o=()=>{const l=e.activeViewer;l&&(l.simulationTime=r.currentTime??0)};o(),this.d(r.currentTimeChanged.don(o))}}this.dv(new _d(e.sceneObjectsManager,i=>{if(i instanceof _s)return new t(i)}))}}}class xf extends b{constructor(s){super(),s.forEach(e=>{this.d(e.path.currentPositionChanged.don(t=>{t&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...t])})})),this.d(e.path.currentRotationChanged.don(t=>{t&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...t])})}))})}}class Of extends b{constructor(e){super();a(this,"_player");a(this,"_channels",this.dv(F([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new le(this.channelsChanged,()=>{if(this.channels.length===0)return;const t=[];for(let i=0;i<this.channels.length;i++){const r=this.channels[i],o=M.getSceneObjById(r.pathId);if(!o||!(o instanceof ys))continue;const h=r.sceneObjectIds.map(c=>M.getSceneObjById(c)).filter(c=>c!==void 0);h.length!==0&&t.push({path:o,sceneObjects:h})}if(t.length!==0)return new xf(t)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function yd(n,s,e,t){if(e)t.currentActiveEditing=[n,s];else if(t.currentActiveEditing){const[i,r]=t.currentActiveEditing;i===n&&r===s&&(e||(t.currentActiveEditing=void 0))}}const Df=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class Ff extends b{constructor(s,e){super(),this._sceneObject=s;const t=this._sceneObject;for(let i of Df){const r=i+"Changed",o=t[r];if(o){{const l=t[i];yd(t,i,l,e)}this.dispose(o.disposableOn((l=>yd(t,i,l,e))))}}}get sceneObject(){return this._sceneObject}}class kf extends b{constructor(){super();a(this,"_currentActiveEditing",this.disposeVar(q(void 0)));a(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,t)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),t){const[i,r]=t;i[r]===!0&&(i[r]=!1)}if(e){const[i,r]=e;i[r]=!0}})),M.context.sceneObjCreatedEvent.don(e=>{e.dv(new Ff(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class Mf extends b{constructor(){super();a(this,"_sceneObjects",new Set);a(this,"_sceneObjectsToChange",this.dv(new v));this.d(()=>{const e=Hr(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,t){const i=M.context.createSceneObject(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromUrl(e,t){const i=M.context.createSceneObjectFromUrl(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,t){const i=M.context.createSceneObjectFromClass(e,t);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const t=M.context.createSceneObjectFromJson(e);return t&&this.addSceneObject(t),t}}class Af extends b{constructor(e){super();a(this,"_enabled",this.dv(w(!1)));a(this,"_cursorPosition",w(void 0));a(this,"quickPickPosition",!0);let t=new b;const i=()=>{t&&(t.destroy(),t=void 0)};this.d(i);const r=()=>{if(i(),!e||!this._enabled.value)return;t=new b;const o=t.dv(w(void 0)),l=t.dv(oe(o.changed));t.d(e.pointerMoveEvent.don(c=>{c.pointerEvent&&(o.value=we(c.pointerEvent))}));const h=t.dv(Le(async c=>{if(o.value)if(this.quickPickPosition){const u=await c.promise(hs(e.quickPickPosition(o.value)));this._cursorPosition.value=u}else{const u=await c.promise(hs(e.pickPosition(o.value)));this._cursorPosition.value=u}}));t.d(l.don(()=>{h.restart()}))};r(),this.d(this._enabled.changed.don(r))}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}get cursorPosition(){return this._cursorPosition.value}get cursorPositionChanged(){return this._cursorPosition.changed}}class jf extends b{constructor(e){super();a(this,"cursorPositionInfo");this.viewer=e,this.cursorPositionInfo=this.dv(new Af(this.viewer))}}class Rf extends b{constructor(e){super();a(this,"viewer");const t=this.viewer=e;this.ad(new le(t.rollerShutterChanged,()=>{const i=t.container;if(!i||!t.rollerShutter)return;const r=new b;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),r.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),r}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const t=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",t)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",t)}),e}}class Nf extends b{constructor(e){super();a(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new Rf(e))}}function wd(n,s){return n.length===s.length&&n.every((e,t)=>e===s[t])}class Lf extends b{constructor(s){super(),this._viewer=s,this.d(_([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class Vf extends b{constructor(s,e){super(),this._viewer=s,this._activeViewer=e;const t=at.createCommonProps(),i=[];Object.keys(t).forEach(h=>{const c=this._activeViewer[h+"Changed"];i.push(c)});const r=this.dv(oe(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(t).forEach(h=>{this._viewer[h]=this._activeViewer[h]})};this.d(r.don(o));const l=this.dv(dn());l.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const h=this._activeViewer.getCurrentCameraInfo(),c=this._viewer.getCurrentCameraInfo();if(!h)return;const{position:u,rotation:p}=h;c&&wd(u,c.position)&&wd(p,c.rotation)||this._viewer.flyIn(u,p,0)}),this.d(()=>l.cancel())}}const zf=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
499
1845
|
<animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
|
|
500
1846
|
</circle><g></g></g></svg>
|
|
501
|
-
`,Kg='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',Zg='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',qi=class qi extends b{constructor(s){super();const e=()=>{const t=this.dv(new Qn);this.d(_([t,"show"],[s,"useDefaultStatusDiv"]));{const i=()=>{t.show=(s.useDefaultStatusDiv??!0)&&s.status!=="Created"};i(),this.d(s.useDefaultStatusDivChanged.don(i)),this.d(s.statusChanged.don(i)),t.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}s.add(t),this.d(()=>s.delete(t)),t.instanceClass=class extends b{constructor(o,h,c){super();a(this,"_div",document.createElement("div"));if(this._subContainer=o,!c)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const w=()=>{h.show?this._div.style.opacity="1":this._div.style.opacity="0"};w(),this.d(h.showChanged.don(w))}let l,u,p,g,f;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",l=document.createElement("div"),this._div.appendChild(l),l.style.width="auto",l.style.position="absolute",l.style.left="50%",l.style.top="50%",l.style.transform="translate(-50%,-50%)",l.style.background="rgba(120, 120, 0, 0.7)",l.style.color="white",l.style.fontSize="10px",l.style.background="none",l.style.display="flex",l.style.justifyContent="center",l.style.alignItems="center",u=document.createElement("div"),l.appendChild(u),u.style.pointerEvents="none",u.style.display="block",u.style.width="40px",u.innerHTML=qi.defaultsSvg.loadingSvg,u.style.filter="drop-shadow(0px 0px 1px black)",p=document.createElement("div"),l.appendChild(p),p.style.pointerEvents="none",p.style.marginLeft="10px",p.style.display="flex",p.style.flexFlow="column",p.style.maxWidth="300px",g=document.createElement("div"),p.appendChild(g),g.style.fontSize="14px",g.style.fontWeight="800",g.style.marginBottom="5px",g.style.textShadow="0 0 2px black",f=document.createElement("div"),p.appendChild(f),f.style.fontWeight="400",f.style.textShadow="0 0 2px black";{const w=()=>{let C="Raw";c.status==="Raw"?C="初始状态":c.status==="Creating"?C="正在创建":c.status==="Created"?C="创建完成":c.status==="Error"?C="创建失败":c.status==="Reconnecting"&&(C="重新连接"),g.innerText=`${C}(${c.status})`,f.innerText=`${c.statusLog}`,(c.status==="Creating"||c.status==="Reconnecting")&&(u.innerHTML=qi.defaultsSvg.loadingSvg),c.status==="Created"&&(u.innerHTML=qi.defaultsSvg.successSvg),c.status==="Error"&&(u.innerHTML=qi.defaultsSvg.warnSvg)};w();const E=this.dv(ae(c.statusLogChanged,c.statusChanged));this.d(E.don(w))}}update(){const o=255*Math.random()|0,h=255*Math.random()|0,c=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${h}, ${c}, 0.8)`}}};this.d(s.containerChanged.don(()=>{e()}))}};a(qi,"defaultsSvg",{loadingSvg:Yg,successSvg:Kg,warnSvg:Zg});let Xa=qi;class Qg extends b{constructor(s,e,t){super(),this._subContainer=s,this._overlayContainer=e,this._viewer=t;const i=this._subContainer,r=this._overlayContainer,o=this._viewer,h=()=>{const u=o.zIndex??"";i.style.zIndex=u,r.style.zIndex=u};h(),this.d(o.zIndexChanged.don(h));const c=()=>{i.style.display=o.show??!0?"block":"none"};c(),this.d(o.showChanged.don(c));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function gr(n){let s=Ae(n,"_relativeContainer");return s||(s=document.createElement("div"),s.style.position="relative",s.style.width="100%",s.style.height="100%",s.style.padding="0",s.style.margin="0",n.appendChild(s),gt(n,"_relativeContainer",s)),s}class ef extends b{constructor(e,t){super();a(this,"_subContainer",document.createElement("div"));a(this,"_overlayContainer",document.createElement("div"));a(this,"_containerStyleController");this._container=e,this._viewer=t,this._containerStyleController=this.dv(new Qg(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:r}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),r.style.position="relative",r.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),gr(this._container).appendChild(i),this.d(()=>gr(this._container).removeChild(i)),gr(this._container).appendChild(r),this.d(()=>gr(this._container).removeChild(r))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class tf extends b{constructor(){super(...arguments);a(this,"registerObjsMap",new Map)}register(e,t){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,t),e}getViewerConstructor(e){const t=this.registerObjsMap.get(e);if(!t){console.warn(`未找到${e}类!`);return}return t}createViewer(e){const t=e.type;console.log(e);const i=this.getViewerConstructor(t);if(!i)throw new Error(`没有找到类型为${t}的Viewer构造器!`);return new i(e)}}class Wl extends b{constructor(s,e,t=!1,i=!1){if(super(),this._viewer=s,!e)throw new Error("ViewerCustomInteraction: container is null");const r=this.dv(se.create(e,"pointerdown")),o=this.dv(se.create(e,"pointermove")),h=this.dv(se.create(e,"pointerup")),c=this.dv(se.create(e,"pointerout")),l=this.dv(se.create(e,"pointerover")),u=this.dv(new Jr),p=this.dv(new Eh),g=()=>{const I=this._viewer.hoverTime*1e3;p.delayTime=I};this.d(this._viewer.hoverTimeChanged.don(()=>{g()})),this.d(r.don(I=>u.pointerDown(I))),this.d(o.don(I=>u.pointerMove(I))),this.d(h.don(I=>u.pointerUp(I))),this.d(c.don(I=>u.pointerOut(I))),this.d(r.don(I=>p.pointerDown(I))),this.d(o.don(I=>p.pointerMove(I))),this.d(h.don(I=>p.pointerUp(I))),this.d(c.don(I=>p.pointerOut(I)));const{x:f,y:w}=e.getBoundingClientRect(),E=i?f:0,C=i?w:0;this.d(p.hoverEvent.don(I=>{const[H,q]=Qi(I,t);this._viewer.hoverEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(u.clickEvent.don(I=>{const[H,q]=Qi(I,t);this._viewer.clickEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(u.dbclickEvent.don(I=>{const[H,q]=Qi(I,t);I.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(r.don(I=>{const[H,q]=Qi(I,t);I.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(h.don(I=>{const[H,q]=Qi(I,t);I.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(o.don(I=>{const[H,q]=Ee(I,t);this._viewer.pointerMoveEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(l.don(I=>{const[H,q]=Ee(I,t);this._viewer.pointerOverEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})})),this.d(c.don(I=>{const[H,q]=Ee(I,t);this._viewer.pointerOutEvent.emit({screenPosition:[H+E,q+C],pointerEvent:I})}));const T=this.dv(se.create(e,"keydown"));this.d(T.don(I=>this._viewer.keyDownEvent.emit(I)));const R=this.dv(se.create(e,"keyup"));this.d(R.don(I=>this._viewer.keyUpEvent.emit(I)));const V=this.dv(se.create(e,"wheel"));this.d(V.don(I=>this._viewer.wheelEvent.emit(I)))}}const qt=class qt extends b{constructor(e){super();a(this,"_forceRecreateEvent",this.dv(new m));a(this,"_container",this.dv(y(void 0)));a(this,"_containerSize",this.dv(y(void 0)));a(this,"_editingEvent",this.disposeVar(new m));a(this,"_esViewerExtensions",this.dv(new $g(this)));a(this,"_status",this.dv(y("Raw")));a(this,"_statusLog",this.dv(y("")));a(this,"_statusContainer",this.dv(new Xa(this)));a(this,"_useCustomInteraction",this.dv(y(!0)));a(this,"_resetInteractionEvent",this.dv(ae(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));a(this,"_interactionResetting",this.dv(new ce(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new Wl(this,this.container)})));a(this,"_viewerChanged",this.dv(new m));a(this,"_cameraChanged",this.dv(new m));a(this,"_containerResetEvent",this.dv(ae(this.containerChanged,this._forceRecreateEvent)));a(this,"_containerResetting",this.dv(new ce(this._containerResetEvent,()=>{if(this.container)return new ef(this.container,this)})));a(this,"_sceneObjectsMap",new Map);a(this,"_id");a(this,"_typeName");a(this,"_updateFuncReact",this.dv(y(void 0)));a(this,"_toDestroyFuncReact",this.dv(y(void 0)));a(this,"_statusInfo",qt.defaults.statusInfo);a(this,"_navigationMode",this.dv(y("Map")));a(this,"_navigationEvent",this.disposeVar(new m));a(this,"_syncViewer",this.dv(y(void 0)));a(this,"_syncEventDon",this.dv(new ce(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new Xg(this,e)})));a(this,"_timeSyncdon",this.dv(new ce(this.timeSyncChanged,()=>{if(this.timeSync)return new qg(this)})));a(this,"_hoverEvent",this.dv(new m));a(this,"_pointerOverEvent",this.dv(new m));a(this,"_pointerMoveEvent",this.dv(new m));a(this,"_pointerDownEvent",this.dv(new m));a(this,"_pointerUpEvent",this.dv(new m));a(this,"_pointerOutEvent",this.dv(new m));a(this,"_clickEvent",this.dv(new m));a(this,"_dblclickEvent",this.dv(new m));a(this,"_keyDownEvent",this.dv(new m));a(this,"_keyUpEvent",this.dv(new m));a(this,"_wheelEvent",this.dv(new m));a(this,"_actived",this.dv(y(!1)));this._id=e.id??Ki();const t=Vl(e.container);if(t)this._container.value=qa(t),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{t&&(this.show??!0?t.style.display="block":t.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,r=()=>{for(let[h,c]of i.entries())if(!c&&h){const l=Ti.context.createEngineObject(h,this);l&&i.set(h,l)}},o=()=>{for(let[h,c]of i.entries())c&&!c.isDestroyed()&&c.destroy(),i.set(h,void 0)};this.d(o),this.d(this.viewerChanged.don(h=>{o(),h&&r()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(r){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let r;this.d(()=>r&&r.destroy()),this.d(this.updateFuncChanged.don(()=>{r&&r.cancel(),this.updateFunc&&(r=r||Ks(),r.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(r){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new Jg(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const t=document.getElementById(e);t&&t instanceof HTMLDivElement?this._container.value=qa(t):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=qa(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get esViewerExtensions(){return this._esViewerExtensions}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let t of e)if(!this.has(t)){k.context.addSceneObject(t);const i=Ti.context.createEngineObject(t,this);i&&this._sceneObjectsMap.set(t,i),t.viewerAttached.emit(this)}}delete(...e){for(let t of e)if(this.has(t)){const i=this._sceneObjectsMap.get(t);i&&i.destroy(),k.context.deleteSceneObject(t),this._sceneObjectsMap.delete(t),t.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return qt.createDefaultProps()}get completeJson(){return this._getJson(!1)}_getJson(e=!0){const t={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let r,o=this.defaultProps[i];o instanceof fe?r=o.equals(this[i]):r=o===this[i],r||(t[i]=this[i])}else t[i]=this[i];return t}_setJson(e,t,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const r=t||[];r.push("id","type");const o=Object.keys(this.defaultProps).filter(h=>!r.includes(h));for(let h of o)if(h in e)this[h]=e[h]===null?void 0:e[h];else if(!(i??!1)){let c=this.defaultProps[h];c instanceof fe&&(c=c.value),this[h]=c}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}get navigationEvent(){return this._navigationEvent}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(t){console.warn(`时间格式不正确! value: ${e} error: ${t}`)}}async getVersion(){return globalThis.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}async getCurrentRectangle(){var e;try{const t=(e=this.container)==null?void 0:e.getBoundingClientRect();if(!t)return;const{width:i,height:r}=t,o=await this.quickPickPosition([0,0]),h=await this.quickPickPosition([i,r]);return!o||!h?void 0:[o[0],h[1],h[0],o[1]]}catch(t){console.error(t);return}}};a(qt,"context",new tf),a(qt,"register",qt.context.register.bind(qt.context)),a(qt,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0],depthTestAgainstTerrain:!0,terrainOpacity:1});let nt=qt;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:W(void 0),devTags:ee(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:1024,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:ee(void 0),editingAuxiliaryPointColor:ee(void 0),editingLineWidth:void 0,editingLineColor:ee(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:y(void 0),rollerShutter:!1,cameraMovableRegion:ee(void 0),depthTestAgainstTerrain:!0,terrainOpacity:1,sceneGlobeBaseColor:F([1,1,1,1]),sceneBackgroundColor:F([0,0,0,0])}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(nt||(nt={})),Yt(nt.prototype,nt.createDefaultProps);function Bl(n,s){const e=n._lastCameraInfo;if(e){const t=s.viewerChanged.don(i=>{if(!i||!e)return;const{position:r,rotation:o}=e;s.flyIn(r,o,0),n._lastCameraInfo=void 0,t()})}}const sf=n=>{const s=nt.createCommonProps(),e={};try{Object.keys(s).forEach(t=>{e[t]=n[t]})}catch(t){console.warn(t)}return e},Hl=(n,s)=>{const e=nt.createCommonProps();try{Object.keys(e).forEach(t=>{n[t]=s[t]})}catch(t){console.warn(t)}};class nf extends b{constructor(e){super();a(this,"_viewersChanged",this.disposeVar(new m));a(this,"_viewers",new Set);a(this,"_viewersToChange",this.dv(new m));this._sceneObjectsManager=e,(async()=>{for(let t of this.viewers){const i=this._sceneObjectsManager.sceneObjects;for(const r of i)await this.addSceneObject(r,t)}this.d(()=>{const t=this._sceneObjectsManager.sceneObjects;for(const i of this.viewers)i.delete(...t),this.destroyViewer(i);this._viewers.clear()}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don(async(t,i)=>{for(let r of this.viewers){t.forEach(o=>{this.deleteSceneObject(o,r)});for(let o of i)await this.addSceneObject(o,r)}if(i.length>0)for(let r of i)r.d(r.devTagsChanged.don(async()=>{for(let o of this.viewers){if(o.has(r)&&!on(o.devTags,r.devTags)){o.delete(r);continue}await this.addSceneObject(r,o)}})),r.ad(r.reloadEvent.don(async()=>{for(let o of this.viewers)o.has(r)&&(o.delete(r),await this.addSceneObject(r,o))}))})),this.d(this.viewersChanged.don(async(t,i)=>{const r=this._sceneObjectsManager.sceneObjects;t.forEach(o=>{for(let h of r)this.deleteSceneObject(h,o)});for(let o of i)for(let h of r)await this.addSceneObject(h,o);i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(async()=>{o.clearAllSceneObjects();const h=this._sceneObjectsManager.sceneObjects;for(let c of h)console.log("viewersChanged",o.devTags,c.devTags,on(o.devTags,c.devTags)),await this.addSceneObject(c,o)}))})}))})()}get viewersChanged(){return this._viewersChanged}get viewers(){return[...this._viewers]}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const t=nt.context.createViewer(e);return this._viewers.add(t),this._viewersChanged.emit([],[t]),t}destroyViewer(e){return e.isDestroyed()?!0:this._viewers.has(e)?(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed()):!1}async addSceneObject(e,t){on(t.devTags,e.devTags)&&(t.has(e)?console.warn(`${t.typeName}中已存${e.typeName},检查逻辑是否有问题!`):t.add(e))}deleteSceneObject(e,t){on(t.devTags,e.devTags)&&(t.has(e)?t.delete(e):console.warn(`${t.typeName}中不存在${e.typeName},检查逻辑是否有问题!`))}}class fr extends b{constructor(...e){super();a(this,"_drgm",this.dv(new uc));a(this,"_sobjm",this.dv(new Bg));a(this,"_vrm",this.dv(new nf(this._sobjm)));a(this,"_sceneObjectEditingManager",this.disposeVar(new Wg));a(this,"_activeViewer",this.dv(y(void 0)));a(this,"_syncOtherViewersToActived",this.dv(y(!1)));a(this,"_cmrvm",this.createSceneObjectFromClass(Yn));a(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));a(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});a(this,"_sceneTree",this.dv(new cn("default",this.dragstartDataMananger,24,this)));a(this,"_sceneTreeMap",new Map);a(this,"_viewerCreatedEvent",this.dv(new m));a(this,"_lastCameraInfo");a(this,"_lastActiveViewerJson");a(this,"_syncEventDonFunc",this.d(ue([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(t=>{e?t.syncOtherViewer(this.activeViewer):t.syncOtherViewer(void 0)})})));a(this,"_player",this.createSceneObjectFromClass(cs));a(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));a(this,"_esPlyarAndPathTime",this.dv(new Ng(this)));a(this,"_pathAnimationManager",this.dv(new Lg(this)))}getBrowserEnv(){return globalThis.ue&&globalThis.ue.es&&globalThis.ue.esinput?"ESWebView":"Browser"}static get envs(){return k.context.environmentVariables}getSceneObjectById(e){return k.getSceneObjectById(e)}getSceneObject(e){return k.getSceneObject(e)}get $refs(){return k.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.forEach(t=>t.actived=t===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get completeJson(){var p;const e=this._asset.createdTime||new Date().toISOString(),t=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:t,name:i},h=this.sceneTree.completeJson,c=this._cmrvm.views,l=[...this.viewers].map(g=>g.completeJson),u=(p=this.activeViewer)==null?void 0:p.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:h,viewCollection:c,lastView:u}}get json(){var p;const e=this._asset.createdTime||new Date().toISOString(),t=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:t,name:i},h=this.sceneTree.json,c=this._cmrvm.views,l=[...this.viewers].map(g=>g.json),u=(p=this.activeViewer)==null?void 0:p.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:h,viewCollection:c,lastView:u}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this.viewers.length===0||e.viewers.length===0){console.warn("viewers is empty !");return}this.viewers.forEach(t=>{const i=e.viewers.find(r=>r.id===t.id);i&&(t.json=i)})}catch(t){console.error(`ESObjectsManager解析json数据时发生错误! error: ${t}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,t=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new cn(e,this.dragstartDataMananger,t,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const t=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=t);const i=this.d(t.viewerChanged.don(r=>{r&&(this._viewerCreatedEvent.emit(t),i())}));return t}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,t=!0,i=!0,r=!0){var l,u;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&t&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo(),((u=this.activeViewer)==null?void 0:u.typeName)=="ESOlViewer"&&this._lastCameraInfo&&(this._lastCameraInfo.rotation[1]=-90)),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?sf(this.activeViewer):void 0),r&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,h=o?[...this.getViewers()].find(p=>p.id===o):[...this.getViewers()].find(p=>p.typeName===e.type&&!p.container);if(h)if(o&&h.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(h);else return console.log("ESViewer exists, will be used"),t&&Bl(this,h),i&&this._lastActiveViewerJson&&(Hl(h,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),h.container===Vl(e.container)?(h.containerOrId=e.container,h.forceRecreate()):h.containerOrId=e.container,this.activeViewer=h,h;console.log("No ESViewer exists, will be created");const c=this.createViewer(e);return console.log(e),console.log(this),t&&Bl(this,c),i&&this._lastActiveViewerJson&&(Hl(c,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=c,c}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:t,viewSync:i,attributeSync:r,destroy:o,id:h}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:t,id:h},i??!0,r??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const t={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:r,attributeSync:o,destroy:h,id:c}=t;return this.switchViewer({type:"ESCesiumViewer",container:i,id:c},r,o,h)}}switchToUEViewer(...e){let t,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:c,uri:l,app:u,token:p,viewSync:g,attributeSync:f,destroy:w,id:E,silentTime:C}=e[0];t={type:"ESUeViewer",container:c,id:E,options:{uri:l,app:u,token:p,silentTime:C}},i={viewSync:g??!0,attributeSync:f??!0,destroy:w??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:c,ws:l,esmsg:u,viewSync:p,attributeSync:g,id:f,destroy:w,silentTime:E}=e[0];t={type:"ESUeViewer",container:c,id:f,options:{ws:l,esmsg:u,silentTime:E}},i={viewSync:p??!0,attributeSync:g??!0,destroy:w??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:c,project:l,baseUrl:u,viewSync:p,attributeSync:g,id:f,destroy:w}=e[0];t={type:"ESUeViewer",container:c,id:f,options:{project:l,baseUrl:u}},i={viewSync:p??!0,attributeSync:g??!0,destroy:w??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(t={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0,silentTime:e[7]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(t={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0,silentTime:e[8]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(t={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!t)throw new Error("参数错误");const{viewSync:r,attributeSync:o,destroy:h}=i;return this.switchViewer(t,r,o,h)}createCesiumViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(t={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!t)throw new Error("参数错误");return this.createViewer(t)}createOpenLayersViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(t={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!t)throw new Error("参数错误");return this.createViewer(t)}createUeViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?t={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0,silentTime:e[4]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?t={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0,silentTime:e[5]??void 0}}:t={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!t)throw new Error("参数错误");return this.createViewer(t)}createSceneObject(e,t){return this._sobjm.createSceneObject(e,t)}createSceneObjectFromUrl(e,t){return this._sobjm.createSceneObjectFromUrl(e,t)}createSceneObjectFromClass(e,t){return this._sobjm.createSceneObjectFromClass(e,t)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const t=this._sobjm.deleteSceneObject(e);return e.destroy(),t}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let t of e)t!=this._player&&t!=this._cmrvm&&this.destroySceneObject(t)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}a(fr,"getSceneObjById",k.context.getSceneObjectById.bind(k.context)),a(fr,"getEnv",k.context.getEnv.bind(k.context)),a(fr,"setEnv",k.context.setEnv.bind(k.context)),d.BooleanProperty=S,d.BorderedPosFloatDiv=Nh,d.BoxPicker=zr,d.CancelError=et,d.CancelsManager=Br,d.CanvasImagePoi=hu,d.CanvasPoi=qr,d.CanvasPointPoi=cu,d.CanvasPrimitive=Ch,d.CanvasPrimitivesContext=lu,d.ColorProperty=G,d.ColorStops=kg,d.ComplexImage=_n,d.CursorFloatDiv=fu,d.CursorInfo=mu,d.DashPatternProperty=cc,d.DateProperty=vt,d.DatesProperty=no,d.Debouncing=Vd,d.DebouncingDeprecated=Nr,d.DebouncingWithStartValues=Ld,d.Destroyable=b,d.DivBoxPicker=Rd,d.DivPoi=jh,d.DivPointerClick=ru,d.DivideProperty=L,d.DomElementEvent=se,d.DoublyLinkedList=oh,d.DragStartDataManager=uc,d.ES3DTileset=Le,d.ESAlarm=Eo,d.ESApertureEffect=Co,d.ESAreaMeasurement=So,d.ESAttackArrow=Ga,d.ESBlastParticleSystem=Po,d.ESBoxClipping=To,d.ESCameraView=qn,d.ESCameraViewCollection=Yn,d.ESCameraVisibleRange=Io,d.ESCar=Kn,d.ESCityBasePoint=Ia,d.ESClassification=Zn,d.ESClippingPlane=Oo,d.ESCustomDiv=Qn,d.ESCylinder=Pi,d.ESCzml=Da,d.ESDataMesh=Do,d.ESDatasmithRuntimeModel=ha,d.ESDirectionMeasurement=Zo,d.ESDistanceMeasurement=Fo,d.ESDynamicWater=ca,d.ESEntityCluster=Sa,d.ESExcavate=ln,d.ESFeatureLayer=Ua,d.ESFireParticleSystem=er,d.ESFireWall=Ro,d.ESForestTileset=xo,d.ESFountainParticleSystem=ar,d.ESGaussianSplatting=Ma,d.ESGeoBezierSpline=Pa,d.ESGeoDiv=ko,d.ESGeoDivTextPoi=Ta,d.ESGeoExtrudedPolygon=Si,d.ESGeoJson=pn,d.ESGeoLineString=we,d.ESGeoPoints=vn,d.ESGeoPolygon=Q,d.ESGeoPolygonWithFire=jo,d.ESGeoRectangle=Ao,d.ESGeoVector=$,d.ESGeoWater=la,d.ESGltfModel=yt,d.ESGltfModelEditing=Ha,d.ESHeatMap=dr,d.ESHeightLimitAnalysis=Ca,d.ESHeightMeasurement=ea,d.ESHole=va,d.ESHuman=ze,d.ESHumanFountain=ma,d.ESHumanPoi=fa,d.ESHumans=$a,d.ESImageLabel=tr,d.ESImageryLayer=dn,d.ESJArrowModeArray=ao,d.ESJClassificationTypeArray=oo,d.ESJEditingMode=D,d.ESJLonLatFormat=dc,d.ESJPickedResult=Lu,d.ESLabel=Ve,d.ESLandSlide=ja,d.ESLevelRuntimeModel=da,d.ESLocalCircle=ta,d.ESLocalPolygon=gn,d.ESLocalPolygonZ=ia,d.ESLocalRectangle=sa,d.ESLocalSkyBox=Vo,d.ESLocalVector=os,d.ESLocalVector2D=zt,d.ESLocationMeasurement=Lo,d.ESMCPClient=Ag,d.ESMVTLayer=Wa,d.ESMediaLayer=Ba,d.ESMsTileset=ya,d.ESNavigator=Fa,d.ESObjectWithLocation=M,d.ESObjectsManager=fr,d.ESParticleSystemPrimitive=ir,d.ESPath=ls,d.ESPathImpl=ei,d.ESPipeFence=rr,d.ESPipeline=ua,d.ESPipeserTileset=na,d.ESPit=hs,d.ESPlayer=cs,d.ESPoi2D=un,d.ESPoi3D=zo,d.ESPoiTileset=ba,d.ESPolygonFence=or,d.ESPolygonFlattenedPlane=Uo,d.ESPolygonWithHole=oa,d.ESPolygonsFlattenedPlane=Wo,d.ESRectangle=ra,d.ESRtsFeatureEditing=wa,d.ESRtsTileset=_a,d.ESScale=Ea,d.ESSceneObject=k,d.ESSceneObjectWithId=yc,d.ESSeparateFoliage=Bo,d.ESSignalInterference=Ja,d.ESSkylineAnalysis=Aa,d.ESSquadCombatArrow=Mo,d.ESStaticMesh=Ra,d.ESSubmergingAnalysis=Ho,d.ESSunshineAnalysis=$o,d.ESSurfaceAreaMeasurement=aa,d.ESTerrainLayer=Go,d.ESTerrainLayerEditing=mn,d.ESTerrainLayerEditingBrushEarseFalloff=bl,d.ESTerrainLayerEditingFlattenMode=wl,d.ESTerrainLayerEditingFlattenPick=yl,d.ESTestObject=bo,d.ESTextLabel=as,d.ESUEWidget=Jo,d.ESUnrealActor=qo,d.ESVideoFusion=Xo,d.ESViewShed=Yo,d.ESViewer=nt,d.ESViewerStatusBar=xa,d.ESViewerStatusBarScale=ka,d.ESVisibilityAnalysis=pa,d.ESVisualObject=Y,d.ESVolumeMeasurement=ga,d.ESWidget=Ko,d.EngineObject=Ti,d.EnumProperty=j,d.EvalStringProperty=Vt,d.Event=m,d.EventFromArrayUpdating=Sd,d.EventListenerHandler=Cr,d.Fetching=Fd,d.FloatDiv=Kr,d.FlvJsLoading=pr,d.FlvProcessing=kl,d.GetSetProperty=ro,d.Gif=rc,d.GifPlayer=nc,d.GifProcessing=oc,d.HasOwner=bd,d.HlsJsLoading=ur,d.HlsProcessing=xl,d.IFrameBorderedPosFloatDiv=pu,d.ImageProcessing=qh,d.IntervalDeprecated=Lr,d.JsonArrayProperty=re,d.JsonProperty=z,d.ListenerPipe=Er,d.LocalFileServer=Gh,d.LocalRootDir=$h,d.LongStringProperty=Vn,d.MethodProperty=N,d.NextAnimateFrameEvent=On,d.NextAnimateFrameWeakEvent=ah,d.NextMicroTaskEvent=Dr,d.NextMicroTaskWeakEvent=ud,d.Number2Property=pe,d.Number3Property=ve,d.Number4Property=Je,d.NumberProperty=v,d.NumberSliderProperty=ge,d.ObjPool=En,d.ObjResetting=wu,d.ObjResettingWithEvent=ce,d.ObservableArray=Xs,d.ObservableSet=Nn,d.PickColorMananger=kh,d.PickedInfo=Vu,d.Player=tt,d.PlayerProperty=Ln,d.PointerClick=Jr,d.PointerClickDeprecated=vh,d.PointerHover=Eh,d.PointerHoverDeprecated=ou,d.PosFloatDiv=eo,d.PositionProperty=_t,d.Processing=me,d.Property=Qt,d.ReactVarProperty=Ie,d.ReactiveVariable=fe,d.RotationProperty=rn,d.SceneObjectFromId=lo,d.SceneTree=cn,d.SceneTreeContextMenu=Nc,d.SceneTreeItem=Oe,d.SceneTreeItemDragDrop=Ac,d.SmartListenerHandler=Bs,d.SmartListenerPipe=id,d.SmoothMoveController=Op,d.StringProperty=A,d.Throttling=su,d.ThrottlingWithStartValues=nu,d.TimingDeprecated=fh,d.ToolTipDiv=gu,d.Transition=Qs,d.TransitionDeprecated=Md,d.Tree=bi,d.TreeItem=nn,d.TreeItemDragDrop=pc,d.UiTree=Uh,d.UiTreeObject=zh,d.VideoProcessing=Kh,d.ViewPlayerProperty=lc,d.ViewerCustomInteraction=Wl,d.Watcher=an,d.WatcherTools=bc,d.WithUndefinedProperty=so,d.XrPlayer=Rn,d.Xyzw2Ns=xn,d._getFeatureProperty=dl,d._getLayerConfig=hl,d._getport=ll,d._saveLayerConfig=cl,d.addTreesCallFunc=Jc,d.animateFrame=Tn,d.apis=lr,d.ary2Ns=Dd,d.asyncFuncToCancelablePromise=Bd,d.bind=x,d.bindCustomEditing=mc,d.bindu=ld,d.booleanPointInPolygon=np,d.buildFeatureTilesetUrl=al,d.buildInfoUrl=Qp,d.buildTilesetUrl=ol,d.calcArrowPoints=yo,d.canMoveToTreeItem=sn,d.canMoveToTreeItems=Vh,d.cancelFuncToCancelablePromise=Wd,d.cancelPromise=Ur,d.cancelableFetch=$r,d.cancelableFetchDeprecated=gh,d.cancelableFetchWithProgress=$d,d.cartesianDistance=xc,d.clamp=kn,d.clamp0_360=ns,d.clampN180_180=fc,d.complexImageTypes=Yh,d.createAnimateFrame=Ks,d.createAnimateFrameWithStartValues=ss,d.createBottomTriangleElement=Ah,d.createCancelablePromise=is,d.createCloseDiv=Rh,d.createEventsCallFunc=ue,d.createFetching=Gd,d.createFetchingWithStartValues=Jd,d.createGuid=Ki,d.createInterval=Zd,d.createIntervalWithStartValues=Qd,d.createNextAnimateFrame=qd,d.createNextAnimateFrameEvent=ae,d.createNextAnimateFrameEventCallFunc=gd,d.createNextAnimateFrameWeakEvent=fd,d.createNextAnimateFrameWithStartValues=Xd,d.createNextMicroTask=Yd,d.createNextMicroTaskEvent=dd,d.createNextMicroTaskWeakEvent=pd,d.createNextMicroTaskWithStartValues=Kd,d.createNumbers=Fn,d.createProcessingFromAsyncFunc=Ne,d.createProcessingFromAsyncFuncWithStartValues=Hd,d.createProcessingFromPromiseCreateFunc=jn,d.createProcessingFromPromiseCreateFuncWithStartValues=Hr,d.createSleeping=eu,d.createSleepingWithStartValues=tu,d.createStartFuncFromAsyncFunc=Ys,d.createTimeout=wh,d.createTimeoutWithStartValues=yh,d.cutDownTreesCallFunc=Yc,d.czmPixelFormats=Xh,d.data=Yp,d.dataMd=Kp,d.debounce=Pn,d.defaultGetLocalFilePath=yu,d.defaultInitSceneObjectOnCreatingFunc=Uu,d.defaultLight122FromEnvironmentMapManager=wo,d.defaultLoadFuncDocStr=tl,d.defaultLoadFuncStr=Qo,d.defaultLocalFileServer=Jh,d.defaultStartUpdateFunc=Dn,d.defaultUpdateSceneObjectOnPickingFunc=zu,d.defineReactiveProp=Vr,d.destroyObject=ih,d.diffGeoJson=Xu,d.downloadLink=wd,d.drawBubble=wi,d.drawPoint=au,d.drawRoundRectPath=Sh,d.drawText=Ph,d.drawTextBlock=Xr,d.engineObjectCreatedUpdate=Mc,d.equalsN3=$n,d.every=xr,d.extendClassProps=Yt,d.fetchArrayBuffer=Cd,d.fetchImage=dh,d.forEach=ft,d.forEachWithBreak=Fr,d.geoAlong=rp,d.geoArea=po,d.geoBuffer=Ic,d.geoCenterOfMass=op,d.geoDestination=go,d.geoDifference=Oc,d.geoDistance=Bn,d.geoHeading=hn,d.geoIntersect=Pc,d.geoLineIntersect=ap,d.geoNearestPointOnLine=cp,d.geoPointToLineDistance=lp,d.geoPolygonFromCircle=Dc,d.geoPolygonOverlap=fo,d.geoPolylineToBezierSpline=rs,d.geoRhumbDestination=dp,d.geoRhumbDistance=Sc,d.geoRhumbHeading=up,d.geoUnion=Tc,d.getCameraTools=jl,d.getColorHexStr=tn,d.getCompleteReactParams=Sn,d.getDefaultValue=$u,d.getDistancesFromPositions=Lt,d.getDomEventCurrentTargetPos=Ee,d.getDrawRect=_i,d.getESMCPTools=Al,d.getElementBounds=qu,d.getErrorResult=ie,d.getEventFromPromise=Nd,d.getEventPosInCurrentTarget=Qi,d.getExtProp=Ae,d.getFileArrayBuffer=Hh,d.getFileJson=Bh,d.getFileText=to,d.getFloatDivPool=Qr,d.getGeoBoundingSphereFromPositions=Fc,d.getIterator=$s,d.getMidpoint=hp,d.getMinMaxCorner=Hn,d.getMinMaxPosition=Ed,d.getPromiseCancel=es,d.getPromiseFromEvent=Ad,d.getPromiseFromProcessing=Gr,d.getReactFuncs=Ws,d.getRtsServicePrefix=Ci,d.getSceneObjectTools=Rl,d.getSceneObjectTreeItem=Wu,d.getSubEntriesFromDir=Wh,d.getSuccessResult=st,d.getTypeFromImageUri=Ml,d.getValueFromProps=hh,d.getXyzFromPostion=mo,d.growthSimulationCallFunc=Kc,d.hasSameTags=gc,d.hasSameViewerTags=on,d.imageToCanvas=Th,d.inOrderRunning=Gu,d.interval=Ir,d.isFeatureEqual=_c,d.isGeometryEqual=wc,d.isJSON=ho,d.isPromiseCancelable=ts,d.isRelativeRtsInfoUrl=il,d.isXML=Hu,d.lbhToWebMerc=ip,d.lbhToXyz=it,d.length=kr,d.lerpAngle=Un,d.lerpRotation=co,d.loadGifFrames=ic,d.loadJs=Rr,d.map=kc,d.max=At,d.min=Kt,d.moveToTreeItem=An,d.moveToTreeItems=Lh,d.nextAnimateFrame=Zi,d.nextMicroTask=Hs,d.objsIterator=mi,d.oneTimeWarning=Xi,d.optionsStr=Hp,d.pairToPromise=Wr,d.parsePlatformFromUrl=nl,d.parseRtsHost=sl,d.parseRtsOrigin=cr,d.parseTileServiceName=rl,d.pluckProperty=Mr,d.react=y,d.reactArray=F,d.reactArrayCollection=rd,d.reactArrayCollectionWithUndefined=Sr,d.reactArrayWithUndefined=ee,d.reactDeepArray=Cn,d.reactDeepArrayWithUndefined=Xt,d.reactJson=W,d.reactJsonCollection=od,d.reactJsonCollectionWithUndefined=ad,d.reactJsonWithUndefined=te,d.reactPlainObject=sd,d.reactPlainObjectWithUndefined=nd,d.reactPosition2Ds=vo,d.reactPosition2DsSet=hd,d.reactPositions=fi,d.reactPositionsSet=Pr,d.reduce=qs,d.registerEventCtor=sh,d.registerEventUpdate=vp,d.removeAllTreesCallFunc=qc,d.requestAnimationFrameTimeStampTest=yd,d.resolveRtsInfoUrl=hr,d.rpToap=Bu,d.saveOnBrowser=_d,d.setCanvasUniformColor=Ih,d.setExtProp=gt,d.setPromiseCancel=Zt,d.setSceneObjectTreeItem=zn,d.setValueFromProps=vd,d.sleep=Zs,d.sleepDeprecated=xd,d.step=vi,d.stepProcessing=iu,d.throttle=jr,d.timeout=Or,d.toGeoJson=vc,d.track=_,d.uint32ToUint8s=Fh,d.uint8ToHexStr=en,d.uint8sToUint32=xh,d.updateTreeParamsCallFunc=Xc,d.webMercToLbh=sp,d.xyz2N2=Pd,d.xyz2N3=Td,d.xyzToLbh=uo,d.xyzw2N4=Id,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|
|
1847
|
+
`,Uf='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',Bf='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',es=class es extends b{constructor(s){super();const e=()=>{const t=this.dv(new dr);this.d(_([t,"show"],[s,"useDefaultStatusDiv"]));{const i=()=>{t.show=(s.useDefaultStatusDiv??!0)&&s.status!=="Created"};i(),this.d(s.useDefaultStatusDivChanged.don(i)),this.d(s.statusChanged.don(i)),t.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}s.add(t),this.d(()=>s.delete(t)),t.instanceClass=class extends b{constructor(o,l,h){super();a(this,"_div",document.createElement("div"));if(this._subContainer=o,!h)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const y=()=>{l.show?this._div.style.opacity="1":this._div.style.opacity="0"};y(),this.d(l.showChanged.don(y))}let c,u,p,g,m;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",c=document.createElement("div"),this._div.appendChild(c),c.style.width="auto",c.style.position="absolute",c.style.left="50%",c.style.top="50%",c.style.transform="translate(-50%,-50%)",c.style.background="rgba(120, 120, 0, 0.7)",c.style.color="white",c.style.fontSize="10px",c.style.background="none",c.style.display="flex",c.style.justifyContent="center",c.style.alignItems="center",u=document.createElement("div"),c.appendChild(u),u.style.pointerEvents="none",u.style.display="block",u.style.width="40px",u.innerHTML=es.defaultsSvg.loadingSvg,u.style.filter="drop-shadow(0px 0px 1px black)",p=document.createElement("div"),c.appendChild(p),p.style.pointerEvents="none",p.style.marginLeft="10px",p.style.display="flex",p.style.flexFlow="column",p.style.maxWidth="300px",g=document.createElement("div"),p.appendChild(g),g.style.fontSize="14px",g.style.fontWeight="800",g.style.marginBottom="5px",g.style.textShadow="0 0 2px black",m=document.createElement("div"),p.appendChild(m),m.style.fontWeight="400",m.style.textShadow="0 0 2px black";{const y=()=>{let C="Raw";h.status==="Raw"?C="初始状态":h.status==="Creating"?C="正在创建":h.status==="Created"?C="创建完成":h.status==="Error"?C="创建失败":h.status==="Reconnecting"&&(C="重新连接"),g.innerText=`${C}(${h.status})`,m.innerText=`${h.statusLog}`,(h.status==="Creating"||h.status==="Reconnecting")&&(u.innerHTML=es.defaultsSvg.loadingSvg),h.status==="Created"&&(u.innerHTML=es.defaultsSvg.successSvg),h.status==="Error"&&(u.innerHTML=es.defaultsSvg.warnSvg)};y();const S=this.dv(oe(h.statusLogChanged,h.statusChanged));this.d(S.don(y))}}update(){const o=255*Math.random()|0,l=255*Math.random()|0,h=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${l}, ${h}, 0.8)`}}};this.d(s.containerChanged.don(()=>{e()}))}};a(es,"defaultsSvg",{loadingSvg:zf,successSvg:Uf,warnSvg:Bf});let wl=es;class Wf extends b{constructor(s,e,t){super(),this._subContainer=s,this._overlayContainer=e,this._viewer=t;const i=this._subContainer,r=this._overlayContainer,o=this._viewer,l=()=>{const u=o.zIndex??"";i.style.zIndex=u,r.style.zIndex=u};l(),this.d(o.zIndexChanged.don(l));const h=()=>{i.style.display=o.show??!0?"block":"none"};h(),this.d(o.showChanged.don(h));const c=()=>{i.style.opacity=`${o.opacity??1}`};c(),this.d(o.opacityChanged.don(c))}}function Tr(n){let s=Ne(n,"_relativeContainer");return s||(s=document.createElement("div"),s.style.position="relative",s.style.width="100%",s.style.height="100%",s.style.padding="0",s.style.margin="0",n.appendChild(s),vt(n,"_relativeContainer",s)),s}class Hf extends b{constructor(e,t){super();a(this,"_subContainer",document.createElement("div"));a(this,"_overlayContainer",document.createElement("div"));a(this,"_containerStyleController");this._container=e,this._viewer=t,this._containerStyleController=this.dv(new Wf(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:r}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),r.style.position="relative",r.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),Tr(this._container).appendChild(i),this.d(()=>Tr(this._container).removeChild(i)),Tr(this._container).appendChild(r),this.d(()=>Tr(this._container).removeChild(r))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class $f extends b{constructor(){super(...arguments);a(this,"registerObjsMap",new Map)}register(e,t){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,t),e}getViewerConstructor(e){const t=this.registerObjsMap.get(e);if(!t){console.warn(`未找到${e}类!`);return}return t}createViewer(e){const t=e.type;console.log(e);const i=this.getViewerConstructor(t);if(!i)throw new Error(`没有找到类型为${t}的Viewer构造器!`);return new i(e)}}class Ed extends b{constructor(s,e,t=!1,i=!1){if(super(),this._viewer=s,!e)throw new Error("ViewerCustomInteraction: container is null");const r=this.dv(se.create(e,"pointerdown")),o=this.dv(se.create(e,"pointermove")),l=this.dv(se.create(e,"pointerup")),h=this.dv(se.create(e,"pointerout")),c=this.dv(se.create(e,"pointerover")),u=this.dv(new ro),p=this.dv(new ql),g=()=>{const x=this._viewer.hoverTime*1e3;p.delayTime=x};this.d(this._viewer.hoverTimeChanged.don(()=>{g()})),this.d(r.don(x=>u.pointerDown(x))),this.d(o.don(x=>u.pointerMove(x))),this.d(l.don(x=>u.pointerUp(x))),this.d(h.don(x=>u.pointerOut(x))),this.d(r.don(x=>p.pointerDown(x))),this.d(o.don(x=>p.pointerMove(x))),this.d(l.don(x=>p.pointerUp(x))),this.d(h.don(x=>p.pointerOut(x)));const{x:m,y}=e.getBoundingClientRect(),S=i?m:0,C=i?y:0;this.d(p.hoverEvent.don(x=>{const[$,Y]=os(x,t);this._viewer.hoverEvent.emit({screenPosition:[$+S,Y+C],pointerEvent:x})})),this.d(u.clickEvent.don(x=>{const[$,Y]=os(x,t);this._viewer.clickEvent.emit({screenPosition:[$+S,Y+C],pointerEvent:x})})),this.d(u.dbclickEvent.don(x=>{const[$,Y]=os(x,t);x.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[$+S,Y+C],pointerEvent:x})})),this.d(r.don(x=>{const[$,Y]=os(x,t);x.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[$+S,Y+C],pointerEvent:x})})),this.d(l.don(x=>{const[$,Y]=os(x,t);x.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[$+S,Y+C],pointerEvent:x})})),this.d(o.don(x=>{const[$,Y]=we(x,t);this._viewer.pointerMoveEvent.emit({screenPosition:[$+S,Y+C],pointerEvent:x})})),this.d(c.don(x=>{const[$,Y]=we(x,t);this._viewer.pointerOverEvent.emit({screenPosition:[$+S,Y+C],pointerEvent:x})})),this.d(h.don(x=>{const[$,Y]=we(x,t);this._viewer.pointerOutEvent.emit({screenPosition:[$+S,Y+C],pointerEvent:x})}));const T=this.dv(se.create(e,"keydown"));this.d(T.don(x=>this._viewer.keyDownEvent.emit(x)));const V=this.dv(se.create(e,"keyup"));this.d(V.don(x=>this._viewer.keyUpEvent.emit(x)));const z=this.dv(se.create(e,"wheel"));this.d(z.don(x=>this._viewer.wheelEvent.emit(x)))}}const qt=class qt extends b{constructor(e){super();a(this,"_forceRecreateEvent",this.dv(new v));a(this,"_container",this.dv(w(void 0)));a(this,"_containerSize",this.dv(w(void 0)));a(this,"_editingEvent",this.disposeVar(new v));a(this,"_esViewerExtensions",this.dv(new jf(this)));a(this,"_status",this.dv(w("Raw")));a(this,"_statusLog",this.dv(w("")));a(this,"_statusContainer",this.dv(new wl(this)));a(this,"_useCustomInteraction",this.dv(w(!0)));a(this,"_resetInteractionEvent",this.dv(oe(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));a(this,"_interactionResetting",this.dv(new le(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new Ed(this,this.container)})));a(this,"_viewerChanged",this.dv(new v));a(this,"_cameraChanged",this.dv(new v));a(this,"_containerResetEvent",this.dv(oe(this.containerChanged,this._forceRecreateEvent)));a(this,"_containerResetting",this.dv(new le(this._containerResetEvent,()=>{if(this.container)return new Hf(this.container,this)})));a(this,"_sceneObjectsMap",new Map);a(this,"_id");a(this,"_typeName");a(this,"_updateFuncReact",this.dv(w(void 0)));a(this,"_toDestroyFuncReact",this.dv(w(void 0)));a(this,"_statusInfo",qt.defaults.statusInfo);a(this,"_navigationMode",this.dv(w("Map")));a(this,"_navigationEvent",this.disposeVar(new v));a(this,"_syncViewer",this.dv(w(void 0)));a(this,"_syncEventDon",this.dv(new le(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new Vf(this,e)})));a(this,"_timeSyncdon",this.dv(new le(this.timeSyncChanged,()=>{if(this.timeSync)return new Lf(this)})));a(this,"_hoverEvent",this.dv(new v));a(this,"_pointerOverEvent",this.dv(new v));a(this,"_pointerMoveEvent",this.dv(new v));a(this,"_pointerDownEvent",this.dv(new v));a(this,"_pointerUpEvent",this.dv(new v));a(this,"_pointerOutEvent",this.dv(new v));a(this,"_clickEvent",this.dv(new v));a(this,"_dblclickEvent",this.dv(new v));a(this,"_keyDownEvent",this.dv(new v));a(this,"_keyUpEvent",this.dv(new v));a(this,"_wheelEvent",this.dv(new v));a(this,"_actived",this.dv(w(!1)));this._id=e.id??ns();const t=vd(e.container);if(t)this._container.value=yl(t),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{t&&(this.show??!0?t.style.display="block":t.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,r=()=>{for(let[l,h]of i.entries())if(!h&&l){const c=xi.context.createEngineObject(l,this);c&&i.set(l,c)}},o=()=>{for(let[l,h]of i.entries())h&&!h.isDestroyed()&&h.destroy(),i.set(l,void 0)};this.d(o),this.d(this.viewerChanged.don(l=>{o(),l&&r()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(r){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let r;this.d(()=>r&&r.destroy()),this.d(this.updateFuncChanged.don(()=>{r&&r.cancel(),this.updateFunc&&(r=r||dn(),r.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(r){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${r}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new Nf(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const t=document.getElementById(e);t&&t instanceof HTMLDivElement?this._container.value=yl(t):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=yl(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get esViewerExtensions(){return this._esViewerExtensions}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let t of e)if(!this.has(t)){M.context.addSceneObject(t);const i=xi.context.createEngineObject(t,this);i&&this._sceneObjectsMap.set(t,i),t.viewerAttached.emit(this)}}delete(...e){for(let t of e)if(this.has(t)){const i=this._sceneObjectsMap.get(t);i&&i.destroy(),M.context.deleteSceneObject(t),this._sceneObjectsMap.delete(t),t.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return qt.createDefaultProps()}get completeJson(){return this._getJson(!1)}_getJson(e=!0){const t={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let r,o=this.defaultProps[i];o instanceof ge?r=o.equals(this[i]):r=o===this[i],r||(t[i]=this[i])}else t[i]=this[i];return t}_setJson(e,t,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const r=t||[];r.push("id","type");const o=Object.keys(this.defaultProps).filter(l=>!r.includes(l));for(let l of o)if(l in e)this[l]=e[l]===null?void 0:e[l];else if(!(i??!1)){let h=this.defaultProps[l];h instanceof ge&&(h=h.value),this[l]=h}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}get navigationEvent(){return this._navigationEvent}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(t){console.warn(`时间格式不正确! value: ${e} error: ${t}`)}}async getVersion(){return globalThis.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}async getCurrentRectangle(){var e;try{const t=(e=this.container)==null?void 0:e.getBoundingClientRect();if(!t)return;const{width:i,height:r}=t,o=await this.quickPickPosition([0,0]),l=await this.quickPickPosition([i,r]);return!o||!l?void 0:[o[0],l[1],l[0],o[1]]}catch(t){console.error(t);return}}};a(qt,"context",new $f),a(qt,"register",qt.context.register.bind(qt.context)),a(qt,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0],depthTestAgainstTerrain:!0,terrainOpacity:1});let at=qt;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:B(void 0),devTags:q(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:1024,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:q(void 0),editingAuxiliaryPointColor:q(void 0),editingLineWidth:void 0,editingLineColor:q(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:w(void 0),rollerShutter:!1,cameraMovableRegion:q(void 0),depthTestAgainstTerrain:!0,terrainOpacity:1,sceneGlobeBaseColor:F([1,1,1,1]),sceneBackgroundColor:F([0,0,0,0])}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(at||(at={})),Kt(at.prototype,at.createDefaultProps);function bd(n,s){const e=n._lastCameraInfo;if(e){const t=s.viewerChanged.don(i=>{if(!i||!e)return;const{position:r,rotation:o}=e;s.flyIn(r,o,0),n._lastCameraInfo=void 0,t()})}}const Gf=n=>{const s=at.createCommonProps(),e={};try{Object.keys(s).forEach(t=>{e[t]=n[t]})}catch(t){console.warn(t)}return e},Sd=(n,s)=>{const e=at.createCommonProps();try{Object.keys(e).forEach(t=>{n[t]=s[t]})}catch(t){console.warn(t)}};class Jf extends b{constructor(e){super();a(this,"_viewersChanged",this.disposeVar(new v));a(this,"_viewers",new Set);a(this,"_viewersToChange",this.dv(new v));this._sceneObjectsManager=e,(async()=>{for(let t of this.viewers){const i=this._sceneObjectsManager.sceneObjects;for(const r of i)await this.addSceneObject(r,t)}this.d(()=>{const t=this._sceneObjectsManager.sceneObjects;for(const i of this.viewers)i.delete(...t),this.destroyViewer(i);this._viewers.clear()}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don(async(t,i)=>{for(let r of this.viewers){t.forEach(o=>{this.deleteSceneObject(o,r)});for(let o of i)await this.addSceneObject(o,r)}if(i.length>0)for(let r of i)r.d(r.devTagsChanged.don(async()=>{for(let o of this.viewers){if(o.has(r)&&!yn(o.devTags,r.devTags)){o.delete(r);continue}await this.addSceneObject(r,o)}})),r.ad(r.reloadEvent.don(async()=>{for(let o of this.viewers)o.has(r)&&(o.delete(r),await this.addSceneObject(r,o))}))})),this.d(this.viewersChanged.don(async(t,i)=>{const r=this._sceneObjectsManager.sceneObjects;t.forEach(o=>{for(let l of r)this.deleteSceneObject(l,o)});for(let o of i)for(let l of r)await this.addSceneObject(l,o);i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(async()=>{o.clearAllSceneObjects();const l=this._sceneObjectsManager.sceneObjects;for(let h of l)console.log("viewersChanged",o.devTags,h.devTags,yn(o.devTags,h.devTags)),await this.addSceneObject(h,o)}))})}))})()}get viewersChanged(){return this._viewersChanged}get viewers(){return[...this._viewers]}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const t=at.context.createViewer(e);return this._viewers.add(t),this._viewersChanged.emit([],[t]),t}destroyViewer(e){return e.isDestroyed()?!0:this._viewers.has(e)?(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed()):!1}async addSceneObject(e,t){yn(t.devTags,e.devTags)&&(t.has(e)?console.warn(`${t.typeName}中已存${e.typeName},检查逻辑是否有问题!`):t.add(e))}deleteSceneObject(e,t){yn(t.devTags,e.devTags)&&(t.has(e)?t.delete(e):console.warn(`${t.typeName}中不存在${e.typeName},检查逻辑是否有问题!`))}}class Ir extends b{constructor(...e){super();a(this,"_drgm",this.dv(new Nh));a(this,"_sobjm",this.dv(new Mf));a(this,"_vrm",this.dv(new Jf(this._sobjm)));a(this,"_sceneObjectEditingManager",this.disposeVar(new kf));a(this,"_activeViewer",this.dv(w(void 0)));a(this,"_syncOtherViewersToActived",this.dv(w(!1)));a(this,"_cmrvm",this.createSceneObjectFromClass(lr));a(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));a(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});a(this,"_sceneTree",this.dv(new bn("default",this.dragstartDataMananger,24,this)));a(this,"_sceneTreeMap",new Map);a(this,"_viewerCreatedEvent",this.dv(new v));a(this,"_lastCameraInfo");a(this,"_lastActiveViewerJson");a(this,"_syncEventDonFunc",this.d(de([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(t=>{e?t.syncOtherViewer(this.activeViewer):t.syncOtherViewer(void 0)})})));a(this,"_player",this.createSceneObjectFromClass(_s));a(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));a(this,"_esPlyarAndPathTime",this.dv(new If(this)));a(this,"_pathAnimationManager",this.dv(new Of(this)))}getBrowserEnv(){return globalThis.ue&&globalThis.ue.es&&globalThis.ue.esinput?"ESWebView":"Browser"}static get envs(){return M.context.environmentVariables}getSceneObjectById(e){return M.getSceneObjectById(e)}getSceneObject(e){return M.getSceneObject(e)}get $refs(){return M.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.forEach(t=>t.actived=t===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get completeJson(){var p;const e=this._asset.createdTime||new Date().toISOString(),t=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:t,name:i},l=this.sceneTree.completeJson,h=this._cmrvm.views,c=[...this.viewers].map(g=>g.completeJson),u=(p=this.activeViewer)==null?void 0:p.getCurrentCameraInfo();return{asset:o,viewers:c,sceneTree:l,viewCollection:h,lastView:u}}get json(){var p;const e=this._asset.createdTime||new Date().toISOString(),t=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:t,name:i},l=this.sceneTree.json,h=this._cmrvm.views,c=[...this.viewers].map(g=>g.json),u=(p=this.activeViewer)==null?void 0:p.getCurrentCameraInfo();return{asset:o,viewers:c,sceneTree:l,viewCollection:h,lastView:u}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this.viewers.length===0||e.viewers.length===0){console.warn("viewers is empty !");return}this.viewers.forEach(t=>{const i=e.viewers.find(r=>r.id===t.id);i&&(t.json=i)})}catch(t){console.error(`ESObjectsManager解析json数据时发生错误! error: ${t}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,t=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new bn(e,this.dragstartDataMananger,t,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const t=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=t);const i=this.d(t.viewerChanged.don(r=>{r&&(this._viewerCreatedEvent.emit(t),i())}));return t}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,t=!0,i=!0,r=!0){var c,u;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&t&&(this._lastCameraInfo=(c=this.activeViewer)==null?void 0:c.getCurrentCameraInfo(),((u=this.activeViewer)==null?void 0:u.typeName)=="ESOlViewer"&&this._lastCameraInfo&&(this._lastCameraInfo.rotation[1]=-90)),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?Gf(this.activeViewer):void 0),r&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,l=o?[...this.getViewers()].find(p=>p.id===o):[...this.getViewers()].find(p=>p.typeName===e.type&&!p.container);if(l)if(o&&l.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(l);else return console.log("ESViewer exists, will be used"),t&&bd(this,l),i&&this._lastActiveViewerJson&&(Sd(l,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),l.container===vd(e.container)?(l.containerOrId=e.container,l.forceRecreate()):l.containerOrId=e.container,this.activeViewer=l,l;console.log("No ESViewer exists, will be created");const h=this.createViewer(e);return console.log(e),console.log(this),t&&bd(this,h),i&&this._lastActiveViewerJson&&(Sd(h,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=h,h}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:t,viewSync:i,attributeSync:r,destroy:o,id:l}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:t,id:l},i??!0,r??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const t={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:r,attributeSync:o,destroy:l,id:h}=t;return this.switchViewer({type:"ESCesiumViewer",container:i,id:h},r,o,l)}}switchToOpenLayersViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:t,viewSync:i,attributeSync:r,destroy:o,id:l}=e[0];return this.switchViewer({type:"ESOlViewer",container:t,id:l},i??!0,r??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const t={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:r,attributeSync:o,destroy:l,id:h}=t;return this.switchViewer({type:"ESOlViewer",container:i,id:h},r,o,l)}}switchToUEViewer(...e){let t,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:h,uri:c,app:u,token:p,viewSync:g,attributeSync:m,destroy:y,id:S,silentTime:C}=e[0];t={type:"ESUeViewer",container:h,id:S,options:{uri:c,app:u,token:p,silentTime:C}},i={viewSync:g??!0,attributeSync:m??!0,destroy:y??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:h,ws:c,esmsg:u,viewSync:p,attributeSync:g,id:m,destroy:y,silentTime:S}=e[0];t={type:"ESUeViewer",container:h,id:m,options:{ws:c,esmsg:u,silentTime:S}},i={viewSync:p??!0,attributeSync:g??!0,destroy:y??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:h,project:c,baseUrl:u,viewSync:p,attributeSync:g,id:m,destroy:y}=e[0];t={type:"ESUeViewer",container:h,id:m,options:{project:c,baseUrl:u}},i={viewSync:p??!0,attributeSync:g??!0,destroy:y??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(t={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0,silentTime:e[7]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(t={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0,silentTime:e[8]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(t={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!t)throw new Error("参数错误");const{viewSync:r,attributeSync:o,destroy:l}=i;return this.switchViewer(t,r,o,l)}createCesiumViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(t={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!t)throw new Error("参数错误");return this.createViewer(t)}createOpenLayersViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(t={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!t)throw new Error("参数错误");return this.createViewer(t)}createUeViewer(...e){let t;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?t={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?t={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0,silentTime:e[4]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?t={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0,silentTime:e[5]??void 0}}:t={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!t)throw new Error("参数错误");return this.createViewer(t)}createSceneObject(e,t){return this._sobjm.createSceneObject(e,t)}createSceneObjectFromUrl(e,t){return this._sobjm.createSceneObjectFromUrl(e,t)}createSceneObjectFromClass(e,t){return this._sobjm.createSceneObjectFromClass(e,t)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const t=this._sobjm.deleteSceneObject(e);return e.destroy(),t}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let t of e)t!=this._player&&t!=this._cmrvm&&this.destroySceneObject(t)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}a(Ir,"getSceneObjById",M.context.getSceneObjectById.bind(M.context)),a(Ir,"getEnv",M.context.getEnv.bind(M.context)),a(Ir,"setEnv",M.context.setEnv.bind(M.context)),d.BooleanProperty=E,d.BorderedPosFloatDiv=hh,d.BoxPicker=Zr,d.CancelError=st,d.CancelsManager=to,d.CanvasImagePoi=Lu,d.CanvasPoi=oo,d.CanvasPointPoi=Vu,d.CanvasPrimitive=Xl,d.CanvasPrimitivesContext=zu,d.ColorProperty=G,d.ColorStops=Cf,d.ComplexImage=Dn,d.CursorFloatDiv=$u,d.CursorInfo=Gu,d.DashPatternProperty=Yn,d.DateProperty=Ve,d.DatesProperty=vo,d.Debouncing=gu,d.DebouncingDeprecated=Xr,d.DebouncingWithStartValues=fu,d.Destroyable=b,d.DivBoxPicker=du,d.DivPoi=oh,d.DivPointerClick=ju,d.DivideProperty=k,d.DomElementEvent=se,d.DoublyLinkedList=Fl,d.DragStartDataManager=Nh,d.ES3DTileset=Ue,d.ESAlarm=Mo,d.ESApertureEffect=Ao,d.ESAreaMeasurement=jo,d.ESAttackArrow=ol,d.ESBlastParticleSystem=Ro,d.ESBoxClipping=No,d.ESCameraView=or,d.ESCameraViewCollection=lr,d.ESCameraVisibleRange=Lo,d.ESCar=hr,d.ESCityBasePoint=Va,d.ESClassification=cr,d.ESClippingPlane=Vo,d.ESCustomDiv=dr,d.ESCustomPrimitive=ul,d.ESCylinder=Ii,d.ESCzml=Ua,d.ESDataMesh=zo,d.ESDatasmithRuntimeModel=wa,d.ESDirectionMeasurement=ca,d.ESDistanceMeasurement=Uo,d.ESDynamicWater=Ea,d.ESEntityCluster=Ra,d.ESExcavate=Sn,d.ESFeatureLayer=tl,d.ESFireParticleSystem=ur,d.ESFireWall=Jo,d.ESForestTileset=Bo,d.ESFountainParticleSystem=yr,d.ESGaussianSplatting=Ja,d.ESGeHistoryImagery=vl,d.ESGeoBezierPath=ll,d.ESGeoBezierSpline=Na,d.ESGeoDiv=Ho,d.ESGeoDivTextPoi=La,d.ESGeoExtrudedPolygon=Ti,d.ESGeoIcon=$a,d.ESGeoJson=Pn,d.ESGeoLineString=ve,d.ESGeoPoint=Ga,d.ESGeoPoints=On,d.ESGeoPolygon=ee,d.ESGeoPolygonWithFire=Go,d.ESGeoRectangle=qo,d.ESGeoSmoothPolygon=hl,d.ESGeoVector=U,d.ESGeoWater=ba,d.ESGltfModel=Et,d.ESGltfModelEditing=nl,d.ESHeatMap=Sr,d.ESHeightLimitAnalysis=ja,d.ESHeightMeasurement=ua,d.ESHole=Oa,d.ESHuman=Be,d.ESHumanFountain=xa,d.ESHumanPoi=Ia,d.ESHumans=rl,d.ESImageLabel=pr,d.ESImageryLayer=fs,d.ESJArrowModeArray=wo,d.ESJClassificationTypeArray=yo,d.ESJEditingMode=I,d.ESJLonLatFormat=Rh,d.ESJPickedResult=fp,d.ESKml=ml,d.ESLabel=ze,d.ESLandSlide=qa,d.ESLevelRuntimeModel=Sa,d.ESLocalCircle=pa,d.ESLocalLineString=cl,d.ESLocalLineStringZ=dl,d.ESLocalPolygon=Tn,d.ESLocalPolygonZ=ga,d.ESLocalRectangle=fa,d.ESLocalSkyBox=Yo,d.ESLocalVector=ti,d.ESLocalVector2D=ot,d.ESLocationMeasurement=Ko,d.ESMVTLayer=il,d.ESMediaLayer=sl,d.ESMsTileset=ka,d.ESNavigator=Ba,d.ESObjectWithLocation=j,d.ESObjectsManager=Ir,d.ESParticleSystemPrimitive=gr,d.ESPath=ys,d.ESPathImpl=ii,d.ESPipeFence=vr,d.ESPipeline=Ca,d.ESPipeserTileset=ma,d.ESPit=vs,d.ESPlayer=_s,d.ESPoi2D=Cn,d.ESPoi3D=Zo,d.ESPoiTileset=Ma,d.ESPolygonFence=_r,d.ESPolygonFlattenedPlane=Qo,d.ESPolygonWithHole=_a,d.ESPolygonsFlattenedPlane=ea,d.ESRectangle=va,d.ESRoad=pl,d.ESRtsFeatureEditing=Fa,d.ESRtsTileset=Da,d.ESScale=Aa,d.ESSceneObject=M,d.ESSceneObjectWithId=$h,d.ESSeparateFoliage=ta,d.ESSignalInterference=al,d.ESSignalTransmission=gl,d.ESSkylineAnalysis=Ya,d.ESSquadCombatArrow=$o,d.ESStaticMesh=Xa,d.ESSubmergingAnalysis=ia,d.ESSunshineAnalysis=sa,d.ESSurfaceAreaMeasurement=ya,d.ESTerrainLayer=na,d.ESTerrainLayerEditing=xn,d.ESTerrainLayerEditingBrushEarseFalloff=Jc,d.ESTerrainLayerEditingFlattenMode=$c,d.ESTerrainLayerEditingFlattenPick=Gc,d.ESTestObject=ko,d.ESTextLabel=ms,d.ESUEWidget=ra,d.ESUnrealActor=oa,d.ESVideoFusion=aa,d.ESViewShed=la,d.ESViewer=at,d.ESViewerStatusBar=Wa,d.ESViewerStatusBarScale=Ha,d.ESVisibilityAnalysis=Pa,d.ESVisualObject=X,d.ESVolumeMeasurement=Ta,d.ESWidget=ha,d.ESXYZLayer=_l,d.EngineObject=xi,d.EnumProperty=A,d.EvalStringProperty=Xe,d.Event=v,d.EventFromArrayUpdating=eu,d.EventListenerHandler=jr,d.Fetching=ou,d.FloatDiv=ho,d.FlvJsLoading=Pr,d.FlvProcessing=fd,d.GetSetProperty=_o,d.Gif=Fh,d.GifPlayer=Dh,d.GifProcessing=kh,d.HasOwner=Zd,d.HlsJsLoading=Cr,d.HlsProcessing=gd,d.IFrameBorderedPosFloatDiv=Wu,d.ImageProcessing=wh,d.IntervalDeprecated=Kr,d.JsonArrayProperty=ie,d.JsonProperty=R,d.ListenerPipe=Ar,d.LocalFileServer=_h,d.LocalRootDir=vh,d.LongStringProperty=_n,d.MethodProperty=L,d.NextAnimateFrameEvent=zn,d.NextAnimateFrameWeakEvent=kl,d.NextMicroTaskEvent=Ur,d.NextMicroTaskWeakEvent=Wd,d.Number2Property=ne,d.Number3Property=ue,d.Number4Property=Fe,d.NumberProperty=f,d.NumberSliderProperty=pe,d.ObjPool=An,d.ObjResetting=Xu,d.ObjResettingWithEvent=le,d.ObservableArray=hn,d.ObservableSet=Xn,d.PickColorMananger=nh,d.PickedInfo=gp,d.Player=Ye,d.PlayerProperty=us,d.PointerClick=ro,d.PointerClickDeprecated=Wl,d.PointerHover=ql,d.PointerHoverDeprecated=Ru,d.PosFloatDiv=po,d.PositionProperty=nt,d.Processing=fe,d.Property=ei,d.ReactVarProperty=Te,d.ReactiveVariable=ge,d.RotationProperty=ds,d.SceneObjectFromId=So,d.SceneTree=bn,d.SceneTreeContextMenu=lc,d.SceneTreeItem=Ie,d.SceneTreeItemDragDrop=ac,d.SmartListenerHandler=sn,d.SmartListenerPipe=Md,d.SmoothMoveController=ng,d.StringProperty=N,d.Throttling=Mu,d.ThrottlingWithStartValues=Au,d.TimingDeprecated=Ul,d.ToolTipDiv=Hu,d.Transition=pn,d.TransitionDeprecated=hu,d.Tree=Si,d.TreeItem=vn,d.TreeItemDragDrop=Lh,d.UiTree=ph,d.UiTreeObject=uh,d.VideoProcessing=Sh,d.ViewPlayerProperty=jh,d.ViewerCustomInteraction=Ed,d.Watcher=wn,d.WatcherTools=Gh,d.WithUndefinedProperty=mo,d.XrPlayer=Jn,d.Xyzw2Ns=Wn,d._getFeatureProperty=Rc,d._getLayerConfig=Mc,d._getport=jc,d._saveLayerConfig=Ac,d.addTreesCallFunc=vc,d.animateFrame=Ln,d.apis=br,d.ary2Ns=ru,d.asyncFuncToCancelablePromise=yu,d.bind=D,d.bindCustomEditing=Uh,d.bindu=Ud,d.booleanPointInPolygon=Ap,d.buildFeatureTilesetUrl=kc,d.buildInfoUrl=xg,d.buildTilesetUrl=Fc,d.calcArrowPoints=Fo,d.canMoveToTreeItem=mn,d.canMoveToTreeItems=ch,d.cancelFuncToCancelablePromise=_u,d.cancelPromise=Qr,d.cancelableFetch=so,d.cancelableFetchDeprecated=zl,d.cancelableFetchWithProgress=Eu,d.cartesianDistance=ic,d.clamp=Hn,d.clamp0_360=ps,d.clampN180_180=zh,d.complexImageTypes=bh,d.createAnimateFrame=dn,d.createAnimateFrameWithStartValues=cs,d.createBottomTriangleElement=lh,d.createCancelablePromise=hs,d.createCloseDiv=ah,d.createEventsCallFunc=de,d.createFetching=bu,d.createFetchingWithStartValues=Su,d.createGuid=ns,d.createInterval=xu,d.createIntervalWithStartValues=Ou,d.createNextAnimateFrame=Cu,d.createNextAnimateFrameEvent=oe,d.createNextAnimateFrameEventCallFunc=$d,d.createNextAnimateFrameWeakEvent=Gd,d.createNextAnimateFrameWithStartValues=Pu,d.createNextMicroTask=Tu,d.createNextMicroTaskEvent=Bd,d.createNextMicroTaskWeakEvent=Hd,d.createNextMicroTaskWithStartValues=Iu,d.createNumbers=Bn,d.createProcessingFromAsyncFunc=Le,d.createProcessingFromAsyncFuncWithStartValues=wu,d.createProcessingFromPromiseCreateFunc=Gn,d.createProcessingFromPromiseCreateFuncWithStartValues=io,d.createSleeping=Du,d.createSleepingWithStartValues=Fu,d.createStartFuncFromAsyncFunc=cn,d.createTimeout=$l,d.createTimeoutWithStartValues=Gl,d.cutDownTreesCallFunc=wc,d.czmPixelFormats=Eh,d.data=Tg,d.dataMd=Ig,d.debounce=Nn,d.defaultGetLocalFilePath=Yu,d.defaultInitSceneObjectOnCreatingFunc=vp,d.defaultLight122FromEnvironmentMapManager=Do,d.defaultLoadFuncDocStr=Pc,d.defaultLoadFuncStr=da,d.defaultLocalFileServer=yh,d.defaultStartUpdateFunc=Un,d.defaultUpdateSceneObjectOnPickingFunc=mp,d.defineReactiveProp=Yr,d.destroyObject=Il,d.diffGeoJson=Pp,d.downloadLink=Yd,d.drawBubble=Ei,d.drawPoint=Nu,d.drawRoundRectPath=Yl,d.drawText=Kl,d.drawTextBlock=ao,d.engineObjectCreatedUpdate=nc,d.equalsN3=sr,d.every=Wr,d.extendClassProps=Kt,d.fetchArrayBuffer=Qd,d.fetchImage=Rl,d.forEach=_t,d.forEachWithBreak=Br,d.geoAlong=jp,d.geoArea=Po,d.geoBuffer=Zh,d.geoCenterOfMass=Rp,d.geoDestination=To,d.geoDifference=Qh,d.geoDistance=er,d.geoHeading=En,d.geoIntersect=Yh,d.geoLineIntersect=Np,d.geoNearestPointOnLine=Vp,d.geoPointToLineDistance=zp,d.geoPolygonFromCircle=ec,d.geoPolygonOverlap=Io,d.geoPolylineToBezierSpline=gs,d.geoRhumbDestination=Up,d.geoRhumbDistance=Xh,d.geoRhumbHeading=Bp,d.geoUnion=Kh,d.getColorHexStr=fn,d.getCompleteReactParams=Rn,d.getDefaultValue=Ep,d.getDistancesFromPositions=Vt,d.getDomEventCurrentTargetPos=we,d.getDrawRect=wi,d.getElementBounds=Cp,d.getEventFromPromise=pu,d.getEventPosInCurrentTarget=os,d.getExtProp=Ne,d.getFileArrayBuffer=mh,d.getFileJson=fh,d.getFileText=go,d.getFloatDivPool=uo,d.getGeoBoundingSphereFromPositions=tc,d.getIterator=rn,d.getMidpoint=Lp,d.getMinMaxCorner=tr,d.getMinMaxPosition=Nl,d.getPromiseCancel=as,d.getPromiseFromEvent=uu,d.getPromiseFromProcessing=no,d.getReactFuncs=tn,d.getRtsServicePrefix=Pi,d.getSceneObjectTreeItem=_p,d.getSubEntriesFromDir=gh,d.getTypeFromImageUri=md,d.getValueFromProps=Ml,d.getXyzFromPostion=xo,d.growthSimulationCallFunc=Ec,d.hasSameTags=Vh,d.hasSameViewerTags=yn,d.imageToCanvas=Zl,d.inOrderRunning=bp,d.interval=Vr,d.isFeatureEqual=Wh,d.isGeometryEqual=Hh,d.isJSON=Eo,d.isPromiseCancelable=ls,d.isRelativeRtsInfoUrl=Ic,d.isXML=wp,d.lbhToWebMerc=kp,d.lbhToXyz=rt,d.length=Hr,d.lerpAngle=Zn,d.lerpRotation=bo,d.loadGifFrames=xh,d.loadJs=Jr,d.map=sc,d.max=Nt,d.min=Zt,d.moveToTreeItem=qn,d.moveToTreeItems=dh,d.nextAnimateFrame=rs,d.nextMicroTask=nn,d.objsIterator=_i,d.oneTimeWarning=is,d.optionsStr=wg,d.pairToPromise=eo,d.parsePlatformFromUrl=Oc,d.parseRtsHost=xc,d.parseRtsOrigin=Er,d.parseTileServiceName=Dc,d.pluckProperty=$r,d.react=w,d.reactArray=F,d.reactArrayCollection=Rd,d.reactArrayCollectionWithUndefined=Rr,d.reactArrayWithUndefined=q,d.reactDeepArray=jn,d.reactDeepArrayWithUndefined=Xt,d.reactJson=B,d.reactJsonCollection=Nd,d.reactJsonCollectionWithUndefined=Ld,d.reactJsonWithUndefined=te,d.reactPlainObject=Ad,d.reactPlainObjectWithUndefined=jd,d.reactPosition2Ds=ir,d.reactPosition2DsSet=Vd,d.reactPositions=Yt,d.reactPositionsSet=Nr,d.reduce=ln,d.registerEventCtor=xl,d.registerEventUpdate=Jp,d.removeAllTreesCallFunc=_c,d.requestAnimationFrameTimeStampTest=Kd,d.resolveRtsInfoUrl=wr,d.rpToap=yp,d.saveOnBrowser=Xd,d.setCanvasUniformColor=Ql,d.setExtProp=vt,d.setPromiseCancel=Qt,d.setSceneObjectTreeItem=Kn,d.setValueFromProps=qd,d.sleep=un,d.sleepDeprecated=au,d.step=yi,d.stepProcessing=ku,d.throttle=Gr,d.timeout=zr,d.toGeoJson=Bh,d.track=_,d.uint32ToUint8s=ih,d.uint8ToHexStr=gn,d.uint8sToUint32=sh,d.updateTreeParamsCallFunc=yc,d.webMercToLbh=Mp,d.xyz2N2=tu,d.xyz2N3=iu,d.xyzToLbh=Co,d.xyzw2N4=su,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|