earthsdk3-ue 3.0.7 → 3.0.8-beta.2
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.
|
@@ -225,7 +225,7 @@ var EarthSDK3_UE=function(J,j){"use strict";var My=Object.defineProperty;var Hy=
|
|
|
225
225
|
console.error('未知type!');
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
`]));return l.dispose(function(){return URL.revokeObjectURL(d)}),l._worker=new Worker(d),l.dispose(function(){return l._worker.terminate()}),l._worker.onmessage=function(C){l._resultEvent.emit(C)},l}return g(i,r),i.prototype.execWorkerFunc=function(l){for(var d=[],C=1;C<arguments.length;C++)d[C-1]=arguments[C];var _=n(d);if(_)return this.execWorkerFuncWithTransferableObjects.apply(this,u([l,_],p(d),!1));throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},i.prototype.execWorkerFuncWithTransferableObjects=function(l,d){var C=this;d===void 0&&(d=[]);for(var _=[],b=2;b<arguments.length;b++)_[b-2]=arguments[b];if(d)return new Promise(function(E,F){C._execWorkerFuncWithTransferableObjects.apply(C,u([l,E,F,d],p(_),!1))});throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},i.prototype._execWorkerFuncWithTransferableObjects=function(l,d,C,_){_===void 0&&(_=[]);for(var b=[],E=4;E<arguments.length;E++)b[E-4]=arguments[E];var F=++this._lastExecId,Q={execId:F,type:"function",name:l,args:b};this._worker.postMessage(Q,_);var U=this._resultEvent.disposableOn(function(T){var S=T.data;S.execId===F&&(S.type==="function_result"?(U(),"error"in S?C(S.error):d(S.result)):S.type==="function_progress"&&console.error("messageData.type === 'function_progress'"))})},i.prototype.execWorkerProgressFunc=function(l,d,C,_){for(var b=[],E=4;E<arguments.length;E++)b[E-4]=arguments[E];var F=n(b);if(F)return this.execWorkerProgressFuncWithTransferableObjects.apply(this,u([l,d,C,_,F],p(b),!1));throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},i.prototype.execWorkerProgressFuncWithTransferableObjects=function(l,d,C,_,b){b===void 0&&(b=[]);for(var E=[],F=5;F<arguments.length;F++)E[F-5]=arguments[F];return this._execWorkerProgressFuncWithTransferableObjects.apply(this,u([l,d,C,_,b],p(E),!1))},i.prototype._execWorkerProgressFuncWithTransferableObjects=function(l,d,C,_,b){var E=this;b===void 0&&(b=[]);for(var F=[],Q=5;Q<arguments.length;Q++)F[Q-5]=arguments[Q];var U=++this._lastExecId,T={execId:U,type:"progressFunc",name:l,args:F};this._worker.postMessage(T,b);var S=this._resultEvent.disposableOn(function(P){var I=P.data;I.execId===U&&(I.type==="function_result"?(S&&(S(),S=void 0),"error"in I?_(I.error):C(I.result)):I.type==="function_progress"&&d&&d(I.progress))});return function(){S&&(S(),S=void 0),E._worker.postMessage({execId:U,type:"progressFunc_cancel",name:"funcName",args:[]})}},i.prototype.eval=function(l){return this.execWorkerFuncWithTransferableObjects("eval",[],l)},i.prototype.importScripts=function(l){return this.execWorkerFuncWithTransferableObjects("importScripts",[],l)},i.prototype.createGlobalFunc=function(l,d){return this.execWorkerFuncWithTransferableObjects("eval",[],"globalThis['".concat(d??l.name,"'] = ").concat(l.toString(),";undefined;"))},i}(c.Destroyable);A.SmartWorker=s},9486:(B,A)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.saveOnBrowser=void 0,A.saveOnBrowser=function(h,m,g){g===void 0&&(m.endsWith(".gltf")?g="model/gltf+json":m.endsWith(".bin")?g="application/octet-stream":m.endsWith(".glb")?g="model/gltf-binary":m.endsWith(".jpg")||m.endsWith(".jpeg")?g="image/jpeg":m.endsWith(".png")?g="image/png":m.endsWith(".glsl")?g="text/plain":m.endsWith(".json")?g="application/json":m.endsWith(".b3dm")||m.endsWith(".i3dm")?g="application/octet-stream":console.warn("save ".concat(m,": MimeType无法确定!")));var w=new Blob([h],{type:g||""}),p=URL.createObjectURL(w),u=document.createElement("a"),f=new MouseEvent("click");u.download=m,u.href=p,u.dispatchEvent(f),URL.revokeObjectURL(p)}},9528:(B,A)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.readFileFromBrowser=void 0,A.readFileFromBrowser=function(){return new Promise(function(h,m){var g=document.createElement("input");g.type="file",g.style.display="none";var w=new MouseEvent("click",{bubbles:!1,cancelable:!0,view:window});g.dispatchEvent(w),g.addEventListener("change",function(p){var u=g.files;u&&u.length>0?u[0].text().then(function(f){h(f)}):m()})})}},9549:(B,A,h)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.Quaternion=void 0;var m=h(2731),g=h(9898),w=h(5985),p=h(4915),u=h(8089);(function(f){var c=(0,m.createNumbers)(3);function a(E,F,Q){var U=F/2,T=Math.sin(U);g.Vector.normalize(E,c);var S=c[0]*T,P=c[1]*T,I=c[2]*T,M=Math.cos(U);return Q=Q||(0,m.createNumbers)(4),g.Vector.clone([S,P,I,M],Q),Q}f.fromAxisAngle=a;var n=(0,m.createNumbers)(3,1,2,0),s=(0,m.createNumbers)(3);function r(E,F){var Q,U,T,S,P,I=E[p.Matrix3.COLUMN0ROW0],M=E[p.Matrix3.COLUMN1ROW1],K=E[p.Matrix3.COLUMN2ROW2],W=I+M+K;if(W>0)P=.5*(Q=Math.sqrt(W+1)),Q=.5/Q,U=(E[p.Matrix3.COLUMN1ROW2]-E[p.Matrix3.COLUMN2ROW1])*Q,T=(E[p.Matrix3.COLUMN2ROW0]-E[p.Matrix3.COLUMN0ROW2])*Q,S=(E[p.Matrix3.COLUMN0ROW1]-E[p.Matrix3.COLUMN1ROW0])*Q;else{var L=n,O=0;M>I&&(O=1),K>I&&K>M&&(O=2);var H=L[O],k=L[H];Q=Math.sqrt(E[p.Matrix3.getElementIndex(O,O)]-E[p.Matrix3.getElementIndex(H,H)]-E[p.Matrix3.getElementIndex(k,k)]+1);var G=s;G[O]=.5*Q,Q=.5/Q,P=(E[p.Matrix3.getElementIndex(k,H)]-E[p.Matrix3.getElementIndex(H,k)])*Q,G[H]=(E[p.Matrix3.getElementIndex(H,O)]+E[p.Matrix3.getElementIndex(O,H)])*Q,G[k]=(E[p.Matrix3.getElementIndex(k,O)]+E[p.Matrix3.getElementIndex(O,k)])*Q,U=-G[0],T=-G[1],S=-G[2]}return F?(F[0]=U,F[1]=T,F[2]=S,F[3]=P,F):(0,m.createNumbers)(4,U,T,S,P)}f.fromRotationMatrix3=r;var i=(0,m.createNumbers)(9);f.fromRotationMatrix4=function(E,F){return r(u.Matrix4.getMatrix3(E,i),F)},f.multiply=function(E,F,Q){var U=E[0],T=E[1],S=E[2],P=E[3],I=F[0],M=F[1],K=F[2],W=F[3],L=P*I+U*W+T*K-S*M,O=P*M-U*K+T*W+S*I,H=P*K+U*M-T*I+S*W,k=P*W-U*I-T*M-S*K;return g.Vector.set(Q,L,O,H,k)};var l=(0,m.createNumbers)(3);f.rotationTo=function(E,F,Q){var U=g.Vector.dot(E,F);return U<-.999999?(w.Vector3.cross(w.Vector3.UNIT_X,E,l),g.Vector.magnitudeSquared(l)<.001&&w.Vector3.cross(w.Vector3.UNIT_Y,E,l),g.Vector.normalize(l,l),a(l,Math.PI,Q)):U>.999999?g.Vector.set(Q,0,0,0,1):(w.Vector3.cross(E,F,l),Q=g.Vector.set(Q,l[0],l[1],l[2],1+U),g.Vector.normalize(Q,Q))};var d=(0,m.createNumbers)(4);f.lerp=function(E,F,Q,U){return g.Vector.multiplyByScalar(F,Q,d),U=g.Vector.multiplyByScalar(E,1-Q,U),g.Vector.add(d,U,U)};var C=(0,m.createNumbers)(4),_=(0,m.createNumbers)(4),b=(0,m.createNumbers)(4);f.slerp=function(E,F,Q,U){var T=g.Vector.dot(E,F),S=F;if(T<0&&(T=-T,S=g.Vector.negate(F,C)),1-T<1e-6)return g.Vector.lerp(E,S,Q,U);var P=Math.acos(T);return g.Vector.multiplyByScalar(E,Math.sin((1-Q)*P),_),g.Vector.multiplyByScalar(S,Math.sin(Q*P),b),U=g.Vector.add(_,b,U),g.Vector.multiplyByScalar(U,1/Math.sin(P),U)}})(A.Quaternion||(A.Quaternion={}))},9597:function(B,A,h){var m,g=this&&this.__extends||(m=function(f,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(a[s]=n[s])},m(f,c)},function(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function a(){this.constructor=f}m(f,c),f.prototype=c===null?Object.create(c):(a.prototype=c.prototype,new a)});Object.defineProperty(A,"__esModule",{value:!0}),A.DomElementEvent=void 0;var w=h(7372),p=-1,u=function(f){function c(a,n,s,r){var i=f.call(this)||this;i._domElement=a,i._type=n,i.callback=r;var l=function(d){return d.__xbsj_listenerNo__=++p,d.__xbsj_listenerTime__=Date.now(),d.__xbsj_lastCurrentTarget__=d.currentTarget,i.emit(d),i.callback&&i.callback(d)};return i._domElement.addEventListener(i._type,l,s),i.dispose(function(){return i._domElement.removeEventListener(i._type,l,s)}),i}return g(c,f),c.getLastLisenNo=function(){return p},c.getCurrentTarget=function(a){return a.__xbsj_lastCurrentTarget__},c.getListenerNo=function(a){return a.__xbsj_listenerNo__},c.getListenerTime=function(a){return a.__xbsj_listenerTime__},c.on=function(a,n){var s=c.getLastLisenNo();return a.disposableOn(function(r){var i=c.getListenerNo(r);(i===void 0||i>s)&&n(r)})},Object.defineProperty(c.prototype,"element",{get:function(){return this._domElement},enumerable:!1,configurable:!0}),c.create=function(a,n,s){return new c(a,n,s)},c}(w.Event);A.DomElementEvent=u},9631:function(B,A){var h=this&&this.__awaiter||function(g,w,p,u){return new(p||(p=Promise))(function(f,c){function a(r){try{s(u.next(r))}catch(i){c(i)}}function n(r){try{s(u.throw(r))}catch(i){c(i)}}function s(r){var i;r.done?f(r.value):(i=r.value,i instanceof p?i:new p(function(l){l(i)})).then(a,n)}s((u=u.apply(g,w||[])).next())})},m=this&&this.__generator||function(g,w){var p,u,f,c,a={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return c={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function n(s){return function(r){return function(i){if(p)throw new TypeError("Generator is already executing.");for(;c&&(c=0,i[0]&&(a=0)),a;)try{if(p=1,u&&(f=2&i[0]?u.return:i[0]?u.throw||((f=u.return)&&f.call(u),0):u.next)&&!(f=f.call(u,i[1])).done)return f;switch(u=0,f&&(i=[2&i[0],f.value]),i[0]){case 0:case 1:f=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,u=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((f=(f=a.trys).length>0&&f[f.length-1])||i[0]!==6&&i[0]!==2)){a=0;continue}if(i[0]===3&&(!f||i[1]>f[0]&&i[1]<f[3])){a.label=i[1];break}if(i[0]===6&&a.label<f[1]){a.label=f[1],f=i;break}if(f&&a.label<f[2]){a.label=f[2],a.ops.push(i);break}f[2]&&a.ops.pop(),a.trys.pop();continue}i=w.call(g,a)}catch(l){i=[6,l],u=0}finally{p=f=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([s,r])}}};Object.defineProperty(A,"__esModule",{value:!0}),A.fetchArrayBuffer=void 0,A.fetchArrayBuffer=function(g,w){return w===void 0&&(w=fetch),h(this,void 0,void 0,function(){var p;return m(this,function(u){switch(u.label){case 0:return[4,w(g)];case 1:return(p=u.sent()).ok?[4,p.arrayBuffer()]:[2,void 0];case 2:return[2,u.sent()]}})})}},9651:function(B,A,h){var m=this&&this.__read||function(f,c){var a=typeof Symbol=="function"&&f[Symbol.iterator];if(!a)return f;var n,s,r=a.call(f),i=[];try{for(;(c===void 0||c-- >0)&&!(n=r.next()).done;)i.push(n.value)}catch(l){s={error:l}}finally{try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(s)throw s.error}}return i};Object.defineProperty(A,"__esModule",{value:!0}),A.getEventFromPromise=A.getPromiseFromEvent=A.createCancelablePromise=A.pairToPromise=A.cancelPromise=A.isPromiseCancelable=A.getPromiseCancel=A.setPromiseCancel=void 0;var g=h(1662),w=h(7372);function p(f,c){(0,g.getExtProp)(f,"_promise_cancel")&&console.warn("setPromiseCancel warn: promise has cancelFunc!"),(0,g.setExtProp)(f,"_promise_cancel",c)}function u(f){return(0,g.getExtProp)(f,"_promise_cancel")}A.setPromiseCancel=p,A.getPromiseCancel=u,A.isPromiseCancelable=function(f){return!!u(f)},A.cancelPromise=function(f,c){var a=u(f);return!!a&&(a(c),!0)},A.pairToPromise=function(f){var c=m(f,2),a=c[0],n=c[1];return p(n,a),n},A.createCancelablePromise=function(f){var c,a=new Promise(function(n,s){c=s,f.then(n).catch(s)});return p(a,c),a},A.getPromiseFromEvent=function(f){var c,a,n=new Promise(function(s,r){a=f.disposableOn(function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];a&&a(),s(i)}),c=function(i){a&&a(),r(i)}});return[c,n]},A.getEventFromPromise=function(f){var c=new w.Event,a=new w.Event;return f.then(function(n){c.isDestroyed()||c.emit(n)}).catch(function(n){a.isDestroyed()||a.emit(n)}),[c,a]}},9704:(B,A,h)=>{h.r(A),h.d(A,{decompressFrame:()=>u,decompressFrames:()=>f,parseGIF:()=>p});var m=h(4235),g=h(4638),w=h(733);const p=c=>{const a=new Uint8Array(c);return(0,g.parse)((0,w.buildStream)(a),m.A)},u=(c,a,n)=>{if(!c.image)return void console.warn("gif frame does not have associated image.");const{image:s}=c,r=s.descriptor.width*s.descriptor.height;var i=((d,C,_)=>{const E=_;var F,Q,U,T,S,P,I,M,K,W;const L=new Array(_),O=new Array(4096),H=new Array(4096),k=new Array(4097);for(S=1+(Q=1<<(W=d)),F=Q+2,I=-1,U=(1<<(T=W+1))-1,M=0;M<Q;M++)O[M]=0,H[M]=M;var G,D,R,N,X,Y;for(G=D=R=N=X=Y=0,K=0;K<E;){if(N===0){if(D<T){G+=C[Y]<<D,D+=8,Y++;continue}if(M=G&U,G>>=T,D-=T,M>F||M==S)break;if(M==Q){U=(1<<(T=W+1))-1,F=Q+2,I=-1;continue}if(I==-1){k[N++]=H[M],I=M,R=M;continue}for(P=M,M==F&&(k[N++]=R,M=I);M>Q;)k[N++]=H[M],M=O[M];R=255&H[M],k[N++]=R,F<4096&&(O[F]=I,H[F]=R,!(++F&U)&&F<4096&&(T++,U+=F)),I=P}N--,L[X++]=k[N],K++}for(K=X;K<E;K++)L[K]=0;return L})(s.data.minCodeSize,s.data.blocks,r);s.descriptor.lct.interlaced&&(i=((d,C)=>{const _=new Array(d.length),b=d.length/C,E=function(P,I){const M=d.slice(I*C,(I+1)*C);_.splice.apply(_,[P*C,C].concat(M))},F=[0,4,2,1],Q=[8,8,4,2];for(var U=0,T=0;T<4;T++)for(var S=F[T];S<b;S+=Q[T])E(S,U),U++;return _})(i,s.descriptor.width));const l={pixels:i,dims:{top:c.image.descriptor.top,left:c.image.descriptor.left,width:c.image.descriptor.width,height:c.image.descriptor.height}};return s.descriptor.lct&&s.descriptor.lct.exists?l.colorTable=s.lct:l.colorTable=a,c.gce&&(l.delay=10*(c.gce.delay||10),l.disposalType=c.gce.extras.disposal,c.gce.extras.transparentColorGiven&&(l.transparentIndex=c.gce.transparentColorIndex)),n&&(l.patch=(d=>{const C=d.pixels.length,_=new Uint8ClampedArray(4*C);for(var b=0;b<C;b++){const E=4*b,F=d.pixels[b],Q=d.colorTable[F]||[0,0,0];_[E]=Q[0],_[E+1]=Q[1],_[E+2]=Q[2],_[E+3]=F!==d.transparentIndex?255:0}return _})(l)),l},f=(c,a)=>c.frames.filter(n=>n.image).map(n=>u(n,c.gct,a))},9812:function(B,A,h){var m=this&&this.__values||function(a){var n=typeof Symbol=="function"&&Symbol.iterator,s=n&&a[n],r=0;if(s)return s.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&r>=a.length&&(a=void 0),{value:a&&a[r++],done:!a}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(A,"__esModule",{value:!0}),A.CullingVolume=void 0;var g=h(4416),w=h(312),p=h(6172),u=h(7215),f=h(8703),c=function(){function a(n){n===void 0&&(n=[]),this.planes=n}return a.fromProjectionMatrix=function(n,s){return(0,f._getCullingVolumeFromProjectionMatrix)(n,s)},a.prototype.computeVisibilityWithPlaneMask=function(n,s,r){if(r===a.MASK_OUTSIDE||r===a.MASK_INSIDE)return r;var i=a.MASK_INSIDE,l=this.planes;if(l)for(var d=0,C=l.length;d<C;++d){var _=d<31?1<<d:0;if(!(d<31)||r&_){var b=void 0;if(n==="box"?b=p.OrientedBoundingBox.intersectPlane(s,l[d]):n==="sphere"&&(b=g.BoundingSphere.intersectPlane(s,l[d])),b===w.Intersect.OUTSIDE)return a.MASK_OUTSIDE;b===w.Intersect.INTERSECTING&&(i|=_)}}return i},a.prototype.transform=function(n){var s,r;try{for(var i=m(this.planes),l=i.next();!l.done;l=i.next()){var d=l.value;u.Plane.transform(d,n,d)}}catch(C){s={error:C}}finally{try{l&&!l.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}},a.MASK_OUTSIDE=4294967295,a.MASK_INSIDE=0,a.MASK_INDETERMINATE=2147483647,a}();A.CullingVolume=c,A.default=c},9815:function(B,A,h){var m,g=this&&this.__extends||(m=function(n,s){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(r[l]=i[l])},m(n,s)},function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function r(){this.constructor=n}m(n,s),n.prototype=s===null?Object.create(s):(r.prototype=s.prototype,new r)});Object.defineProperty(A,"__esModule",{value:!0}),A.Gif=void 0;var w=h(1662),p=h(5819),u=h(5819),f=h(7118),c=h(5281),a=function(n){function s(r){var i=n.call(this)||this;return i._url=i.disposeVar((0,w.react)("")),i._loadGifFramesProcessing=i.disposeVar((0,u.createProcessingFromPromiseCreateFunc)(function(l){return(0,p.createCancelablePromise)((0,c.loadGifFrames)(l))})),i._player=i.disposeVar(new f.GifPlayer(r)),i._player.autoPlayOnLoad=!0,i._loadGifFramesProcessing.completeFunc=function(l){var d=l.gifFrames;return i._player.gifFrames=d},i.dispose(i._url.changed.disposableOn(function(l){i._player.gifFrames=void 0,i._loadGifFramesProcessing.restart(new p.CancelError("reload gif(".concat(l,")")),l)})),i}return g(s,n),Object.defineProperty(s.prototype,"player",{get:function(){return this._player},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"url",{get:function(){return this._url.value},set:function(r){this._url.value=r},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"loadedEvent",{get:function(){return this._loadGifFramesProcessing.completeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"size",{get:function(){return this._player.gifSize},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"sizeChanged",{get:function(){return this._player.gifSizeChanged},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"duration",{get:function(){return this._player.gifDuration},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"durationChanged",{get:function(){return this._player.gifDurationChanged},enumerable:!1,configurable:!0}),s}(w.Destroyable);A.Gif=a},9898:function(B,A,h){var m=this&&this.__generator||function(w,p){var u,f,c,a,n={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(r){return function(i){return function(l){if(u)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(u=1,f&&(c=2&l[0]?f.return:l[0]?f.throw||((c=f.return)&&c.call(f),0):f.next)&&!(c=c.call(f,l[1])).done)return c;switch(f=0,c&&(l=[2&l[0],c.value]),l[0]){case 0:case 1:c=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,f=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(!((c=(c=n.trys).length>0&&c[c.length-1])||l[0]!==6&&l[0]!==2)){n=0;continue}if(l[0]===3&&(!c||l[1]>c[0]&&l[1]<c[3])){n.label=l[1];break}if(l[0]===6&&n.label<c[1]){n.label=c[1],c=l;break}if(c&&n.label<c[2]){n.label=c[2],n.ops.push(l);break}c[2]&&n.ops.pop(),n.trys.pop();continue}l=p.call(w,n)}catch(d){l=[6,d],f=0}finally{u=c=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([r,i])}}};Object.defineProperty(A,"__esModule",{value:!0}),A.Vector=void 0;var g=h(2731);(function(w){function p(D,R){for(var N=D.length,X=0;X<N;++X)if(!R(D[X],X))return!1;return!0}function u(D,R,N){for(var X=D.length,Y=N,Z=0;Z<X;++Z)Y=R(Y,D[Z],Z);return Y}w.set=function(D){for(var R=[],N=1;N<arguments.length;N++)R[N-1]=arguments[N];if(D=D||(0,g.createNumbers)(R.length),R.length>D.length)throw new Error("args.length > target.length");return D instanceof Float64Array?D.set(R):T(R,D),D},w.every=p,w.reduce=u,w.itr=function(D){var R;return m(this,function(N){switch(N.label){case 0:R=0,N.label=1;case 1:return R<D.length?[4,D[R]]:[3,4];case 2:N.sent(),N.label=3;case 3:return++R,[3,1];case 4:return[2]}})};var f,c=function(D,R){return D+R*R};function a(D){return u(D,c,0)}w.magnitudeSquared=a,w.magnitude=function(D){var R=a(D);return Math.sqrt(R)},w.isNormalized=function(D,R){R===void 0&&(R=1e-5);var N=a(D);return Math.abs(N-1)<R};var n,s=function(D,R,N){return D+R*f[N]};w.dot=function(D,R){return E(D,R),f=R,u(D,s,0)};var r,i=function(D,R,N){return D+(R-n[N])*(R-n[N])};function l(D,R){return E(D,R),n=R,u(D,i,0)}w.distanceSquared=l,w.distance=function(D,R){return Math.sqrt(l(D,R))};var d,C,_=function(D,R){return D===r[R]};w.equals=function(D,R){return E(D,R),r=R,p(D,_)};var b=function(D,R){return Math.abs(D-d[R])<C};function E(D,R){if(D.length!==R.length)throw new Error("left.length !== right.length")}function F(D,R,N){var X=D.length;E(D,N=N||(0,g.createNumbers)(X));for(var Y=0;Y<X;++Y)N[Y]=R(D[Y],Y);return N}function Q(D,R,N,X){E(D,R),X&&E(D,X);var Y=D.length;X=X||(0,g.createNumbers)(Y);for(var Z=0;Z<Y;++Z)X[Z]=N(D[Z],R[Z]);return X}w.equalsEpsilon=function(D,R,N){return N===void 0&&(N=0),E(D,R),d=R,C=N,p(D,b)},w.op1=F,w.op2=Q;var U=function(D){return D};function T(D,R){return F(D,U,R)}w.clone=T;var S=0,P=function(D,R){return D*S};function I(D,R,N){return S=R,F(D,P,N)}w.multiplyByScalar=I,w.normalize=function(D,R,N){N===void 0&&(N=0);var X=a(D);if(!(X<=N))return I(D,1/Math.sqrt(X),R)},w.negate=function(D,R){return I(D,-1,R)};var M=function(D){return Math.abs(D)};w.abs=function(D,R){return F(D,M,R)};var K=function(D){return D-Math.floor(D)};w.fract=function(D,R){return F(D,K,R)};var W=function(D,R){return D-R};w.subtract=function(D,R,N){return Q(D,R,W,N)};var L=function(D,R){return D+R};w.add=function(D,R,N){return Q(D,R,L,N)};var O=function(D,R){return D*R};w.multiply=function(D,R,N){return Q(D,R,O,N)};var H,k=function(D,R){return D/R};w.divide=function(D,R,N){return Q(D,R,k,N)};var G=function(D,R){return D*(1-H)+R*H};w.lerp=function(D,R,N,X){return H=N,Q(D,R,G,X)}})(A.Vector||(A.Vector={}))},9910:(B,A,h)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.destroyScalableArray=A.createScalableArray=void 0;var m=h(1085),g=function(){function u(){this._array=[]}return Object.defineProperty(u.prototype,"array",{get:function(){return this._array},enumerable:!1,configurable:!0}),u}(),w=new m.ObjPool(function(){return new g}),p=new WeakMap;A.createScalableArray=function(){var u=w.create();return p.set(u.array,u),u.array},A.destroyScalableArray=function(u){var f=p.get(u);if(!f)throw console.warn("!obj"),new Error("!obj");w.destroy(f)}},9928:(B,A,h)=>{function m(g,w,p,u,f){this._format=g,this._width=w,this._height=p,this._buffer=u,this._mipLevels=f}h.r(A),h.d(A,{CompressedTextureBuffer:()=>m}),Object.defineProperties(m.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},mipLevels:{get:function(){return this._mipLevels}}}),m.clone=function(g){if(g)return new m(g._format,g._width,g._height,g._buffer,g._mipLevels)},m.prototype.clone=function(){return m.clone(this)}},9970:(B,A)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.nodeBufferToUint8Array=void 0,A.nodeBufferToUint8Array=function(h){return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)}},9972:function(B,A,h){var m=this&&this.__read||function(a,n){var s=typeof Symbol=="function"&&a[Symbol.iterator];if(!s)return a;var r,i,l=s.call(a),d=[];try{for(;(n===void 0||n-- >0)&&!(r=l.next()).done;)d.push(r.value)}catch(C){i={error:C}}finally{try{r&&!r.done&&(s=l.return)&&s.call(l)}finally{if(i)throw i.error}}return d},g=this&&this.__spreadArray||function(a,n,s){if(s||arguments.length===2)for(var r,i=0,l=n.length;i<l;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return a.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(A,"__esModule",{value:!0}),A.createFetchingWithStartValues=A.createFetching=A.cancelableFetch=A.cancelableFetchWithProgress=void 0;var w=h(5726),p=h(9651),u=h(921);function f(a){for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var r=new AbortController,i=r.signal,l=m(n,2),d=l[0],C=l[1];if(C!=null&&C.signal)throw console.error("init?.signal"),new Error("init?.signal");(C=C||{}).signal&&console.warn("revocableFetch error: init.signal would be override!"),C.signal=i;var _=!1,b=fetch(d,C);return a&&(b=b.then(function(E){if(!E.ok)return E;if(!E.body)throw Error("ReadableStream not yet supported in this browser.");var F=E.headers.get("content-length");F||console.warn("response.headers.get('content-length') is undefined... cannot get contentLength!");var Q=F?parseInt(F,10):0,U=0;return new Response(new ReadableStream({start:function(T){if(!E.body)throw new Error("!response.body");var S=E.body.getReader();(function P(){S.read().then(function(I){var M=I.done,K=I.value;if(M)T.close();else{if(!K)throw new Error("!value");if(!a)throw new Error("!progressFunc");U+=K.byteLength,a(U,Q),T.enqueue(K),P()}}).catch(function(I){T.error(I)})})()}}),{status:E.status,statusText:E.statusText,headers:E.headers})}).catch(function(E){throw _?(E instanceof Error&&E.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new w.CancelError("fetching cancelled! error: ".concat(E))):(E instanceof Error&&E.code===20&&console.error("error.code === 20"),E)})),(0,p.setPromiseCancel)(b,function(){_=!0,r.abort()}),b}function c(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];return f.apply(void 0,g([void 0],m(a),!1))}A.cancelableFetchWithProgress=function(a){for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];return f.apply(void 0,g([a],m(n),!1))},A.cancelableFetch=c,A.createFetching=function(){return(0,u.createProcessingFromPromiseCreateFunc)(c)},A.createFetchingWithStartValues=function(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];return u.createProcessingFromPromiseCreateFuncWithStartValues.apply(void 0,g([c],m(a),!1))}},9986:function(B,A,h){var m,g=this&&this.__extends||(m=function(f,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(a[s]=n[s])},m(f,c)},function(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function a(){this.constructor=f}m(f,c),f.prototype=c===null?Object.create(c):(a.prototype=c.prototype,new a)}),w=this&&this.__read||function(f,c){var a=typeof Symbol=="function"&&f[Symbol.iterator];if(!a)return f;var n,s,r=a.call(f),i=[];try{for(;(c===void 0||c-- >0)&&!(n=r.next()).done;)i.push(n.value)}catch(l){s={error:l}}finally{try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(s)throw s.error}}return i};Object.defineProperty(A,"__esModule",{value:!0}),A.PosFloatDiv=void 0;var p=h(7372),u=function(f){function c(){var a=f.call(this)||this;a._originOffsetX=0,a._originOffsetY=0,a._originRatioX=.5,a._originRatioY=1,a._divChanged=new p.Event;var n=document.createElement("div");n.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible;";var s=document.createElement("div");s.style.cssText="position: absolute; left: ".concat(-a._originOffsetX,"px; top: ").concat(-a._originOffsetY,"px; transform: translateX(-").concat(100*a._originRatioX,"%) translateY(-").concat(100*a._originRatioY,"%); margin: 0; padding: 0; pointer-events: none;");var r=document.createElement("div");a._contentDiv=r,s.appendChild(r),n.appendChild(s);var i=function(l){l.stopPropagation()};return n.addEventListener("pointermove",i),n.addEventListener("pointerdown",i),n.addEventListener("pointerup",i),a.dispose(function(){n.removeEventListener("pointermove",i),n.removeEventListener("pointerdown",i),n.removeEventListener("pointerup",i)}),a._div=n,a.dispose(a._divChanged.disposableOn(function(){s.style.left="".concat(-a._originOffsetX,"px"),s.style.top="".concat(-a._originOffsetY,"px"),s.style.transform="translateX(-".concat(100*a._originRatioX,"%) translateY(-").concat(100*a._originRatioY,"%)")})),a.dispose(a.winPosChanged.disposableOn(function(l){var d=w(l,2),C=d[0],_=d[1];a._div.style.left="".concat(C,"px"),a._div.style.top="".concat(_,"px")})),a.dispose(a.opacityChanged.disposableOn(function(l){a._div.style.opacity="".concat(l)})),a.dispose(a.showChanged.disposableOn(function(l){a._div.style.visibility=l?"visible":"hidden"})),a}return g(c,f),Object.defineProperty(c.prototype,"contentDiv",{get:function(){return this._contentDiv},enumerable:!1,configurable:!0}),c.prototype.reset=function(){},Object.defineProperty(c.prototype,"originOffsetX",{get:function(){return this._originOffsetX},set:function(a){this._originOffsetX!==a&&(this._originOffsetX=a,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"originOffsetY",{get:function(){return this._originOffsetY},set:function(a){this._originOffsetY!==a&&(this._originOffsetY=a,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"originRatioX",{get:function(){return this._originRatioX},set:function(a){this._originRatioX!==a&&(this._originRatioX=a,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"originRatioY",{get:function(){return this._originRatioY},set:function(a){this._originRatioY!==a&&(this._originRatioY=a,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"element",{get:function(){return this._div},enumerable:!1,configurable:!0}),c}(h(7324).FloatDiv);A.PosFloatDiv=u}},o={};function y(B){var A=o[B];if(A!==void 0)return A.exports;var h=o[B]={exports:{}};return t[B].call(h.exports,h,h.exports,y),h.exports}return y.n=B=>{var A=B&&B.__esModule?()=>B.default:()=>B;return y.d(A,{a:A}),A},y.d=(B,A)=>{for(var h in A)y.o(A,h)&&!y.o(B,h)&&Object.defineProperty(B,h,{enumerable:!0,get:A[h]})},y.o=(B,A)=>Object.prototype.hasOwnProperty.call(B,A),y.r=B=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},y(4221)})())}(rt)),rt.exports}var V=Ku();const Nu={...j.ESViewer.defaults,geoReferenceOrigin:void 0,keepWorldOriginNearCamera:!1,useCache:!0,widgetInteractionDistance:200,memReportInterval:10,sceneControlled:!0,brightness:0,emissiveIntensity:1,statusUpdateInterval:.5,baseUrl:window.location.href??""},Ss=()=>({...j.ESViewer.createCommonProps(),apiKey:"",apiUrl:"",secretKey:"",speechVoiceMode:"",geoReferenceOrigin:V.reactArrayWithUndefined(void 0),keepWorldOriginNearCamera:void 0,useCache:void 0,widgetInteractionDistance:void 0,memReportInterval:void 0,sceneControlled:void 0,brightness:void 0,emissiveIntensity:void 0,statusUpdateInterval:void 0,baseUrl:void 0});function VA(){const v=Ss(),e=[];return Object.keys(v).forEach(t=>{e.push(t)}),e}function Zn(v){const{defaults:e}=it,t=VA(),o={};return t.forEach(y=>{o[y]=v[y]??e[y]}),o}const Ht=async(v,e,t,o,y,B="default")=>{const A=await v.callUeFunc({f:"flyTo",p:{id:e,duration:t,flyToParam:o,position:y,flyMode:B}});if(A.error){console.error(A.error);return}return A.re},qn=async(v,e)=>{const t=await v.callUeFunc({f:"destroy",p:{id:e}});return t.error&&console.error(t.error),t},Lt=(v,e)=>{v.callUeFunc({f:"calcFlyToParam",p:{id:e}}).then(t=>{t.error&&console.error("calcFlyToParam:",t.error)}).catch(t=>{console.error("calcFlyToParam:",t)})},Us=(v,e)=>{v.callUeFunc({f:"refreshTileset",p:{id:e}}).then(t=>{t.error&&console.error("refreshTileset:",t.error)}).catch(t=>{console.error("refreshTileset:",t)})},tr=async(v,e,t,o,y,B="default")=>{const A=await v.callUeFunc({f:"flyIn",p:{id:e,position:t,rotation:o,duration:y,flyMode:B}});if(A.error){console.error(A.error);return}return A.re},Ts=async(v,e)=>{if(!v){console.warn("DefaultCameraFlyIn: viewer is undefined");return}const t=await v.callUeFunc({f:"DefaultCameraFlyIn",p:{Duration:e??1}});if(t.error){console.error("DefaultCameraFlyIn:",t.error);return}return t},Is=async v=>{if(!v){console.warn("StartVoice:viewer is undefined");return}const e=await v.callUeFunc({f:"StartVoice",p:{}});if(e.error){console.error("StartVoice:",e.error);return}return e},Ps=async v=>{if(!v){console.warn("StopVoice:viewer is undefined");return}const e=await v.callUeFunc({f:"StopVoice",p:{}});if(e.error){console.error("StopVoice:",e.error);return}return e},xs=async(v,e)=>{if(!v){console.warn("mountPakFiles:viewer is undefined");return}const t=await v.callUeFunc({f:"MountPakFiles",p:{json:e}});if(t.error){console.error("mountPakFiles:",t.error);return}return t},Os=async v=>{if(!v){console.warn("generateMemReport:viewer is undefined");return}const e=await v.callUeFunc({f:"GenerateMemReport",p:{}});if(e.error){console.error("generateMemReport:",e.error);return}return e},ei=async(v,e)=>{const t=await v.callUeFunc({f:"resetWithCurrentCamera",p:{id:e}});return t.error&&console.error("resetWithCurrentCamera:",t.error),t},GA=(v,e,t,o,y)=>{v.callUeFunc({f:"smoothMoveWithRotation",p:{id:e,Destination:t,NewRotation:o,Time:y}}).then(B=>{B.error&&console.error("smoothMoveWithRotation:",B.error)}).catch(B=>{console.error("smoothMoveWithRotation:",B)})},jA=(v,e,t,o,y,B)=>{v.callUeFunc({f:"smoothMoveOnGround",p:{id:e,Lon:t,Lat:o,Ground:y,Time:B}}).then(A=>{A.error&&console.error("smoothMoveOnGround:",A.error)}).catch(A=>{console.error("smoothMoveOnGround:",A)})},WA=(v,e,t,o,y,B,A)=>{v.callUeFunc({f:"smoothMoveWithRotationOnGround",p:{id:e,NewRotation:t,Lon:o,Lat:y,Time:B,Ground:A}}).then(h=>{h.error&&console.error("smoothMoveWithRotationOnGround:",h.error)}).catch(h=>{console.error("smoothMoveWithRotationOnGround:",h)})},Ms=(v,e,t)=>{v.callUeFunc({f:"HighlightFeature",p:{id:e,HlId:t}}).then(o=>{o.error&&console.error("HighlightFeature:",o.error)}).catch(o=>{console.error("HighlightFeature:",o)})},Hs=(v,e,t,o)=>{v.callUeFunc({f:"HighlightFeatureAndFlyTo",p:{id:e,HlId:t,Duration:o}}).then(y=>{y.error&&console.error("HighlightFeatureAndFlyTo:",y.error)}).catch(y=>{console.error("HighlightFeatureAndFlyTo:",y)})},Ls=(v,e,t)=>{v.callUeFunc({f:"SetLayerVisible",p:{id:e,LayerJson:t}}).then(o=>{o.error&&console.error("SetLayerVisible:",o.error)}).catch(o=>{console.error("SetLayerVisible:",o)})},Ds=(v,e,t)=>{v.callUeFunc({f:"SetLayerColor",p:{id:e,LayerJson:t}}).then(o=>{o.error&&console.error("SetLayerColor:",o.error)}).catch(o=>{console.error("SetLayerColor:",o)})},zA=(v,e,t,o)=>{v.callUeFunc({f:"smoothMove",p:{id:e,Destination:t,Time:o}}).then(y=>{y.error&&console.error("smoothMove:",y.error)}).catch(y=>{console.error("smoothMove:",y)})},ti=async(v,e,t,o)=>{const y=await v.callUeFunc({f:"callFunction",p:{id:e,fn:t,p:o}});return y.error&&(console.error("callFunction:",y.error),console.error(`id: ${e} fn: ${t} param: ${o}`)),y.re??void 0},Rs=(v,e,t,o)=>{v.callUeFunc({f:"SetNodePosition",p:{id:e,NodeName:t,NodePosition:o}}).then(y=>{y.error&&console.error("SetNodePosition:",y.error)}).catch(y=>{console.error("SetNodePosition:",y)})},ks=(v,e,t,o)=>{v.callUeFunc({f:"SetNodeRotation",p:{id:e,NodeName:t,NodeRotation:o}}).then(y=>{y.error&&console.error("SetNodeRotation:",y.error)}).catch(y=>{console.error("SetNodeRotation:",y)})},Ks=(v,e,t,o)=>{v.callUeFunc({f:"SetNodeScale",p:{id:e,NodeName:t,NodeScale:o}}).then(y=>{y.error&&console.error("SetNodeScale:",y.error)}).catch(y=>{console.error("SetNodeScale:",y)})},At=async(v,e)=>{const t=await v.callUeFunc({f:"ChangeNavigationMode",p:e});if(t.error){console.error("ChangeNavigationMode:",t.error);return}return t},Ns=async(v,e)=>{const t=await v.callUeFunc({f:"setGlobalProperty",p:e});if(t.error){console.error("setGlobalProperty:",t.error);return}return t},Vs=async v=>{const e=await v.callUeFunc({f:"Quit",p:void 0});if(e.error){console.error("Quit:",e.error);return}return e},Gs=async(v,e,t,o)=>{console.log("pickCallFunc",e,t,o);const y=await v.callUeFunc({f:"pick",p:{screenPosition:e,parentInfo:o}});if(!y.re&&(y.error||y.error=="")){console.error("pick:",y.error==""?"未获取到结果":y.error);return}let B=y.re.id,A;const h=B?j.ESSceneObject.getSceneObject(B):void 0;return h&&Reflect.has(h,"allowPicking")&&Reflect.has(h,"pickedEvent")&&(h.allowPicking??!1)&&(A=new j.ESJPickedResult(y.re,h,y.re.features,y.re.add,t,e),h.pickedEvent.emit(A)),h&&Reflect.has(h,"allowPicking")&&!h.allowPicking?new j.ESJPickedResult:A},js=async(v,e)=>{const t=await v.callUeFunc({f:"pickPosition",p:{screenPosition:e}});if(!t.re&&(t.error||t.error=="")){console.error("pickPosition",t.error==""?"未获取到结果":t.error);return}const{position:o}=t.re;return o},Ws=async(v,e,t,o="ECC_Visibility")=>{const y=await v.callUeFunc({f:"GetHeightByLonLat",p:{Lon:e,Lat:t,Channel:o}});if(y.error){console.warn(`GetHeightByLonLat:${y.error}`);return}return y.re},zs=async(v,e,t="ECC_Visibility")=>{const o=await v.callUeFunc({f:"GetHeightsByLonLats",p:{LonLats:e,Channel:t}});if(o.error){console.warn(`GetHeightsByLonLats:${o.error}`);return}o.re.heights.includes(null)&&console.warn("注意! GetHeightsByLonLats: 存在高度为null的点. there are points with a height of null");try{return o.re.heights}catch{return}},Js=async(v,e=64,t=64)=>{const o=await v.callUeFunc({f:"capture",p:{resx:e,resy:t}});if(o.error){console.warn(o.error);return}return o.re.image},Xs=async(v,e,t=[64,64])=>{const o=await v.callUeFunc({f:"partialCapture",p:{startPos:e,size:t}});if(o.error){console.warn(o.error);return}return o.re.image},Ys=async(v,e)=>{const t=await v.callUeFunc({f:"LonLatAltToScreenPosition",p:{LonLatAlt:e}});return t.error&&console.warn(t.error),t.re},$s=async(v,e)=>{const t=await v.callUeFunc({f:"UEPositionToLonLatAlt",p:{UEPosition:e}});if(t.error){console.warn(t.error);return}return[...t.re.LonLatAlt]},Zs=async(v,e)=>{const t=await v.callUeFunc({f:"GetAllSocketNamesByActorTag",p:{ActorTag:e}});if(t.error){console.warn(t.error);return}return[...t.re.socketNames]},qs=async v=>{const e=await v.callUeFunc({f:"GetVersion",p:void 0});if(e.error){console.warn("GetVersion:",e.error);return}return e.re.version},ea=async(v,e)=>{const t=await v.callUeFunc({f:"GetBoundSphere",p:{id:e}});if(t.error){console.warn(t.error);return}return t.re},ta=async(v,e)=>{const t=await v.callUeFunc({f:"GetBoundSphereWithChildren",p:{id:e}});if(t.error){console.warn(`GetBoundSphereWithChildren:${t.error}`);return}return t.re},ra=async(v,e)=>{const t=await v.callUeFunc({f:"GetStrokeMaterialParamInfo",p:{id:e}});if(t.error){console.warn(`GetStrokeMaterialParamInfo:${t.error}`);return}return t.re},Aa=async(v,e)=>{const t=await v.callUeFunc({f:"GetFillMaterialParamInfo",p:{id:e}});if(t.error){console.warn(`GetFillMaterialParamInfo:${t.error}`);return}return t.re},na=async(v,e)=>{const t=await v.callUeFunc({f:"getGlobalProperty",p:{props:e}});if(t.error){console.warn(`getGlobalProperty:${t.error}`);return}return t.re},ia=async(v,e)=>{const t=await v.callUeFunc({f:"GetObjectByInfo",p:{info:e}});if(t.error){console.warn(`GetObjectByInfo:${t.error}`);return}return t.re},oa=async(v,e,t)=>await v.callUeFunc({f:"BindActorByTag",p:{ID:e,ActorTag:t}}),sa=async v=>await v.callUeFunc({f:"RestoreOriginalScene",p:void 0}),aa=async(v,e)=>await v.callUeFunc({f:"UnBindActorByID",p:{ID:e}}),ca=async(v,e)=>await v.callUeFunc({f:"UnBindActorByTag",p:{ActorTag:e}}),la=async(v,e,t)=>await v.callUeFunc({f:"CreateActorByClass",p:{ID:e,ActorClass:t}}),ua=async function(v,e,t){return await v.callUeFunc({f:"Bind3DTilesetByTag",p:{ID:e,ActorTag:t}})},da=async function(v,e){return await v.callUeFunc({f:"UnBind3DTilesetByTag",p:{ActorTag:e}})},fa=async function(v,e){return await v.callUeFunc({f:"UnBind3DTilesetById",p:{ID:e}})},ha=async function(v,e,t,o){return await v.callUeFunc({f:"BindImageryByTag",p:{ID:e,ActorTag:t,ComponentTag:o}})},pa=async function(v,e,t){return await v.callUeFunc({f:"UnBindImageryByTag",p:{ActorTag:e,ComponentTag:t}})},ga=async function(v,e){return await v.callUeFunc({f:"UnBindImageryById",p:{ID:e}})},va=async function(v,e,t,o){return await v.callUeFunc({f:"GetIdByComponentNameAndHitItem",p:{id:e,ComponentName:t,HitItem:o}})},ya=async function(v,e="ECC_Visibility"){return await v.callUeFunc({f:"GetCameraRelativeHeight",p:{Channel:e}})},ma=async function(v,e,t,o){const y=await v.callUeFunc({f:"SaveStringToFile",p:{String:e,Path:t??"undefine",File:o??"data.txt"}});return y.error!==""&&console.warn("SaveStringToFile: ",y.error),y},wa=async function(v,e,t=!0){const o=await v.callUeFunc({f:"HighlightActorByTag",p:{ActorTag:e,Highlight:t}});return o.error!==""&&console.warn("HighlightActorByTag: ",o.error),o},Ba=async function(v,e){const t=await v.callUeFunc({f:"SendCustomMessage",p:{Message:e}});return t.error!==""&&console.warn("SendCustomMessage: ",t.error),t},Ca=async function(v){const e=await v.callUeFunc({f:"GetStatus",p:void 0});if(e.error){console.warn(`GetStatus:${e.error}`);return}return e.re},ba=async(v,e,t,o,y=!0)=>{const B=await v.callUeFunc({f:"startEditing",p:{sceneObjectID:e,editingID:t,modes:o,useKeyToSwitch:y}});if(B.error){console.error("startEditing:",B.error);return}return B},_a=async v=>{const e=await v.callUeFunc({f:"stopEditing",p:void 0});if(e.error){console.error("stopEditing:",e.error);return}return e},Ea=async(v,e,t)=>{const o=await v.callUeFunc({f:"moveObjects",p:{sceneObjectIDs:e,editingID:t}});if(o.error){console.error("moveObjects:",o.error);return}return o},Fa=async v=>{const e=await v.callUeFunc({f:"GetTilesetMaterialIDList",p:void 0});if(e.error){console.error("GetTilesetMaterialIDList:",e.error);return}return e.re.materialIDList};class rr extends V.Destroyable{}var ri={exports:{}},Qa;function Vu(){return Qa||(Qa=1,function(v){const e={};e.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},e.localCName=e.generateIdentifier(),e.splitLines=function(t){return t.trim().split(`
|
|
228
|
+
`]));return l.dispose(function(){return URL.revokeObjectURL(d)}),l._worker=new Worker(d),l.dispose(function(){return l._worker.terminate()}),l._worker.onmessage=function(C){l._resultEvent.emit(C)},l}return g(i,r),i.prototype.execWorkerFunc=function(l){for(var d=[],C=1;C<arguments.length;C++)d[C-1]=arguments[C];var _=n(d);if(_)return this.execWorkerFuncWithTransferableObjects.apply(this,u([l,_],p(d),!1));throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},i.prototype.execWorkerFuncWithTransferableObjects=function(l,d){var C=this;d===void 0&&(d=[]);for(var _=[],b=2;b<arguments.length;b++)_[b-2]=arguments[b];if(d)return new Promise(function(E,F){C._execWorkerFuncWithTransferableObjects.apply(C,u([l,E,F,d],p(_),!1))});throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},i.prototype._execWorkerFuncWithTransferableObjects=function(l,d,C,_){_===void 0&&(_=[]);for(var b=[],E=4;E<arguments.length;E++)b[E-4]=arguments[E];var F=++this._lastExecId,Q={execId:F,type:"function",name:l,args:b};this._worker.postMessage(Q,_);var U=this._resultEvent.disposableOn(function(T){var S=T.data;S.execId===F&&(S.type==="function_result"?(U(),"error"in S?C(S.error):d(S.result)):S.type==="function_progress"&&console.error("messageData.type === 'function_progress'"))})},i.prototype.execWorkerProgressFunc=function(l,d,C,_){for(var b=[],E=4;E<arguments.length;E++)b[E-4]=arguments[E];var F=n(b);if(F)return this.execWorkerProgressFuncWithTransferableObjects.apply(this,u([l,d,C,_,F],p(b),!1));throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},i.prototype.execWorkerProgressFuncWithTransferableObjects=function(l,d,C,_,b){b===void 0&&(b=[]);for(var E=[],F=5;F<arguments.length;F++)E[F-5]=arguments[F];return this._execWorkerProgressFuncWithTransferableObjects.apply(this,u([l,d,C,_,b],p(E),!1))},i.prototype._execWorkerProgressFuncWithTransferableObjects=function(l,d,C,_,b){var E=this;b===void 0&&(b=[]);for(var F=[],Q=5;Q<arguments.length;Q++)F[Q-5]=arguments[Q];var U=++this._lastExecId,T={execId:U,type:"progressFunc",name:l,args:F};this._worker.postMessage(T,b);var S=this._resultEvent.disposableOn(function(P){var I=P.data;I.execId===U&&(I.type==="function_result"?(S&&(S(),S=void 0),"error"in I?_(I.error):C(I.result)):I.type==="function_progress"&&d&&d(I.progress))});return function(){S&&(S(),S=void 0),E._worker.postMessage({execId:U,type:"progressFunc_cancel",name:"funcName",args:[]})}},i.prototype.eval=function(l){return this.execWorkerFuncWithTransferableObjects("eval",[],l)},i.prototype.importScripts=function(l){return this.execWorkerFuncWithTransferableObjects("importScripts",[],l)},i.prototype.createGlobalFunc=function(l,d){return this.execWorkerFuncWithTransferableObjects("eval",[],"globalThis['".concat(d??l.name,"'] = ").concat(l.toString(),";undefined;"))},i}(c.Destroyable);A.SmartWorker=s},9486:(B,A)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.saveOnBrowser=void 0,A.saveOnBrowser=function(h,m,g){g===void 0&&(m.endsWith(".gltf")?g="model/gltf+json":m.endsWith(".bin")?g="application/octet-stream":m.endsWith(".glb")?g="model/gltf-binary":m.endsWith(".jpg")||m.endsWith(".jpeg")?g="image/jpeg":m.endsWith(".png")?g="image/png":m.endsWith(".glsl")?g="text/plain":m.endsWith(".json")?g="application/json":m.endsWith(".b3dm")||m.endsWith(".i3dm")?g="application/octet-stream":console.warn("save ".concat(m,": MimeType无法确定!")));var w=new Blob([h],{type:g||""}),p=URL.createObjectURL(w),u=document.createElement("a"),f=new MouseEvent("click");u.download=m,u.href=p,u.dispatchEvent(f),URL.revokeObjectURL(p)}},9528:(B,A)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.readFileFromBrowser=void 0,A.readFileFromBrowser=function(){return new Promise(function(h,m){var g=document.createElement("input");g.type="file",g.style.display="none";var w=new MouseEvent("click",{bubbles:!1,cancelable:!0,view:window});g.dispatchEvent(w),g.addEventListener("change",function(p){var u=g.files;u&&u.length>0?u[0].text().then(function(f){h(f)}):m()})})}},9549:(B,A,h)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.Quaternion=void 0;var m=h(2731),g=h(9898),w=h(5985),p=h(4915),u=h(8089);(function(f){var c=(0,m.createNumbers)(3);function a(E,F,Q){var U=F/2,T=Math.sin(U);g.Vector.normalize(E,c);var S=c[0]*T,P=c[1]*T,I=c[2]*T,M=Math.cos(U);return Q=Q||(0,m.createNumbers)(4),g.Vector.clone([S,P,I,M],Q),Q}f.fromAxisAngle=a;var n=(0,m.createNumbers)(3,1,2,0),s=(0,m.createNumbers)(3);function r(E,F){var Q,U,T,S,P,I=E[p.Matrix3.COLUMN0ROW0],M=E[p.Matrix3.COLUMN1ROW1],K=E[p.Matrix3.COLUMN2ROW2],W=I+M+K;if(W>0)P=.5*(Q=Math.sqrt(W+1)),Q=.5/Q,U=(E[p.Matrix3.COLUMN1ROW2]-E[p.Matrix3.COLUMN2ROW1])*Q,T=(E[p.Matrix3.COLUMN2ROW0]-E[p.Matrix3.COLUMN0ROW2])*Q,S=(E[p.Matrix3.COLUMN0ROW1]-E[p.Matrix3.COLUMN1ROW0])*Q;else{var L=n,O=0;M>I&&(O=1),K>I&&K>M&&(O=2);var H=L[O],k=L[H];Q=Math.sqrt(E[p.Matrix3.getElementIndex(O,O)]-E[p.Matrix3.getElementIndex(H,H)]-E[p.Matrix3.getElementIndex(k,k)]+1);var G=s;G[O]=.5*Q,Q=.5/Q,P=(E[p.Matrix3.getElementIndex(k,H)]-E[p.Matrix3.getElementIndex(H,k)])*Q,G[H]=(E[p.Matrix3.getElementIndex(H,O)]+E[p.Matrix3.getElementIndex(O,H)])*Q,G[k]=(E[p.Matrix3.getElementIndex(k,O)]+E[p.Matrix3.getElementIndex(O,k)])*Q,U=-G[0],T=-G[1],S=-G[2]}return F?(F[0]=U,F[1]=T,F[2]=S,F[3]=P,F):(0,m.createNumbers)(4,U,T,S,P)}f.fromRotationMatrix3=r;var i=(0,m.createNumbers)(9);f.fromRotationMatrix4=function(E,F){return r(u.Matrix4.getMatrix3(E,i),F)},f.multiply=function(E,F,Q){var U=E[0],T=E[1],S=E[2],P=E[3],I=F[0],M=F[1],K=F[2],W=F[3],L=P*I+U*W+T*K-S*M,O=P*M-U*K+T*W+S*I,H=P*K+U*M-T*I+S*W,k=P*W-U*I-T*M-S*K;return g.Vector.set(Q,L,O,H,k)};var l=(0,m.createNumbers)(3);f.rotationTo=function(E,F,Q){var U=g.Vector.dot(E,F);return U<-.999999?(w.Vector3.cross(w.Vector3.UNIT_X,E,l),g.Vector.magnitudeSquared(l)<.001&&w.Vector3.cross(w.Vector3.UNIT_Y,E,l),g.Vector.normalize(l,l),a(l,Math.PI,Q)):U>.999999?g.Vector.set(Q,0,0,0,1):(w.Vector3.cross(E,F,l),Q=g.Vector.set(Q,l[0],l[1],l[2],1+U),g.Vector.normalize(Q,Q))};var d=(0,m.createNumbers)(4);f.lerp=function(E,F,Q,U){return g.Vector.multiplyByScalar(F,Q,d),U=g.Vector.multiplyByScalar(E,1-Q,U),g.Vector.add(d,U,U)};var C=(0,m.createNumbers)(4),_=(0,m.createNumbers)(4),b=(0,m.createNumbers)(4);f.slerp=function(E,F,Q,U){var T=g.Vector.dot(E,F),S=F;if(T<0&&(T=-T,S=g.Vector.negate(F,C)),1-T<1e-6)return g.Vector.lerp(E,S,Q,U);var P=Math.acos(T);return g.Vector.multiplyByScalar(E,Math.sin((1-Q)*P),_),g.Vector.multiplyByScalar(S,Math.sin(Q*P),b),U=g.Vector.add(_,b,U),g.Vector.multiplyByScalar(U,1/Math.sin(P),U)}})(A.Quaternion||(A.Quaternion={}))},9597:function(B,A,h){var m,g=this&&this.__extends||(m=function(f,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(a[s]=n[s])},m(f,c)},function(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function a(){this.constructor=f}m(f,c),f.prototype=c===null?Object.create(c):(a.prototype=c.prototype,new a)});Object.defineProperty(A,"__esModule",{value:!0}),A.DomElementEvent=void 0;var w=h(7372),p=-1,u=function(f){function c(a,n,s,r){var i=f.call(this)||this;i._domElement=a,i._type=n,i.callback=r;var l=function(d){return d.__xbsj_listenerNo__=++p,d.__xbsj_listenerTime__=Date.now(),d.__xbsj_lastCurrentTarget__=d.currentTarget,i.emit(d),i.callback&&i.callback(d)};return i._domElement.addEventListener(i._type,l,s),i.dispose(function(){return i._domElement.removeEventListener(i._type,l,s)}),i}return g(c,f),c.getLastLisenNo=function(){return p},c.getCurrentTarget=function(a){return a.__xbsj_lastCurrentTarget__},c.getListenerNo=function(a){return a.__xbsj_listenerNo__},c.getListenerTime=function(a){return a.__xbsj_listenerTime__},c.on=function(a,n){var s=c.getLastLisenNo();return a.disposableOn(function(r){var i=c.getListenerNo(r);(i===void 0||i>s)&&n(r)})},Object.defineProperty(c.prototype,"element",{get:function(){return this._domElement},enumerable:!1,configurable:!0}),c.create=function(a,n,s){return new c(a,n,s)},c}(w.Event);A.DomElementEvent=u},9631:function(B,A){var h=this&&this.__awaiter||function(g,w,p,u){return new(p||(p=Promise))(function(f,c){function a(r){try{s(u.next(r))}catch(i){c(i)}}function n(r){try{s(u.throw(r))}catch(i){c(i)}}function s(r){var i;r.done?f(r.value):(i=r.value,i instanceof p?i:new p(function(l){l(i)})).then(a,n)}s((u=u.apply(g,w||[])).next())})},m=this&&this.__generator||function(g,w){var p,u,f,c,a={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return c={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function n(s){return function(r){return function(i){if(p)throw new TypeError("Generator is already executing.");for(;c&&(c=0,i[0]&&(a=0)),a;)try{if(p=1,u&&(f=2&i[0]?u.return:i[0]?u.throw||((f=u.return)&&f.call(u),0):u.next)&&!(f=f.call(u,i[1])).done)return f;switch(u=0,f&&(i=[2&i[0],f.value]),i[0]){case 0:case 1:f=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,u=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((f=(f=a.trys).length>0&&f[f.length-1])||i[0]!==6&&i[0]!==2)){a=0;continue}if(i[0]===3&&(!f||i[1]>f[0]&&i[1]<f[3])){a.label=i[1];break}if(i[0]===6&&a.label<f[1]){a.label=f[1],f=i;break}if(f&&a.label<f[2]){a.label=f[2],a.ops.push(i);break}f[2]&&a.ops.pop(),a.trys.pop();continue}i=w.call(g,a)}catch(l){i=[6,l],u=0}finally{p=f=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([s,r])}}};Object.defineProperty(A,"__esModule",{value:!0}),A.fetchArrayBuffer=void 0,A.fetchArrayBuffer=function(g,w){return w===void 0&&(w=fetch),h(this,void 0,void 0,function(){var p;return m(this,function(u){switch(u.label){case 0:return[4,w(g)];case 1:return(p=u.sent()).ok?[4,p.arrayBuffer()]:[2,void 0];case 2:return[2,u.sent()]}})})}},9651:function(B,A,h){var m=this&&this.__read||function(f,c){var a=typeof Symbol=="function"&&f[Symbol.iterator];if(!a)return f;var n,s,r=a.call(f),i=[];try{for(;(c===void 0||c-- >0)&&!(n=r.next()).done;)i.push(n.value)}catch(l){s={error:l}}finally{try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(s)throw s.error}}return i};Object.defineProperty(A,"__esModule",{value:!0}),A.getEventFromPromise=A.getPromiseFromEvent=A.createCancelablePromise=A.pairToPromise=A.cancelPromise=A.isPromiseCancelable=A.getPromiseCancel=A.setPromiseCancel=void 0;var g=h(1662),w=h(7372);function p(f,c){(0,g.getExtProp)(f,"_promise_cancel")&&console.warn("setPromiseCancel warn: promise has cancelFunc!"),(0,g.setExtProp)(f,"_promise_cancel",c)}function u(f){return(0,g.getExtProp)(f,"_promise_cancel")}A.setPromiseCancel=p,A.getPromiseCancel=u,A.isPromiseCancelable=function(f){return!!u(f)},A.cancelPromise=function(f,c){var a=u(f);return!!a&&(a(c),!0)},A.pairToPromise=function(f){var c=m(f,2),a=c[0],n=c[1];return p(n,a),n},A.createCancelablePromise=function(f){var c,a=new Promise(function(n,s){c=s,f.then(n).catch(s)});return p(a,c),a},A.getPromiseFromEvent=function(f){var c,a,n=new Promise(function(s,r){a=f.disposableOn(function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];a&&a(),s(i)}),c=function(i){a&&a(),r(i)}});return[c,n]},A.getEventFromPromise=function(f){var c=new w.Event,a=new w.Event;return f.then(function(n){c.isDestroyed()||c.emit(n)}).catch(function(n){a.isDestroyed()||a.emit(n)}),[c,a]}},9704:(B,A,h)=>{h.r(A),h.d(A,{decompressFrame:()=>u,decompressFrames:()=>f,parseGIF:()=>p});var m=h(4235),g=h(4638),w=h(733);const p=c=>{const a=new Uint8Array(c);return(0,g.parse)((0,w.buildStream)(a),m.A)},u=(c,a,n)=>{if(!c.image)return void console.warn("gif frame does not have associated image.");const{image:s}=c,r=s.descriptor.width*s.descriptor.height;var i=((d,C,_)=>{const E=_;var F,Q,U,T,S,P,I,M,K,W;const L=new Array(_),O=new Array(4096),H=new Array(4096),k=new Array(4097);for(S=1+(Q=1<<(W=d)),F=Q+2,I=-1,U=(1<<(T=W+1))-1,M=0;M<Q;M++)O[M]=0,H[M]=M;var G,D,R,N,X,Y;for(G=D=R=N=X=Y=0,K=0;K<E;){if(N===0){if(D<T){G+=C[Y]<<D,D+=8,Y++;continue}if(M=G&U,G>>=T,D-=T,M>F||M==S)break;if(M==Q){U=(1<<(T=W+1))-1,F=Q+2,I=-1;continue}if(I==-1){k[N++]=H[M],I=M,R=M;continue}for(P=M,M==F&&(k[N++]=R,M=I);M>Q;)k[N++]=H[M],M=O[M];R=255&H[M],k[N++]=R,F<4096&&(O[F]=I,H[F]=R,!(++F&U)&&F<4096&&(T++,U+=F)),I=P}N--,L[X++]=k[N],K++}for(K=X;K<E;K++)L[K]=0;return L})(s.data.minCodeSize,s.data.blocks,r);s.descriptor.lct.interlaced&&(i=((d,C)=>{const _=new Array(d.length),b=d.length/C,E=function(P,I){const M=d.slice(I*C,(I+1)*C);_.splice.apply(_,[P*C,C].concat(M))},F=[0,4,2,1],Q=[8,8,4,2];for(var U=0,T=0;T<4;T++)for(var S=F[T];S<b;S+=Q[T])E(S,U),U++;return _})(i,s.descriptor.width));const l={pixels:i,dims:{top:c.image.descriptor.top,left:c.image.descriptor.left,width:c.image.descriptor.width,height:c.image.descriptor.height}};return s.descriptor.lct&&s.descriptor.lct.exists?l.colorTable=s.lct:l.colorTable=a,c.gce&&(l.delay=10*(c.gce.delay||10),l.disposalType=c.gce.extras.disposal,c.gce.extras.transparentColorGiven&&(l.transparentIndex=c.gce.transparentColorIndex)),n&&(l.patch=(d=>{const C=d.pixels.length,_=new Uint8ClampedArray(4*C);for(var b=0;b<C;b++){const E=4*b,F=d.pixels[b],Q=d.colorTable[F]||[0,0,0];_[E]=Q[0],_[E+1]=Q[1],_[E+2]=Q[2],_[E+3]=F!==d.transparentIndex?255:0}return _})(l)),l},f=(c,a)=>c.frames.filter(n=>n.image).map(n=>u(n,c.gct,a))},9812:function(B,A,h){var m=this&&this.__values||function(a){var n=typeof Symbol=="function"&&Symbol.iterator,s=n&&a[n],r=0;if(s)return s.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&r>=a.length&&(a=void 0),{value:a&&a[r++],done:!a}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(A,"__esModule",{value:!0}),A.CullingVolume=void 0;var g=h(4416),w=h(312),p=h(6172),u=h(7215),f=h(8703),c=function(){function a(n){n===void 0&&(n=[]),this.planes=n}return a.fromProjectionMatrix=function(n,s){return(0,f._getCullingVolumeFromProjectionMatrix)(n,s)},a.prototype.computeVisibilityWithPlaneMask=function(n,s,r){if(r===a.MASK_OUTSIDE||r===a.MASK_INSIDE)return r;var i=a.MASK_INSIDE,l=this.planes;if(l)for(var d=0,C=l.length;d<C;++d){var _=d<31?1<<d:0;if(!(d<31)||r&_){var b=void 0;if(n==="box"?b=p.OrientedBoundingBox.intersectPlane(s,l[d]):n==="sphere"&&(b=g.BoundingSphere.intersectPlane(s,l[d])),b===w.Intersect.OUTSIDE)return a.MASK_OUTSIDE;b===w.Intersect.INTERSECTING&&(i|=_)}}return i},a.prototype.transform=function(n){var s,r;try{for(var i=m(this.planes),l=i.next();!l.done;l=i.next()){var d=l.value;u.Plane.transform(d,n,d)}}catch(C){s={error:C}}finally{try{l&&!l.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}},a.MASK_OUTSIDE=4294967295,a.MASK_INSIDE=0,a.MASK_INDETERMINATE=2147483647,a}();A.CullingVolume=c,A.default=c},9815:function(B,A,h){var m,g=this&&this.__extends||(m=function(n,s){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(r[l]=i[l])},m(n,s)},function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function r(){this.constructor=n}m(n,s),n.prototype=s===null?Object.create(s):(r.prototype=s.prototype,new r)});Object.defineProperty(A,"__esModule",{value:!0}),A.Gif=void 0;var w=h(1662),p=h(5819),u=h(5819),f=h(7118),c=h(5281),a=function(n){function s(r){var i=n.call(this)||this;return i._url=i.disposeVar((0,w.react)("")),i._loadGifFramesProcessing=i.disposeVar((0,u.createProcessingFromPromiseCreateFunc)(function(l){return(0,p.createCancelablePromise)((0,c.loadGifFrames)(l))})),i._player=i.disposeVar(new f.GifPlayer(r)),i._player.autoPlayOnLoad=!0,i._loadGifFramesProcessing.completeFunc=function(l){var d=l.gifFrames;return i._player.gifFrames=d},i.dispose(i._url.changed.disposableOn(function(l){i._player.gifFrames=void 0,i._loadGifFramesProcessing.restart(new p.CancelError("reload gif(".concat(l,")")),l)})),i}return g(s,n),Object.defineProperty(s.prototype,"player",{get:function(){return this._player},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"url",{get:function(){return this._url.value},set:function(r){this._url.value=r},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"loadedEvent",{get:function(){return this._loadGifFramesProcessing.completeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"size",{get:function(){return this._player.gifSize},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"sizeChanged",{get:function(){return this._player.gifSizeChanged},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"duration",{get:function(){return this._player.gifDuration},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"durationChanged",{get:function(){return this._player.gifDurationChanged},enumerable:!1,configurable:!0}),s}(w.Destroyable);A.Gif=a},9898:function(B,A,h){var m=this&&this.__generator||function(w,p){var u,f,c,a,n={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(r){return function(i){return function(l){if(u)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(u=1,f&&(c=2&l[0]?f.return:l[0]?f.throw||((c=f.return)&&c.call(f),0):f.next)&&!(c=c.call(f,l[1])).done)return c;switch(f=0,c&&(l=[2&l[0],c.value]),l[0]){case 0:case 1:c=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,f=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(!((c=(c=n.trys).length>0&&c[c.length-1])||l[0]!==6&&l[0]!==2)){n=0;continue}if(l[0]===3&&(!c||l[1]>c[0]&&l[1]<c[3])){n.label=l[1];break}if(l[0]===6&&n.label<c[1]){n.label=c[1],c=l;break}if(c&&n.label<c[2]){n.label=c[2],n.ops.push(l);break}c[2]&&n.ops.pop(),n.trys.pop();continue}l=p.call(w,n)}catch(d){l=[6,d],f=0}finally{u=c=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([r,i])}}};Object.defineProperty(A,"__esModule",{value:!0}),A.Vector=void 0;var g=h(2731);(function(w){function p(D,R){for(var N=D.length,X=0;X<N;++X)if(!R(D[X],X))return!1;return!0}function u(D,R,N){for(var X=D.length,Y=N,Z=0;Z<X;++Z)Y=R(Y,D[Z],Z);return Y}w.set=function(D){for(var R=[],N=1;N<arguments.length;N++)R[N-1]=arguments[N];if(D=D||(0,g.createNumbers)(R.length),R.length>D.length)throw new Error("args.length > target.length");return D instanceof Float64Array?D.set(R):T(R,D),D},w.every=p,w.reduce=u,w.itr=function(D){var R;return m(this,function(N){switch(N.label){case 0:R=0,N.label=1;case 1:return R<D.length?[4,D[R]]:[3,4];case 2:N.sent(),N.label=3;case 3:return++R,[3,1];case 4:return[2]}})};var f,c=function(D,R){return D+R*R};function a(D){return u(D,c,0)}w.magnitudeSquared=a,w.magnitude=function(D){var R=a(D);return Math.sqrt(R)},w.isNormalized=function(D,R){R===void 0&&(R=1e-5);var N=a(D);return Math.abs(N-1)<R};var n,s=function(D,R,N){return D+R*f[N]};w.dot=function(D,R){return E(D,R),f=R,u(D,s,0)};var r,i=function(D,R,N){return D+(R-n[N])*(R-n[N])};function l(D,R){return E(D,R),n=R,u(D,i,0)}w.distanceSquared=l,w.distance=function(D,R){return Math.sqrt(l(D,R))};var d,C,_=function(D,R){return D===r[R]};w.equals=function(D,R){return E(D,R),r=R,p(D,_)};var b=function(D,R){return Math.abs(D-d[R])<C};function E(D,R){if(D.length!==R.length)throw new Error("left.length !== right.length")}function F(D,R,N){var X=D.length;E(D,N=N||(0,g.createNumbers)(X));for(var Y=0;Y<X;++Y)N[Y]=R(D[Y],Y);return N}function Q(D,R,N,X){E(D,R),X&&E(D,X);var Y=D.length;X=X||(0,g.createNumbers)(Y);for(var Z=0;Z<Y;++Z)X[Z]=N(D[Z],R[Z]);return X}w.equalsEpsilon=function(D,R,N){return N===void 0&&(N=0),E(D,R),d=R,C=N,p(D,b)},w.op1=F,w.op2=Q;var U=function(D){return D};function T(D,R){return F(D,U,R)}w.clone=T;var S=0,P=function(D,R){return D*S};function I(D,R,N){return S=R,F(D,P,N)}w.multiplyByScalar=I,w.normalize=function(D,R,N){N===void 0&&(N=0);var X=a(D);if(!(X<=N))return I(D,1/Math.sqrt(X),R)},w.negate=function(D,R){return I(D,-1,R)};var M=function(D){return Math.abs(D)};w.abs=function(D,R){return F(D,M,R)};var K=function(D){return D-Math.floor(D)};w.fract=function(D,R){return F(D,K,R)};var W=function(D,R){return D-R};w.subtract=function(D,R,N){return Q(D,R,W,N)};var L=function(D,R){return D+R};w.add=function(D,R,N){return Q(D,R,L,N)};var O=function(D,R){return D*R};w.multiply=function(D,R,N){return Q(D,R,O,N)};var H,k=function(D,R){return D/R};w.divide=function(D,R,N){return Q(D,R,k,N)};var G=function(D,R){return D*(1-H)+R*H};w.lerp=function(D,R,N,X){return H=N,Q(D,R,G,X)}})(A.Vector||(A.Vector={}))},9910:(B,A,h)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.destroyScalableArray=A.createScalableArray=void 0;var m=h(1085),g=function(){function u(){this._array=[]}return Object.defineProperty(u.prototype,"array",{get:function(){return this._array},enumerable:!1,configurable:!0}),u}(),w=new m.ObjPool(function(){return new g}),p=new WeakMap;A.createScalableArray=function(){var u=w.create();return p.set(u.array,u),u.array},A.destroyScalableArray=function(u){var f=p.get(u);if(!f)throw console.warn("!obj"),new Error("!obj");w.destroy(f)}},9928:(B,A,h)=>{function m(g,w,p,u,f){this._format=g,this._width=w,this._height=p,this._buffer=u,this._mipLevels=f}h.r(A),h.d(A,{CompressedTextureBuffer:()=>m}),Object.defineProperties(m.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},mipLevels:{get:function(){return this._mipLevels}}}),m.clone=function(g){if(g)return new m(g._format,g._width,g._height,g._buffer,g._mipLevels)},m.prototype.clone=function(){return m.clone(this)}},9970:(B,A)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.nodeBufferToUint8Array=void 0,A.nodeBufferToUint8Array=function(h){return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)}},9972:function(B,A,h){var m=this&&this.__read||function(a,n){var s=typeof Symbol=="function"&&a[Symbol.iterator];if(!s)return a;var r,i,l=s.call(a),d=[];try{for(;(n===void 0||n-- >0)&&!(r=l.next()).done;)d.push(r.value)}catch(C){i={error:C}}finally{try{r&&!r.done&&(s=l.return)&&s.call(l)}finally{if(i)throw i.error}}return d},g=this&&this.__spreadArray||function(a,n,s){if(s||arguments.length===2)for(var r,i=0,l=n.length;i<l;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return a.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(A,"__esModule",{value:!0}),A.createFetchingWithStartValues=A.createFetching=A.cancelableFetch=A.cancelableFetchWithProgress=void 0;var w=h(5726),p=h(9651),u=h(921);function f(a){for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var r=new AbortController,i=r.signal,l=m(n,2),d=l[0],C=l[1];if(C!=null&&C.signal)throw console.error("init?.signal"),new Error("init?.signal");(C=C||{}).signal&&console.warn("revocableFetch error: init.signal would be override!"),C.signal=i;var _=!1,b=fetch(d,C);return a&&(b=b.then(function(E){if(!E.ok)return E;if(!E.body)throw Error("ReadableStream not yet supported in this browser.");var F=E.headers.get("content-length");F||console.warn("response.headers.get('content-length') is undefined... cannot get contentLength!");var Q=F?parseInt(F,10):0,U=0;return new Response(new ReadableStream({start:function(T){if(!E.body)throw new Error("!response.body");var S=E.body.getReader();(function P(){S.read().then(function(I){var M=I.done,K=I.value;if(M)T.close();else{if(!K)throw new Error("!value");if(!a)throw new Error("!progressFunc");U+=K.byteLength,a(U,Q),T.enqueue(K),P()}}).catch(function(I){T.error(I)})})()}}),{status:E.status,statusText:E.statusText,headers:E.headers})}).catch(function(E){throw _?(E instanceof Error&&E.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new w.CancelError("fetching cancelled! error: ".concat(E))):(E instanceof Error&&E.code===20&&console.error("error.code === 20"),E)})),(0,p.setPromiseCancel)(b,function(){_=!0,r.abort()}),b}function c(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];return f.apply(void 0,g([void 0],m(a),!1))}A.cancelableFetchWithProgress=function(a){for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];return f.apply(void 0,g([a],m(n),!1))},A.cancelableFetch=c,A.createFetching=function(){return(0,u.createProcessingFromPromiseCreateFunc)(c)},A.createFetchingWithStartValues=function(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];return u.createProcessingFromPromiseCreateFuncWithStartValues.apply(void 0,g([c],m(a),!1))}},9986:function(B,A,h){var m,g=this&&this.__extends||(m=function(f,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(a[s]=n[s])},m(f,c)},function(f,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function a(){this.constructor=f}m(f,c),f.prototype=c===null?Object.create(c):(a.prototype=c.prototype,new a)}),w=this&&this.__read||function(f,c){var a=typeof Symbol=="function"&&f[Symbol.iterator];if(!a)return f;var n,s,r=a.call(f),i=[];try{for(;(c===void 0||c-- >0)&&!(n=r.next()).done;)i.push(n.value)}catch(l){s={error:l}}finally{try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(s)throw s.error}}return i};Object.defineProperty(A,"__esModule",{value:!0}),A.PosFloatDiv=void 0;var p=h(7372),u=function(f){function c(){var a=f.call(this)||this;a._originOffsetX=0,a._originOffsetY=0,a._originRatioX=.5,a._originRatioY=1,a._divChanged=new p.Event;var n=document.createElement("div");n.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible;";var s=document.createElement("div");s.style.cssText="position: absolute; left: ".concat(-a._originOffsetX,"px; top: ").concat(-a._originOffsetY,"px; transform: translateX(-").concat(100*a._originRatioX,"%) translateY(-").concat(100*a._originRatioY,"%); margin: 0; padding: 0; pointer-events: none;");var r=document.createElement("div");a._contentDiv=r,s.appendChild(r),n.appendChild(s);var i=function(l){l.stopPropagation()};return n.addEventListener("pointermove",i),n.addEventListener("pointerdown",i),n.addEventListener("pointerup",i),a.dispose(function(){n.removeEventListener("pointermove",i),n.removeEventListener("pointerdown",i),n.removeEventListener("pointerup",i)}),a._div=n,a.dispose(a._divChanged.disposableOn(function(){s.style.left="".concat(-a._originOffsetX,"px"),s.style.top="".concat(-a._originOffsetY,"px"),s.style.transform="translateX(-".concat(100*a._originRatioX,"%) translateY(-").concat(100*a._originRatioY,"%)")})),a.dispose(a.winPosChanged.disposableOn(function(l){var d=w(l,2),C=d[0],_=d[1];a._div.style.left="".concat(C,"px"),a._div.style.top="".concat(_,"px")})),a.dispose(a.opacityChanged.disposableOn(function(l){a._div.style.opacity="".concat(l)})),a.dispose(a.showChanged.disposableOn(function(l){a._div.style.visibility=l?"visible":"hidden"})),a}return g(c,f),Object.defineProperty(c.prototype,"contentDiv",{get:function(){return this._contentDiv},enumerable:!1,configurable:!0}),c.prototype.reset=function(){},Object.defineProperty(c.prototype,"originOffsetX",{get:function(){return this._originOffsetX},set:function(a){this._originOffsetX!==a&&(this._originOffsetX=a,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"originOffsetY",{get:function(){return this._originOffsetY},set:function(a){this._originOffsetY!==a&&(this._originOffsetY=a,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"originRatioX",{get:function(){return this._originRatioX},set:function(a){this._originRatioX!==a&&(this._originRatioX=a,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"originRatioY",{get:function(){return this._originRatioY},set:function(a){this._originRatioY!==a&&(this._originRatioY=a,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"element",{get:function(){return this._div},enumerable:!1,configurable:!0}),c}(h(7324).FloatDiv);A.PosFloatDiv=u}},o={};function y(B){var A=o[B];if(A!==void 0)return A.exports;var h=o[B]={exports:{}};return t[B].call(h.exports,h,h.exports,y),h.exports}return y.n=B=>{var A=B&&B.__esModule?()=>B.default:()=>B;return y.d(A,{a:A}),A},y.d=(B,A)=>{for(var h in A)y.o(A,h)&&!y.o(B,h)&&Object.defineProperty(B,h,{enumerable:!0,get:A[h]})},y.o=(B,A)=>Object.prototype.hasOwnProperty.call(B,A),y.r=B=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},y(4221)})())}(rt)),rt.exports}var V=Ku();const Nu={...j.ESViewer.defaults,geoReferenceOrigin:void 0,keepWorldOriginNearCamera:!1,useCache:!0,widgetInteractionDistance:200,memReportInterval:10,sceneControlled:!0,brightness:0,emissiveIntensity:1,statusUpdateInterval:.5,baseUrl:window.location.href??""},Ss=()=>({...j.ESViewer.createCommonProps(),apiKey:"",apiUrl:"",secretKey:"",speechVoiceMode:"",geoReferenceOrigin:V.reactArrayWithUndefined(void 0),keepWorldOriginNearCamera:void 0,useCache:void 0,widgetInteractionDistance:void 0,memReportInterval:void 0,sceneControlled:void 0,brightness:void 0,emissiveIntensity:void 0,statusUpdateInterval:void 0,baseUrl:void 0});function VA(){const v=Ss(),e=[];return Object.keys(v).forEach(t=>{e.push(t)}),e}function Zn(v){const{defaults:e}=it,t=VA(),o={};return t.forEach(y=>{o[y]=v[y]??e[y]}),o}const Ht=async(v,e,t,o,y,B="default")=>{const A=await v.callUeFunc({f:"flyTo",p:{id:e,duration:t,flyToParam:o,position:y,flyMode:B}});if(A.error){console.error(A.error);return}return A.re},qn=async(v,e)=>{const t=await v.callUeFunc({f:"destroy",p:{id:e}});return t.error&&console.error(t.error),t},Lt=(v,e)=>{v.callUeFunc({f:"calcFlyToParam",p:{id:e}}).then(t=>{t.error&&console.error("calcFlyToParam:",t.error)}).catch(t=>{console.error("calcFlyToParam:",t)})},Us=(v,e)=>{v.callUeFunc({f:"refreshTileset",p:{id:e}}).then(t=>{t.error&&console.error("refreshTileset:",t.error)}).catch(t=>{console.error("refreshTileset:",t)})},tr=async(v,e,t,o,y,B="default")=>{const A=await v.callUeFunc({f:"flyIn",p:{id:e,position:t,rotation:o,duration:y,flyMode:B}});if(A.error){console.error(A.error);return}return A.re},Ts=async(v,e)=>{if(!v){console.warn("DefaultCameraFlyIn: viewer is undefined");return}const t=await v.callUeFunc({f:"DefaultCameraFlyIn",p:{Duration:e??1}});if(t.error){console.error("DefaultCameraFlyIn:",t.error);return}return t},Is=async v=>{if(!v){console.warn("StartVoice:viewer is undefined");return}const e=await v.callUeFunc({f:"StartVoice",p:{}});if(e.error){console.error("StartVoice:",e.error);return}return e},Ps=async v=>{if(!v){console.warn("StopVoice:viewer is undefined");return}const e=await v.callUeFunc({f:"StopVoice",p:{}});if(e.error){console.error("StopVoice:",e.error);return}return e},xs=async(v,e)=>{if(!v){console.warn("mountPakFiles:viewer is undefined");return}const t=await v.callUeFunc({f:"MountPakFiles",p:{json:e}});if(t.error){console.error("mountPakFiles:",t.error);return}return t},Os=async v=>{if(!v){console.warn("generateMemReport:viewer is undefined");return}const e=await v.callUeFunc({f:"GenerateMemReport",p:{}});if(e.error){console.error("generateMemReport:",e.error);return}return e},ei=async(v,e)=>{const t=await v.callUeFunc({f:"resetWithCurrentCamera",p:{id:e}});return t.error&&console.error("resetWithCurrentCamera:",t.error),t},GA=(v,e,t,o,y)=>{v.callUeFunc({f:"smoothMoveWithRotation",p:{id:e,Destination:t,NewRotation:o,Time:y}}).then(B=>{B.error&&console.error("smoothMoveWithRotation:",B.error)}).catch(B=>{console.error("smoothMoveWithRotation:",B)})},jA=(v,e,t,o,y,B)=>{v.callUeFunc({f:"smoothMoveOnGround",p:{id:e,Lon:t,Lat:o,Ground:y,Time:B}}).then(A=>{A.error&&console.error("smoothMoveOnGround:",A.error)}).catch(A=>{console.error("smoothMoveOnGround:",A)})},WA=(v,e,t,o,y,B,A)=>{v.callUeFunc({f:"smoothMoveWithRotationOnGround",p:{id:e,NewRotation:t,Lon:o,Lat:y,Time:B,Ground:A}}).then(h=>{h.error&&console.error("smoothMoveWithRotationOnGround:",h.error)}).catch(h=>{console.error("smoothMoveWithRotationOnGround:",h)})},Ms=(v,e,t)=>{v.callUeFunc({f:"HighlightFeature",p:{id:e,HlId:t}}).then(o=>{o.error&&console.error("HighlightFeature:",o.error)}).catch(o=>{console.error("HighlightFeature:",o)})},Hs=(v,e,t,o)=>{v.callUeFunc({f:"HighlightFeatureAndFlyTo",p:{id:e,HlId:t,Duration:o}}).then(y=>{y.error&&console.error("HighlightFeatureAndFlyTo:",y.error)}).catch(y=>{console.error("HighlightFeatureAndFlyTo:",y)})},Ls=(v,e,t)=>{v.callUeFunc({f:"SetLayerVisible",p:{id:e,LayerJson:t}}).then(o=>{o.error&&console.error("SetLayerVisible:",o.error)}).catch(o=>{console.error("SetLayerVisible:",o)})},Ds=(v,e,t)=>{v.callUeFunc({f:"SetLayerColor",p:{id:e,LayerJson:t}}).then(o=>{o.error&&console.error("SetLayerColor:",o.error)}).catch(o=>{console.error("SetLayerColor:",o)})},zA=(v,e,t,o)=>{v.callUeFunc({f:"smoothMove",p:{id:e,Destination:t,Time:o}}).then(y=>{y.error&&console.error("smoothMove:",y.error)}).catch(y=>{console.error("smoothMove:",y)})},ti=async(v,e,t,o)=>{const y=await v.callUeFunc({f:"callFunction",p:{id:e,fn:t,p:o}});return y.error&&(console.error("callFunction:",y.error),console.error(`id: ${e} fn: ${t} param: ${o}`)),y.re??void 0},Rs=(v,e,t,o)=>{v.callUeFunc({f:"SetNodePosition",p:{id:e,NodeName:t,NodePosition:o}}).then(y=>{y.error&&console.error("SetNodePosition:",y.error)}).catch(y=>{console.error("SetNodePosition:",y)})},ks=(v,e,t,o)=>{v.callUeFunc({f:"SetNodeRotation",p:{id:e,NodeName:t,NodeRotation:o}}).then(y=>{y.error&&console.error("SetNodeRotation:",y.error)}).catch(y=>{console.error("SetNodeRotation:",y)})},Ks=(v,e,t,o)=>{v.callUeFunc({f:"SetNodeScale",p:{id:e,NodeName:t,NodeScale:o}}).then(y=>{y.error&&console.error("SetNodeScale:",y.error)}).catch(y=>{console.error("SetNodeScale:",y)})},At=async(v,e)=>{const t=await v.callUeFunc({f:"ChangeNavigationMode",p:e});if(t.error){console.error("ChangeNavigationMode:",t.error);return}return t},Ns=async(v,e)=>{const t=await v.callUeFunc({f:"setGlobalProperty",p:e});if(t.error){console.error("setGlobalProperty:",t.error);return}return t},Vs=async v=>{const e=await v.callUeFunc({f:"Quit",p:void 0});if(e.error){console.error("Quit:",e.error);return}return e},Gs=async(v,e,t,o)=>{console.log("pickCallFunc",e,t,o);const y=await v.callUeFunc({f:"pick",p:{screenPosition:e,parentInfo:o}});if(!y.re&&(y.error||y.error=="")){console.error("pick:",y.error==""?"未获取到结果":y.error);return}let B=y.re.id,A;const h=B?j.ESSceneObject.getSceneObject(B):void 0;return A=new j.ESJPickedResult(y.re,h,y.re.features,y.re.add,t,e),h&&Reflect.has(h,"allowPicking")&&Reflect.has(h,"pickedEvent")&&(h.allowPicking??!1)&&h.pickedEvent.emit(A),h&&Reflect.has(h,"allowPicking")&&!h.allowPicking?new j.ESJPickedResult:A},js=async(v,e)=>{const t=await v.callUeFunc({f:"pickPosition",p:{screenPosition:e}});if(!t.re&&(t.error||t.error=="")){console.error("pickPosition",t.error==""?"未获取到结果":t.error);return}const{position:o}=t.re;return o},Ws=async(v,e,t,o="ECC_Visibility")=>{const y=await v.callUeFunc({f:"GetHeightByLonLat",p:{Lon:e,Lat:t,Channel:o}});if(y.error){console.warn(`GetHeightByLonLat:${y.error}`);return}return y.re},zs=async(v,e,t="ECC_Visibility")=>{const o=await v.callUeFunc({f:"GetHeightsByLonLats",p:{LonLats:e,Channel:t}});if(o.error){console.warn(`GetHeightsByLonLats:${o.error}`);return}o.re.heights.includes(null)&&console.warn("注意! GetHeightsByLonLats: 存在高度为null的点. there are points with a height of null");try{return o.re.heights}catch{return}},Js=async(v,e=64,t=64)=>{const o=await v.callUeFunc({f:"capture",p:{resx:e,resy:t}});if(o.error){console.warn(o.error);return}return o.re.image},Xs=async(v,e,t=[64,64])=>{const o=await v.callUeFunc({f:"partialCapture",p:{startPos:e,size:t}});if(o.error){console.warn(o.error);return}return o.re.image},Ys=async(v,e)=>{const t=await v.callUeFunc({f:"LonLatAltToScreenPosition",p:{LonLatAlt:e}});return t.error&&console.warn(t.error),t.re},$s=async(v,e)=>{const t=await v.callUeFunc({f:"UEPositionToLonLatAlt",p:{UEPosition:e}});if(t.error){console.warn(t.error);return}return[...t.re.LonLatAlt]},Zs=async(v,e)=>{const t=await v.callUeFunc({f:"GetAllSocketNamesByActorTag",p:{ActorTag:e}});if(t.error){console.warn(t.error);return}return[...t.re.socketNames]},qs=async v=>{const e=await v.callUeFunc({f:"GetVersion",p:void 0});if(e.error){console.warn("GetVersion:",e.error);return}return e.re.version},ea=async(v,e)=>{const t=await v.callUeFunc({f:"GetBoundSphere",p:{id:e}});if(t.error){console.warn(t.error);return}return t.re},ta=async(v,e)=>{const t=await v.callUeFunc({f:"GetBoundSphereWithChildren",p:{id:e}});if(t.error){console.warn(`GetBoundSphereWithChildren:${t.error}`);return}return t.re},ra=async(v,e)=>{const t=await v.callUeFunc({f:"GetStrokeMaterialParamInfo",p:{id:e}});if(t.error){console.warn(`GetStrokeMaterialParamInfo:${t.error}`);return}return t.re},Aa=async(v,e)=>{const t=await v.callUeFunc({f:"GetFillMaterialParamInfo",p:{id:e}});if(t.error){console.warn(`GetFillMaterialParamInfo:${t.error}`);return}return t.re},na=async(v,e)=>{const t=await v.callUeFunc({f:"getGlobalProperty",p:{props:e}});if(t.error){console.warn(`getGlobalProperty:${t.error}`);return}return t.re},ia=async(v,e)=>{const t=await v.callUeFunc({f:"GetObjectByInfo",p:{info:e}});if(t.error){console.warn(`GetObjectByInfo:${t.error}`);return}return t.re},oa=async(v,e,t)=>await v.callUeFunc({f:"BindActorByTag",p:{ID:e,ActorTag:t}}),sa=async v=>await v.callUeFunc({f:"RestoreOriginalScene",p:void 0}),aa=async(v,e)=>await v.callUeFunc({f:"UnBindActorByID",p:{ID:e}}),ca=async(v,e)=>await v.callUeFunc({f:"UnBindActorByTag",p:{ActorTag:e}}),la=async(v,e,t)=>await v.callUeFunc({f:"CreateActorByClass",p:{ID:e,ActorClass:t}}),ua=async function(v,e,t){return await v.callUeFunc({f:"Bind3DTilesetByTag",p:{ID:e,ActorTag:t}})},da=async function(v,e){return await v.callUeFunc({f:"UnBind3DTilesetByTag",p:{ActorTag:e}})},fa=async function(v,e){return await v.callUeFunc({f:"UnBind3DTilesetById",p:{ID:e}})},ha=async function(v,e,t,o){return await v.callUeFunc({f:"BindImageryByTag",p:{ID:e,ActorTag:t,ComponentTag:o}})},pa=async function(v,e,t){return await v.callUeFunc({f:"UnBindImageryByTag",p:{ActorTag:e,ComponentTag:t}})},ga=async function(v,e){return await v.callUeFunc({f:"UnBindImageryById",p:{ID:e}})},va=async function(v,e,t,o){return await v.callUeFunc({f:"GetIdByComponentNameAndHitItem",p:{id:e,ComponentName:t,HitItem:o}})},ya=async function(v,e="ECC_Visibility"){return await v.callUeFunc({f:"GetCameraRelativeHeight",p:{Channel:e}})},ma=async function(v,e,t,o){const y=await v.callUeFunc({f:"SaveStringToFile",p:{String:e,Path:t??"undefine",File:o??"data.txt"}});return y.error!==""&&console.warn("SaveStringToFile: ",y.error),y},wa=async function(v,e,t=!0){const o=await v.callUeFunc({f:"HighlightActorByTag",p:{ActorTag:e,Highlight:t}});return o.error!==""&&console.warn("HighlightActorByTag: ",o.error),o},Ba=async function(v,e){const t=await v.callUeFunc({f:"SendCustomMessage",p:{Message:e}});return t.error!==""&&console.warn("SendCustomMessage: ",t.error),t},Ca=async function(v){const e=await v.callUeFunc({f:"GetStatus",p:void 0});if(e.error){console.warn(`GetStatus:${e.error}`);return}return e.re},ba=async(v,e,t,o,y=!0)=>{const B=await v.callUeFunc({f:"startEditing",p:{sceneObjectID:e,editingID:t,modes:o,useKeyToSwitch:y}});if(B.error){console.error("startEditing:",B.error);return}return B},_a=async v=>{const e=await v.callUeFunc({f:"stopEditing",p:void 0});if(e.error){console.error("stopEditing:",e.error);return}return e},Ea=async(v,e,t)=>{const o=await v.callUeFunc({f:"moveObjects",p:{sceneObjectIDs:e,editingID:t}});if(o.error){console.error("moveObjects:",o.error);return}return o},Fa=async v=>{const e=await v.callUeFunc({f:"GetTilesetMaterialIDList",p:void 0});if(e.error){console.error("GetTilesetMaterialIDList:",e.error);return}return e.re.materialIDList};class rr extends V.Destroyable{}var ri={exports:{}},Qa;function Vu(){return Qa||(Qa=1,function(v){const e={};e.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},e.localCName=e.generateIdentifier(),e.splitLines=function(t){return t.trim().split(`
|
|
229
229
|
`).map(o=>o.trim())},e.splitSections=function(t){return t.split(`
|
|
230
230
|
m=`).map((y,B)=>(B>0?"m="+y:y).trim()+`\r
|
|
231
231
|
`)},e.getDescription=function(t){const o=e.splitSections(t);return o&&o[0]},e.getMediaSections=function(t){const o=e.splitSections(t);return o.shift(),o},e.matchPrefix=function(t,o){return e.splitLines(t).filter(y=>y.indexOf(o)===0)},e.parseCandidate=function(t){let o;t.indexOf("a=candidate:")===0?o=t.substring(12).split(" "):o=t.substring(10).split(" ");const y={foundation:o[0],component:{1:"rtp",2:"rtcp"}[o[1]]||o[1],protocol:o[2].toLowerCase(),priority:parseInt(o[3],10),ip:o[4],address:o[4],port:parseInt(o[5],10),type:o[7]};for(let B=8;B<o.length;B+=2)switch(o[B]){case"raddr":y.relatedAddress=o[B+1];break;case"rport":y.relatedPort=parseInt(o[B+1],10);break;case"tcptype":y.tcpType=o[B+1];break;case"ufrag":y.ufrag=o[B+1],y.usernameFragment=o[B+1];break;default:y[o[B]]===void 0&&(y[o[B]]=o[B+1]);break}return y},e.writeCandidate=function(t){const o=[];o.push(t.foundation);const y=t.component;y==="rtp"?o.push(1):y==="rtcp"?o.push(2):o.push(y),o.push(t.protocol.toUpperCase()),o.push(t.priority),o.push(t.address||t.ip),o.push(t.port);const B=t.type;return o.push("typ"),o.push(B),B!=="host"&&t.relatedAddress&&t.relatedPort&&(o.push("raddr"),o.push(t.relatedAddress),o.push("rport"),o.push(t.relatedPort)),t.tcpType&&t.protocol.toLowerCase()==="tcp"&&(o.push("tcptype"),o.push(t.tcpType)),(t.usernameFragment||t.ufrag)&&(o.push("ufrag"),o.push(t.usernameFragment||t.ufrag)),"candidate:"+o.join(" ")},e.parseIceOptions=function(t){return t.substring(14).split(" ")},e.parseRtpMap=function(t){let o=t.substring(9).split(" ");const y={payloadType:parseInt(o.shift(),10)};return o=o[0].split("/"),y.name=o[0],y.clockRate=parseInt(o[1],10),y.channels=o.length===3?parseInt(o[2],10):1,y.numChannels=y.channels,y},e.writeRtpMap=function(t){let o=t.payloadType;t.preferredPayloadType!==void 0&&(o=t.preferredPayloadType);const y=t.channels||t.numChannels||1;return"a=rtpmap:"+o+" "+t.name+"/"+t.clockRate+(y!==1?"/"+y:"")+`\r
|
|
@@ -336,10 +336,10 @@ Msg: ${t}`;console.warn(o)}};x.verboseLogLevel=5,function(v){v.LIST_STREAMERS="l
|
|
|
336
336
|
content: "" !important;
|
|
337
337
|
display: none !important;
|
|
338
338
|
}`,Wv=function(v){zv(v,"."+Fo+Gv+Eu+`
|
|
339
|
-
.`+Qo+jv+Eu)},zv=function(v,e){var t=v.ownerDocument;if(t){var o=t.createElement("style");o.textContent=e,v.appendChild(o)}},Fu=function(){function v(){}return v.getOrigin=function(e){var t=v._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},v.isSameOrigin=function(e){return v.getOrigin(e)===v._origin},v.setContext=function(e){v._link=e.document.createElement("a"),v._origin=v.getOrigin(e.location.href)},v._origin="about:blank",v}(),Jv=function(){function v(e,t){this.context=e,this._options=t,this._cache={}}return v.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Uo(e)||Zv(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},v.prototype.match=function(e){return this._cache[e]},v.prototype.loadImage=function(e){return Re(this,void 0,void 0,function(){var t,o,y,B,A=this;return xe(this,function(h){switch(h.label){case 0:return t=Fu.isSameOrigin(e),o=!So(e)&&this._options.useCORS===!0&&Ie.SUPPORT_CORS_IMAGES&&!t,y=!So(e)&&!t&&!Uo(e)&&typeof this._options.proxy=="string"&&Ie.SUPPORT_CORS_XHR&&!o,!t&&this._options.allowTaint===!1&&!So(e)&&!Uo(e)&&!y&&!o?[2]:(B=e,y?[4,this.proxy(B)]:[3,2]);case 1:B=h.sent(),h.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(m,g){var w=new Image;w.onload=function(){return m(w)},w.onerror=g,(qv(B)||o)&&(w.crossOrigin="anonymous"),w.src=B,w.complete===!0&&setTimeout(function(){return m(w)},500),A._options.imageTimeout>0&&setTimeout(function(){return g("Timed out ("+A._options.imageTimeout+"ms) loading image")},A._options.imageTimeout)})];case 3:return[2,h.sent()]}})})},v.prototype.has=function(e){return typeof this._cache[e]<"u"},v.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},v.prototype.proxy=function(e){var t=this,o=this._options.proxy;if(!o)throw new Error("No proxy defined");var y=e.substring(0,256);return new Promise(function(B,A){var h=Ie.SUPPORT_RESPONSE_TYPE?"blob":"text",m=new XMLHttpRequest;m.onload=function(){if(m.status===200)if(h==="text")B(m.response);else{var p=new FileReader;p.addEventListener("load",function(){return B(p.result)},!1),p.addEventListener("error",function(u){return A(u)},!1),p.readAsDataURL(m.response)}else A("Failed to proxy resource "+y+" with status code "+m.status)},m.onerror=A;var g=o.indexOf("?")>-1?"&":"?";if(m.open("GET",""+o+g+"url="+encodeURIComponent(e)+"&responseType="+h),h!=="text"&&m instanceof XMLHttpRequest&&(m.responseType=h),t._options.imageTimeout){var w=t._options.imageTimeout;m.timeout=w,m.ontimeout=function(){return A("Timed out ("+w+"ms) proxying "+y)}}m.send()})},v}(),Xv=/^data:image\/svg\+xml/i,Yv=/^data:image\/.*;base64,/i,$v=/^data:image\/.*/i,Zv=function(v){return Ie.SUPPORT_SVG_DRAWING||!ey(v)},So=function(v){return $v.test(v)},qv=function(v){return Yv.test(v)},Uo=function(v){return v.substr(0,4)==="blob"},ey=function(v){return v.substr(-3).toLowerCase()==="svg"||Xv.test(v)},q=function(){function v(e,t){this.type=0,this.x=e,this.y=t}return v.prototype.add=function(e,t){return new v(this.x+e,this.y+t)},v}(),Yt=function(v,e,t){return new q(v.x+(e.x-v.x)*t,v.y+(e.y-v.y)*t)},Kn=function(){function v(e,t,o,y){this.type=1,this.start=e,this.startControl=t,this.endControl=o,this.end=y}return v.prototype.subdivide=function(e,t){var o=Yt(this.start,this.startControl,e),y=Yt(this.startControl,this.endControl,e),B=Yt(this.endControl,this.end,e),A=Yt(o,y,e),h=Yt(y,B,e),m=Yt(A,h,e);return t?new v(this.start,o,A,m):new v(m,h,B,this.end)},v.prototype.add=function(e,t){return new v(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},v.prototype.reverse=function(){return new v(this.end,this.endControl,this.startControl,this.start)},v}(),We=function(v){return v.type===1},ty=function(){function v(e){var t=e.styles,o=e.bounds,y=yr(t.borderTopLeftRadius,o.width,o.height),B=y[0],A=y[1],h=yr(t.borderTopRightRadius,o.width,o.height),m=h[0],g=h[1],w=yr(t.borderBottomRightRadius,o.width,o.height),p=w[0],u=w[1],f=yr(t.borderBottomLeftRadius,o.width,o.height),c=f[0],a=f[1],n=[];n.push((B+m)/o.width),n.push((c+p)/o.width),n.push((A+a)/o.height),n.push((g+u)/o.height);var s=Math.max.apply(Math,n);s>1&&(B/=s,A/=s,m/=s,g/=s,p/=s,u/=s,c/=s,a/=s);var r=o.width-m,i=o.height-u,l=o.width-p,d=o.height-a,C=t.borderTopWidth,_=t.borderRightWidth,b=t.borderBottomWidth,E=t.borderLeftWidth,F=pe(t.paddingTop,e.bounds.width),Q=pe(t.paddingRight,e.bounds.width),U=pe(t.paddingBottom,e.bounds.width),T=pe(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=B>0||A>0?ve(o.left+E/3,o.top+C/3,B-E/3,A-C/3,le.TOP_LEFT):new q(o.left+E/3,o.top+C/3),this.topRightBorderDoubleOuterBox=B>0||A>0?ve(o.left+r,o.top+C/3,m-_/3,g-C/3,le.TOP_RIGHT):new q(o.left+o.width-_/3,o.top+C/3),this.bottomRightBorderDoubleOuterBox=p>0||u>0?ve(o.left+l,o.top+i,p-_/3,u-b/3,le.BOTTOM_RIGHT):new q(o.left+o.width-_/3,o.top+o.height-b/3),this.bottomLeftBorderDoubleOuterBox=c>0||a>0?ve(o.left+E/3,o.top+d,c-E/3,a-b/3,le.BOTTOM_LEFT):new q(o.left+E/3,o.top+o.height-b/3),this.topLeftBorderDoubleInnerBox=B>0||A>0?ve(o.left+E*2/3,o.top+C*2/3,B-E*2/3,A-C*2/3,le.TOP_LEFT):new q(o.left+E*2/3,o.top+C*2/3),this.topRightBorderDoubleInnerBox=B>0||A>0?ve(o.left+r,o.top+C*2/3,m-_*2/3,g-C*2/3,le.TOP_RIGHT):new q(o.left+o.width-_*2/3,o.top+C*2/3),this.bottomRightBorderDoubleInnerBox=p>0||u>0?ve(o.left+l,o.top+i,p-_*2/3,u-b*2/3,le.BOTTOM_RIGHT):new q(o.left+o.width-_*2/3,o.top+o.height-b*2/3),this.bottomLeftBorderDoubleInnerBox=c>0||a>0?ve(o.left+E*2/3,o.top+d,c-E*2/3,a-b*2/3,le.BOTTOM_LEFT):new q(o.left+E*2/3,o.top+o.height-b*2/3),this.topLeftBorderStroke=B>0||A>0?ve(o.left+E/2,o.top+C/2,B-E/2,A-C/2,le.TOP_LEFT):new q(o.left+E/2,o.top+C/2),this.topRightBorderStroke=B>0||A>0?ve(o.left+r,o.top+C/2,m-_/2,g-C/2,le.TOP_RIGHT):new q(o.left+o.width-_/2,o.top+C/2),this.bottomRightBorderStroke=p>0||u>0?ve(o.left+l,o.top+i,p-_/2,u-b/2,le.BOTTOM_RIGHT):new q(o.left+o.width-_/2,o.top+o.height-b/2),this.bottomLeftBorderStroke=c>0||a>0?ve(o.left+E/2,o.top+d,c-E/2,a-b/2,le.BOTTOM_LEFT):new q(o.left+E/2,o.top+o.height-b/2),this.topLeftBorderBox=B>0||A>0?ve(o.left,o.top,B,A,le.TOP_LEFT):new q(o.left,o.top),this.topRightBorderBox=m>0||g>0?ve(o.left+r,o.top,m,g,le.TOP_RIGHT):new q(o.left+o.width,o.top),this.bottomRightBorderBox=p>0||u>0?ve(o.left+l,o.top+i,p,u,le.BOTTOM_RIGHT):new q(o.left+o.width,o.top+o.height),this.bottomLeftBorderBox=c>0||a>0?ve(o.left,o.top+d,c,a,le.BOTTOM_LEFT):new q(o.left,o.top+o.height),this.topLeftPaddingBox=B>0||A>0?ve(o.left+E,o.top+C,Math.max(0,B-E),Math.max(0,A-C),le.TOP_LEFT):new q(o.left+E,o.top+C),this.topRightPaddingBox=m>0||g>0?ve(o.left+Math.min(r,o.width-_),o.top+C,r>o.width+_?0:Math.max(0,m-_),Math.max(0,g-C),le.TOP_RIGHT):new q(o.left+o.width-_,o.top+C),this.bottomRightPaddingBox=p>0||u>0?ve(o.left+Math.min(l,o.width-E),o.top+Math.min(i,o.height-b),Math.max(0,p-_),Math.max(0,u-b),le.BOTTOM_RIGHT):new q(o.left+o.width-_,o.top+o.height-b),this.bottomLeftPaddingBox=c>0||a>0?ve(o.left+E,o.top+Math.min(d,o.height-b),Math.max(0,c-E),Math.max(0,a-b),le.BOTTOM_LEFT):new q(o.left+E,o.top+o.height-b),this.topLeftContentBox=B>0||A>0?ve(o.left+E+T,o.top+C+F,Math.max(0,B-(E+T)),Math.max(0,A-(C+F)),le.TOP_LEFT):new q(o.left+E+T,o.top+C+F),this.topRightContentBox=m>0||g>0?ve(o.left+Math.min(r,o.width+E+T),o.top+C+F,r>o.width+E+T?0:m-E+T,g-(C+F),le.TOP_RIGHT):new q(o.left+o.width-(_+Q),o.top+C+F),this.bottomRightContentBox=p>0||u>0?ve(o.left+Math.min(l,o.width-(E+T)),o.top+Math.min(i,o.height+C+F),Math.max(0,p-(_+Q)),u-(b+U),le.BOTTOM_RIGHT):new q(o.left+o.width-(_+Q),o.top+o.height-(b+U)),this.bottomLeftContentBox=c>0||a>0?ve(o.left+E+T,o.top+d,Math.max(0,c-(E+T)),a-(b+U),le.BOTTOM_LEFT):new q(o.left+E+T,o.top+o.height-(b+U))}return v}(),le;(function(v){v[v.TOP_LEFT=0]="TOP_LEFT",v[v.TOP_RIGHT=1]="TOP_RIGHT",v[v.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",v[v.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(le||(le={}));var ve=function(v,e,t,o,y){var B=4*((Math.sqrt(2)-1)/3),A=t*B,h=o*B,m=v+t,g=e+o;switch(y){case le.TOP_LEFT:return new Kn(new q(v,g),new q(v,g-h),new q(m-A,e),new q(m,e));case le.TOP_RIGHT:return new Kn(new q(v,e),new q(v+A,e),new q(m,g-h),new q(m,g));case le.BOTTOM_RIGHT:return new Kn(new q(m,e),new q(m,e+h),new q(v+A,g),new q(v,g));case le.BOTTOM_LEFT:default:return new Kn(new q(m,g),new q(m-A,g),new q(v,e+h),new q(v,e))}},Nn=function(v){return[v.topLeftBorderBox,v.topRightBorderBox,v.bottomRightBorderBox,v.bottomLeftBorderBox]},ry=function(v){return[v.topLeftContentBox,v.topRightContentBox,v.bottomRightContentBox,v.bottomLeftContentBox]},Vn=function(v){return[v.topLeftPaddingBox,v.topRightPaddingBox,v.bottomRightPaddingBox,v.bottomLeftPaddingBox]},Ay=function(){function v(e,t,o){this.offsetX=e,this.offsetY=t,this.matrix=o,this.type=0,this.target=6}return v}(),Gn=function(){function v(e,t){this.path=e,this.target=t,this.type=1}return v}(),ny=function(){function v(e){this.opacity=e,this.type=2,this.target=6}return v}(),iy=function(v){return v.type===0},Qu=function(v){return v.type===1},oy=function(v){return v.type===2},Su=function(v,e){return v.length===e.length?v.some(function(t,o){return t===e[o]}):!1},sy=function(v,e,t,o,y){return v.map(function(B,A){switch(A){case 0:return B.add(e,t);case 1:return B.add(e+o,t);case 2:return B.add(e+o,t+y);case 3:return B.add(e,t+y)}return B})},Uu=function(){function v(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return v}(),Tu=function(){function v(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new ty(this.container),this.container.styles.opacity<1&&this.effects.push(new ny(this.container.styles.opacity)),this.container.styles.transform!==null){var o=this.container.bounds.left+this.container.styles.transformOrigin[0].number,y=this.container.bounds.top+this.container.styles.transformOrigin[1].number,B=this.container.styles.transform;this.effects.push(new Ay(o,y,B))}if(this.container.styles.overflowX!==0){var A=Nn(this.curves),h=Vn(this.curves);Su(A,h)?this.effects.push(new Gn(A,6)):(this.effects.push(new Gn(A,2)),this.effects.push(new Gn(h,4)))}}return v.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,o=this.parent,y=this.effects.slice(0);o;){var B=o.effects.filter(function(m){return!Qu(m)});if(t||o.container.styles.position!==0||!o.parent){if(y.unshift.apply(y,B),t=[2,3].indexOf(o.container.styles.position)===-1,o.container.styles.overflowX!==0){var A=Nn(o.curves),h=Vn(o.curves);Su(A,h)||y.unshift(new Gn(h,6))}}else y.unshift.apply(y,B);o=o.parent}return y.filter(function(m){return Qe(m.target,e)})},v}(),To=function(v,e,t,o){v.container.elements.forEach(function(y){var B=Qe(y.flags,4),A=Qe(y.flags,2),h=new Tu(y,v);Qe(y.styles.display,2048)&&o.push(h);var m=Qe(y.flags,8)?[]:o;if(B||A){var g=B||y.styles.isPositioned()?t:e,w=new Uu(h);if(y.styles.isPositioned()||y.styles.opacity<1||y.styles.isTransformed()){var p=y.styles.zIndex.order;if(p<0){var u=0;g.negativeZIndex.some(function(c,a){return p>c.element.container.styles.zIndex.order?(u=a,!1):u>0}),g.negativeZIndex.splice(u,0,w)}else if(p>0){var f=0;g.positiveZIndex.some(function(c,a){return p>=c.element.container.styles.zIndex.order?(f=a+1,!1):f>0}),g.positiveZIndex.splice(f,0,w)}else g.zeroOrAutoZIndexOrTransformedOrOpacity.push(w)}else y.styles.isFloating()?g.nonPositionedFloats.push(w):g.nonPositionedInlineLevel.push(w);To(h,w,B?w:t,m)}else y.styles.isInlineLevel()?e.inlineLevel.push(h):e.nonInlineLevel.push(h),To(h,e,t,m);Qe(y.flags,8)&&Iu(y,m)})},Iu=function(v,e){for(var t=v instanceof mo?v.start:1,o=v instanceof mo?v.reversed:!1,y=0;y<e.length;y++){var B=e[y];B.container instanceof ru&&typeof B.container.value=="number"&&B.container.value!==0&&(t=B.container.value),B.listValue=_r(t,B.container.styles.listStyleType,!0),t+=o?-1:1}},ay=function(v){var e=new Tu(v,null),t=new Uu(e),o=[];return To(e,t,t,o),Iu(e.container,o),t},Pu=function(v,e){switch(e){case 0:return ze(v.topLeftBorderBox,v.topLeftPaddingBox,v.topRightBorderBox,v.topRightPaddingBox);case 1:return ze(v.topRightBorderBox,v.topRightPaddingBox,v.bottomRightBorderBox,v.bottomRightPaddingBox);case 2:return ze(v.bottomRightBorderBox,v.bottomRightPaddingBox,v.bottomLeftBorderBox,v.bottomLeftPaddingBox);case 3:default:return ze(v.bottomLeftBorderBox,v.bottomLeftPaddingBox,v.topLeftBorderBox,v.topLeftPaddingBox)}},cy=function(v,e){switch(e){case 0:return ze(v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox,v.topRightBorderBox,v.topRightBorderDoubleOuterBox);case 1:return ze(v.topRightBorderBox,v.topRightBorderDoubleOuterBox,v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox);case 2:return ze(v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox,v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox);case 3:default:return ze(v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox,v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox)}},ly=function(v,e){switch(e){case 0:return ze(v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox,v.topRightBorderDoubleInnerBox,v.topRightPaddingBox);case 1:return ze(v.topRightBorderDoubleInnerBox,v.topRightPaddingBox,v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox);case 2:return ze(v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox,v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox);case 3:default:return ze(v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox,v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox)}},uy=function(v,e){switch(e){case 0:return jn(v.topLeftBorderStroke,v.topRightBorderStroke);case 1:return jn(v.topRightBorderStroke,v.bottomRightBorderStroke);case 2:return jn(v.bottomRightBorderStroke,v.bottomLeftBorderStroke);case 3:default:return jn(v.bottomLeftBorderStroke,v.topLeftBorderStroke)}},jn=function(v,e){var t=[];return We(v)?t.push(v.subdivide(.5,!1)):t.push(v),We(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},ze=function(v,e,t,o){var y=[];return We(v)?y.push(v.subdivide(.5,!1)):y.push(v),We(t)?y.push(t.subdivide(.5,!0)):y.push(t),We(o)?y.push(o.subdivide(.5,!0).reverse()):y.push(o),We(e)?y.push(e.subdivide(.5,!1).reverse()):y.push(e),y},xu=function(v){var e=v.bounds,t=v.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},Wn=function(v){var e=v.styles,t=v.bounds,o=pe(e.paddingLeft,t.width),y=pe(e.paddingRight,t.width),B=pe(e.paddingTop,t.width),A=pe(e.paddingBottom,t.width);return t.add(o+e.borderLeftWidth,B+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+o+y),-(e.borderTopWidth+e.borderBottomWidth+B+A))},dy=function(v,e){return v===0?e.bounds:v===2?Wn(e):xu(e)},fy=function(v,e){return v===0?e.bounds:v===2?Wn(e):xu(e)},Io=function(v,e,t){var o=dy(Zt(v.styles.backgroundOrigin,e),v),y=fy(Zt(v.styles.backgroundClip,e),v),B=hy(Zt(v.styles.backgroundSize,e),t,o),A=B[0],h=B[1],m=yr(Zt(v.styles.backgroundPosition,e),o.width-A,o.height-h),g=py(Zt(v.styles.backgroundRepeat,e),m,B,o,y),w=Math.round(o.left+m[0]),p=Math.round(o.top+m[1]);return[g,w,p,A,h]},$t=function(v){return fe(v)&&v.value===Wt.AUTO},zn=function(v){return typeof v=="number"},hy=function(v,e,t){var o=e[0],y=e[1],B=e[2],A=v[0],h=v[1];if(!A)return[0,0];if(Ee(A)&&h&&Ee(h))return[pe(A,t.width),pe(h,t.height)];var m=zn(B);if(fe(A)&&(A.value===Wt.CONTAIN||A.value===Wt.COVER)){if(zn(B)){var g=t.width/t.height;return g<B!=(A.value===Wt.COVER)?[t.width,t.width/B]:[t.height*B,t.height]}return[t.width,t.height]}var w=zn(o),p=zn(y),u=w||p;if($t(A)&&(!h||$t(h))){if(w&&p)return[o,y];if(!m&&!u)return[t.width,t.height];if(u&&m){var f=w?o:y*B,c=p?y:o/B;return[f,c]}var a=w?o:t.width,n=p?y:t.height;return[a,n]}if(m){var s=0,r=0;return Ee(A)?s=pe(A,t.width):Ee(h)&&(r=pe(h,t.height)),$t(A)?s=r*B:(!h||$t(h))&&(r=s/B),[s,r]}var i=null,l=null;if(Ee(A)?i=pe(A,t.width):h&&Ee(h)&&(l=pe(h,t.height)),i!==null&&(!h||$t(h))&&(l=w&&p?i/o*y:t.height),l!==null&&$t(A)&&(i=w&&p?l/y*o:t.width),i!==null&&l!==null)return[i,l];throw new Error("Unable to calculate background-size for element")},Zt=function(v,e){var t=v[e];return typeof t>"u"?v[0]:t},py=function(v,e,t,o,y){var B=e[0],A=e[1],h=t[0],m=t[1];switch(v){case 2:return[new q(Math.round(o.left),Math.round(o.top+A)),new q(Math.round(o.left+o.width),Math.round(o.top+A)),new q(Math.round(o.left+o.width),Math.round(m+o.top+A)),new q(Math.round(o.left),Math.round(m+o.top+A))];case 3:return[new q(Math.round(o.left+B),Math.round(o.top)),new q(Math.round(o.left+B+h),Math.round(o.top)),new q(Math.round(o.left+B+h),Math.round(o.height+o.top)),new q(Math.round(o.left+B),Math.round(o.height+o.top))];case 1:return[new q(Math.round(o.left+B),Math.round(o.top+A)),new q(Math.round(o.left+B+h),Math.round(o.top+A)),new q(Math.round(o.left+B+h),Math.round(o.top+A+m)),new q(Math.round(o.left+B),Math.round(o.top+A+m))];default:return[new q(Math.round(y.left),Math.round(y.top)),new q(Math.round(y.left+y.width),Math.round(y.top)),new q(Math.round(y.left+y.width),Math.round(y.height+y.top)),new q(Math.round(y.left),Math.round(y.height+y.top))]}},gy="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ou="Hidden Text",vy=function(){function v(e){this._data={},this._document=e}return v.prototype.parseMetrics=function(e,t){var o=this._document.createElement("div"),y=this._document.createElement("img"),B=this._document.createElement("span"),A=this._document.body;o.style.visibility="hidden",o.style.fontFamily=e,o.style.fontSize=t,o.style.margin="0",o.style.padding="0",o.style.whiteSpace="nowrap",A.appendChild(o),y.src=gy,y.width=1,y.height=1,y.style.margin="0",y.style.padding="0",y.style.verticalAlign="baseline",B.style.fontFamily=e,B.style.fontSize=t,B.style.margin="0",B.style.padding="0",B.appendChild(this._document.createTextNode(Ou)),o.appendChild(B),o.appendChild(y);var h=y.offsetTop-B.offsetTop+2;o.removeChild(B),o.appendChild(this._document.createTextNode(Ou)),o.style.lineHeight="normal",y.style.verticalAlign="super";var m=y.offsetTop-o.offsetTop+2;return A.removeChild(o),{baseline:h,middle:m}},v.prototype.getMetrics=function(e,t){var o=e+" "+t;return typeof this._data[o]>"u"&&(this._data[o]=this.parseMetrics(e,t)),this._data[o]},v}(),Mu=function(){function v(e,t){this.context=e,this.options=t}return v}(),yy=1e4,my=function(v){Xe(e,v);function e(t,o){var y=v.call(this,t,o)||this;return y._activeEffects=[],y.canvas=o.canvas?o.canvas:document.createElement("canvas"),y.ctx=y.canvas.getContext("2d"),o.canvas||(y.canvas.width=Math.floor(o.width*o.scale),y.canvas.height=Math.floor(o.height*o.scale),y.canvas.style.width=o.width+"px",y.canvas.style.height=o.height+"px"),y.fontMetrics=new vy(document),y.ctx.scale(y.options.scale,y.options.scale),y.ctx.translate(-o.x,-o.y),y.ctx.textBaseline="bottom",y._activeEffects=[],y.context.logger.debug("Canvas renderer initialized ("+o.width+"x"+o.height+") with scale "+o.scale),y}return e.prototype.applyEffects=function(t){for(var o=this;this._activeEffects.length;)this.popEffect();t.forEach(function(y){return o.applyEffect(y)})},e.prototype.applyEffect=function(t){this.ctx.save(),oy(t)&&(this.ctx.globalAlpha=t.opacity),iy(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Qu(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return Re(this,void 0,void 0,function(){var o;return xe(this,function(y){switch(y.label){case 0:return o=t.element.container.styles,o.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:y.sent(),y.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return Re(this,void 0,void 0,function(){return xe(this,function(o){switch(o.label){case 0:if(Qe(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return o.sent(),[4,this.renderNodeContent(t)];case 2:o.sent(),o.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,o,y){var B=this;if(o===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+y);else{var A=yo(t.text);A.reduce(function(h,m){return B.ctx.fillText(m,h,t.bounds.top+y),h+B.ctx.measureText(m).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var o=t.fontVariant.filter(function(A){return A==="normal"||A==="small-caps"}).join(""),y=_y(t.fontFamily).join(", "),B=vr(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,o,t.fontWeight,B,y].join(" "),y,B]},e.prototype.renderTextNode=function(t,o){return Re(this,void 0,void 0,function(){var y,B,A,h,m,g,w,p,u=this;return xe(this,function(f){return y=this.createFontStyle(o),B=y[0],A=y[1],h=y[2],this.ctx.font=B,this.ctx.direction=o.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",m=this.fontMetrics.getMetrics(A,h),g=m.baseline,w=m.middle,p=o.paintOrder,t.textBounds.forEach(function(c){p.forEach(function(a){switch(a){case 0:u.ctx.fillStyle=Se(o.color),u.renderTextWithLetterSpacing(c,o.letterSpacing,g);var n=o.textShadow;n.length&&c.text.trim().length&&(n.slice(0).reverse().forEach(function(s){u.ctx.shadowColor=Se(s.color),u.ctx.shadowOffsetX=s.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=s.offsetY.number*u.options.scale,u.ctx.shadowBlur=s.blur.number,u.renderTextWithLetterSpacing(c,o.letterSpacing,g)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),o.textDecorationLine.length&&(u.ctx.fillStyle=Se(o.textDecorationColor||o.color),o.textDecorationLine.forEach(function(s){switch(s){case 1:u.ctx.fillRect(c.bounds.left,Math.round(c.bounds.top+g),c.bounds.width,1);break;case 2:u.ctx.fillRect(c.bounds.left,Math.round(c.bounds.top),c.bounds.width,1);break;case 3:u.ctx.fillRect(c.bounds.left,Math.ceil(c.bounds.top+w),c.bounds.width,1);break}}));break;case 1:o.webkitTextStrokeWidth&&c.text.trim().length&&(u.ctx.strokeStyle=Se(o.webkitTextStrokeColor),u.ctx.lineWidth=o.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(c.text,c.bounds.left,c.bounds.top+g)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,o,y){if(y&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var B=Wn(t),A=Vn(o);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(y,0,0,t.intrinsicWidth,t.intrinsicHeight,B.left,B.top,B.width,B.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return Re(this,void 0,void 0,function(){var o,y,B,A,h,m,r,r,g,w,p,u,l,f,c,d,a,n,s,r,i,l,d;return xe(this,function(C){switch(C.label){case 0:this.applyEffects(t.getEffects(4)),o=t.container,y=t.curves,B=o.styles,A=0,h=o.textNodes,C.label=1;case 1:return A<h.length?(m=h[A],[4,this.renderTextNode(m,B)]):[3,4];case 2:C.sent(),C.label=3;case 3:return A++,[3,1];case 4:if(!(o instanceof ql))return[3,8];C.label=5;case 5:return C.trys.push([5,7,,8]),[4,this.context.cache.match(o.src)];case 6:return r=C.sent(),this.renderReplacedElement(o,y,r),[3,8];case 7:return C.sent(),this.context.logger.error("Error loading image "+o.src),[3,8];case 8:if(o instanceof eu&&this.renderReplacedElement(o,y,o.canvas),!(o instanceof tu))return[3,12];C.label=9;case 9:return C.trys.push([9,11,,12]),[4,this.context.cache.match(o.svg)];case 10:return r=C.sent(),this.renderReplacedElement(o,y,r),[3,12];case 11:return C.sent(),this.context.logger.error("Error loading svg "+o.svg.substring(0,255)),[3,12];case 12:return o instanceof ou&&o.tree?(g=new e(this.context,{scale:this.options.scale,backgroundColor:o.backgroundColor,x:0,y:0,width:o.width,height:o.height}),[4,g.render(o.tree)]):[3,14];case 13:w=C.sent(),o.width&&o.height&&this.ctx.drawImage(w,0,0,o.width,o.height,o.bounds.left,o.bounds.top,o.bounds.width,o.bounds.height),C.label=14;case 14:if(o instanceof wo&&(p=Math.min(o.bounds.width,o.bounds.height),o.type===Mn?o.checked&&(this.ctx.save(),this.path([new q(o.bounds.left+p*.39363,o.bounds.top+p*.79),new q(o.bounds.left+p*.16,o.bounds.top+p*.5549),new q(o.bounds.left+p*.27347,o.bounds.top+p*.44071),new q(o.bounds.left+p*.39694,o.bounds.top+p*.5649),new q(o.bounds.left+p*.72983,o.bounds.top+p*.23),new q(o.bounds.left+p*.84,o.bounds.top+p*.34085),new q(o.bounds.left+p*.39363,o.bounds.top+p*.79)]),this.ctx.fillStyle=Se(Au),this.ctx.fill(),this.ctx.restore()):o.type===Hn&&o.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(o.bounds.left+p/2,o.bounds.top+p/2,p/4,0,Math.PI*2,!0),this.ctx.fillStyle=Se(Au),this.ctx.fill(),this.ctx.restore())),wy(o)&&o.value.length){switch(u=this.createFontStyle(B),l=u[0],f=u[1],c=this.fontMetrics.getMetrics(l,f).baseline,this.ctx.font=l,this.ctx.fillStyle=Se(B.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Cy(o.styles.textAlign),d=Wn(o),a=0,o.styles.textAlign){case 1:a+=d.width/2;break;case 2:a+=d.width;break}n=d.add(a,0,0,-d.height/2+1),this.ctx.save(),this.path([new q(d.left,d.top),new q(d.left+d.width,d.top),new q(d.left+d.width,d.top+d.height),new q(d.left,d.top+d.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Cr(o.value,n),B.letterSpacing,c),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Qe(o.styles.display,2048))return[3,20];if(o.styles.listStyleImage===null)return[3,19];if(s=o.styles.listStyleImage,s.type!==0)return[3,18];r=void 0,i=s.url,C.label=15;case 15:return C.trys.push([15,17,,18]),[4,this.context.cache.match(i)];case 16:return r=C.sent(),this.ctx.drawImage(r,o.bounds.left-(r.width+10),o.bounds.top),[3,18];case 17:return C.sent(),this.context.logger.error("Error loading list-style-image "+i),[3,18];case 18:return[3,20];case 19:t.listValue&&o.styles.listStyleType!==-1&&(l=this.createFontStyle(B)[0],this.ctx.font=l,this.ctx.fillStyle=Se(B.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",d=new ot(o.bounds.left,o.bounds.top+pe(o.styles.paddingTop,o.bounds.width),o.bounds.width,Ol(B.lineHeight,B.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Cr(t.listValue,d),B.letterSpacing,Ol(B.lineHeight,B.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),C.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return Re(this,void 0,void 0,function(){var o,y,s,B,A,s,h,m,s,g,w,s,p,u,s,f,c,s,a,n,s;return xe(this,function(r){switch(r.label){case 0:if(Qe(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:r.sent(),o=0,y=t.negativeZIndex,r.label=2;case 2:return o<y.length?(s=y[o],[4,this.renderStack(s)]):[3,5];case 3:r.sent(),r.label=4;case 4:return o++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:r.sent(),B=0,A=t.nonInlineLevel,r.label=7;case 7:return B<A.length?(s=A[B],[4,this.renderNode(s)]):[3,10];case 8:r.sent(),r.label=9;case 9:return B++,[3,7];case 10:h=0,m=t.nonPositionedFloats,r.label=11;case 11:return h<m.length?(s=m[h],[4,this.renderStack(s)]):[3,14];case 12:r.sent(),r.label=13;case 13:return h++,[3,11];case 14:g=0,w=t.nonPositionedInlineLevel,r.label=15;case 15:return g<w.length?(s=w[g],[4,this.renderStack(s)]):[3,18];case 16:r.sent(),r.label=17;case 17:return g++,[3,15];case 18:p=0,u=t.inlineLevel,r.label=19;case 19:return p<u.length?(s=u[p],[4,this.renderNode(s)]):[3,22];case 20:r.sent(),r.label=21;case 21:return p++,[3,19];case 22:f=0,c=t.zeroOrAutoZIndexOrTransformedOrOpacity,r.label=23;case 23:return f<c.length?(s=c[f],[4,this.renderStack(s)]):[3,26];case 24:r.sent(),r.label=25;case 25:return f++,[3,23];case 26:a=0,n=t.positiveZIndex,r.label=27;case 27:return a<n.length?(s=n[a],[4,this.renderStack(s)]):[3,30];case 28:r.sent(),r.label=29;case 29:return a++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var o=this;t.forEach(function(y,B){var A=We(y)?y.start:y;B===0?o.ctx.moveTo(A.x,A.y):o.ctx.lineTo(A.x,A.y),We(y)&&o.ctx.bezierCurveTo(y.startControl.x,y.startControl.y,y.endControl.x,y.endControl.y,y.end.x,y.end.y)})},e.prototype.renderRepeat=function(t,o,y,B){this.path(t),this.ctx.fillStyle=o,this.ctx.translate(y,B),this.ctx.fill(),this.ctx.translate(-y,-B)},e.prototype.resizeImage=function(t,o,y){var B;if(t.width===o&&t.height===y)return t;var A=(B=this.canvas.ownerDocument)!==null&&B!==void 0?B:document,h=A.createElement("canvas");h.width=Math.max(1,o),h.height=Math.max(1,y);var m=h.getContext("2d");return m.drawImage(t,0,0,t.width,t.height,0,0,o,y),h},e.prototype.renderBackgroundImage=function(t){return Re(this,void 0,void 0,function(){var o,y,B,A,h,m;return xe(this,function(g){switch(g.label){case 0:o=t.styles.backgroundImage.length-1,y=function(w){var p,u,f,F,I,M,T,S,b,c,F,I,M,T,S,a,n,s,r,i,l,d,C,_,b,E,F,Q,U,T,S,P,I,M,K,W,L,O,H,k,G,D;return xe(this,function(R){switch(R.label){case 0:if(w.type!==0)return[3,5];p=void 0,u=w.url,R.label=1;case 1:return R.trys.push([1,3,,4]),[4,B.context.cache.match(u)];case 2:return p=R.sent(),[3,4];case 3:return R.sent(),B.context.logger.error("Error loading background-image "+u),[3,4];case 4:return p&&(f=Io(t,o,[p.width,p.height,p.width/p.height]),F=f[0],I=f[1],M=f[2],T=f[3],S=f[4],b=B.ctx.createPattern(B.resizeImage(p,T,S),"repeat"),B.renderRepeat(F,b,I,M)),[3,6];case 5:ip(w)?(c=Io(t,o,[null,null,null]),F=c[0],I=c[1],M=c[2],T=c[3],S=c[4],a=ep(w.angle,T,S),n=a[0],s=a[1],r=a[2],i=a[3],l=a[4],d=document.createElement("canvas"),d.width=T,d.height=S,C=d.getContext("2d"),_=C.createLinearGradient(s,i,r,l),bl(w.stops,n).forEach(function(N){return _.addColorStop(N.stop,Se(N.color))}),C.fillStyle=_,C.fillRect(0,0,T,S),T>0&&S>0&&(b=B.ctx.createPattern(d,"repeat"),B.renderRepeat(F,b,I,M))):op(w)&&(E=Io(t,o,[null,null,null]),F=E[0],Q=E[1],U=E[2],T=E[3],S=E[4],P=w.position.length===0?[ro]:w.position,I=pe(P[0],T),M=pe(P[P.length-1],S),K=tp(w,I,M,T,S),W=K[0],L=K[1],W>0&&L>0&&(O=B.ctx.createRadialGradient(Q+I,U+M,0,Q+I,U+M,W),bl(w.stops,W*2).forEach(function(N){return O.addColorStop(N.stop,Se(N.color))}),B.path(F),B.ctx.fillStyle=O,W!==L?(H=t.bounds.left+.5*t.bounds.width,k=t.bounds.top+.5*t.bounds.height,G=L/W,D=1/G,B.ctx.save(),B.ctx.translate(H,k),B.ctx.transform(1,0,0,G,0,0),B.ctx.translate(-H,-k),B.ctx.fillRect(Q,D*(U-k)+k,T,S*D),B.ctx.restore()):B.ctx.fill())),R.label=6;case 6:return o--,[2]}})},B=this,A=0,h=t.styles.backgroundImage.slice(0).reverse(),g.label=1;case 1:return A<h.length?(m=h[A],[5,y(m)]):[3,4];case 2:g.sent(),g.label=3;case 3:return A++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,o,y){return Re(this,void 0,void 0,function(){return xe(this,function(B){return this.path(Pu(y,o)),this.ctx.fillStyle=Se(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,o,y,B){return Re(this,void 0,void 0,function(){var A,h;return xe(this,function(m){switch(m.label){case 0:return o<3?[4,this.renderSolidBorder(t,y,B)]:[3,2];case 1:return m.sent(),[2];case 2:return A=cy(B,y),this.path(A),this.ctx.fillStyle=Se(t),this.ctx.fill(),h=ly(B,y),this.path(h),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return Re(this,void 0,void 0,function(){var o,y,B,A,h,m,g,w,p=this;return xe(this,function(u){switch(u.label){case 0:return this.applyEffects(t.getEffects(2)),o=t.container.styles,y=!gt(o.backgroundColor)||o.backgroundImage.length,B=[{style:o.borderTopStyle,color:o.borderTopColor,width:o.borderTopWidth},{style:o.borderRightStyle,color:o.borderRightColor,width:o.borderRightWidth},{style:o.borderBottomStyle,color:o.borderBottomColor,width:o.borderBottomWidth},{style:o.borderLeftStyle,color:o.borderLeftColor,width:o.borderLeftWidth}],A=By(Zt(o.backgroundClip,0),t.curves),y||o.boxShadow.length?(this.ctx.save(),this.path(A),this.ctx.clip(),gt(o.backgroundColor)||(this.ctx.fillStyle=Se(o.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),o.boxShadow.slice(0).reverse().forEach(function(f){p.ctx.save();var c=Nn(t.curves),a=f.inset?0:yy,n=sy(c,-a+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(p.path(c),p.ctx.clip(),p.mask(n)):(p.mask(c),p.ctx.clip(),p.path(n)),p.ctx.shadowOffsetX=f.offsetX.number+a,p.ctx.shadowOffsetY=f.offsetY.number,p.ctx.shadowColor=Se(f.color),p.ctx.shadowBlur=f.blur.number,p.ctx.fillStyle=f.inset?Se(f.color):"rgba(0,0,0,1)",p.ctx.fill(),p.ctx.restore()}),u.label=2;case 2:h=0,m=0,g=B,u.label=3;case 3:return m<g.length?(w=g[m],w.style!==0&&!gt(w.color)&&w.width>0?w.style!==2?[3,5]:[4,this.renderDashedDottedBorder(w.color,w.width,h,t.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return w.style!==3?[3,7]:[4,this.renderDashedDottedBorder(w.color,w.width,h,t.curves,3)];case 6:return u.sent(),[3,11];case 7:return w.style!==4?[3,9]:[4,this.renderDoubleBorder(w.color,w.width,h,t.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(w.color,h,t.curves)];case 10:u.sent(),u.label=11;case 11:h++,u.label=12;case 12:return m++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,o,y,B,A){return Re(this,void 0,void 0,function(){var h,m,g,w,p,u,f,c,a,n,s,r,i,l,d,C,d,C;return xe(this,function(_){return this.ctx.save(),h=uy(B,y),m=Pu(B,y),A===2&&(this.path(m),this.ctx.clip()),We(m[0])?(g=m[0].start.x,w=m[0].start.y):(g=m[0].x,w=m[0].y),We(m[1])?(p=m[1].end.x,u=m[1].end.y):(p=m[1].x,u=m[1].y),y===0||y===2?f=Math.abs(g-p):f=Math.abs(w-u),this.ctx.beginPath(),A===3?this.formatPath(h):this.formatPath(m.slice(0,2)),c=o<3?o*3:o*2,a=o<3?o*2:o,A===3&&(c=o,a=o),n=!0,f<=c*2?n=!1:f<=c*2+a?(s=f/(2*c+a),c*=s,a*=s):(r=Math.floor((f+a)/(c+a)),i=(f-r*c)/(r-1),l=(f-(r+1)*c)/r,a=l<=0||Math.abs(a-i)<Math.abs(a-l)?i:l),n&&(A===3?this.ctx.setLineDash([0,c+a]):this.ctx.setLineDash([c,a])),A===3?(this.ctx.lineCap="round",this.ctx.lineWidth=o):this.ctx.lineWidth=o*2+1.1,this.ctx.strokeStyle=Se(t),this.ctx.stroke(),this.ctx.setLineDash([]),A===2&&(We(m[0])&&(d=m[3],C=m[0],this.ctx.beginPath(),this.formatPath([new q(d.end.x,d.end.y),new q(C.start.x,C.start.y)]),this.ctx.stroke()),We(m[1])&&(d=m[1],C=m[2],this.ctx.beginPath(),this.formatPath([new q(d.end.x,d.end.y),new q(C.start.x,C.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return Re(this,void 0,void 0,function(){var o;return xe(this,function(y){switch(y.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Se(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),o=ay(t),[4,this.renderStack(o)];case 1:return y.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Mu),wy=function(v){return v instanceof iu||v instanceof nu?!0:v instanceof wo&&v.type!==Hn&&v.type!==Mn},By=function(v,e){switch(v){case 0:return Nn(e);case 2:return ry(e);case 1:default:return Vn(e)}},Cy=function(v){switch(v){case 1:return"center";case 2:return"right";case 0:default:return"left"}},by=["-apple-system","system-ui"],_y=function(v){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?v.filter(function(e){return by.indexOf(e)===-1}):v},Ey=function(v){Xe(e,v);function e(t,o){var y=v.call(this,t,o)||this;return y.canvas=o.canvas?o.canvas:document.createElement("canvas"),y.ctx=y.canvas.getContext("2d"),y.options=o,y.canvas.width=Math.floor(o.width*o.scale),y.canvas.height=Math.floor(o.height*o.scale),y.canvas.style.width=o.width+"px",y.canvas.style.height=o.height+"px",y.ctx.scale(y.options.scale,y.options.scale),y.ctx.translate(-o.x,-o.y),y.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+o.width+"x"+o.height+" at "+o.x+","+o.y+") with scale "+o.scale),y}return e.prototype.render=function(t){return Re(this,void 0,void 0,function(){var o,y;return xe(this,function(B){switch(B.label){case 0:return o=vo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Fy(o)];case 1:return y=B.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Se(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(y,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Mu),Fy=function(v){return new Promise(function(e,t){var o=new Image;o.onload=function(){e(o)},o.onerror=t,o.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(v))})},Qy=function(){function v(e){var t=e.id,o=e.enabled;this.id=t,this.enabled=o,this.start=Date.now()}return v.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.prototype.getTime=function(){return Date.now()-this.start},v.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,en([this.id,this.getTime()+"ms"],e))},v.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.instances={},v}(),Sy=function(){function v(e,t){var o;this.windowBounds=t,this.instanceName="#"+v.instanceCount++,this.logger=new Qy({id:this.instanceName,enabled:e.logging}),this.cache=(o=e.cache)!==null&&o!==void 0?o:new Jv(this,e)}return v.instanceCount=1,v}(),Uy=function(v,e){return e===void 0&&(e={}),Ty(v,e)};typeof window<"u"&&Fu.setContext(window);var Ty=function(v,e){return Re(void 0,void 0,void 0,function(){var t,o,y,B,A,h,m,g,w,p,u,f,c,a,n,s,r,i,l,d,_,C,_,b,E,F,Q,U,T,S,P,I,M,K,W,L,O,H,k,G;return xe(this,function(D){switch(D.label){case 0:if(!v||typeof v!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=v.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(o=t.defaultView,!o)throw new Error("Document is not attached to a Window");return y={allowTaint:(b=e.allowTaint)!==null&&b!==void 0?b:!1,imageTimeout:(E=e.imageTimeout)!==null&&E!==void 0?E:15e3,proxy:e.proxy,useCORS:(F=e.useCORS)!==null&&F!==void 0?F:!1},B=Mi({logging:(Q=e.logging)!==null&&Q!==void 0?Q:!0,cache:e.cache},y),A={windowWidth:(U=e.windowWidth)!==null&&U!==void 0?U:o.innerWidth,windowHeight:(T=e.windowHeight)!==null&&T!==void 0?T:o.innerHeight,scrollX:(S=e.scrollX)!==null&&S!==void 0?S:o.pageXOffset,scrollY:(P=e.scrollY)!==null&&P!==void 0?P:o.pageYOffset},h=new ot(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),m=new Sy(B,h),g=(I=e.foreignObjectRendering)!==null&&I!==void 0?I:!1,w={allowTaint:(M=e.allowTaint)!==null&&M!==void 0?M:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:g,copyStyles:g},m.logger.debug("Starting document clone with size "+h.width+"x"+h.height+" scrolled to "+-h.left+","+-h.top),p=new _u(m,v,w),u=p.clonedReferenceElement,u?[4,p.toIFrame(t,h)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=D.sent(),c=Co(u)||Iv(u)?sf(u.ownerDocument):tn(m,u),a=c.width,n=c.height,s=c.left,r=c.top,i=Iy(m,u,e.backgroundColor),l={canvas:e.canvas,backgroundColor:i,scale:(W=(K=e.scale)!==null&&K!==void 0?K:o.devicePixelRatio)!==null&&W!==void 0?W:1,x:((L=e.x)!==null&&L!==void 0?L:0)+s,y:((O=e.y)!==null&&O!==void 0?O:0)+r,width:(H=e.width)!==null&&H!==void 0?H:Math.ceil(a),height:(k=e.height)!==null&&k!==void 0?k:Math.ceil(n)},g?(m.logger.debug("Document cloned, using foreign object rendering"),_=new Ey(m,l),[4,_.render(u)]):[3,3];case 2:return d=D.sent(),[3,5];case 3:return m.logger.debug("Document cloned, element located at "+s+","+r+" with size "+a+"x"+n+" using computed rendering"),m.logger.debug("Starting DOM parsing"),C=au(m,u),i===C.styles.backgroundColor&&(C.styles.backgroundColor=at.TRANSPARENT),m.logger.debug("Starting renderer for element at "+l.x+","+l.y+" with size "+l.width+"x"+l.height),_=new my(m,l),[4,_.render(C)];case 4:d=D.sent(),D.label=5;case 5:return(!((G=e.removeContainer)!==null&&G!==void 0)||G)&&(_u.destroy(f)||m.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),m.logger.debug("Finished rendering"),[2,d]}})})},Iy=function(v,e,t){var o=e.ownerDocument,y=o.documentElement?mr(v,getComputedStyle(o.documentElement).backgroundColor):at.TRANSPARENT,B=o.body?mr(v,getComputedStyle(o.body).backgroundColor):at.TRANSPARENT,A=typeof t=="string"?mr(v,t):t===null?at.TRANSPARENT:4294967295;return e===o.documentElement?gt(y)?gt(B)?A:B:y:A};const Xr=class Xr extends j.EngineObject{constructor(t,o){super(t,o);z(this,"_imageLabel",this.dv(new j.ESImageLabel(`${this.sceneObject.id}_ESImageLabel`)));z(this,"_hasClassDivAndPos",{});const y=o.viewer;if(!y){console.warn("viewer is undefined!");return}t.mainClass=this._imageLabel;const B=this._imageLabel;o.add(B),this.d(()=>o.delete(B));{const A=()=>{if(!y)return;if(!t.instanceClass)throw new Error("!sceneObject.instanceClass");const g=document.createElement("div"),w=this.dv(new t.instanceClass(g,t,o))._container;if(w.style.opacity=t.opacity.toString()??j.ESGeoDiv.defaults.opacity,w.style.position="fixed",w.style.zIndex="-1",w.style.top="0px",!document.body.contains(w)){document.body.appendChild(w);let u=w?w.querySelectorAll("*[class]"):[];for(let f=0;f<u.length;f++){const c=u[f];var p=c.getBoundingClientRect();this._hasClassDivAndPos[c.className]=[c.offsetLeft,c.offsetTop,c.offsetLeft+p.width,c.offsetTop+p.height]}}Uy(w,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:w.offsetWidth,height:w.offsetHeight,scale:1}).then(u=>{document.body.contains(w)&&document.body.removeChild(w),B.url=u.toDataURL(),B.show=t.show}).catch(()=>{document.body.contains(w)&&document.body.removeChild(w)})},h=()=>{try{t.instanceClass?A():(B.url="",B.show=!1)}catch(g){console.error(g)}};h();const m=this.dv(V.createNextAnimateFrameEvent(t.instanceClassChanged,t.opacityChanged));this.d(m.don(h))}{const A=()=>{B.show=t.show};B.show=!1,this.ad(t.showChanged.don(A))}this.d(V.track([B,"anchor"],[t,"anchor"])),this.d(V.bind([B,"position"],[t,"position"])),this.d(V.bind([B,"rotation"],[t,"rotation"])),this.d(V.bind([B,"flyToParam"],[t,"flyToParam"])),this.d(V.bind([B,"flyInParam"],[t,"flyInParam"])),this.d(V.bind([B,"allowPicking"],[t,"allowPicking"])),this.d(V.bind([B,"scale"],[t,"scale"])),this.d(V.track([B,"minVisibleDistance"],[t,"minVisibleDistance"])),this.d(V.track([B,"maxVisibleDistance"],[t,"maxVisibleDistance"])),this.ad(t.automaticLandingEvent.don(()=>{B.automaticLanding()})),this.d(B.pickedEvent.don(A=>{(t.allowPicking??!1)&&t.pickedEvent.emit(A)})),this.d(o.widgetEvent.don(A=>{if(A.objId!==this._imageLabel.id)return;const{type:h,add:m}=A;if(h==="leftClick"&&m){const g=(m==null?void 0:m.classNames)??[],w=Object.keys(this._hasClassDivAndPos);for(let p=0;p<w.length;p++){const u=w[p];let f=this._hasClassDivAndPos[u];m&&m.mouseRelativePos&&m.mouseRelativePos[0]>=f[0]&&m.mouseRelativePos[0]<=f[2]&&m.mouseRelativePos[1]>=f[1]&&m.mouseRelativePos[1]<=f[3]&&g.push(u)}m.classNames=g}t.widgetEvent.emit({type:h,add:m})})),this.d(t.calcFlyToParamEvent.don(()=>{Lt(y,B.id)})),this.d(t.calcFlyInParamEvent.don(()=>{const A=o.getCurrentCameraInfo();if(!A)return;const{position:h,rotation:m}=A;t.flyInParam={position:h,rotation:m,flyDuration:1}})),this.d(t.smoothMoveEvent.don((A,h)=>{zA(y,B.id,A,h)})),this.d(t.smoothMoveWithRotationEvent.don((A,h,m)=>{GA(y,B.id,A,h,m)})),this.d(t.smoothMoveOnGroundEvent.don((A,h,m,g)=>{jA(y,B.id,A,h,g,m)})),this.d(t.smoothMoveWithRotationOnGroundEvent.don((A,h,m,g,w)=>{WA(y,B.id,A,h,m,g,w)})),this.d(t.flyToEvent.don((A,h)=>{B.flyTo(A)})),this.d(t.flyInEvent.don(A=>{B.flyIn(A)}))}};z(Xr,"type",Xr.register("ESUeViewer",j.ESGeoDiv.type,Xr));let Po=Xr;const Yr=class Yr extends De{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.flyToFeatureIndexEvent.don((y,B)=>{o.callUeFunc({f:"flyToFeatureIndex",p:{id:e.id,index:y,duration:B}})})),this.d(e.flyToFeatureEvent.don((y,B,A)=>{o.callUeFunc({f:"flyToFeature",p:{id:e.id,key:y,value:B,duration:A}})}))}};z(Yr,"type",Yr.register("ESUeViewer",j.ESGeoJson.type,Yr));let xo=Yr;const $r=class $r extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z($r,"type",$r.register("ESUeViewer",j.ESGeoLineString.type,$r));let Jn=$r;const Zr=class Zr extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(Zr,"type",Zr.register("ESUeViewer",j.ESGeoRectangle.type,Zr));let Oo=Zr;const qr=class qr extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(qr,"type",qr.register("ESUeViewer",j.ESGeoWater.type,qr));let Mo=qr;const Pt=class Pt extends de{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.setNodePositionEvent.don((y,B)=>{Rs(o,e.id,y,B)})),this.d(e.setNodeRotationEvent.don((y,B)=>{ks(o,e.id,y,B)})),this.d(e.setNodeScaleEvent.don((y,B)=>{Ks(o,e.id,y,B)}))}};z(Pt,"forceUeUpdateProps",[...de.forceUeUpdateProps,"url"]),z(Pt,"propValFuncs",{...de.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(j.rpToap(e)):(e.url=j.ESSceneObject.context.getStrFromEnv(j.rpToap(e.url)),e),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),z(Pt,"type",Pt.register("ESUeViewer",j.ESGltfModel.type,Pt));let Ho=Pt;const eA=class eA extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(eA,"type",eA.register("ESUeViewer",j.ESHeightMeasurement.type,eA));let Lo=eA;const tA=class tA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=async(A,h,m,g)=>{const{viewer:w}=A;if(!w){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const p=await w.callUeFunc({f:"AIMoveTo",p:{id:h,Destination:m,Time:g}});return p.error&&console.error("AIMoveTo:",p.error),p};this.d(e.aiMoveToEvent.don((A,h)=>{y(t,e.id,A,h)}));const B=async(A,h)=>{const{viewer:m}=A;if(!m){console.error("StopAIMove: ueViewer.viewer is undefined");return}const g=await m.callUeFunc({f:"StopAIMove",p:{id:h}});return g.error&&console.error("StopAIMove:",g.error),g};this.d(e.stopAIMoveEvent.don(()=>{B(t,e.id)}))}};z(tA,"type",tA.register("ESUeViewer",j.ESHuman.type,tA));let Do=tA;const xt=class xt extends $e{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.anchor=[.5,1]}};z(xt,"type",xt.register("ESUeViewer",j.ESImageLabel.type,xt)),z(xt,"forceUeUpdateProps",[...$e.forceUeUpdateProps,"url"]),z(xt,"propValFuncs",{...$e.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(j.rpToap(e)):(e.url=j.ESSceneObject.context.getStrFromEnv(j.rpToap(e.url)),e)});let Ro=xt;const rA=class rA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(rA,"type",rA.register("ESUeViewer",j.ESLevelRuntimeModel.type,rA));let ko=rA;const AA=class AA extends $A{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(AA,"type",AA.register("ESUeViewer",j.ESLocalCircle.type,AA));let Ko=AA;const nA=class nA extends De{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(nA,"type",nA.register("ESUeViewer",j.ESLocalPolygonZ.type,nA));let No=nA;const iA=class iA extends $A{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(iA,"type",iA.register("ESUeViewer",j.ESLocalRectangle.type,iA));let Vo=iA;const oA=class oA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(oA,"type",oA.register("ESUeViewer",j.ESLocalSkyBox.type,oA));let Go=oA;const sA=class sA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(sA,"type",sA.register("ESUeViewer",j.ESLocationMeasurement.type,sA));let jo=sA;const aA=class aA extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(aA,"type",aA.register("ESUeViewer",j.ESPipeFence.type,aA));let Wo=aA;const cA=class cA extends Jn{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(cA,"type",cA.register("ESUeViewer",j.ESPipeline.type,cA));let zo=cA;const lA=class lA extends ZA{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.highlightFeatureEvent.don(y=>{const B=typeof y=="number"?y.toString():y;Ms(o,e.id,B)})),this.d(e.highlightFeatureAndFlyToEvent.don((y,B,A,h)=>{const m=typeof y=="number"?y.toString():y;Hs(o,e.id,m,h??1)})),this.d(e.setLayerVisibleEvent.don((y,B)=>{let A="";typeof B!="string"?A=JSON.stringify(B):A=B,Ls(o,e.id,A)})),this.d(e.setLayerColorEvent.don((y,B)=>{let A="";typeof B!="string"?A=JSON.stringify(B):A=B,Ds(o,e.id,A)}))}};z(lA,"type",lA.register("ESUeViewer",j.ESPipeserTileset.type,lA));let Jo=lA;const uA=class uA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(uA,"type",uA.register("ESUeViewer",j.ESPit.type,uA));let Xo=uA;const dA=class dA extends $e{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.ad(e.getInitialStyleEvent.don(async()=>{try{const y=await o.callUeFunc({f:"GetInitialStyle",p:{id:e.id}});y.error!=""&&console.error("getInitialStyleEvent:",y.error),e.initialStyle.value=structuredClone(y.re)}catch(y){console.error("getInitialStyleEvent:",y),e.initialStyle.value=void 0}}))}};z(dA,"type",dA.register("ESUeViewer",j.ESPoi2D.type,dA));let Yo=dA;const fA=class fA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(fA,"type",fA.register("ESUeViewer",j.ESPoi3D.type,fA));let $o=fA;const Ot=class Ot extends De{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(Ot,"type",Ot.register("ESUeViewer",j.ESPoiTileset.type,Ot)),z(Ot,"forceUeUpdateProps",[...De.forceUeUpdateProps,"url"]),z(Ot,"propValFuncs",{...De.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(e):(e.url=j.ESSceneObject.context.getStrFromEnv(e.url),e)});let Zo=Ot;const hA=class hA extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(hA,"type",hA.register("ESUeViewer",j.ESPolygonFence.type,hA));let qo=hA;const pA=class pA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(pA,"type",pA.register("ESUeViewer",j.ESPolygonFlattenedPlane.type,pA));let es=pA;const gA=class gA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(gA,"type",gA.register("ESUeViewer",j.ESPolygonWithHole.type,gA));let ts=gA;const vA=class vA extends _t{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(()=>{e.ids=[]}),this.d(e.highlightInner3DtilesetEvent.don(y=>{y.highlight=!0})),this.d(e.removeHighlightInner3DtilesetEvent.don(y=>{y.highlight=!1}));{const y=h=>{h=h.toLocaleLowerCase();let m=[255,255,255,1];if(h.startsWith("#")){if(h.length===4){let g=parseInt(h[1]+h[1],16),w=parseInt(h[2]+h[2],16),p=parseInt(h[3]+h[3],16);m=[g,w,p,1]}else if(h.length===7){let g=parseInt(h.substring(1,3),16),w=parseInt(h.substring(3,5),16),p=parseInt(h.substring(5,7),16);m=[g,w,p,1]}}else if(h.startsWith("rgba")){let g=h.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(g){let w=parseInt(g[1]),p=parseInt(g[2]),u=parseInt(g[3]),f=parseFloat(g[4]);m=[w,p,u,f]}}else if(h.startsWith("rgb")){let g=h.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(g){let w=parseInt(g[1]),p=parseInt(g[2]),u=parseInt(g[3]);m=[w,p,u,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[m[0]/255,m[1]/255,m[2]/255,m[3]]},B=()=>{const h=e.layerConfig;if(!h)return;const m=[];h.forEach(g=>{m.push({condition:[{field:"layer",op:"==",value:g.layer},{field:"dataset",op:"==",value:g.dataset}],color:y(g.value.color??"rgb(255,255,255)"),show:g.value.visible})}),e.setFeatureStyle(m)};B();const A=this.dv(V.createNextAnimateFrameEvent(e.layerConfigChanged));this.d(A.don(()=>{B()}))}}};z(vA,"type",vA.register("ESUeViewer",j.ESRtsTileset.type,vA));let rs=vA;const yA=class yA extends De{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(e.addTreesEvent.don(y=>{j.addTreesCallFunc(t,e.id,y)})),this.d(e.removeAllTreesEvent.don(()=>{j.removeAllTreesCallFunc(t,e.id)})),this.d(e.updateTreeParamsEvent.don(y=>{j.updateTreeParamsCallFunc(t,e.id,y)})),this.d(e.cutDownTreesEvent.don((y,B)=>{j.cutDownTreesCallFunc(t,e.id,y,B)})),this.d(e.growthSimulationEvent.don((y,B,A)=>{j.growthSimulationCallFunc(t,e.id,y,B,A)}))}};z(yA,"type",yA.register("ESUeViewer",j.ESSeparateFoliage.type,yA));let As=yA;const mA=class mA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(mA,"type",mA.register("ESUeViewer",j.ESSubmergingAnalysis.type,mA));let ns=mA;const wA=class wA extends Ne{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{o.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.stopEvent.don(()=>{o.callUeFunc({f:"Stop",p:{id:e.id}})}))}};z(wA,"type",wA.register("ESUeViewer",j.ESSunshineAnalysis.type,wA));let is=wA;const BA=class BA extends Ne{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{o.callUeFunc({f:"Start",p:{id:e.id}})}))}};z(BA,"type",BA.register("ESUeViewer",j.ESSurfaceAreaMeasurement.type,BA));let os=BA;const CA=class CA extends $e{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(CA,"type",CA.register("ESUeViewer",j.ESTextLabel.type,CA));let ss=CA;const qt=class qt extends $e{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.callFunctionEvent.don(async(y,B)=>{const A=await ti(o,e.id,y,B);e.__callFunctionResultEvent.emit(A)}))}};z(qt,"type",qt.register("ESUeViewer",j.ESUEWidget.type,qt)),z(qt,"propValFuncs",{...$e.propValFuncs,info:e=>JSON.stringify(e??{})});let as=qt;const Hu=v=>{switch(v){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},Py=v=>{switch(v){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},bA=class bA extends j.EngineObject{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn(`${e.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{qn(o,e.id)});const y=async()=>{g()||await o.callUeFunc({f:"update",p:{id:e.id,name:e.name,show:e.show,rotation:e.rotation,flyToParam:e.flyToParam??j.ESVisualObject.defaults.flyToParam,flyInParam:e.flyInParam??j.ESVisualObject.defaults.flyInParam,highlight:e.highlight,collision:e.collision,scale:e.scale,minVisibleDistance:e.minVisibleDistance,maxVisibleDistance:e.maxVisibleDistance}})},B=this.dv(V.createNextAnimateFrameEvent(e.showChanged,e.nameChanged,e.rotationChanged,e.flyToParamChanged,e.flyInParamChanged,e.highlightChanged,e.collisionChanged,e.scaleChanged,e.minVisibleDistanceChanged,e.maxVisibleDistanceChanged));this.d(B.don(y)),this.d(e.flushEvent.don(()=>B.flush()));let A,h;const m=async()=>{g()||(await o.callUeFunc({f:"update",p:{id:e.id,position:e.position}}),(t.debug??!1)&&console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`))},g=()=>!A&&!h?(console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,w=async()=>{const{id:u}=e,f=await t.unBindActorByID(u);f&&f.error!==""&&console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${f.error}`),A=void 0;const c=await o.callUeFunc({f:"destroy",p:{id:u}});if(c&&c.error!==""){console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${c.error}`);return}h=void 0},p=this.dv(V.react({type:"ActorClass",actorClass:"default"}));{const u=this.dv(V.createNextAnimateFrameEvent(e.actorClassChanged,e.actorTagChanged)),f=async()=>{e.actorTag!==""?p.value={type:"ActorTag",actorTag:e.actorTag}:p.value={type:"ActorClass",actorClass:e.actorClass===""?"default":e.actorClass}};f(),this.d(u.don(f)),this.d(e.flushEvent.don(()=>u.flush()))}{const u=this.dv(V.createProcessingFromAsyncFunc(async c=>{if(await c.promise(w()),p.value.type==="ActorTag"){const{actorTag:a}=p.value;await c.promise(w());try{e.lastActorStatus="null";const n=await c.promise(t.bindActorByTag(e.id,a));if(!n)return;if(n.error!==""){console.warn(`${e.id} UeESUnrealActor BindActorByTag:${a},${n.error}`);return}if(n.re.type===0)e.lastActorStatus="bound",A=a;else if(n.re.type===1)e.lastActorStatus="bound",A=a,console.warn(`${e.id} UeESUnrealActor BindActorByTag:${a},${Hu(n.re.type)}`);else{A=void 0,console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${a}, ${Hu(n.re.type)}`);return}}catch(n){console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${a}, ${n}`);return}}else if(p.value.type==="ActorClass"){const{actorClass:a}=p.value;try{const n=await c.promise(t.createActorByClass(e.id,a));if(!n)return;if(n.error!==""){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${a}, ${n.error}`);return}if(n.re.type===0)e.lastActorStatus="created",h=a;else{console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${a},${Py(n.re.type)}`);return}}catch(n){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${a}, ${JSON.stringify(n)}`);return}}await c.promise(y()),await c.promise(m())})),f=async()=>{u.restart()};f(),this.d(p.changed.don(f))}this.d(e.positionChanged.don(m)),this.d(e.callFunctionEvent.don(async(u,f)=>{if(g()){e.__callFunctionResultEvent.emit(void 0);return}const c=await ti(o,e.id,u,f);e.__callFunctionResultEvent.emit(c)})),this.d(e.smoothMoveEvent.don((u,f)=>{g()||zA(o,e.id,u,f)})),this.d(e.smoothMoveWithRotationEvent.don((u,f,c)=>{g()||GA(o,e.id,u,f,c)})),this.d(e.smoothMoveOnGroundEvent.don((u,f,c,a)=>{g()||jA(o,e.id,u,f,a,c)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((u,f,c,a,n)=>{g()||WA(o,e.id,u,f,c,a,n)})),this.d(e.automaticLandingEvent.don(u=>{if(g())return;const f=[e.position[0],e.position[1]];t.getHeightByLonLat(e.position[0],e.position[1],"Visibility").then(c=>{c!==null&&(e.position=[...f,c],e.collision=u)})})),this.d(e.flyToEvent.don(async(u,f)=>{if(g())return;const c=await Ht(o,e.id,u);let a="over";c===void 0?a="error":c.endType===0?a="over":c.endType===1&&(a="cancelled"),e.flyOverEvent.emit(f,a,t)})),this.d(e.calcFlyToParamEvent.don(()=>{g()||Lt(o,e.id)})),this.d(e.calcFlyInParamEvent.don(async()=>{if(!t.actived)return;const u=await t.getCurrentCameraInfo();if(!u)return;const{position:f,rotation:c}=u;e.flyInParam={position:f,rotation:c,flyDuration:1}})),this.d(t.propChanged.don(u=>{g()||u.objId===e.id&&Object.keys(u.props).forEach(f=>{const c=u.props[f]===null?void 0:u.props[f];e[f]=c})}))}};z(bA,"type",bA.register("ESUeViewer",j.ESUnrealActor.type,bA));let cs=bA;const _A=class _A extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(_A,"type",_A.register("ESUeViewer",j.ESVideoFusion.type,_A));let ls=_A;const EA=class EA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(EA,"type",EA.register("ESUeViewer",j.ESViewShed.type,EA));let us=EA;const FA=class FA extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is underfined!");return}}};z(FA,"type",FA.register("ESUeViewer",j.ESVisibilityAnalysis.type,FA));let ds=FA;const QA=class QA extends Ne{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{o.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.clearEvent.don(()=>{o.callUeFunc({f:"Clear",p:{id:e.id}})}))}};z(QA,"type",QA.register("ESUeViewer",j.ESVolumeMeasurement.type,QA));let fs=QA;const er=class er extends $e{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(er,"type",er.register("ESUeViewer",j.ESWidget.type,er)),z(er,"propValFuncs",{...$e.propValFuncs,info:e=>JSON.stringify(e??{})});let hs=er;const SA=class SA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.poi.actorTag=e.human.id,e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8],this.d(e.poiOffsetHeightChanged.don(()=>{e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8]})),this.d(()=>{e.poi.actorTag=""})}};z(SA,"type",SA.register("ESUeViewer",j.ESHumanPoi.type,SA));let ps=SA;j.ESSceneObject.context.getStrFromEnv(j.ESNavigator.defaults.imgUrl);const UA=class UA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=this.disposeVar(new j.ESCustomDiv);t.add(y),this.dispose(()=>t.delete(y)),this.dispose(V.track([y,"show"],[e,"show"])),y.instanceClass=class extends V.Destroyable{constructor(A,h,m){super(),this._subContainer=A;const g=document.createElement("div");this._subContainer.appendChild(g),this.dispose(()=>this._subContainer.removeChild(g));{const u=async()=>{const f=await t.getCurrentCameraInfo(),c=f==null?void 0:f.position,n=[...f==null?void 0:f.rotation];n[0]=360,t.flyIn(c,n)};g.addEventListener("click",u),g.style.cursor="pointer",this.dispose(()=>g.removeEventListener("click",u))}{const u=()=>{g.style.width=`${e.cssSize?e.cssSize:j.ESNavigator.defaults.cssSize}px`,g.style.height=`${e.cssSize?e.cssSize:j.ESNavigator.defaults.cssSize}px`};u(),e.dispose(e.cssSizeChanged.disposableOn(u))}g.style.position="fixed";{const u=()=>{g.style.top=`${e.cssPosition?e.cssPosition[0]:j.ESNavigator.defaults.cssPosition[0]}px`,g.style.right=`${e.cssPosition?e.cssPosition[1]:j.ESNavigator.defaults.cssPosition[1]}px`};u(),e.dispose(e.cssPositionChanged.disposableOn(u))}g.style.transition=" right 0.4s linear",g.style.cursor="pointer";const w=document.createElement("div");g.appendChild(w),this.dispose(()=>g.removeChild(w)),w.style.width="100%",w.style.height="100%",w.style.position="relative";const p=document.createElement("img");w.appendChild(p),this.dispose(()=>w.removeChild(p)),p.style.width="100%",p.style.height="100%",p.style.border="none";{const u=()=>p.src=e.imgUrl;u(),e.dispose(e.imgUrlChanged.disposableOn(u))}{const u=()=>{const n=-t.getCurrentCameraInfo().rotation[0];p.style.transform=`rotate(${n}deg)`};let f;const c=async()=>{u(),e.show?(g.style.display="block",f=setInterval(()=>{u()},1e3)):(g.style.display="none",clearInterval(f))};this.dispose(e.showChanged.disposableOn(c)),c(),this.dispose(()=>clearInterval(f))}p.style.transformOrigin="50% 50%"}}}};z(UA,"type",UA.register("ESUeViewer",j.ESNavigator.type,UA));let gs=UA;const Mt=class Mt extends Pe{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}{const y=()=>{let B=e.materialMode==="blue"?"multipleArrows":e.materialMode==="purple"?"singleArrow":e.materialMode;o.callUeFunc({f:"update",p:{id:e.id,materialMode:B}})};this.dispose(e.materialModeChanged.disposableOn(y)),this.dispose(e.createdEvent.disposableOn(y))}}};z(Mt,"type",Mt.register("ESUeViewer",j.ESPath.type,Mt)),z(Mt,"forceUeUpdateProps",[...Pe.forceUeUpdateProps]),z(Mt,"propValFuncs",{...Pe.propValFuncs,materialMode:null});let vs=Mt;async function xy(v){navigator.clipboard.writeText(v).then(function(){console.log("复制成功")},function(e){console.log("复制失败")})}const TA=class TA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=this.disposeVar(new j.ESCustomDiv);t.add(y),this.dispose(()=>t.delete(y)),y.instanceClass=class extends V.Destroyable{constructor(A,h,m){if(super(),this._subContainer=A,!m||!(m instanceof it))return;const g=document.createElement("div");this._subContainer.appendChild(g),this.dispose(()=>this._subContainer.removeChild(g)),g.style.width="100%",g.style.position="absolute",g.style.height=`${j.ESViewerStatusBar.defaults.height}px`,g.style.left="0",g.style.bottom="0",g.style.color="#fff",g.style.padding="0 20px 0 0",g.style.boxSizing="border-box",g.style.lineHeight=`${j.ESViewerStatusBar.defaults.height}px`,g.style.zIndex="100",g.style.alignContent="center",g.style.justifyContent="space-between";const w=document.createElement("span");g.appendChild(w),this.dispose(()=>g.removeChild(w));const p=document.createElement("span");w.appendChild(p),this.dispose(()=>w.removeChild(p));const u=document.createElement("span");w.appendChild(u),u.addEventListener("dblclick",function(){let c=u.innerHTML;c.startsWith("鼠标位置")&&(c=c.slice(5)),xy(c)}),u.style.cursor="pointer",this.dispose(()=>w.removeChild(u));const f=document.createElement("span");g.appendChild(f),this.dispose(()=>g.removeChild(f));{const c=()=>{g.style.height=(e.height??j.ESViewerStatusBar.defaults.height)+"px",g.style.lineHeight=(e.height??j.ESViewerStatusBar.defaults.height)+"px"};this.dispose(e.heightChanged.disposableOn(c)),c()}{const c=()=>{g.style.fontSize=(e.fontSize??j.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(e.fontSizeChanged.disposableOn(c)),c()}{const c=()=>{e.bgColor?g.style.background=`rgba(${e.bgColor[0]*255},${e.bgColor[1]*255},${e.bgColor[2]*255},${e.bgColor[3]})`:g.style.background=`rgba(${j.ESViewerStatusBar.defaults.bgColor[0]},${j.ESViewerStatusBar.defaults.bgColor[1]},${j.ESViewerStatusBar.defaults.bgColor[2]},${j.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(e.bgColorChanged.disposableOn(c)),c()}m.getVersion().then(c=>{c&&(f.innerText=`Ue 版本 : ${c[0]} `)}).catch(c=>{console.log(c)});{const c=()=>{let s="",r="";s+=`帧率:${m.getFPS().toFixed(0)}FPS`,p.innerText=s;const i=t.getCurrentCameraInfo();s+=` 经度: ${i.position[0].toFixed(5)}° 纬度: ${i.position[1].toFixed(5)}° 高度: ${i.position[2].toFixed(2)}米 偏航角: ${i.rotation[0].toFixed(2)}° 俯仰角: ${i.rotation[1].toFixed(2)}° 翻滚角:${i.rotation[2].toFixed(2)}° `,p.innerText=s,t.pick().then(l=>{if(l){const{pickResult:d}=l;if(d&&d.position){const{position:C}=d;r+=`鼠标位置:${C[0].toFixed(5)}° ${C[1].toFixed(5)}° ${C[2].toFixed(2)}m`}else r+="暂时无法获取鼠标位置...";u.innerText=r}}).catch(l=>{console.log(l)})};let a;const n=async()=>{c(),e.show?(g.style.display="flex",a=setInterval(()=>{c()},1e3)):(g.style.display="none",clearInterval(a))};this.dispose(e.showChanged.disposableOn(n)),n(),this.dispose(()=>clearInterval(a))}}}}};z(TA,"type",TA.register("ESUeViewer",j.ESViewerStatusBar.type,TA));let ys=TA;const IA=class IA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(IA,"type",IA.register("ESUeViewer",j.ESGaussianSplatting.type,IA));let ms=IA;const PA=class PA extends _t{constructor(t,o){super(t,o);z(this,"_es3DTileset",this.dv(new j.ES3DTileset(`${this.sceneObject.id}_ES3DTileset`)));if(!o.viewer){console.warn("viewer is undefined!");return}t.mainClass=this._es3DTileset;{const B=this._es3DTileset;o.add(B),this.dispose(()=>o.delete(B)),this.d(V.track([B,"allowPicking"],[t,"allowPicking"])),this.d(V.track([B,"collision"],[t,"collision"])),this.d(V.bind([B,"flyToParam"],[t,"flyToParam"])),this.d(V.bind([B,"flyToParam"],[t,"flyToParam"])),this.d(V.track([B,"url"],[t,"url"])),this.d(V.track([B,"actorTag"],[t,"actorTag"])),this.d(V.track([B,"materialMode"],[t,"materialMode"])),this.d(V.track([B,"highlight"],[t,"highlight"])),this.d(V.track([B,"maximumScreenSpaceError"],[t,"maximumScreenSpaceError"])),this.d(V.track([B,"highlightID"],[t,"highlightID"])),this.d(V.track([B,"highlightColor"],[t,"highlightColor"])),this.d(V.bind([B,"offset"],[t,"offset"])),this.d(V.bind([B,"rotation"],[t,"rotation"])),this.d(V.track([B,"czmImageBasedLightingFactor"],[t,"czmImageBasedLightingFactor"])),this.d(V.track([B,"czmLuminanceAtZenith"],[t,"czmLuminanceAtZenith"])),this.d(V.track([B,"czmMaximumMemoryUsage"],[t,"czmMaximumMemoryUsage"])),this.d(V.track([B,"czmClassificationType"],[t,"czmClassificationType"])),this.d(V.track([B,"czmStyleJson"],[t,"czmStyleJson"])),this.d(V.track([B,"czmBackFaceCulling"],[t,"czmBackFaceCulling"])),this.d(V.track([B,"czmDebugShowBoundingVolume"],[t,"czmDebugShowBoundingVolume"])),this.d(V.track([B,"czmDebugShowContentBoundingVolume"],[t,"czmDebugShowContentBoundingVolume"])),this.d(V.track([B,"colorBlendMode"],[t,"colorBlendMode"])),this.d(V.track([B,"cacheBytes"],[t,"cacheBytes"])),this.d(V.track([B,"clippingPlaneEnabled"],[t,"clippingPlaneEnabled"])),this.d(V.track([B,"unionClippingRegions"],[t,"unionClippingRegions"])),this.d(V.track([B,"clippingPlaneEdgeColor"],[t,"clippingPlaneEdgeColor"])),this.d(V.track([B,"clippingPlaneEdgeWidth"],[t,"clippingPlaneEdgeWidth"])),this.d(V.track([B,"materialParams"],[t,"materialParams"])),this.d(V.bind([B,"supportEdit"],[t,"supportEdit"])),this.d(V.bind([B,"clippingPlanesId"],[t,"clippingPlanesId"])),this.d(V.bind([B,"clippingPlaneIds"],[t,"clippingPlaneIds"])),this.d(V.bind([B,"flattenedPlaneId"],[t,"flattenedPlaneId"])),this.d(V.bind([B,"flattenedPlaneEnabled"],[t,"flattenedPlaneEnabled"])),this.d(V.bind([B,"clippingPlaneId"],[t,"clippingPlaneId"])),this.d(V.bind([B,"excavateId"],[t,"excavateId"]))}{const B=this._es3DTileset;this.d(t.refreshTilesetEvent.don(()=>{B.refreshTileset()})),this.d(t.highlightFeatureEvent.don((...A)=>{B.highlightFeature(...A)})),this.d(t.highlightFeatureAndFlyToEvent.don((...A)=>{B.highlightFeatureAndFlyTo(...A)})),this.d(t.setFeatureColorEvent.don((...A)=>{B.setFeatureColor(...A)})),this.d(t.setFeatureVisableEvent.don((...A)=>{B.setFeatureVisable(...A)})),this.d(t.resetFeatureStyleEvent.don((...A)=>{B.resetFeatureStyle(...A)})),this.d(t.flyInEvent.don((...A)=>{B.flyIn(A[0])})),this.d(t.flyToEvent.don((...A)=>{B.flyTo(A[0])})),this.d(t.calcFlyToParamEvent.don((...A)=>{B.calcFlyToParam(...A)})),this.d(t.calcFlyInParamEvent.don((...A)=>{B.calcFlyInParam(...A)}))}{const B=this._es3DTileset;this.d(B.tilesetReady.don(A=>{t.tilesetReady.emit(A)})),this.d(B.pickedEvent.don(A=>{A.assign({sceneObject:t}),t.pickedEvent.emit(A)}))}{const B=()=>{this.es3DTileset.show=t.show};B(),this.d(t.showChanged.don(()=>{B()}))}}get es3DTileset(){return this._es3DTileset}};z(PA,"type",PA.register("ESUeViewer",j.ESRtsFeatureEditing.type,PA));let ws=PA;const xA=class xA extends _t{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(xA,"type",xA.register("ESUeViewer",j.ESMsTileset.type,xA));let Bs=xA;const OA=class OA extends Ne{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}const y=()=>{o.callUeFunc({f:"update",p:{id:e.id,height:e.height??j.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:e.extrudedHeight??j.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:e.perPositionHeight??j.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},B=this.disposeVar(V.createNextAnimateFrameEvent(e.heightChanged,e.extrudedHeightChanged,e.perPositionHeightChanged));this.dispose(B.disposableOn(y)),this.dispose(e.createdEvent.disposableOn(y))}};z(OA,"type",OA.register("ESUeViewer",j.ESGeoExtrudedPolygon.type,OA));let Cs=OA;const MA=class MA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(MA,"type",MA.register("ESUeViewer",j.ESStaticMesh.type,MA));let bs=MA;const HA=class HA extends Pe{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{o.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.clearEvent.don(()=>{o.callUeFunc({f:"Clear",p:{id:e.id}})}))}};z(HA,"type",HA.register("ESUeViewer",j.ESSkylineAnalysis.type,HA));let _s=HA;J.copyright=void 0;try{const v="earthsdk3-ue",e="3.0.7",t="2025-06-17T01:46:57.000Z",o="北京西部世界科技有限公司",y="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",B="edf147b7826beaf136ce605d8be893b716cc4a69",h=((Date.now()-1750124817e3)/36e5).toFixed(1),m=`%c🌏 ${v}%c ${e}.${B.slice(0,8)}.${t} (距今${h}个小时)
|
|
339
|
+
.`+Qo+jv+Eu)},zv=function(v,e){var t=v.ownerDocument;if(t){var o=t.createElement("style");o.textContent=e,v.appendChild(o)}},Fu=function(){function v(){}return v.getOrigin=function(e){var t=v._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},v.isSameOrigin=function(e){return v.getOrigin(e)===v._origin},v.setContext=function(e){v._link=e.document.createElement("a"),v._origin=v.getOrigin(e.location.href)},v._origin="about:blank",v}(),Jv=function(){function v(e,t){this.context=e,this._options=t,this._cache={}}return v.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Uo(e)||Zv(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},v.prototype.match=function(e){return this._cache[e]},v.prototype.loadImage=function(e){return Re(this,void 0,void 0,function(){var t,o,y,B,A=this;return xe(this,function(h){switch(h.label){case 0:return t=Fu.isSameOrigin(e),o=!So(e)&&this._options.useCORS===!0&&Ie.SUPPORT_CORS_IMAGES&&!t,y=!So(e)&&!t&&!Uo(e)&&typeof this._options.proxy=="string"&&Ie.SUPPORT_CORS_XHR&&!o,!t&&this._options.allowTaint===!1&&!So(e)&&!Uo(e)&&!y&&!o?[2]:(B=e,y?[4,this.proxy(B)]:[3,2]);case 1:B=h.sent(),h.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(m,g){var w=new Image;w.onload=function(){return m(w)},w.onerror=g,(qv(B)||o)&&(w.crossOrigin="anonymous"),w.src=B,w.complete===!0&&setTimeout(function(){return m(w)},500),A._options.imageTimeout>0&&setTimeout(function(){return g("Timed out ("+A._options.imageTimeout+"ms) loading image")},A._options.imageTimeout)})];case 3:return[2,h.sent()]}})})},v.prototype.has=function(e){return typeof this._cache[e]<"u"},v.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},v.prototype.proxy=function(e){var t=this,o=this._options.proxy;if(!o)throw new Error("No proxy defined");var y=e.substring(0,256);return new Promise(function(B,A){var h=Ie.SUPPORT_RESPONSE_TYPE?"blob":"text",m=new XMLHttpRequest;m.onload=function(){if(m.status===200)if(h==="text")B(m.response);else{var p=new FileReader;p.addEventListener("load",function(){return B(p.result)},!1),p.addEventListener("error",function(u){return A(u)},!1),p.readAsDataURL(m.response)}else A("Failed to proxy resource "+y+" with status code "+m.status)},m.onerror=A;var g=o.indexOf("?")>-1?"&":"?";if(m.open("GET",""+o+g+"url="+encodeURIComponent(e)+"&responseType="+h),h!=="text"&&m instanceof XMLHttpRequest&&(m.responseType=h),t._options.imageTimeout){var w=t._options.imageTimeout;m.timeout=w,m.ontimeout=function(){return A("Timed out ("+w+"ms) proxying "+y)}}m.send()})},v}(),Xv=/^data:image\/svg\+xml/i,Yv=/^data:image\/.*;base64,/i,$v=/^data:image\/.*/i,Zv=function(v){return Ie.SUPPORT_SVG_DRAWING||!ey(v)},So=function(v){return $v.test(v)},qv=function(v){return Yv.test(v)},Uo=function(v){return v.substr(0,4)==="blob"},ey=function(v){return v.substr(-3).toLowerCase()==="svg"||Xv.test(v)},q=function(){function v(e,t){this.type=0,this.x=e,this.y=t}return v.prototype.add=function(e,t){return new v(this.x+e,this.y+t)},v}(),Yt=function(v,e,t){return new q(v.x+(e.x-v.x)*t,v.y+(e.y-v.y)*t)},Kn=function(){function v(e,t,o,y){this.type=1,this.start=e,this.startControl=t,this.endControl=o,this.end=y}return v.prototype.subdivide=function(e,t){var o=Yt(this.start,this.startControl,e),y=Yt(this.startControl,this.endControl,e),B=Yt(this.endControl,this.end,e),A=Yt(o,y,e),h=Yt(y,B,e),m=Yt(A,h,e);return t?new v(this.start,o,A,m):new v(m,h,B,this.end)},v.prototype.add=function(e,t){return new v(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},v.prototype.reverse=function(){return new v(this.end,this.endControl,this.startControl,this.start)},v}(),We=function(v){return v.type===1},ty=function(){function v(e){var t=e.styles,o=e.bounds,y=yr(t.borderTopLeftRadius,o.width,o.height),B=y[0],A=y[1],h=yr(t.borderTopRightRadius,o.width,o.height),m=h[0],g=h[1],w=yr(t.borderBottomRightRadius,o.width,o.height),p=w[0],u=w[1],f=yr(t.borderBottomLeftRadius,o.width,o.height),c=f[0],a=f[1],n=[];n.push((B+m)/o.width),n.push((c+p)/o.width),n.push((A+a)/o.height),n.push((g+u)/o.height);var s=Math.max.apply(Math,n);s>1&&(B/=s,A/=s,m/=s,g/=s,p/=s,u/=s,c/=s,a/=s);var r=o.width-m,i=o.height-u,l=o.width-p,d=o.height-a,C=t.borderTopWidth,_=t.borderRightWidth,b=t.borderBottomWidth,E=t.borderLeftWidth,F=pe(t.paddingTop,e.bounds.width),Q=pe(t.paddingRight,e.bounds.width),U=pe(t.paddingBottom,e.bounds.width),T=pe(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=B>0||A>0?ve(o.left+E/3,o.top+C/3,B-E/3,A-C/3,le.TOP_LEFT):new q(o.left+E/3,o.top+C/3),this.topRightBorderDoubleOuterBox=B>0||A>0?ve(o.left+r,o.top+C/3,m-_/3,g-C/3,le.TOP_RIGHT):new q(o.left+o.width-_/3,o.top+C/3),this.bottomRightBorderDoubleOuterBox=p>0||u>0?ve(o.left+l,o.top+i,p-_/3,u-b/3,le.BOTTOM_RIGHT):new q(o.left+o.width-_/3,o.top+o.height-b/3),this.bottomLeftBorderDoubleOuterBox=c>0||a>0?ve(o.left+E/3,o.top+d,c-E/3,a-b/3,le.BOTTOM_LEFT):new q(o.left+E/3,o.top+o.height-b/3),this.topLeftBorderDoubleInnerBox=B>0||A>0?ve(o.left+E*2/3,o.top+C*2/3,B-E*2/3,A-C*2/3,le.TOP_LEFT):new q(o.left+E*2/3,o.top+C*2/3),this.topRightBorderDoubleInnerBox=B>0||A>0?ve(o.left+r,o.top+C*2/3,m-_*2/3,g-C*2/3,le.TOP_RIGHT):new q(o.left+o.width-_*2/3,o.top+C*2/3),this.bottomRightBorderDoubleInnerBox=p>0||u>0?ve(o.left+l,o.top+i,p-_*2/3,u-b*2/3,le.BOTTOM_RIGHT):new q(o.left+o.width-_*2/3,o.top+o.height-b*2/3),this.bottomLeftBorderDoubleInnerBox=c>0||a>0?ve(o.left+E*2/3,o.top+d,c-E*2/3,a-b*2/3,le.BOTTOM_LEFT):new q(o.left+E*2/3,o.top+o.height-b*2/3),this.topLeftBorderStroke=B>0||A>0?ve(o.left+E/2,o.top+C/2,B-E/2,A-C/2,le.TOP_LEFT):new q(o.left+E/2,o.top+C/2),this.topRightBorderStroke=B>0||A>0?ve(o.left+r,o.top+C/2,m-_/2,g-C/2,le.TOP_RIGHT):new q(o.left+o.width-_/2,o.top+C/2),this.bottomRightBorderStroke=p>0||u>0?ve(o.left+l,o.top+i,p-_/2,u-b/2,le.BOTTOM_RIGHT):new q(o.left+o.width-_/2,o.top+o.height-b/2),this.bottomLeftBorderStroke=c>0||a>0?ve(o.left+E/2,o.top+d,c-E/2,a-b/2,le.BOTTOM_LEFT):new q(o.left+E/2,o.top+o.height-b/2),this.topLeftBorderBox=B>0||A>0?ve(o.left,o.top,B,A,le.TOP_LEFT):new q(o.left,o.top),this.topRightBorderBox=m>0||g>0?ve(o.left+r,o.top,m,g,le.TOP_RIGHT):new q(o.left+o.width,o.top),this.bottomRightBorderBox=p>0||u>0?ve(o.left+l,o.top+i,p,u,le.BOTTOM_RIGHT):new q(o.left+o.width,o.top+o.height),this.bottomLeftBorderBox=c>0||a>0?ve(o.left,o.top+d,c,a,le.BOTTOM_LEFT):new q(o.left,o.top+o.height),this.topLeftPaddingBox=B>0||A>0?ve(o.left+E,o.top+C,Math.max(0,B-E),Math.max(0,A-C),le.TOP_LEFT):new q(o.left+E,o.top+C),this.topRightPaddingBox=m>0||g>0?ve(o.left+Math.min(r,o.width-_),o.top+C,r>o.width+_?0:Math.max(0,m-_),Math.max(0,g-C),le.TOP_RIGHT):new q(o.left+o.width-_,o.top+C),this.bottomRightPaddingBox=p>0||u>0?ve(o.left+Math.min(l,o.width-E),o.top+Math.min(i,o.height-b),Math.max(0,p-_),Math.max(0,u-b),le.BOTTOM_RIGHT):new q(o.left+o.width-_,o.top+o.height-b),this.bottomLeftPaddingBox=c>0||a>0?ve(o.left+E,o.top+Math.min(d,o.height-b),Math.max(0,c-E),Math.max(0,a-b),le.BOTTOM_LEFT):new q(o.left+E,o.top+o.height-b),this.topLeftContentBox=B>0||A>0?ve(o.left+E+T,o.top+C+F,Math.max(0,B-(E+T)),Math.max(0,A-(C+F)),le.TOP_LEFT):new q(o.left+E+T,o.top+C+F),this.topRightContentBox=m>0||g>0?ve(o.left+Math.min(r,o.width+E+T),o.top+C+F,r>o.width+E+T?0:m-E+T,g-(C+F),le.TOP_RIGHT):new q(o.left+o.width-(_+Q),o.top+C+F),this.bottomRightContentBox=p>0||u>0?ve(o.left+Math.min(l,o.width-(E+T)),o.top+Math.min(i,o.height+C+F),Math.max(0,p-(_+Q)),u-(b+U),le.BOTTOM_RIGHT):new q(o.left+o.width-(_+Q),o.top+o.height-(b+U)),this.bottomLeftContentBox=c>0||a>0?ve(o.left+E+T,o.top+d,Math.max(0,c-(E+T)),a-(b+U),le.BOTTOM_LEFT):new q(o.left+E+T,o.top+o.height-(b+U))}return v}(),le;(function(v){v[v.TOP_LEFT=0]="TOP_LEFT",v[v.TOP_RIGHT=1]="TOP_RIGHT",v[v.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",v[v.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(le||(le={}));var ve=function(v,e,t,o,y){var B=4*((Math.sqrt(2)-1)/3),A=t*B,h=o*B,m=v+t,g=e+o;switch(y){case le.TOP_LEFT:return new Kn(new q(v,g),new q(v,g-h),new q(m-A,e),new q(m,e));case le.TOP_RIGHT:return new Kn(new q(v,e),new q(v+A,e),new q(m,g-h),new q(m,g));case le.BOTTOM_RIGHT:return new Kn(new q(m,e),new q(m,e+h),new q(v+A,g),new q(v,g));case le.BOTTOM_LEFT:default:return new Kn(new q(m,g),new q(m-A,g),new q(v,e+h),new q(v,e))}},Nn=function(v){return[v.topLeftBorderBox,v.topRightBorderBox,v.bottomRightBorderBox,v.bottomLeftBorderBox]},ry=function(v){return[v.topLeftContentBox,v.topRightContentBox,v.bottomRightContentBox,v.bottomLeftContentBox]},Vn=function(v){return[v.topLeftPaddingBox,v.topRightPaddingBox,v.bottomRightPaddingBox,v.bottomLeftPaddingBox]},Ay=function(){function v(e,t,o){this.offsetX=e,this.offsetY=t,this.matrix=o,this.type=0,this.target=6}return v}(),Gn=function(){function v(e,t){this.path=e,this.target=t,this.type=1}return v}(),ny=function(){function v(e){this.opacity=e,this.type=2,this.target=6}return v}(),iy=function(v){return v.type===0},Qu=function(v){return v.type===1},oy=function(v){return v.type===2},Su=function(v,e){return v.length===e.length?v.some(function(t,o){return t===e[o]}):!1},sy=function(v,e,t,o,y){return v.map(function(B,A){switch(A){case 0:return B.add(e,t);case 1:return B.add(e+o,t);case 2:return B.add(e+o,t+y);case 3:return B.add(e,t+y)}return B})},Uu=function(){function v(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return v}(),Tu=function(){function v(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new ty(this.container),this.container.styles.opacity<1&&this.effects.push(new ny(this.container.styles.opacity)),this.container.styles.transform!==null){var o=this.container.bounds.left+this.container.styles.transformOrigin[0].number,y=this.container.bounds.top+this.container.styles.transformOrigin[1].number,B=this.container.styles.transform;this.effects.push(new Ay(o,y,B))}if(this.container.styles.overflowX!==0){var A=Nn(this.curves),h=Vn(this.curves);Su(A,h)?this.effects.push(new Gn(A,6)):(this.effects.push(new Gn(A,2)),this.effects.push(new Gn(h,4)))}}return v.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,o=this.parent,y=this.effects.slice(0);o;){var B=o.effects.filter(function(m){return!Qu(m)});if(t||o.container.styles.position!==0||!o.parent){if(y.unshift.apply(y,B),t=[2,3].indexOf(o.container.styles.position)===-1,o.container.styles.overflowX!==0){var A=Nn(o.curves),h=Vn(o.curves);Su(A,h)||y.unshift(new Gn(h,6))}}else y.unshift.apply(y,B);o=o.parent}return y.filter(function(m){return Qe(m.target,e)})},v}(),To=function(v,e,t,o){v.container.elements.forEach(function(y){var B=Qe(y.flags,4),A=Qe(y.flags,2),h=new Tu(y,v);Qe(y.styles.display,2048)&&o.push(h);var m=Qe(y.flags,8)?[]:o;if(B||A){var g=B||y.styles.isPositioned()?t:e,w=new Uu(h);if(y.styles.isPositioned()||y.styles.opacity<1||y.styles.isTransformed()){var p=y.styles.zIndex.order;if(p<0){var u=0;g.negativeZIndex.some(function(c,a){return p>c.element.container.styles.zIndex.order?(u=a,!1):u>0}),g.negativeZIndex.splice(u,0,w)}else if(p>0){var f=0;g.positiveZIndex.some(function(c,a){return p>=c.element.container.styles.zIndex.order?(f=a+1,!1):f>0}),g.positiveZIndex.splice(f,0,w)}else g.zeroOrAutoZIndexOrTransformedOrOpacity.push(w)}else y.styles.isFloating()?g.nonPositionedFloats.push(w):g.nonPositionedInlineLevel.push(w);To(h,w,B?w:t,m)}else y.styles.isInlineLevel()?e.inlineLevel.push(h):e.nonInlineLevel.push(h),To(h,e,t,m);Qe(y.flags,8)&&Iu(y,m)})},Iu=function(v,e){for(var t=v instanceof mo?v.start:1,o=v instanceof mo?v.reversed:!1,y=0;y<e.length;y++){var B=e[y];B.container instanceof ru&&typeof B.container.value=="number"&&B.container.value!==0&&(t=B.container.value),B.listValue=_r(t,B.container.styles.listStyleType,!0),t+=o?-1:1}},ay=function(v){var e=new Tu(v,null),t=new Uu(e),o=[];return To(e,t,t,o),Iu(e.container,o),t},Pu=function(v,e){switch(e){case 0:return ze(v.topLeftBorderBox,v.topLeftPaddingBox,v.topRightBorderBox,v.topRightPaddingBox);case 1:return ze(v.topRightBorderBox,v.topRightPaddingBox,v.bottomRightBorderBox,v.bottomRightPaddingBox);case 2:return ze(v.bottomRightBorderBox,v.bottomRightPaddingBox,v.bottomLeftBorderBox,v.bottomLeftPaddingBox);case 3:default:return ze(v.bottomLeftBorderBox,v.bottomLeftPaddingBox,v.topLeftBorderBox,v.topLeftPaddingBox)}},cy=function(v,e){switch(e){case 0:return ze(v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox,v.topRightBorderBox,v.topRightBorderDoubleOuterBox);case 1:return ze(v.topRightBorderBox,v.topRightBorderDoubleOuterBox,v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox);case 2:return ze(v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox,v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox);case 3:default:return ze(v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox,v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox)}},ly=function(v,e){switch(e){case 0:return ze(v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox,v.topRightBorderDoubleInnerBox,v.topRightPaddingBox);case 1:return ze(v.topRightBorderDoubleInnerBox,v.topRightPaddingBox,v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox);case 2:return ze(v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox,v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox);case 3:default:return ze(v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox,v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox)}},uy=function(v,e){switch(e){case 0:return jn(v.topLeftBorderStroke,v.topRightBorderStroke);case 1:return jn(v.topRightBorderStroke,v.bottomRightBorderStroke);case 2:return jn(v.bottomRightBorderStroke,v.bottomLeftBorderStroke);case 3:default:return jn(v.bottomLeftBorderStroke,v.topLeftBorderStroke)}},jn=function(v,e){var t=[];return We(v)?t.push(v.subdivide(.5,!1)):t.push(v),We(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},ze=function(v,e,t,o){var y=[];return We(v)?y.push(v.subdivide(.5,!1)):y.push(v),We(t)?y.push(t.subdivide(.5,!0)):y.push(t),We(o)?y.push(o.subdivide(.5,!0).reverse()):y.push(o),We(e)?y.push(e.subdivide(.5,!1).reverse()):y.push(e),y},xu=function(v){var e=v.bounds,t=v.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},Wn=function(v){var e=v.styles,t=v.bounds,o=pe(e.paddingLeft,t.width),y=pe(e.paddingRight,t.width),B=pe(e.paddingTop,t.width),A=pe(e.paddingBottom,t.width);return t.add(o+e.borderLeftWidth,B+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+o+y),-(e.borderTopWidth+e.borderBottomWidth+B+A))},dy=function(v,e){return v===0?e.bounds:v===2?Wn(e):xu(e)},fy=function(v,e){return v===0?e.bounds:v===2?Wn(e):xu(e)},Io=function(v,e,t){var o=dy(Zt(v.styles.backgroundOrigin,e),v),y=fy(Zt(v.styles.backgroundClip,e),v),B=hy(Zt(v.styles.backgroundSize,e),t,o),A=B[0],h=B[1],m=yr(Zt(v.styles.backgroundPosition,e),o.width-A,o.height-h),g=py(Zt(v.styles.backgroundRepeat,e),m,B,o,y),w=Math.round(o.left+m[0]),p=Math.round(o.top+m[1]);return[g,w,p,A,h]},$t=function(v){return fe(v)&&v.value===Wt.AUTO},zn=function(v){return typeof v=="number"},hy=function(v,e,t){var o=e[0],y=e[1],B=e[2],A=v[0],h=v[1];if(!A)return[0,0];if(Ee(A)&&h&&Ee(h))return[pe(A,t.width),pe(h,t.height)];var m=zn(B);if(fe(A)&&(A.value===Wt.CONTAIN||A.value===Wt.COVER)){if(zn(B)){var g=t.width/t.height;return g<B!=(A.value===Wt.COVER)?[t.width,t.width/B]:[t.height*B,t.height]}return[t.width,t.height]}var w=zn(o),p=zn(y),u=w||p;if($t(A)&&(!h||$t(h))){if(w&&p)return[o,y];if(!m&&!u)return[t.width,t.height];if(u&&m){var f=w?o:y*B,c=p?y:o/B;return[f,c]}var a=w?o:t.width,n=p?y:t.height;return[a,n]}if(m){var s=0,r=0;return Ee(A)?s=pe(A,t.width):Ee(h)&&(r=pe(h,t.height)),$t(A)?s=r*B:(!h||$t(h))&&(r=s/B),[s,r]}var i=null,l=null;if(Ee(A)?i=pe(A,t.width):h&&Ee(h)&&(l=pe(h,t.height)),i!==null&&(!h||$t(h))&&(l=w&&p?i/o*y:t.height),l!==null&&$t(A)&&(i=w&&p?l/y*o:t.width),i!==null&&l!==null)return[i,l];throw new Error("Unable to calculate background-size for element")},Zt=function(v,e){var t=v[e];return typeof t>"u"?v[0]:t},py=function(v,e,t,o,y){var B=e[0],A=e[1],h=t[0],m=t[1];switch(v){case 2:return[new q(Math.round(o.left),Math.round(o.top+A)),new q(Math.round(o.left+o.width),Math.round(o.top+A)),new q(Math.round(o.left+o.width),Math.round(m+o.top+A)),new q(Math.round(o.left),Math.round(m+o.top+A))];case 3:return[new q(Math.round(o.left+B),Math.round(o.top)),new q(Math.round(o.left+B+h),Math.round(o.top)),new q(Math.round(o.left+B+h),Math.round(o.height+o.top)),new q(Math.round(o.left+B),Math.round(o.height+o.top))];case 1:return[new q(Math.round(o.left+B),Math.round(o.top+A)),new q(Math.round(o.left+B+h),Math.round(o.top+A)),new q(Math.round(o.left+B+h),Math.round(o.top+A+m)),new q(Math.round(o.left+B),Math.round(o.top+A+m))];default:return[new q(Math.round(y.left),Math.round(y.top)),new q(Math.round(y.left+y.width),Math.round(y.top)),new q(Math.round(y.left+y.width),Math.round(y.height+y.top)),new q(Math.round(y.left),Math.round(y.height+y.top))]}},gy="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ou="Hidden Text",vy=function(){function v(e){this._data={},this._document=e}return v.prototype.parseMetrics=function(e,t){var o=this._document.createElement("div"),y=this._document.createElement("img"),B=this._document.createElement("span"),A=this._document.body;o.style.visibility="hidden",o.style.fontFamily=e,o.style.fontSize=t,o.style.margin="0",o.style.padding="0",o.style.whiteSpace="nowrap",A.appendChild(o),y.src=gy,y.width=1,y.height=1,y.style.margin="0",y.style.padding="0",y.style.verticalAlign="baseline",B.style.fontFamily=e,B.style.fontSize=t,B.style.margin="0",B.style.padding="0",B.appendChild(this._document.createTextNode(Ou)),o.appendChild(B),o.appendChild(y);var h=y.offsetTop-B.offsetTop+2;o.removeChild(B),o.appendChild(this._document.createTextNode(Ou)),o.style.lineHeight="normal",y.style.verticalAlign="super";var m=y.offsetTop-o.offsetTop+2;return A.removeChild(o),{baseline:h,middle:m}},v.prototype.getMetrics=function(e,t){var o=e+" "+t;return typeof this._data[o]>"u"&&(this._data[o]=this.parseMetrics(e,t)),this._data[o]},v}(),Mu=function(){function v(e,t){this.context=e,this.options=t}return v}(),yy=1e4,my=function(v){Xe(e,v);function e(t,o){var y=v.call(this,t,o)||this;return y._activeEffects=[],y.canvas=o.canvas?o.canvas:document.createElement("canvas"),y.ctx=y.canvas.getContext("2d"),o.canvas||(y.canvas.width=Math.floor(o.width*o.scale),y.canvas.height=Math.floor(o.height*o.scale),y.canvas.style.width=o.width+"px",y.canvas.style.height=o.height+"px"),y.fontMetrics=new vy(document),y.ctx.scale(y.options.scale,y.options.scale),y.ctx.translate(-o.x,-o.y),y.ctx.textBaseline="bottom",y._activeEffects=[],y.context.logger.debug("Canvas renderer initialized ("+o.width+"x"+o.height+") with scale "+o.scale),y}return e.prototype.applyEffects=function(t){for(var o=this;this._activeEffects.length;)this.popEffect();t.forEach(function(y){return o.applyEffect(y)})},e.prototype.applyEffect=function(t){this.ctx.save(),oy(t)&&(this.ctx.globalAlpha=t.opacity),iy(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Qu(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return Re(this,void 0,void 0,function(){var o;return xe(this,function(y){switch(y.label){case 0:return o=t.element.container.styles,o.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:y.sent(),y.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return Re(this,void 0,void 0,function(){return xe(this,function(o){switch(o.label){case 0:if(Qe(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return o.sent(),[4,this.renderNodeContent(t)];case 2:o.sent(),o.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,o,y){var B=this;if(o===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+y);else{var A=yo(t.text);A.reduce(function(h,m){return B.ctx.fillText(m,h,t.bounds.top+y),h+B.ctx.measureText(m).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var o=t.fontVariant.filter(function(A){return A==="normal"||A==="small-caps"}).join(""),y=_y(t.fontFamily).join(", "),B=vr(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,o,t.fontWeight,B,y].join(" "),y,B]},e.prototype.renderTextNode=function(t,o){return Re(this,void 0,void 0,function(){var y,B,A,h,m,g,w,p,u=this;return xe(this,function(f){return y=this.createFontStyle(o),B=y[0],A=y[1],h=y[2],this.ctx.font=B,this.ctx.direction=o.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",m=this.fontMetrics.getMetrics(A,h),g=m.baseline,w=m.middle,p=o.paintOrder,t.textBounds.forEach(function(c){p.forEach(function(a){switch(a){case 0:u.ctx.fillStyle=Se(o.color),u.renderTextWithLetterSpacing(c,o.letterSpacing,g);var n=o.textShadow;n.length&&c.text.trim().length&&(n.slice(0).reverse().forEach(function(s){u.ctx.shadowColor=Se(s.color),u.ctx.shadowOffsetX=s.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=s.offsetY.number*u.options.scale,u.ctx.shadowBlur=s.blur.number,u.renderTextWithLetterSpacing(c,o.letterSpacing,g)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),o.textDecorationLine.length&&(u.ctx.fillStyle=Se(o.textDecorationColor||o.color),o.textDecorationLine.forEach(function(s){switch(s){case 1:u.ctx.fillRect(c.bounds.left,Math.round(c.bounds.top+g),c.bounds.width,1);break;case 2:u.ctx.fillRect(c.bounds.left,Math.round(c.bounds.top),c.bounds.width,1);break;case 3:u.ctx.fillRect(c.bounds.left,Math.ceil(c.bounds.top+w),c.bounds.width,1);break}}));break;case 1:o.webkitTextStrokeWidth&&c.text.trim().length&&(u.ctx.strokeStyle=Se(o.webkitTextStrokeColor),u.ctx.lineWidth=o.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(c.text,c.bounds.left,c.bounds.top+g)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,o,y){if(y&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var B=Wn(t),A=Vn(o);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(y,0,0,t.intrinsicWidth,t.intrinsicHeight,B.left,B.top,B.width,B.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return Re(this,void 0,void 0,function(){var o,y,B,A,h,m,r,r,g,w,p,u,l,f,c,d,a,n,s,r,i,l,d;return xe(this,function(C){switch(C.label){case 0:this.applyEffects(t.getEffects(4)),o=t.container,y=t.curves,B=o.styles,A=0,h=o.textNodes,C.label=1;case 1:return A<h.length?(m=h[A],[4,this.renderTextNode(m,B)]):[3,4];case 2:C.sent(),C.label=3;case 3:return A++,[3,1];case 4:if(!(o instanceof ql))return[3,8];C.label=5;case 5:return C.trys.push([5,7,,8]),[4,this.context.cache.match(o.src)];case 6:return r=C.sent(),this.renderReplacedElement(o,y,r),[3,8];case 7:return C.sent(),this.context.logger.error("Error loading image "+o.src),[3,8];case 8:if(o instanceof eu&&this.renderReplacedElement(o,y,o.canvas),!(o instanceof tu))return[3,12];C.label=9;case 9:return C.trys.push([9,11,,12]),[4,this.context.cache.match(o.svg)];case 10:return r=C.sent(),this.renderReplacedElement(o,y,r),[3,12];case 11:return C.sent(),this.context.logger.error("Error loading svg "+o.svg.substring(0,255)),[3,12];case 12:return o instanceof ou&&o.tree?(g=new e(this.context,{scale:this.options.scale,backgroundColor:o.backgroundColor,x:0,y:0,width:o.width,height:o.height}),[4,g.render(o.tree)]):[3,14];case 13:w=C.sent(),o.width&&o.height&&this.ctx.drawImage(w,0,0,o.width,o.height,o.bounds.left,o.bounds.top,o.bounds.width,o.bounds.height),C.label=14;case 14:if(o instanceof wo&&(p=Math.min(o.bounds.width,o.bounds.height),o.type===Mn?o.checked&&(this.ctx.save(),this.path([new q(o.bounds.left+p*.39363,o.bounds.top+p*.79),new q(o.bounds.left+p*.16,o.bounds.top+p*.5549),new q(o.bounds.left+p*.27347,o.bounds.top+p*.44071),new q(o.bounds.left+p*.39694,o.bounds.top+p*.5649),new q(o.bounds.left+p*.72983,o.bounds.top+p*.23),new q(o.bounds.left+p*.84,o.bounds.top+p*.34085),new q(o.bounds.left+p*.39363,o.bounds.top+p*.79)]),this.ctx.fillStyle=Se(Au),this.ctx.fill(),this.ctx.restore()):o.type===Hn&&o.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(o.bounds.left+p/2,o.bounds.top+p/2,p/4,0,Math.PI*2,!0),this.ctx.fillStyle=Se(Au),this.ctx.fill(),this.ctx.restore())),wy(o)&&o.value.length){switch(u=this.createFontStyle(B),l=u[0],f=u[1],c=this.fontMetrics.getMetrics(l,f).baseline,this.ctx.font=l,this.ctx.fillStyle=Se(B.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Cy(o.styles.textAlign),d=Wn(o),a=0,o.styles.textAlign){case 1:a+=d.width/2;break;case 2:a+=d.width;break}n=d.add(a,0,0,-d.height/2+1),this.ctx.save(),this.path([new q(d.left,d.top),new q(d.left+d.width,d.top),new q(d.left+d.width,d.top+d.height),new q(d.left,d.top+d.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Cr(o.value,n),B.letterSpacing,c),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Qe(o.styles.display,2048))return[3,20];if(o.styles.listStyleImage===null)return[3,19];if(s=o.styles.listStyleImage,s.type!==0)return[3,18];r=void 0,i=s.url,C.label=15;case 15:return C.trys.push([15,17,,18]),[4,this.context.cache.match(i)];case 16:return r=C.sent(),this.ctx.drawImage(r,o.bounds.left-(r.width+10),o.bounds.top),[3,18];case 17:return C.sent(),this.context.logger.error("Error loading list-style-image "+i),[3,18];case 18:return[3,20];case 19:t.listValue&&o.styles.listStyleType!==-1&&(l=this.createFontStyle(B)[0],this.ctx.font=l,this.ctx.fillStyle=Se(B.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",d=new ot(o.bounds.left,o.bounds.top+pe(o.styles.paddingTop,o.bounds.width),o.bounds.width,Ol(B.lineHeight,B.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Cr(t.listValue,d),B.letterSpacing,Ol(B.lineHeight,B.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),C.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return Re(this,void 0,void 0,function(){var o,y,s,B,A,s,h,m,s,g,w,s,p,u,s,f,c,s,a,n,s;return xe(this,function(r){switch(r.label){case 0:if(Qe(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:r.sent(),o=0,y=t.negativeZIndex,r.label=2;case 2:return o<y.length?(s=y[o],[4,this.renderStack(s)]):[3,5];case 3:r.sent(),r.label=4;case 4:return o++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:r.sent(),B=0,A=t.nonInlineLevel,r.label=7;case 7:return B<A.length?(s=A[B],[4,this.renderNode(s)]):[3,10];case 8:r.sent(),r.label=9;case 9:return B++,[3,7];case 10:h=0,m=t.nonPositionedFloats,r.label=11;case 11:return h<m.length?(s=m[h],[4,this.renderStack(s)]):[3,14];case 12:r.sent(),r.label=13;case 13:return h++,[3,11];case 14:g=0,w=t.nonPositionedInlineLevel,r.label=15;case 15:return g<w.length?(s=w[g],[4,this.renderStack(s)]):[3,18];case 16:r.sent(),r.label=17;case 17:return g++,[3,15];case 18:p=0,u=t.inlineLevel,r.label=19;case 19:return p<u.length?(s=u[p],[4,this.renderNode(s)]):[3,22];case 20:r.sent(),r.label=21;case 21:return p++,[3,19];case 22:f=0,c=t.zeroOrAutoZIndexOrTransformedOrOpacity,r.label=23;case 23:return f<c.length?(s=c[f],[4,this.renderStack(s)]):[3,26];case 24:r.sent(),r.label=25;case 25:return f++,[3,23];case 26:a=0,n=t.positiveZIndex,r.label=27;case 27:return a<n.length?(s=n[a],[4,this.renderStack(s)]):[3,30];case 28:r.sent(),r.label=29;case 29:return a++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var o=this;t.forEach(function(y,B){var A=We(y)?y.start:y;B===0?o.ctx.moveTo(A.x,A.y):o.ctx.lineTo(A.x,A.y),We(y)&&o.ctx.bezierCurveTo(y.startControl.x,y.startControl.y,y.endControl.x,y.endControl.y,y.end.x,y.end.y)})},e.prototype.renderRepeat=function(t,o,y,B){this.path(t),this.ctx.fillStyle=o,this.ctx.translate(y,B),this.ctx.fill(),this.ctx.translate(-y,-B)},e.prototype.resizeImage=function(t,o,y){var B;if(t.width===o&&t.height===y)return t;var A=(B=this.canvas.ownerDocument)!==null&&B!==void 0?B:document,h=A.createElement("canvas");h.width=Math.max(1,o),h.height=Math.max(1,y);var m=h.getContext("2d");return m.drawImage(t,0,0,t.width,t.height,0,0,o,y),h},e.prototype.renderBackgroundImage=function(t){return Re(this,void 0,void 0,function(){var o,y,B,A,h,m;return xe(this,function(g){switch(g.label){case 0:o=t.styles.backgroundImage.length-1,y=function(w){var p,u,f,F,I,M,T,S,b,c,F,I,M,T,S,a,n,s,r,i,l,d,C,_,b,E,F,Q,U,T,S,P,I,M,K,W,L,O,H,k,G,D;return xe(this,function(R){switch(R.label){case 0:if(w.type!==0)return[3,5];p=void 0,u=w.url,R.label=1;case 1:return R.trys.push([1,3,,4]),[4,B.context.cache.match(u)];case 2:return p=R.sent(),[3,4];case 3:return R.sent(),B.context.logger.error("Error loading background-image "+u),[3,4];case 4:return p&&(f=Io(t,o,[p.width,p.height,p.width/p.height]),F=f[0],I=f[1],M=f[2],T=f[3],S=f[4],b=B.ctx.createPattern(B.resizeImage(p,T,S),"repeat"),B.renderRepeat(F,b,I,M)),[3,6];case 5:ip(w)?(c=Io(t,o,[null,null,null]),F=c[0],I=c[1],M=c[2],T=c[3],S=c[4],a=ep(w.angle,T,S),n=a[0],s=a[1],r=a[2],i=a[3],l=a[4],d=document.createElement("canvas"),d.width=T,d.height=S,C=d.getContext("2d"),_=C.createLinearGradient(s,i,r,l),bl(w.stops,n).forEach(function(N){return _.addColorStop(N.stop,Se(N.color))}),C.fillStyle=_,C.fillRect(0,0,T,S),T>0&&S>0&&(b=B.ctx.createPattern(d,"repeat"),B.renderRepeat(F,b,I,M))):op(w)&&(E=Io(t,o,[null,null,null]),F=E[0],Q=E[1],U=E[2],T=E[3],S=E[4],P=w.position.length===0?[ro]:w.position,I=pe(P[0],T),M=pe(P[P.length-1],S),K=tp(w,I,M,T,S),W=K[0],L=K[1],W>0&&L>0&&(O=B.ctx.createRadialGradient(Q+I,U+M,0,Q+I,U+M,W),bl(w.stops,W*2).forEach(function(N){return O.addColorStop(N.stop,Se(N.color))}),B.path(F),B.ctx.fillStyle=O,W!==L?(H=t.bounds.left+.5*t.bounds.width,k=t.bounds.top+.5*t.bounds.height,G=L/W,D=1/G,B.ctx.save(),B.ctx.translate(H,k),B.ctx.transform(1,0,0,G,0,0),B.ctx.translate(-H,-k),B.ctx.fillRect(Q,D*(U-k)+k,T,S*D),B.ctx.restore()):B.ctx.fill())),R.label=6;case 6:return o--,[2]}})},B=this,A=0,h=t.styles.backgroundImage.slice(0).reverse(),g.label=1;case 1:return A<h.length?(m=h[A],[5,y(m)]):[3,4];case 2:g.sent(),g.label=3;case 3:return A++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,o,y){return Re(this,void 0,void 0,function(){return xe(this,function(B){return this.path(Pu(y,o)),this.ctx.fillStyle=Se(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,o,y,B){return Re(this,void 0,void 0,function(){var A,h;return xe(this,function(m){switch(m.label){case 0:return o<3?[4,this.renderSolidBorder(t,y,B)]:[3,2];case 1:return m.sent(),[2];case 2:return A=cy(B,y),this.path(A),this.ctx.fillStyle=Se(t),this.ctx.fill(),h=ly(B,y),this.path(h),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return Re(this,void 0,void 0,function(){var o,y,B,A,h,m,g,w,p=this;return xe(this,function(u){switch(u.label){case 0:return this.applyEffects(t.getEffects(2)),o=t.container.styles,y=!gt(o.backgroundColor)||o.backgroundImage.length,B=[{style:o.borderTopStyle,color:o.borderTopColor,width:o.borderTopWidth},{style:o.borderRightStyle,color:o.borderRightColor,width:o.borderRightWidth},{style:o.borderBottomStyle,color:o.borderBottomColor,width:o.borderBottomWidth},{style:o.borderLeftStyle,color:o.borderLeftColor,width:o.borderLeftWidth}],A=By(Zt(o.backgroundClip,0),t.curves),y||o.boxShadow.length?(this.ctx.save(),this.path(A),this.ctx.clip(),gt(o.backgroundColor)||(this.ctx.fillStyle=Se(o.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),o.boxShadow.slice(0).reverse().forEach(function(f){p.ctx.save();var c=Nn(t.curves),a=f.inset?0:yy,n=sy(c,-a+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(p.path(c),p.ctx.clip(),p.mask(n)):(p.mask(c),p.ctx.clip(),p.path(n)),p.ctx.shadowOffsetX=f.offsetX.number+a,p.ctx.shadowOffsetY=f.offsetY.number,p.ctx.shadowColor=Se(f.color),p.ctx.shadowBlur=f.blur.number,p.ctx.fillStyle=f.inset?Se(f.color):"rgba(0,0,0,1)",p.ctx.fill(),p.ctx.restore()}),u.label=2;case 2:h=0,m=0,g=B,u.label=3;case 3:return m<g.length?(w=g[m],w.style!==0&&!gt(w.color)&&w.width>0?w.style!==2?[3,5]:[4,this.renderDashedDottedBorder(w.color,w.width,h,t.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return w.style!==3?[3,7]:[4,this.renderDashedDottedBorder(w.color,w.width,h,t.curves,3)];case 6:return u.sent(),[3,11];case 7:return w.style!==4?[3,9]:[4,this.renderDoubleBorder(w.color,w.width,h,t.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(w.color,h,t.curves)];case 10:u.sent(),u.label=11;case 11:h++,u.label=12;case 12:return m++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,o,y,B,A){return Re(this,void 0,void 0,function(){var h,m,g,w,p,u,f,c,a,n,s,r,i,l,d,C,d,C;return xe(this,function(_){return this.ctx.save(),h=uy(B,y),m=Pu(B,y),A===2&&(this.path(m),this.ctx.clip()),We(m[0])?(g=m[0].start.x,w=m[0].start.y):(g=m[0].x,w=m[0].y),We(m[1])?(p=m[1].end.x,u=m[1].end.y):(p=m[1].x,u=m[1].y),y===0||y===2?f=Math.abs(g-p):f=Math.abs(w-u),this.ctx.beginPath(),A===3?this.formatPath(h):this.formatPath(m.slice(0,2)),c=o<3?o*3:o*2,a=o<3?o*2:o,A===3&&(c=o,a=o),n=!0,f<=c*2?n=!1:f<=c*2+a?(s=f/(2*c+a),c*=s,a*=s):(r=Math.floor((f+a)/(c+a)),i=(f-r*c)/(r-1),l=(f-(r+1)*c)/r,a=l<=0||Math.abs(a-i)<Math.abs(a-l)?i:l),n&&(A===3?this.ctx.setLineDash([0,c+a]):this.ctx.setLineDash([c,a])),A===3?(this.ctx.lineCap="round",this.ctx.lineWidth=o):this.ctx.lineWidth=o*2+1.1,this.ctx.strokeStyle=Se(t),this.ctx.stroke(),this.ctx.setLineDash([]),A===2&&(We(m[0])&&(d=m[3],C=m[0],this.ctx.beginPath(),this.formatPath([new q(d.end.x,d.end.y),new q(C.start.x,C.start.y)]),this.ctx.stroke()),We(m[1])&&(d=m[1],C=m[2],this.ctx.beginPath(),this.formatPath([new q(d.end.x,d.end.y),new q(C.start.x,C.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return Re(this,void 0,void 0,function(){var o;return xe(this,function(y){switch(y.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Se(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),o=ay(t),[4,this.renderStack(o)];case 1:return y.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Mu),wy=function(v){return v instanceof iu||v instanceof nu?!0:v instanceof wo&&v.type!==Hn&&v.type!==Mn},By=function(v,e){switch(v){case 0:return Nn(e);case 2:return ry(e);case 1:default:return Vn(e)}},Cy=function(v){switch(v){case 1:return"center";case 2:return"right";case 0:default:return"left"}},by=["-apple-system","system-ui"],_y=function(v){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?v.filter(function(e){return by.indexOf(e)===-1}):v},Ey=function(v){Xe(e,v);function e(t,o){var y=v.call(this,t,o)||this;return y.canvas=o.canvas?o.canvas:document.createElement("canvas"),y.ctx=y.canvas.getContext("2d"),y.options=o,y.canvas.width=Math.floor(o.width*o.scale),y.canvas.height=Math.floor(o.height*o.scale),y.canvas.style.width=o.width+"px",y.canvas.style.height=o.height+"px",y.ctx.scale(y.options.scale,y.options.scale),y.ctx.translate(-o.x,-o.y),y.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+o.width+"x"+o.height+" at "+o.x+","+o.y+") with scale "+o.scale),y}return e.prototype.render=function(t){return Re(this,void 0,void 0,function(){var o,y;return xe(this,function(B){switch(B.label){case 0:return o=vo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Fy(o)];case 1:return y=B.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Se(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(y,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Mu),Fy=function(v){return new Promise(function(e,t){var o=new Image;o.onload=function(){e(o)},o.onerror=t,o.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(v))})},Qy=function(){function v(e){var t=e.id,o=e.enabled;this.id=t,this.enabled=o,this.start=Date.now()}return v.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.prototype.getTime=function(){return Date.now()-this.start},v.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,en([this.id,this.getTime()+"ms"],e))},v.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.instances={},v}(),Sy=function(){function v(e,t){var o;this.windowBounds=t,this.instanceName="#"+v.instanceCount++,this.logger=new Qy({id:this.instanceName,enabled:e.logging}),this.cache=(o=e.cache)!==null&&o!==void 0?o:new Jv(this,e)}return v.instanceCount=1,v}(),Uy=function(v,e){return e===void 0&&(e={}),Ty(v,e)};typeof window<"u"&&Fu.setContext(window);var Ty=function(v,e){return Re(void 0,void 0,void 0,function(){var t,o,y,B,A,h,m,g,w,p,u,f,c,a,n,s,r,i,l,d,_,C,_,b,E,F,Q,U,T,S,P,I,M,K,W,L,O,H,k,G;return xe(this,function(D){switch(D.label){case 0:if(!v||typeof v!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=v.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(o=t.defaultView,!o)throw new Error("Document is not attached to a Window");return y={allowTaint:(b=e.allowTaint)!==null&&b!==void 0?b:!1,imageTimeout:(E=e.imageTimeout)!==null&&E!==void 0?E:15e3,proxy:e.proxy,useCORS:(F=e.useCORS)!==null&&F!==void 0?F:!1},B=Mi({logging:(Q=e.logging)!==null&&Q!==void 0?Q:!0,cache:e.cache},y),A={windowWidth:(U=e.windowWidth)!==null&&U!==void 0?U:o.innerWidth,windowHeight:(T=e.windowHeight)!==null&&T!==void 0?T:o.innerHeight,scrollX:(S=e.scrollX)!==null&&S!==void 0?S:o.pageXOffset,scrollY:(P=e.scrollY)!==null&&P!==void 0?P:o.pageYOffset},h=new ot(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),m=new Sy(B,h),g=(I=e.foreignObjectRendering)!==null&&I!==void 0?I:!1,w={allowTaint:(M=e.allowTaint)!==null&&M!==void 0?M:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:g,copyStyles:g},m.logger.debug("Starting document clone with size "+h.width+"x"+h.height+" scrolled to "+-h.left+","+-h.top),p=new _u(m,v,w),u=p.clonedReferenceElement,u?[4,p.toIFrame(t,h)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=D.sent(),c=Co(u)||Iv(u)?sf(u.ownerDocument):tn(m,u),a=c.width,n=c.height,s=c.left,r=c.top,i=Iy(m,u,e.backgroundColor),l={canvas:e.canvas,backgroundColor:i,scale:(W=(K=e.scale)!==null&&K!==void 0?K:o.devicePixelRatio)!==null&&W!==void 0?W:1,x:((L=e.x)!==null&&L!==void 0?L:0)+s,y:((O=e.y)!==null&&O!==void 0?O:0)+r,width:(H=e.width)!==null&&H!==void 0?H:Math.ceil(a),height:(k=e.height)!==null&&k!==void 0?k:Math.ceil(n)},g?(m.logger.debug("Document cloned, using foreign object rendering"),_=new Ey(m,l),[4,_.render(u)]):[3,3];case 2:return d=D.sent(),[3,5];case 3:return m.logger.debug("Document cloned, element located at "+s+","+r+" with size "+a+"x"+n+" using computed rendering"),m.logger.debug("Starting DOM parsing"),C=au(m,u),i===C.styles.backgroundColor&&(C.styles.backgroundColor=at.TRANSPARENT),m.logger.debug("Starting renderer for element at "+l.x+","+l.y+" with size "+l.width+"x"+l.height),_=new my(m,l),[4,_.render(C)];case 4:d=D.sent(),D.label=5;case 5:return(!((G=e.removeContainer)!==null&&G!==void 0)||G)&&(_u.destroy(f)||m.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),m.logger.debug("Finished rendering"),[2,d]}})})},Iy=function(v,e,t){var o=e.ownerDocument,y=o.documentElement?mr(v,getComputedStyle(o.documentElement).backgroundColor):at.TRANSPARENT,B=o.body?mr(v,getComputedStyle(o.body).backgroundColor):at.TRANSPARENT,A=typeof t=="string"?mr(v,t):t===null?at.TRANSPARENT:4294967295;return e===o.documentElement?gt(y)?gt(B)?A:B:y:A};const Xr=class Xr extends j.EngineObject{constructor(t,o){super(t,o);z(this,"_imageLabel",this.dv(new j.ESImageLabel(`${this.sceneObject.id}_ESImageLabel`)));z(this,"_hasClassDivAndPos",{});const y=o.viewer;if(!y){console.warn("viewer is undefined!");return}t.mainClass=this._imageLabel;const B=this._imageLabel;o.add(B),this.d(()=>o.delete(B));{const A=()=>{if(!y)return;if(!t.instanceClass)throw new Error("!sceneObject.instanceClass");const g=document.createElement("div"),w=this.dv(new t.instanceClass(g,t,o))._container;if(w.style.opacity=t.opacity.toString()??j.ESGeoDiv.defaults.opacity,w.style.position="fixed",w.style.zIndex="-1",w.style.top="0px",!document.body.contains(w)){document.body.appendChild(w);let u=w?w.querySelectorAll("*[class]"):[];for(let f=0;f<u.length;f++){const c=u[f];var p=c.getBoundingClientRect();this._hasClassDivAndPos[c.className]=[c.offsetLeft,c.offsetTop,c.offsetLeft+p.width,c.offsetTop+p.height]}}Uy(w,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:w.offsetWidth,height:w.offsetHeight,scale:1}).then(u=>{document.body.contains(w)&&document.body.removeChild(w),B.url=u.toDataURL(),B.show=t.show}).catch(()=>{document.body.contains(w)&&document.body.removeChild(w)})},h=()=>{try{t.instanceClass?A():(B.url="",B.show=!1)}catch(g){console.error(g)}};h();const m=this.dv(V.createNextAnimateFrameEvent(t.instanceClassChanged,t.opacityChanged));this.d(m.don(h))}{const A=()=>{B.show=t.show};B.show=!1,this.ad(t.showChanged.don(A))}this.d(V.track([B,"anchor"],[t,"anchor"])),this.d(V.bind([B,"position"],[t,"position"])),this.d(V.bind([B,"rotation"],[t,"rotation"])),this.d(V.bind([B,"flyToParam"],[t,"flyToParam"])),this.d(V.bind([B,"flyInParam"],[t,"flyInParam"])),this.d(V.bind([B,"allowPicking"],[t,"allowPicking"])),this.d(V.bind([B,"scale"],[t,"scale"])),this.d(V.track([B,"minVisibleDistance"],[t,"minVisibleDistance"])),this.d(V.track([B,"maxVisibleDistance"],[t,"maxVisibleDistance"])),this.ad(t.automaticLandingEvent.don(()=>{B.automaticLanding()})),this.d(B.pickedEvent.don(A=>{(t.allowPicking??!1)&&t.pickedEvent.emit(A)})),this.d(o.widgetEvent.don(A=>{if(A.objId!==this._imageLabel.id)return;const{type:h,add:m}=A;if(h==="leftClick"&&m){const g=(m==null?void 0:m.classNames)??[],w=Object.keys(this._hasClassDivAndPos);for(let p=0;p<w.length;p++){const u=w[p];let f=this._hasClassDivAndPos[u];m&&m.mouseRelativePos&&m.mouseRelativePos[0]>=f[0]&&m.mouseRelativePos[0]<=f[2]&&m.mouseRelativePos[1]>=f[1]&&m.mouseRelativePos[1]<=f[3]&&g.push(u)}m.classNames=g}t.widgetEvent.emit({type:h,add:m})})),this.d(t.calcFlyToParamEvent.don(()=>{Lt(y,B.id)})),this.d(t.calcFlyInParamEvent.don(()=>{const A=o.getCurrentCameraInfo();if(!A)return;const{position:h,rotation:m}=A;t.flyInParam={position:h,rotation:m,flyDuration:1}})),this.d(t.smoothMoveEvent.don((A,h)=>{zA(y,B.id,A,h)})),this.d(t.smoothMoveWithRotationEvent.don((A,h,m)=>{GA(y,B.id,A,h,m)})),this.d(t.smoothMoveOnGroundEvent.don((A,h,m,g)=>{jA(y,B.id,A,h,g,m)})),this.d(t.smoothMoveWithRotationOnGroundEvent.don((A,h,m,g,w)=>{WA(y,B.id,A,h,m,g,w)})),this.d(t.flyToEvent.don((A,h)=>{B.flyTo(A)})),this.d(t.flyInEvent.don(A=>{B.flyIn(A)}))}};z(Xr,"type",Xr.register("ESUeViewer",j.ESGeoDiv.type,Xr));let Po=Xr;const Yr=class Yr extends De{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.flyToFeatureIndexEvent.don((y,B)=>{o.callUeFunc({f:"flyToFeatureIndex",p:{id:e.id,index:y,duration:B}})})),this.d(e.flyToFeatureEvent.don((y,B,A)=>{o.callUeFunc({f:"flyToFeature",p:{id:e.id,key:y,value:B,duration:A}})}))}};z(Yr,"type",Yr.register("ESUeViewer",j.ESGeoJson.type,Yr));let xo=Yr;const $r=class $r extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z($r,"type",$r.register("ESUeViewer",j.ESGeoLineString.type,$r));let Jn=$r;const Zr=class Zr extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(Zr,"type",Zr.register("ESUeViewer",j.ESGeoRectangle.type,Zr));let Oo=Zr;const qr=class qr extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(qr,"type",qr.register("ESUeViewer",j.ESGeoWater.type,qr));let Mo=qr;const Pt=class Pt extends de{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.setNodePositionEvent.don((y,B)=>{Rs(o,e.id,y,B)})),this.d(e.setNodeRotationEvent.don((y,B)=>{ks(o,e.id,y,B)})),this.d(e.setNodeScaleEvent.don((y,B)=>{Ks(o,e.id,y,B)}))}};z(Pt,"forceUeUpdateProps",[...de.forceUeUpdateProps,"url"]),z(Pt,"propValFuncs",{...de.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(j.rpToap(e)):(e.url=j.ESSceneObject.context.getStrFromEnv(j.rpToap(e.url)),e),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),z(Pt,"type",Pt.register("ESUeViewer",j.ESGltfModel.type,Pt));let Ho=Pt;const eA=class eA extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(eA,"type",eA.register("ESUeViewer",j.ESHeightMeasurement.type,eA));let Lo=eA;const tA=class tA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=async(A,h,m,g)=>{const{viewer:w}=A;if(!w){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const p=await w.callUeFunc({f:"AIMoveTo",p:{id:h,Destination:m,Time:g}});return p.error&&console.error("AIMoveTo:",p.error),p};this.d(e.aiMoveToEvent.don((A,h)=>{y(t,e.id,A,h)}));const B=async(A,h)=>{const{viewer:m}=A;if(!m){console.error("StopAIMove: ueViewer.viewer is undefined");return}const g=await m.callUeFunc({f:"StopAIMove",p:{id:h}});return g.error&&console.error("StopAIMove:",g.error),g};this.d(e.stopAIMoveEvent.don(()=>{B(t,e.id)}))}};z(tA,"type",tA.register("ESUeViewer",j.ESHuman.type,tA));let Do=tA;const xt=class xt extends $e{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.anchor=[.5,1]}};z(xt,"type",xt.register("ESUeViewer",j.ESImageLabel.type,xt)),z(xt,"forceUeUpdateProps",[...$e.forceUeUpdateProps,"url"]),z(xt,"propValFuncs",{...$e.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(j.rpToap(e)):(e.url=j.ESSceneObject.context.getStrFromEnv(j.rpToap(e.url)),e)});let Ro=xt;const rA=class rA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(rA,"type",rA.register("ESUeViewer",j.ESLevelRuntimeModel.type,rA));let ko=rA;const AA=class AA extends $A{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(AA,"type",AA.register("ESUeViewer",j.ESLocalCircle.type,AA));let Ko=AA;const nA=class nA extends De{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(nA,"type",nA.register("ESUeViewer",j.ESLocalPolygonZ.type,nA));let No=nA;const iA=class iA extends $A{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(iA,"type",iA.register("ESUeViewer",j.ESLocalRectangle.type,iA));let Vo=iA;const oA=class oA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(oA,"type",oA.register("ESUeViewer",j.ESLocalSkyBox.type,oA));let Go=oA;const sA=class sA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(sA,"type",sA.register("ESUeViewer",j.ESLocationMeasurement.type,sA));let jo=sA;const aA=class aA extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(aA,"type",aA.register("ESUeViewer",j.ESPipeFence.type,aA));let Wo=aA;const cA=class cA extends Jn{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(cA,"type",cA.register("ESUeViewer",j.ESPipeline.type,cA));let zo=cA;const lA=class lA extends ZA{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.highlightFeatureEvent.don(y=>{const B=typeof y=="number"?y.toString():y;Ms(o,e.id,B)})),this.d(e.highlightFeatureAndFlyToEvent.don((y,B,A,h)=>{const m=typeof y=="number"?y.toString():y;Hs(o,e.id,m,h??1)})),this.d(e.setLayerVisibleEvent.don((y,B)=>{let A="";typeof B!="string"?A=JSON.stringify(B):A=B,Ls(o,e.id,A)})),this.d(e.setLayerColorEvent.don((y,B)=>{let A="";typeof B!="string"?A=JSON.stringify(B):A=B,Ds(o,e.id,A)}))}};z(lA,"type",lA.register("ESUeViewer",j.ESPipeserTileset.type,lA));let Jo=lA;const uA=class uA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(uA,"type",uA.register("ESUeViewer",j.ESPit.type,uA));let Xo=uA;const dA=class dA extends $e{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.ad(e.getInitialStyleEvent.don(async()=>{try{const y=await o.callUeFunc({f:"GetInitialStyle",p:{id:e.id}});y.error!=""&&console.error("getInitialStyleEvent:",y.error),e.initialStyle.value=structuredClone(y.re)}catch(y){console.error("getInitialStyleEvent:",y),e.initialStyle.value=void 0}}))}};z(dA,"type",dA.register("ESUeViewer",j.ESPoi2D.type,dA));let Yo=dA;const fA=class fA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(fA,"type",fA.register("ESUeViewer",j.ESPoi3D.type,fA));let $o=fA;const Ot=class Ot extends De{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(Ot,"type",Ot.register("ESUeViewer",j.ESPoiTileset.type,Ot)),z(Ot,"forceUeUpdateProps",[...De.forceUeUpdateProps,"url"]),z(Ot,"propValFuncs",{...De.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(e):(e.url=j.ESSceneObject.context.getStrFromEnv(e.url),e)});let Zo=Ot;const hA=class hA extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(hA,"type",hA.register("ESUeViewer",j.ESPolygonFence.type,hA));let qo=hA;const pA=class pA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(pA,"type",pA.register("ESUeViewer",j.ESPolygonFlattenedPlane.type,pA));let es=pA;const gA=class gA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(gA,"type",gA.register("ESUeViewer",j.ESPolygonWithHole.type,gA));let ts=gA;const vA=class vA extends _t{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(()=>{e.ids=[]}),this.d(e.highlightInner3DtilesetEvent.don(y=>{y.highlight=!0})),this.d(e.removeHighlightInner3DtilesetEvent.don(y=>{y.highlight=!1}));{const y=h=>{h=h.toLocaleLowerCase();let m=[255,255,255,1];if(h.startsWith("#")){if(h.length===4){let g=parseInt(h[1]+h[1],16),w=parseInt(h[2]+h[2],16),p=parseInt(h[3]+h[3],16);m=[g,w,p,1]}else if(h.length===7){let g=parseInt(h.substring(1,3),16),w=parseInt(h.substring(3,5),16),p=parseInt(h.substring(5,7),16);m=[g,w,p,1]}}else if(h.startsWith("rgba")){let g=h.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(g){let w=parseInt(g[1]),p=parseInt(g[2]),u=parseInt(g[3]),f=parseFloat(g[4]);m=[w,p,u,f]}}else if(h.startsWith("rgb")){let g=h.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(g){let w=parseInt(g[1]),p=parseInt(g[2]),u=parseInt(g[3]);m=[w,p,u,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[m[0]/255,m[1]/255,m[2]/255,m[3]]},B=()=>{const h=e.layerConfig;if(!h)return;const m=[];h.forEach(g=>{m.push({condition:[{field:"layer",op:"==",value:g.layer},{field:"dataset",op:"==",value:g.dataset}],color:y(g.value.color??"rgb(255,255,255)"),show:g.value.visible})}),e.setFeatureStyle(m)};B();const A=this.dv(V.createNextAnimateFrameEvent(e.layerConfigChanged));this.d(A.don(()=>{B()}))}}};z(vA,"type",vA.register("ESUeViewer",j.ESRtsTileset.type,vA));let rs=vA;const yA=class yA extends De{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(e.addTreesEvent.don(y=>{j.addTreesCallFunc(t,e.id,y)})),this.d(e.removeAllTreesEvent.don(()=>{j.removeAllTreesCallFunc(t,e.id)})),this.d(e.updateTreeParamsEvent.don(y=>{j.updateTreeParamsCallFunc(t,e.id,y)})),this.d(e.cutDownTreesEvent.don((y,B)=>{j.cutDownTreesCallFunc(t,e.id,y,B)})),this.d(e.growthSimulationEvent.don((y,B,A)=>{j.growthSimulationCallFunc(t,e.id,y,B,A)}))}};z(yA,"type",yA.register("ESUeViewer",j.ESSeparateFoliage.type,yA));let As=yA;const mA=class mA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(mA,"type",mA.register("ESUeViewer",j.ESSubmergingAnalysis.type,mA));let ns=mA;const wA=class wA extends Ne{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{o.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.stopEvent.don(()=>{o.callUeFunc({f:"Stop",p:{id:e.id}})}))}};z(wA,"type",wA.register("ESUeViewer",j.ESSunshineAnalysis.type,wA));let is=wA;const BA=class BA extends Ne{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{o.callUeFunc({f:"Start",p:{id:e.id}})}))}};z(BA,"type",BA.register("ESUeViewer",j.ESSurfaceAreaMeasurement.type,BA));let os=BA;const CA=class CA extends $e{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(CA,"type",CA.register("ESUeViewer",j.ESTextLabel.type,CA));let ss=CA;const qt=class qt extends $e{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.callFunctionEvent.don(async(y,B)=>{const A=await ti(o,e.id,y,B);e.__callFunctionResultEvent.emit(A)}))}};z(qt,"type",qt.register("ESUeViewer",j.ESUEWidget.type,qt)),z(qt,"propValFuncs",{...$e.propValFuncs,info:e=>JSON.stringify(e??{})});let as=qt;const Hu=v=>{switch(v){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},Py=v=>{switch(v){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},bA=class bA extends j.EngineObject{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn(`${e.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{qn(o,e.id)});const y=async()=>{g()||await o.callUeFunc({f:"update",p:{id:e.id,name:e.name,show:e.show,rotation:e.rotation,flyToParam:e.flyToParam??j.ESVisualObject.defaults.flyToParam,flyInParam:e.flyInParam??j.ESVisualObject.defaults.flyInParam,highlight:e.highlight,collision:e.collision,scale:e.scale,minVisibleDistance:e.minVisibleDistance,maxVisibleDistance:e.maxVisibleDistance}})},B=this.dv(V.createNextAnimateFrameEvent(e.showChanged,e.nameChanged,e.rotationChanged,e.flyToParamChanged,e.flyInParamChanged,e.highlightChanged,e.collisionChanged,e.scaleChanged,e.minVisibleDistanceChanged,e.maxVisibleDistanceChanged));this.d(B.don(y)),this.d(e.flushEvent.don(()=>B.flush()));let A,h;const m=async()=>{g()||(await o.callUeFunc({f:"update",p:{id:e.id,position:e.position}}),(t.debug??!1)&&console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`))},g=()=>!A&&!h?(console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,w=async()=>{const{id:u}=e,f=await t.unBindActorByID(u);f&&f.error!==""&&console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${f.error}`),A=void 0;const c=await o.callUeFunc({f:"destroy",p:{id:u}});if(c&&c.error!==""){console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${c.error}`);return}h=void 0},p=this.dv(V.react({type:"ActorClass",actorClass:"default"}));{const u=this.dv(V.createNextAnimateFrameEvent(e.actorClassChanged,e.actorTagChanged)),f=async()=>{e.actorTag!==""?p.value={type:"ActorTag",actorTag:e.actorTag}:p.value={type:"ActorClass",actorClass:e.actorClass===""?"default":e.actorClass}};f(),this.d(u.don(f)),this.d(e.flushEvent.don(()=>u.flush()))}{const u=this.dv(V.createProcessingFromAsyncFunc(async c=>{if(await c.promise(w()),p.value.type==="ActorTag"){const{actorTag:a}=p.value;await c.promise(w());try{e.lastActorStatus="null";const n=await c.promise(t.bindActorByTag(e.id,a));if(!n)return;if(n.error!==""){console.warn(`${e.id} UeESUnrealActor BindActorByTag:${a},${n.error}`);return}if(n.re.type===0)e.lastActorStatus="bound",A=a;else if(n.re.type===1)e.lastActorStatus="bound",A=a,console.warn(`${e.id} UeESUnrealActor BindActorByTag:${a},${Hu(n.re.type)}`);else{A=void 0,console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${a}, ${Hu(n.re.type)}`);return}}catch(n){console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${a}, ${n}`);return}}else if(p.value.type==="ActorClass"){const{actorClass:a}=p.value;try{const n=await c.promise(t.createActorByClass(e.id,a));if(!n)return;if(n.error!==""){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${a}, ${n.error}`);return}if(n.re.type===0)e.lastActorStatus="created",h=a;else{console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${a},${Py(n.re.type)}`);return}}catch(n){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${a}, ${JSON.stringify(n)}`);return}}await c.promise(y()),await c.promise(m())})),f=async()=>{u.restart()};f(),this.d(p.changed.don(f))}this.d(e.positionChanged.don(m)),this.d(e.callFunctionEvent.don(async(u,f)=>{if(g()){e.__callFunctionResultEvent.emit(void 0);return}const c=await ti(o,e.id,u,f);e.__callFunctionResultEvent.emit(c)})),this.d(e.smoothMoveEvent.don((u,f)=>{g()||zA(o,e.id,u,f)})),this.d(e.smoothMoveWithRotationEvent.don((u,f,c)=>{g()||GA(o,e.id,u,f,c)})),this.d(e.smoothMoveOnGroundEvent.don((u,f,c,a)=>{g()||jA(o,e.id,u,f,a,c)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((u,f,c,a,n)=>{g()||WA(o,e.id,u,f,c,a,n)})),this.d(e.automaticLandingEvent.don(u=>{if(g())return;const f=[e.position[0],e.position[1]];t.getHeightByLonLat(e.position[0],e.position[1],"Visibility").then(c=>{c!==null&&(e.position=[...f,c],e.collision=u)})})),this.d(e.flyToEvent.don(async(u,f)=>{if(g())return;const c=await Ht(o,e.id,u);let a="over";c===void 0?a="error":c.endType===0?a="over":c.endType===1&&(a="cancelled"),e.flyOverEvent.emit(f,a,t)})),this.d(e.calcFlyToParamEvent.don(()=>{g()||Lt(o,e.id)})),this.d(e.calcFlyInParamEvent.don(async()=>{if(!t.actived)return;const u=await t.getCurrentCameraInfo();if(!u)return;const{position:f,rotation:c}=u;e.flyInParam={position:f,rotation:c,flyDuration:1}})),this.d(t.propChanged.don(u=>{g()||u.objId===e.id&&Object.keys(u.props).forEach(f=>{const c=u.props[f]===null?void 0:u.props[f];e[f]=c})}))}};z(bA,"type",bA.register("ESUeViewer",j.ESUnrealActor.type,bA));let cs=bA;const _A=class _A extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(_A,"type",_A.register("ESUeViewer",j.ESVideoFusion.type,_A));let ls=_A;const EA=class EA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(EA,"type",EA.register("ESUeViewer",j.ESViewShed.type,EA));let us=EA;const FA=class FA extends Pe{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is underfined!");return}}};z(FA,"type",FA.register("ESUeViewer",j.ESVisibilityAnalysis.type,FA));let ds=FA;const QA=class QA extends Ne{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.ad(V.track([e,"volume"],[e,"cutAndFillVolume"])),this.d(e.startEvent.don(()=>{o.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.clearEvent.don(()=>{o.callUeFunc({f:"Clear",p:{id:e.id}})}))}};z(QA,"type",QA.register("ESUeViewer",j.ESVolumeMeasurement.type,QA));let fs=QA;const er=class er extends $e{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(er,"type",er.register("ESUeViewer",j.ESWidget.type,er)),z(er,"propValFuncs",{...$e.propValFuncs,info:e=>JSON.stringify(e??{})});let hs=er;const SA=class SA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.poi.actorTag=e.human.id,e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8],this.d(e.poiOffsetHeightChanged.don(()=>{e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8]})),this.d(()=>{e.poi.actorTag=""})}};z(SA,"type",SA.register("ESUeViewer",j.ESHumanPoi.type,SA));let ps=SA;j.ESSceneObject.context.getStrFromEnv(j.ESNavigator.defaults.imgUrl);const UA=class UA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=this.disposeVar(new j.ESCustomDiv);t.add(y),this.dispose(()=>t.delete(y)),this.dispose(V.track([y,"show"],[e,"show"])),y.instanceClass=class extends V.Destroyable{constructor(A,h,m){super(),this._subContainer=A;const g=document.createElement("div");this._subContainer.appendChild(g),this.dispose(()=>this._subContainer.removeChild(g));{const u=async()=>{const f=await t.getCurrentCameraInfo(),c=f==null?void 0:f.position,n=[...f==null?void 0:f.rotation];n[0]=360,t.flyIn(c,n)};g.addEventListener("click",u),g.style.cursor="pointer",this.dispose(()=>g.removeEventListener("click",u))}{const u=()=>{g.style.width=`${e.cssSize?e.cssSize:j.ESNavigator.defaults.cssSize}px`,g.style.height=`${e.cssSize?e.cssSize:j.ESNavigator.defaults.cssSize}px`};u(),e.dispose(e.cssSizeChanged.disposableOn(u))}g.style.position="fixed";{const u=()=>{g.style.top=`${e.cssPosition?e.cssPosition[0]:j.ESNavigator.defaults.cssPosition[0]}px`,g.style.right=`${e.cssPosition?e.cssPosition[1]:j.ESNavigator.defaults.cssPosition[1]}px`};u(),e.dispose(e.cssPositionChanged.disposableOn(u))}g.style.transition=" right 0.4s linear",g.style.cursor="pointer";const w=document.createElement("div");g.appendChild(w),this.dispose(()=>g.removeChild(w)),w.style.width="100%",w.style.height="100%",w.style.position="relative";const p=document.createElement("img");w.appendChild(p),this.dispose(()=>w.removeChild(p)),p.style.width="100%",p.style.height="100%",p.style.border="none";{const u=()=>p.src=e.imgUrl;u(),e.dispose(e.imgUrlChanged.disposableOn(u))}{const u=()=>{const n=-t.getCurrentCameraInfo().rotation[0];p.style.transform=`rotate(${n}deg)`};let f;const c=async()=>{u(),e.show?(g.style.display="block",f=setInterval(()=>{u()},1e3)):(g.style.display="none",clearInterval(f))};this.dispose(e.showChanged.disposableOn(c)),c(),this.dispose(()=>clearInterval(f))}p.style.transformOrigin="50% 50%"}}}};z(UA,"type",UA.register("ESUeViewer",j.ESNavigator.type,UA));let gs=UA;const Mt=class Mt extends Pe{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}{const y=()=>{let B=e.materialMode==="blue"?"multipleArrows":e.materialMode==="purple"?"singleArrow":e.materialMode;o.callUeFunc({f:"update",p:{id:e.id,materialMode:B}})};this.dispose(e.materialModeChanged.disposableOn(y)),this.dispose(e.createdEvent.disposableOn(y))}}};z(Mt,"type",Mt.register("ESUeViewer",j.ESPath.type,Mt)),z(Mt,"forceUeUpdateProps",[...Pe.forceUeUpdateProps]),z(Mt,"propValFuncs",{...Pe.propValFuncs,materialMode:null});let vs=Mt;async function xy(v){navigator.clipboard.writeText(v).then(function(){console.log("复制成功")},function(e){console.log("复制失败")})}const TA=class TA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=this.disposeVar(new j.ESCustomDiv);t.add(y),this.dispose(()=>t.delete(y)),y.instanceClass=class extends V.Destroyable{constructor(A,h,m){if(super(),this._subContainer=A,!m||!(m instanceof it))return;const g=document.createElement("div");this._subContainer.appendChild(g),this.dispose(()=>this._subContainer.removeChild(g)),g.style.width="100%",g.style.position="absolute",g.style.height=`${j.ESViewerStatusBar.defaults.height}px`,g.style.left="0",g.style.bottom="0",g.style.color="#fff",g.style.padding="0 20px 0 0",g.style.boxSizing="border-box",g.style.lineHeight=`${j.ESViewerStatusBar.defaults.height}px`,g.style.zIndex="100",g.style.alignContent="center",g.style.justifyContent="space-between";const w=document.createElement("span");g.appendChild(w),this.dispose(()=>g.removeChild(w));const p=document.createElement("span");w.appendChild(p),this.dispose(()=>w.removeChild(p));const u=document.createElement("span");w.appendChild(u),u.addEventListener("dblclick",function(){let c=u.innerHTML;c.startsWith("鼠标位置")&&(c=c.slice(5)),xy(c)}),u.style.cursor="pointer",this.dispose(()=>w.removeChild(u));const f=document.createElement("span");g.appendChild(f),this.dispose(()=>g.removeChild(f));{const c=()=>{g.style.height=(e.height??j.ESViewerStatusBar.defaults.height)+"px",g.style.lineHeight=(e.height??j.ESViewerStatusBar.defaults.height)+"px"};this.dispose(e.heightChanged.disposableOn(c)),c()}{const c=()=>{g.style.fontSize=(e.fontSize??j.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(e.fontSizeChanged.disposableOn(c)),c()}{const c=()=>{e.bgColor?g.style.background=`rgba(${e.bgColor[0]*255},${e.bgColor[1]*255},${e.bgColor[2]*255},${e.bgColor[3]})`:g.style.background=`rgba(${j.ESViewerStatusBar.defaults.bgColor[0]},${j.ESViewerStatusBar.defaults.bgColor[1]},${j.ESViewerStatusBar.defaults.bgColor[2]},${j.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(e.bgColorChanged.disposableOn(c)),c()}m.getVersion().then(c=>{c&&(f.innerText=`Ue 版本 : ${c[0]} `)}).catch(c=>{console.log(c)});{const c=()=>{let s="",r="";s+=`帧率:${m.getFPS().toFixed(0)}FPS`,p.innerText=s;const i=t.getCurrentCameraInfo();s+=` 经度: ${i.position[0].toFixed(5)}° 纬度: ${i.position[1].toFixed(5)}° 高度: ${i.position[2].toFixed(2)}米 偏航角: ${i.rotation[0].toFixed(2)}° 俯仰角: ${i.rotation[1].toFixed(2)}° 翻滚角:${i.rotation[2].toFixed(2)}° `,p.innerText=s,t.pick().then(l=>{if(l){const{pickResult:d}=l;if(d&&d.position){const{position:C}=d;r+=`鼠标位置:${C[0].toFixed(5)}° ${C[1].toFixed(5)}° ${C[2].toFixed(2)}m`}else r+="暂时无法获取鼠标位置...";u.innerText=r}}).catch(l=>{console.log(l)})};let a;const n=async()=>{c(),e.show?(g.style.display="flex",a=setInterval(()=>{c()},1e3)):(g.style.display="none",clearInterval(a))};this.dispose(e.showChanged.disposableOn(n)),n(),this.dispose(()=>clearInterval(a))}}}}};z(TA,"type",TA.register("ESUeViewer",j.ESViewerStatusBar.type,TA));let ys=TA;const IA=class IA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(IA,"type",IA.register("ESUeViewer",j.ESGaussianSplatting.type,IA));let ms=IA;const PA=class PA extends _t{constructor(t,o){super(t,o);z(this,"_es3DTileset",this.dv(new j.ES3DTileset(`${this.sceneObject.id}_ES3DTileset`)));if(!o.viewer){console.warn("viewer is undefined!");return}t.mainClass=this._es3DTileset;{const B=this._es3DTileset;o.add(B),this.dispose(()=>o.delete(B)),this.d(V.track([B,"allowPicking"],[t,"allowPicking"])),this.d(V.track([B,"collision"],[t,"collision"])),this.d(V.bind([B,"flyToParam"],[t,"flyToParam"])),this.d(V.bind([B,"flyToParam"],[t,"flyToParam"])),this.d(V.track([B,"url"],[t,"url"])),this.d(V.track([B,"actorTag"],[t,"actorTag"])),this.d(V.track([B,"materialMode"],[t,"materialMode"])),this.d(V.track([B,"highlight"],[t,"highlight"])),this.d(V.track([B,"maximumScreenSpaceError"],[t,"maximumScreenSpaceError"])),this.d(V.track([B,"highlightID"],[t,"highlightID"])),this.d(V.track([B,"highlightColor"],[t,"highlightColor"])),this.d(V.bind([B,"offset"],[t,"offset"])),this.d(V.bind([B,"rotation"],[t,"rotation"])),this.d(V.track([B,"czmImageBasedLightingFactor"],[t,"czmImageBasedLightingFactor"])),this.d(V.track([B,"czmLuminanceAtZenith"],[t,"czmLuminanceAtZenith"])),this.d(V.track([B,"czmMaximumMemoryUsage"],[t,"czmMaximumMemoryUsage"])),this.d(V.track([B,"czmClassificationType"],[t,"czmClassificationType"])),this.d(V.track([B,"czmStyleJson"],[t,"czmStyleJson"])),this.d(V.track([B,"czmBackFaceCulling"],[t,"czmBackFaceCulling"])),this.d(V.track([B,"czmDebugShowBoundingVolume"],[t,"czmDebugShowBoundingVolume"])),this.d(V.track([B,"czmDebugShowContentBoundingVolume"],[t,"czmDebugShowContentBoundingVolume"])),this.d(V.track([B,"colorBlendMode"],[t,"colorBlendMode"])),this.d(V.track([B,"cacheBytes"],[t,"cacheBytes"])),this.d(V.track([B,"clippingPlaneEnabled"],[t,"clippingPlaneEnabled"])),this.d(V.track([B,"unionClippingRegions"],[t,"unionClippingRegions"])),this.d(V.track([B,"clippingPlaneEdgeColor"],[t,"clippingPlaneEdgeColor"])),this.d(V.track([B,"clippingPlaneEdgeWidth"],[t,"clippingPlaneEdgeWidth"])),this.d(V.track([B,"materialParams"],[t,"materialParams"])),this.d(V.bind([B,"supportEdit"],[t,"supportEdit"])),this.d(V.bind([B,"clippingPlanesId"],[t,"clippingPlanesId"])),this.d(V.bind([B,"clippingPlaneIds"],[t,"clippingPlaneIds"])),this.d(V.bind([B,"flattenedPlaneId"],[t,"flattenedPlaneId"])),this.d(V.bind([B,"flattenedPlaneEnabled"],[t,"flattenedPlaneEnabled"])),this.d(V.bind([B,"clippingPlaneId"],[t,"clippingPlaneId"])),this.d(V.bind([B,"excavateId"],[t,"excavateId"]))}{const B=this._es3DTileset;this.d(t.refreshTilesetEvent.don(()=>{B.refreshTileset()})),this.d(t.highlightFeatureEvent.don((...A)=>{B.highlightFeature(...A)})),this.d(t.highlightFeatureAndFlyToEvent.don((...A)=>{B.highlightFeatureAndFlyTo(...A)})),this.d(t.setFeatureColorEvent.don((...A)=>{B.setFeatureColor(...A)})),this.d(t.setFeatureVisableEvent.don((...A)=>{B.setFeatureVisable(...A)})),this.d(t.resetFeatureStyleEvent.don((...A)=>{B.resetFeatureStyle(...A)})),this.d(t.flyInEvent.don((...A)=>{B.flyIn(A[0])})),this.d(t.flyToEvent.don((...A)=>{B.flyTo(A[0])})),this.d(t.calcFlyToParamEvent.don((...A)=>{B.calcFlyToParam(...A)})),this.d(t.calcFlyInParamEvent.don((...A)=>{B.calcFlyInParam(...A)}))}{const B=this._es3DTileset;this.d(B.tilesetReady.don(A=>{t.tilesetReady.emit(A)})),this.d(B.pickedEvent.don(A=>{A.assign({sceneObject:t}),t.pickedEvent.emit(A)}))}{const B=()=>{this.es3DTileset.show=t.show};B(),this.d(t.showChanged.don(()=>{B()}))}}get es3DTileset(){return this._es3DTileset}};z(PA,"type",PA.register("ESUeViewer",j.ESRtsFeatureEditing.type,PA));let ws=PA;const xA=class xA extends _t{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(xA,"type",xA.register("ESUeViewer",j.ESMsTileset.type,xA));let Bs=xA;const OA=class OA extends Ne{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}const y=()=>{o.callUeFunc({f:"update",p:{id:e.id,height:e.height??j.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:e.extrudedHeight??j.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:e.perPositionHeight??j.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},B=this.disposeVar(V.createNextAnimateFrameEvent(e.heightChanged,e.extrudedHeightChanged,e.perPositionHeightChanged));this.dispose(B.disposableOn(y)),this.dispose(e.createdEvent.disposableOn(y))}};z(OA,"type",OA.register("ESUeViewer",j.ESGeoExtrudedPolygon.type,OA));let Cs=OA;const MA=class MA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(MA,"type",MA.register("ESUeViewer",j.ESStaticMesh.type,MA));let bs=MA;const HA=class HA extends Pe{constructor(e,t){super(e,t);const o=t.viewer;if(!o){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{o.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.clearEvent.don(()=>{o.callUeFunc({f:"Clear",p:{id:e.id}})}))}};z(HA,"type",HA.register("ESUeViewer",j.ESSkylineAnalysis.type,HA));let _s=HA;J.copyright=void 0;try{const v="earthsdk3-ue",e="3.0.8-beta.2",t="2025-06-16T01:35:09.000Z",o="北京西部世界科技有限公司",y="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",B="bb8010020199b408171f0ba5e38ed63dd6584fbc",h=((Date.now()-1750037709e3)/36e5).toFixed(1),m=`%c🌏 ${v}%c ${e}.${B.slice(0,8)}.${t} (距今${h}个小时)
|
|
340
340
|
%c${y?y+`
|
|
341
341
|
`:""}当前网站正在使用${v},此软件版权归${o}所有
|
|
342
|
-
`;J.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
342
|
+
`;J.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","bb8010020199b408171f0ba5e38ed63dd6584fbc")},get info(){return m},get date(){return"2025-06-16T01:35:09.000Z"},get author(){return"suplyang"},get version(){return"3.0.8-beta.2"},get name(){return"earthsdk3-ue"},get commitId(){return"bb8010020199b408171f0ba5e38ed63dd6584fbc"},print(g=!1){!g&&window._xe2_no_copy_print||console.info(this.info,`
|
|
343
343
|
font-size: 18px;
|
|
344
344
|
font-weight: 1000;
|
|
345
345
|
line-height: 1;
|