earthsdk3-cesium 3.5.0-beta.20 → 3.5.0-beta.21

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.
@@ -362,7 +362,7 @@ ${this.stack.toString()}`),t};function $(t,i,e,n,o,s,r,l,c,u,d,p,f,g,m,y){this[0
362
362
  `);for(let n=0;n<e.length;++n){const o=e[n],s=o.indexOf(": ");if(s>0){const r=o.substring(0,s),l=o.substring(s+2);i[r]=l}}return i}function Lr(t,i,e){this.statusCode=t,this.response=i,this.responseHeaders=e,typeof this.responseHeaders=="string"&&(this.responseHeaders=lS(this.responseHeaders))}Lr.prototype.toString=function(){let t="Request has failed.";return T(this.statusCode)&&(t+=` Status Code: ${this.statusCode}`),t};function vs(){this._listeners=new Map,this._toRemove=new Map,this._toAdd=new Map,this._invokingListeners=!1,this._listenerCount=0}Object.defineProperties(vs.prototype,{numberOfListeners:{get:function(){return this._listenerCount}}}),vs.prototype.addEventListener=function(t,i){b.typeOf.func("listener",t);const e=this,n=e._invokingListeners?e._toAdd:e._listeners;return Ku(this,n,t,i)&&e._listenerCount++,function(){e.removeEventListener(t,i)}};function Ku(t,i,e,n){i.has(e)||i.set(e,new Set);const o=i.get(e);return o.has(n)?!1:(o.add(n),!0)}vs.prototype.removeEventListener=function(t,i){b.typeOf.func("listener",t);const e=Ju(this,this._listeners,t,i),n=Ju(this,this._toAdd,t,i),o=e||n;return o&&this._listenerCount--,o};function Ju(t,i,e,n){const o=i.get(e);if(!o||!o.has(n))return!1;if(t._invokingListeners){if(!Ku(t,t._toRemove,e,n))return!1}else o.delete(n),o.size===0&&i.delete(e);return!0}vs.prototype.raiseEvent=function(){this._invokingListeners=!0;for(const[t,i]of this._listeners.entries())if(T(t))for(const e of i)t.apply(e,arguments);this._invokingListeners=!1;for(const[t,i]of this._toAdd.entries())for(const e of i)Ku(this,this._listeners,t,e);this._toAdd.clear();for(const[t,i]of this._toRemove.entries())for(const e of i)Ju(this,this._listeners,t,e);this._toRemove.clear()};function yo(t){b.typeOf.object("options",t),b.defined("options.comparator",t.comparator),this._comparator=t.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(yo.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(t){b.typeOf.number.greaterThanOrEquals("maximumLength",t,0);const i=this._length;if(t<i){const e=this._array;for(let n=t;n<i;++n)e[n]=void 0;this._length=t,e.length=t}this._maximumLength=t}},comparator:{get:function(){return this._comparator}}});function ju(t,i,e){const n=t[i];t[i]=t[e],t[e]=n}yo.prototype.reserve=function(t){t=t??this._length,this._array.length=t},yo.prototype.heapify=function(t){t=t??0;const i=this._length,e=this._comparator,n=this._array;let o=-1,s=!0;for(;s;){const r=2*(t+1),l=r-1;l<i&&e(n[l],n[t])<0?o=l:o=t,r<i&&e(n[r],n[o])<0&&(o=r),o!==t?(ju(n,o,t),t=o):s=!1}},yo.prototype.resort=function(){const t=this._length;for(let i=Math.ceil(t/2);i>=0;--i)this.heapify(i)},yo.prototype.insert=function(t){b.defined("element",t);const i=this._array,e=this._comparator,n=this._maximumLength;let o=this._length++;for(o<i.length?i[o]=t:i.push(t);o!==0;){const r=Math.floor((o-1)/2);if(e(i[o],i[r])<0)ju(i,o,r),o=r;else break}let s;return T(n)&&this._length>n&&(s=i[n],this._length=n),s},yo.prototype.pop=function(t){if(t=t??0,this._length===0)return;b.typeOf.number.lessThan("index",t,this._length);const i=this._array,e=i[t];return ju(i,t,--this._length),this.heapify(t),i[this._length]=void 0,e};function cS(t,i){return t.priority-i.priority}const Ce={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let ys=20;const ft=new yo({comparator:cS});ft.maximumLength=ys,ft.reserve(ys);const xi=[];let Qi={};const hS=typeof document<"u"?new Zi(document.location.href):new Zi,Gc=new vs;function Ae(){}Ae.maximumRequests=50,Ae.maximumRequestsPerServer=18,Ae.requestsByServer={},Ae.throttleRequests=!0,Ae.debugShowStatistics=!1,Ae.requestCompletedEvent=Gc,Object.defineProperties(Ae,{statistics:{get:function(){return Ce}},priorityHeapLength:{get:function(){return ys},set:function(t){if(t<ys)for(;ft.length>t;){const i=ft.pop();wo(i)}ys=t,ft.maximumLength=t,ft.reserve(t)}}});function pv(t){T(t.priorityFunction)&&(t.priority=t.priorityFunction())}Ae.serverHasOpenSlots=function(t,i){i=i??1;const e=Ae.requestsByServer[t]??Ae.maximumRequestsPerServer;return Qi[t]+i<=e},Ae.heapHasOpenSlots=function(t){return ft.length+t<=ys};function fv(t){return t.state===Ge.UNISSUED&&(t.state=Ge.ISSUED,t.deferred=Fr()),t.deferred.promise}function uS(t){return function(i){if(t.state===Ge.CANCELLED)return;const e=t.deferred;--Ce.numberOfActiveRequests,--Qi[t.serverKey],Gc.raiseEvent(),t.state=Ge.RECEIVED,t.deferred=void 0,e.resolve(i)}}function dS(t){return function(i){t.state!==Ge.CANCELLED&&(++Ce.numberOfFailedRequests,--Ce.numberOfActiveRequests,--Qi[t.serverKey],Gc.raiseEvent(i),t.state=Ge.FAILED,t.deferred.reject(i))}}function gv(t){const i=fv(t);return t.state=Ge.ACTIVE,xi.push(t),++Ce.numberOfActiveRequests,++Ce.numberOfActiveRequestsEver,++Qi[t.serverKey],t.requestFunction().then(uS(t)).catch(dS(t)),i}function wo(t){const i=t.state===Ge.ACTIVE;if(t.state=Ge.CANCELLED,++Ce.numberOfCancelledRequests,T(t.deferred)){const e=t.deferred;t.deferred=void 0,e.reject()}i&&(--Ce.numberOfActiveRequests,--Qi[t.serverKey],++Ce.numberOfCancelledActiveRequests),T(t.cancelFunction)&&t.cancelFunction()}Ae.update=function(){let t,i,e=0;const n=xi.length;for(t=0;t<n;++t){if(i=xi[t],i.cancelled&&wo(i),i.state!==Ge.ACTIVE){++e;continue}e>0&&(xi[t-e]=i)}xi.length-=e;const o=ft.internalArray,s=ft.length;for(t=0;t<s;++t)pv(o[t]);ft.resort();const r=Math.max(Ae.maximumRequests-xi.length,0);let l=0;for(;l<r&&ft.length>0;){if(i=ft.pop(),i.cancelled){wo(i);continue}if(i.throttleByServer&&!Ae.serverHasOpenSlots(i.serverKey)){wo(i);continue}gv(i),++l}pS()},Ae.getServerKey=function(t){b.typeOf.string("url",t);let i=new Zi(t);i.scheme()===""&&(i=i.absoluteTo(hS),i.normalize());let e=i.authority();/:/.test(e)||(e=`${e}:${i.scheme()==="https"?"443":"80"}`);const n=Qi[e];return T(n)||(Qi[e]=0),e},Ae.request=function(t){if(b.typeOf.object("request",t),b.typeOf.string("request.url",t.url),b.typeOf.func("request.requestFunction",t.requestFunction),dv(t.url)||uv(t.url))return Gc.raiseEvent(),t.state=Ge.RECEIVED,t.requestFunction();if(++Ce.numberOfAttemptedRequests,T(t.serverKey)||(t.serverKey=Ae.getServerKey(t.url)),Ae.throttleRequests&&t.throttleByServer&&!Ae.serverHasOpenSlots(t.serverKey))return;if(!Ae.throttleRequests||!t.throttle)return gv(t);if(xi.length>=Ae.maximumRequests)return;pv(t);const i=ft.insert(t);if(T(i)){if(i===t)return;wo(i)}return fv(t)};function pS(){Ae.debugShowStatistics&&(Ce.numberOfActiveRequests===0&&Ce.lastNumberOfActiveRequests>0&&(Ce.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Ce.numberOfAttemptedRequests}`),Ce.numberOfAttemptedRequests=0),Ce.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Ce.numberOfCancelledRequests}`),Ce.numberOfCancelledRequests=0),Ce.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Ce.numberOfCancelledActiveRequests}`),Ce.numberOfCancelledActiveRequests=0),Ce.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Ce.numberOfFailedRequests}`),Ce.numberOfFailedRequests=0)),Ce.lastNumberOfActiveRequests=Ce.numberOfActiveRequests)}Ae.clearForSpecs=function(){for(;ft.length>0;){const i=ft.pop();wo(i)}const t=xi.length;for(let i=0;i<t;++i)wo(xi[i]);xi.length=0,Qi={},Ce.numberOfAttemptedRequests=0,Ce.numberOfActiveRequests=0,Ce.numberOfCancelledRequests=0,Ce.numberOfCancelledActiveRequests=0,Ce.numberOfFailedRequests=0,Ce.numberOfActiveRequestsEver=0,Ce.lastNumberOfActiveRequests=0},Ae.numberOfActiveRequestsByServer=function(t){return Qi[t]},Ae.requestHeap=ft;const ws={};let Cs={};ws.add=function(t,i){if(!T(t))throw new W("host is required.");if(!T(i)||i<=0)throw new W("port is required to be greater than 0.");const e=`${t.toLowerCase()}:${i}`;T(Cs[e])||(Cs[e]=!0)},ws.remove=function(t,i){if(!T(t))throw new W("host is required.");if(!T(i)||i<=0)throw new W("port is required to be greater than 0.");const e=`${t.toLowerCase()}:${i}`;T(Cs[e])&&delete Cs[e]};function fS(t){const i=new Zi(t);i.normalize();let e=i.authority();if(e.length!==0){if(i.authority(e),e.indexOf("@")!==-1&&(e=e.split("@")[1]),e.indexOf(":")===-1){let n=i.scheme();if(n.length===0&&(n=window.location.protocol,n=n.substring(0,n.length-1)),n==="http")e+=":80";else if(n==="https")e+=":443";else return}return e}}ws.contains=function(t){if(!T(t))throw new W("url is required.");const i=fS(t);return!!(T(i)&&T(Cs[i]))},ws.clear=function(){Cs={}};const mv=function(){try{const t=new XMLHttpRequest;return t.open("GET","#",!0),t.responseType="blob",t.responseType==="blob"}catch{return!1}}();function J(t){t=t??Yi.EMPTY_OBJECT,typeof t=="string"&&(t={url:t}),b.typeOf.string("options.url",t.url),this._url=void 0,this._templateValues=Ai(t.templateValues,{}),this._queryParameters=Ai(t.queryParameters,{}),this.headers=Ai(t.headers,{}),this.request=t.request??new Wc,this.proxy=t.proxy,this.retryCallback=t.retryCallback,this.retryAttempts=t.retryAttempts??0,this._retryCount=0,t.parseUrl??!0?this.parseUrl(t.url,!0,!0):this._url=t.url,this._credits=t.credits}function Ai(t,i){return T(t)?ms(t):i}J.createIfNeeded=function(t){return t instanceof J?t.getDerivedResource({request:t.request}):typeof t!="string"?t:new J({url:t})};let _s;J.supportsImageBitmapOptions=function(){return T(_s)?_s:typeof createImageBitmap!="function"?(_s=Promise.resolve(!1),_s):(_s=J.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(i){const e={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(i,e),createImageBitmap(i)])}).then(function(i){const e=hv(i[0]),n=hv(i[1]);return e[1]!==n[1]}).catch(function(){return!1}),_s)},Object.defineProperties(J,{isBlobSupported:{get:function(){return mv}}}),Object.defineProperties(J.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(t){this.parseUrl(t,!1,!1)}},extension:{get:function(){return tS(this._url)}},isDataUri:{get:function(){return dv(this._url)}},isBlobUri:{get:function(){return uv(this._url)}},isCrossOriginUrl:{get:function(){return ku(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}}),J.prototype.toString=function(){return this.getUrlComponent(!0,!0)},J.prototype.parseUrl=function(t,i,e,n){let o=new Zi(t);const s=gS(o.query());this._queryParameters=i?Hc(s,this.queryParameters,e):s,o.search(""),o.fragment(""),T(n)&&o.scheme()===""&&(o=o.absoluteTo(zr(n))),this._url=o.toString()};function gS(t){return t.length===0?{}:t.indexOf("=")===-1?{[t]:void 0}:rS(t)}function Hc(t,i,e){if(!e)return Mn(t,i);const n=ms(t,!0);for(const o in i)if(i.hasOwnProperty(o)){let s=n[o];const r=i[o];T(s)?(Array.isArray(s)||(s=n[o]=[s]),n[o]=s.concat(r)):n[o]=Array.isArray(r)?r.slice():r}return n}J.prototype.getUrlComponent=function(t,i){if(this.isDataUri)return this._url;let e=this._url;t&&(e=`${e}${mS(this.queryParameters)}`),e=e.replace(/%7B/g,"{").replace(/%7D/g,"}");const n=this._templateValues;return Object.keys(n).length>0&&(e=e.replace(/{(.*?)}/g,function(o,s){const r=n[s];return T(r)?encodeURIComponent(r):o})),i&&T(this.proxy)&&(e=this.proxy.getURL(e)),e};function mS(t){const i=Object.keys(t);return i.length===0?"":i.length===1&&!T(t[i[0]])?`?${i[0]}`:`?${sS(t)}`}J.prototype.setQueryParameters=function(t,i){i?this._queryParameters=Hc(this._queryParameters,t,!1):this._queryParameters=Hc(t,this._queryParameters,!1)},J.prototype.appendQueryParameters=function(t){this._queryParameters=Hc(t,this._queryParameters,!0)},J.prototype.setTemplateValues=function(t,i){i?this._templateValues=Mn(this._templateValues,t):this._templateValues=Mn(t,this._templateValues)},J.prototype.getDerivedResource=function(t){const i=this.clone();if(i._retryCount=0,T(t.url)){const e=t.preserveQueryParameters??!1;i.parseUrl(t.url,!0,e,this._url)}return T(t.queryParameters)&&(i._queryParameters=Mn(t.queryParameters,i.queryParameters)),T(t.templateValues)&&(i._templateValues=Mn(t.templateValues,i.templateValues)),T(t.headers)&&(i.headers=Mn(t.headers,i.headers)),T(t.proxy)&&(i.proxy=t.proxy),T(t.request)&&(i.request=t.request),T(t.retryCallback)&&(i.retryCallback=t.retryCallback),T(t.retryAttempts)&&(i.retryAttempts=t.retryAttempts),i},J.prototype.retryOnError=function(t){const i=this.retryCallback;if(typeof i!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);const e=this;return Promise.resolve(i(this,t)).then(function(n){return++e._retryCount,n})},J.prototype.clone=function(t){return T(t)?(t._url=this._url,t._queryParameters=ms(this._queryParameters),t._templateValues=ms(this._templateValues),t.headers=ms(this.headers),t.proxy=this.proxy,t.retryCallback=this.retryCallback,t.retryAttempts=this.retryAttempts,t._retryCount=0,t.request=this.request.clone(),t):new J({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:T(this.credits)?this.credits.slice():void 0})},J.prototype.getBaseUri=function(t){return eS(this.getUrlComponent(t),t)},J.prototype.appendForwardSlash=function(){this._url=jb(this._url)},J.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},J.fetchArrayBuffer=function(t){return new J(t).fetchArrayBuffer()},J.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},J.fetchBlob=function(t){return new J(t).fetchBlob()},J.prototype.fetchImage=function(t){t=t??Yi.EMPTY_OBJECT;const i=t.preferImageBitmap??!1,e=t.preferBlob??!1,n=t.flipY??!1,o=t.skipColorSpaceConversion??!1;if(td(this.request),!mv||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!e)return ed({resource:this,flipY:n,skipColorSpaceConversion:o,preferImageBitmap:i});const s=this.fetchBlob();if(!T(s))return;let r,l,c,u;return J.supportsImageBitmapOptions().then(function(d){return r=d,l=r&&i,s}).then(function(d){if(!T(d))return;if(u=d,l)return J.createImageBitmapFromBlob(d,{flipY:n,premultiplyAlpha:!1,skipColorSpaceConversion:o});const p=window.URL.createObjectURL(d);return c=new J({url:p}),ed({resource:c,flipY:n,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(d){if(T(d))return d.blob=u,l||window.URL.revokeObjectURL(c.url),d}).catch(function(d){return T(c)&&window.URL.revokeObjectURL(c.url),d.blob=u,Promise.reject(d)})};function ed(t){const i=t.resource,e=t.flipY,n=t.skipColorSpaceConversion,o=t.preferImageBitmap,s=i.request;s.url=i.url,s.requestFunction=function(){let l=!1;!i.isDataUri&&!i.isBlobUri&&(l=i.isCrossOriginUrl);const c=Fr();return J._Implementations.createImage(s,l,c,e,n,o),c.promise};const r=Ae.request(s);if(T(r))return r.catch(function(l){return s.state!==Ge.FAILED?Promise.reject(l):i.retryOnError(l).then(function(c){return c?(s.state=Ge.UNISSUED,s.deferred=void 0,ed({resource:i,flipY:e,skipColorSpaceConversion:n,preferImageBitmap:o})):Promise.reject(l)})})}J.fetchImage=function(t){return new J(t).fetchImage({flipY:t.flipY,skipColorSpaceConversion:t.skipColorSpaceConversion,preferBlob:t.preferBlob,preferImageBitmap:t.preferImageBitmap})},J.prototype.fetchText=function(){return this.fetch({responseType:"text"})},J.fetchText=function(t){return new J(t).fetchText()},J.prototype.fetchJson=function(){const t=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(T(t))return t.then(function(i){if(T(i))return JSON.parse(i)})},J.fetchJson=function(t){return new J(t).fetchJson()},J.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},J.fetchXML=function(t){return new J(t).fetchXML()},J.prototype.fetchJsonp=function(t){t=t??"callback",td(this.request);let i;do i=`loadJsonp${F.nextRandomNumber().toString().substring(2,8)}`;while(T(window[i]));return vv(this,t,i)};function vv(t,i,e){const n={};n[i]=e,t.setQueryParameters(n);const o=t.request,s=t.url;o.url=s,o.requestFunction=function(){const l=Fr();return window[e]=function(c){l.resolve(c);try{delete window[e]}catch{window[e]=void 0}},J._Implementations.loadAndExecuteScript(s,e,l),l.promise};const r=Ae.request(o);if(T(r))return r.catch(function(l){return o.state!==Ge.FAILED?Promise.reject(l):t.retryOnError(l).then(function(c){return c?(o.state=Ge.UNISSUED,o.deferred=void 0,vv(t,i,e)):Promise.reject(l)})})}J.fetchJsonp=function(t){return new J(t).fetchJsonp(t.callbackParameterName)},J.prototype._makeRequest=function(t){const i=this;td(i.request);const e=i.request,n=i.url;e.url=n,e.requestFunction=function(){const s=t.responseType,r=Mn(t.headers,i.headers),l=t.overrideMimeType,c=t.method,u=t.data,d=Fr(),p=J._Implementations.loadWithXhr(n,s,c,u,r,d,l);return T(p)&&T(p.abort)&&(e.cancelFunction=function(){p.abort()}),d.promise};const o=Ae.request(e);if(T(o))return o.then(function(s){return e.cancelFunction=void 0,s}).catch(function(s){return e.cancelFunction=void 0,e.state!==Ge.FAILED?Promise.reject(s):i.retryOnError(s).then(function(r){return r?(e.state=Ge.UNISSUED,e.deferred=void 0,i.fetch(t)):Promise.reject(s)})})};function td(t){if(t.state===Ge.ISSUED||t.state===Ge.ACTIVE)throw new at("The Resource is already being fetched.");t.state=Ge.UNISSUED,t.deferred=void 0}const vS=/^data:(.*?)(;base64)?,(.*)$/;function $c(t,i){const e=decodeURIComponent(i);return t?atob(e):e}function yv(t,i){const e=$c(t,i),n=new ArrayBuffer(e.length),o=new Uint8Array(n);for(let s=0;s<e.length;s++)o[s]=e.charCodeAt(s);return n}function yS(t,i){i=i??"";const e=t[1],n=!!t[2],o=t[3];let s,r;switch(i){case"":case"text":return $c(n,o);case"arraybuffer":return yv(n,o);case"blob":return s=yv(n,o),new Blob([s],{type:e});case"document":return r=new DOMParser,r.parseFromString($c(n,o),e);case"json":return JSON.parse($c(n,o));default:throw new W(`Unhandled responseType: ${i}`)}}J.prototype.fetch=function(t){return t=Ai(t,{}),t.method="GET",this._makeRequest(t)},J.fetch=function(t){return new J(t).fetch({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},J.prototype.delete=function(t){return t=Ai(t,{}),t.method="DELETE",this._makeRequest(t)},J.delete=function(t){return new J(t).delete({responseType:t.responseType,overrideMimeType:t.overrideMimeType,data:t.data})},J.prototype.head=function(t){return t=Ai(t,{}),t.method="HEAD",this._makeRequest(t)},J.head=function(t){return new J(t).head({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},J.prototype.options=function(t){return t=Ai(t,{}),t.method="OPTIONS",this._makeRequest(t)},J.options=function(t){return new J(t).options({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},J.prototype.post=function(t,i){return b.defined("data",t),i=Ai(i,{}),i.method="POST",i.data=t,this._makeRequest(i)},J.post=function(t){return new J(t).post(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},J.prototype.put=function(t,i){return b.defined("data",t),i=Ai(i,{}),i.method="PUT",i.data=t,this._makeRequest(i)},J.put=function(t){return new J(t).put(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},J.prototype.patch=function(t,i){return b.defined("data",t),i=Ai(i,{}),i.method="PATCH",i.data=t,this._makeRequest(i)},J.patch=function(t){return new J(t).patch(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},J._Implementations={},J._Implementations.loadImageElement=function(t,i,e){const n=new Image;n.onload=function(){n.naturalWidth===0&&n.naturalHeight===0&&n.width===0&&n.height===0&&(n.width=300,n.height=150),e.resolve(n)},n.onerror=function(o){e.reject(o)},i&&(ws.contains(t)?n.crossOrigin="use-credentials":n.crossOrigin=""),n.src=t},J._Implementations.createImage=function(t,i,e,n,o,s){const r=t.url;J.supportsImageBitmapOptions().then(function(l){if(!(l&&s)){J._Implementations.loadImageElement(r,i,e);return}const c="blob",u="GET",d=Fr(),p=J._Implementations.loadWithXhr(r,c,u,void 0,void 0,d,void 0,void 0,void 0);return T(p)&&T(p.abort)&&(t.cancelFunction=function(){p.abort()}),d.promise.then(function(f){if(!T(f)){e.reject(new at(`Successfully retrieved ${r} but it contained no content.`));return}return J.createImageBitmapFromBlob(f,{flipY:n,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(f){e.resolve(f)})}).catch(function(l){e.reject(l)})},J.createImageBitmapFromBlob=function(t,i){return b.defined("options",i),b.typeOf.bool("options.flipY",i.flipY),b.typeOf.bool("options.premultiplyAlpha",i.premultiplyAlpha),b.typeOf.bool("options.skipColorSpaceConversion",i.skipColorSpaceConversion),createImageBitmap(t,{imageOrientation:i.flipY?"flipY":"none",premultiplyAlpha:i.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:i.skipColorSpaceConversion?"none":"default"})};function wS(t,i,e,n,o,s,r){fetch(t,{method:e,headers:o}).then(async l=>{if(!l.ok){const c={};l.headers.forEach((u,d)=>{c[d]=u}),s.reject(new Lr(l.status,l,c));return}switch(i){case"text":s.resolve(l.text());break;case"json":s.resolve(l.json());break;default:s.resolve(new Uint8Array(await l.arrayBuffer()).buffer);break}}).catch(()=>{s.reject(new Lr)})}const CS=typeof XMLHttpRequest>"u";J._Implementations.loadWithXhr=function(t,i,e,n,o,s,r){const l=vS.exec(t);if(l!==null){s.resolve(yS(l,i));return}if(CS){wS(t,i,e,n,o,s);return}const c=new XMLHttpRequest;if(ws.contains(t)&&(c.withCredentials=!0),c.open(e,t,!0),T(r)&&T(c.overrideMimeType)&&c.overrideMimeType(r),T(o))for(const d in o)o.hasOwnProperty(d)&&c.setRequestHeader(d,o[d]);T(i)&&(c.responseType=i);let u=!1;return typeof t=="string"&&(u=t.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(u&&c.status===0)){s.reject(new Lr(c.status,c.response,c.getAllResponseHeaders()));return}const d=c.response,p=c.responseType;if(e==="HEAD"||e==="OPTIONS"){const g=c.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};g.forEach(function(y){const _=y.split(": "),P=_.shift();m[P]=_.join(": ")}),s.resolve(m);return}if(c.status===204)s.resolve(void 0);else if(T(d)&&(!T(i)||p===i))s.resolve(d);else if(i==="json"&&typeof d=="string")try{s.resolve(JSON.parse(d))}catch(f){s.reject(f)}else(p===""||p==="document")&&T(c.responseXML)&&c.responseXML.hasChildNodes()?s.resolve(c.responseXML):(p===""||p==="text")&&T(c.responseText)?s.resolve(c.responseText):s.reject(new at("Invalid XMLHttpRequest response type."))},c.onerror=function(d){s.reject(new Lr)},c.send(n),c},J._Implementations.loadAndExecuteScript=function(t,i,e){return oS(t).catch(function(n){e.reject(n)})},J._DefaultImplementations={},J._DefaultImplementations.createImage=J._Implementations.createImage,J._DefaultImplementations.loadWithXhr=J._Implementations.loadWithXhr,J._DefaultImplementations.loadAndExecuteScript=J._Implementations.loadAndExecuteScript,J.DEFAULT=Object.freeze(new J({url:typeof document>"u"?"":document.location.href.split("?")[0]}));function Or(t){t=t??Yi.EMPTY_OBJECT,this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=t.addNewLeapSeconds??!0,T(t.data)?wv(this,t.data):wv(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}Or.fromUrl=async function(t,i){b.defined("url",t),i=i??Yi.EMPTY_OBJECT;const e=J.createIfNeeded(t);let n;try{n=await e.fetchJson()}catch{throw new at(`An error occurred while retrieving the EOP data from the URL ${e.url}.`)}return new Or({addNewLeapSeconds:i.addNewLeapSeconds,data:n})},Or.NONE=Object.freeze({compute:function(t,i){return T(i)?(i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0):i=new Gu(0,0,0,0,0),i}}),Or.prototype.compute=function(t,i){if(!T(this._samples))return;if(T(i)||(i=new Gu(0,0,0,0,0)),this._samples.length===0)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;const e=this._dates,n=this._lastIndex;let o=0,s=0;if(T(n)){const l=e[n],c=e[n+1],u=k.lessThanOrEquals(l,t),d=!T(c),p=d||k.greaterThanOrEquals(c,t);if(u&&p)return o=n,!d&&c.equals(t)&&++o,s=o+1,_v(this,e,this._samples,t,o,s,i),i}let r=Dr(e,t,k.compare,this._dateColumn);return r>=0?(r<e.length-1&&e[r+1].equals(t)&&++r,o=r,s=r):(s=~r,o=s-1,o<0&&(o=0)),this._lastIndex=o,_v(this,e,this._samples,t,o,s,i),i};function _S(t,i){return k.compare(t.julianDate,i)}function wv(t,i){if(!T(i.columnNames))throw new at("Error in loaded EOP data: The columnNames property is required.");if(!T(i.samples))throw new at("Error in loaded EOP data: The samples property is required.");const e=i.columnNames.indexOf("modifiedJulianDateUtc"),n=i.columnNames.indexOf("xPoleWanderRadians"),o=i.columnNames.indexOf("yPoleWanderRadians"),s=i.columnNames.indexOf("ut1MinusUtcSeconds"),r=i.columnNames.indexOf("xCelestialPoleOffsetRadians"),l=i.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=i.columnNames.indexOf("taiMinusUtcSeconds");if(e<0||n<0||o<0||s<0||r<0||l<0||c<0)throw new at("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");const u=t._samples=i.samples,d=t._dates=[];t._dateColumn=e,t._xPoleWanderRadiansColumn=n,t._yPoleWanderRadiansColumn=o,t._ut1MinusUtcSecondsColumn=s,t._xCelestialPoleOffsetRadiansColumn=r,t._yCelestialPoleOffsetRadiansColumn=l,t._taiMinusUtcSecondsColumn=c,t._columnCount=i.columnNames.length,t._lastIndex=void 0;let p;const f=t._addNewLeapSeconds;for(let g=0,m=u.length;g<m;g+=t._columnCount){const y=u[g+e],_=u[g+c],P=y+Oe.MODIFIED_JULIAN_DATE_DIFFERENCE,C=new k(P,_,de.TAI);if(d.push(C),f){if(_!==p&&T(p)){const S=k.leapSeconds,x=Dr(S,C,_S);if(x<0){const A=new Se(C,_);S.splice(~x,0,A)}}p=_}}}function Cv(t,i,e,n,o){const s=e*n;o.xPoleWander=i[s+t._xPoleWanderRadiansColumn],o.yPoleWander=i[s+t._yPoleWanderRadiansColumn],o.xPoleOffset=i[s+t._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=i[s+t._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=i[s+t._ut1MinusUtcSecondsColumn]}function Nr(t,i,e){return i+t*(e-i)}function _v(t,i,e,n,o,s,r){const l=t._columnCount;if(s>i.length-1)return r.xPoleWander=0,r.yPoleWander=0,r.xPoleOffset=0,r.yPoleOffset=0,r.ut1MinusUtc=0,r;const c=i[o],u=i[s];if(c.equals(u)||n.equals(c))return Cv(t,e,o,l,r),r;if(n.equals(u))return Cv(t,e,s,l,r),r;const d=k.secondsDifference(n,c)/k.secondsDifference(u,c),p=o*l,f=s*l;let g=e[p+t._ut1MinusUtcSecondsColumn],m=e[f+t._ut1MinusUtcSecondsColumn];const y=m-g;if(y>.5||y<-.5){const _=e[p+t._taiMinusUtcSecondsColumn],P=e[f+t._taiMinusUtcSecondsColumn];_!==P&&(u.equals(n)?g=m:m-=P-_)}return r.xPoleWander=Nr(d,e[p+t._xPoleWanderRadiansColumn],e[f+t._xPoleWanderRadiansColumn]),r.yPoleWander=Nr(d,e[p+t._yPoleWanderRadiansColumn],e[f+t._yPoleWanderRadiansColumn]),r.xPoleOffset=Nr(d,e[p+t._xCelestialPoleOffsetRadiansColumn],e[f+t._xCelestialPoleOffsetRadiansColumn]),r.yPoleOffset=Nr(d,e[p+t._yCelestialPoleOffsetRadiansColumn],e[f+t._yCelestialPoleOffsetRadiansColumn]),r.ut1MinusUtc=Nr(d,g,m),r}function je(t,i,e){this.heading=t??0,this.pitch=i??0,this.roll=e??0}je.fromQuaternion=function(t,i){if(!T(t))throw new W("quaternion is required");T(i)||(i=new je);const e=2*(t.w*t.y-t.z*t.x),n=1-2*(t.x*t.x+t.y*t.y),o=2*(t.w*t.x+t.y*t.z),s=1-2*(t.y*t.y+t.z*t.z),r=2*(t.w*t.z+t.x*t.y);return i.heading=-Math.atan2(r,s),i.roll=Math.atan2(o,n),i.pitch=-F.asinClamped(e),i},je.fromDegrees=function(t,i,e,n){if(!T(t))throw new W("heading is required");if(!T(i))throw new W("pitch is required");if(!T(e))throw new W("roll is required");return T(n)||(n=new je),n.heading=t*F.RADIANS_PER_DEGREE,n.pitch=i*F.RADIANS_PER_DEGREE,n.roll=e*F.RADIANS_PER_DEGREE,n},je.clone=function(t,i){if(T(t))return T(i)?(i.heading=t.heading,i.pitch=t.pitch,i.roll=t.roll,i):new je(t.heading,t.pitch,t.roll)},je.equals=function(t,i){return t===i||T(t)&&T(i)&&t.heading===i.heading&&t.pitch===i.pitch&&t.roll===i.roll},je.equalsEpsilon=function(t,i,e,n){return t===i||T(t)&&T(i)&&F.equalsEpsilon(t.heading,i.heading,e,n)&&F.equalsEpsilon(t.pitch,i.pitch,e,n)&&F.equalsEpsilon(t.roll,i.roll,e,n)},je.prototype.clone=function(t){return je.clone(this,t)},je.prototype.equals=function(t){return je.equals(this,t)},je.prototype.equalsEpsilon=function(t,i,e){return je.equalsEpsilon(this,t,i,e)},je.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};const Pv=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function PS(){const t=document.getElementsByTagName("script");for(let i=0,e=t.length;i<e;++i){const n=t[i].getAttribute("src"),o=Pv.exec(n);if(o!==null)return o[1]}}let qc;function bv(t){return typeof document>"u"?t:(T(qc)||(qc=document.createElement("a")),qc.href=t,qc.href)}let Co;function Sv(){if(T(Co))return Co;let t;if(typeof CESIUM_BASE_URL<"u"?t=CESIUM_BASE_URL:T(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ko&&Ko.tagName.toUpperCase()==="SCRIPT"&&Ko.src||new URL("earthsdk3-cesium.umd.cjs",document.baseURI).href)?t=zr(".",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ko&&Ko.tagName.toUpperCase()==="SCRIPT"&&Ko.src||new URL("earthsdk3-cesium.umd.cjs",document.baseURI).href):typeof define=="object"&&T(define.amd)&&!define.amd.toUrlUndefined&&T(require.toUrl)?t=zr("..",ni("Core/buildModuleUrl.js")):t=PS(),!T(t))throw new W("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return Co=new J({url:bv(t)}),Co.appendForwardSlash(),Co}function bS(t){return bv(require.toUrl(`../${t}`))}function Ev(t){return Sv().getDerivedResource({url:t}).url}let Xc;function ni(t){return T(Xc)||(typeof define=="object"&&T(define.amd)&&!define.amd.toUrlUndefined&&T(require.toUrl)?Xc=bS:Xc=Ev),Xc(t)}ni._cesiumScriptRegex=Pv,ni._buildModuleUrlFromBaseUrl=Ev,ni._clearBaseResource=function(){Co=void 0},ni.setBaseUrl=function(t){Co=J.DEFAULT.getDerivedResource({url:t})},ni.getCesiumBaseUrl=Sv;function xv(t,i,e){this.x=t,this.y=i,this.s=e}function id(t){t=t??Yi.EMPTY_OBJECT,this._xysFileUrlTemplate=J.createIfNeeded(t.xysFileUrlTemplate),this._interpolationOrder=t.interpolationOrder??9,this._sampleZeroJulianEphemerisDate=t.sampleZeroJulianEphemerisDate??24423965e-1,this._sampleZeroDateTT=new k(this._sampleZeroJulianEphemerisDate,0,de.TAI),this._stepSizeDays=t.stepSizeDays??1,this._samplesPerXysFile=t.samplesPerXysFile??1e3,this._totalSamples=t.totalSamples??27426,this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];const i=this._interpolationOrder,e=this._denominators=new Array(i+1),n=this._xTable=new Array(i+1),o=Math.pow(this._stepSizeDays,i);for(let s=0;s<=i;++s){e[s]=o,n[s]=s*this._stepSizeDays;for(let r=0;r<=i;++r)r!==s&&(e[s]*=s-r);e[s]=1/e[s]}this._work=new Array(i+1),this._coef=new Array(i+1)}const SS=new k(0,0,de.TAI);function nd(t,i,e){const n=SS;return n.dayNumber=i,n.secondsOfDay=e,k.daysDifference(n,t._sampleZeroDateTT)}id.prototype.preload=function(t,i,e,n){const o=nd(this,t,i),s=nd(this,e,n);let r=o/this._stepSizeDays-this._interpolationOrder/2|0;r<0&&(r=0);let l=s/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;l>=this._totalSamples&&(l=this._totalSamples-1);const c=r/this._samplesPerXysFile|0,u=l/this._samplesPerXysFile|0,d=[];for(let p=c;p<=u;++p)d.push(od(this,p));return Promise.all(d)},id.prototype.computeXysRadians=function(t,i,e){const n=nd(this,t,i);if(n<0)return;const o=n/this._stepSizeDays|0;if(o>=this._totalSamples)return;const s=this._interpolationOrder;let r=o-(s/2|0);r<0&&(r=0);let l=r+s;l>=this._totalSamples&&(l=this._totalSamples-1,r=l-s,r<0&&(r=0));let c=!1;const u=this._samples;if(T(u[r*3])||(od(this,r/this._samplesPerXysFile|0),c=!0),T(u[l*3])||(od(this,l/this._samplesPerXysFile|0),c=!0),c)return;T(e)?(e.x=0,e.y=0,e.s=0):e=new xv(0,0,0);const d=n-r*this._stepSizeDays,p=this._work,f=this._denominators,g=this._coef,m=this._xTable;let y,_;for(y=0;y<=s;++y)p[y]=d-m[y];for(y=0;y<=s;++y){for(g[y]=1,_=0;_<=s;++_)_!==y&&(g[y]*=p[_]);g[y]*=f[y];let P=(r+y)*3;e.x+=g[y]*u[P++],e.y+=g[y]*u[P++],e.s+=g[y]*u[P]}return e};function od(t,i){if(t._chunkDownloadsInProgress[i])return t._chunkDownloadsInProgress[i];let e;const n=t._xysFileUrlTemplate;T(n)?e=n.getDerivedResource({templateValues:{0:i}}):e=new J({url:ni(`Assets/IAU2006_XYS/IAU2006_XYS_${i}.json`)});const o=e.fetchJson().then(function(s){t._chunkDownloadsInProgress[i]=!1;const r=t._samples,l=s.samples,c=i*t._samplesPerXysFile*3;for(let u=0,d=l.length;u<d;++u)r[c+u]=l[u]});return t._chunkDownloadsInProgress[i]=o,o}let In;const Be={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Ft={};Object.defineProperties(Ft,{element:{get:function(){if(Ft.supportsFullscreen())return document[Be.fullscreenElement]}},changeEventName:{get:function(){if(Ft.supportsFullscreen())return Be.fullscreenchange}},errorEventName:{get:function(){if(Ft.supportsFullscreen())return Be.fullscreenerror}},enabled:{get:function(){if(Ft.supportsFullscreen())return document[Be.fullscreenEnabled]}},fullscreen:{get:function(){if(Ft.supportsFullscreen())return Ft.element!==null}}}),Ft.supportsFullscreen=function(){if(T(In))return In;In=!1;const t=document.body;if(typeof t.requestFullscreen=="function")return Be.requestFullscreen="requestFullscreen",Be.exitFullscreen="exitFullscreen",Be.fullscreenEnabled="fullscreenEnabled",Be.fullscreenElement="fullscreenElement",Be.fullscreenchange="fullscreenchange",Be.fullscreenerror="fullscreenerror",In=!0,In;const i=["webkit","moz","o","ms","khtml"];let e;for(let n=0,o=i.length;n<o;++n){const s=i[n];e=`${s}RequestFullscreen`,typeof t[e]=="function"?(Be.requestFullscreen=e,In=!0):(e=`${s}RequestFullScreen`,typeof t[e]=="function"&&(Be.requestFullscreen=e,In=!0)),e=`${s}ExitFullscreen`,typeof document[e]=="function"?Be.exitFullscreen=e:(e=`${s}CancelFullScreen`,typeof document[e]=="function"&&(Be.exitFullscreen=e)),e=`${s}FullscreenEnabled`,document[e]!==void 0?Be.fullscreenEnabled=e:(e=`${s}FullScreenEnabled`,document[e]!==void 0&&(Be.fullscreenEnabled=e)),e=`${s}FullscreenElement`,document[e]!==void 0?Be.fullscreenElement=e:(e=`${s}FullScreenElement`,document[e]!==void 0&&(Be.fullscreenElement=e)),e=`${s}fullscreenchange`,document[`on${e}`]!==void 0&&(s==="ms"&&(e="MSFullscreenChange"),Be.fullscreenchange=e),e=`${s}fullscreenerror`,document[`on${e}`]!==void 0&&(s==="ms"&&(e="MSFullscreenError"),Be.fullscreenerror=e)}return In},Ft.requestFullscreen=function(t,i){Ft.supportsFullscreen()&&t[Be.requestFullscreen]({vrDisplay:i})},Ft.exitFullscreen=function(){Ft.supportsFullscreen()&&document[Be.exitFullscreen]()},Ft._names=Be;let gt;typeof navigator<"u"?gt=navigator:gt={};function _o(t){const i=t.split(".");for(let e=0,n=i.length;e<n;++e)i[e]=parseInt(i[e],10);return i}let Yc,Av;function sd(){if(!T(Yc)&&(Yc=!1,!Kc())){const t=/ Chrome\/([\.0-9]+)/.exec(gt.userAgent);t!==null&&(Yc=!0,Av=_o(t[1]))}return Yc}function ES(){return sd()&&Av}let Zc,Tv;function Mv(){if(!T(Zc)&&(Zc=!1,!sd()&&!Kc()&&/ Safari\/[\.0-9]+/.test(gt.userAgent))){const t=/ Version\/([\.0-9]+)/.exec(gt.userAgent);t!==null&&(Zc=!0,Tv=_o(t[1]))}return Zc}function xS(){return Mv()&&Tv}let Qc,rd;function Iv(){if(!T(Qc)){Qc=!1;const t=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(gt.userAgent);t!==null&&(Qc=!0,rd=_o(t[1]),rd.isNightly=!!t[2])}return Qc}function AS(){return Iv()&&rd}let Br,ad;function Dv(){if(!T(Br)){Br=!1;let t;gt.appName==="Microsoft Internet Explorer"?(t=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(gt.userAgent),t!==null&&(Br=!0,ad=_o(t[1]))):gt.appName==="Netscape"&&(t=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(gt.userAgent),t!==null&&(Br=!0,ad=_o(t[1])))}return Br}function TS(){return Dv()&&ad}let kc,Rv;function Kc(){if(!T(kc)){kc=!1;const t=/ Edg\/([\.0-9]+)/.exec(gt.userAgent);t!==null&&(kc=!0,Rv=_o(t[1]))}return kc}function MS(){return Kc()&&Rv}let Jc,ld;function jc(){if(!T(Jc)){Jc=!1;const t=/Firefox\/([\.0-9]+)/.exec(gt.userAgent);t!==null&&(Jc=!0,ld=_o(t[1]))}return Jc}let cd;function IS(){return T(cd)||(cd=/Windows/i.test(gt.appVersion)),cd}let hd;function DS(){return T(hd)||(hd=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),hd}function RS(){return jc()&&ld}let ud;function FS(){return T(ud)||(ud=!jc()&&typeof PointerEvent<"u"&&(!T(gt.pointerEnabled)||gt.pointerEnabled)),ud}let Fv,eh;function zv(){if(!T(eh)){const t=document.createElement("canvas");t.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");const i=t.style.imageRendering;eh=T(i)&&i!=="",eh&&(Fv=i)}return eh}function zS(){return zv()?Fv:void 0}function mt(){if(!mt.initialized)throw new W("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return mt._result}mt._promise=void 0,mt._result=void 0,mt.initialize=function(){return T(mt._promise)||(mt._promise=new Promise(t=>{const i=new Image;i.onload=function(){mt._result=i.width>0&&i.height>0,t(mt._result)},i.onerror=function(){mt._result=!1,t(mt._result)},i.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),mt._promise},Object.defineProperties(mt,{initialized:{get:function(){return T(mt._result)}}});const Ps=[];typeof ArrayBuffer<"u"&&(Ps.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&Ps.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&Ps.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&Ps.push(BigInt64Array),typeof BigUint64Array<"u"&&Ps.push(BigUint64Array));const lt={isChrome:sd,chromeVersion:ES,isSafari:Mv,safariVersion:xS,isWebkit:Iv,webkitVersion:AS,isInternetExplorer:Dv,internetExplorerVersion:TS,isEdge:Kc,edgeVersion:MS,isFirefox:jc,firefoxVersion:RS,isWindows:IS,isIPadOrIOS:DS,hardwareConcurrency:gt.hardwareConcurrency??3,supportsPointerEvents:FS,supportsImageRenderingPixelated:zv,supportsWebP:mt,imageRenderingValue:zS,typedArrayTypes:Ps};lt.supportsBasis=function(t){return lt.supportsWebAssembly()&&t.context.supportsBasis},lt.supportsFullscreen=function(){return Ft.supportsFullscreen()},lt.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},lt.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"},lt.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"},lt.supportsBigInt=function(){return typeof BigInt<"u"},lt.supportsWebWorkers=function(){return typeof Worker<"u"},lt.supportsWebAssembly=function(){return typeof WebAssembly<"u"},lt.supportsWebgl2=function(t){return b.defined("scene",t),t.context.webgl2},lt.supportsEsmWebWorkers=function(){return!jc()||parseInt(ld)>=114};function Z(t,i,e,n){this.x=t??0,this.y=i??0,this.z=e??0,this.w=n??0}let Vr=new I;Z.fromAxisAngle=function(t,i,e){b.typeOf.object("axis",t),b.typeOf.number("angle",i);const n=i/2,o=Math.sin(n);Vr=I.normalize(t,Vr);const s=Vr.x*o,r=Vr.y*o,l=Vr.z*o,c=Math.cos(n);return T(e)?(e.x=s,e.y=r,e.z=l,e.w=c,e):new Z(s,r,l,c)};const LS=[1,2,0],OS=new Array(3);Z.fromRotationMatrix=function(t,i){b.typeOf.object("matrix",t);let e,n,o,s,r;const l=t[H.COLUMN0ROW0],c=t[H.COLUMN1ROW1],u=t[H.COLUMN2ROW2],d=l+c+u;if(d>0)e=Math.sqrt(d+1),r=.5*e,e=.5/e,n=(t[H.COLUMN1ROW2]-t[H.COLUMN2ROW1])*e,o=(t[H.COLUMN2ROW0]-t[H.COLUMN0ROW2])*e,s=(t[H.COLUMN0ROW1]-t[H.COLUMN1ROW0])*e;else{const p=LS;let f=0;c>l&&(f=1),u>l&&u>c&&(f=2);const g=p[f],m=p[g];e=Math.sqrt(t[H.getElementIndex(f,f)]-t[H.getElementIndex(g,g)]-t[H.getElementIndex(m,m)]+1);const y=OS;y[f]=.5*e,e=.5/e,r=(t[H.getElementIndex(m,g)]-t[H.getElementIndex(g,m)])*e,y[g]=(t[H.getElementIndex(g,f)]+t[H.getElementIndex(f,g)])*e,y[m]=(t[H.getElementIndex(m,f)]+t[H.getElementIndex(f,m)])*e,n=-y[0],o=-y[1],s=-y[2]}return T(i)?(i.x=n,i.y=o,i.z=s,i.w=r,i):new Z(n,o,s,r)};const Lv=new Z;let Ov=new Z,dd=new Z,Nv=new Z;Z.fromHeadingPitchRoll=function(t,i){return b.typeOf.object("headingPitchRoll",t),Nv=Z.fromAxisAngle(I.UNIT_X,t.roll,Lv),dd=Z.fromAxisAngle(I.UNIT_Y,-t.pitch,i),i=Z.multiply(dd,Nv,dd),Ov=Z.fromAxisAngle(I.UNIT_Z,-t.heading,Lv),Z.multiply(Ov,i,i)};const th=new I,pd=new I,gi=new Z,Bv=new Z,ih=new Z;Z.packedLength=4,Z.pack=function(t,i,e){return b.typeOf.object("value",t),b.defined("array",i),e=e??0,i[e++]=t.x,i[e++]=t.y,i[e++]=t.z,i[e]=t.w,i},Z.unpack=function(t,i,e){return b.defined("array",t),i=i??0,T(e)||(e=new Z),e.x=t[i],e.y=t[i+1],e.z=t[i+2],e.w=t[i+3],e},Z.packedInterpolationLength=3,Z.convertPackedArrayForInterpolation=function(t,i,e,n){Z.unpack(t,e*4,ih),Z.conjugate(ih,ih);for(let o=0,s=e-i+1;o<s;o++){const r=o*3;Z.unpack(t,(i+o)*4,gi),Z.multiply(gi,ih,gi),gi.w<0&&Z.negate(gi,gi),Z.computeAxis(gi,th);const l=Z.computeAngle(gi);T(n)||(n=[]),n[r]=th.x*l,n[r+1]=th.y*l,n[r+2]=th.z*l}},Z.unpackInterpolationResult=function(t,i,e,n,o){T(o)||(o=new Z),I.fromArray(t,0,pd);const s=I.magnitude(pd);return Z.unpack(i,n*4,Bv),s===0?Z.clone(Z.IDENTITY,gi):Z.fromAxisAngle(pd,s,gi),Z.multiply(gi,Bv,o)},Z.clone=function(t,i){if(T(t))return T(i)?(i.x=t.x,i.y=t.y,i.z=t.z,i.w=t.w,i):new Z(t.x,t.y,t.z,t.w)},Z.conjugate=function(t,i){return b.typeOf.object("quaternion",t),b.typeOf.object("result",i),i.x=-t.x,i.y=-t.y,i.z=-t.z,i.w=t.w,i},Z.magnitudeSquared=function(t){return b.typeOf.object("quaternion",t),t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},Z.magnitude=function(t){return Math.sqrt(Z.magnitudeSquared(t))},Z.normalize=function(t,i){b.typeOf.object("result",i);const e=1/Z.magnitude(t),n=t.x*e,o=t.y*e,s=t.z*e,r=t.w*e;return i.x=n,i.y=o,i.z=s,i.w=r,i},Z.inverse=function(t,i){b.typeOf.object("result",i);const e=Z.magnitudeSquared(t);return i=Z.conjugate(t,i),Z.multiplyByScalar(i,1/e,i)},Z.add=function(t,i,e){return b.typeOf.object("left",t),b.typeOf.object("right",i),b.typeOf.object("result",e),e.x=t.x+i.x,e.y=t.y+i.y,e.z=t.z+i.z,e.w=t.w+i.w,e},Z.subtract=function(t,i,e){return b.typeOf.object("left",t),b.typeOf.object("right",i),b.typeOf.object("result",e),e.x=t.x-i.x,e.y=t.y-i.y,e.z=t.z-i.z,e.w=t.w-i.w,e},Z.negate=function(t,i){return b.typeOf.object("quaternion",t),b.typeOf.object("result",i),i.x=-t.x,i.y=-t.y,i.z=-t.z,i.w=-t.w,i},Z.dot=function(t,i){return b.typeOf.object("left",t),b.typeOf.object("right",i),t.x*i.x+t.y*i.y+t.z*i.z+t.w*i.w},Z.multiply=function(t,i,e){b.typeOf.object("left",t),b.typeOf.object("right",i),b.typeOf.object("result",e);const n=t.x,o=t.y,s=t.z,r=t.w,l=i.x,c=i.y,u=i.z,d=i.w,p=r*l+n*d+o*u-s*c,f=r*c-n*u+o*d+s*l,g=r*u+n*c-o*l+s*d,m=r*d-n*l-o*c-s*u;return e.x=p,e.y=f,e.z=g,e.w=m,e},Z.multiplyByScalar=function(t,i,e){return b.typeOf.object("quaternion",t),b.typeOf.number("scalar",i),b.typeOf.object("result",e),e.x=t.x*i,e.y=t.y*i,e.z=t.z*i,e.w=t.w*i,e},Z.divideByScalar=function(t,i,e){return b.typeOf.object("quaternion",t),b.typeOf.number("scalar",i),b.typeOf.object("result",e),e.x=t.x/i,e.y=t.y/i,e.z=t.z/i,e.w=t.w/i,e},Z.computeAxis=function(t,i){b.typeOf.object("quaternion",t),b.typeOf.object("result",i);const e=t.w;if(Math.abs(e-1)<F.EPSILON6||Math.abs(e+1)<F.EPSILON6)return i.x=1,i.y=i.z=0,i;const n=1/Math.sqrt(1-e*e);return i.x=t.x*n,i.y=t.y*n,i.z=t.z*n,i},Z.computeAngle=function(t){return b.typeOf.object("quaternion",t),Math.abs(t.w-1)<F.EPSILON6?0:2*Math.acos(t.w)};let fd=new Z;Z.lerp=function(t,i,e,n){return b.typeOf.object("start",t),b.typeOf.object("end",i),b.typeOf.number("t",e),b.typeOf.object("result",n),fd=Z.multiplyByScalar(i,e,fd),n=Z.multiplyByScalar(t,1-e,n),Z.add(fd,n,n)};let Vv=new Z,gd=new Z,md=new Z;Z.slerp=function(t,i,e,n){b.typeOf.object("start",t),b.typeOf.object("end",i),b.typeOf.number("t",e),b.typeOf.object("result",n);let o=Z.dot(t,i),s=i;if(o<0&&(o=-o,s=Vv=Z.negate(i,Vv)),1-o<F.EPSILON6)return Z.lerp(t,s,e,n);const r=Math.acos(o);return gd=Z.multiplyByScalar(t,Math.sin((1-e)*r),gd),md=Z.multiplyByScalar(s,Math.sin(e*r),md),n=Z.add(gd,md,n),Z.multiplyByScalar(n,1/Math.sin(r),n)},Z.log=function(t,i){b.typeOf.object("quaternion",t),b.typeOf.object("result",i);const e=F.acosClamped(t.w);let n=0;return e!==0&&(n=e/Math.sin(e)),I.multiplyByScalar(t,n,i)},Z.exp=function(t,i){b.typeOf.object("cartesian",t),b.typeOf.object("result",i);const e=I.magnitude(t);let n=0;return e!==0&&(n=Math.sin(e)/e),i.x=t.x*n,i.y=t.y*n,i.z=t.z*n,i.w=Math.cos(e),i};const NS=new I,BS=new I,Ur=new Z,bs=new Z;Z.computeInnerQuadrangle=function(t,i,e,n){b.typeOf.object("q0",t),b.typeOf.object("q1",i),b.typeOf.object("q2",e),b.typeOf.object("result",n);const o=Z.conjugate(i,Ur);Z.multiply(o,e,bs);const s=Z.log(bs,NS);Z.multiply(o,t,bs);const r=Z.log(bs,BS);return I.add(s,r,s),I.multiplyByScalar(s,.25,s),I.negate(s,s),Z.exp(s,Ur),Z.multiply(i,Ur,n)},Z.squad=function(t,i,e,n,o,s){b.typeOf.object("q0",t),b.typeOf.object("q1",i),b.typeOf.object("s0",e),b.typeOf.object("s1",n),b.typeOf.number("t",o),b.typeOf.object("result",s);const r=Z.slerp(t,i,o,Ur),l=Z.slerp(e,n,o,bs);return Z.slerp(r,l,2*o*(1-o),s)};const VS=new Z,Uv=1.9011074535173003,nh=lt.supportsTypedArrays()?new Float32Array(8):[],oh=lt.supportsTypedArrays()?new Float32Array(8):[],ki=lt.supportsTypedArrays()?new Float32Array(8):[],Ki=lt.supportsTypedArrays()?new Float32Array(8):[];for(let t=0;t<7;++t){const i=t+1,e=2*i+1;nh[t]=1/(i*e),oh[t]=i/e}nh[7]=Uv/(8*17),oh[7]=Uv*8/17,Z.fastSlerp=function(t,i,e,n){b.typeOf.object("start",t),b.typeOf.object("end",i),b.typeOf.number("t",e),b.typeOf.object("result",n);let o=Z.dot(t,i),s;o>=0?s=1:(s=-1,o=-o);const r=o-1,l=1-e,c=e*e,u=l*l;for(let g=7;g>=0;--g)ki[g]=(nh[g]*c-oh[g])*r,Ki[g]=(nh[g]*u-oh[g])*r;const d=s*e*(1+ki[0]*(1+ki[1]*(1+ki[2]*(1+ki[3]*(1+ki[4]*(1+ki[5]*(1+ki[6]*(1+ki[7])))))))),p=l*(1+Ki[0]*(1+Ki[1]*(1+Ki[2]*(1+Ki[3]*(1+Ki[4]*(1+Ki[5]*(1+Ki[6]*(1+Ki[7])))))))),f=Z.multiplyByScalar(t,p,VS);return Z.multiplyByScalar(i,d,n),Z.add(f,n,n)},Z.fastSquad=function(t,i,e,n,o,s){b.typeOf.object("q0",t),b.typeOf.object("q1",i),b.typeOf.object("s0",e),b.typeOf.object("s1",n),b.typeOf.number("t",o),b.typeOf.object("result",s);const r=Z.fastSlerp(t,i,o,Ur),l=Z.fastSlerp(e,n,o,bs);return Z.fastSlerp(r,l,2*o*(1-o),s)},Z.equals=function(t,i){return t===i||T(t)&&T(i)&&t.x===i.x&&t.y===i.y&&t.z===i.z&&t.w===i.w},Z.equalsEpsilon=function(t,i,e){return e=e??0,t===i||T(t)&&T(i)&&Math.abs(t.x-i.x)<=e&&Math.abs(t.y-i.y)<=e&&Math.abs(t.z-i.z)<=e&&Math.abs(t.w-i.w)<=e},Z.ZERO=Object.freeze(new Z(0,0,0,0)),Z.IDENTITY=Object.freeze(new Z(0,0,0,1)),Z.prototype.clone=function(t){return Z.clone(this,t)},Z.prototype.equals=function(t){return Z.equals(this,t)},Z.prototype.equalsEpsilon=function(t,i){return Z.equalsEpsilon(this,t,i)},Z.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const le={},vd={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Ss={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},yd={},zt={east:new I,north:new I,up:new I,west:new I,south:new I,down:new I};let Dn=new I,Rn=new I,Fn=new I;le.localFrameToFixedFrameGenerator=function(t,i){if(!vd.hasOwnProperty(t)||!vd[t].hasOwnProperty(i))throw new W("firstAxis and secondAxis must be east, north, up, west, south or down.");const e=vd[t][i];let n;const o=t+i;return T(yd[o])?n=yd[o]:(n=function(s,r,l){if(!T(s))throw new W("origin is required.");if(isNaN(s.x)||isNaN(s.y)||isNaN(s.z))throw new W("origin has a NaN component");if(T(l)||(l=new $),I.equalsEpsilon(s,I.ZERO,F.EPSILON14))I.unpack(Ss[t],0,Dn),I.unpack(Ss[i],0,Rn),I.unpack(Ss[e],0,Fn);else if(F.equalsEpsilon(s.x,0,F.EPSILON14)&&F.equalsEpsilon(s.y,0,F.EPSILON14)){const c=F.sign(s.z);I.unpack(Ss[t],0,Dn),t!=="east"&&t!=="west"&&I.multiplyByScalar(Dn,c,Dn),I.unpack(Ss[i],0,Rn),i!=="east"&&i!=="west"&&I.multiplyByScalar(Rn,c,Rn),I.unpack(Ss[e],0,Fn),e!=="east"&&e!=="west"&&I.multiplyByScalar(Fn,c,Fn)}else{r=r??se.default,r.geodeticSurfaceNormal(s,zt.up);const c=zt.up,u=zt.east;u.x=-s.y,u.y=s.x,u.z=0,I.normalize(u,zt.east),I.cross(c,u,zt.north),I.multiplyByScalar(zt.up,-1,zt.down),I.multiplyByScalar(zt.east,-1,zt.west),I.multiplyByScalar(zt.north,-1,zt.south),Dn=zt[t],Rn=zt[i],Fn=zt[e]}return l[0]=Dn.x,l[1]=Dn.y,l[2]=Dn.z,l[3]=0,l[4]=Rn.x,l[5]=Rn.y,l[6]=Rn.z,l[7]=0,l[8]=Fn.x,l[9]=Fn.y,l[10]=Fn.z,l[11]=0,l[12]=s.x,l[13]=s.y,l[14]=s.z,l[15]=1,l},yd[o]=n),n},le.eastNorthUpToFixedFrame=le.localFrameToFixedFrameGenerator("east","north"),le.northEastDownToFixedFrame=le.localFrameToFixedFrameGenerator("north","east"),le.northUpEastToFixedFrame=le.localFrameToFixedFrameGenerator("north","up"),le.northWestUpToFixedFrame=le.localFrameToFixedFrameGenerator("north","west");const US=new Z,WS=new I(1,1,1),GS=new $;le.headingPitchRollToFixedFrame=function(t,i,e,n,o){b.typeOf.object("HeadingPitchRoll",i),n=n??le.eastNorthUpToFixedFrame;const s=Z.fromHeadingPitchRoll(i,US),r=$.fromTranslationQuaternionRotationScale(I.ZERO,s,WS,GS);return o=n(t,e,o),$.multiply(o,r,o)};const HS=new $,$S=new H;le.headingPitchRollQuaternion=function(t,i,e,n,o){b.typeOf.object("HeadingPitchRoll",i);const s=le.headingPitchRollToFixedFrame(t,i,e,n,HS),r=$.getMatrix3(s,$S);return Z.fromRotationMatrix(r,o)};const qS=new I(1,1,1),XS=new I,Wv=new $,YS=new $,ZS=new H,QS=new Z;le.fixedFrameToHeadingPitchRoll=function(t,i,e,n){b.defined("transform",t),i=i??se.default,e=e??le.eastNorthUpToFixedFrame,T(n)||(n=new je);const o=$.getTranslation(t,XS);if(I.equals(o,I.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;let s=$.inverseTransformation(e(o,i,Wv),Wv),r=$.setScale(t,qS,YS);r=$.setTranslation(r,I.ZERO,r),s=$.multiply(s,r,s);let l=Z.fromRotationMatrix($.getMatrix3(s,ZS),QS);return l=Z.normalize(l,l),je.fromQuaternion(l,n)};const kS=6*3600+41*60+50.54841,KS=8640184812866e-6,JS=.093104,jS=-62e-7,eE=11772758384668e-32,tE=72921158553e-15,iE=F.TWO_PI/86400;let sh=new k;le.computeIcrfToCentralBodyFixedMatrix=function(t,i){let e=le.computeIcrfToFixedMatrix(t,i);return T(e)||(e=le.computeTemeToPseudoFixedMatrix(t,i)),e},le.computeTemeToPseudoFixedMatrix=function(t,i){if(!T(t))throw new W("date is required.");sh=k.addSeconds(t,-k.computeTaiMinusUtc(t),sh);const e=sh.dayNumber,n=sh.secondsOfDay;let o;const s=e-2451545;n>=43200?o=(s+.5)/Oe.DAYS_PER_JULIAN_CENTURY:o=(s-.5)/Oe.DAYS_PER_JULIAN_CENTURY;const l=(kS+o*(KS+o*(JS+o*jS)))*iE%F.TWO_PI,c=tE+eE*(e-24515455e-1),u=(n+Oe.SECONDS_PER_DAY*.5)%Oe.SECONDS_PER_DAY,d=l+c*u,p=Math.cos(d),f=Math.sin(d);return T(i)?(i[0]=p,i[1]=-f,i[2]=0,i[3]=f,i[4]=p,i[5]=0,i[6]=0,i[7]=0,i[8]=1,i):new H(p,f,0,-f,p,0,0,0,1)},le.iau2006XysData=new id,le.earthOrientationParameters=Or.NONE;const wd=32.184,nE=2451545;le.preloadIcrfFixed=function(t){const i=t.start.dayNumber,e=t.start.secondsOfDay+wd,n=t.stop.dayNumber,o=t.stop.secondsOfDay+wd;return le.iau2006XysData.preload(i,e,n,o)},le.computeIcrfToFixedMatrix=function(t,i){if(!T(t))throw new W("date is required.");T(i)||(i=new H);const e=le.computeFixedToIcrfMatrix(t,i);if(T(e))return H.transpose(e,i)};const oE=32.184,sE=2451545,rh=new je,rE=new H,aE=new k;le.computeMoonFixedToIcrfMatrix=function(t,i){if(!T(t))throw new W("date is required.");const e=k.addSeconds(t,oE,aE),n=k.totalDays(e)-sE,o=F.toRadians(12.112)-F.toRadians(.052992)*n,s=F.toRadians(24.224)-F.toRadians(.105984)*n,r=F.toRadians(227.645)+F.toRadians(13.012)*n,l=F.toRadians(261.105)+F.toRadians(13.340716)*n,c=F.toRadians(358)+F.toRadians(.9856)*n;return rh.pitch=F.toRadians(180)-F.toRadians(3.878)*Math.sin(o)-F.toRadians(.12)*Math.sin(s)+F.toRadians(.07)*Math.sin(r)-F.toRadians(.017)*Math.sin(l),rh.roll=F.toRadians(66.53-90)+F.toRadians(1.543)*Math.cos(o)+F.toRadians(.24)*Math.cos(s)-F.toRadians(.028)*Math.cos(r)+F.toRadians(.007)*Math.cos(l),rh.heading=F.toRadians(244.375-90)+F.toRadians(13.17635831)*n+F.toRadians(3.558)*Math.sin(o)+F.toRadians(.121)*Math.sin(s)-F.toRadians(.064)*Math.sin(r)+F.toRadians(.016)*Math.sin(l)+F.toRadians(.025)*Math.sin(c),H.fromHeadingPitchRoll(rh,rE)},le.computeIcrfToMoonFixedMatrix=function(t,i){if(!T(t))throw new W("date is required.");T(i)||(i=new H);const e=le.computeMoonFixedToIcrfMatrix(t,i);if(T(e))return H.transpose(e,i)};const lE=new xv(0,0,0),cE=new Gu(0,0,0,0,0),Cd=new H,_d=new H;le.computeFixedToIcrfMatrix=function(t,i){if(!T(t))throw new W("date is required.");T(i)||(i=new H);const e=le.earthOrientationParameters.compute(t,cE);if(!T(e))return;const n=t.dayNumber,o=t.secondsOfDay+wd,s=le.iau2006XysData.computeXysRadians(n,o,lE);if(!T(s))return;const r=s.x+e.xPoleOffset,l=s.y+e.yPoleOffset,c=1/(1+Math.sqrt(1-r*r-l*l)),u=Cd;u[0]=1-c*r*r,u[3]=-c*r*l,u[6]=r,u[1]=-c*r*l,u[4]=1-c*l*l,u[7]=l,u[2]=-r,u[5]=-l,u[8]=1-c*(r*r+l*l);const d=H.fromRotationZ(-s.s,_d),p=H.multiply(u,d,Cd),f=t.dayNumber,g=t.secondsOfDay-k.computeTaiMinusUtc(t)+e.ut1MinusUtc,m=f-2451545,y=g/Oe.SECONDS_PER_DAY;let _=.779057273264+y+.00273781191135448*(m+y);_=_%1*F.TWO_PI;const P=H.fromRotationZ(_,_d),C=H.multiply(p,P,Cd),S=Math.cos(e.xPoleWander),x=Math.cos(e.yPoleWander),A=Math.sin(e.xPoleWander),R=Math.sin(e.yPoleWander);let O=n-nE+o/Oe.SECONDS_PER_DAY;O/=36525;const N=-47e-6*O*F.RADIANS_PER_DEGREE/3600,V=Math.cos(N),U=Math.sin(N),z=_d;return z[0]=S*V,z[1]=S*U,z[2]=A,z[3]=-x*U+R*A*V,z[4]=x*V+R*A*U,z[5]=-R*S,z[6]=-R*U-x*A*V,z[7]=R*V-x*A*U,z[8]=x*S,H.multiply(C,z,i)};const hE=new K;le.pointToWindowCoordinates=function(t,i,e,n){return n=le.pointToGLWindowCoordinates(t,i,e,n),n.y=2*i[5]-n.y,n},le.pointToGLWindowCoordinates=function(t,i,e,n){if(!T(t))throw new W("modelViewProjectionMatrix is required.");if(!T(i))throw new W("viewportTransformation is required.");if(!T(e))throw new W("point is required.");T(n)||(n=new j);const o=hE;return $.multiplyByVector(t,K.fromElements(e.x,e.y,e.z,1,o),o),K.multiplyByScalar(o,1/o.w,o),$.multiplyByVector(i,o,o),j.fromCartesian4(o,n)};const uE=new I,dE=new I,pE=new I;le.rotationMatrixFromPositionVelocity=function(t,i,e,n){if(!T(t))throw new W("position is required.");if(!T(i))throw new W("velocity is required.");const o=(e??se.default).geodeticSurfaceNormal(t,uE);let s=I.cross(i,o,dE);I.equalsEpsilon(s,I.ZERO,F.EPSILON6)&&(s=I.clone(I.UNIT_X,s));const r=I.cross(s,i,pE);return I.normalize(r,r),I.cross(i,r,s),I.negate(s,s),I.normalize(s,s),T(n)||(n=new H),n[0]=i.x,n[1]=i.y,n[2]=i.z,n[3]=s.x,n[4]=s.y,n[5]=s.z,n[6]=r.x,n[7]=r.y,n[8]=r.z,n};const Gv=new $(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Hv=new ce,Pd=new I,fE=new I,gE=new H,bd=new $,$v=new $;le.basisTo2D=function(t,i,e){if(!T(t))throw new W("projection is required.");if(!T(i))throw new W("matrix is required.");if(!T(e))throw new W("result is required.");const n=$.getTranslation(i,fE),o=t.ellipsoid;let s;if(I.equals(n,I.ZERO))s=I.clone(I.ZERO,Pd);else{const d=o.cartesianToCartographic(n,Hv);s=t.project(d,Pd),I.fromElements(s.z,s.x,s.y,s)}const r=le.eastNorthUpToFixedFrame(n,o,bd),l=$.inverseTransformation(r,$v),c=$.getMatrix3(i,gE),u=$.multiplyByMatrix3(l,c,e);return $.multiply(Gv,u,e),$.setTranslation(e,s,e),e},le.ellipsoidTo2DModelMatrix=function(t,i,e){if(!T(t))throw new W("projection is required.");if(!T(i))throw new W("center is required.");if(!T(e))throw new W("result is required.");const n=t.ellipsoid,o=le.eastNorthUpToFixedFrame(i,n,bd),s=$.inverseTransformation(o,$v),r=n.cartesianToCartographic(i,Hv),l=t.project(r,Pd);I.fromElements(l.z,l.x,l.y,l);const c=$.fromTranslation(l,bd);return $.multiply(Gv,s,e),$.multiply(c,e,e),e};function ie(t,i,e,n){this.west=t??0,this.south=i??0,this.east=e??0,this.north=n??0}Object.defineProperties(ie.prototype,{width:{get:function(){return ie.computeWidth(this)}},height:{get:function(){return ie.computeHeight(this)}}}),ie.packedLength=4,ie.pack=function(t,i,e){return b.typeOf.object("value",t),b.defined("array",i),e=e??0,i[e++]=t.west,i[e++]=t.south,i[e++]=t.east,i[e]=t.north,i},ie.unpack=function(t,i,e){return b.defined("array",t),i=i??0,T(e)||(e=new ie),e.west=t[i++],e.south=t[i++],e.east=t[i++],e.north=t[i],e},ie.computeWidth=function(t){b.typeOf.object("rectangle",t);let i=t.east;const e=t.west;return i<e&&(i+=F.TWO_PI),i-e},ie.computeHeight=function(t){return b.typeOf.object("rectangle",t),t.north-t.south},ie.fromDegrees=function(t,i,e,n,o){return t=F.toRadians(t??0),i=F.toRadians(i??0),e=F.toRadians(e??0),n=F.toRadians(n??0),T(o)?(o.west=t,o.south=i,o.east=e,o.north=n,o):new ie(t,i,e,n)},ie.fromRadians=function(t,i,e,n,o){return T(o)?(o.west=t??0,o.south=i??0,o.east=e??0,o.north=n??0,o):new ie(t,i,e,n)},ie.fromCartographicArray=function(t,i){b.defined("cartographics",t);let e=Number.MAX_VALUE,n=-Number.MAX_VALUE,o=Number.MAX_VALUE,s=-Number.MAX_VALUE,r=Number.MAX_VALUE,l=-Number.MAX_VALUE;for(let c=0,u=t.length;c<u;c++){const d=t[c];e=Math.min(e,d.longitude),n=Math.max(n,d.longitude),r=Math.min(r,d.latitude),l=Math.max(l,d.latitude);const p=d.longitude>=0?d.longitude:d.longitude+F.TWO_PI;o=Math.min(o,p),s=Math.max(s,p)}return n-e>s-o&&(e=o,n=s,n>F.PI&&(n=n-F.TWO_PI),e>F.PI&&(e=e-F.TWO_PI)),T(i)?(i.west=e,i.south=r,i.east=n,i.north=l,i):new ie(e,r,n,l)},ie.fromCartesianArray=function(t,i,e){b.defined("cartesians",t),i=i??se.default;let n=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,r=-Number.MAX_VALUE,l=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let u=0,d=t.length;u<d;u++){const p=i.cartesianToCartographic(t[u]);n=Math.min(n,p.longitude),o=Math.max(o,p.longitude),l=Math.min(l,p.latitude),c=Math.max(c,p.latitude);const f=p.longitude>=0?p.longitude:p.longitude+F.TWO_PI;s=Math.min(s,f),r=Math.max(r,f)}return o-n>r-s&&(n=s,o=r,o>F.PI&&(o=o-F.TWO_PI),n>F.PI&&(n=n-F.TWO_PI)),T(e)?(e.west=n,e.south=l,e.east=o,e.north=c,e):new ie(n,l,o,c)};const mE=new I,vE=new I,yE=new I,wE=new I,CE=new I,Sd=new Array(5);for(let t=0;t<Sd.length;++t)Sd[t]=new I;ie.fromBoundingSphere=function(t,i,e){b.typeOf.object("boundingSphere",t);const n=t.center,o=t.radius;if(T(i)||(i=se.default),T(e)||(e=new ie),I.equals(n,I.ZERO))return ie.clone(ie.MAX_VALUE,e),e;const s=le.eastNorthUpToFixedFrame(n,i,mE),r=$.multiplyByPointAsVector(s,I.UNIT_X,vE);I.normalize(r,r);const l=$.multiplyByPointAsVector(s,I.UNIT_Y,yE);I.normalize(l,l),I.multiplyByScalar(l,o,l),I.multiplyByScalar(r,o,r);const c=I.negate(l,CE),u=I.negate(r,wE),d=Sd;let p=d[0];return I.add(n,l,p),p=d[1],I.add(n,u,p),p=d[2],I.add(n,c,p),p=d[3],I.add(n,r,p),d[4]=n,ie.fromCartesianArray(d,i,e)},ie.clone=function(t,i){if(T(t))return T(i)?(i.west=t.west,i.south=t.south,i.east=t.east,i.north=t.north,i):new ie(t.west,t.south,t.east,t.north)},ie.equalsEpsilon=function(t,i,e){return e=e??0,t===i||T(t)&&T(i)&&Math.abs(t.west-i.west)<=e&&Math.abs(t.south-i.south)<=e&&Math.abs(t.east-i.east)<=e&&Math.abs(t.north-i.north)<=e},ie.prototype.clone=function(t){return ie.clone(this,t)},ie.prototype.equals=function(t){return ie.equals(this,t)},ie.equals=function(t,i){return t===i||T(t)&&T(i)&&t.west===i.west&&t.south===i.south&&t.east===i.east&&t.north===i.north},ie.prototype.equalsEpsilon=function(t,i){return ie.equalsEpsilon(this,t,i)},ie._validate=function(t){b.typeOf.object("rectangle",t);const i=t.north;b.typeOf.number.greaterThanOrEquals("north",i,-F.PI_OVER_TWO),b.typeOf.number.lessThanOrEquals("north",i,F.PI_OVER_TWO);const e=t.south;b.typeOf.number.greaterThanOrEquals("south",e,-F.PI_OVER_TWO),b.typeOf.number.lessThanOrEquals("south",e,F.PI_OVER_TWO);const n=t.west;b.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),b.typeOf.number.lessThanOrEquals("west",n,Math.PI);const o=t.east;b.typeOf.number.greaterThanOrEquals("east",o,-Math.PI),b.typeOf.number.lessThanOrEquals("east",o,Math.PI)},ie.southwest=function(t,i){return b.typeOf.object("rectangle",t),T(i)?(i.longitude=t.west,i.latitude=t.south,i.height=0,i):new ce(t.west,t.south)},ie.northwest=function(t,i){return b.typeOf.object("rectangle",t),T(i)?(i.longitude=t.west,i.latitude=t.north,i.height=0,i):new ce(t.west,t.north)},ie.northeast=function(t,i){return b.typeOf.object("rectangle",t),T(i)?(i.longitude=t.east,i.latitude=t.north,i.height=0,i):new ce(t.east,t.north)},ie.southeast=function(t,i){return b.typeOf.object("rectangle",t),T(i)?(i.longitude=t.east,i.latitude=t.south,i.height=0,i):new ce(t.east,t.south)},ie.center=function(t,i){b.typeOf.object("rectangle",t);let e=t.east;const n=t.west;e<n&&(e+=F.TWO_PI);const o=F.negativePiToPi((n+e)*.5),s=(t.south+t.north)*.5;return T(i)?(i.longitude=o,i.latitude=s,i.height=0,i):new ce(o,s)},ie.intersection=function(t,i,e){b.typeOf.object("rectangle",t),b.typeOf.object("otherRectangle",i);let n=t.east,o=t.west,s=i.east,r=i.west;n<o&&s>0?n+=F.TWO_PI:s<r&&n>0&&(s+=F.TWO_PI),n<o&&r<0?r+=F.TWO_PI:s<r&&o<0&&(o+=F.TWO_PI);const l=F.negativePiToPi(Math.max(o,r)),c=F.negativePiToPi(Math.min(n,s));if((t.west<t.east||i.west<i.east)&&c<=l)return;const u=Math.max(t.south,i.south),d=Math.min(t.north,i.north);if(!(u>=d))return T(e)?(e.west=l,e.south=u,e.east=c,e.north=d,e):new ie(l,u,c,d)},ie.simpleIntersection=function(t,i,e){b.typeOf.object("rectangle",t),b.typeOf.object("otherRectangle",i);const n=Math.max(t.west,i.west),o=Math.max(t.south,i.south),s=Math.min(t.east,i.east),r=Math.min(t.north,i.north);if(!(o>=r||n>=s))return T(e)?(e.west=n,e.south=o,e.east=s,e.north=r,e):new ie(n,o,s,r)},ie.union=function(t,i,e){b.typeOf.object("rectangle",t),b.typeOf.object("otherRectangle",i),T(e)||(e=new ie);let n=t.east,o=t.west,s=i.east,r=i.west;n<o&&s>0?n+=F.TWO_PI:s<r&&n>0&&(s+=F.TWO_PI),n<o&&r<0?r+=F.TWO_PI:s<r&&o<0&&(o+=F.TWO_PI);const l=F.negativePiToPi(Math.min(o,r)),c=F.negativePiToPi(Math.max(n,s));return e.west=l,e.south=Math.min(t.south,i.south),e.east=c,e.north=Math.max(t.north,i.north),e},ie.expand=function(t,i,e){return b.typeOf.object("rectangle",t),b.typeOf.object("cartographic",i),T(e)||(e=new ie),e.west=Math.min(t.west,i.longitude),e.south=Math.min(t.south,i.latitude),e.east=Math.max(t.east,i.longitude),e.north=Math.max(t.north,i.latitude),e},ie.contains=function(t,i){b.typeOf.object("rectangle",t),b.typeOf.object("cartographic",i);let e=i.longitude;const n=i.latitude,o=t.west;let s=t.east;return s<o&&(s+=F.TWO_PI,e<0&&(e+=F.TWO_PI)),(e>o||F.equalsEpsilon(e,o,F.EPSILON14))&&(e<s||F.equalsEpsilon(e,s,F.EPSILON14))&&n>=t.south&&n<=t.north};const _E=new ce;ie.subsample=function(t,i,e,n){b.typeOf.object("rectangle",t),i=i??se.default,e=e??0,T(n)||(n=[]);let o=0;const s=t.north,r=t.south,l=t.east,c=t.west,u=_E;u.height=e,u.longitude=c,u.latitude=s,n[o]=i.cartographicToCartesian(u,n[o]),o++,u.longitude=l,n[o]=i.cartographicToCartesian(u,n[o]),o++,u.latitude=r,n[o]=i.cartographicToCartesian(u,n[o]),o++,u.longitude=c,n[o]=i.cartographicToCartesian(u,n[o]),o++,s<0?u.latitude=s:r>0?u.latitude=r:u.latitude=0;for(let d=1;d<8;++d)u.longitude=-Math.PI+d*F.PI_OVER_TWO,ie.contains(t,u)&&(n[o]=i.cartographicToCartesian(u,n[o]),o++);return u.latitude===0&&(u.longitude=c,n[o]=i.cartographicToCartesian(u,n[o]),o++,u.longitude=l,n[o]=i.cartographicToCartesian(u,n[o]),o++),n.length=o,n},ie.subsection=function(t,i,e,n,o,s){if(b.typeOf.object("rectangle",t),b.typeOf.number.greaterThanOrEquals("westLerp",i,0),b.typeOf.number.lessThanOrEquals("westLerp",i,1),b.typeOf.number.greaterThanOrEquals("southLerp",e,0),b.typeOf.number.lessThanOrEquals("southLerp",e,1),b.typeOf.number.greaterThanOrEquals("eastLerp",n,0),b.typeOf.number.lessThanOrEquals("eastLerp",n,1),b.typeOf.number.greaterThanOrEquals("northLerp",o,0),b.typeOf.number.lessThanOrEquals("northLerp",o,1),b.typeOf.number.lessThanOrEquals("westLerp",i,n),b.typeOf.number.lessThanOrEquals("southLerp",e,o),T(s)||(s=new ie),t.west<=t.east){const l=t.east-t.west;s.west=t.west+i*l,s.east=t.west+n*l}else{const l=F.TWO_PI+t.east-t.west;s.west=F.negativePiToPi(t.west+i*l),s.east=F.negativePiToPi(t.west+n*l)}const r=t.north-t.south;return s.south=t.south+e*r,s.north=t.south+o*r,i===1&&(s.west=t.east),n===1&&(s.east=t.east),e===1&&(s.south=t.north),o===1&&(s.north=t.north),s},ie.MAX_VALUE=Object.freeze(new ie(-Math.PI,-F.PI_OVER_TWO,Math.PI,F.PI_OVER_TWO));function Lt(t){this._ellipsoid=t??se.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(Lt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),Lt.mercatorAngleToGeodeticLatitude=function(t){return F.PI_OVER_TWO-2*Math.atan(Math.exp(-t))},Lt.geodeticLatitudeToMercatorAngle=function(t){t>Lt.MaximumLatitude?t=Lt.MaximumLatitude:t<-Lt.MaximumLatitude&&(t=-Lt.MaximumLatitude);const i=Math.sin(t);return .5*Math.log((1+i)/(1-i))},Lt.MaximumLatitude=Lt.mercatorAngleToGeodeticLatitude(Math.PI),Lt.prototype.project=function(t,i){const e=this._semimajorAxis,n=t.longitude*e,o=Lt.geodeticLatitudeToMercatorAngle(t.latitude)*e,s=t.height;return T(i)?(i.x=n,i.y=o,i.z=s,i):new I(n,o,s)},Lt.prototype.unproject=function(t,i){if(!T(t))throw new W("cartesian is required");const e=this._oneOverSemimajorAxis,n=t.x*e,o=Lt.mercatorAngleToGeodeticLatitude(t.y*e),s=t.z;return T(i)?(i.longitude=n,i.latitude=o,i.height=s,i):new ce(n,o,s)};function PE(){return!0}function bE(t,i){i=i??"This object was destroyed, i.e., destroy() was called.";function e(){throw new W(i)}for(const n in t)typeof t[n]=="function"&&(t[n]=e);t.isDestroyed=PE}function qv(){if(!T(et._canTransferArrayBuffer)){const t=Ad("transferTypedArrayTest");t.postMessage=t.webkitPostMessage??t.postMessage;const i=99,e=new Int8Array([i]);try{t.postMessage({array:e},[e.buffer])}catch{return et._canTransferArrayBuffer=!1,et._canTransferArrayBuffer}et._canTransferArrayBuffer=new Promise(n=>{t.onmessage=function(o){const s=o.data.array,r=T(s)&&s[0]===i;n(r),t.terminate(),et._canTransferArrayBuffer=r}})}return et._canTransferArrayBuffer}const Ed=new vs;function xd(t){let i;try{i=new Blob([t],{type:"application/javascript"})}catch{const o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=new o;s.append(t),i=s.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(i)}function Ad(t){const i=new Zi(t),e=i.scheme().length!==0&&i.fragment().length===0,n=t.replace(/\.js$/,""),o={};let s,r;if(ku(t))r=t;else if(!e){const l=ni(`${et._workerModulePrefix}/${n}.js`);ku(l)&&(r=l)}if(r){const l=`import "${r}";`;return s=xd(l),o.type="module",new Worker(s,o)}if(!e&&typeof CESIUM_WORKERS<"u"){const l=`
363
363
  importScripts("${xd(CESIUM_WORKERS)}");
364
364
  CesiumWorkers["${n}"]();
365
- `;return s=xd(l),new Worker(s,o)}if(s=t,e||(s=ni(`${et._workerModulePrefix+n}.js`)),!lt.supportsEsmWebWorkers())throw new at("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(s,o)}async function SE(t,i){const e={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!lt.supportsWebAssembly()){if(!T(i.fallbackModulePath))throw new at(`This browser does not support Web Assembly, and no backup module was provided for ${t._workerPath}`);return e.modulePath=ni(i.fallbackModulePath),e}e.wasmBinaryFile=ni(i.wasmBinaryFile);const n=await J.fetchArrayBuffer({url:e.wasmBinaryFile});return e.wasmBinary=n,e}function et(t,i){this._workerPath=t,this._maximumActiveTasks=i??Number.POSITIVE_INFINITY,this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}const EE=(t,i,e,n)=>{const o=({data:s})=>{if(s.id===i){if(T(s.error)){let r=s.error;r.name==="RuntimeError"?(r=new at(s.error.message),r.stack=s.error.stack):r.name==="DeveloperError"?(r=new W(s.error.message),r.stack=s.error.stack):r.name==="Error"&&(r=new Error(s.error.message),r.stack=s.error.stack),Ed.raiseEvent(r),n(r)}else Ed.raiseEvent(),e(s.result);t.removeEventListener("message",o)}};return o},xE=[];async function AE(t,i,e){const n=await Promise.resolve(qv());T(e)?n||(e.length=0):e=xE;const o=t._nextID++,s=new Promise((r,l)=>{t._worker.addEventListener("message",EE(t._worker,o,r,l))});return t._worker.postMessage({id:o,baseUrl:ni.getCesiumBaseUrl().url,parameters:i,canTransferArrayBuffer:n},e),s}async function TE(t,i,e){++t._activeTasks;try{const n=await AE(t,i,e);return--t._activeTasks,n}catch(n){throw--t._activeTasks,n}}et.prototype.scheduleTask=function(t,i){if(T(this._worker)||(this._worker=Ad(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return TE(this,t,i)},et.prototype.initWebAssemblyModule=async function(t){if(T(this._webAssemblyPromise))return this._webAssemblyPromise;const i=async()=>{const e=this._worker=Ad(this._workerPath),n=await SE(this,t),o=await Promise.resolve(qv());let s;const r=n.wasmBinary;T(r)&&o&&(s=[r]);const l=new Promise((c,u)=>{e.onmessage=function({data:d}){T(d)?c(d.result):u(new at("Could not configure wasm module"))}});return e.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:n}},s),l};return this._webAssemblyPromise=i(),this._webAssemblyPromise},et.prototype.isDestroyed=function(){return!1},et.prototype.destroy=function(){return T(this._worker)&&this._worker.terminate(),bE(this)},et.taskCompletedEvent=Ed,et._defaultWorkerModulePrefix="Workers/",et._workerModulePrefix=et._defaultWorkerModulePrefix,et._canTransferArrayBuffer=void 0;function Es(t,i,e,n,o){this._format=t,this._datatype=i,this._width=e,this._height=n,this._buffer=o}Object.defineProperties(Es.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},arrayBufferView:{get:function(){return this._buffer}}}),Es.clone=function(t){if(T(t))return new Es(t._format,t._datatype,t._width,t._height,t._buffer)},Es.prototype.clone=function(){return Es.clone(this)};function Ji(){}Ji._transcodeTaskProcessor=new et("transcodeKTX2",Number.POSITIVE_INFINITY),Ji._readyPromise=void 0;function ME(){const t=Ji._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(i){if(i)return Ji._transcodeTaskProcessor;throw new at("KTX2 transcoder could not be initialized.")});Ji._readyPromise=t}Ji.transcode=function(t,i){return b.defined("supportedTargetFormats",i),T(Ji._readyPromise)||ME(),Ji._readyPromise.then(function(e){let n=t;t instanceof ArrayBuffer&&(n=new Uint8Array(t));const o={supportedTargetFormats:i,ktx2Buffer:n};return e.scheduleTask(o,[n.buffer])}).then(function(e){const n=e.length,o=Object.keys(e[0]);for(let s=0;s<n;s++){const r=e[s];for(let l=0;l<o.length;l++){const c=r[o[l]];r[o[l]]=new Es(c.internalFormat,c.datatype,c.width,c.height,c.levelBuffer)}}if(o.length===1){for(let s=0;s<n;++s)e[s]=e[s][o[0]];n===1&&(e=e[0])}return e}).catch(function(e){throw e})};let Xv;Yv.setKTX2SupportedFormats=function(t,i,e,n,o,s){Xv={s3tc:t,pvrtc:i,astc:e,etc:n,etc1:o,bc7:s}};function Yv(t){b.defined("resourceOrUrlOrBuffer",t);let i;return t instanceof ArrayBuffer||ArrayBuffer.isView(t)?i=Promise.resolve(t):i=J.createIfNeeded(t).fetchArrayBuffer(),i.then(function(e){return Ji.transcode(e,Xv)})}function xs(){W.throwInstantiationError()}Object.defineProperties(xs.prototype,{rectangle:{get:W.throwInstantiationError},tileWidth:{get:W.throwInstantiationError},tileHeight:{get:W.throwInstantiationError},maximumLevel:{get:W.throwInstantiationError},minimumLevel:{get:W.throwInstantiationError},tilingScheme:{get:W.throwInstantiationError},tileDiscardPolicy:{get:W.throwInstantiationError},errorEvent:{get:W.throwInstantiationError},credit:{get:W.throwInstantiationError},proxy:{get:W.throwInstantiationError},hasAlphaChannel:{get:W.throwInstantiationError}}),xs.prototype.getTileCredits=function(t,i,e){W.throwInstantiationError()},xs.prototype.requestImage=function(t,i,e,n){W.throwInstantiationError()},xs.prototype.pickFeatures=function(t,i,e,n,o){W.throwInstantiationError()};const IE=/\.ktx2$/i;xs.loadImage=function(t,i){b.defined("url",i);const e=J.createIfNeeded(i);return IE.test(e.url)?Yv(e):T(t)&&T(t.tileDiscardPolicy)?e.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):e.fetchImage({preferImageBitmap:!0,flipY:!0})};var ah=3.141592653589793*3e3/180,tt=3.141592653589793,lh=6378245,ch=.006693421622965943,Zv=function(n,o){var n=+n,o=+o,s=n-.0065,r=o-.006,l=Math.sqrt(s*s+r*r)-2e-5*Math.sin(r*ah),c=Math.atan2(r,s)-3e-6*Math.cos(s*ah),u=l*Math.cos(c),d=l*Math.sin(c);return[u,d]},Qv=function(o,n){var n=+n,o=+o,s=Math.sqrt(o*o+n*n)+2e-5*Math.sin(n*ah),r=Math.atan2(n,o)+3e-6*Math.cos(o*ah),l=s*Math.cos(r)+.0065,c=s*Math.sin(r)+.006;return[l,c]},Td=function(o,n){var n=+n,o=+o;if(Jv(o,n))return[o,n];var s=kv(o-105,n-35),r=Kv(o-105,n-35),l=n/180*tt,c=Math.sin(l);c=1-ch*c*c;var u=Math.sqrt(c);s=s*180/(lh*(1-ch)/(c*u)*tt),r=r*180/(lh/u*Math.cos(l)*tt);var d=n+s,p=o+r;return[p,d]},Md=function(o,n){var n=+n,o=+o;if(Jv(o,n))return[o,n];var s=kv(o-105,n-35),r=Kv(o-105,n-35),l=n/180*tt,c=Math.sin(l);c=1-ch*c*c;var u=Math.sqrt(c);s=s*180/(lh*(1-ch)/(c*u)*tt),r=r*180/(lh/u*Math.cos(l)*tt);var d=n+s,p=o+r;return[o*2-p,n*2-d]},kv=function(o,n){var n=+n,o=+o,s=-100+2*o+3*n+.2*n*n+.1*o*n+.2*Math.sqrt(Math.abs(o));return s+=(20*Math.sin(6*o*tt)+20*Math.sin(2*o*tt))*2/3,s+=(20*Math.sin(n*tt)+40*Math.sin(n/3*tt))*2/3,s+=(160*Math.sin(n/12*tt)+320*Math.sin(n*tt/30))*2/3,s},Kv=function(o,n){var n=+n,o=+o,s=300+o+2*n+.1*o*o+.1*o*n+.1*Math.sqrt(Math.abs(o));return s+=(20*Math.sin(6*o*tt)+20*Math.sin(2*o*tt))*2/3,s+=(20*Math.sin(o*tt)+40*Math.sin(o/3*tt))*2/3,s+=(150*Math.sin(o/12*tt)+300*Math.sin(o/30*tt))*2/3,s},Jv=function(o,n){var n=+n,o=+o;return!(o>73.66&&o<135.05&&n>3.86&&n<53.55)};function Id(t,i){this.x=t||0,this.y=i||0,this.x=this.x,this.y=this.y}Id.prototype.equals=function(t){return t&&t.x==this.x&&t.y==this.y};function mi(t,i){isNaN(t)&&(t=decode64(t),t=isNaN(t)?0:t),typeof t=="string"&&(t=parseFloat(t)),isNaN(i)&&(i=decode64(i),i=isNaN(i)?0:i),typeof t=="lat"&&(i=parseFloat(i)),this.lng=t,this.lat=i}mi.isInRange=function(t){return t&&t.lng<=180&&t.lng>=-180&&t.lat<=74&&t.lat>=-74},mi.prototype.equals=function(t){return t&&this.lat==t.lat&&this.lng==t.lng};function Re(){}Re.EARTHRADIUS=637099681e-2,Re.MCBAND=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],Re.LLBAND=[75,60,45,30,15,0],Re.MC2LL=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],Re.LL2MC=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],Re.getDistanceByMC=function(t,i){if(!t||!i)return 0;var e,n,o,s;return t=this.convertMC2LL(t),!t||(e=this.toRadians(t.lng),n=this.toRadians(t.lat),i=this.convertMC2LL(i),!i)?0:(o=this.toRadians(i.lng),s=this.toRadians(i.lat),this.getDistance(e,o,n,s))},Re.getDistanceByLL=function(t,i){if(!t||!i)return 0;t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74),i.lng=this.getLoop(i.lng,-180,180),i.lat=this.getRange(i.lat,-74,74);var e,n,o,s;return e=this.toRadians(t.lng),o=this.toRadians(t.lat),n=this.toRadians(i.lng),s=this.toRadians(i.lat),this.getDistance(e,n,o,s)},Re.convertMC2LL=function(s){var i,e;i=new mi(Math.abs(s.lng),Math.abs(s.lat));for(var n=0;n<this.MCBAND.length;n++)if(i.lat>=this.MCBAND[n]){e=this.MC2LL[n];break}var o=this.convertor(s,e),s=new mi(o.lng.toFixed(6),o.lat.toFixed(6));return s},Re.convertLL2MC=function(s){var i,e;s.lng=this.getLoop(s.lng,-180,180),s.lat=this.getRange(s.lat,-74,74),i=new mi(s.lng,s.lat);for(var n=0;n<this.LLBAND.length;n++)if(i.lat>=this.LLBAND[n]){e=this.LL2MC[n];break}if(!e){for(var n=this.LLBAND.length-1;n>=0;n--)if(i.lat<=-this.LLBAND[n]){e=this.LL2MC[n];break}}var o=this.convertor(s,e),s=new mi(o.lng.toFixed(2),o.lat.toFixed(2));return s},Re.convertor=function(t,i){if(!(!t||!i)){var e=i[0]+i[1]*Math.abs(t.lng),n=Math.abs(t.lat)/i[9],o=i[2]+i[3]*n+i[4]*n*n+i[5]*n*n*n+i[6]*n*n*n*n+i[7]*n*n*n*n*n+i[8]*n*n*n*n*n*n;return e*=t.lng<0?-1:1,o*=t.lat<0?-1:1,new mi(e,o)}},Re.getDistance=function(t,i,e,n){return this.EARTHRADIUS*Math.acos(Math.sin(e)*Math.sin(n)+Math.cos(e)*Math.cos(n)*Math.cos(i-t))},Re.toRadians=function(t){return Math.PI*t/180},Re.toDegrees=function(t){return 180*t/Math.PI},Re.getRange=function(t,i,e){return i!=null&&(t=Math.max(t,i)),e!=null&&(t=Math.min(t,e)),t},Re.getLoop=function(t,i,e){for(;t>e;)t-=e-i;for(;t<i;)t+=e-i;return t},Re.prototype.lngLatToMercator=function(t){return Re.convertLL2MC(t)},Re.prototype.lngLatToPoint=function(t){var i=Re.convertLL2MC(t);return new Id(i.lng,i.lat)},Re.prototype.mercatorToLngLat=function(t){return Re.convertMC2LL(t)},Re.prototype.PointToLngLat=function(t){var i=new mi(t.x,t.y);return Re.convertMC2LL(i)},Re.prototype.PointToPixel=function(t,i,e,n,o){if(t){t=this.lngLatToMercator(t,o);var s=this.getZoomUnits(i),r=Math.round((t.lng-e.lng)/s+n[Twidth]/2),l=Math.round((e.lat-t.lat)/s+n[Theight]/2);return new Id(r,l)}},Re.prototype.PixelToPoint=function(t,i,e,n,o){if(t){var s=this.getZoomUnits(i),r=e.lng+s*(t.x-n[Twidth]/2),l=e.lat-s*(t.y-n[Theight]/2),c=new mi(r,l);return this.mercatorToLngLat(c,o)}},Re.prototype.getZoomUnits=function(t){return Math.pow(2,18-t)};function zn(t){t=t||{},this._ellipsoid=t.ellipsoid??se.WGS84;var i=!0;T(t.wgs84)&&(i=t.wgs84),this._projection=new Lt(this._ellipsoid);var e=new Re;this._projection.project=function(r){var l={};return i?(l=Td(F.toDegrees(r.longitude),F.toDegrees(r.latitude)),l=Qv(l[0],l[1])):l=Qv(F.toDegrees(r.longitude),F.toDegrees(r.latitude)),l[0]=Math.min(l[0],180),l[0]=Math.max(l[0],-180),l[1]=Math.min(l[1],74.000022),l[1]=Math.max(l[1],-71.988531),l=e.lngLatToPoint(new mi(l[0],l[1])),new j(l.x,l.y)},this._projection.unproject=function(r){var l=e.mercatorToLngLat(new mi(r.x,r.y));return l[0]=(l[0]+180)%360-180,i?(l=Zv(l.lng,l.lat),l=Md(l[0],l[1])):l=Zv(l.lng,l.lat),new ce(F.toRadians(l[0]),F.toRadians(l[1]))},this._rectangleSouthwestInMeters=new j(-2003772637e-2,-1170804166e-2),this._rectangleNortheastInMeters=new j(2003772637e-2,1247410417e-2);var n=this._projection.unproject(this._rectangleSouthwestInMeters),o=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new ie(n.longitude,n.latitude,o.longitude,o.latitude),this.levelWidth=[];for(var s=0;s<19;s++)this.levelWidth[s]=Math.pow(2,18-s)*256}Object.defineProperties(zn.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),zn.prototype.getNumberOfXTilesAtLevel=function(t){return(1<<t)*.7},zn.prototype.getNumberOfYTilesAtLevel=function(t){return 1<<t},zn.prototype.rectangleToNativeRectangle=function(t,i){var e=this._projection,n=e.project(ie.southwest(t)),o=e.project(ie.northeast(t));return T(i)?(i.west=n.x,i.south=n.y,i.east=o.x,i.north=o.y,i):new ie(n.x,n.y,o.x,o.y)},zn.prototype.tileXYToNativeRectangle=function(t,i,e,n){var o=this.levelWidth[e],s=t*o,r=(t+1)*o;i=-i;var l=(i+1)*o,c=i*o;return T(n)?(n.west=s,n.south=c,n.east=r,n.north=l,n):new ie(s,c,r,l)},zn.prototype.tileXYToRectangle=function(t,i,e,n){var o=this.tileXYToNativeRectangle(t,i,e,n),s=this._projection,r=s.unproject(new j(o.west,o.south)),l=s.unproject(new j(o.east,o.north));return o.west=r.longitude,o.south=r.latitude,o.east=l.longitude,o.north=l.latitude,o},zn.prototype.positionToTileXY=function(t,i,e){var n=this._rectangle;if(ie.contains(n,t)){var o=this._projection,s=o.project(t);if(T(s)){var r=this.levelWidth[i],l=Math.floor(s.x/r),c=-Math.floor(s.y/r);return T(e)?(e.x=l,e.y=c,e):new j(l,c)}}};function hh(t){this._url=t.url||"http://online2.map.bdimg.com/onlinelabel/?qt=tile&styles=pl&x={x}&y={y}&z={z}",this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._tilingScheme=new zn(t),this._credit=void 0,this._rectangle=this._tilingScheme.rectangle,this._ready=!0}function DE(t,i,e,n){var o=t._url;return o=o.replace("{x}",i).replace("{y}",-e).replace("{z}",n),o}Object.defineProperties(hh.prototype,{url:{get:function(){return this._url}},token:{get:function(){return this._token}},proxy:{get:function(){return this._proxy}},tileWidth:{get:function(){if(!this._ready)throw new DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 3}},tilingScheme:{get:function(){if(!this._ready)throw new DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),hh.prototype.getTileCredits=function(t,i,e){},hh.prototype.requestImage=function(t,i,e){if(!this._ready)throw new DeveloperError("requestImage must not be called before the imagery provider is ready.");var n=DE(this,t,i,e);return xs.loadImage(this,n)};class RE extends h.UrlTemplateImageryProvider{constructor(e){super(e);v(this,"_indexTime",0);e.url="https://tileser.giiiis.com/timetile/",e.minimumLevel=1,e.maximumLevel=18,e.tilingScheme=new h.GeographicTilingScheme,this.indexTime=e.indexTime||0}get indexTime(){return this._indexTime}set indexTime(e){this._indexTime=e}async requestImage(e,n,o,s){try{let r=this.buildImageUrl(this.indexTime,e,n,o);return h.ImageryProvider.loadImage(this,r)}catch{return}}buildImageUrl(e,n,o,s){return`https://tileser.giiiis.com/timetile/${e}/${s}/${n}/${o}.jpg`}}class FE extends h.UrlTemplateImageryProvider{constructor(e){super(e);v(this,"_indexTimeID",0);e.url="https://wayback.maptiles.arcgis.com/",e.minimumLevel=1,e.maximumLevel=18,this.indexTimeID=e.indexTimeID||0}get indexTimeID(){return this._indexTimeID}set indexTimeID(e){this._indexTimeID=e}async requestImage(e,n,o,s){try{let r;return this.indexTimeID!==0?r=this.buildImageUrl(this.indexTimeID,e,n,o):r=`https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/${o}/${n}/${e}`,h.ImageryProvider.loadImage(this,r)}catch{return}}buildImageUrl(e,n,o,s){return`https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/${e}/${s}/${o}/${n}`}}const zE=document.createElement("canvas");class Dd{constructor(i){v(this,"mapboxRenderer");v(this,"ready");v(this,"readyPromise");v(this,"rectangle");v(this,"tileSize");v(this,"tileWidth");v(this,"tileHeight");v(this,"maximumLevel");v(this,"minimumLevel");v(this,"tileDiscardPolicy");v(this,"credit");v(this,"proxy");v(this,"layerStyle");v(this,"hasAlphaChannel");v(this,"sourceFilter");v(this,"tilingScheme");v(this,"_destroyed",!1);v(this,"_error");v(this,"_style");v(this,"_accessToken");v(this,"_enablePickFeatures");this.ready=!1,this.tilingScheme=i.tilingScheme??new ye.WebMercatorTilingScheme,this.rectangle=i.rectangle??this.tilingScheme.rectangle,this.rectangle=ye.Rectangle.intersection(this.rectangle,this.tilingScheme.rectangle),this.tileSize=this.tileWidth=this.tileHeight=i.tileSize||256,this.maximumLevel=i.maximumLevel??18,this.minimumLevel=i.minimumLevel??0,this.tileDiscardPolicy=void 0,this._error=new ye.Event,this.credit=new ye.Credit(i.credit||"",!1),this.proxy=new ye.DefaultProxy(""),this.hasAlphaChannel=i.hasAlphaChannel??!0,this.sourceFilter=i.sourceFilter,this._accessToken=i.accessToken,this._enablePickFeatures=i.enablePickFeatures??!0,this.layerStyle=i.layerStyle??[],ye.defined(i.style)&&(this.readyPromise=this._build(i.style,i).then(()=>!0))}get style(){return this._style}get isDestroyed(){return this._destroyed}get errorEvent(){return this._error}async _build(i,e={}){const n=await this._preLoad(i,e.scheme??"tms");n.layers=this.layerStyle.length!=0?this.layerStyle:n.layers,this._style=n,this.mapboxRenderer=new u_.BasicRenderer({style:n,canvas:zE,token:e.accessToken,transformRequest:e.transformRequest}),e.showCanvas&&this.mapboxRenderer.showCanvasForDebug(),await this.mapboxRenderer._style.loadedPromise,this.readyPromise=Promise.resolve(!0),this.ready=!0}static async fromUrl(i,e={}){const n=new Dd(e);return await n._build(i,e),n}_preLoad(i,e){let n=i;if(typeof i=="string"&&(i.endsWith(".json")||i.startsWith("mapbox://")?i=new ye.Resource({url:i}):(i={version:8,sources:{customSource:{type:"vector",scheme:e,tiles:[i]}},layers:this.layerStyle},n=i)),i instanceof ye.Resource){const o="https://api.mapbox.com/";i.url.startsWith("mapbox://")&&(i.url=i.url.replace("mapbox://",o)),this._accessToken&&i.appendQueryParameters({access_token:this._accessToken}),n=i.fetchJson()}return Promise.resolve(n).catch(o=>{throw this._error.raiseEvent(o),o})}_createTile(){const i=document.createElement("canvas");return i.width=this.tileSize,i.height=this.tileSize,i.style.imageRendering="pixelated",i}_resetTileCache(){Object.values(this.mapboxRenderer._style.sourceCaches).forEach(i=>i._tileCache.reset())}_getTilesSpec(i,e){const{x:n,y:o,level:s}=i,r=this.tileSize,l=[],c=this.tilingScheme.getNumberOfXTilesAtLevel(s)-1,u=this.tilingScheme.getNumberOfYTilesAtLevel(s)-1;for(let d=-1;d<=1;d++){let p=n+d;p<0&&(p=c),p>c&&(p=0);for(let f=-1;f<=1;f++){let g=o+f;g<0||g>u||l.push({source:e,z:s,x:p,y:g,left:0+d*r,top:0+f*r,size:r})}}return l}requestImage(i,e,n,o=!0){if(n<this.minimumLevel||n>this.maximumLevel)return;this.mapboxRenderer.filterForZoom(n);const s=this.mapboxRenderer.getVisibleSources(n).reduce((r,l)=>r.concat(this._getTilesSpec({x:i,y:e,level:n},l)),[]);return new Promise((r,l)=>{const c=this._createTile(),u=c.getContext("2d");u&&(u.globalCompositeOperation="copy");const d=this.mapboxRenderer.renderTiles(u,{srcLeft:0,srcTop:0,width:this.tileSize,height:this.tileSize,destLeft:0,destTop:0},s,p=>{typeof p=="string"&&!p.endsWith("tiles not available")?l(void 0):o?(d.consumer.ctx=null,r(c),this.mapboxRenderer.releaseRender(d),this._resetTileCache()):r(d)})})}pickFeatures(i,e,n,o,s){var r;if(this._enablePickFeatures)return(r=this.requestImage(i,e,n,!1))==null?void 0:r.then(l=>{let c=this.mapboxRenderer.getVisibleSources(n);c=this.sourceFilter?this.sourceFilter(c):c;const u=[],d=ye.Math.toDegrees(o),p=ye.Math.toDegrees(s);return c.forEach(f=>{const g=new ye.ImageryLayerFeatureInfo;g.data=this.mapboxRenderer.queryRenderedFeatures({source:f,renderedZoom:n,lng:d,lat:p,tileZ:n});const m=Object.keys(g.data)[0];g.name=m;const y=g.data[m];y&&(g.configureDescriptionFromProperties((y==null?void 0:y.length)===1?y[0]:y),u.push(g))}),l.consumer.ctx=void 0,this.mapboxRenderer.releaseRender(l),this._resetTileCache(),u.length?u:void 0})}destroy(){this.mapboxRenderer._cancelAllPendingRenders(),this._resetTileCache(),this._destroyed=!0}}function LE(t,i){let e;return i===0?e=h.JulianDate.toIso8601(t.stop):e=h.JulianDate.toIso8601(t.start),{Time:e}}function jv(t){if(t.type==="fromIso8601")return h.TimeIntervalCollection.fromIso8601({iso8601:t.iso8601,isStartIncluded:t.isStartIncluded,isStopIncluded:t.isStopIncluded,leadingInterval:t.leadingInterval,trailingInterval:t.trailingInterval,dataCallback:LE})}const{getStrFromEnv:uh}=a.ESSceneObject.context;function OE(t){const i=Object.entries(t).map(([e,n])=>{try{const o=n&&Function(`"use strict";return (${n})`)();return[e,o]}catch(o){console.error(`getCustomTagsFromJson error: ${o}`,o);return}}).filter(e=>!!e);return Object.fromEntries(i)}async function NE(t,i){var e,n;if(t.type==="WebMapTileServiceImageryProvider")return new h.WebMapTileServiceImageryProvider({url:Ht(t.url),format:t.format??"image/jpeg",layer:t.layer,style:t.style,tileMatrixSetID:t.tileMatrixSetID,tileMatrixLabels:t.tileMatrixLabels,clock:t.times&&((e=i.viewer)==null?void 0:e.clock),times:t.times&&jv(t.times),dimensions:t.dimensions,tileWidth:t.tileWidth??256,tileHeight:t.tileHeight??256,tilingScheme:t.tilingScheme&&wi(t.tilingScheme),rectangle:t.rectangle&&Ne(t.rectangle),minimumLevel:t.minimumLevel??0,maximumLevel:t.maximumLevel,ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit,subdomains:t.subdomains});if(t.type==="TileMapServiceImageryProvider")return t.url?await h.TileMapServiceImageryProvider.fromUrl(Ht(t.url),{fileExtension:t.fileExtension,credit:t.credit,minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,rectangle:t.rectangle&&Ne(t.rectangle),tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),tileWidth:t.tileWidth,tileHeight:t.tileHeight,flipXY:t.flipXY}):void 0;if(t.type==="UrlTemplateImageryProvider"){const o=t.customTags&&OE(t.customTags);return console.log(Ht(t.url),"111"),new h.UrlTemplateImageryProvider({url:Ht(t.url),credit:t.credit,minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,rectangle:t.rectangle&&Ne(t.rectangle),tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),tileWidth:t.tileWidth,tileHeight:t.tileHeight,subdomains:t.subdomains,hasAlphaChannel:t.hasAlphaChannel,pickFeaturesUrl:t.pickFeaturesUrl,enablePickFeatures:t.enablePickFeatures,urlSchemeZeroPadding:t.urlSchemeZeroPadding,customTags:o})}else{if(t.type==="GridImageryProvider")return new h.GridImageryProvider({tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),tileWidth:t.tileWidth,tileHeight:t.tileHeight,cells:t.cells,color:t.color&&te(t.color),glowColor:t.glowColor&&te(t.glowColor),backgroundColor:t.backgroundColor&&te(t.backgroundColor),canvasSize:t.canvasSize,glowWidth:t.glowWidth});if(t.type==="ArcGisMapServerImageryProvider")return t.url?await h.ArcGisMapServerImageryProvider.fromUrl(Ht(t.url),{token:t.token,usePreCachedTilesIfAvailable:t.usePreCachedTilesIfAvailable,layers:t.layers,enablePickFeatures:t.enablePickFeatures,rectangle:t.rectangle&&Ne(t.rectangle),tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit,tileWidth:t.tileWidth,tileHeight:t.tileHeight,maximumLevel:t.maximumLevel}):void 0;if(t.type==="BingMapsImageryProvider")return t.url?await h.BingMapsImageryProvider.fromUrl(Ht(t.url),{key:t.key,tileProtocol:t.tileProtocol,mapStyle:t.mapStyle&&h.BingMapsStyle[t.mapStyle],culture:t.culture,ellipsoid:t.ellipsoid&&we(t.ellipsoid)}):void 0;if(t.type==="GoogleEarthEnterpriseImageryProvider"){if(!t.url)return;const o=await h.GoogleEarthEnterpriseMetadata.fromUrl(Ht(t.url));return await h.GoogleEarthEnterpriseImageryProvider.fromMetadata(o,{ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit})}else{if(t.type==="IonImageryProvider")return await h.IonImageryProvider.fromAssetId(t.assetId,{accessToken:t.accessToken,server:t.server});if(t.type==="MapboxImageryProvider")return new h.MapboxImageryProvider({url:t.url&&uh(t.url),mapId:t.mapId,accessToken:t.accessToken,format:t.format,ellipsoid:t.ellipsoid&&we(t.ellipsoid),minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,rectangle:t.rectangle&&Ne(t.rectangle),credit:t.credit});if(t.type==="MapboxStyleImageryProvider")return new h.MapboxStyleImageryProvider({url:t.url&&uh(t.url),username:t.username,styleId:t.styleId,accessToken:t.accessToken,tilesize:t.tilesize,scaleFactor:t.scaleFactor,rectangle:t.rectangle&&Ne(t.rectangle),credit:t.credit,ellipsoid:t.ellipsoid&&we(t.ellipsoid),minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel});if(t.type==="OpenStreetMapImageryProvider")return new h.OpenStreetMapImageryProvider({url:uh(t.url),rectangle:t.rectangle&&Ne(t.rectangle),credit:t.credit,ellipsoid:t.ellipsoid&&we(t.ellipsoid),minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,fileExtension:t.fileExtension});if(t.type==="SingleTileImageryProvider")return new h.SingleTileImageryProvider({url:Ht(t.url),rectangle:t.rectangle&&Ne(t.rectangle),credit:t.credit,ellipsoid:t.ellipsoid&&we(t.ellipsoid)});if(t.type==="TileCoordinatesImageryProvider")return new h.TileCoordinatesImageryProvider({tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),color:t.color&&te(t.color),tileWidth:t.tileWidth,tileHeight:t.tileHeight});if(t.type==="WebMapServiceImageryProvider")return new h.WebMapServiceImageryProvider({url:Ht(t.url),layers:t.layers,enablePickFeatures:t.enablePickFeatures,rectangle:t.rectangle&&Ne(t.rectangle),tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,tileWidth:t.tileWidth,tileHeight:t.tileHeight,crs:t.crs,srs:t.srs,credit:t.credit,subdomains:t.subdomains,clock:t.times&&((n=i.viewer)==null?void 0:n.clock),times:t.times&&jv(t.times),parameters:t.parameters,getFeatureInfoParameters:t.getFeatureInfoParameters});if(t.type==="BDImageryProvider")return new hh({url:t.url&&uh(t.url),ellipsoid:t.ellipsoid&&we(t.ellipsoid),wgs84:t.wgs84});if(t.type==="GeHistoryImagery")return new RE({indexTime:t.indexTime});if(t.type==="ArcgisHistoryImagery")return new FE({indexTimeID:t.indexTimeID});if(t.type==="MVTImageryProvider")return t.url?await Dd.fromUrl(t.url,{maximumLevel:t.maximumLevel,minimumLevel:t.minimumLevel,tileSize:t.tileSize,accessToken:t.accessToken,enablePickFeatures:t.enablePickFeatures,rectangle:t.rectangle&&Ne(t.rectangle),layerStyle:t.style,scheme:t.scheme}):void 0}}}function BE(t,i){i.type}class ey extends h.WebMercatorTilingScheme{constructor(i){super(i);var e=this._projection;e.s_project=e.project,e.project=function(s){var r={};return r=Md(h.Math.toDegrees(s.longitude),h.Math.toDegrees(s.latitude)),e.s_project(new h.Cartographic(h.Math.toRadians(r[0]),h.Math.toRadians(r[1])))},e.s_unproject=e.unproject,e.unproject=function(s){var r=e.s_unproject(s),l={};return l=Td(h.Math.toDegrees(r.longitude),h.Math.toDegrees(r.latitude)),new h.Cartographic(h.Math.toRadians(l[0]),h.Math.toRadians(l[1]))};var n=this._projection.unproject(this._rectangleSouthwestInMeters),o=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new h.Rectangle(n.longitude,n.latitude,o.longitude,o.latitude)}}class ty extends h.WebMercatorTilingScheme{constructor(i){super(i);var e=this._projection;e.s_project=e.project,e.project=function(n){var o={};return o=Td(h.Math.toDegrees(n.longitude),h.Math.toDegrees(n.latitude)),e.s_project(new h.Cartographic(h.Math.toRadians(o[0]),h.Math.toRadians(o[1])))},e.s_unproject=e.unproject,e.unproject=function(n){var o=e.s_unproject(n),s={};return s=Md(h.Math.toDegrees(o.longitude),h.Math.toDegrees(o.latitude)),new h.Cartographic(h.Math.toRadians(s[0]),h.Math.toRadians(s[1]))}}}function VE(t){if(t.type==="GeographicTilingScheme")return"new Cesium.GeographicTilingScheme()";if(t.type==="WebMercatorTilingScheme")return"new Cesium.WebMercatorTilingScheme()"}class Ln extends a.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_innerImageryProvider",this.disposeVar(a.react(void 0)));v(this,"_layer",this.disposeVar(a.react(void 0)));const o=e.viewer;if(!o)return;const s=kt(o);if(!s)return;const{imageriesManager:r}=s;r.add(this),this.dispose(()=>{r.has(this)&&r.delete(this)});const l=()=>{this.layer&&(this.layer=void 0)};this.dispose(l);const c=()=>{this.layer&&(this.layer.alpha=this.alpha??1,this.layer.nightAlpha=this.nightAlpha??1,this.layer.dayAlpha=this.dayAlpha??1,this.layer.brightness=this.brightness??1,this.layer.contrast=this.contrast??1,this.layer.hue=this.hue??0,this.layer.saturation=this.saturation??1,this.layer.gamma=this.gamma??1,this.layer.splitDirection=this.splitDirection&&h.SplitDirection[this.splitDirection]||h.SplitDirection.NONE,this.layer.minificationFilter=this.minificationFilter&&h.TextureMinificationFilter[this.minificationFilter]||h.TextureMinificationFilter.LINEAR,this.layer.magnificationFilter=this.magnificationFilter&&h.TextureMagnificationFilter[this.magnificationFilter]||h.TextureMagnificationFilter.LINEAR,this.layer.show=this.show??!0,this.layer.maximumAnisotropy=this.maximumAnisotropy,this.layer.minimumTerrainLevel=this.minimumTerrainLevel,this.layer.maximumTerrainLevel=this.maximumTerrainLevel,this.layer.colorToAlpha=this.colorToAlpha&&toColor(this.colorToAlpha),this.layer.colorToAlphaThreshold=this.colorToAlphaThreshold??.004,this.imageryProvider&&BE(this.layer.imageryProvider,this.imageryProvider))};let u=!1;const d=this.disposeVar(a.createProcessingFromAsyncFunc(async(y,_)=>{if(_){if(u=!0,l(),!this.innerImageryProvider)return;const P=await y.promise(NE(this.innerImageryProvider,e));if(!P){console.error("createImageryProviderFromJson error!");return}this.layer=new h.ImageryLayer(P),h.ImageryLayer.prototype&&(this.layer.ESSceneObjectID=n),u=!1}c()}));d.restart(void 0,!0);const p=this.disposeVar(new a.Event),f=this.disposeVar(new a.Event);this.ad(this.layerChanged.don(()=>{if(!this.innerImageryProvider||!this.layer||!Reflect.has(this.innerImageryProvider,"rectangle")||this.innerImageryProvider.rectangle[0]!=this.imageryProvider.rectangle[0]||this.innerImageryProvider.rectangle[1]!=this.imageryProvider.rectangle[1]||this.innerImageryProvider.rectangle[2]!=this.imageryProvider.rectangle[2]||this.innerImageryProvider.rectangle[3]!=this.imageryProvider.rectangle[3])return;const y=this.layer.imageryProvider.tilingScheme.rectangle,_=this.innerImageryProvider.rectangle&&Ne(this.innerImageryProvider.rectangle);(_.west<y.west||_.south<y.south||_.east>y.east||_.north>y.north)&&(this.innerImageryProvider.rectangle=[h.Math.toDegrees(Math.max(y.west,parseFloat(_.west.toFixed(7)))),h.Math.toDegrees(Math.max(y.south,parseFloat(_.south.toFixed(7)))),h.Math.toDegrees(Math.min(y.east,parseFloat(_.east.toFixed(7)))),h.Math.toDegrees(Math.min(y.north,parseFloat(_.north.toFixed(7))))],p.emit())})),this.dispose(this.imageryProviderChanged.disposableOn(()=>{this.innerImageryProvider=structuredClone(this.imageryProvider),p.emit()})),this.dispose(a.ESSceneObject.context.environmentVariablesChanged.disposableOn(()=>{p.emit()}));const g=this.disposeVar(a.createNextAnimateFrameEvent(this.rectangleChanged,p));this.dispose(g.disposableOn(()=>{d.restart(void 0,!0)}));const m=this.disposeVar(a.createNextAnimateFrameEvent(this.alphaChanged,this.nightAlphaChanged,this.dayAlphaChanged,this.brightnessChanged,this.contrastChanged,this.hueChanged,this.saturationChanged,this.gammaChanged,this.splitDirectionChanged,this.minificationFilterChanged,this.magnificationFilterChanged,this.showChanged,this.maximumAnisotropyChanged,this.minimumTerrainLevelChanged,this.maximumTerrainLevelChanged,this.cutoutRectangleChanged,this.colorToAlphaChanged,this.colorToAlphaThresholdChanged,f));this.dispose(m.disposableOn(()=>{u||d.restart(void 0,!1)})),this.dispose(this.flyToEvent.disposableOn(y=>{if(!e.actived)return;const{viewer:_}=e;_&&_.camera.flyTo({destination:this.rectangle&&!Cu(this.rectangle)?Ne(this.rectangle):h.Camera.DEFAULT_VIEW_RECTANGLE,duration:y})}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get innerImageryProvider(){return this._innerImageryProvider.value}set innerImageryProvider(e){this._innerImageryProvider.value=e}get innerImageryProviderChanged(){return this._innerImageryProvider.changed}get layer(){return this._layer.value}set layer(e){this._layer.value=e}get layerChanged(){return this._layer.changed}}v(Ln,"defaults",{show:!0,rectangle:[-180,-90,180,90],alpha:1,nightAlpha:1,dayAlpha:1,brightness:1,contrast:1,hue:0,saturation:1,gamma:1,splitDirection:"NONE",minificationFilter:"LINEAR",magnificationFilter:"LINEAR",maximumAnisotropy:0,minimumTerrainLevel:0,maximumTerrainLevel:0,cutoutRectangle:[1,1,1,1],colorToAlpha:[1,1,1,.5],colorToAlphaThreshold:.004,imageryProvider:{type:"TileMapServiceImageryProvider"},zIndex:0,hasAlphaChannel:!0,pickFeaturesUrl:""}),(t=>{t.createDefaultProps=()=>({show:void 0,rectangle:a.reactArrayWithUndefined(void 0),alpha:void 0,nightAlpha:void 0,dayAlpha:void 0,brightness:void 0,contrast:void 0,hue:void 0,saturation:void 0,gamma:void 0,splitDirection:void 0,minificationFilter:void 0,magnificationFilter:void 0,maximumAnisotropy:void 0,minimumTerrainLevel:void 0,maximumTerrainLevel:void 0,cutoutRectangle:a.reactArrayWithUndefined(void 0),colorToAlpha:a.reactArrayWithUndefined(void 0),colorToAlphaThreshold:void 0,imageryProvider:a.reactJsonWithUndefined(void 0),zIndex:0,hasAlphaChannel:void 0,pickFeaturesUrl:void 0,targetID:void 0})})(Ln||(Ln={})),a.extendClassProps(Ln.prototype,Ln.createDefaultProps);const Rd=h.ApproximateTerrainHeights,UE=h.ComponentDatatype,ct=h.defined,WE=h.destroyObject,Fd=h.DeveloperError,GE=h.deprecationWarning,HE=h.GeometryInstance,$E=h.GeometryInstanceAttribute,qE=h.GroundPolylineGeometry,Wr=h.DrawCommand,iy=h.Pass,ny=h.RenderState,XE=h.ShaderProgram,Gr=h.ShaderSource;let zd=h._shadersPolylineShadowVolumeFS;const YE=h._shadersPolylineShadowVolumeMorphFS,ZE=h._shadersPolylineShadowVolumeMorphVS;let Ld=h._shadersPolylineShadowVolumeVS;const oy=h.BlendingState,Od=h.ClassificationType,QE=h.CullFace,sy=h.PolylineColorAppearance,kE=h.PolylineMaterialAppearance,On=h.Primitive,As=h.SceneMode,ry=h.StencilConstants,ay=h.StencilFunction,Ts=h.StencilOperation;Ld=Ld.replace("width = width * max(0.0, czm_metersPerPixel(positionEC));",""),zd=zd.replace("float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);","float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w;");function Ti(t){t=t??h.Frozen.EMPTY_OBJECT,this.geometryInstances=t.geometryInstances,this._hasPerInstanceColors=!0;let i=t.appearance;ct(i)||(i=new kE),this.appearance=i,this.show=t.show??!0,this.classificationType=t.classificationType??Od.BOTH,this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this._debugShowShadowVolume=t.debugShowShadowVolume??!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:t.interleave??!1,releaseGeometryInstances:t.releaseGeometryInstances??!0,allowPicking:t.allowPicking??!0,asynchronous:t.asynchronous??!0,compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1;const e=this;this._readyPromise=new Promise((n,o)=>{e._completeLoad=()=>{this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0);const s=this._error;ct(s)?o(s):n(this)}}),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=ly(!1),this._renderState3DTiles=ly(!0),this._renderStateMorph=ny.fromCache({cull:{enabled:!0,face:QE.FRONT},depthTest:{enabled:!0},blending:oy.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(Ti.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return GE("GroundPolylinePrimitive.readyPromise","GroundPolylinePrimitive.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for GroundPolylinePrimitive.ready to return true instead."),this._readyPromise}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),Ti.initializeTerrainHeights=function(){return Rd.initialize()};function KE(t,i,e){const n=i.context,o=t._primitive,s=o._attributeLocations;let r=o._batchTable.getVertexShaderCallback()(Ld);r=On._appendShowToShader(o,r),r=On._appendDistanceDisplayConditionToShader(o,r),r=On._modifyShaderPosition(t,r,i.scene3DOnly);let l=o._batchTable.getVertexShaderCallback()(ZE);l=On._appendShowToShader(o,l),l=On._appendDistanceDisplayConditionToShader(o,l),l=On._modifyShaderPosition(t,l,i.scene3DOnly);let c=o._batchTable.getVertexShaderCallback()(zd);const u=[`GLOBE_MINIMUM_ALTITUDE ${i.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`];let d="",p="";ct(e.material)?(p=ct(e.material)?e.material.shaderSource:"",p.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&u.push("ANGLE_VARYING"),p.search(/in\s+float\s+v_width;/g)!==-1&&u.push("WIDTH_VARYING")):d="PER_INSTANCE_COLOR",u.push(d);const f=t.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",d]:[d],g=new Gr({defines:u,sources:[r]}),m=new Gr({defines:f,sources:[p,c]});t._sp=XE.replaceCache({context:n,shaderProgram:o._sp,vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:s});let y=n.shaderCache.getDerivedShaderProgram(t._sp,"2dColor");if(!ct(y)){const P=new Gr({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[r]});y=n.shaderCache.createDerivedShaderProgram(t._sp,"2dColor",{context:n,shaderProgram:t._sp2D,vertexShaderSource:P,fragmentShaderSource:m,attributeLocations:s})}t._sp2D=y;let _=n.shaderCache.getDerivedShaderProgram(t._sp,"MorphColor");if(!ct(_)){const P=new Gr({defines:u.concat([`MAX_TERRAIN_HEIGHT ${Rd._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[l]});c=o._batchTable.getVertexShaderCallback()(YE);const C=new Gr({defines:f,sources:[p,c]});_=n.shaderCache.createDerivedShaderProgram(t._sp,"MorphColor",{context:n,shaderProgram:t._spMorph,vertexShaderSource:P,fragmentShaderSource:C,attributeLocations:s})}t._spMorph=_}function ly(t){return ny.fromCache({cull:{enabled:!0},blending:oy.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:t,frontFunction:ay.EQUAL,frontOperation:{fail:Ts.KEEP,zFail:Ts.KEEP,zPass:Ts.KEEP},backFunction:ay.EQUAL,backOperation:{fail:Ts.KEEP,zFail:Ts.KEEP,zPass:Ts.KEEP},reference:ry.CESIUM_3D_TILE_MASK,mask:ry.CESIUM_3D_TILE_MASK}})}function JE(t,i,e,n,o,s){const r=t._primitive,l=r._va.length;o.length=l,s.length=l;const u=i instanceof sy?{}:e._uniforms,d=r._batchTable.getUniformMapCallback()(u);for(let p=0;p<l;p++){const f=r._va[p];let g=o[p];ct(g)||(g=o[p]=new Wr({owner:t,primitiveType:r._primitiveType})),g.vertexArray=f,g.renderState=t._renderState,g.shaderProgram=t._sp,g.uniformMap=d,g.pass=iy.TERRAIN_CLASSIFICATION,g.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";const m=Wr.shallowClone(g,g.derivedCommands.tileset);m.renderState=t._renderState3DTiles,m.pass=iy.CESIUM_3D_TILE_CLASSIFICATION,g.derivedCommands.tileset=m;const y=Wr.shallowClone(g,g.derivedCommands.color2D);y.shaderProgram=t._sp2D,g.derivedCommands.color2D=y;const _=Wr.shallowClone(m,m.derivedCommands.color2D);_.shaderProgram=t._sp2D,m.derivedCommands.color2D=_;const P=Wr.shallowClone(g,g.derivedCommands.colorMorph);P.renderState=t._renderStateMorph,P.shaderProgram=t._spMorph,P.pickId="czm_batchTable_pickColor(v_batchId)",g.derivedCommands.colorMorph=P}}function cy(t,i,e,n,o,s,r){e.mode===As.MORPHING?i=i.derivedCommands.colorMorph:e.mode!==As.SCENE3D&&(i=i.derivedCommands.color2D),i.modelMatrix=n,i.boundingVolume=s,i.cull=o,i.debugShowBoundingVolume=r,e.commandList.push(i)}function jE(t,i,e,n,o,s,r){const l=t._primitive;On._updateBoundingVolumes(l,i,o);let c;i.mode===As.SCENE3D?c=l._boundingSphereWC:i.mode===As.COLUMBUS_VIEW?c=l._boundingSphereCV:i.mode===As.SCENE2D&&ct(l._boundingSphere2D)?c=l._boundingSphere2D:ct(l._boundingSphereMorph)&&(c=l._boundingSphereMorph);const u=i.mode===As.MORPHING,d=t.classificationType,p=d!==Od.CESIUM_3D_TILE,f=d!==Od.TERRAIN&&!u;let g;const m=i.passes;if(m.render||m.pick&&l.allowPicking){const y=e.length;for(let _=0;_<y;++_){const P=c[_];p&&(g=e[_],cy(t,g,i,o,s,P,r)),f&&(g=e[_].derivedCommands.tileset,cy(t,g,i,o,s,P,r))}}}Ti.prototype.update=function(t){if(!ct(this._primitive)&&!ct(this.geometryInstances))return;if(!Rd.initialized){if(!this.asynchronous)throw new Fd("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");Ti.initializeTerrainHeights();return}let i;const e=this,n=this._primitiveOptions;if(!ct(this._primitive)){const o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],s=o.length,r=new Array(s);let l;for(i=0;i<s;++i)if(l=o[i].attributes,!ct(l)||!ct(l.color)){this._hasPerInstanceColors=!1;break}for(i=0;i<s;++i){const c=o[i];l={};const u=c.attributes;for(const d in u)u.hasOwnProperty(d)&&(l[d]=u[d]);ct(l.width)||(l.width=new $E({componentDatatype:UE.UNSIGNED_BYTE,componentsPerAttribute:1,value:[c.geometry.width]})),c.geometry._scene3DOnly=t.scene3DOnly,qE.setProjectionAndEllipsoid(c.geometry,t.mapProjection),r[i]=new HE({geometry:c.geometry,attributes:l,id:c.id,pickPrimitive:e})}n.geometryInstances=r,n.appearance=this.appearance,n._createShaderProgramFunction=function(c,u,d){KE(e,u,d)},n._createCommandsFunction=function(c,u,d,p,f,g,m){JE(e,u,d,p,g,m)},n._updateAndQueueCommandsFunction=function(c,u,d,p,f,g,m,y){jE(e,u,d,p,f,g,m)},this._primitive=new On(n)}if(this.appearance instanceof sy&&!this._hasPerInstanceColors)throw new Fd("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(t),t.afterRender.push(()=>{!this._ready&&ct(this._primitive)&&this._primitive.ready&&this._completeLoad()})},Ti.prototype.getGeometryInstanceAttributes=function(t){if(!ct(this._primitive))throw new Fd("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(t)},Ti.isSupported=function(t){return t.frameState.context.depthTexture},Ti.prototype.isDestroyed=function(){return!1},Ti.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,WE(this)};class Po extends a.Destroyable{constructor(i){super();const e=i.viewer;if(!e){console.warn("viewer is undefined!");return}const n=e.scene.globe,o=-414,s=8777;let r={};const l=()=>{var p,f,g,m,y;if(!e)return;let u;const d=this.shadingMode||"none";if((this.show??!0)&&!(d==="none"&&!this.enableContour)){let _;this.enableContour?(d==="elevation"?(u=ex(),_=u.materials.elevationRampMaterial.uniforms,_.minimumHeight=((p=this.elevationParam)==null?void 0:p.minHeight)??o,_.maximumHeight=((f=this.elevationParam)==null?void 0:f.maxHeight)??s,r=u.materials.contourMaterial.uniforms):d==="slope"?(u=tx(),_=u.materials.slopeRampMaterial.uniforms,r=u.materials.contourMaterial.uniforms):d==="aspect"?(u=ix(),_=u.materials.aspectRampMaterial.uniforms,r=u.materials.contourMaterial.uniforms):(u=h.Material.fromType("ElevationContour"),r=u.uniforms),r.width=this.contourWidth,r.spacing=this.contourSpacing,r.color=h.Color.fromCartesian4(h.Cartesian4.fromArray(this.contourColor))):d==="elevation"?(u=h.Material.fromType("ElevationRamp"),_=u.uniforms,_.minimumHeight=((g=this.elevationParam)==null?void 0:g.minHeight)??o,_.maximumHeight=((m=this.elevationParam)==null?void 0:m.maxHeight)??s):d==="slope"?(u=h.Material.fromType("SlopeRamp"),_=u.uniforms):d==="aspect"&&(u=h.Material.fromType("AspectRamp"),_=u.uniforms),d!=="none"&&(_.image=hy(d),d==="elevation"&&((y=this.elevationParam)==null?void 0:y.color)!==void 0&&(_.image=Array.isArray(this.elevationParam.color)?hy(d,this.elevationParam.color):this.elevationParam.color))}n.material=u};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(this.contourColorChanged,this.contourSpacingChanged,this.contourWidthChanged,this.enableContourChanged,this.shadingModeChanged,this.showChanged,this.elevationParamChanged));this.dispose(c.disposableOn(l)),this.dispose(()=>n.material=void 0)}}v(Po,"defaults",{show:!1,enableContour:!1,contourSpacing:150,contourWidth:2,contourColor:[1,0,0,1],shadingMode:"none"}),(t=>{t.createDefaultProps=()=>({show:void 0,shadingMode:void 0,enableContour:!1,contourSpacing:150,contourWidth:2,contourColor:[1,0,0,1],elevationParam:a.reactJsonWithUndefined(void 0)})})(Po||(Po={})),a.extendClassProps(Po.prototype,Po.createDefaultProps);function ex(){return new h.Material({fabric:{type:"ElevationColorContour",materials:{contourMaterial:{type:"ElevationContour"},elevationRampMaterial:{type:"ElevationRamp"}},components:{diffuse:"contourMaterial.alpha == 0.0 ? elevationRampMaterial.diffuse : contourMaterial.diffuse",alpha:"max(contourMaterial.alpha, elevationRampMaterial.alpha)"}},translucent:!1})}function tx(){return new h.Material({fabric:{type:"SlopeColorContour",materials:{contourMaterial:{type:"ElevationContour"},slopeRampMaterial:{type:"SlopeRamp"}},components:{diffuse:"contourMaterial.alpha == 0.0 ? slopeRampMaterial.diffuse : contourMaterial.diffuse",alpha:"max(contourMaterial.alpha, slopeRampMaterial.alpha)"}},translucent:!1})}function ix(){return new h.Material({fabric:{type:"AspectColorContour",materials:{contourMaterial:{type:"ElevationContour"},aspectRampMaterial:{type:"AspectRamp"}},components:{diffuse:"contourMaterial.alpha == 0.0 ? aspectRampMaterial.diffuse : contourMaterial.diffuse",alpha:"max(contourMaterial.alpha, aspectRampMaterial.alpha)"}},translucent:!1})}const nx=[0,.045,.1,.15,.37,.54,1],ox=[0,.29,.5,Math.sqrt(2)/2,.87,.91,1],sx=[0,.2,.4,.6,.8,.9,1];function hy(t,i){const e=document.createElement("canvas");e.width=100,e.height=1;const n=e.getContext("2d");let o;if(t==="elevation")o=nx;else if(t==="slope")o=ox;else if(t==="aspect")o=sx;else throw new Error("values未赋值!");const s=n.createLinearGradient(0,0,100,0);return s.addColorStop(o[0],i!=null&&i[0]?wn(i==null?void 0:i[0]):"#000000"),s.addColorStop(o[1],i!=null&&i[1]?wn(i==null?void 0:i[1]):"#2747E0"),s.addColorStop(o[2],i!=null&&i[2]?wn(i==null?void 0:i[2]):"#D33B7D"),s.addColorStop(o[3],i!=null&&i[3]?wn(i==null?void 0:i[3]):"#D33038"),s.addColorStop(o[4],i!=null&&i[4]?wn(i==null?void 0:i[4]):"#FF9742"),s.addColorStop(o[5],i!=null&&i[5]?wn(i==null?void 0:i[5]):"#ffd700"),s.addColorStop(o[6],i!=null&&i[6]?wn(i==null?void 0:i[6]):"#ffffff"),n.fillStyle=s,n.fillRect(0,0,100,1),e}class Ms extends a.Destroyable{constructor(e){super();v(this,"_geoPath");v(this,"_geoPolyline");v(this,"_geoCanvasPointPoi");v(this,"_player");v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_currentDistance",this.disposeVar(a.react(0)));v(this,"_ratio",this.disposeVar(a.PlayerProperty.createPlayingRatio([this,"currentTime"],[this,"duration"])));this._geoPath=this.disposeVar(new a.ESPathImpl),this._geoPolyline=this.disposeVar(new be(e)),this._geoCanvasPointPoi=this.disposeVar(new _n(e)),this._player=this.disposeVar(new a.Player),this._geoPolyline.show=!1,this.dispose(a.bind([this._geoPolyline,"positions"],[this,"positions"])),this.dispose(a.track([this._geoPath,"currentTime"],[this,"currentDistance"])),this.dispose(a.track([this._geoPath,"leadTime"],[this,"leadTime"])),this.dispose(a.track([this._geoPath,"trailTime"],[this,"trailTime"])),this.dispose(a.track([this._geoPath,"show"],[this,"show"])),this.dispose(a.track([this._geoPath,"polylineShow"],[this,"polylineShow"])),this.dispose(a.track([this._geoPath,"currentPoiShow"],[this,"currentPoiShow"])),this.dispose(a.track([this._geoPath,"width"],[this,"width"])),this.dispose(a.track([this._geoPath,"ground"],[this,"ground"])),this.dispose(a.track([this._geoPath,"color"],[this,"color"])),this.dispose(a.track([this._geoPath,"hasDash"],[this,"hasDash"])),this.dispose(a.track([this._geoPath,"gapColor"],[this,"gapColor"])),this.dispose(a.track([this._geoPath,"dashLength"],[this,"dashLength"])),this.dispose(a.track([this._geoPath,"dashPattern"],[this,"dashPattern"])),this.dispose(a.track([this._geoPath,"hasArrow"],[this,"hasArrow"])),this.dispose(a.track([this._geoPath,"depthTest"],[this,"depthTest"])),this.dispose(a.track([this._geoPath,"arcType"],[this,"arcType"])),this.dispose(a.track([this._geoPath,"allowPicking"],[this,"allowPicking"]));{const n=()=>{this._geoCanvasPointPoi.show=(this.show??!0)&&(this.currentPoiShow??!0)};n(),this.dispose(this.showChanged.disposableOn(n)),this.dispose(this.currentPoiShowChanged.disposableOn(n))}this.dispose(a.track([this._geoCanvasPointPoi,"position"],[this,"currentPosition"]));{const n=()=>{if(this.positions){const s=this.granularity*Math.PI/180,r=pu(this.positions,this.arcType??"GEODESIC",s);if(r){this._geoPath.timePosRots=r.timePosRots,this.rotationRadius.some(l=>l>0)?(this._geoPath.addAroundPoints(this.rotationRadius,!0),this._geoPath.computeRotIfUndefinedUsingLerp(!0),this._geoPath.rotLerpMode="Lerp"):(this._geoPath.computeRotIfUndefinedUsingPrevLine(!0),this._geoPath.rotLerpMode=this.rotLerpMode);return}}this._geoPath.timePosRots=[]};n();const o=this.disposeVar(a.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged,this.granularityChanged,this.rotationRadiusChanged,this.rotLerpModeChanged));this.dispose(o.disposableOn(n))}{const n=()=>{if((this._player.duration??3e3)<=0){this.currentDistance=0;return}const o=this.totalDistance*((this._player.currentTime??0)/(this._player.duration??3e3));Math.abs(o-this.currentDistance)>.01&&(this.currentDistance=o)};n(),this.dispose(this._player.currentTimeChanged.disposableOn(n))}{const n=()=>{if(this.totalDistance<=0){this._player.currentTime=0;return}const o=this.currentDistance/this.totalDistance*(this.duration??3e3);Math.abs(o-(this._player.currentTime??0))>.01&&(this._player.currentTime=o)};n(),this.dispose(this.currentDistanceChanged.disposableOn(n))}this.dispose(a.bind([this._player,"loop"],[this,"loop"])),this.dispose(a.bind([this._player,"currentTime"],[this,"currentTime"])),this.dispose(a.bind([this._player,"duration"],[this,"duration"])),this.dispose(a.bind([this._player,"playing"],[this,"playing"])),this.dispose(a.bind([this._player,"speed"],[this,"speed"])),this.dispose(this._flyToEvent.disposableOn(n=>{this._geoPolyline.flyTo(n)}))}get geoPath(){return this._geoPath}get geoPolyline(){return this._geoPolyline}get geoCanvasPointPoi(){return this._geoCanvasPointPoi}get player(){return this._player}get currentInfo(){return this._geoPath.currentInfo}get currentInfoChanged(){return this._geoPath.currentInfoChanged}get currentIndex(){return this._geoPath.currentIndex}get currentIndexChanged(){return this._geoPath.currentIndexChanged}get currentPosition(){return this._geoPath.currentPosition}get currentPositionChanged(){return this._geoPath.currentPositionChanged}get currentRotation(){return this._geoPath.currentRotation}get currentRotationChanged(){return this._geoPath.currentRotationChanged}get accumDistances(){return this._geoPath.accumDistances}get accumDistancesChanged(){return this._geoPath.accumDistancesChanged}get totalDistance(){return this._geoPath.totalDistance}get totalDistanceChanged(){return this._geoPath.totalDistanceChanged}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}subPath(e,n){const o=this._geoPath.subPath(e,n);if(o)return o.map(s=>s[1])}get currentDistance(){return this._currentDistance.value}set currentDistance(e){this._currentDistance.value=e}get currentDistanceChanged(){return this._currentDistance.changed}get ratio(){return this._ratio.value}set ratio(e){this._ratio.value=e}get ratioChanged(){return this._ratio.changed}get timePosRots(){return this.geoPath.timePosRots}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,currentPoiShow:!0,polylineShow:!0,positions:a.reactPositions(void 0),width:1,ground:!1,color:a.reactArray([1,1,1,1]),hasDash:!1,gapColor:a.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",granularity:1,loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,depthTest:!1,leadTime:0,trailTime:0,rotationRadius:[0],rotLerpMode:"Next"})})(Ms||(Ms={})),a.extendClassProps(Ms.prototype,Ms.createDefaultProps);class fe extends Jt{constructor(e,n){super(e,n);v(this,"_smoothMoving");if(this._smoothMoving=this.disposeVar(new a.SmoothMoveController(this.czmViewer)),this.d(this._smoothMoving.currentPositionChanged.don(s=>{s&&(this.sceneObject.position=s)})),this.d(this._smoothMoving.currentRotationChanged.don(s=>{s&&this._smoothMoving.isRotating&&(this.sceneObject.rotation=s)})),this.d(this._smoothMoving.currentHeadingChanged.don(s=>{if(s!==void 0&&!this._smoothMoving.isRotating){const r=this.sceneObject.rotation;this.sceneObject.rotation=[s-90,r[1],r[2]]}})),!n.viewer){console.warn("viewer is undefined!");return}this.d(e.smoothMoveEvent.don((s,r)=>{this.smoothMove(s,r*1e3)})),this.d(e.smoothMoveWithRotationEvent.don((s,r,l)=>{this.smoothMoveWithRotation(s,r,l*1e3)})),this.d(e.smoothMoveOnGroundEvent.don((s,r,l)=>{this.smoothMoveOnGround(s,r,l*1e3)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((s,r,l,c)=>{this.smoothMoveWithRotationOnGround(s,r,l,c*1e3)})),this.d(e.calcFlyToParamEvent.don(()=>{if(!e.useCalcFlyToParamInESObjectWithLocation)return;if(!e.position){console.warn(`!sceneObject(${e.name}-${e.id}).position`);return}const s=n.calcFlyToParam(e.position);if(!s){console.warn("czmViewer.calcFlyToParam error.");return}e.flyToParam=s})),this.d(e.automaticLandingEvent.don(async s=>{const r=[e.position[0],e.position[1]],l=await n.getTerrainHeight(r);l?e.position=[...r,l]:console.warn("不存在相交"),e.collision=s}));{const s=this.dv(a.createNextAnimateFrameEvent(e.minVisibleDistanceChanged,e.maxVisibleDistanceChanged));this.d(s.don(()=>this.visibleDistance(e,n))),this.d(n.cameraChanged.don(()=>this.visibleDistance(e,n)))}}smoothMove(e,n){this._smoothMoving.isGround=!1,this._smoothMoving.isRotating=!1,this._smoothMoving.restart(this.sceneObject.position,this.sceneObject.rotation,0),this._smoothMoving.restart(e,this.sceneObject.rotation,n)}smoothMoveWithRotation(e,n,o){this._smoothMoving.isGround=!1,this._smoothMoving.isRotating=!0,this._smoothMoving.restart(this.sceneObject.position,this.sceneObject.rotation,0),this._smoothMoving.restart(e,n,o)}async smoothMoveOnGround(e,n,o){const s=await this.czmViewer.getTerrainHeight([e,n])??0;this._smoothMoving.isGround=!0,this._smoothMoving.isRotating=!1,this._smoothMoving.restart(this.sceneObject.position,this.sceneObject.rotation,0),this._smoothMoving.restart([e,n,s],this.sceneObject.rotation,o)}async smoothMoveWithRotationOnGround(e,n,o,s){const r=await this.czmViewer.getTerrainHeight([n,o])??0;this._smoothMoving.isGround=!0,this._smoothMoving.isRotating=!0,this._smoothMoving.restart(this.sceneObject.position,this.sceneObject.rotation,0),this._smoothMoving.restart([n,o,r],e,s)}visibleDistance(e,n){var s;const o=fe.getInnerCzmObjects(this);if((s=n.viewer)!=null&&s.camera&&e.show&&o.length!=0){const r=a.getDistancesFromPositions([e.position,Gt(n.viewer.camera)],"NONE")[0];let l=!1;e.minVisibleDistance<e.maxVisibleDistance?l=e.minVisibleDistance<r&&r<e.maxVisibleDistance:e.maxVisibleDistance==0&&(l=r>e.minVisibleDistance),o.forEach(c=>{if(c instanceof ze)return;const u=e.show&&l;Reflect.has(c,"showHelper")&&(c.showHelper=u),Reflect.has(c,"enabled")&&(c.enabled=u),Reflect.has(c,"show")&&(c.show=u)})}}static getInnerCzmObjects(e){const n=[];for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(!o.includes("czmViewer")&&o.includes("czm")||!Number.isNaN(+o)?Array.isArray(e[o])?n.push(...fe.getInnerCzmObjects(e[o])):n.push(e[o]):e[o]&&e[o].obj&&n.push(...fe.getInnerCzmObjects(e[o].obj)));return n}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;if(!s.actived)return!1;if(o.flyToParam&&o.position){const{position:r,flyToParam:l}=o,{distance:c,heading:u,pitch:d,flyDuration:p,hDelta:f,pDelta:g}=l;return this.flyToWithPromise(n,r,c,[u,d,0],e??p,f,g),!0}return super.flyTo(e,n)}flyIn(e,n){const{sceneObject:o,czmViewer:s}=this;if(!s.actived)return!1;if(!o.flyInParam&&o.position&&o.rotation){const r=e??1,l=[...o.rotation];return l[0]+=90,this.flyToWithPromise(n,o.position,void 0,l,r),!0}return super.flyIn(e,n)}}class vt extends Jt{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}}}class Hr extends fe{constructor(e,n){super(e,n);v(this,"_lastHoverResult",this.disposeVar(a.react(void 0)));if(!n.viewer){console.warn("viewer is undefined!");return}const s=this.ad(a.createProcessingFromAsyncFunc(async(r,l)=>{const c=await r.promise(n.pick(l.screenPosition,"innerHoverEvent"));this.lastHoverResult=Object.assign({},c,l)}));this.ad(n.pointerMoveEvent.don(async r=>{!s.isRunning&&s.restart(void 0,r)}))}get lastHoverResult(){return this._lastHoverResult.value}set lastHoverResult(e){this._lastHoverResult.value=e}get lastHoverResultChanged(){return this._lastHoverResult.changed}}class dh extends fe{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}}}function rx(t,i,e){const n=t,o=i,s=(o[0]-n[0]+(o[1]-n[1]))/4,r=[[n[0],0,n[1]],[o[0],0,n[1]],[o[0],0,o[1]],[n[0],0,o[1]],[0,s,0]],l=h.Math.toDegrees,c=r.map(d=>{const p=h.Matrix4.multiplyByPoint(e,h.Cartesian3.fromElements(...d),new h.Cartesian3),f=h.Cartographic.fromCartesian(p);return[l(f.longitude),l(f.latitude),f.height]});return[[[c[0],c[1],c[2],c[3],c[0]]],c[4]]}class bo extends a.Destroyable{constructor(e,n){super();v(this,"_id",this.disposeVar(a.react(a.createGuid())));v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_polylines");v(this,"_axis");n&&(this.id=n),this._polylines=this.disposeVar(new $t(e,n)),this._axis=this.disposeVar(new be(e,n)),this._axis.hasArrow=!0,this._axis.width=10,this._polylines.arcType=this._axis.arcType="NONE",this.dispose(this.flyToEvent.disposableOn(o=>{if(!(e instanceof Te)||!e.actived)return;if(!this.position){console.warn("CzmPlane warning: 没有位置,无法飞入!");return}const s=this.minSize,r=this.maxSize,l=[r[0]-s[0],r[1]-s[1]],c=Math.sqrt(l[0]*l[0]+l[1]*l[1]);ne(e.viewer,this.position,c*2,void 0,o)}));{const o=()=>{let r=[],l;if(this.position){const c=Ie({position:this.position,rotation:this.rotation});if(c){const u=rx(this.minSize,this.maxSize,c);r=u[0],l=u[1]}}this.polylines.positions=r,!(!this.position||!l)&&(this.axis.positions=[this.position,l])};o();const s=this.disposeVar(a.createNextAnimateFrameEvent(this.positionChanged,this.rotationChanged,this.minSizeChanged,this.maxSizeChanged));this.dispose(s.disposableOn(o))}this.dispose(a.track([this.polylines,"color"],[this,"color"])),this.dispose(a.track([this.polylines,"width"],[this,"width"])),this.dispose(a.track([this.polylines,"show"],[this,"show"])),this.dispose(a.track([this.axis,"color"],[this,"color"]));{const o=()=>{this.axis.show=this.show&&this.showArrow};o(),this.dispose(this.showChanged.disposableOn(o)),this.dispose(this.showArrowChanged.disposableOn(o))}}get id(){return this._id.value}set id(e){this._id.value=e}get idChanged(){return this._id.changed}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get polylines(){return this._polylines}get axis(){return this._axis}}v(bo,"defaults",{position:[116.39,39.9,100]}),(t=>{t.createDefaultProps=()=>({show:!0,showArrow:!0,position:a.reactArrayWithUndefined(void 0),rotation:a.reactArray([0,0,0]),color:a.reactArray([1,1,1,1]),width:2,minSize:a.reactArray([-100,-100]),maxSize:a.reactArray([100,100])})})(bo||(bo={})),a.extendClassProps(bo.prototype,bo.createDefaultProps);class ax extends a.Destroyable{constructor(e,n,o){super();v(this,"_centerMatrix",this.disposeVar(a.react(void 0)));v(this,"_inverseCenterMatrix",this.disposeVar(a.react(void 0)));v(this,"_czmPlaneWrappers");v(this,"_czmPlaneWrappersChanged",this.disposeVar(a.createNextAnimateFrameEvent()));v(this,"_computedPlanesChanged",this.disposeVar(a.createNextAnimateFrameEvent()));this._czmClippingPlanes=n,this._planeIds=o,this._czmPlaneWrappers=this._planeIds.map(s=>this.disposeVar(new cx(e,this,s)));{const s=()=>{let r,l;const c=this._czmPlaneWrappers.filter(u=>u.position&&u.rotation);if(c.length!==0){const u=c.map(p=>p.position),d=a.getMinMaxCorner(u);r=Ie({position:d.center}),r&&(l=h.Matrix4.inverseTransformation(r,new h.Matrix4))}this.centerMatrix=r,this.inverseCenterMatrix=l};s(),this.dispose(this.czmPlaneWrappersChanged.disposableOn(s))}{const s=()=>{if(!this.centerMatrix){this._czmClippingPlanes.computedClippingPlanes=void 0;return}const l=h.Matrix4.toArray(this.centerMatrix),c=this._czmPlaneWrappers.filter(u=>!!u.computedPlane).map(u=>u.computedPlane);this._czmClippingPlanes.computedClippingPlanes={planes:c,enabled:this._czmClippingPlanes.enabled,modelMatrix:l,unionClippingRegions:this._czmClippingPlanes.unionClippingRegions,edgeColor:this._czmClippingPlanes.edgeColor,edgeWidth:this._czmClippingPlanes.edgeWidth}};s();const r=this.disposeVar(a.createNextAnimateFrameEvent(this._czmClippingPlanes.enabledChanged,this.centerMatrixChanged,this.inverseCenterMatrixChanged,this.computedPlanesChanged,this._czmClippingPlanes.unionClippingRegionsChanged,this._czmClippingPlanes.edgeColorChanged,this._czmClippingPlanes.edgeWidthChanged));this.dispose(r.disposableOn(s))}}get centerMatrix(){return this._centerMatrix.value}set centerMatrix(e){this._centerMatrix.value=e}get centerMatrixChanged(){return this._centerMatrix.changed}get inverseCenterMatrix(){return this._inverseCenterMatrix.value}set inverseCenterMatrix(e){this._inverseCenterMatrix.value=e}get inverseCenterMatrixChanged(){return this._inverseCenterMatrix.changed}get czmPlaneWrappers(){return this._czmPlaneWrappers}get czmPlaneWrappersChanged(){return this._czmPlaneWrappersChanged}get computedPlanesChanged(){return this._computedPlanesChanged}get czmClippingPlanes(){return this._czmClippingPlanes}}class lx extends a.Destroyable{constructor(i,e){super(),this._czmPlaneWrapper=i,this._czmPlane=e,this._czmPlaneWrapper.position=this._czmPlane.position,this.dispose(()=>this._czmPlaneWrapper.position=void 0),this.dispose(a.track([this._czmPlaneWrapper,"position"],[this._czmPlane,"position"])),this._czmPlaneWrapper.rotation=this._czmPlane.rotation,this.dispose(()=>this._czmPlaneWrapper.rotation=[0,0,0]),this.dispose(a.track([this._czmPlaneWrapper,"rotation"],[this._czmPlane,"rotation"]))}}class cx extends a.Destroyable{constructor(e,n,o){super();v(this,"_sowi");v(this,"_position",this.disposeVar(a.reactArrayWithUndefined(void 0)));v(this,"_rotation",this.disposeVar(a.reactArray([0,0,0])));v(this,"_computedPlane",this.disposeVar(a.reactJson(void 0)));this._planesResetting=n,this._planeId=o,this._sowi=this.disposeVar(new a.ESSceneObjectWithId),this._sowi.id=this._planeId,this.disposeVar(new a.ObjResettingWithEvent(this.sowi.sceneObjectChanged,()=>{const{sceneObject:s}=this.sowi;if(!s)return;let r;a.registerCreatedEventUpdate(this,s,()=>{const l=e.getEngineObject(s);if(s instanceof a.ESClippingPlane&&(r=l.czmPlane),!!r&&r instanceof bo)return new lx(this,r)})})),this.dispose(this.positionChanged.disposableOn(()=>this._planesResetting.czmPlaneWrappersChanged.next())),this.dispose(this.rotationChanged.disposableOn(()=>this._planesResetting.czmPlaneWrappersChanged.next()));{const s=()=>{const{inverseCenterMatrix:l}=this._planesResetting;if(!l)return this.computedPlane=void 0;const{position:c,rotation:u}=this;if(!c)return this.computedPlane=void 0;const d=Ie({position:c,rotation:u});if(!d)return this.computedPlane=void 0;const f=h.Matrix4.multiply(l,d,new h.Matrix4),g=new h.Cartesian3(f[4],f[5],f[6]),m=new h.Cartesian3(f[12],f[13],f[14]);h.Cartesian3.normalize(g,g);let y=-h.Cartesian3.dot(g,m);const _=[g.x,g.y,g.z];this._planesResetting.czmClippingPlanes.reverseNormal&&(a.Vector.negate(_,_),y=-y),this.computedPlane={normal:_,distance:y}};s();const r=this.disposeVar(a.createNextAnimateFrameEvent(this._planesResetting.inverseCenterMatrixChanged,this.positionChanged,this.rotationChanged,this._planesResetting.czmClippingPlanes.reverseNormalChanged));this.dispose(r.disposableOn(s))}this.dispose(this.computedPlaneChanged.disposableOn(()=>this._planesResetting.computedPlanesChanged.next()))}get sowi(){return this._sowi}get position(){return this._position.value}set position(e){this._position.value=e}get positionChanged(){return this._position.changed}get rotation(){return this._rotation.value}set rotation(e){this._rotation.value=e}get rotationChanged(){return this._rotation.changed}get computedPlane(){return this._computedPlane.value}set computedPlane(e){this._computedPlane.value=e}get computedPlaneChanged(){return this._computedPlane.changed}}class Is extends a.Destroyable{constructor(e,n){super();v(this,"_id",this.disposeVar(a.react(a.createGuid())));v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_computedClippingPlanes",this.disposeVar(a.react(void 0)));n&&(this.id=n),this.disposeVar(new a.ObjResettingWithEvent(this.planeIdsChanged,()=>new ax(e,this,this.planeIds)))}get id(){return this._id.value}set id(e){this._id.value=e}get idChanged(){return this._id.changed}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get computedClippingPlanes(){return this._computedClippingPlanes.value}set computedClippingPlanes(e){this._computedClippingPlanes.value=e}get computedClippingPlanesChanged(){return this._computedClippingPlanes.changed}}(t=>{t.createDefaultProps=()=>({enabled:!0,planeIds:a.reactArray([]),reverseNormal:!1,unionClippingRegions:!0,edgeColor:a.reactArray([1,1,1,1]),edgeWidth:2})})(Is||(Is={})),a.extendClassProps(Is.prototype,Is.createDefaultProps);let hx=class extends a.Destroyable{constructor(i,e){super(),this._czmESClippingPlane=i,this._eS3DTileset=e;const o=[this._czmESClippingPlane.czmPlane.id,...this._eS3DTileset.clippingPlaneIds];this._eS3DTileset.clippingPlaneIds=o,this.dispose(()=>{const s=[...this._eS3DTileset.clippingPlaneIds],r=this._czmESClippingPlane.czmPlane.id;s.includes(r)&&(s.splice(s.indexOf(r),1),this._eS3DTileset.clippingPlaneIds=s)})}},ux=class extends a.Destroyable{constructor(i){if(super(),this._czmESClippingPlane=i,!this._czmESClippingPlane.viewer)return;this._czmESClippingPlane.viewer.sceneGlobeClippingPlanesId=this._czmESClippingPlane.czmPlane.id;const e=()=>{if(!this._czmESClippingPlane.viewer)return;const o=Ie({position:this._czmESClippingPlane.sceneObject.position});if(!o)return;const s=jg(this._czmESClippingPlane.sceneObject.rotation);this._czmESClippingPlane.viewer.sceneGlobeClippingPlanes={planes:[{normal:s,distance:0}],enabled:!0,modelMatrix:h.Matrix4.toArray(o),unionClippingRegions:!1,edgeColor:this._czmESClippingPlane.sceneObject.edgeColor,edgeWidth:this._czmESClippingPlane.sceneObject.edgetWidth}};e();const n=this.dv(a.createNextAnimateFrameEvent(this._czmESClippingPlane.sceneObject.positionChanged,this._czmESClippingPlane.sceneObject.rotationChanged,this._czmESClippingPlane.sceneObject.edgeColorChanged,this._czmESClippingPlane.sceneObject.edgetWidthChanged));this.d(n.don(e)),this.dispose(()=>{this._czmESClippingPlane.viewer&&(this._czmESClippingPlane.viewer.sceneGlobeClippingPlanesId="",this._czmESClippingPlane.viewer.sceneGlobeClippingPlanes=void 0)})}};const _a=class _a extends fe{constructor(e,n){super(e,n);v(this,"_innerPositionReact",this.disposeVar(a.reactArrayWithUndefined(void 0)));v(this,"_czmPlane");v(this,"_tilesSceneObjectWithId");this._czmPlane=this.disposeVar(new bo(n,e.id)),this._tilesSceneObjectWithId=this.disposeVar(new a.ESSceneObjectWithId);const o=this.ad(a.react(this.sceneObject.targetID));if(this.ad(e.targetIDChanged.don(()=>{const l=a.ESSceneObject.getSceneObject(e.targetID);o.value=l?(l.components.main??l).id:""})),this.dispose(a.track([this._tilesSceneObjectWithId,"id"],o)),!n.viewer)return;const r=this._czmPlane;a.registerCreatedEventUpdate(this,e,()=>{const l=this.disposeVar(a.createNextAnimateFrameEvent(this.tilesSceneObjectWithId.sceneObjectChanged,this.sceneObject.showChanged,this.czmPlane.showChanged));this.disposeVar(new a.ObjResettingWithEvent(l,()=>{const{sceneObject:c,id:u}=this.tilesSceneObjectWithId;if(!(!this.sceneObject.show||!this.czmPlane.show))return u===""?new ux(this):!c||!(c instanceof a.ES3DTileset)?void 0:new hx(this,c)}))}),this.dispose(a.track([r,"show"],[e,"show"])),this.dispose(a.bind([r,"position"],[e,"position"])),this.dispose(Ke([r,"rotation"],[e,"rotation"])),this.dispose(a.track([r,"showArrow"],[e,"showArrow"])),this.dispose(a.track([r,"color"],[e,"edgeColor"])),this.dispose(a.track([r,"width"],[e,"edgetWidth"]));{const l=()=>{r.minSize=[-e.width/2,-e.height/2],r.maxSize=[e.width/2,e.height/2]};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(e.widthChanged,e.heightChanged));this.dispose(c.disposableOn(l))}{const l=()=>{a.Vector.equals(e.position,[0,0,0])?this._innerPositionReact.value=void 0:this._innerPositionReact.value=e.position};l(),this.dispose(this.sceneObject.positionChanged.disposableOn(l))}{const l=()=>{this._innerPositionReact.value==null?e.position=[0,0,0]:e.position=this._innerPositionReact.value};this.dispose(this._innerPositionReact.changed.disposableOn(l))}}get czmPlane(){return this._czmPlane}get tilesSceneObjectWithId(){return this._tilesSceneObjectWithId}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):o.position?(ei(s,o,n,o.position,Math.max(o.width,o.height),e,!0),!0):!1:!1}};v(_a,"type",_a.register("ESCesiumViewer",a.ESClippingPlane.type,_a));let Nd=_a;function dx(t){t.toBlob(i=>{if(!i){console.warn("canvas.toBlob error!");return}var e=new ClipboardItem({"image/png":i});navigator.clipboard.write([e]).then(function(){alert("图像已复制到剪切板")}).catch(function(n){console.error("复制到剪切板失败: ",n)})})}const Qh=class Qh extends a.Destroyable{constructor(i,e){super(),this._geoPolygonCanvas=i,this._geoPolygon=e;{const n=(r,l)=>{const{canvas:c,canvasCtx:u,canvasWidth:d}=this._geoPolygonCanvas,{toMercatorPos:p}=Qh,f=p(r),g=p(l),m=g[0]-f[0],y=g[1]-f[1],_=d>8192?8192:d;if(m<=0)return;const P=_*y/m|0;if(P<=0||P>8192)return;const{points:C}=this._geoPolygon;if(!C)throw new Error("!positions");const S=C.map(x=>{const A=p(x);return[(A[0]-f[0])*_/m,P-(A[1]-f[1])*P/y]});c.width=_,c.height=P,u.clearRect(0,0,_,P),u.beginPath();for(const x of S)u.lineTo(x[0],x[1]);u.closePath(),u.fillStyle="#FFFFFF",u.fill()},o=()=>{let r;const{canvas:l,canvasCtx:c,canvasWidth:u}=this._geoPolygonCanvas;c.clearRect(0,0,l.width,l.height);const{points:d}=this._geoPolygon;if(d&&d.length>=3){const p=a.getMinMaxCorner(d),{minPos:f,maxPos:g}=p;n(f,g),r={rect:[f[0],f[1],g[0],g[1]],height:d[0][2]}}this._geoPolygonCanvas.canvasGeoInfo=r,this.ad(a.nextAnimateFrame(()=>{this._geoPolygonCanvas.canvasChanged.emit()}))};o();const s=this.disposeVar(a.createNextAnimateFrameEvent(this._geoPolygon.pointsChanged,this._geoPolygonCanvas.canvasWidthChanged));this.dispose(s.disposableOn(o))}}};v(Qh,"toMercatorPos",function(i){const[e,n,o]=i;return[e,n/Math.cos(n*Math.PI/180),o]});let Bd=Qh;const Pa=class Pa extends a.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_geoPolygonWithId");v(this,"_canvas",document.createElement("canvas"));v(this,"_canvasCtx",this._canvas.getContext("2d"));v(this,"_canvasChanged",this.disposeVar(new a.Event));v(this,"_canvasGeoInfo",this.disposeVar(a.reactJsonWithUndefined(void 0)));this._geoPolygonWithId=this.disposeVar(new a.ESSceneObjectWithId),this.dispose(a.track([this._geoPolygonWithId,"id"],[this,"geoPolygonId"])),this.disposeVar(new a.ObjResettingWithEvent(this.geoPolygonWithId.sceneObjectChanged,()=>{const{sceneObject:o}=this.geoPolygonWithId;if(o&&o instanceof a.ESGeoPolygon)return new Pa.PolygonCanvasResetting(this,o)}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygonWithId(){return this._geoPolygonWithId}get canvas(){return this._canvas}get canvasCtx(){return this._canvasCtx}get canvasChanged(){return this._canvasChanged}get canvasGeoInfo(){return this._canvasGeoInfo.value}set canvasGeoInfo(e){this._canvasGeoInfo.value=e}get canvasGeoInfoChanged(){return this._canvasGeoInfo.changed}};v(Pa,"saveCanvasToClipboard",dx),v(Pa,"PolygonCanvasResetting",Bd);let So=Pa;(t=>{t.createDefaultProps=()=>({enabled:!0,geoPolygonId:"",canvasWidth:512})})(So||(So={})),a.extendClassProps(So.prototype,So.createDefaultProps);function px(t,i){return class extends a.Destroyable{constructor(o,s){super();v(this,"_customShader",this.disposeVar(new h.CustomShader({uniforms:{u_discardRatio:{value:new h.Cartesian2(0,1),type:h.UniformType.VEC2},u_topColor:{value:new h.Color(1,1,1,1),type:h.UniformType.VEC4},u_bottomColor:{value:new h.Color(1,1,1,1),type:h.UniformType.VEC4}},varyings:{v_xbsjPos:h.VaryingType.VEC3,v_m:h.VaryingType.FLOAT},vertexShaderText:` // IMPORTANT: the function signature must use these parameter names. This
365
+ `;return s=xd(l),new Worker(s,o)}if(s=t,e||(s=ni(`${et._workerModulePrefix+n}.js`)),!lt.supportsEsmWebWorkers())throw new at("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(s,o)}async function SE(t,i){const e={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!lt.supportsWebAssembly()){if(!T(i.fallbackModulePath))throw new at(`This browser does not support Web Assembly, and no backup module was provided for ${t._workerPath}`);return e.modulePath=ni(i.fallbackModulePath),e}e.wasmBinaryFile=ni(i.wasmBinaryFile);const n=await J.fetchArrayBuffer({url:e.wasmBinaryFile});return e.wasmBinary=n,e}function et(t,i){this._workerPath=t,this._maximumActiveTasks=i??Number.POSITIVE_INFINITY,this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}const EE=(t,i,e,n)=>{const o=({data:s})=>{if(s.id===i){if(T(s.error)){let r=s.error;r.name==="RuntimeError"?(r=new at(s.error.message),r.stack=s.error.stack):r.name==="DeveloperError"?(r=new W(s.error.message),r.stack=s.error.stack):r.name==="Error"&&(r=new Error(s.error.message),r.stack=s.error.stack),Ed.raiseEvent(r),n(r)}else Ed.raiseEvent(),e(s.result);t.removeEventListener("message",o)}};return o},xE=[];async function AE(t,i,e){const n=await Promise.resolve(qv());T(e)?n||(e.length=0):e=xE;const o=t._nextID++,s=new Promise((r,l)=>{t._worker.addEventListener("message",EE(t._worker,o,r,l))});return t._worker.postMessage({id:o,baseUrl:ni.getCesiumBaseUrl().url,parameters:i,canTransferArrayBuffer:n},e),s}async function TE(t,i,e){++t._activeTasks;try{const n=await AE(t,i,e);return--t._activeTasks,n}catch(n){throw--t._activeTasks,n}}et.prototype.scheduleTask=function(t,i){if(T(this._worker)||(this._worker=Ad(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return TE(this,t,i)},et.prototype.initWebAssemblyModule=async function(t){if(T(this._webAssemblyPromise))return this._webAssemblyPromise;const i=async()=>{const e=this._worker=Ad(this._workerPath),n=await SE(this,t),o=await Promise.resolve(qv());let s;const r=n.wasmBinary;T(r)&&o&&(s=[r]);const l=new Promise((c,u)=>{e.onmessage=function({data:d}){T(d)?c(d.result):u(new at("Could not configure wasm module"))}});return e.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:n}},s),l};return this._webAssemblyPromise=i(),this._webAssemblyPromise},et.prototype.isDestroyed=function(){return!1},et.prototype.destroy=function(){return T(this._worker)&&this._worker.terminate(),bE(this)},et.taskCompletedEvent=Ed,et._defaultWorkerModulePrefix="Workers/",et._workerModulePrefix=et._defaultWorkerModulePrefix,et._canTransferArrayBuffer=void 0;function Es(t,i,e,n,o){this._format=t,this._datatype=i,this._width=e,this._height=n,this._buffer=o}Object.defineProperties(Es.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},arrayBufferView:{get:function(){return this._buffer}}}),Es.clone=function(t){if(T(t))return new Es(t._format,t._datatype,t._width,t._height,t._buffer)},Es.prototype.clone=function(){return Es.clone(this)};function Ji(){}Ji._transcodeTaskProcessor=new et("transcodeKTX2",Number.POSITIVE_INFINITY),Ji._readyPromise=void 0;function ME(){const t=Ji._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(i){if(i)return Ji._transcodeTaskProcessor;throw new at("KTX2 transcoder could not be initialized.")});Ji._readyPromise=t}Ji.transcode=function(t,i){return b.defined("supportedTargetFormats",i),T(Ji._readyPromise)||ME(),Ji._readyPromise.then(function(e){let n=t;t instanceof ArrayBuffer&&(n=new Uint8Array(t));const o={supportedTargetFormats:i,ktx2Buffer:n};return e.scheduleTask(o,[n.buffer])}).then(function(e){const n=e.length,o=Object.keys(e[0]);for(let s=0;s<n;s++){const r=e[s];for(let l=0;l<o.length;l++){const c=r[o[l]];r[o[l]]=new Es(c.internalFormat,c.datatype,c.width,c.height,c.levelBuffer)}}if(o.length===1){for(let s=0;s<n;++s)e[s]=e[s][o[0]];n===1&&(e=e[0])}return e}).catch(function(e){throw e})};let Xv;Yv.setKTX2SupportedFormats=function(t,i,e,n,o,s){Xv={s3tc:t,pvrtc:i,astc:e,etc:n,etc1:o,bc7:s}};function Yv(t){b.defined("resourceOrUrlOrBuffer",t);let i;return t instanceof ArrayBuffer||ArrayBuffer.isView(t)?i=Promise.resolve(t):i=J.createIfNeeded(t).fetchArrayBuffer(),i.then(function(e){return Ji.transcode(e,Xv)})}function xs(){W.throwInstantiationError()}Object.defineProperties(xs.prototype,{rectangle:{get:W.throwInstantiationError},tileWidth:{get:W.throwInstantiationError},tileHeight:{get:W.throwInstantiationError},maximumLevel:{get:W.throwInstantiationError},minimumLevel:{get:W.throwInstantiationError},tilingScheme:{get:W.throwInstantiationError},tileDiscardPolicy:{get:W.throwInstantiationError},errorEvent:{get:W.throwInstantiationError},credit:{get:W.throwInstantiationError},proxy:{get:W.throwInstantiationError},hasAlphaChannel:{get:W.throwInstantiationError}}),xs.prototype.getTileCredits=function(t,i,e){W.throwInstantiationError()},xs.prototype.requestImage=function(t,i,e,n){W.throwInstantiationError()},xs.prototype.pickFeatures=function(t,i,e,n,o){W.throwInstantiationError()};const IE=/\.ktx2$/i;xs.loadImage=function(t,i){b.defined("url",i);const e=J.createIfNeeded(i);return IE.test(e.url)?Yv(e):T(t)&&T(t.tileDiscardPolicy)?e.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):e.fetchImage({preferImageBitmap:!0,flipY:!0})};var ah=3.141592653589793*3e3/180,tt=3.141592653589793,lh=6378245,ch=.006693421622965943,Zv=function(n,o){var n=+n,o=+o,s=n-.0065,r=o-.006,l=Math.sqrt(s*s+r*r)-2e-5*Math.sin(r*ah),c=Math.atan2(r,s)-3e-6*Math.cos(s*ah),u=l*Math.cos(c),d=l*Math.sin(c);return[u,d]},Qv=function(o,n){var n=+n,o=+o,s=Math.sqrt(o*o+n*n)+2e-5*Math.sin(n*ah),r=Math.atan2(n,o)+3e-6*Math.cos(o*ah),l=s*Math.cos(r)+.0065,c=s*Math.sin(r)+.006;return[l,c]},Td=function(o,n){var n=+n,o=+o;if(Jv(o,n))return[o,n];var s=kv(o-105,n-35),r=Kv(o-105,n-35),l=n/180*tt,c=Math.sin(l);c=1-ch*c*c;var u=Math.sqrt(c);s=s*180/(lh*(1-ch)/(c*u)*tt),r=r*180/(lh/u*Math.cos(l)*tt);var d=n+s,p=o+r;return[p,d]},Md=function(o,n){var n=+n,o=+o;if(Jv(o,n))return[o,n];var s=kv(o-105,n-35),r=Kv(o-105,n-35),l=n/180*tt,c=Math.sin(l);c=1-ch*c*c;var u=Math.sqrt(c);s=s*180/(lh*(1-ch)/(c*u)*tt),r=r*180/(lh/u*Math.cos(l)*tt);var d=n+s,p=o+r;return[o*2-p,n*2-d]},kv=function(o,n){var n=+n,o=+o,s=-100+2*o+3*n+.2*n*n+.1*o*n+.2*Math.sqrt(Math.abs(o));return s+=(20*Math.sin(6*o*tt)+20*Math.sin(2*o*tt))*2/3,s+=(20*Math.sin(n*tt)+40*Math.sin(n/3*tt))*2/3,s+=(160*Math.sin(n/12*tt)+320*Math.sin(n*tt/30))*2/3,s},Kv=function(o,n){var n=+n,o=+o,s=300+o+2*n+.1*o*o+.1*o*n+.1*Math.sqrt(Math.abs(o));return s+=(20*Math.sin(6*o*tt)+20*Math.sin(2*o*tt))*2/3,s+=(20*Math.sin(o*tt)+40*Math.sin(o/3*tt))*2/3,s+=(150*Math.sin(o/12*tt)+300*Math.sin(o/30*tt))*2/3,s},Jv=function(o,n){var n=+n,o=+o;return!(o>73.66&&o<135.05&&n>3.86&&n<53.55)};function Id(t,i){this.x=t||0,this.y=i||0,this.x=this.x,this.y=this.y}Id.prototype.equals=function(t){return t&&t.x==this.x&&t.y==this.y};function mi(t,i){isNaN(t)&&(t=decode64(t),t=isNaN(t)?0:t),typeof t=="string"&&(t=parseFloat(t)),isNaN(i)&&(i=decode64(i),i=isNaN(i)?0:i),typeof t=="lat"&&(i=parseFloat(i)),this.lng=t,this.lat=i}mi.isInRange=function(t){return t&&t.lng<=180&&t.lng>=-180&&t.lat<=74&&t.lat>=-74},mi.prototype.equals=function(t){return t&&this.lat==t.lat&&this.lng==t.lng};function Re(){}Re.EARTHRADIUS=637099681e-2,Re.MCBAND=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],Re.LLBAND=[75,60,45,30,15,0],Re.MC2LL=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],Re.LL2MC=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],Re.getDistanceByMC=function(t,i){if(!t||!i)return 0;var e,n,o,s;return t=this.convertMC2LL(t),!t||(e=this.toRadians(t.lng),n=this.toRadians(t.lat),i=this.convertMC2LL(i),!i)?0:(o=this.toRadians(i.lng),s=this.toRadians(i.lat),this.getDistance(e,o,n,s))},Re.getDistanceByLL=function(t,i){if(!t||!i)return 0;t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74),i.lng=this.getLoop(i.lng,-180,180),i.lat=this.getRange(i.lat,-74,74);var e,n,o,s;return e=this.toRadians(t.lng),o=this.toRadians(t.lat),n=this.toRadians(i.lng),s=this.toRadians(i.lat),this.getDistance(e,n,o,s)},Re.convertMC2LL=function(s){var i,e;i=new mi(Math.abs(s.lng),Math.abs(s.lat));for(var n=0;n<this.MCBAND.length;n++)if(i.lat>=this.MCBAND[n]){e=this.MC2LL[n];break}var o=this.convertor(s,e),s=new mi(o.lng.toFixed(6),o.lat.toFixed(6));return s},Re.convertLL2MC=function(s){var i,e;s.lng=this.getLoop(s.lng,-180,180),s.lat=this.getRange(s.lat,-74,74),i=new mi(s.lng,s.lat);for(var n=0;n<this.LLBAND.length;n++)if(i.lat>=this.LLBAND[n]){e=this.LL2MC[n];break}if(!e){for(var n=this.LLBAND.length-1;n>=0;n--)if(i.lat<=-this.LLBAND[n]){e=this.LL2MC[n];break}}var o=this.convertor(s,e),s=new mi(o.lng.toFixed(2),o.lat.toFixed(2));return s},Re.convertor=function(t,i){if(!(!t||!i)){var e=i[0]+i[1]*Math.abs(t.lng),n=Math.abs(t.lat)/i[9],o=i[2]+i[3]*n+i[4]*n*n+i[5]*n*n*n+i[6]*n*n*n*n+i[7]*n*n*n*n*n+i[8]*n*n*n*n*n*n;return e*=t.lng<0?-1:1,o*=t.lat<0?-1:1,new mi(e,o)}},Re.getDistance=function(t,i,e,n){return this.EARTHRADIUS*Math.acos(Math.sin(e)*Math.sin(n)+Math.cos(e)*Math.cos(n)*Math.cos(i-t))},Re.toRadians=function(t){return Math.PI*t/180},Re.toDegrees=function(t){return 180*t/Math.PI},Re.getRange=function(t,i,e){return i!=null&&(t=Math.max(t,i)),e!=null&&(t=Math.min(t,e)),t},Re.getLoop=function(t,i,e){for(;t>e;)t-=e-i;for(;t<i;)t+=e-i;return t},Re.prototype.lngLatToMercator=function(t){return Re.convertLL2MC(t)},Re.prototype.lngLatToPoint=function(t){var i=Re.convertLL2MC(t);return new Id(i.lng,i.lat)},Re.prototype.mercatorToLngLat=function(t){return Re.convertMC2LL(t)},Re.prototype.PointToLngLat=function(t){var i=new mi(t.x,t.y);return Re.convertMC2LL(i)},Re.prototype.PointToPixel=function(t,i,e,n,o){if(t){t=this.lngLatToMercator(t,o);var s=this.getZoomUnits(i),r=Math.round((t.lng-e.lng)/s+n[Twidth]/2),l=Math.round((e.lat-t.lat)/s+n[Theight]/2);return new Id(r,l)}},Re.prototype.PixelToPoint=function(t,i,e,n,o){if(t){var s=this.getZoomUnits(i),r=e.lng+s*(t.x-n[Twidth]/2),l=e.lat-s*(t.y-n[Theight]/2),c=new mi(r,l);return this.mercatorToLngLat(c,o)}},Re.prototype.getZoomUnits=function(t){return Math.pow(2,18-t)};function zn(t){t=t||{},this._ellipsoid=t.ellipsoid??se.WGS84;var i=!0;T(t.wgs84)&&(i=t.wgs84),this._projection=new Lt(this._ellipsoid);var e=new Re;this._projection.project=function(r){var l={};return i?(l=Td(F.toDegrees(r.longitude),F.toDegrees(r.latitude)),l=Qv(l[0],l[1])):l=Qv(F.toDegrees(r.longitude),F.toDegrees(r.latitude)),l[0]=Math.min(l[0],180),l[0]=Math.max(l[0],-180),l[1]=Math.min(l[1],74.000022),l[1]=Math.max(l[1],-71.988531),l=e.lngLatToPoint(new mi(l[0],l[1])),new j(l.x,l.y)},this._projection.unproject=function(r){var l=e.mercatorToLngLat(new mi(r.x,r.y));return l[0]=(l[0]+180)%360-180,i?(l=Zv(l.lng,l.lat),l=Md(l[0],l[1])):l=Zv(l.lng,l.lat),new ce(F.toRadians(l[0]),F.toRadians(l[1]))},this._rectangleSouthwestInMeters=new j(-2003772637e-2,-1170804166e-2),this._rectangleNortheastInMeters=new j(2003772637e-2,1247410417e-2);var n=this._projection.unproject(this._rectangleSouthwestInMeters),o=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new ie(n.longitude,n.latitude,o.longitude,o.latitude),this.levelWidth=[];for(var s=0;s<19;s++)this.levelWidth[s]=Math.pow(2,18-s)*256}Object.defineProperties(zn.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),zn.prototype.getNumberOfXTilesAtLevel=function(t){return(1<<t)*.7},zn.prototype.getNumberOfYTilesAtLevel=function(t){return 1<<t},zn.prototype.rectangleToNativeRectangle=function(t,i){var e=this._projection,n=e.project(ie.southwest(t)),o=e.project(ie.northeast(t));return T(i)?(i.west=n.x,i.south=n.y,i.east=o.x,i.north=o.y,i):new ie(n.x,n.y,o.x,o.y)},zn.prototype.tileXYToNativeRectangle=function(t,i,e,n){var o=this.levelWidth[e],s=t*o,r=(t+1)*o;i=-i;var l=(i+1)*o,c=i*o;return T(n)?(n.west=s,n.south=c,n.east=r,n.north=l,n):new ie(s,c,r,l)},zn.prototype.tileXYToRectangle=function(t,i,e,n){var o=this.tileXYToNativeRectangle(t,i,e,n),s=this._projection,r=s.unproject(new j(o.west,o.south)),l=s.unproject(new j(o.east,o.north));return o.west=r.longitude,o.south=r.latitude,o.east=l.longitude,o.north=l.latitude,o},zn.prototype.positionToTileXY=function(t,i,e){var n=this._rectangle;if(ie.contains(n,t)){var o=this._projection,s=o.project(t);if(T(s)){var r=this.levelWidth[i],l=Math.floor(s.x/r),c=-Math.floor(s.y/r);return T(e)?(e.x=l,e.y=c,e):new j(l,c)}}};function hh(t){this._url=t.url||"http://online2.map.bdimg.com/onlinelabel/?qt=tile&styles=pl&x={x}&y={y}&z={z}",this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._tilingScheme=new zn(t),this._credit=void 0,this._rectangle=this._tilingScheme.rectangle,this._ready=!0}function DE(t,i,e,n){var o=t._url;return o=o.replace("{x}",i).replace("{y}",-e).replace("{z}",n),o}Object.defineProperties(hh.prototype,{url:{get:function(){return this._url}},token:{get:function(){return this._token}},proxy:{get:function(){return this._proxy}},tileWidth:{get:function(){if(!this._ready)throw new DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 3}},tilingScheme:{get:function(){if(!this._ready)throw new DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),hh.prototype.getTileCredits=function(t,i,e){},hh.prototype.requestImage=function(t,i,e){if(!this._ready)throw new DeveloperError("requestImage must not be called before the imagery provider is ready.");var n=DE(this,t,i,e);return xs.loadImage(this,n)};class RE extends h.UrlTemplateImageryProvider{constructor(e){super(e);v(this,"_indexTime",0);e.url="https://tileser.giiiis.com/timetile/",e.minimumLevel=1,e.maximumLevel=18,e.tilingScheme=new h.GeographicTilingScheme,this.indexTime=e.indexTime||0}get indexTime(){return this._indexTime}set indexTime(e){this._indexTime=e}async requestImage(e,n,o,s){try{let r=this.buildImageUrl(this.indexTime,e,n,o);return h.ImageryProvider.loadImage(this,r)}catch{return}}buildImageUrl(e,n,o,s){return`https://tileser.giiiis.com/timetile/${e}/${s}/${n}/${o}.jpg`}}class FE extends h.UrlTemplateImageryProvider{constructor(e){super(e);v(this,"_indexTimeID",0);e.url="https://wayback.maptiles.arcgis.com/",e.minimumLevel=1,e.maximumLevel=18,this.indexTimeID=e.indexTimeID||0}get indexTimeID(){return this._indexTimeID}set indexTimeID(e){this._indexTimeID=e}async requestImage(e,n,o,s){try{let r;return this.indexTimeID!==0?r=this.buildImageUrl(this.indexTimeID,e,n,o):r=`https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/${o}/${n}/${e}`,h.ImageryProvider.loadImage(this,r)}catch{return}}buildImageUrl(e,n,o,s){return`https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/${e}/${s}/${o}/${n}`}}const zE=document.createElement("canvas");class Dd{constructor(i){v(this,"mapboxRenderer");v(this,"ready");v(this,"readyPromise");v(this,"rectangle");v(this,"tileSize");v(this,"tileWidth");v(this,"tileHeight");v(this,"maximumLevel");v(this,"minimumLevel");v(this,"tileDiscardPolicy");v(this,"credit");v(this,"proxy");v(this,"layerStyle");v(this,"hasAlphaChannel");v(this,"sourceFilter");v(this,"tilingScheme");v(this,"_destroyed",!1);v(this,"_error");v(this,"_style");v(this,"_accessToken");v(this,"_enablePickFeatures");this.ready=!1,this.tilingScheme=i.tilingScheme??new ye.WebMercatorTilingScheme,this.rectangle=i.rectangle??this.tilingScheme.rectangle,this.rectangle=ye.Rectangle.intersection(this.rectangle,this.tilingScheme.rectangle),this.tileSize=this.tileWidth=this.tileHeight=i.tileSize||256,this.maximumLevel=i.maximumLevel??18,this.minimumLevel=i.minimumLevel??0,this.tileDiscardPolicy=void 0,this._error=new ye.Event,this.credit=new ye.Credit(i.credit||"",!1),this.proxy=new ye.DefaultProxy(""),this.hasAlphaChannel=i.hasAlphaChannel??!0,this.sourceFilter=i.sourceFilter,this._accessToken=i.accessToken,this._enablePickFeatures=i.enablePickFeatures??!0,this.layerStyle=i.layerStyle??[],ye.defined(i.style)&&(this.readyPromise=this._build(i.style,i).then(()=>!0))}get style(){return this._style}get isDestroyed(){return this._destroyed}get errorEvent(){return this._error}async _build(i,e={}){const n=await this._preLoad(i,e.scheme??"tms");n.layers=this.layerStyle.length!=0?this.layerStyle:n.layers,this._style=n,this.mapboxRenderer=new u_.BasicRenderer({style:n,canvas:zE,token:e.accessToken,transformRequest:e.transformRequest}),e.showCanvas&&this.mapboxRenderer.showCanvasForDebug(),await this.mapboxRenderer._style.loadedPromise,this.readyPromise=Promise.resolve(!0),this.ready=!0}static async fromUrl(i,e={}){const n=new Dd(e);return await n._build(i,e),n}_preLoad(i,e){let n=i;if(typeof i=="string"&&(i.endsWith(".json")||i.startsWith("mapbox://")?i=new ye.Resource({url:i}):(i={version:8,sources:{customSource:{type:"vector",scheme:e,tiles:[i]}},layers:this.layerStyle},n=i)),i instanceof ye.Resource){const o="https://api.mapbox.com/";i.url.startsWith("mapbox://")&&(i.url=i.url.replace("mapbox://",o)),this._accessToken&&i.appendQueryParameters({access_token:this._accessToken}),n=i.fetchJson()}return Promise.resolve(n).catch(o=>{throw this._error.raiseEvent(o),o})}_createTile(){const i=document.createElement("canvas");return i.width=this.tileSize,i.height=this.tileSize,i.style.imageRendering="pixelated",i}_resetTileCache(){Object.values(this.mapboxRenderer._style.sourceCaches).forEach(i=>i._tileCache.reset())}_getTilesSpec(i,e){const{x:n,y:o,level:s}=i,r=this.tileSize,l=[],c=this.tilingScheme.getNumberOfXTilesAtLevel(s)-1,u=this.tilingScheme.getNumberOfYTilesAtLevel(s)-1;for(let d=-1;d<=1;d++){let p=n+d;p<0&&(p=c),p>c&&(p=0);for(let f=-1;f<=1;f++){let g=o+f;g<0||g>u||l.push({source:e,z:s,x:p,y:g,left:0+d*r,top:0+f*r,size:r})}}return l}requestImage(i,e,n,o=!0){if(n<this.minimumLevel||n>this.maximumLevel)return;this.mapboxRenderer.filterForZoom(n);const s=this.mapboxRenderer.getVisibleSources(n).reduce((r,l)=>r.concat(this._getTilesSpec({x:i,y:e,level:n},l)),[]);return new Promise((r,l)=>{const c=this._createTile(),u=c.getContext("2d");u&&(u.globalCompositeOperation="copy");const d=this.mapboxRenderer.renderTiles(u,{srcLeft:0,srcTop:0,width:this.tileSize,height:this.tileSize,destLeft:0,destTop:0},s,p=>{typeof p=="string"&&!p.endsWith("tiles not available")?l(void 0):o?(d.consumer.ctx=null,r(c),this.mapboxRenderer.releaseRender(d),this._resetTileCache()):r(d)})})}pickFeatures(i,e,n,o,s){var r;if(this._enablePickFeatures)return(r=this.requestImage(i,e,n,!1))==null?void 0:r.then(l=>{let c=this.mapboxRenderer.getVisibleSources(n);c=this.sourceFilter?this.sourceFilter(c):c;const u=[],d=ye.Math.toDegrees(o),p=ye.Math.toDegrees(s);return c.forEach(f=>{const g=new ye.ImageryLayerFeatureInfo;g.data=this.mapboxRenderer.queryRenderedFeatures({source:f,renderedZoom:n,lng:d,lat:p,tileZ:n});const m=Object.keys(g.data)[0];g.name=m;const y=g.data[m];y&&(g.configureDescriptionFromProperties((y==null?void 0:y.length)===1?y[0]:y),u.push(g))}),l.consumer.ctx=void 0,this.mapboxRenderer.releaseRender(l),this._resetTileCache(),u.length?u:void 0})}destroy(){this.mapboxRenderer._cancelAllPendingRenders(),this._resetTileCache(),this._destroyed=!0}}function LE(t,i){let e;return i===0?e=h.JulianDate.toIso8601(t.stop):e=h.JulianDate.toIso8601(t.start),{Time:e}}function jv(t){if(t.type==="fromIso8601")return h.TimeIntervalCollection.fromIso8601({iso8601:t.iso8601,isStartIncluded:t.isStartIncluded,isStopIncluded:t.isStopIncluded,leadingInterval:t.leadingInterval,trailingInterval:t.trailingInterval,dataCallback:LE})}const{getStrFromEnv:uh}=a.ESSceneObject.context;function OE(t){const i=Object.entries(t).map(([e,n])=>{try{const o=n&&Function(`"use strict";return (${n})`)();return[e,o]}catch(o){console.error(`getCustomTagsFromJson error: ${o}`,o);return}}).filter(e=>!!e);return Object.fromEntries(i)}async function NE(t,i){var e,n;if(t.type==="WebMapTileServiceImageryProvider")return new h.WebMapTileServiceImageryProvider({url:Ht(t.url),format:t.format??"image/jpeg",layer:t.layer,style:t.style,tileMatrixSetID:t.tileMatrixSetID,tileMatrixLabels:t.tileMatrixLabels,clock:t.times&&((e=i.viewer)==null?void 0:e.clock),times:t.times&&jv(t.times),dimensions:t.dimensions,tileWidth:t.tileWidth??256,tileHeight:t.tileHeight??256,tilingScheme:t.tilingScheme&&wi(t.tilingScheme),rectangle:t.rectangle&&Ne(t.rectangle),minimumLevel:t.minimumLevel??0,maximumLevel:t.maximumLevel,ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit,subdomains:t.subdomains});if(t.type==="TileMapServiceImageryProvider")return t.url?await h.TileMapServiceImageryProvider.fromUrl(Ht(t.url),{fileExtension:t.fileExtension,credit:t.credit,minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,rectangle:t.rectangle&&Ne(t.rectangle),tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),tileWidth:t.tileWidth,tileHeight:t.tileHeight,flipXY:t.flipXY}):void 0;if(t.type==="UrlTemplateImageryProvider"){const o=t.customTags&&OE(t.customTags);return console.log(Ht(t.url),"111"),new h.UrlTemplateImageryProvider({url:Ht(t.url),credit:t.credit,minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,rectangle:t.rectangle&&Ne(t.rectangle),tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),tileWidth:t.tileWidth,tileHeight:t.tileHeight,subdomains:t.subdomains,hasAlphaChannel:t.hasAlphaChannel,pickFeaturesUrl:t.pickFeaturesUrl,enablePickFeatures:t.enablePickFeatures,urlSchemeZeroPadding:t.urlSchemeZeroPadding,customTags:o})}else{if(t.type==="GridImageryProvider")return new h.GridImageryProvider({tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),tileWidth:t.tileWidth,tileHeight:t.tileHeight,cells:t.cells,color:t.color&&te(t.color),glowColor:t.glowColor&&te(t.glowColor),backgroundColor:t.backgroundColor&&te(t.backgroundColor),canvasSize:t.canvasSize,glowWidth:t.glowWidth});if(t.type==="ArcGisMapServerImageryProvider")return t.url?await h.ArcGisMapServerImageryProvider.fromUrl(Ht(t.url),{token:t.token,usePreCachedTilesIfAvailable:t.usePreCachedTilesIfAvailable,layers:t.layers,enablePickFeatures:t.enablePickFeatures,rectangle:t.rectangle&&Ne(t.rectangle),tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit,tileWidth:t.tileWidth,tileHeight:t.tileHeight,maximumLevel:t.maximumLevel}):void 0;if(t.type==="BingMapsImageryProvider")return t.url?await h.BingMapsImageryProvider.fromUrl(Ht(t.url),{key:t.key,tileProtocol:t.tileProtocol,mapStyle:t.mapStyle&&h.BingMapsStyle[t.mapStyle],culture:t.culture,ellipsoid:t.ellipsoid&&we(t.ellipsoid)}):void 0;if(t.type==="GoogleEarthEnterpriseImageryProvider"){if(!t.url)return;const o=await h.GoogleEarthEnterpriseMetadata.fromUrl(Ht(t.url));return await h.GoogleEarthEnterpriseImageryProvider.fromMetadata(o,{ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit})}else{if(t.type==="IonImageryProvider")return await h.IonImageryProvider.fromAssetId(t.assetId,{accessToken:t.accessToken,server:t.server});if(t.type==="MapboxImageryProvider")return new h.MapboxImageryProvider({url:t.url&&uh(t.url),mapId:t.mapId,accessToken:t.accessToken,format:t.format,ellipsoid:t.ellipsoid&&we(t.ellipsoid),minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,rectangle:t.rectangle&&Ne(t.rectangle),credit:t.credit});if(t.type==="MapboxStyleImageryProvider")return new h.MapboxStyleImageryProvider({url:t.url&&uh(t.url),username:t.username,styleId:t.styleId,accessToken:t.accessToken,tilesize:t.tilesize,scaleFactor:t.scaleFactor,rectangle:t.rectangle&&Ne(t.rectangle),credit:t.credit,ellipsoid:t.ellipsoid&&we(t.ellipsoid),minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel});if(t.type==="OpenStreetMapImageryProvider")return new h.OpenStreetMapImageryProvider({url:uh(t.url),rectangle:t.rectangle&&Ne(t.rectangle),credit:t.credit,ellipsoid:t.ellipsoid&&we(t.ellipsoid),minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,fileExtension:t.fileExtension});if(t.type==="SingleTileImageryProvider")return new h.SingleTileImageryProvider({url:Ht(t.url),rectangle:t.rectangle&&Ne(t.rectangle),credit:t.credit,ellipsoid:t.ellipsoid&&we(t.ellipsoid)});if(t.type==="TileCoordinatesImageryProvider")return new h.TileCoordinatesImageryProvider({tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),color:t.color&&te(t.color),tileWidth:t.tileWidth,tileHeight:t.tileHeight});if(t.type==="WebMapServiceImageryProvider")return new h.WebMapServiceImageryProvider({url:Ht(t.url),layers:t.layers,enablePickFeatures:t.enablePickFeatures,rectangle:t.rectangle&&Ne(t.rectangle),tilingScheme:t.tilingScheme&&wi(t.tilingScheme),ellipsoid:t.ellipsoid&&we(t.ellipsoid),minimumLevel:t.minimumLevel,maximumLevel:t.maximumLevel,tileWidth:t.tileWidth,tileHeight:t.tileHeight,crs:t.crs,srs:t.srs,credit:t.credit,subdomains:t.subdomains,clock:t.times&&((n=i.viewer)==null?void 0:n.clock),times:t.times&&jv(t.times),parameters:t.parameters,getFeatureInfoParameters:t.getFeatureInfoParameters});if(t.type==="BDImageryProvider")return new hh({url:t.url&&uh(t.url),ellipsoid:t.ellipsoid&&we(t.ellipsoid),wgs84:t.wgs84});if(t.type==="GeHistoryImagery")return new RE({indexTime:t.indexTime});if(t.type==="ArcgisHistoryImagery")return new FE({indexTimeID:t.indexTimeID});if(t.type==="MVTImageryProvider")return t.url?await Dd.fromUrl(t.url,{maximumLevel:t.maximumLevel,minimumLevel:t.minimumLevel,tileSize:t.tileSize,accessToken:t.accessToken,enablePickFeatures:t.enablePickFeatures,rectangle:t.rectangle&&Ne(t.rectangle),layerStyle:t.style,scheme:t.scheme}):void 0}}}function BE(t,i){i.type}class ey extends h.WebMercatorTilingScheme{constructor(i){super(i);var e=this._projection;e.s_project=e.project,e.project=function(s){var r={};return r=Md(h.Math.toDegrees(s.longitude),h.Math.toDegrees(s.latitude)),e.s_project(new h.Cartographic(h.Math.toRadians(r[0]),h.Math.toRadians(r[1])))},e.s_unproject=e.unproject,e.unproject=function(s){var r=e.s_unproject(s),l={};return l=Td(h.Math.toDegrees(r.longitude),h.Math.toDegrees(r.latitude)),new h.Cartographic(h.Math.toRadians(l[0]),h.Math.toRadians(l[1]))};var n=this._projection.unproject(this._rectangleSouthwestInMeters),o=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new h.Rectangle(n.longitude,n.latitude,o.longitude,o.latitude)}}class ty extends h.WebMercatorTilingScheme{constructor(i){super(i);var e=this._projection;e.s_project=e.project,e.project=function(n){var o={};return o=Td(h.Math.toDegrees(n.longitude),h.Math.toDegrees(n.latitude)),e.s_project(new h.Cartographic(h.Math.toRadians(o[0]),h.Math.toRadians(o[1])))},e.s_unproject=e.unproject,e.unproject=function(n){var o=e.s_unproject(n),s={};return s=Md(h.Math.toDegrees(o.longitude),h.Math.toDegrees(o.latitude)),new h.Cartographic(h.Math.toRadians(s[0]),h.Math.toRadians(s[1]))}}}function VE(t){if(t.type==="GeographicTilingScheme")return"new Cesium.GeographicTilingScheme()";if(t.type==="WebMercatorTilingScheme")return"new Cesium.WebMercatorTilingScheme()"}class Ln extends a.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_innerImageryProvider",this.disposeVar(a.react(void 0)));v(this,"_layer",this.disposeVar(a.react(void 0)));const o=e.viewer;if(!o)return;const s=kt(o);if(!s)return;const{imageriesManager:r}=s;r.add(this),this.dispose(()=>{r.has(this)&&r.delete(this)});const l=()=>{this.layer&&(this.layer=void 0)};this.dispose(l);const c=()=>{this.layer&&(this.layer.alpha=this.alpha??1,this.layer.nightAlpha=this.nightAlpha??1,this.layer.dayAlpha=this.dayAlpha??1,this.layer.brightness=this.brightness??1,this.layer.contrast=this.contrast??1,this.layer.hue=this.hue??0,this.layer.saturation=this.saturation??1,this.layer.gamma=this.gamma??1,this.layer.splitDirection=this.splitDirection&&h.SplitDirection[this.splitDirection]||h.SplitDirection.NONE,this.layer.minificationFilter=this.minificationFilter&&h.TextureMinificationFilter[this.minificationFilter]||h.TextureMinificationFilter.LINEAR,this.layer.magnificationFilter=this.magnificationFilter&&h.TextureMagnificationFilter[this.magnificationFilter]||h.TextureMagnificationFilter.LINEAR,this.layer.show=this.show??!0,this.layer.maximumAnisotropy=this.maximumAnisotropy,this.layer.minimumTerrainLevel=this.minimumTerrainLevel,this.layer.maximumTerrainLevel=this.maximumTerrainLevel,this.layer.colorToAlpha=this.colorToAlpha&&toColor(this.colorToAlpha),this.layer.colorToAlphaThreshold=this.colorToAlphaThreshold??.004,this.imageryProvider&&BE(this.layer.imageryProvider,this.imageryProvider))};let u=!1;const d=this.disposeVar(a.createProcessingFromAsyncFunc(async(y,_)=>{if(_){if(u=!0,l(),!this.innerImageryProvider)return;const P=await y.promise(NE(this.innerImageryProvider,e));if(!P){console.error("createImageryProviderFromJson error!");return}this.layer=new h.ImageryLayer(P),h.ImageryLayer.prototype&&(this.layer.ESSceneObjectID=n),u=!1}c()}));d.restart(void 0,!0);const p=this.disposeVar(new a.Event),f=this.disposeVar(new a.Event);this.ad(this.layerChanged.don(()=>{if(!this.innerImageryProvider||!this.layer||!Reflect.has(this.innerImageryProvider,"rectangle")||this.innerImageryProvider.rectangle[0]!=this.imageryProvider.rectangle[0]||this.innerImageryProvider.rectangle[1]!=this.imageryProvider.rectangle[1]||this.innerImageryProvider.rectangle[2]!=this.imageryProvider.rectangle[2]||this.innerImageryProvider.rectangle[3]!=this.imageryProvider.rectangle[3])return;const y=this.layer.imageryProvider.tilingScheme.rectangle,_=this.innerImageryProvider.rectangle&&Ne(this.innerImageryProvider.rectangle);(_.west<y.west||_.south<y.south||_.east>y.east||_.north>y.north)&&(this.innerImageryProvider.rectangle=[h.Math.toDegrees(Math.max(y.west,parseFloat(_.west.toFixed(7)))),h.Math.toDegrees(Math.max(y.south,parseFloat(_.south.toFixed(7)))),h.Math.toDegrees(Math.min(y.east,parseFloat(_.east.toFixed(7)))),h.Math.toDegrees(Math.min(y.north,parseFloat(_.north.toFixed(7))))],p.emit())})),this.dispose(this.imageryProviderChanged.disposableOn(()=>{this.innerImageryProvider=structuredClone(this.imageryProvider),p.emit()})),this.dispose(a.ESSceneObject.context.environmentVariablesChanged.disposableOn(()=>{p.emit()}));const g=this.disposeVar(a.createNextAnimateFrameEvent(this.rectangleChanged,p));this.dispose(g.disposableOn(()=>{d.restart(void 0,!0)}));const m=this.disposeVar(a.createNextAnimateFrameEvent(this.alphaChanged,this.nightAlphaChanged,this.dayAlphaChanged,this.brightnessChanged,this.contrastChanged,this.hueChanged,this.saturationChanged,this.gammaChanged,this.splitDirectionChanged,this.minificationFilterChanged,this.magnificationFilterChanged,this.showChanged,this.maximumAnisotropyChanged,this.minimumTerrainLevelChanged,this.maximumTerrainLevelChanged,this.cutoutRectangleChanged,this.colorToAlphaChanged,this.colorToAlphaThresholdChanged,f));this.dispose(m.disposableOn(()=>{u||d.restart(void 0,!1)})),this.dispose(this.flyToEvent.disposableOn(y=>{if(!e.actived)return;const{viewer:_}=e;_&&(this.rectangle&&!Cu(this.rectangle)?_.camera.flyTo({destination:Ne(this.rectangle),duration:y}):_.camera.flyHome(y))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get innerImageryProvider(){return this._innerImageryProvider.value}set innerImageryProvider(e){this._innerImageryProvider.value=e}get innerImageryProviderChanged(){return this._innerImageryProvider.changed}get layer(){return this._layer.value}set layer(e){this._layer.value=e}get layerChanged(){return this._layer.changed}}v(Ln,"defaults",{show:!0,rectangle:[-180,-90,180,90],alpha:1,nightAlpha:1,dayAlpha:1,brightness:1,contrast:1,hue:0,saturation:1,gamma:1,splitDirection:"NONE",minificationFilter:"LINEAR",magnificationFilter:"LINEAR",maximumAnisotropy:0,minimumTerrainLevel:0,maximumTerrainLevel:0,cutoutRectangle:[1,1,1,1],colorToAlpha:[1,1,1,.5],colorToAlphaThreshold:.004,imageryProvider:{type:"TileMapServiceImageryProvider"},zIndex:0,hasAlphaChannel:!0,pickFeaturesUrl:""}),(t=>{t.createDefaultProps=()=>({show:void 0,rectangle:a.reactArrayWithUndefined(void 0),alpha:void 0,nightAlpha:void 0,dayAlpha:void 0,brightness:void 0,contrast:void 0,hue:void 0,saturation:void 0,gamma:void 0,splitDirection:void 0,minificationFilter:void 0,magnificationFilter:void 0,maximumAnisotropy:void 0,minimumTerrainLevel:void 0,maximumTerrainLevel:void 0,cutoutRectangle:a.reactArrayWithUndefined(void 0),colorToAlpha:a.reactArrayWithUndefined(void 0),colorToAlphaThreshold:void 0,imageryProvider:a.reactJsonWithUndefined(void 0),zIndex:0,hasAlphaChannel:void 0,pickFeaturesUrl:void 0,targetID:void 0})})(Ln||(Ln={})),a.extendClassProps(Ln.prototype,Ln.createDefaultProps);const Rd=h.ApproximateTerrainHeights,UE=h.ComponentDatatype,ct=h.defined,WE=h.destroyObject,Fd=h.DeveloperError,GE=h.deprecationWarning,HE=h.GeometryInstance,$E=h.GeometryInstanceAttribute,qE=h.GroundPolylineGeometry,Wr=h.DrawCommand,iy=h.Pass,ny=h.RenderState,XE=h.ShaderProgram,Gr=h.ShaderSource;let zd=h._shadersPolylineShadowVolumeFS;const YE=h._shadersPolylineShadowVolumeMorphFS,ZE=h._shadersPolylineShadowVolumeMorphVS;let Ld=h._shadersPolylineShadowVolumeVS;const oy=h.BlendingState,Od=h.ClassificationType,QE=h.CullFace,sy=h.PolylineColorAppearance,kE=h.PolylineMaterialAppearance,On=h.Primitive,As=h.SceneMode,ry=h.StencilConstants,ay=h.StencilFunction,Ts=h.StencilOperation;Ld=Ld.replace("width = width * max(0.0, czm_metersPerPixel(positionEC));",""),zd=zd.replace("float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);","float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w;");function Ti(t){t=t??h.Frozen.EMPTY_OBJECT,this.geometryInstances=t.geometryInstances,this._hasPerInstanceColors=!0;let i=t.appearance;ct(i)||(i=new kE),this.appearance=i,this.show=t.show??!0,this.classificationType=t.classificationType??Od.BOTH,this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this._debugShowShadowVolume=t.debugShowShadowVolume??!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:t.interleave??!1,releaseGeometryInstances:t.releaseGeometryInstances??!0,allowPicking:t.allowPicking??!0,asynchronous:t.asynchronous??!0,compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1;const e=this;this._readyPromise=new Promise((n,o)=>{e._completeLoad=()=>{this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0);const s=this._error;ct(s)?o(s):n(this)}}),this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=ly(!1),this._renderState3DTiles=ly(!0),this._renderStateMorph=ny.fromCache({cull:{enabled:!0,face:QE.FRONT},depthTest:{enabled:!0},blending:oy.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(Ti.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return GE("GroundPolylinePrimitive.readyPromise","GroundPolylinePrimitive.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for GroundPolylinePrimitive.ready to return true instead."),this._readyPromise}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}}),Ti.initializeTerrainHeights=function(){return Rd.initialize()};function KE(t,i,e){const n=i.context,o=t._primitive,s=o._attributeLocations;let r=o._batchTable.getVertexShaderCallback()(Ld);r=On._appendShowToShader(o,r),r=On._appendDistanceDisplayConditionToShader(o,r),r=On._modifyShaderPosition(t,r,i.scene3DOnly);let l=o._batchTable.getVertexShaderCallback()(ZE);l=On._appendShowToShader(o,l),l=On._appendDistanceDisplayConditionToShader(o,l),l=On._modifyShaderPosition(t,l,i.scene3DOnly);let c=o._batchTable.getVertexShaderCallback()(zd);const u=[`GLOBE_MINIMUM_ALTITUDE ${i.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`];let d="",p="";ct(e.material)?(p=ct(e.material)?e.material.shaderSource:"",p.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&u.push("ANGLE_VARYING"),p.search(/in\s+float\s+v_width;/g)!==-1&&u.push("WIDTH_VARYING")):d="PER_INSTANCE_COLOR",u.push(d);const f=t.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",d]:[d],g=new Gr({defines:u,sources:[r]}),m=new Gr({defines:f,sources:[p,c]});t._sp=XE.replaceCache({context:n,shaderProgram:o._sp,vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:s});let y=n.shaderCache.getDerivedShaderProgram(t._sp,"2dColor");if(!ct(y)){const P=new Gr({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[r]});y=n.shaderCache.createDerivedShaderProgram(t._sp,"2dColor",{context:n,shaderProgram:t._sp2D,vertexShaderSource:P,fragmentShaderSource:m,attributeLocations:s})}t._sp2D=y;let _=n.shaderCache.getDerivedShaderProgram(t._sp,"MorphColor");if(!ct(_)){const P=new Gr({defines:u.concat([`MAX_TERRAIN_HEIGHT ${Rd._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[l]});c=o._batchTable.getVertexShaderCallback()(YE);const C=new Gr({defines:f,sources:[p,c]});_=n.shaderCache.createDerivedShaderProgram(t._sp,"MorphColor",{context:n,shaderProgram:t._spMorph,vertexShaderSource:P,fragmentShaderSource:C,attributeLocations:s})}t._spMorph=_}function ly(t){return ny.fromCache({cull:{enabled:!0},blending:oy.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:t,frontFunction:ay.EQUAL,frontOperation:{fail:Ts.KEEP,zFail:Ts.KEEP,zPass:Ts.KEEP},backFunction:ay.EQUAL,backOperation:{fail:Ts.KEEP,zFail:Ts.KEEP,zPass:Ts.KEEP},reference:ry.CESIUM_3D_TILE_MASK,mask:ry.CESIUM_3D_TILE_MASK}})}function JE(t,i,e,n,o,s){const r=t._primitive,l=r._va.length;o.length=l,s.length=l;const u=i instanceof sy?{}:e._uniforms,d=r._batchTable.getUniformMapCallback()(u);for(let p=0;p<l;p++){const f=r._va[p];let g=o[p];ct(g)||(g=o[p]=new Wr({owner:t,primitiveType:r._primitiveType})),g.vertexArray=f,g.renderState=t._renderState,g.shaderProgram=t._sp,g.uniformMap=d,g.pass=iy.TERRAIN_CLASSIFICATION,g.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";const m=Wr.shallowClone(g,g.derivedCommands.tileset);m.renderState=t._renderState3DTiles,m.pass=iy.CESIUM_3D_TILE_CLASSIFICATION,g.derivedCommands.tileset=m;const y=Wr.shallowClone(g,g.derivedCommands.color2D);y.shaderProgram=t._sp2D,g.derivedCommands.color2D=y;const _=Wr.shallowClone(m,m.derivedCommands.color2D);_.shaderProgram=t._sp2D,m.derivedCommands.color2D=_;const P=Wr.shallowClone(g,g.derivedCommands.colorMorph);P.renderState=t._renderStateMorph,P.shaderProgram=t._spMorph,P.pickId="czm_batchTable_pickColor(v_batchId)",g.derivedCommands.colorMorph=P}}function cy(t,i,e,n,o,s,r){e.mode===As.MORPHING?i=i.derivedCommands.colorMorph:e.mode!==As.SCENE3D&&(i=i.derivedCommands.color2D),i.modelMatrix=n,i.boundingVolume=s,i.cull=o,i.debugShowBoundingVolume=r,e.commandList.push(i)}function jE(t,i,e,n,o,s,r){const l=t._primitive;On._updateBoundingVolumes(l,i,o);let c;i.mode===As.SCENE3D?c=l._boundingSphereWC:i.mode===As.COLUMBUS_VIEW?c=l._boundingSphereCV:i.mode===As.SCENE2D&&ct(l._boundingSphere2D)?c=l._boundingSphere2D:ct(l._boundingSphereMorph)&&(c=l._boundingSphereMorph);const u=i.mode===As.MORPHING,d=t.classificationType,p=d!==Od.CESIUM_3D_TILE,f=d!==Od.TERRAIN&&!u;let g;const m=i.passes;if(m.render||m.pick&&l.allowPicking){const y=e.length;for(let _=0;_<y;++_){const P=c[_];p&&(g=e[_],cy(t,g,i,o,s,P,r)),f&&(g=e[_].derivedCommands.tileset,cy(t,g,i,o,s,P,r))}}}Ti.prototype.update=function(t){if(!ct(this._primitive)&&!ct(this.geometryInstances))return;if(!Rd.initialized){if(!this.asynchronous)throw new Fd("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");Ti.initializeTerrainHeights();return}let i;const e=this,n=this._primitiveOptions;if(!ct(this._primitive)){const o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],s=o.length,r=new Array(s);let l;for(i=0;i<s;++i)if(l=o[i].attributes,!ct(l)||!ct(l.color)){this._hasPerInstanceColors=!1;break}for(i=0;i<s;++i){const c=o[i];l={};const u=c.attributes;for(const d in u)u.hasOwnProperty(d)&&(l[d]=u[d]);ct(l.width)||(l.width=new $E({componentDatatype:UE.UNSIGNED_BYTE,componentsPerAttribute:1,value:[c.geometry.width]})),c.geometry._scene3DOnly=t.scene3DOnly,qE.setProjectionAndEllipsoid(c.geometry,t.mapProjection),r[i]=new HE({geometry:c.geometry,attributes:l,id:c.id,pickPrimitive:e})}n.geometryInstances=r,n.appearance=this.appearance,n._createShaderProgramFunction=function(c,u,d){KE(e,u,d)},n._createCommandsFunction=function(c,u,d,p,f,g,m){JE(e,u,d,p,g,m)},n._updateAndQueueCommandsFunction=function(c,u,d,p,f,g,m,y){jE(e,u,d,p,f,g,m)},this._primitive=new On(n)}if(this.appearance instanceof sy&&!this._hasPerInstanceColors)throw new Fd("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(t),t.afterRender.push(()=>{!this._ready&&ct(this._primitive)&&this._primitive.ready&&this._completeLoad()})},Ti.prototype.getGeometryInstanceAttributes=function(t){if(!ct(this._primitive))throw new Fd("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(t)},Ti.isSupported=function(t){return t.frameState.context.depthTexture},Ti.prototype.isDestroyed=function(){return!1},Ti.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,WE(this)};class Po extends a.Destroyable{constructor(i){super();const e=i.viewer;if(!e){console.warn("viewer is undefined!");return}const n=e.scene.globe,o=-414,s=8777;let r={};const l=()=>{var p,f,g,m,y;if(!e)return;let u;const d=this.shadingMode||"none";if((this.show??!0)&&!(d==="none"&&!this.enableContour)){let _;this.enableContour?(d==="elevation"?(u=ex(),_=u.materials.elevationRampMaterial.uniforms,_.minimumHeight=((p=this.elevationParam)==null?void 0:p.minHeight)??o,_.maximumHeight=((f=this.elevationParam)==null?void 0:f.maxHeight)??s,r=u.materials.contourMaterial.uniforms):d==="slope"?(u=tx(),_=u.materials.slopeRampMaterial.uniforms,r=u.materials.contourMaterial.uniforms):d==="aspect"?(u=ix(),_=u.materials.aspectRampMaterial.uniforms,r=u.materials.contourMaterial.uniforms):(u=h.Material.fromType("ElevationContour"),r=u.uniforms),r.width=this.contourWidth,r.spacing=this.contourSpacing,r.color=h.Color.fromCartesian4(h.Cartesian4.fromArray(this.contourColor))):d==="elevation"?(u=h.Material.fromType("ElevationRamp"),_=u.uniforms,_.minimumHeight=((g=this.elevationParam)==null?void 0:g.minHeight)??o,_.maximumHeight=((m=this.elevationParam)==null?void 0:m.maxHeight)??s):d==="slope"?(u=h.Material.fromType("SlopeRamp"),_=u.uniforms):d==="aspect"&&(u=h.Material.fromType("AspectRamp"),_=u.uniforms),d!=="none"&&(_.image=hy(d),d==="elevation"&&((y=this.elevationParam)==null?void 0:y.color)!==void 0&&(_.image=Array.isArray(this.elevationParam.color)?hy(d,this.elevationParam.color):this.elevationParam.color))}n.material=u};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(this.contourColorChanged,this.contourSpacingChanged,this.contourWidthChanged,this.enableContourChanged,this.shadingModeChanged,this.showChanged,this.elevationParamChanged));this.dispose(c.disposableOn(l)),this.dispose(()=>n.material=void 0)}}v(Po,"defaults",{show:!1,enableContour:!1,contourSpacing:150,contourWidth:2,contourColor:[1,0,0,1],shadingMode:"none"}),(t=>{t.createDefaultProps=()=>({show:void 0,shadingMode:void 0,enableContour:!1,contourSpacing:150,contourWidth:2,contourColor:[1,0,0,1],elevationParam:a.reactJsonWithUndefined(void 0)})})(Po||(Po={})),a.extendClassProps(Po.prototype,Po.createDefaultProps);function ex(){return new h.Material({fabric:{type:"ElevationColorContour",materials:{contourMaterial:{type:"ElevationContour"},elevationRampMaterial:{type:"ElevationRamp"}},components:{diffuse:"contourMaterial.alpha == 0.0 ? elevationRampMaterial.diffuse : contourMaterial.diffuse",alpha:"max(contourMaterial.alpha, elevationRampMaterial.alpha)"}},translucent:!1})}function tx(){return new h.Material({fabric:{type:"SlopeColorContour",materials:{contourMaterial:{type:"ElevationContour"},slopeRampMaterial:{type:"SlopeRamp"}},components:{diffuse:"contourMaterial.alpha == 0.0 ? slopeRampMaterial.diffuse : contourMaterial.diffuse",alpha:"max(contourMaterial.alpha, slopeRampMaterial.alpha)"}},translucent:!1})}function ix(){return new h.Material({fabric:{type:"AspectColorContour",materials:{contourMaterial:{type:"ElevationContour"},aspectRampMaterial:{type:"AspectRamp"}},components:{diffuse:"contourMaterial.alpha == 0.0 ? aspectRampMaterial.diffuse : contourMaterial.diffuse",alpha:"max(contourMaterial.alpha, aspectRampMaterial.alpha)"}},translucent:!1})}const nx=[0,.045,.1,.15,.37,.54,1],ox=[0,.29,.5,Math.sqrt(2)/2,.87,.91,1],sx=[0,.2,.4,.6,.8,.9,1];function hy(t,i){const e=document.createElement("canvas");e.width=100,e.height=1;const n=e.getContext("2d");let o;if(t==="elevation")o=nx;else if(t==="slope")o=ox;else if(t==="aspect")o=sx;else throw new Error("values未赋值!");const s=n.createLinearGradient(0,0,100,0);return s.addColorStop(o[0],i!=null&&i[0]?wn(i==null?void 0:i[0]):"#000000"),s.addColorStop(o[1],i!=null&&i[1]?wn(i==null?void 0:i[1]):"#2747E0"),s.addColorStop(o[2],i!=null&&i[2]?wn(i==null?void 0:i[2]):"#D33B7D"),s.addColorStop(o[3],i!=null&&i[3]?wn(i==null?void 0:i[3]):"#D33038"),s.addColorStop(o[4],i!=null&&i[4]?wn(i==null?void 0:i[4]):"#FF9742"),s.addColorStop(o[5],i!=null&&i[5]?wn(i==null?void 0:i[5]):"#ffd700"),s.addColorStop(o[6],i!=null&&i[6]?wn(i==null?void 0:i[6]):"#ffffff"),n.fillStyle=s,n.fillRect(0,0,100,1),e}class Ms extends a.Destroyable{constructor(e){super();v(this,"_geoPath");v(this,"_geoPolyline");v(this,"_geoCanvasPointPoi");v(this,"_player");v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_currentDistance",this.disposeVar(a.react(0)));v(this,"_ratio",this.disposeVar(a.PlayerProperty.createPlayingRatio([this,"currentTime"],[this,"duration"])));this._geoPath=this.disposeVar(new a.ESPathImpl),this._geoPolyline=this.disposeVar(new be(e)),this._geoCanvasPointPoi=this.disposeVar(new _n(e)),this._player=this.disposeVar(new a.Player),this._geoPolyline.show=!1,this.dispose(a.bind([this._geoPolyline,"positions"],[this,"positions"])),this.dispose(a.track([this._geoPath,"currentTime"],[this,"currentDistance"])),this.dispose(a.track([this._geoPath,"leadTime"],[this,"leadTime"])),this.dispose(a.track([this._geoPath,"trailTime"],[this,"trailTime"])),this.dispose(a.track([this._geoPath,"show"],[this,"show"])),this.dispose(a.track([this._geoPath,"polylineShow"],[this,"polylineShow"])),this.dispose(a.track([this._geoPath,"currentPoiShow"],[this,"currentPoiShow"])),this.dispose(a.track([this._geoPath,"width"],[this,"width"])),this.dispose(a.track([this._geoPath,"ground"],[this,"ground"])),this.dispose(a.track([this._geoPath,"color"],[this,"color"])),this.dispose(a.track([this._geoPath,"hasDash"],[this,"hasDash"])),this.dispose(a.track([this._geoPath,"gapColor"],[this,"gapColor"])),this.dispose(a.track([this._geoPath,"dashLength"],[this,"dashLength"])),this.dispose(a.track([this._geoPath,"dashPattern"],[this,"dashPattern"])),this.dispose(a.track([this._geoPath,"hasArrow"],[this,"hasArrow"])),this.dispose(a.track([this._geoPath,"depthTest"],[this,"depthTest"])),this.dispose(a.track([this._geoPath,"arcType"],[this,"arcType"])),this.dispose(a.track([this._geoPath,"allowPicking"],[this,"allowPicking"]));{const n=()=>{this._geoCanvasPointPoi.show=(this.show??!0)&&(this.currentPoiShow??!0)};n(),this.dispose(this.showChanged.disposableOn(n)),this.dispose(this.currentPoiShowChanged.disposableOn(n))}this.dispose(a.track([this._geoCanvasPointPoi,"position"],[this,"currentPosition"]));{const n=()=>{if(this.positions){const s=this.granularity*Math.PI/180,r=pu(this.positions,this.arcType??"GEODESIC",s);if(r){this._geoPath.timePosRots=r.timePosRots,this.rotationRadius.some(l=>l>0)?(this._geoPath.addAroundPoints(this.rotationRadius,!0),this._geoPath.computeRotIfUndefinedUsingLerp(!0),this._geoPath.rotLerpMode="Lerp"):(this._geoPath.computeRotIfUndefinedUsingPrevLine(!0),this._geoPath.rotLerpMode=this.rotLerpMode);return}}this._geoPath.timePosRots=[]};n();const o=this.disposeVar(a.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged,this.granularityChanged,this.rotationRadiusChanged,this.rotLerpModeChanged));this.dispose(o.disposableOn(n))}{const n=()=>{if((this._player.duration??3e3)<=0){this.currentDistance=0;return}const o=this.totalDistance*((this._player.currentTime??0)/(this._player.duration??3e3));Math.abs(o-this.currentDistance)>.01&&(this.currentDistance=o)};n(),this.dispose(this._player.currentTimeChanged.disposableOn(n))}{const n=()=>{if(this.totalDistance<=0){this._player.currentTime=0;return}const o=this.currentDistance/this.totalDistance*(this.duration??3e3);Math.abs(o-(this._player.currentTime??0))>.01&&(this._player.currentTime=o)};n(),this.dispose(this.currentDistanceChanged.disposableOn(n))}this.dispose(a.bind([this._player,"loop"],[this,"loop"])),this.dispose(a.bind([this._player,"currentTime"],[this,"currentTime"])),this.dispose(a.bind([this._player,"duration"],[this,"duration"])),this.dispose(a.bind([this._player,"playing"],[this,"playing"])),this.dispose(a.bind([this._player,"speed"],[this,"speed"])),this.dispose(this._flyToEvent.disposableOn(n=>{this._geoPolyline.flyTo(n)}))}get geoPath(){return this._geoPath}get geoPolyline(){return this._geoPolyline}get geoCanvasPointPoi(){return this._geoCanvasPointPoi}get player(){return this._player}get currentInfo(){return this._geoPath.currentInfo}get currentInfoChanged(){return this._geoPath.currentInfoChanged}get currentIndex(){return this._geoPath.currentIndex}get currentIndexChanged(){return this._geoPath.currentIndexChanged}get currentPosition(){return this._geoPath.currentPosition}get currentPositionChanged(){return this._geoPath.currentPositionChanged}get currentRotation(){return this._geoPath.currentRotation}get currentRotationChanged(){return this._geoPath.currentRotationChanged}get accumDistances(){return this._geoPath.accumDistances}get accumDistancesChanged(){return this._geoPath.accumDistancesChanged}get totalDistance(){return this._geoPath.totalDistance}get totalDistanceChanged(){return this._geoPath.totalDistanceChanged}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}subPath(e,n){const o=this._geoPath.subPath(e,n);if(o)return o.map(s=>s[1])}get currentDistance(){return this._currentDistance.value}set currentDistance(e){this._currentDistance.value=e}get currentDistanceChanged(){return this._currentDistance.changed}get ratio(){return this._ratio.value}set ratio(e){this._ratio.value=e}get ratioChanged(){return this._ratio.changed}get timePosRots(){return this.geoPath.timePosRots}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,currentPoiShow:!0,polylineShow:!0,positions:a.reactPositions(void 0),width:1,ground:!1,color:a.reactArray([1,1,1,1]),hasDash:!1,gapColor:a.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",granularity:1,loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,depthTest:!1,leadTime:0,trailTime:0,rotationRadius:[0],rotLerpMode:"Next"})})(Ms||(Ms={})),a.extendClassProps(Ms.prototype,Ms.createDefaultProps);class fe extends Jt{constructor(e,n){super(e,n);v(this,"_smoothMoving");if(this._smoothMoving=this.disposeVar(new a.SmoothMoveController(this.czmViewer)),this.d(this._smoothMoving.currentPositionChanged.don(s=>{s&&(this.sceneObject.position=s)})),this.d(this._smoothMoving.currentRotationChanged.don(s=>{s&&this._smoothMoving.isRotating&&(this.sceneObject.rotation=s)})),this.d(this._smoothMoving.currentHeadingChanged.don(s=>{if(s!==void 0&&!this._smoothMoving.isRotating){const r=this.sceneObject.rotation;this.sceneObject.rotation=[s-90,r[1],r[2]]}})),!n.viewer){console.warn("viewer is undefined!");return}this.d(e.smoothMoveEvent.don((s,r)=>{this.smoothMove(s,r*1e3)})),this.d(e.smoothMoveWithRotationEvent.don((s,r,l)=>{this.smoothMoveWithRotation(s,r,l*1e3)})),this.d(e.smoothMoveOnGroundEvent.don((s,r,l)=>{this.smoothMoveOnGround(s,r,l*1e3)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((s,r,l,c)=>{this.smoothMoveWithRotationOnGround(s,r,l,c*1e3)})),this.d(e.calcFlyToParamEvent.don(()=>{if(!e.useCalcFlyToParamInESObjectWithLocation)return;if(!e.position){console.warn(`!sceneObject(${e.name}-${e.id}).position`);return}const s=n.calcFlyToParam(e.position);if(!s){console.warn("czmViewer.calcFlyToParam error.");return}e.flyToParam=s})),this.d(e.automaticLandingEvent.don(async s=>{const r=[e.position[0],e.position[1]],l=await n.getTerrainHeight(r);l?e.position=[...r,l]:console.warn("不存在相交"),e.collision=s}));{const s=this.dv(a.createNextAnimateFrameEvent(e.minVisibleDistanceChanged,e.maxVisibleDistanceChanged));this.d(s.don(()=>this.visibleDistance(e,n))),this.d(n.cameraChanged.don(()=>this.visibleDistance(e,n)))}}smoothMove(e,n){this._smoothMoving.isGround=!1,this._smoothMoving.isRotating=!1,this._smoothMoving.restart(this.sceneObject.position,this.sceneObject.rotation,0),this._smoothMoving.restart(e,this.sceneObject.rotation,n)}smoothMoveWithRotation(e,n,o){this._smoothMoving.isGround=!1,this._smoothMoving.isRotating=!0,this._smoothMoving.restart(this.sceneObject.position,this.sceneObject.rotation,0),this._smoothMoving.restart(e,n,o)}async smoothMoveOnGround(e,n,o){const s=await this.czmViewer.getTerrainHeight([e,n])??0;this._smoothMoving.isGround=!0,this._smoothMoving.isRotating=!1,this._smoothMoving.restart(this.sceneObject.position,this.sceneObject.rotation,0),this._smoothMoving.restart([e,n,s],this.sceneObject.rotation,o)}async smoothMoveWithRotationOnGround(e,n,o,s){const r=await this.czmViewer.getTerrainHeight([n,o])??0;this._smoothMoving.isGround=!0,this._smoothMoving.isRotating=!0,this._smoothMoving.restart(this.sceneObject.position,this.sceneObject.rotation,0),this._smoothMoving.restart([n,o,r],e,s)}visibleDistance(e,n){var s;const o=fe.getInnerCzmObjects(this);if((s=n.viewer)!=null&&s.camera&&e.show&&o.length!=0){const r=a.getDistancesFromPositions([e.position,Gt(n.viewer.camera)],"NONE")[0];let l=!1;e.minVisibleDistance<e.maxVisibleDistance?l=e.minVisibleDistance<r&&r<e.maxVisibleDistance:e.maxVisibleDistance==0&&(l=r>e.minVisibleDistance),o.forEach(c=>{if(c instanceof ze)return;const u=e.show&&l;Reflect.has(c,"showHelper")&&(c.showHelper=u),Reflect.has(c,"enabled")&&(c.enabled=u),Reflect.has(c,"show")&&(c.show=u)})}}static getInnerCzmObjects(e){const n=[];for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(!o.includes("czmViewer")&&o.includes("czm")||!Number.isNaN(+o)?Array.isArray(e[o])?n.push(...fe.getInnerCzmObjects(e[o])):n.push(e[o]):e[o]&&e[o].obj&&n.push(...fe.getInnerCzmObjects(e[o].obj)));return n}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;if(!s.actived)return!1;if(o.flyToParam&&o.position){const{position:r,flyToParam:l}=o,{distance:c,heading:u,pitch:d,flyDuration:p,hDelta:f,pDelta:g}=l;return this.flyToWithPromise(n,r,c,[u,d,0],e??p,f,g),!0}return super.flyTo(e,n)}flyIn(e,n){const{sceneObject:o,czmViewer:s}=this;if(!s.actived)return!1;if(!o.flyInParam&&o.position&&o.rotation){const r=e??1,l=[...o.rotation];return l[0]+=90,this.flyToWithPromise(n,o.position,void 0,l,r),!0}return super.flyIn(e,n)}}class vt extends Jt{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}}}class Hr extends fe{constructor(e,n){super(e,n);v(this,"_lastHoverResult",this.disposeVar(a.react(void 0)));if(!n.viewer){console.warn("viewer is undefined!");return}const s=this.ad(a.createProcessingFromAsyncFunc(async(r,l)=>{const c=await r.promise(n.pick(l.screenPosition,"innerHoverEvent"));this.lastHoverResult=Object.assign({},c,l)}));this.ad(n.pointerMoveEvent.don(async r=>{!s.isRunning&&s.restart(void 0,r)}))}get lastHoverResult(){return this._lastHoverResult.value}set lastHoverResult(e){this._lastHoverResult.value=e}get lastHoverResultChanged(){return this._lastHoverResult.changed}}class dh extends fe{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}}}function rx(t,i,e){const n=t,o=i,s=(o[0]-n[0]+(o[1]-n[1]))/4,r=[[n[0],0,n[1]],[o[0],0,n[1]],[o[0],0,o[1]],[n[0],0,o[1]],[0,s,0]],l=h.Math.toDegrees,c=r.map(d=>{const p=h.Matrix4.multiplyByPoint(e,h.Cartesian3.fromElements(...d),new h.Cartesian3),f=h.Cartographic.fromCartesian(p);return[l(f.longitude),l(f.latitude),f.height]});return[[[c[0],c[1],c[2],c[3],c[0]]],c[4]]}class bo extends a.Destroyable{constructor(e,n){super();v(this,"_id",this.disposeVar(a.react(a.createGuid())));v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_polylines");v(this,"_axis");n&&(this.id=n),this._polylines=this.disposeVar(new $t(e,n)),this._axis=this.disposeVar(new be(e,n)),this._axis.hasArrow=!0,this._axis.width=10,this._polylines.arcType=this._axis.arcType="NONE",this.dispose(this.flyToEvent.disposableOn(o=>{if(!(e instanceof Te)||!e.actived)return;if(!this.position){console.warn("CzmPlane warning: 没有位置,无法飞入!");return}const s=this.minSize,r=this.maxSize,l=[r[0]-s[0],r[1]-s[1]],c=Math.sqrt(l[0]*l[0]+l[1]*l[1]);ne(e.viewer,this.position,c*2,void 0,o)}));{const o=()=>{let r=[],l;if(this.position){const c=Ie({position:this.position,rotation:this.rotation});if(c){const u=rx(this.minSize,this.maxSize,c);r=u[0],l=u[1]}}this.polylines.positions=r,!(!this.position||!l)&&(this.axis.positions=[this.position,l])};o();const s=this.disposeVar(a.createNextAnimateFrameEvent(this.positionChanged,this.rotationChanged,this.minSizeChanged,this.maxSizeChanged));this.dispose(s.disposableOn(o))}this.dispose(a.track([this.polylines,"color"],[this,"color"])),this.dispose(a.track([this.polylines,"width"],[this,"width"])),this.dispose(a.track([this.polylines,"show"],[this,"show"])),this.dispose(a.track([this.axis,"color"],[this,"color"]));{const o=()=>{this.axis.show=this.show&&this.showArrow};o(),this.dispose(this.showChanged.disposableOn(o)),this.dispose(this.showArrowChanged.disposableOn(o))}}get id(){return this._id.value}set id(e){this._id.value=e}get idChanged(){return this._id.changed}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get polylines(){return this._polylines}get axis(){return this._axis}}v(bo,"defaults",{position:[116.39,39.9,100]}),(t=>{t.createDefaultProps=()=>({show:!0,showArrow:!0,position:a.reactArrayWithUndefined(void 0),rotation:a.reactArray([0,0,0]),color:a.reactArray([1,1,1,1]),width:2,minSize:a.reactArray([-100,-100]),maxSize:a.reactArray([100,100])})})(bo||(bo={})),a.extendClassProps(bo.prototype,bo.createDefaultProps);class ax extends a.Destroyable{constructor(e,n,o){super();v(this,"_centerMatrix",this.disposeVar(a.react(void 0)));v(this,"_inverseCenterMatrix",this.disposeVar(a.react(void 0)));v(this,"_czmPlaneWrappers");v(this,"_czmPlaneWrappersChanged",this.disposeVar(a.createNextAnimateFrameEvent()));v(this,"_computedPlanesChanged",this.disposeVar(a.createNextAnimateFrameEvent()));this._czmClippingPlanes=n,this._planeIds=o,this._czmPlaneWrappers=this._planeIds.map(s=>this.disposeVar(new cx(e,this,s)));{const s=()=>{let r,l;const c=this._czmPlaneWrappers.filter(u=>u.position&&u.rotation);if(c.length!==0){const u=c.map(p=>p.position),d=a.getMinMaxCorner(u);r=Ie({position:d.center}),r&&(l=h.Matrix4.inverseTransformation(r,new h.Matrix4))}this.centerMatrix=r,this.inverseCenterMatrix=l};s(),this.dispose(this.czmPlaneWrappersChanged.disposableOn(s))}{const s=()=>{if(!this.centerMatrix){this._czmClippingPlanes.computedClippingPlanes=void 0;return}const l=h.Matrix4.toArray(this.centerMatrix),c=this._czmPlaneWrappers.filter(u=>!!u.computedPlane).map(u=>u.computedPlane);this._czmClippingPlanes.computedClippingPlanes={planes:c,enabled:this._czmClippingPlanes.enabled,modelMatrix:l,unionClippingRegions:this._czmClippingPlanes.unionClippingRegions,edgeColor:this._czmClippingPlanes.edgeColor,edgeWidth:this._czmClippingPlanes.edgeWidth}};s();const r=this.disposeVar(a.createNextAnimateFrameEvent(this._czmClippingPlanes.enabledChanged,this.centerMatrixChanged,this.inverseCenterMatrixChanged,this.computedPlanesChanged,this._czmClippingPlanes.unionClippingRegionsChanged,this._czmClippingPlanes.edgeColorChanged,this._czmClippingPlanes.edgeWidthChanged));this.dispose(r.disposableOn(s))}}get centerMatrix(){return this._centerMatrix.value}set centerMatrix(e){this._centerMatrix.value=e}get centerMatrixChanged(){return this._centerMatrix.changed}get inverseCenterMatrix(){return this._inverseCenterMatrix.value}set inverseCenterMatrix(e){this._inverseCenterMatrix.value=e}get inverseCenterMatrixChanged(){return this._inverseCenterMatrix.changed}get czmPlaneWrappers(){return this._czmPlaneWrappers}get czmPlaneWrappersChanged(){return this._czmPlaneWrappersChanged}get computedPlanesChanged(){return this._computedPlanesChanged}get czmClippingPlanes(){return this._czmClippingPlanes}}class lx extends a.Destroyable{constructor(i,e){super(),this._czmPlaneWrapper=i,this._czmPlane=e,this._czmPlaneWrapper.position=this._czmPlane.position,this.dispose(()=>this._czmPlaneWrapper.position=void 0),this.dispose(a.track([this._czmPlaneWrapper,"position"],[this._czmPlane,"position"])),this._czmPlaneWrapper.rotation=this._czmPlane.rotation,this.dispose(()=>this._czmPlaneWrapper.rotation=[0,0,0]),this.dispose(a.track([this._czmPlaneWrapper,"rotation"],[this._czmPlane,"rotation"]))}}class cx extends a.Destroyable{constructor(e,n,o){super();v(this,"_sowi");v(this,"_position",this.disposeVar(a.reactArrayWithUndefined(void 0)));v(this,"_rotation",this.disposeVar(a.reactArray([0,0,0])));v(this,"_computedPlane",this.disposeVar(a.reactJson(void 0)));this._planesResetting=n,this._planeId=o,this._sowi=this.disposeVar(new a.ESSceneObjectWithId),this._sowi.id=this._planeId,this.disposeVar(new a.ObjResettingWithEvent(this.sowi.sceneObjectChanged,()=>{const{sceneObject:s}=this.sowi;if(!s)return;let r;a.registerCreatedEventUpdate(this,s,()=>{const l=e.getEngineObject(s);if(s instanceof a.ESClippingPlane&&(r=l.czmPlane),!!r&&r instanceof bo)return new lx(this,r)})})),this.dispose(this.positionChanged.disposableOn(()=>this._planesResetting.czmPlaneWrappersChanged.next())),this.dispose(this.rotationChanged.disposableOn(()=>this._planesResetting.czmPlaneWrappersChanged.next()));{const s=()=>{const{inverseCenterMatrix:l}=this._planesResetting;if(!l)return this.computedPlane=void 0;const{position:c,rotation:u}=this;if(!c)return this.computedPlane=void 0;const d=Ie({position:c,rotation:u});if(!d)return this.computedPlane=void 0;const f=h.Matrix4.multiply(l,d,new h.Matrix4),g=new h.Cartesian3(f[4],f[5],f[6]),m=new h.Cartesian3(f[12],f[13],f[14]);h.Cartesian3.normalize(g,g);let y=-h.Cartesian3.dot(g,m);const _=[g.x,g.y,g.z];this._planesResetting.czmClippingPlanes.reverseNormal&&(a.Vector.negate(_,_),y=-y),this.computedPlane={normal:_,distance:y}};s();const r=this.disposeVar(a.createNextAnimateFrameEvent(this._planesResetting.inverseCenterMatrixChanged,this.positionChanged,this.rotationChanged,this._planesResetting.czmClippingPlanes.reverseNormalChanged));this.dispose(r.disposableOn(s))}this.dispose(this.computedPlaneChanged.disposableOn(()=>this._planesResetting.computedPlanesChanged.next()))}get sowi(){return this._sowi}get position(){return this._position.value}set position(e){this._position.value=e}get positionChanged(){return this._position.changed}get rotation(){return this._rotation.value}set rotation(e){this._rotation.value=e}get rotationChanged(){return this._rotation.changed}get computedPlane(){return this._computedPlane.value}set computedPlane(e){this._computedPlane.value=e}get computedPlaneChanged(){return this._computedPlane.changed}}class Is extends a.Destroyable{constructor(e,n){super();v(this,"_id",this.disposeVar(a.react(a.createGuid())));v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_computedClippingPlanes",this.disposeVar(a.react(void 0)));n&&(this.id=n),this.disposeVar(new a.ObjResettingWithEvent(this.planeIdsChanged,()=>new ax(e,this,this.planeIds)))}get id(){return this._id.value}set id(e){this._id.value=e}get idChanged(){return this._id.changed}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get computedClippingPlanes(){return this._computedClippingPlanes.value}set computedClippingPlanes(e){this._computedClippingPlanes.value=e}get computedClippingPlanesChanged(){return this._computedClippingPlanes.changed}}(t=>{t.createDefaultProps=()=>({enabled:!0,planeIds:a.reactArray([]),reverseNormal:!1,unionClippingRegions:!0,edgeColor:a.reactArray([1,1,1,1]),edgeWidth:2})})(Is||(Is={})),a.extendClassProps(Is.prototype,Is.createDefaultProps);let hx=class extends a.Destroyable{constructor(i,e){super(),this._czmESClippingPlane=i,this._eS3DTileset=e;const o=[this._czmESClippingPlane.czmPlane.id,...this._eS3DTileset.clippingPlaneIds];this._eS3DTileset.clippingPlaneIds=o,this.dispose(()=>{const s=[...this._eS3DTileset.clippingPlaneIds],r=this._czmESClippingPlane.czmPlane.id;s.includes(r)&&(s.splice(s.indexOf(r),1),this._eS3DTileset.clippingPlaneIds=s)})}},ux=class extends a.Destroyable{constructor(i){if(super(),this._czmESClippingPlane=i,!this._czmESClippingPlane.viewer)return;this._czmESClippingPlane.viewer.sceneGlobeClippingPlanesId=this._czmESClippingPlane.czmPlane.id;const e=()=>{if(!this._czmESClippingPlane.viewer)return;const o=Ie({position:this._czmESClippingPlane.sceneObject.position});if(!o)return;const s=jg(this._czmESClippingPlane.sceneObject.rotation);this._czmESClippingPlane.viewer.sceneGlobeClippingPlanes={planes:[{normal:s,distance:0}],enabled:!0,modelMatrix:h.Matrix4.toArray(o),unionClippingRegions:!1,edgeColor:this._czmESClippingPlane.sceneObject.edgeColor,edgeWidth:this._czmESClippingPlane.sceneObject.edgetWidth}};e();const n=this.dv(a.createNextAnimateFrameEvent(this._czmESClippingPlane.sceneObject.positionChanged,this._czmESClippingPlane.sceneObject.rotationChanged,this._czmESClippingPlane.sceneObject.edgeColorChanged,this._czmESClippingPlane.sceneObject.edgetWidthChanged));this.d(n.don(e)),this.dispose(()=>{this._czmESClippingPlane.viewer&&(this._czmESClippingPlane.viewer.sceneGlobeClippingPlanesId="",this._czmESClippingPlane.viewer.sceneGlobeClippingPlanes=void 0)})}};const _a=class _a extends fe{constructor(e,n){super(e,n);v(this,"_innerPositionReact",this.disposeVar(a.reactArrayWithUndefined(void 0)));v(this,"_czmPlane");v(this,"_tilesSceneObjectWithId");this._czmPlane=this.disposeVar(new bo(n,e.id)),this._tilesSceneObjectWithId=this.disposeVar(new a.ESSceneObjectWithId);const o=this.ad(a.react(this.sceneObject.targetID));if(this.ad(e.targetIDChanged.don(()=>{const l=a.ESSceneObject.getSceneObject(e.targetID);o.value=l?(l.components.main??l).id:""})),this.dispose(a.track([this._tilesSceneObjectWithId,"id"],o)),!n.viewer)return;const r=this._czmPlane;a.registerCreatedEventUpdate(this,e,()=>{const l=this.disposeVar(a.createNextAnimateFrameEvent(this.tilesSceneObjectWithId.sceneObjectChanged,this.sceneObject.showChanged,this.czmPlane.showChanged));this.disposeVar(new a.ObjResettingWithEvent(l,()=>{const{sceneObject:c,id:u}=this.tilesSceneObjectWithId;if(!(!this.sceneObject.show||!this.czmPlane.show))return u===""?new ux(this):!c||!(c instanceof a.ES3DTileset)?void 0:new hx(this,c)}))}),this.dispose(a.track([r,"show"],[e,"show"])),this.dispose(a.bind([r,"position"],[e,"position"])),this.dispose(Ke([r,"rotation"],[e,"rotation"])),this.dispose(a.track([r,"showArrow"],[e,"showArrow"])),this.dispose(a.track([r,"color"],[e,"edgeColor"])),this.dispose(a.track([r,"width"],[e,"edgetWidth"]));{const l=()=>{r.minSize=[-e.width/2,-e.height/2],r.maxSize=[e.width/2,e.height/2]};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(e.widthChanged,e.heightChanged));this.dispose(c.disposableOn(l))}{const l=()=>{a.Vector.equals(e.position,[0,0,0])?this._innerPositionReact.value=void 0:this._innerPositionReact.value=e.position};l(),this.dispose(this.sceneObject.positionChanged.disposableOn(l))}{const l=()=>{this._innerPositionReact.value==null?e.position=[0,0,0]:e.position=this._innerPositionReact.value};this.dispose(this._innerPositionReact.changed.disposableOn(l))}}get czmPlane(){return this._czmPlane}get tilesSceneObjectWithId(){return this._tilesSceneObjectWithId}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):o.position?(ei(s,o,n,o.position,Math.max(o.width,o.height),e,!0),!0):!1:!1}};v(_a,"type",_a.register("ESCesiumViewer",a.ESClippingPlane.type,_a));let Nd=_a;function dx(t){t.toBlob(i=>{if(!i){console.warn("canvas.toBlob error!");return}var e=new ClipboardItem({"image/png":i});navigator.clipboard.write([e]).then(function(){alert("图像已复制到剪切板")}).catch(function(n){console.error("复制到剪切板失败: ",n)})})}const Qh=class Qh extends a.Destroyable{constructor(i,e){super(),this._geoPolygonCanvas=i,this._geoPolygon=e;{const n=(r,l)=>{const{canvas:c,canvasCtx:u,canvasWidth:d}=this._geoPolygonCanvas,{toMercatorPos:p}=Qh,f=p(r),g=p(l),m=g[0]-f[0],y=g[1]-f[1],_=d>8192?8192:d;if(m<=0)return;const P=_*y/m|0;if(P<=0||P>8192)return;const{points:C}=this._geoPolygon;if(!C)throw new Error("!positions");const S=C.map(x=>{const A=p(x);return[(A[0]-f[0])*_/m,P-(A[1]-f[1])*P/y]});c.width=_,c.height=P,u.clearRect(0,0,_,P),u.beginPath();for(const x of S)u.lineTo(x[0],x[1]);u.closePath(),u.fillStyle="#FFFFFF",u.fill()},o=()=>{let r;const{canvas:l,canvasCtx:c,canvasWidth:u}=this._geoPolygonCanvas;c.clearRect(0,0,l.width,l.height);const{points:d}=this._geoPolygon;if(d&&d.length>=3){const p=a.getMinMaxCorner(d),{minPos:f,maxPos:g}=p;n(f,g),r={rect:[f[0],f[1],g[0],g[1]],height:d[0][2]}}this._geoPolygonCanvas.canvasGeoInfo=r,this.ad(a.nextAnimateFrame(()=>{this._geoPolygonCanvas.canvasChanged.emit()}))};o();const s=this.disposeVar(a.createNextAnimateFrameEvent(this._geoPolygon.pointsChanged,this._geoPolygonCanvas.canvasWidthChanged));this.dispose(s.disposableOn(o))}}};v(Qh,"toMercatorPos",function(i){const[e,n,o]=i;return[e,n/Math.cos(n*Math.PI/180),o]});let Bd=Qh;const Pa=class Pa extends a.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_geoPolygonWithId");v(this,"_canvas",document.createElement("canvas"));v(this,"_canvasCtx",this._canvas.getContext("2d"));v(this,"_canvasChanged",this.disposeVar(new a.Event));v(this,"_canvasGeoInfo",this.disposeVar(a.reactJsonWithUndefined(void 0)));this._geoPolygonWithId=this.disposeVar(new a.ESSceneObjectWithId),this.dispose(a.track([this._geoPolygonWithId,"id"],[this,"geoPolygonId"])),this.disposeVar(new a.ObjResettingWithEvent(this.geoPolygonWithId.sceneObjectChanged,()=>{const{sceneObject:o}=this.geoPolygonWithId;if(o&&o instanceof a.ESGeoPolygon)return new Pa.PolygonCanvasResetting(this,o)}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygonWithId(){return this._geoPolygonWithId}get canvas(){return this._canvas}get canvasCtx(){return this._canvasCtx}get canvasChanged(){return this._canvasChanged}get canvasGeoInfo(){return this._canvasGeoInfo.value}set canvasGeoInfo(e){this._canvasGeoInfo.value=e}get canvasGeoInfoChanged(){return this._canvasGeoInfo.changed}};v(Pa,"saveCanvasToClipboard",dx),v(Pa,"PolygonCanvasResetting",Bd);let So=Pa;(t=>{t.createDefaultProps=()=>({enabled:!0,geoPolygonId:"",canvasWidth:512})})(So||(So={})),a.extendClassProps(So.prototype,So.createDefaultProps);function px(t,i){return class extends a.Destroyable{constructor(o,s){super();v(this,"_customShader",this.disposeVar(new h.CustomShader({uniforms:{u_discardRatio:{value:new h.Cartesian2(0,1),type:h.UniformType.VEC2},u_topColor:{value:new h.Color(1,1,1,1),type:h.UniformType.VEC4},u_bottomColor:{value:new h.Color(1,1,1,1),type:h.UniformType.VEC4}},varyings:{v_xbsjPos:h.VaryingType.VEC3,v_m:h.VaryingType.FLOAT},vertexShaderText:` // IMPORTANT: the function signature must use these parameter names. This
366
366
  // makes it easier for the runtime to generate the shader and make optimizations.
367
367
  void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
368
368
  // code goes here. An empty body is a no-op.
@@ -1419,7 +1419,7 @@ ${Ry}
1419
1419
  out_FragColor.rgb *= vec3(clamp((distance - realDistance)*.5, 0.5, 1.0));
1420
1420
  out_FragColor.a = 0.9;
1421
1421
  }
1422
- `;{const d=this.dv(a.createNextAnimateFrameEvent(e.waterColorChanged,e.frequencyChanged,e.waveVelocityChanged,e.amplitudeChanged,e.specularIntensityChanged,e.waterTypeChanged,e.flowSpeedChanged,e.materialParamsChanged)),p=()=>{if(e.waterType==="custom")this.updateWater({waterColor:e.waterColor,frequency:(e.frequency??a.ESSubmergingAnalysis.defaults.frequency)/10,waveVelocity:(e.waveVelocity??a.ESSubmergingAnalysis.defaults.waveVelocity)/100,amplitude:(e.amplitude??a.ESSubmergingAnalysis.defaults.amplitude)*100,specularIntensity:e.specularIntensity??a.ESSubmergingAnalysis.defaults.specularIntensity,flowSpeed:e.flowSpeed??a.ESSubmergingAnalysis.defaults.flowSpeed});else{const f=Object.assign({},Mu[e.waterType]);f.frequency&&(f.frequency/=10),f.waveVelocity&&(f.waveVelocity/=100),f.amplitude&&(f.amplitude*=10),this.updateWater(f)}};p(),this.d(d.don(p))}{const d=f=>{if(f==0||!this.isTimestamp(f))return;const g=e.getAllMoments(),m=e.getSubmergingData;if(g.length==0||!m)return;const y=this.getClosestTimestampIndex(f,g);s.attributes={position:{typedArray:m[y].posBuffer,componentsPerAttribute:3}},s.indexTypedArray=m[y].indicesBuffer;const _=s.computeLocalAxisedBoundingBoxFromAttribute("position");if(!_)return;const{min:P,max:C}=_;s.setLocalAxisedBoundingBox(P,C)},p=this.dv(a.createNextAnimateFrameEvent(e.currentTimeChanged,e.readyEvent));this.d(p.don(()=>{d(e.currentTime)}))}}get czmCustomPrimitive(){return this._czmCustomPrimitive}get causticsTexture(){return this._causticsTexture}get foamTexture(){return this._foamTexture}get heightMapTexture(){return this._heightMapTexture}get normalMapTexture(){return this._normalMapTexture}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(Dt(s,o,n,e,this.czmCustomPrimitive,!0),!0):!1}updateWater(e){const{czmCustomPrimitive:n,sceneObject:o,heightMapTexture:s,normalMapTexture:r,foamTexture:l,causticsTexture:c}=this,u=o.materialParams[Object.keys(o.materialParams).filter(d=>d.toUpperCase().includes("BASECOLOR"))[0]];n.uniformMap={u_image:{type:"texture",id:s.id},u_heightmap_image:{type:"texture",id:s.id},u_normalmap_image:{type:"texture",id:r.id},u_foam_image:{type:"texture",id:l.id},u_caustics_image:{type:"texture",id:c.id},u_color:e.waterColor??u??a.ESSubmergingAnalysis.defaults.waterColor}}};v(nl,"type",nl.register("ESCesiumViewer",a.ESSubmergingAnalysis.type,nl));let _p=nl;const{getStrFromEnv:Ny}=a.ESSceneObject.context;function kA(t){let i;if(t.startsWith("ion://")){const n=+t.substring(6);Number.isFinite(n)&&(i=h.IonResource.fromAssetId(n))}else i=Ny(t);return i}async function KA(t,i){if(t.type==="EllipsoidTerrainProvider")return new h.EllipsoidTerrainProvider({ellipsoid:t.ellipsoid&&we(t.ellipsoid),tilingScheme:t.tilingScheme&&wi(t.tilingScheme)});if(t.type==="CesiumTerrainProvider"){const e=kA(typeof t.url=="string"?t.url:t.url.url);return e?await h.CesiumTerrainProvider.fromUrl(typeof e=="string"?Ht(t.url):e,{requestVertexNormals:t.requestVertexNormals,requestWaterMask:t.requestWaterMask,requestMetadata:t.requestMetadata,ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit}):void 0}else if(t.type==="GoogleEarthEnterpriseTerrainProvider"){const e=await h.GoogleEarthEnterpriseMetadata.fromUrl(Ny(t.url));return await h.GoogleEarthEnterpriseTerrainProvider.fromMetadata(e,{ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit})}else{if(t.type==="ArcGISTiledElevationTerrainProvider")return await h.ArcGISTiledElevationTerrainProvider.fromUrl(Ht(t.url),{token:t.token,ellipsoid:t.ellipsoid&&we(t.ellipsoid)});if(t.type==="CustomHeightmapTerrainProvider")return new h.CustomHeightmapTerrainProvider({tilingScheme:t.tilingScheme&&wi(t.tilingScheme),width:t.width,height:t.height,ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit,callback:t.callback&&Function('"use strict";return ('+t.callback+")")()});if(t.type==="VRTheWorldTerrainProvider")return await h.VRTheWorldTerrainProvider.fromUrl(Ht(t.url),{ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit})}}const ol=class ol extends Jt{constructor(e,n){super(e,n);v(this,"_provider",this.disposeVar(a.react(void 0)));v(this,"_czmProvider",this.dv(a.react(void 0)));const o=n.viewer;if(!o)return;const s=kt(o);if(!s)return;const{terrainManager:r}=s,l=()=>{r.delete(this),this.provider=void 0};this.dispose(l);let c=!1;const u=this.disposeVar(a.createProcessingFromAsyncFunc(async(p,f)=>{if(f){if(c=!0,l(),!this.czmProvider)return;this.provider=await p.promise(KA(this.czmProvider)),this.provider&&(this.provider.ESSceneObjectID=e.id),r.add(this),c=!1}}));u.restart(void 0,!0);const d=this.disposeVar(new a.Event);this.dispose(this.czmProviderChanged.disposableOn(()=>{d.emit()})),this.dispose(a.ESSceneObject.context.environmentVariablesChanged.disposableOn(()=>{d.emit()})),this.dispose(d.disposableOn(()=>{u.restart(void 0,!0)})),this.dispose(e.showChanged.disposableOn(()=>{c||u.restart(void 0,!1)})),this.dispose(e.flyToEvent.disposableOn((p,f)=>this.flyTo(p,f)));{const p=this.ad(a.reactJson(""));{const g=()=>{if(typeof e.url=="string")p.value=a.ESSceneObject.context.getStrFromEnv(e.url??a.ESTerrainLayer.defaults.url);else{const m=e.url;m.url=a.ESSceneObject.context.getStrFromEnv(m.url??a.ESTerrainLayer.defaults.url),p.value=m}};g(),this.ad(e.urlChanged.don(g))}const f=()=>{if(!p.value)return;let g=p.value,m=typeof g=="string"?g:g.url;if(m.includes(a.ESTerrainLayer.defaults.url)){const y=JA(m);if(y&&y.h){const _=Number(y.h),P={x:6378137,y:6378137,z:6356752314245179e-9};this._czmProvider.value={type:"EllipsoidTerrainProvider",ellipsoid:[P.x+_,P.y+_,P.z+_]}}else this._czmProvider.value={type:"CesiumTerrainProvider",url:"",requestMetadata:!0,requestWaterMask:!0,requestVertexNormals:!0}}else m.includes("/layer.json")&&(typeof g=="string"?g=m.split("/layer.json").join(""):g.url=m.split("/layer.json").join("")),this._czmProvider.value={type:"CesiumTerrainProvider",url:g,requestMetadata:!0,requestWaterMask:!0,requestVertexNormals:!0}};f(),this.dispose(p.changed.disposableOn(f))}}get provider(){return this._provider.value}set provider(e){this._provider.value=e}get providerChanged(){return this._provider.changed}get czmProvider(){return this._czmProvider.value}get czmProviderChanged(){return this._czmProvider.changed}flyTo(e,n){const{czmViewer:o,sceneObject:s}=this;if(!o.actived)return!1;const{viewer:r}=o;return r?(r.camera.flyTo({destination:s.rectangle&&!Cu(s.rectangle)?Ne(s.rectangle):h.Camera.DEFAULT_VIEW_RECTANGLE,duration:e}),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyInParam?super.flyIn(e,n):this.flyTo(e,n):!1}};v(ol,"type",ol.register("ESCesiumViewer",a.ESTerrainLayer.type,ol));let Pp=ol;function JA(t){const i=t.indexOf("?"),n=t.slice(i+1).split("&"),o={};for(var s=0;s<n.length;s++){var r=n[s].split("=");o[r[0]]=r[1]}return o}class By extends a.Destroyable{constructor(e,n){super();v(this,"_czmTextLabel");v(this,"flyTo",(e,n)=>{if(this.czmTextLabel.position){ne(this.czmViewer.viewer,this.czmTextLabel.position,1e3,jt,e);return}this.czmTextLabel.flyTo(e&&e*1e3)});this.czmViewer=n,this._czmTextLabel=this.disposeVar(new Pi(n,e.id));const o=this._czmTextLabel,s=()=>{const l=e.anchor,c=e.offset;l?o.originRatioAndOffset=[...l,-c[0],-c[1]]:o.originRatioAndOffset=[0,0,0,0]},r=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(r.disposableOn(()=>s())),s(),this.dispose(a.track([o,"zOrder"],[e,"zOrder"])),this.dispose(a.track([o,"show"],[e,"show"])),this.dispose(a.bind([o,"text"],[e,"text"])),this.dispose(a.track([o,"color"],[e,"color"])),this.dispose(a.track([o,"backgroundColor"],[e,"backgroundColor"])),this.dispose(a.bind([o,"textEditingInteraction"],[e,"textEditingInteraction"])),this.dispose(a.bind([o,"textEditing"],[e,"textEditing"])),this.dispose(a.bind([o,"position"],[e,"position"])),this.dispose(a.track([o,"width"],[e,"width"])),this.dispose(a.track([o,"opacity"],[e,"opacity"])),this.dispose(a.track([o,"padding"],[e,"padding"])),this.dispose(a.track([o,"borderRadius"],[e,"borderRadius"])),this.dispose(a.track([o,"borderColor"],[e,"borderColor"])),this.dispose(a.track([o,"borderWidth"],[e,"borderWidth"])),this.dispose(a.track([o,"textAlign"],[e,"textAlign"])),this.dispose(a.track([o,"fontSize"],[e,"fontSize"])),this.dispose(a.track([o,"borderStyle"],[e,"borderStyle"])),this.dispose(a.track([o,"pickOnClick"],[e,"allowPicking"]));{const l=()=>{o.scale=[e.scale[1],e.scale[2]]};l(),this.dispose(e.scaleChanged.don(l))}{const l=()=>{e.sizeByContent?(o.width=void 0,o.height=void 0):(o.width=e.size[0],o.height=e.size[1])};l(),this.dispose(e.sizeByContentChanged.don(l)),this.dispose(e.sizeChanged.don(l))}this.d(o.pickedEvent.don(l=>{var d;const c=(d=lo(l,"pickResult"))==null?void 0:d.pointerEvent;if(!c)return;const u={type:c.buttons!=0&&c.button==0?"leftClick":c.button==2?"rightClick":void 0,add:{mousePos:[c.offsetX,c.offsetY]}};u.type==null&&(u.type=c.type),e.widgetEvent.emit(u)}));{let l;const c=u=>{u&&(l=u),l&&(l.style.pointerEvents=e.editing?"none":"all")};this.d(e.editingChanged.don(()=>c(void 0))),this.ad(this._czmTextLabel.divCreatedEvent.don(u=>c(u)))}}get czmTextLabel(){return this._czmTextLabel}}class Vy extends a.Destroyable{constructor(e,n){super();v(this,"_czmTextLabel");v(this,"_czmImageModel");v(this,"_url",this.disposeVar(a.react("")));v(this,"_defaultSize",this.disposeVar(a.react([1,1])));v(this,"_size",this.disposeVar(a.react([1,1])));v(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});v(this,"_isPointEvent",!1);v(this,"flyTo",(e,n)=>{if(this.czmImageModel.position)return ei(this._czmViewer,this.sceneObject,n,this.sceneObject.position,Math.max(...this.czmImageModel.size),e,!0);this.czmImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this._czmViewer=n,this._czmTextLabel=this.disposeVar(new Pi(n,e.id)),this._czmImageModel=this.disposeVar(new qi(n,e.id));const o=this._czmViewer,s=this._czmTextLabel;s.originRatioAndOffset=[1e3,0,0,0],this.dispose(s.divCreatedEvent.disposableOn(c=>{const u=setTimeout(()=>{Jh(c,{backgroundColor:null,allowTaint:!1,useCORS:!0,width:c.offsetWidth,height:c.offsetHeight,scale:1}).then(d=>{if(clearTimeout(u),this.isDestroyed())return;const p=new Image;p.onload=()=>{e.sizeByContent?this._size.value=[p.width/100,p.height/100]:this._size.value=[e.size[0]/100,e.size[1]/100]},p.src=d.toDataURL("image/png"),this._url.value=d.toDataURL("image/png")}).catch(d=>{clearTimeout(u),console.error(d)})},50);this.dispose(()=>clearTimeout(u))})),this.dispose(a.bind([s,"position"],[e,"position"])),this.dispose(a.bind([s,"text"],[e,"text"])),this.dispose(a.track([s,"color"],[e,"color"])),this.dispose(a.track([s,"fontSize"],[e,"fontSize"]));const r=()=>{const c=e.anchor,u=e.offset;c?this.czmImageModel.originRatioAndOffset=[...c,-u[0]/100,-u[1]/100]:this.czmImageModel.originRatioAndOffset=[0,0,0,0]},l=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(l.disposableOn(()=>r())),r();{const c=()=>{this._czmTextLabel.show=!1;const u=this._czmImageModel;u.uri=this._url.value,u.pixelSize=void 0,u.useAxis="XZ",this.dispose(this.sizeChanged.disposableOn(()=>{u.size=this._size.value})),this.dispose(a.track([u,"show"],[e,"show"])),this.dispose(a.bind([u,"position"],[e,"position"])),this.dispose(a.track([u,"allowPicking"],[e,"allowPicking"]));{const d=()=>{u.scale=[e.scale[1],e.scale[2]]};d(),this.d(e.scaleChanged.don(d))}{const d=()=>{e.rotationType===0&&(u.rotationMode="WithProp",this.d(Ke([u,"rotation"],[e,"rotation"]))),e.rotationType===1&&(u.rotationMode="WithCamera"),e.rotationType===2&&(u.rotationMode="WithCameraOnlyZ")};d(),this.dispose(e.rotationTypeChanged.disposableOn(d))}};this.dispose(this._url.changed.disposableOn(c))}this.ad(o.clickEvent.don(c=>{const u=c==null?void 0:c.pointerEvent;u&&(this._isPointEvent=!0,this._eventInfo={type:u.button==0?"leftClick":u.button==2?"rightClick":"leftClick",add:{mousePos:[u.offsetX,u.offsetY]}})})),this.d(e.pickedEvent.don(c=>{var u,d,p;c.screenPosition&&this._isPointEvent&&c.attachedInfo!="innerHoverEvent"&&((u=this._eventInfo.add)!=null&&u.mousePos)&&Math.abs(c.screenPosition[0]-((d=this._eventInfo.add)==null?void 0:d.mousePos[0]))<1&&Math.abs(c.screenPosition[1]-((p=this._eventInfo.add)==null?void 0:p.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),a.registerCreatedEventUpdate(this,e,()=>{const c=o.getEngineObject(e);this.ad(c.lastHoverResultChanged.don((u,d)=>{(u==null?void 0:u.sceneObject)==(d==null?void 0:d.sceneObject)||(u==null?void 0:u.sceneObject)!=e&&(d==null?void 0:d.sceneObject)!=e||(u!=null&&u.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:u==null?void 0:u.screenPosition}},u.sceneObject.widgetEvent.emit(this._eventInfo)),d!=null&&d.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:u==null?void 0:u.screenPosition}},d.sceneObject.widgetEvent.emit(this._eventInfo)))}))})}get czmTextLabel(){return this._czmTextLabel}get czmImageModel(){return this._czmImageModel}get url(){return this._url.value}get defaultSize(){return this._defaultSize.value}get defaultSizeChanged(){return this._defaultSize.changed}get size(){return this._size.value}get sizeChanged(){return this._size.changed}}const sl=class sl extends Hr{constructor(e,n){super(e,n);v(this,"_event",this.disposeVar(a.createNextAnimateFrameEvent(this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged)));v(this,"_resetting",this.disposeVar(new a.ObjResettingWithEvent(this._event,()=>this.sceneObject.screenRender?new By(this.sceneObject,this.czmViewer):new Vy(this.sceneObject,this.czmViewer))));if(!n.viewer){console.warn("viewer is undefined!");return}}get event(){return this._event}get resetting(){return this._resetting}flyTo(e,n){const{sceneObject:o,czmViewer:s,resetting:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r&&r.obj&&r.obj.flyTo(e,n),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(sl,"type",sl.register("ESCesiumViewer",a.ESTextLabel.type,sl));let bp=sl;const rl=class rl extends fe{constructor(e,n){super(e,n);v(this,"_czmGeoDivSwitchPoi");if(this._czmGeoDivSwitchPoi=this.disposeVar(new ho(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmGeoDivSwitchPoi;s.showIcon=!1,this.d(a.track([s,"zOrder"],[e,"zOrder"])),this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.track([s,"text"],[e,"info"],c=>Object.values(c??{title:"请输入内容"}).join())),this.dispose(a.bind([s,"position"],[e,"position"]));const r=()=>{const c=e.anchor,u=e.offset;c?s.originRatioAndOffset=[...c,-u[0],-u[1]]:s.originRatioAndOffset=[0,0,0,0]},l=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(l.disposableOn(()=>r())),r()}get czmGeoDivSwitchPoi(){return this._czmGeoDivSwitchPoi}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmGeoDivSwitchPoi:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r.position?(ne(this.czmViewer.viewer,r.position,1e3,jt,e),!0):(r.flyTo(e&&e*1e3),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(rl,"type",rl.register("ESCesiumViewer",a.ESUEWidget.type,rl));let Sp=rl;const al=class al extends fe{constructor(e,n){super(e,n);v(this,"_czmGeoPoint");if(this._czmGeoPoint=this.disposeVar(new ti(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmGeoPoint;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"position"],[e,"position"]))}get czmGeoPoint(){return this._czmGeoPoint}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmGeoPoint:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r.flyTo(e),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(al,"type",al.register("ESCesiumViewer",a.ESUnrealActor.type,al));let Ep=al;var jA=h.Primitive._modifyShaderPosition;h.Primitive._modifyShaderPosition=function(t,n,e){var n=jA(t,n,e);return t.isCameraVideo&&n.indexOf("XBSJ_CAMERA_VIDEO")===-1&&(n=n.replace("void main()",`
1422
+ `;{const d=this.dv(a.createNextAnimateFrameEvent(e.waterColorChanged,e.frequencyChanged,e.waveVelocityChanged,e.amplitudeChanged,e.specularIntensityChanged,e.waterTypeChanged,e.flowSpeedChanged,e.materialParamsChanged)),p=()=>{if(e.waterType==="custom")this.updateWater({waterColor:e.waterColor,frequency:(e.frequency??a.ESSubmergingAnalysis.defaults.frequency)/10,waveVelocity:(e.waveVelocity??a.ESSubmergingAnalysis.defaults.waveVelocity)/100,amplitude:(e.amplitude??a.ESSubmergingAnalysis.defaults.amplitude)*100,specularIntensity:e.specularIntensity??a.ESSubmergingAnalysis.defaults.specularIntensity,flowSpeed:e.flowSpeed??a.ESSubmergingAnalysis.defaults.flowSpeed});else{const f=Object.assign({},Mu[e.waterType]);f.frequency&&(f.frequency/=10),f.waveVelocity&&(f.waveVelocity/=100),f.amplitude&&(f.amplitude*=10),this.updateWater(f)}};p(),this.d(d.don(p))}{const d=f=>{if(f==0||!this.isTimestamp(f))return;const g=e.getAllMoments(),m=e.getSubmergingData;if(g.length==0||!m)return;const y=this.getClosestTimestampIndex(f,g);s.attributes={position:{typedArray:m[y].posBuffer,componentsPerAttribute:3}},s.indexTypedArray=m[y].indicesBuffer;const _=s.computeLocalAxisedBoundingBoxFromAttribute("position");if(!_)return;const{min:P,max:C}=_;s.setLocalAxisedBoundingBox(P,C)},p=this.dv(a.createNextAnimateFrameEvent(e.currentTimeChanged,e.readyEvent));this.d(p.don(()=>{d(e.currentTime)}))}}get czmCustomPrimitive(){return this._czmCustomPrimitive}get causticsTexture(){return this._causticsTexture}get foamTexture(){return this._foamTexture}get heightMapTexture(){return this._heightMapTexture}get normalMapTexture(){return this._normalMapTexture}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(Dt(s,o,n,e,this.czmCustomPrimitive,!0),!0):!1}updateWater(e){const{czmCustomPrimitive:n,sceneObject:o,heightMapTexture:s,normalMapTexture:r,foamTexture:l,causticsTexture:c}=this,u=o.materialParams[Object.keys(o.materialParams).filter(d=>d.toUpperCase().includes("BASECOLOR"))[0]];n.uniformMap={u_image:{type:"texture",id:s.id},u_heightmap_image:{type:"texture",id:s.id},u_normalmap_image:{type:"texture",id:r.id},u_foam_image:{type:"texture",id:l.id},u_caustics_image:{type:"texture",id:c.id},u_color:e.waterColor??u??a.ESSubmergingAnalysis.defaults.waterColor}}};v(nl,"type",nl.register("ESCesiumViewer",a.ESSubmergingAnalysis.type,nl));let _p=nl;const{getStrFromEnv:Ny}=a.ESSceneObject.context;function kA(t){let i;if(t.startsWith("ion://")){const n=+t.substring(6);Number.isFinite(n)&&(i=h.IonResource.fromAssetId(n))}else i=Ny(t);return i}async function KA(t,i){if(t.type==="EllipsoidTerrainProvider")return new h.EllipsoidTerrainProvider({ellipsoid:t.ellipsoid&&we(t.ellipsoid),tilingScheme:t.tilingScheme&&wi(t.tilingScheme)});if(t.type==="CesiumTerrainProvider"){const e=kA(typeof t.url=="string"?t.url:t.url.url);return e?await h.CesiumTerrainProvider.fromUrl(typeof e=="string"?Ht(t.url):e,{requestVertexNormals:t.requestVertexNormals,requestWaterMask:t.requestWaterMask,requestMetadata:t.requestMetadata,ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit}):void 0}else if(t.type==="GoogleEarthEnterpriseTerrainProvider"){const e=await h.GoogleEarthEnterpriseMetadata.fromUrl(Ny(t.url));return await h.GoogleEarthEnterpriseTerrainProvider.fromMetadata(e,{ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit})}else{if(t.type==="ArcGISTiledElevationTerrainProvider")return await h.ArcGISTiledElevationTerrainProvider.fromUrl(Ht(t.url),{token:t.token,ellipsoid:t.ellipsoid&&we(t.ellipsoid)});if(t.type==="CustomHeightmapTerrainProvider")return new h.CustomHeightmapTerrainProvider({tilingScheme:t.tilingScheme&&wi(t.tilingScheme),width:t.width,height:t.height,ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit,callback:t.callback&&Function('"use strict";return ('+t.callback+")")()});if(t.type==="VRTheWorldTerrainProvider")return await h.VRTheWorldTerrainProvider.fromUrl(Ht(t.url),{ellipsoid:t.ellipsoid&&we(t.ellipsoid),credit:t.credit})}}const ol=class ol extends Jt{constructor(e,n){super(e,n);v(this,"_provider",this.disposeVar(a.react(void 0)));v(this,"_czmProvider",this.dv(a.react(void 0)));const o=n.viewer;if(!o)return;const s=kt(o);if(!s)return;const{terrainManager:r}=s,l=()=>{r.delete(this),this.provider=void 0};this.dispose(l);let c=!1;const u=this.disposeVar(a.createProcessingFromAsyncFunc(async(p,f)=>{if(f){if(c=!0,l(),!this.czmProvider)return;this.provider=await p.promise(KA(this.czmProvider)),this.provider&&(this.provider.ESSceneObjectID=e.id),r.add(this),c=!1}}));u.restart(void 0,!0);const d=this.disposeVar(new a.Event);this.dispose(this.czmProviderChanged.disposableOn(()=>{d.emit()})),this.dispose(a.ESSceneObject.context.environmentVariablesChanged.disposableOn(()=>{d.emit()})),this.dispose(d.disposableOn(()=>{u.restart(void 0,!0)})),this.dispose(e.showChanged.disposableOn(()=>{c||u.restart(void 0,!1)})),this.dispose(e.flyToEvent.disposableOn((p,f)=>this.flyTo(p,f)));{const p=this.ad(a.reactJson(""));{const g=()=>{if(typeof e.url=="string")p.value=a.ESSceneObject.context.getStrFromEnv(e.url??a.ESTerrainLayer.defaults.url);else{const m=e.url;m.url=a.ESSceneObject.context.getStrFromEnv(m.url??a.ESTerrainLayer.defaults.url),p.value=m}};g(),this.ad(e.urlChanged.don(g))}const f=()=>{if(!p.value)return;let g=p.value,m=typeof g=="string"?g:g.url;if(m.includes(a.ESTerrainLayer.defaults.url)){const y=JA(m);if(y&&y.h){const _=Number(y.h),P={x:6378137,y:6378137,z:6356752314245179e-9};this._czmProvider.value={type:"EllipsoidTerrainProvider",ellipsoid:[P.x+_,P.y+_,P.z+_]}}else this._czmProvider.value={type:"CesiumTerrainProvider",url:"",requestMetadata:!0,requestWaterMask:!0,requestVertexNormals:!0}}else m.includes("/layer.json")&&(typeof g=="string"?g=m.split("/layer.json").join(""):g.url=m.split("/layer.json").join("")),this._czmProvider.value={type:"CesiumTerrainProvider",url:g,requestMetadata:!0,requestWaterMask:!0,requestVertexNormals:!0}};f(),this.dispose(p.changed.disposableOn(f))}}get provider(){return this._provider.value}set provider(e){this._provider.value=e}get providerChanged(){return this._provider.changed}get czmProvider(){return this._czmProvider.value}get czmProviderChanged(){return this._czmProvider.changed}flyTo(e,n){const{czmViewer:o,sceneObject:s}=this;if(!o.actived)return!1;const{viewer:r}=o;return r?(s.rectangle&&!Cu(s.rectangle)?r.camera.flyTo({destination:Ne(s.rectangle),duration:e}):r.camera.flyHome(e),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyInParam?super.flyIn(e,n):this.flyTo(e,n):!1}};v(ol,"type",ol.register("ESCesiumViewer",a.ESTerrainLayer.type,ol));let Pp=ol;function JA(t){const i=t.indexOf("?"),n=t.slice(i+1).split("&"),o={};for(var s=0;s<n.length;s++){var r=n[s].split("=");o[r[0]]=r[1]}return o}class By extends a.Destroyable{constructor(e,n){super();v(this,"_czmTextLabel");v(this,"flyTo",(e,n)=>{if(this.czmTextLabel.position){ne(this.czmViewer.viewer,this.czmTextLabel.position,1e3,jt,e);return}this.czmTextLabel.flyTo(e&&e*1e3)});this.czmViewer=n,this._czmTextLabel=this.disposeVar(new Pi(n,e.id));const o=this._czmTextLabel,s=()=>{const l=e.anchor,c=e.offset;l?o.originRatioAndOffset=[...l,-c[0],-c[1]]:o.originRatioAndOffset=[0,0,0,0]},r=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(r.disposableOn(()=>s())),s(),this.dispose(a.track([o,"zOrder"],[e,"zOrder"])),this.dispose(a.track([o,"show"],[e,"show"])),this.dispose(a.bind([o,"text"],[e,"text"])),this.dispose(a.track([o,"color"],[e,"color"])),this.dispose(a.track([o,"backgroundColor"],[e,"backgroundColor"])),this.dispose(a.bind([o,"textEditingInteraction"],[e,"textEditingInteraction"])),this.dispose(a.bind([o,"textEditing"],[e,"textEditing"])),this.dispose(a.bind([o,"position"],[e,"position"])),this.dispose(a.track([o,"width"],[e,"width"])),this.dispose(a.track([o,"opacity"],[e,"opacity"])),this.dispose(a.track([o,"padding"],[e,"padding"])),this.dispose(a.track([o,"borderRadius"],[e,"borderRadius"])),this.dispose(a.track([o,"borderColor"],[e,"borderColor"])),this.dispose(a.track([o,"borderWidth"],[e,"borderWidth"])),this.dispose(a.track([o,"textAlign"],[e,"textAlign"])),this.dispose(a.track([o,"fontSize"],[e,"fontSize"])),this.dispose(a.track([o,"borderStyle"],[e,"borderStyle"])),this.dispose(a.track([o,"pickOnClick"],[e,"allowPicking"]));{const l=()=>{o.scale=[e.scale[1],e.scale[2]]};l(),this.dispose(e.scaleChanged.don(l))}{const l=()=>{e.sizeByContent?(o.width=void 0,o.height=void 0):(o.width=e.size[0],o.height=e.size[1])};l(),this.dispose(e.sizeByContentChanged.don(l)),this.dispose(e.sizeChanged.don(l))}this.d(o.pickedEvent.don(l=>{var d;const c=(d=lo(l,"pickResult"))==null?void 0:d.pointerEvent;if(!c)return;const u={type:c.buttons!=0&&c.button==0?"leftClick":c.button==2?"rightClick":void 0,add:{mousePos:[c.offsetX,c.offsetY]}};u.type==null&&(u.type=c.type),e.widgetEvent.emit(u)}));{let l;const c=u=>{u&&(l=u),l&&(l.style.pointerEvents=e.editing?"none":"all")};this.d(e.editingChanged.don(()=>c(void 0))),this.ad(this._czmTextLabel.divCreatedEvent.don(u=>c(u)))}}get czmTextLabel(){return this._czmTextLabel}}class Vy extends a.Destroyable{constructor(e,n){super();v(this,"_czmTextLabel");v(this,"_czmImageModel");v(this,"_url",this.disposeVar(a.react("")));v(this,"_defaultSize",this.disposeVar(a.react([1,1])));v(this,"_size",this.disposeVar(a.react([1,1])));v(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});v(this,"_isPointEvent",!1);v(this,"flyTo",(e,n)=>{if(this.czmImageModel.position)return ei(this._czmViewer,this.sceneObject,n,this.sceneObject.position,Math.max(...this.czmImageModel.size),e,!0);this.czmImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this._czmViewer=n,this._czmTextLabel=this.disposeVar(new Pi(n,e.id)),this._czmImageModel=this.disposeVar(new qi(n,e.id));const o=this._czmViewer,s=this._czmTextLabel;s.originRatioAndOffset=[1e3,0,0,0],this.dispose(s.divCreatedEvent.disposableOn(c=>{const u=setTimeout(()=>{Jh(c,{backgroundColor:null,allowTaint:!1,useCORS:!0,width:c.offsetWidth,height:c.offsetHeight,scale:1}).then(d=>{if(clearTimeout(u),this.isDestroyed())return;const p=new Image;p.onload=()=>{e.sizeByContent?this._size.value=[p.width/100,p.height/100]:this._size.value=[e.size[0]/100,e.size[1]/100]},p.src=d.toDataURL("image/png"),this._url.value=d.toDataURL("image/png")}).catch(d=>{clearTimeout(u),console.error(d)})},50);this.dispose(()=>clearTimeout(u))})),this.dispose(a.bind([s,"position"],[e,"position"])),this.dispose(a.bind([s,"text"],[e,"text"])),this.dispose(a.track([s,"color"],[e,"color"])),this.dispose(a.track([s,"fontSize"],[e,"fontSize"]));const r=()=>{const c=e.anchor,u=e.offset;c?this.czmImageModel.originRatioAndOffset=[...c,-u[0]/100,-u[1]/100]:this.czmImageModel.originRatioAndOffset=[0,0,0,0]},l=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(l.disposableOn(()=>r())),r();{const c=()=>{this._czmTextLabel.show=!1;const u=this._czmImageModel;u.uri=this._url.value,u.pixelSize=void 0,u.useAxis="XZ",this.dispose(this.sizeChanged.disposableOn(()=>{u.size=this._size.value})),this.dispose(a.track([u,"show"],[e,"show"])),this.dispose(a.bind([u,"position"],[e,"position"])),this.dispose(a.track([u,"allowPicking"],[e,"allowPicking"]));{const d=()=>{u.scale=[e.scale[1],e.scale[2]]};d(),this.d(e.scaleChanged.don(d))}{const d=()=>{e.rotationType===0&&(u.rotationMode="WithProp",this.d(Ke([u,"rotation"],[e,"rotation"]))),e.rotationType===1&&(u.rotationMode="WithCamera"),e.rotationType===2&&(u.rotationMode="WithCameraOnlyZ")};d(),this.dispose(e.rotationTypeChanged.disposableOn(d))}};this.dispose(this._url.changed.disposableOn(c))}this.ad(o.clickEvent.don(c=>{const u=c==null?void 0:c.pointerEvent;u&&(this._isPointEvent=!0,this._eventInfo={type:u.button==0?"leftClick":u.button==2?"rightClick":"leftClick",add:{mousePos:[u.offsetX,u.offsetY]}})})),this.d(e.pickedEvent.don(c=>{var u,d,p;c.screenPosition&&this._isPointEvent&&c.attachedInfo!="innerHoverEvent"&&((u=this._eventInfo.add)!=null&&u.mousePos)&&Math.abs(c.screenPosition[0]-((d=this._eventInfo.add)==null?void 0:d.mousePos[0]))<1&&Math.abs(c.screenPosition[1]-((p=this._eventInfo.add)==null?void 0:p.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),a.registerCreatedEventUpdate(this,e,()=>{const c=o.getEngineObject(e);this.ad(c.lastHoverResultChanged.don((u,d)=>{(u==null?void 0:u.sceneObject)==(d==null?void 0:d.sceneObject)||(u==null?void 0:u.sceneObject)!=e&&(d==null?void 0:d.sceneObject)!=e||(u!=null&&u.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:u==null?void 0:u.screenPosition}},u.sceneObject.widgetEvent.emit(this._eventInfo)),d!=null&&d.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:u==null?void 0:u.screenPosition}},d.sceneObject.widgetEvent.emit(this._eventInfo)))}))})}get czmTextLabel(){return this._czmTextLabel}get czmImageModel(){return this._czmImageModel}get url(){return this._url.value}get defaultSize(){return this._defaultSize.value}get defaultSizeChanged(){return this._defaultSize.changed}get size(){return this._size.value}get sizeChanged(){return this._size.changed}}const sl=class sl extends Hr{constructor(e,n){super(e,n);v(this,"_event",this.disposeVar(a.createNextAnimateFrameEvent(this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged)));v(this,"_resetting",this.disposeVar(new a.ObjResettingWithEvent(this._event,()=>this.sceneObject.screenRender?new By(this.sceneObject,this.czmViewer):new Vy(this.sceneObject,this.czmViewer))));if(!n.viewer){console.warn("viewer is undefined!");return}}get event(){return this._event}get resetting(){return this._resetting}flyTo(e,n){const{sceneObject:o,czmViewer:s,resetting:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r&&r.obj&&r.obj.flyTo(e,n),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(sl,"type",sl.register("ESCesiumViewer",a.ESTextLabel.type,sl));let bp=sl;const rl=class rl extends fe{constructor(e,n){super(e,n);v(this,"_czmGeoDivSwitchPoi");if(this._czmGeoDivSwitchPoi=this.disposeVar(new ho(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmGeoDivSwitchPoi;s.showIcon=!1,this.d(a.track([s,"zOrder"],[e,"zOrder"])),this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.track([s,"text"],[e,"info"],c=>Object.values(c??{title:"请输入内容"}).join())),this.dispose(a.bind([s,"position"],[e,"position"]));const r=()=>{const c=e.anchor,u=e.offset;c?s.originRatioAndOffset=[...c,-u[0],-u[1]]:s.originRatioAndOffset=[0,0,0,0]},l=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(l.disposableOn(()=>r())),r()}get czmGeoDivSwitchPoi(){return this._czmGeoDivSwitchPoi}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmGeoDivSwitchPoi:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r.position?(ne(this.czmViewer.viewer,r.position,1e3,jt,e),!0):(r.flyTo(e&&e*1e3),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(rl,"type",rl.register("ESCesiumViewer",a.ESUEWidget.type,rl));let Sp=rl;const al=class al extends fe{constructor(e,n){super(e,n);v(this,"_czmGeoPoint");if(this._czmGeoPoint=this.disposeVar(new ti(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmGeoPoint;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"position"],[e,"position"]))}get czmGeoPoint(){return this._czmGeoPoint}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmGeoPoint:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r.flyTo(e),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(al,"type",al.register("ESCesiumViewer",a.ESUnrealActor.type,al));let Ep=al;var jA=h.Primitive._modifyShaderPosition;h.Primitive._modifyShaderPosition=function(t,n,e){var n=jA(t,n,e);return t.isCameraVideo&&n.indexOf("XBSJ_CAMERA_VIDEO")===-1&&(n=n.replace("void main()",`
1423
1423
  #ifdef XBSJ_CAMERA_VIDEO
1424
1424
  uniform mat4 u_boxMV;
1425
1425
  #endif
@@ -2291,10 +2291,10 @@ async function initCesiumViewer(container, czmViewer) {
2291
2291
  `;function F4(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
2292
2292
  github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
2293
2293
  gitee地址:${t}
2294
- `;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const st=class st extends a.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(a.react(0)));v(this,"_viewer",this.dv(a.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(a.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));v(this,"_editingSystem",Wh);v(this,"_moveObjectsProcess",this.ad(PC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new fF(this)),this.ad(new gF(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new wF(this)})),this._viewerLegend=this.dv(new A4(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Fg(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=te([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new vL(this.subContainer,this,o=>this._viewer.value=o,n.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&kt(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:s}=this.extensions;return await s.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],st.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Gt(e),rotation:Jo(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,n.positionWC,new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=Jo(n),f=p[0]-d,g=p[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var c;if(!n)return;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(c=this.viewer)==null?void 0:c.camera;return l&&Er(l,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:l,flyDuration:c,hDelta:u,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,l,0],duration:c*1e3,hdelta:u,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Er(f,p,o)}flyToBoundingSphere(e,n,o=1){var p;const s=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],r=a.getGeoBoundingSphereFromPositions(s);if(!r)return;const{center:l,radius:c}=r,u={position:l,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Er(d,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Gt(e),rotation:Jo(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,s,r,l){var c,u;(u=(c=this._viewerInstance)==null?void 0:c.obj)==null||u.navigationManager.changeToLine(e,n,o,s,r,l),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToFollow(e,n,o,s,r),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=h.VERSION,e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=h.Cartographic.fromDegrees(e,n,void 0,st.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(s)??null}async getHeightsByLonLats(e,n){const o=e.map(r=>this.getHeightByLonLat(...r));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await bm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Le(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const s=e.components.main??e;s&&n!=null&&(s.editingID=`${o.callSource}_${a.createGuid()}`,this._editingSystem.create(this,s,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=a.createGuid();for(let s=0;s<e.length;s++){const r=e[s],l=r.components.main??r;l.editingID=o,l&&n.push(l)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=st.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!st.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=st.latestDefaultAccessToken}positionsToLocalPositions(e,n){return It(e,n)}localPositionsToPositions(e,n){return yn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=Le(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const s=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!s||s.x<0||s.y<0)}getESProperties(){const e={...super.getESProperties()},n=st.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",R4,D4,!0),new a.FunctionProperty([],()=>st.getCesiumIonToken(),[],"获取官方token"),new a.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new a.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new a.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new a.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new a.GroupProperty([],"Viewer","Viewer"),new a.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new a.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new a.BooleanProperty([this,"shadows"]),new a.GroupProperty([],"比例尺","比例尺(Legend)"),new a.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new a.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new a.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new a.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new a.GroupProperty([],"场景","场景(Scene)"),new a.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new a.GroupProperty([],"Globe","Globe"),new a.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new a.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new a.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new a.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new a.BooleanProperty([this,"sceneGlobeShowSkirts"]),new a.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new a.ColorProperty([this,"sceneGlobeBaseColor"]),new a.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new a.JsonProperty([this,"sceneGlobeClippingPlanes"]),new a.StringProperty([this,"sceneGlobeClippingPlanesId"]),new a.JsonProperty([this,"sceneGlobeClippingPolygons"]),new a.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new a.GroupProperty([],"underground","underground"),new a.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new a.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new a.GroupProperty([],"Translucency","Translucency"),new a.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new a.GroupProperty([],"Sun","Sun"),new a.BooleanProperty([this,"sun"],"sun",n.sun,!0),new a.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new a.GroupProperty([],"Moon","Moon"),new a.BooleanProperty([this,"moon"],"moon",n.moon,!0),new a.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new a.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new a.GroupProperty([],"SkyBox","SkyBox"),new a.BooleanProperty([this,"sceneSkyBoxShow"]),new a.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new a.GroupProperty([],"Background","Background"),new a.BooleanProperty([this,"xbsjUseBackground"]),new a.StringProperty([this,"xbsjBackgroundImageUri"]),new a.ColorProperty([this,"xbsjBackgroundColor"]),new a.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new a.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new a.ColorProperty([this,"sceneBackgroundColor"]),new a.GroupProperty([],"Fog","Fog"),new a.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new a.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new a.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new a.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new a.GroupProperty([],"Sscc","Sscc"),new a.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new a.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new a.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new a.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new a.GroupProperty([],"后处理","后处理"),new a.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new a.GroupProperty([],"环境遮蔽","环境遮蔽"),new a.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new a.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new a.GroupProperty([],"Bloom","Bloom"),new a.BooleanProperty([this,"scenePpsBloomEnabled"]),new a.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new a.NumberProperty([this,"scenePpsBloomContrast"]),new a.NumberProperty([this,"scenePpsBloomBrightness"]),new a.NumberProperty([this,"scenePpsBloomDelta"]),new a.NumberProperty([this,"scenePpsBloomSigma"]),new a.NumberProperty([this,"scenePpsBloomStepSize"]),new a.GroupProperty([],"调试","调试"),new a.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new a.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new a.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new a.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new a.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new a.GroupProperty([],"Inspector","Inspector"),new a.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new a.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new a.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};v(st,"type",st.register("ESCesiumViewer",st)),v(st,"getCesiumIonToken",F4),v(st,"currentDefaultAccessToken",h.Ion.defaultAccessToken),v(st,"latestDefaultAccessToken"),v(st,"ObjectsToExcludeWrapper",yF),v(st,"defaults",{...a.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),v(st,"getHeightsScartchCarto",new h.Cartographic);let Te=st;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...I4()})})(Te||(Te={})),a.extendClassProps(Te.prototype,Te.createDefaultProps),M.copyright=void 0;try{const t="earthsdk3-cesium",i="3.5.0-beta.20",e="2025-10-23T10:01:13.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="d1e7c72f07f84b9908276e9d5e2728f3852f06c6",l=((Date.now()-1761213673e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
2294
+ `;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const st=class st extends a.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(a.react(0)));v(this,"_viewer",this.dv(a.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(a.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));v(this,"_editingSystem",Wh);v(this,"_moveObjectsProcess",this.ad(PC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new fF(this)),this.ad(new gF(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new wF(this)})),this._viewerLegend=this.dv(new A4(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Fg(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=te([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new vL(this.subContainer,this,o=>this._viewer.value=o,n.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&kt(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:s}=this.extensions;return await s.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],st.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Gt(e),rotation:Jo(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,n.positionWC,new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=Jo(n),f=p[0]-d,g=p[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var c;if(!n)return;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(c=this.viewer)==null?void 0:c.camera;return l&&Er(l,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:l,flyDuration:c,hDelta:u,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,l,0],duration:c*1e3,hdelta:u,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Er(f,p,o)}flyToBoundingSphere(e,n,o=1){var p;const s=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],r=a.getGeoBoundingSphereFromPositions(s);if(!r)return;const{center:l,radius:c}=r,u={position:l,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Er(d,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Gt(e),rotation:Jo(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,s,r,l){var c,u;(u=(c=this._viewerInstance)==null?void 0:c.obj)==null||u.navigationManager.changeToLine(e,n,o,s,r,l),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToFollow(e,n,o,s,r),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=h.VERSION,e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=h.Cartographic.fromDegrees(e,n,void 0,st.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(s)??null}async getHeightsByLonLats(e,n){const o=e.map(r=>this.getHeightByLonLat(...r));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await bm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Le(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const s=e.components.main??e;s&&n!=null&&(s.editingID=`${o.callSource}_${a.createGuid()}`,this._editingSystem.create(this,s,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=a.createGuid();for(let s=0;s<e.length;s++){const r=e[s],l=r.components.main??r;l.editingID=o,l&&n.push(l)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=st.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!st.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=st.latestDefaultAccessToken}positionsToLocalPositions(e,n){return It(e,n)}localPositionsToPositions(e,n){return yn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=Le(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const s=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!s||s.x<0||s.y<0)}getESProperties(){const e={...super.getESProperties()},n=st.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",R4,D4,!0),new a.FunctionProperty([],()=>st.getCesiumIonToken(),[],"获取官方token"),new a.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new a.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new a.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new a.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new a.GroupProperty([],"Viewer","Viewer"),new a.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new a.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new a.BooleanProperty([this,"shadows"]),new a.GroupProperty([],"比例尺","比例尺(Legend)"),new a.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new a.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new a.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new a.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new a.GroupProperty([],"场景","场景(Scene)"),new a.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new a.GroupProperty([],"Globe","Globe"),new a.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new a.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new a.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new a.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new a.BooleanProperty([this,"sceneGlobeShowSkirts"]),new a.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new a.ColorProperty([this,"sceneGlobeBaseColor"]),new a.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new a.JsonProperty([this,"sceneGlobeClippingPlanes"]),new a.StringProperty([this,"sceneGlobeClippingPlanesId"]),new a.JsonProperty([this,"sceneGlobeClippingPolygons"]),new a.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new a.GroupProperty([],"underground","underground"),new a.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new a.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new a.GroupProperty([],"Translucency","Translucency"),new a.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new a.GroupProperty([],"Sun","Sun"),new a.BooleanProperty([this,"sun"],"sun",n.sun,!0),new a.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new a.GroupProperty([],"Moon","Moon"),new a.BooleanProperty([this,"moon"],"moon",n.moon,!0),new a.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new a.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new a.GroupProperty([],"SkyBox","SkyBox"),new a.BooleanProperty([this,"sceneSkyBoxShow"]),new a.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new a.GroupProperty([],"Background","Background"),new a.BooleanProperty([this,"xbsjUseBackground"]),new a.StringProperty([this,"xbsjBackgroundImageUri"]),new a.ColorProperty([this,"xbsjBackgroundColor"]),new a.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new a.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new a.ColorProperty([this,"sceneBackgroundColor"]),new a.GroupProperty([],"Fog","Fog"),new a.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new a.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new a.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new a.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new a.GroupProperty([],"Sscc","Sscc"),new a.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new a.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new a.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new a.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new a.GroupProperty([],"后处理","后处理"),new a.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new a.GroupProperty([],"环境遮蔽","环境遮蔽"),new a.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new a.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new a.GroupProperty([],"Bloom","Bloom"),new a.BooleanProperty([this,"scenePpsBloomEnabled"]),new a.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new a.NumberProperty([this,"scenePpsBloomContrast"]),new a.NumberProperty([this,"scenePpsBloomBrightness"]),new a.NumberProperty([this,"scenePpsBloomDelta"]),new a.NumberProperty([this,"scenePpsBloomSigma"]),new a.NumberProperty([this,"scenePpsBloomStepSize"]),new a.GroupProperty([],"调试","调试"),new a.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new a.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new a.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new a.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new a.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new a.GroupProperty([],"Inspector","Inspector"),new a.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new a.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new a.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};v(st,"type",st.register("ESCesiumViewer",st)),v(st,"getCesiumIonToken",F4),v(st,"currentDefaultAccessToken",h.Ion.defaultAccessToken),v(st,"latestDefaultAccessToken"),v(st,"ObjectsToExcludeWrapper",yF),v(st,"defaults",{...a.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),v(st,"getHeightsScartchCarto",new h.Cartographic);let Te=st;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...I4()})})(Te||(Te={})),a.extendClassProps(Te.prototype,Te.createDefaultProps),M.copyright=void 0;try{const t="earthsdk3-cesium",i="3.5.0-beta.21",e="2025-10-24T06:36:57.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="af1fcfa59ce080208fcc4e95f0924ca6a4ecb503",l=((Date.now()-1761287817e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
2295
2295
  %c${o?o+`
2296
2296
  `:""}当前网站正在使用${t},此软件版权归${n}所有
2297
- `;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","d1e7c72f07f84b9908276e9d5e2728f3852f06c6")},get info(){return c},get date(){return"2025-10-23T10:01:13.000Z"},get author(){return"suplyang"},get version(){return"3.5.0-beta.20"},get name(){return"earthsdk3-cesium"},get commitId(){return"d1e7c72f07f84b9908276e9d5e2728f3852f06c6"},print(){console.info(this.info,`
2297
+ `;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","af1fcfa59ce080208fcc4e95f0924ca6a4ecb503")},get info(){return c},get date(){return"2025-10-24T06:36:57.000Z"},get author(){return"suplyang"},get version(){return"3.5.0-beta.21"},get name(){return"earthsdk3-cesium"},get commitId(){return"af1fcfa59ce080208fcc4e95f0924ca6a4ecb503"},print(){console.info(this.info,`
2298
2298
  font-size: 18px;
2299
2299
  font-weight: 1000;
2300
2300
  line-height: 1;